gnokii-0.6.31/0000755000175000017500000000000011666163456011217 5ustar leoleognokii-0.6.31/Makefile.am0000644000175000017500000000077411666163120013247 0ustar leoleoSUBDIRS = getopt include common gnokii po Docs if WIN32 else SUBDIRS += gnokiid utils endif if XGNOKII SUBDIRS += xgnokii endif if SMSD SUBDIRS += smsd endif DIST_SUBDIRS = include Docs common gnokii gnokiid utils xgnokii po smsd Windows testsuite getopt EXTRA_DIST = \ ChangeLog \ COPYING \ COPYRIGHT \ MAINTAINERS \ TODO \ intltool-extract.in \ intltool-merge.in \ intltool-update.in DISTCLEANFILES = intltool-extract intltool-merge intltool-update ACLOCAL_AMFLAGS = -I m4 gnokii-0.6.31/intltool-update.in0000644000175000017500000000000011666163203014647 0ustar leoleognokii-0.6.31/Makefile.in0000644000175000017500000006151711666163212013264 0ustar leoleo# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ @WIN32_FALSE@am__append_1 = gnokiid utils @XGNOKII_TRUE@am__append_2 = xgnokii @SMSD_TRUE@am__append_3 = smsd subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \ ChangeLog INSTALL NEWS TODO compile config.guess config.rpath \ config.sub depcomp install-sh ltmain.sh missing mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_expand_dir.m4 \ $(top_srcdir)/m4/acx_pthread.m4 $(top_srcdir)/m4/intltool.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d "$(distdir)" \ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr "$(distdir)"; }; } am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLUETOOTH_LIBS = @BLUETOOTH_LIBS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FIND = @FIND@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLDFLAGS = @GLDFLAGS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GMODULE_CFLAGS = @GMODULE_CFLAGS@ GMODULE_LIBS = @GMODULE_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GNOKII_LT_VERSION = @GNOKII_LT_VERSION@ GNOKII_LT_VERSION_AGE = @GNOKII_LT_VERSION_AGE@ GNOKII_LT_VERSION_CURRENT = @GNOKII_LT_VERSION_CURRENT@ GNOKII_LT_VERSION_REVISION = @GNOKII_LT_VERSION_REVISION@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_LIBICAL = @HAVE_LIBICAL@ HAVE_LIBUSB = @HAVE_LIBUSB@ HAVE_SOCKETPHONET = @HAVE_SOCKETPHONET@ HAVE_XGNOKII = @HAVE_XGNOKII@ ICAL_CFLAGS = @ICAL_CFLAGS@ ICAL_LIBS = @ICAL_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBGNOKII_VERSION_MAJOR = @LIBGNOKII_VERSION_MAJOR@ LIBGNOKII_VERSION_MINOR = @LIBGNOKII_VERSION_MINOR@ LIBGNOKII_VERSION_RELEASE = @LIBGNOKII_VERSION_RELEASE@ LIBGNOKII_VERSION_STRING = @LIBGNOKII_VERSION_STRING@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBPCSCLITE_CFLAGS = @LIBPCSCLITE_CFLAGS@ LIBPCSCLITE_LIBS = @LIBPCSCLITE_LIBS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKE = @MAKE@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ MYSQLCONFIG = @MYSQLCONFIG@ MYSQLCONFIG5 = @MYSQLCONFIG5@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_LIBS = @MYSQL_LIBS@ NEED_LOCALE_CHARSET = @NEED_LOCALE_CHARSET@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OWN_GETOPT = @OWN_GETOPT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PGCONFIG = @PGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSTGRES_CFLAGS = @POSTGRES_CFLAGS@ POSTGRES_LIBS = @POSTGRES_LIBS@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LIBS = @SQLITE3_LIBS@ SQLITE_CFLAGS = @SQLITE_CFLAGS@ SQLITE_LIBS = @SQLITE_LIBS@ STRIP = @STRIP@ TCP_LIBS = @TCP_LIBS@ TERMLDFLAGS = @TERMLDFLAGS@ TERMLIBS = @TERMLIBS@ USB_LIBS = @USB_LIBS@ USE_NLS = @USE_NLS@ USE_UNIX98PTYS = @USE_UNIX98PTYS@ VERSION = @VERSION@ WIN32 = @WIN32@ WIN32_CROSS = @WIN32_CROSS@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ XPACKAGE = @XPACKAGE@ XPM_CFLAGS = @XPM_CFLAGS@ XPM_LIBS = @XPM_LIBS@ XVERSION = @XVERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ acx_pthread_config = @acx_pthread_config@ 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@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = getopt include common gnokii po Docs $(am__append_1) \ $(am__append_2) $(am__append_3) DIST_SUBDIRS = include Docs common gnokii gnokiid utils xgnokii po smsd Windows testsuite getopt EXTRA_DIST = \ ChangeLog \ COPYING \ COPYRIGHT \ MAINTAINERS \ TODO \ intltool-extract.in \ intltool-merge.in \ intltool-update.in DISTCLEANFILES = intltool-extract intltool-merge intltool-update ACLOCAL_AMFLAGS = -I m4 all: all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @$(am__cd) '$(distuninstallcheck_dir)' \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) 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-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ distcheck distclean distclean-generic distclean-libtool \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gnokii-0.6.31/TODO0000644000175000017500000000275111666163120011700 0ustar leoleoSHORT TERM * remove encoding workarounds -- should be purely based on libiconv and glib (in progress) * polish support for FreeDesktop.org file location standards (in progress) * improve Series40 support (in progress) * cleanup phone flags * bring back Windows support (in progress) LONG TERM * gnokii changes: o readline support (partially done: gnokii --shell) o easy backup/restore commands * libgnokii changes o make modules dynamically loadable (phone drivers, connection drivers) o improve interfaces + encoding/decoding functions require output length + move information hardcoded in the drivers into gn_phone_model structure o change structures to be dynamically allocatable (in progress) * driver changes o allow two drivers to be used in parallel (ie. mixed drivers) o obex support o syncml support o support new phones with filesystems, cameras and other bells'n'whistles o Nokia 9210 and family o bluetooth support for Windows (works only with MS bluetooth stack) * GNOME/KDE support o external apps * Full Smart Messaging Specification 3.0, EMS, etc. * at driver o Support AT+CCLK and AT*EDST on Sony Ericsson (Ericsson?) phones, for time setting with DST support o Support AT*EBCA unsolicited messages to avoid having to poll for battery status o Implement alarm support using AT+CALA and AT+CALD (Sony Ericsson) o When "ON" is used on (Sony)-Ericsson phones, use the BC folder instead gnokii-0.6.31/smsd/0000755000175000017500000000000011666163466012166 5ustar leoleognokii-0.6.31/smsd/Makefile.am0000644000175000017500000000263611666163120014214 0ustar leoleobin_PROGRAMS = smsd plugindir = $(libdir)/smsd plugin_LTLIBRARIES = libsmsd_file.la modules_flags = -avoid-version -module if HAVE_POSTGRES plugin_LTLIBRARIES += libsmsd_pq.la libsmsd_pq_la_SOURCES = pq.c db.h utils.h utils.c libsmsd_pq_la_LDFLAGS = $(modules_flags) libsmsd_pq_la_LIBADD = $(POSTGRES_LIBS) endif if HAVE_MYSQL plugin_LTLIBRARIES += libsmsd_mysql.la libsmsd_mysql_la_SOURCES = mysql.c db.h utils.h utils.c libsmsd_mysql_la_LDFLAGS = $(modules_flags) libsmsd_mysql_la_LIBADD = $(MYSQL_LIBS) endif if HAVE_SQLITE plugin_LTLIBRARIES += libsmsd_sqlite.la libsmsd_sqlite_la_SOURCES = sqlite.c db.h utils.h utils.c libsmsd_sqlite_la_LDFLAGS = $(modules_flags) libsmsd_sqlite_la_LIBADD = $(SQLITE_LIBS) endif libsmsd_file_la_SOURCES = file.c db.h utils.h utils.c libsmsd_file_la_LDFLAGS = $(modules_flags) libsmsd_file_la_LIBADD = $(GLIB_LIBS) smsd_SOURCES = smsd.h smsd.c lowlevel.c lowlevel.h db.h smsd_LDADD = $(GLIB_LIBS) $(GMODULE_LIBS) $(PTHREAD_LIBS) $(INTLLIBS) $(top_builddir)/common/libgnokii.la AM_CFLAGS = \ -I$(top_srcdir)/include \ -I$(srcdir)/ \ $(GLIB_CFLAGS) \ $(POSTGRES_CFLAGS) \ $(SQLITE_CFLAGS) \ $(MYSQL_CFLAGS) \ -DMODULES_DIR=\"${plugindir}\" \ -DLOCALEDIR=\"$(localedir)\" \ $(PTHREAD_CFLAGS) man_MANS = man/smsd.8 EXTRA_DIST = sqlite.c pq.c mysql.c README ChangeLog action README.MySQL sms.tables.mysql.sql sms.tables.pq.sql sms.tables.sqlite.sql README.Tru64 $(man_MANS) gnokii-0.6.31/smsd/Makefile.in0000644000175000017500000007004611666163212014227 0ustar leoleo# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ bin_PROGRAMS = smsd$(EXEEXT) @HAVE_POSTGRES_TRUE@am__append_1 = libsmsd_pq.la @HAVE_MYSQL_TRUE@am__append_2 = libsmsd_mysql.la @HAVE_SQLITE_TRUE@am__append_3 = libsmsd_sqlite.la subdir = smsd DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_expand_dir.m4 \ $(top_srcdir)/m4/acx_pthread.m4 $(top_srcdir)/m4/intltool.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(plugindir)" "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(man8dir)" LTLIBRARIES = $(plugin_LTLIBRARIES) am__DEPENDENCIES_1 = libsmsd_file_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am_libsmsd_file_la_OBJECTS = file.lo utils.lo libsmsd_file_la_OBJECTS = $(am_libsmsd_file_la_OBJECTS) libsmsd_file_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libsmsd_file_la_LDFLAGS) $(LDFLAGS) -o $@ @HAVE_MYSQL_TRUE@libsmsd_mysql_la_DEPENDENCIES = \ @HAVE_MYSQL_TRUE@ $(am__DEPENDENCIES_1) am__libsmsd_mysql_la_SOURCES_DIST = mysql.c db.h utils.h utils.c @HAVE_MYSQL_TRUE@am_libsmsd_mysql_la_OBJECTS = mysql.lo utils.lo libsmsd_mysql_la_OBJECTS = $(am_libsmsd_mysql_la_OBJECTS) libsmsd_mysql_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libsmsd_mysql_la_LDFLAGS) $(LDFLAGS) -o $@ @HAVE_MYSQL_TRUE@am_libsmsd_mysql_la_rpath = -rpath $(plugindir) @HAVE_POSTGRES_TRUE@libsmsd_pq_la_DEPENDENCIES = \ @HAVE_POSTGRES_TRUE@ $(am__DEPENDENCIES_1) am__libsmsd_pq_la_SOURCES_DIST = pq.c db.h utils.h utils.c @HAVE_POSTGRES_TRUE@am_libsmsd_pq_la_OBJECTS = pq.lo utils.lo libsmsd_pq_la_OBJECTS = $(am_libsmsd_pq_la_OBJECTS) libsmsd_pq_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libsmsd_pq_la_LDFLAGS) $(LDFLAGS) -o $@ @HAVE_POSTGRES_TRUE@am_libsmsd_pq_la_rpath = -rpath $(plugindir) @HAVE_SQLITE_TRUE@libsmsd_sqlite_la_DEPENDENCIES = \ @HAVE_SQLITE_TRUE@ $(am__DEPENDENCIES_1) am__libsmsd_sqlite_la_SOURCES_DIST = sqlite.c db.h utils.h utils.c @HAVE_SQLITE_TRUE@am_libsmsd_sqlite_la_OBJECTS = sqlite.lo utils.lo libsmsd_sqlite_la_OBJECTS = $(am_libsmsd_sqlite_la_OBJECTS) libsmsd_sqlite_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libsmsd_sqlite_la_LDFLAGS) $(LDFLAGS) -o $@ @HAVE_SQLITE_TRUE@am_libsmsd_sqlite_la_rpath = -rpath $(plugindir) PROGRAMS = $(bin_PROGRAMS) am_smsd_OBJECTS = smsd.$(OBJEXT) lowlevel.$(OBJEXT) smsd_OBJECTS = $(am_smsd_OBJECTS) smsd_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(top_builddir)/common/libgnokii.la DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libsmsd_file_la_SOURCES) $(libsmsd_mysql_la_SOURCES) \ $(libsmsd_pq_la_SOURCES) $(libsmsd_sqlite_la_SOURCES) \ $(smsd_SOURCES) DIST_SOURCES = $(libsmsd_file_la_SOURCES) \ $(am__libsmsd_mysql_la_SOURCES_DIST) \ $(am__libsmsd_pq_la_SOURCES_DIST) \ $(am__libsmsd_sqlite_la_SOURCES_DIST) $(smsd_SOURCES) man8dir = $(mandir)/man8 NROFF = nroff MANS = $(man_MANS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLUETOOTH_LIBS = @BLUETOOTH_LIBS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FIND = @FIND@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLDFLAGS = @GLDFLAGS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GMODULE_CFLAGS = @GMODULE_CFLAGS@ GMODULE_LIBS = @GMODULE_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GNOKII_LT_VERSION = @GNOKII_LT_VERSION@ GNOKII_LT_VERSION_AGE = @GNOKII_LT_VERSION_AGE@ GNOKII_LT_VERSION_CURRENT = @GNOKII_LT_VERSION_CURRENT@ GNOKII_LT_VERSION_REVISION = @GNOKII_LT_VERSION_REVISION@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_LIBICAL = @HAVE_LIBICAL@ HAVE_LIBUSB = @HAVE_LIBUSB@ HAVE_SOCKETPHONET = @HAVE_SOCKETPHONET@ HAVE_XGNOKII = @HAVE_XGNOKII@ ICAL_CFLAGS = @ICAL_CFLAGS@ ICAL_LIBS = @ICAL_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBGNOKII_VERSION_MAJOR = @LIBGNOKII_VERSION_MAJOR@ LIBGNOKII_VERSION_MINOR = @LIBGNOKII_VERSION_MINOR@ LIBGNOKII_VERSION_RELEASE = @LIBGNOKII_VERSION_RELEASE@ LIBGNOKII_VERSION_STRING = @LIBGNOKII_VERSION_STRING@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBPCSCLITE_CFLAGS = @LIBPCSCLITE_CFLAGS@ LIBPCSCLITE_LIBS = @LIBPCSCLITE_LIBS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKE = @MAKE@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ MYSQLCONFIG = @MYSQLCONFIG@ MYSQLCONFIG5 = @MYSQLCONFIG5@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_LIBS = @MYSQL_LIBS@ NEED_LOCALE_CHARSET = @NEED_LOCALE_CHARSET@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OWN_GETOPT = @OWN_GETOPT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PGCONFIG = @PGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSTGRES_CFLAGS = @POSTGRES_CFLAGS@ POSTGRES_LIBS = @POSTGRES_LIBS@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LIBS = @SQLITE3_LIBS@ SQLITE_CFLAGS = @SQLITE_CFLAGS@ SQLITE_LIBS = @SQLITE_LIBS@ STRIP = @STRIP@ TCP_LIBS = @TCP_LIBS@ TERMLDFLAGS = @TERMLDFLAGS@ TERMLIBS = @TERMLIBS@ USB_LIBS = @USB_LIBS@ USE_NLS = @USE_NLS@ USE_UNIX98PTYS = @USE_UNIX98PTYS@ VERSION = @VERSION@ WIN32 = @WIN32@ WIN32_CROSS = @WIN32_CROSS@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ XPACKAGE = @XPACKAGE@ XPM_CFLAGS = @XPM_CFLAGS@ XPM_LIBS = @XPM_LIBS@ XVERSION = @XVERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ acx_pthread_config = @acx_pthread_config@ 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@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ plugindir = $(libdir)/smsd plugin_LTLIBRARIES = libsmsd_file.la $(am__append_1) $(am__append_2) \ $(am__append_3) modules_flags = -avoid-version -module @HAVE_POSTGRES_TRUE@libsmsd_pq_la_SOURCES = pq.c db.h utils.h utils.c @HAVE_POSTGRES_TRUE@libsmsd_pq_la_LDFLAGS = $(modules_flags) @HAVE_POSTGRES_TRUE@libsmsd_pq_la_LIBADD = $(POSTGRES_LIBS) @HAVE_MYSQL_TRUE@libsmsd_mysql_la_SOURCES = mysql.c db.h utils.h utils.c @HAVE_MYSQL_TRUE@libsmsd_mysql_la_LDFLAGS = $(modules_flags) @HAVE_MYSQL_TRUE@libsmsd_mysql_la_LIBADD = $(MYSQL_LIBS) @HAVE_SQLITE_TRUE@libsmsd_sqlite_la_SOURCES = sqlite.c db.h utils.h utils.c @HAVE_SQLITE_TRUE@libsmsd_sqlite_la_LDFLAGS = $(modules_flags) @HAVE_SQLITE_TRUE@libsmsd_sqlite_la_LIBADD = $(SQLITE_LIBS) libsmsd_file_la_SOURCES = file.c db.h utils.h utils.c libsmsd_file_la_LDFLAGS = $(modules_flags) libsmsd_file_la_LIBADD = $(GLIB_LIBS) smsd_SOURCES = smsd.h smsd.c lowlevel.c lowlevel.h db.h smsd_LDADD = $(GLIB_LIBS) $(GMODULE_LIBS) $(PTHREAD_LIBS) $(INTLLIBS) $(top_builddir)/common/libgnokii.la AM_CFLAGS = \ -I$(top_srcdir)/include \ -I$(srcdir)/ \ $(GLIB_CFLAGS) \ $(POSTGRES_CFLAGS) \ $(SQLITE_CFLAGS) \ $(MYSQL_CFLAGS) \ -DMODULES_DIR=\"${plugindir}\" \ -DLOCALEDIR=\"$(localedir)\" \ $(PTHREAD_CFLAGS) man_MANS = man/smsd.8 EXTRA_DIST = sqlite.c pq.c mysql.c README ChangeLog action README.MySQL sms.tables.mysql.sql sms.tables.pq.sql sms.tables.sqlite.sql README.Tru64 $(man_MANS) all: all-am .SUFFIXES: .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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu smsd/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu smsd/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 $(am__aclocal_m4_deps): install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(plugindir)" || $(MKDIR_P) "$(DESTDIR)$(plugindir)" @list='$(plugin_LTLIBRARIES)'; test -n "$(plugindir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(plugindir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(plugindir)"; \ } uninstall-pluginLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(plugin_LTLIBRARIES)'; test -n "$(plugindir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$f"; \ done clean-pluginLTLIBRARIES: -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libsmsd_file.la: $(libsmsd_file_la_OBJECTS) $(libsmsd_file_la_DEPENDENCIES) $(libsmsd_file_la_LINK) -rpath $(plugindir) $(libsmsd_file_la_OBJECTS) $(libsmsd_file_la_LIBADD) $(LIBS) libsmsd_mysql.la: $(libsmsd_mysql_la_OBJECTS) $(libsmsd_mysql_la_DEPENDENCIES) $(libsmsd_mysql_la_LINK) $(am_libsmsd_mysql_la_rpath) $(libsmsd_mysql_la_OBJECTS) $(libsmsd_mysql_la_LIBADD) $(LIBS) libsmsd_pq.la: $(libsmsd_pq_la_OBJECTS) $(libsmsd_pq_la_DEPENDENCIES) $(libsmsd_pq_la_LINK) $(am_libsmsd_pq_la_rpath) $(libsmsd_pq_la_OBJECTS) $(libsmsd_pq_la_LIBADD) $(LIBS) libsmsd_sqlite.la: $(libsmsd_sqlite_la_OBJECTS) $(libsmsd_sqlite_la_DEPENDENCIES) $(libsmsd_sqlite_la_LINK) $(am_libsmsd_sqlite_la_rpath) $(libsmsd_sqlite_la_OBJECTS) $(libsmsd_sqlite_la_LIBADD) $(LIBS) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list smsd$(EXEEXT): $(smsd_OBJECTS) $(smsd_DEPENDENCIES) @rm -f smsd$(EXEEXT) $(LINK) $(smsd_OBJECTS) $(smsd_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lowlevel.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mysql.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pq.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smsd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sqlite.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @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 $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-man8: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)" @list=''; test -n "$(man8dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.8[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \ done; } uninstall-man8: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man8dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.8[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man8dir)" && rm -f $$files; } ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(MANS) installdirs: for dir in "$(DESTDIR)$(plugindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man8dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-binPROGRAMS clean-generic clean-libtool \ clean-pluginLTLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-man install-pluginLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man8 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: 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-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-man \ uninstall-pluginLTLIBRARIES uninstall-man: uninstall-man8 .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool clean-pluginLTLIBRARIES ctags \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-man8 \ install-pdf install-pdf-am install-pluginLTLIBRARIES \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-binPROGRAMS \ uninstall-man uninstall-man8 uninstall-pluginLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gnokii-0.6.31/smsd/README.MySQL0000644000175000017500000000021311666163120013771 0ustar leoleoIn some distributions of MySQL you need to link zlib with smsd or db module. Please add '-lz' to Makefile if smsd cannot load libmysql.so. gnokii-0.6.31/smsd/smsd.h0000644000175000017500000000310611666163120013270 0ustar leoleo/* S M S D A Linux/Unix tool for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999 Pavel Janík ml., Hugh Blemings Copyright (C) 1999-2011 Jan Derfinak */ #ifndef SMSD_H #define SMSD_H #include "config.h" #include "compat.h" #include "gnokii.h" #include /* error definition */ #define SMSD_OK 0 #define SMSD_NOK 1 #define SMSD_DUPLICATE 2 #define SMSD_WAITING 3 #define SMSD_OUTBOXEMPTY 4 typedef enum { SMSD_READ_REPORTS = 1 } SMSDSettings; typedef struct { gchar *bindir; gchar *dbMod; gchar *libDir; gchar *logFile; gchar *phone; gint refreshInt; gint maxSMS; gint firstSMS; // gint smsSets:4; gn_memory_type memoryType; } SmsdConfig; typedef struct { gchar *user; gchar *password; gchar *db; gchar *host; gchar *schema; gchar *clientEncoding; } DBConfig; extern SmsdConfig smsdConfig; GNOKII_API gint WriteSMS (gn_sms *); #endif gnokii-0.6.31/smsd/README0000644000175000017500000002044011666163120013031 0ustar leoleoNOTE: The database format from version 1.0 to 1.1 changed! You must add column dreport to outbox table. NOTE: The database format from version 1.1 to 1.2 changed! You must add column phone to outbox and inbox tables. NOTE: The database format from version 1.3 to 1.4 changed! You must add columns not_before and not_after to outbox. NOTE: The database format from version 1.4.X to 1.5.X changed. Dump data, delete db, create new db from schema and load data from backup. NOTE: You must NOT ./configure --disable-shared in gnokii directory to let smsd compile correctly. INTRODUCTION The SMSD (SMS daemon) program is intended for receiving and sending SMS's. I provide the program AS IS without any warranty under GPL. The program is designed to use modules (plugins) to work with an SQL server. Currently are supported PostgreSQL, MySQL and a special module 'file' which is designed to work without an SQL database (see below for special instructions for the file module). See option --module. SMSD uses an SQL server as a repository for SMS's. You must create a database (default name is 'sms') with tables defined in sms.tables.{module}.sql files. Table 'inbox' is for received SMS's: number - phone number from which is sms received smsdate - date set by SMS center insertdate - date SMS was inserted into table text - SMS text phone - number of phone to use. If you use smsd without -t option you can ignore this column. See -t option below. processed - smsd sets this always to FALSE. You can use it for another program which will parse SMS's. When the phone receives an SMS, SMSD moves it into 'inbox' table and removes the SMS from the phone. Table 'outbox' is for outgoing SMS's. SMSD periodicaly looks into this table and searches for lines with attribute 'processed' set to FALSE. If it find such SMS, it will send SMS to 'number': number - recipient's phone number processed_date - date of processing SMS. insertdate - date of inserting SMS in table text - SMS text phone - number of phone to use. If you use smsd without -t option you must not fill this column. See -t option below. processed - new SMS must have this attribut set to FALSE. SMSD will send this SMS and will update 'processed' to TRUE. error - This attribute contains return value of gn_sms_send() function. For explanation of numeric values see in gnokii source. dreport - request for delivery report per message. Possible values are 0 for no delivery report, 1 for delivery report. not_before - sms will not be send before this time (default 00:00:00). not_after - sms will not be send after this time (default 23:59:59). SMSD is multi threaded program. If you list processes you will see more then one instance of smsd. MySQL, PosgreSQL module supports incoming multipart SMSes. It uses special table called 'multipartinbox': number - same as inbox smsdate - same as inbox insertdate - same as inbox text - same as inbox phone - same as inbox processed - same as inbox refnum - identifier of the multipart series (all parts have the same refnum) maxnum - total number of SMS parts curnum - number of current part within the series THE FILE MODULE This module doesn't need an SQL server to work. For incoming messages it work in a way that it calls a program giving phone number, date as parameter and the message text on stdin. In the smsd directory there is as example file action. It shows sms data to stdout. If you want something usefull you must write your own action. For outgoing messages you can set spool directory where smsd looks regularly. Incoming sms are passed in format action number date < sms Outgoing sms must be in format: number text The name of file is unimportant but smsd ignores all files with prefix "ERR.". If smsd succesfuly sends sms, it removes file from spool directory. If smsd cannot sends sms prepend file with "ERR." prefix and ignores it. If you use -m file, -u (--user) and -c (--host) will have other meaning. -u is for action (action must be executable) -c is for spool directory where smsd looks for sms's. Smsd must have read and write permissions to this directory. -p, -d parameters have no meaning when -m file is used. If you don't specify -u, default action is to print sms to stdin. If you don't specify -c, sms sending will be disabled. OPTIONS Options: -u, --user db_username Specify user name. -p, --password db_password Specify user password. -d, --db db_name Specify database name. -c, --host db_hostname Specify database server host name. -s, --schema db_schema Specify database schema. -e, --encoding client_encoding Specify client encoding for database connection. -m, --module db_module Specify which module to use for connection to DB server. Currently supported are pq for PostgreSQL, mysql for MySQL, sqlite for SQLite3 and file for the text file (see THE FILE MODULE section). Default is file module. -l, --libdir path_to_db_module Specify path to DB modules. If you specify pq module, smsd searches in libdir for file libsmsd_pq.so (for mysql - libsmsd_mysql.so). Do not interchange this plugins with default SQL libraries from database distribution! -f, --logfile file If used, smsd will monitor sms traffic to file "file". File is reopened and closed for every message so you can simply rename or delete it if you want rotate logs. If you use '-' as filename smsd will use standard output. -t, --phone phone_number You can run more instances of smsd. One instance per phone. In this setup you must configure phone section in the config file. For example: [global] port = /dev/ttyS0 model = 6110 initlength = default connection = serial bindir = /usr/local/sbin/ use_locking = no serial_baudrate = 38400 smsc_timeout = 10 [phone_1] port = /dev/ttyS0 model = 6110 initlength = default connection = serial bindir = /usr/local/sbin/ use_locking = no serial_baudrate = 38400 [phone_2] port = /dev/ttyS1 model = AT initlength = default connection = serial bindir = /usr/local/sbin/ use_locking = no serial_baudrate = 38400 smsc_timeout = 10 In this setup if you run smsd without -t option it will use config from global section. If you run smsd with -t 1 it will use config from phone_1 and likewise with -t 2 uses phone_2. In case of use -t option smsd fill phone number for incoming sms's and in outbox it looks only for sms's with the specified phone number in column 'phone'. This behaviour give you possibility to run one instance of smsd for every phone you have at the same time. -i, --interval interval Polling interval for incoming sms's in seconds. Default is 1 second. -S, --maxsms number When phone driver doesn't support sms status it is possible to specify number of sms's supported by phone. Default is 10. If driver support sms status this option is ignored. -b, --inbox memory_type Where to look for new messages. For the memory_type you usually use SM for the SIM card and ME for the phone memory. The exception are the phones supported by nk7110 (Nokia 7110/6210/6250) and nk6510 (Nokia 6310/6510/8310) drivers. For these you should use IN for the Inbox, OU for the Outbox, AR for the Archive, TE for the Templates and F1, F2, ... for your own folders. -0, --firstpos0 SMSD starts messages reading from position 1. If your phone stores sms's from postion 0, use this option. -v, --version Shows smsd version. -h, --help Shows short help. COMPILATION SMSD is now compiled by default with gnokii 'make' command; see detailed instructions in top level INSTALL file. The configure script autodetects the plugins to build: - the PostgreSQL module is built if pg_config is present (plugin file is libsmsd_pq.so) - the MySQL module is built if mysql_config is present (plugin file is libsmsd_mysql.so) - the SQLIte module is built if sqlite3 libraries are detected (plugin file is libsmsd_sqlite.so) - the file module is built if glib is present (plugin file is libsmsd_file.so) Note that you can build all of the modules (libsmsd_pq, libsmsd_mysql and libsmsd_file) but you should load just one. SMSD shares gnokii's runtime configuration file and libgnokii. Jan Derfinak gnokii-0.6.31/smsd/pq.c0000644000175000017500000003537411666163120012751 0ustar leoleo/* S M S D A Linux/Unix tool for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999 Pavel Janík ml., Hugh Blemings Copyright (C) 1999-2011 Jan Derfinak This file is a module to smsd for PostgreSQL db server. */ #include "config.h" #include #include #include #include #include "smsd.h" #include "gnokii.h" #include "compat.h" //#include "utils.h" static PGconn *connIn = NULL; static PGconn *connOut = NULL; static gchar *schema = NULL; /* database schema */ GNOKII_API void DB_Bye (void) { if (connIn) PQfinish (connIn); if (connOut) PQfinish (connOut); } static gint Connect (const DBConfig connect, PGconn **conn) { *conn = PQsetdbLogin (connect.host[0] != '\0' ? connect.host : NULL, NULL, NULL, NULL, connect.db, connect.user[0] != '\0' ? connect.user : NULL, connect.password[0] != '\0' ? connect.password : NULL); if (PQstatus (*conn) == CONNECTION_BAD) { g_print (_("Connection to database '%s' on host '%s' failed.\n"), connect.db, connect.host); g_print (_("Error: %s\n"), PQerrorMessage (*conn)); return (SMSD_NOK); } if (connect.clientEncoding[0] != '\0') if (PQsetClientEncoding (*conn, connect.clientEncoding)) { g_print (_("Setting client charset '%s' for database '%s' on host '%s' failed.\n"), connect.clientEncoding, connect.db, connect.host); g_print (_("Error: %s\n"), PQerrorMessage (*conn)); } if (schema == NULL) schema = g_strdup (connect.schema); return (SMSD_OK); } GNOKII_API gint DB_ConnectInbox (const DBConfig connect) { return (Connect (connect, &connIn)); } GNOKII_API gint DB_ConnectOutbox (const DBConfig connect) { return (Connect (connect, &connOut)); } GNOKII_API gint DB_InsertSMS (const gn_sms * const data, const gchar * const phone) { GString *buf, *phnStr; gchar *text; PGresult *res; gint err; if (phone[0] == '\0') phnStr = g_string_new (""); else { phnStr = g_string_sized_new (32); g_string_printf (phnStr, "'%s',", phone); } text = g_malloc (strlen ((gchar *)data->user_data[0].u.text) * 2 + 1); PQescapeStringConn (connIn, text, (gchar *) data->user_data[0].u.text, strlen ((gchar *)data->user_data[0].u.text), &err); if (err) { g_print (_("%d: Escaping string failed.\n"), __LINE__); g_print (_("Error: %s\n"), PQerrorMessage (connIn)); g_string_free (phnStr, TRUE); g_free (text); return (SMSD_NOK); } // text = strEscape ((gchar *) data->user_data[0].u.text); buf = g_string_sized_new (256); if (data->udh.udh[0].type == GN_SMS_UDH_ConcatenatedMessages) { // Multipart Message ! gn_log_xdebug ("Multipart message\n"); /* Check for duplicates */ g_string_printf (buf, "SELECT count(id) FROM %s.multipartinbox \ WHERE number = '%s' AND text = '%s' AND \ refnum = %d AND maxnum = %d AND curnum = %d AND \ smsdate = '%04d-%02d-%02d %02d:%02d:%02d'", schema, data->remote.number, text, data->udh.udh[0].u.concatenated_short_message.reference_number, data->udh.udh[0].u.concatenated_short_message.maximum_number, data->udh.udh[0].u.concatenated_short_message.current_number, data->smsc_time.year, data->smsc_time.month, data->smsc_time.day, data->smsc_time.hour, data->smsc_time.minute, data->smsc_time.second); res = PQexec (connIn, buf->str); if (!res || PQresultStatus (res) != PGRES_TUPLES_OK) { g_print (_("%d: SELECT FROM %s.multipart command failed.\n"), __LINE__, schema); gn_log_xdebug ("%s\n", buf->str); g_print (_("Error: %s\n"), PQerrorMessage (connIn)); PQclear (res); g_string_free (buf, TRUE); g_string_free (phnStr, TRUE); g_free (text); return (SMSD_NOK); } if (atoi (PQgetvalue (res, 0, 0)) > 0) { gn_log_xdebug ("%d: SMS already stored in the database (refnum=%d, maxnum=%d, curnum=%d).\n", __LINE__, data->udh.udh[0].u.concatenated_short_message.reference_number, data->udh.udh[0].u.concatenated_short_message.maximum_number, data->udh.udh[0].u.concatenated_short_message.current_number); PQclear (res); g_string_free (buf, TRUE); g_string_free (phnStr, TRUE); g_free (text); return (SMSD_DUPLICATE); } PQclear (res); /* insert into multipart */ g_string_printf (buf, "INSERT INTO %s.multipartinbox (number, smsdate, \ text, refnum , maxnum , curnum, %s processed) VALUES ('%s', \ '%04d-%02d-%02d %02d:%02d:%02d', '%s', %d, %d, %d, %s '0')", schema, phone[0] != '\0' ? "phone," : "", data->remote.number, data->smsc_time.year, data->smsc_time.month, data->smsc_time.day, data->smsc_time.hour, data->smsc_time.minute, data->smsc_time.second, text, data->udh.udh[0].u.concatenated_short_message.reference_number, data->udh.udh[0].u.concatenated_short_message.maximum_number, data->udh.udh[0].u.concatenated_short_message.current_number, phnStr->str); res = PQexec (connIn, buf->str); if (!res || PQresultStatus(res) != PGRES_COMMAND_OK) { g_print (_("%d: INSERT INTO %s.multipartinbox failed.\n"), __LINE__, schema); gn_log_xdebug ("%s\n", buf->str); g_print (_("Error: %s\n"), PQerrorMessage (connIn)); PQclear (res); g_string_free (buf, TRUE); g_string_free (phnStr, TRUE); g_free (text); return (SMSD_NOK); } PQclear (res); /* If all parts are already in multipart inbox, move it into inbox */ g_string_printf (buf, "SELECT text FROM %s.multipartinbox \ WHERE number='%s' AND refnum=%d AND maxnum=%d \ ORDER BY curnum", schema, data->remote.number, data->udh.udh[0].u.concatenated_short_message.reference_number, data->udh.udh[0].u.concatenated_short_message.maximum_number); res = PQexec (connIn, buf->str); if (!res || PQresultStatus (res) != PGRES_TUPLES_OK) { g_print (_("%d: SELECT FROM %s.multipart command failed.\n"), __LINE__, schema); gn_log_xdebug ("%s\n", buf->str); g_print (_("Error: %s\n"), PQerrorMessage (connIn)); PQclear (res); g_string_free (buf, TRUE); g_string_free (phnStr, TRUE); g_free (text); return (SMSD_NOK); } gn_log_xdebug ("maxnumber: %d - count: %d\n", data->udh.udh[0].u.concatenated_short_message.maximum_number, PQntuples (res)); if (PQntuples (res) == data->udh.udh[0].u.concatenated_short_message.maximum_number ) /* all parts collected */ { gint i; GString *mbuf = g_string_sized_new (256); for (i = 0; i < PQntuples (res); i++) g_string_append (mbuf, PQgetvalue (res, i, 0)); PQclear (res); g_string_printf(buf, "DELETE from %s.multipartinbox \ WHERE number='%s' AND refnum=%d AND maxnum=%d", schema, data->remote.number, data->udh.udh[0].u.concatenated_short_message.reference_number, data->udh.udh[0].u.concatenated_short_message.maximum_number); res = PQexec (connIn, buf->str); if (!res || PQresultStatus (res) != PGRES_COMMAND_OK) { g_print (_("%d: DELETE FROM %s.multipartinbox command failed.\n"), __LINE__, schema); gn_log_xdebug ("%s\n", buf->str); g_print (_("Error: %s\n"), PQerrorMessage (connIn)); PQclear (res); g_string_free (buf, TRUE); g_string_free (mbuf, TRUE); g_string_free (phnStr, TRUE); g_free (text); return (SMSD_NOK); } PQclear (res); g_free (text); text = g_malloc (strlen ((gchar *)data->user_data[0].u.text) * 2 + 1); PQescapeStringConn (connIn, text, mbuf->str, mbuf->len, &err); if (err) { g_print (_("%d: Escaping string failed.\n"), __LINE__); g_print (_("Error: %s\n"), PQerrorMessage (connIn)); g_string_free (buf, TRUE); g_string_free (mbuf, TRUE); g_string_free (phnStr, TRUE); g_free (text); return (SMSD_NOK); } // text = strEscape (mbuf->str); g_string_free (mbuf, TRUE); } else { PQclear (res); gn_log_xdebug ("Not whole message collected.\n"); g_string_free (buf, TRUE); g_string_free (phnStr, TRUE); g_free (text); return (SMSD_WAITING); } } gn_log_xdebug ("Message: %s\n", text); /* Detect duplicates */ g_string_printf (buf, "SELECT count(id) FROM %s.inbox \ WHERE number = '%s' AND text = '%s' AND \ smsdate = '%04d-%02d-%02d %02d:%02d:%02d'", schema, data->remote.number, text, data->smsc_time.year, data->smsc_time.month, data->smsc_time.day, data->smsc_time.hour, data->smsc_time.minute, data->smsc_time.second); res = PQexec (connIn, buf->str); if (!res || PQresultStatus (res) != PGRES_TUPLES_OK) { g_print (_("%d: SELECT FROM %s.inbox command failed.\n"), __LINE__, schema); gn_log_xdebug ("%s\n", buf->str); g_print (_("Error: %s\n"), PQerrorMessage (connIn)); PQclear (res); g_string_free (buf, TRUE); g_string_free (phnStr, TRUE); g_free (text); return (SMSD_NOK); } if (atoi (PQgetvalue (res, 0, 0)) > 0) { gn_log_xdebug ("%d: MSG already stored in database.\n", __LINE__); PQclear (res); g_string_free (buf, TRUE); g_string_free (phnStr, TRUE); g_free (text); return (SMSD_DUPLICATE); } PQclear (res); g_string_printf (buf, "INSERT INTO %s.inbox (\"number\", \"smsdate\", \"insertdate\",\ \"text\", %s \"processed\") VALUES ('%s', \ '%04d-%02d-%02d %02d:%02d:%02d', 'now', '%s', %s 'f')", schema, phone[0] != '\0' ? "\"phone\"," : "", data->remote.number, data->smsc_time.year, data->smsc_time.month, data->smsc_time.day, data->smsc_time.hour, data->smsc_time.minute, data->smsc_time.second, text, phnStr->str); g_free (text); g_string_free (phnStr, TRUE); res = PQexec (connIn, buf->str); g_string_free (buf, TRUE); if (!res || PQresultStatus(res) != PGRES_COMMAND_OK) { g_print (_("%d: INSERT INTO %s.inbox failed.\n"), __LINE__, schema); gn_log_xdebug ("%s\n", buf->str); g_print (_("Error: %s\n"), PQerrorMessage (connIn)); PQclear (res); return (SMSD_NOK); } PQclear (res); return (SMSD_OK); } GNOKII_API gint DB_Look (const gchar * const phone) { GString *buf, *phnStr; PGresult *res1, *res2; register int i; gint numError, error; gint empty = 1; if (phone[0] == '\0') phnStr = g_string_new (""); else { phnStr = g_string_sized_new (32); g_string_printf (phnStr, "AND phone = '%s'", phone); } buf = g_string_sized_new (256); res1 = PQexec (connOut, "BEGIN"); PQclear (res1); g_string_printf (buf, "SELECT id, number, text, dreport FROM %s.outbox \ WHERE processed='f' AND localtime(0) >= not_before \ AND localtime(0) <= not_after %s LIMIT 1 FOR UPDATE", schema, phnStr->str); g_string_free (phnStr, TRUE); res1 = PQexec (connOut, buf->str); if (!res1 || PQresultStatus (res1) != PGRES_TUPLES_OK) { g_print (_("%d: SELECT FROM %s.outbox command failed.\n"), __LINE__, schema); gn_log_xdebug ("%s\n", buf->str); g_print (_("Error: %s\n"), PQerrorMessage (connOut)); PQclear (res1); res1 = PQexec (connOut, "ROLLBACK TRANSACTION"); PQclear (res1); g_string_free (buf, TRUE); return (SMSD_NOK); } for (i = 0; i < PQntuples (res1); i++) { gn_sms sms; empty = 0; gn_sms_default_submit (&sms); memset (&sms.remote.number, 0, sizeof (sms.remote.number)); sms.delivery_report = atoi (PQgetvalue (res1, i, 3)); strncpy (sms.remote.number, PQgetvalue (res1, i, 1), sizeof (sms.remote.number) - 1); sms.remote.number[sizeof(sms.remote.number) - 1] = '\0'; if (sms.remote.number[0] == '+') sms.remote.type = GN_GSM_NUMBER_International; else sms.remote.type = GN_GSM_NUMBER_Unknown; strncpy ((gchar *) sms.user_data[0].u.text, PQgetvalue (res1, i, 2), 10 * GN_SMS_MAX_LENGTH + 1); sms.user_data[0].u.text[10 * GN_SMS_MAX_LENGTH] = '\0'; sms.user_data[0].length = strlen ((gchar *) sms.user_data[0].u.text); sms.user_data[0].type = GN_SMS_DATA_Text; sms.user_data[1].type = GN_SMS_DATA_None; if (!gn_char_def_alphabet (sms.user_data[0].u.text)) sms.dcs.u.general.alphabet = GN_SMS_DCS_UCS2; gn_log_xdebug ("Sending SMS: %s, %s\n", sms.remote.number, sms.user_data[0].u.text); numError = 0; do { error = WriteSMS (&sms); sleep (1); } while ((error == GN_ERR_TIMEOUT || error == GN_ERR_FAILED) && numError++ < 3); g_string_printf (buf, "UPDATE %s.outbox SET processed='t', error='%d', \ processed_date='now' WHERE id='%s'", schema, error, PQgetvalue (res1, i, 0)); res2 = PQexec (connOut, buf->str); if (!res2 || PQresultStatus (res2) != PGRES_COMMAND_OK) { g_print (_("%d: UPDATE command failed.\n"), __LINE__); gn_log_xdebug ("%s\n", buf->str); g_print (_("Error: %s\n"), PQerrorMessage (connOut)); } PQclear (res2); } PQclear (res1); res1 = PQexec (connOut, "COMMIT"); PQclear (res1); g_string_free (buf, TRUE); if (empty) return (SMSD_OUTBOXEMPTY); else return (SMSD_OK); } gnokii-0.6.31/smsd/smsd.c0000644000175000017500000003542711666163120013276 0ustar leoleo/* S M S D A Linux/Unix tool for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999 Pavel Janik ml., Hugh Blemings Copyright (C) 1999-2011 Jan Derfinak */ #include "config.h" #include #include #include #include #include #include #include #ifndef WIN32 # include /* for usleep */ # include #else # include # undef IN # undef OUT #endif #include #include #include "misc.h" #include "gnokii.h" #include "smsd.h" #include "lowlevel.h" #include "db.h" #ifdef ENABLE_NLS # include #endif /* Hold main configuration data for smsd */ SmsdConfig smsdConfig; /* Global variables */ bool GTerminateThread; /* Local variables */ static DBConfig connection; void (*DB_Bye) (void) = NULL; gint (*DB_ConnectInbox) (const DBConfig) = NULL; gint (*DB_ConnectOutbox) (const DBConfig) = NULL; gint (*DB_InsertSMS) (const gn_sms * const, const gchar * const) = NULL; gint (*DB_Look) (const gchar * const) = NULL; static pthread_t db_monitor_th; pthread_mutex_t db_monitorMutex; static volatile bool db_monitor; gint LoadDB (void) { GModule *handle; gchar *buf; gchar *full_name; full_name = g_strdup_printf ("smsd_%s", smsdConfig.dbMod); buf = g_module_build_path (smsdConfig.libDir, full_name); g_free (full_name); gn_log_xdebug ("Trying to load module %s\n", buf); handle = g_module_open (buf, G_MODULE_BIND_LAZY); g_free (buf); if (!handle) { g_print ("g_module_open error: %s!\n", g_module_error ()); return (1); } if (g_module_symbol (handle, "DB_Bye", (gpointer *)&DB_Bye) == FALSE) { g_print ("Error getting symbol 'DB_Bye': %s\n", g_module_error ()); return (2); } if (g_module_symbol (handle, "DB_ConnectInbox", (gpointer *)&DB_ConnectInbox) == FALSE) { g_print ("Error getting symbol 'DB_ConnectInbox': %s\n", g_module_error ()); return (2); } if (g_module_symbol (handle, "DB_ConnectOutbox", (gpointer *)&DB_ConnectOutbox) == FALSE) { g_print ("Error getting symbol 'DB_ConnectOutbox': %s\n", g_module_error ()); return (2); } if (g_module_symbol (handle, "DB_InsertSMS", (gpointer *)&DB_InsertSMS) == FALSE) { g_print ("Error getting symbol 'DB_InsertSMS': %s\n", g_module_error ()); return (2); } if (g_module_symbol (handle, "DB_Look", (gpointer *)&DB_Look) == FALSE) { g_print ("Error getting symbol 'DB_Look': %s\n", g_module_error ()); return (2); } return (0); } static void Short_Version (void) { g_print (_("smsd - version %s from gnokii %s\n"), SVERSION, VERSION); } static void Version (void) { g_print (_("smsd - version %s from gnokii %s\nCopyright Jan Derfinak 1999-2011\n"), SVERSION, VERSION); } static void Usage (gchar *p) { Version (); g_print (_("\nUsage: %s [options]\n" " -u, --user db_username OR action if -m file\n" " -p, --password db_password\n" " -d, --db db_name\n" " -c, --host db_hostname OR spool directory if -m file\n" " -s, --schema db_schema\n" " -e, --encoding client_encoding\n" " -m, --module db_module (pq, mysql, sqlite, file)\n" " -l, --libdir path_to_db_module\n" " -f, --logfile file\n" " -t, --phone phone_number\n" " -i, --interval polling_interval_for_incoming_sms's_in_seconds\n" " -S, --maxsms number_of_sms's (only in dumb mode)\n" " -b, --inbox memoryType\n" " -0, --firstpos0\n" " -v, --version\n" " -h, --help\n"), p); } static void LogFile (gchar *str, ...) { FILE *f; va_list ap; time_t cas; gchar buf[50]; if (smsdConfig.logFile == NULL) return; if (strcmp (smsdConfig.logFile, "-") == 0) f = stdout; else if ((f = fopen (smsdConfig.logFile, "a")) == NULL) { g_print (_("WARNING: Cannot open file %s for appending.\n"), smsdConfig.logFile); return; } cas = time (NULL); strftime (buf, 50, "%e %b %Y %T", localtime (&cas)); fprintf (f, "%s: ", buf); va_start (ap, str); vfprintf (f, str, ap); va_end (ap); if (f == stdout) fflush (f); else fclose (f); return; } static void ReadConfig (gint argc, gchar *argv[]) { connection.user = g_strdup (""); connection.password = g_strdup (""); connection.db = g_strdup ("sms"); connection.host = g_strdup (""); connection.schema = g_strdup ("public"); connection.clientEncoding = g_strdup (""); smsdConfig.dbMod = g_strdup ("file"); smsdConfig.libDir = g_strdup (MODULES_DIR); smsdConfig.logFile = NULL; smsdConfig.phone = g_strdup (""); smsdConfig.refreshInt = 1; // Phone querying interval in seconds smsdConfig.maxSMS = 10; // Smsd uses it if GetSMSStatus isn't implemented smsdConfig.firstSMS = 1; // smsdConfig.smsSets = 0; smsdConfig.memoryType = GN_MT_XX; while (1) { gint optionIndex = 0; gint c; static struct option longOptions[] = { {"user", 1, 0, 'u'}, {"password", 1, 0, 'p'}, {"db", 1, 0, 'd'}, {"host", 1, 0, 'c'}, {"schema", 1, 0, 's'}, {"encoding", 1, 0, 'e'}, {"module", 1, 0, 'm'}, {"libdir", 1, 0, 'l'}, {"logfile", 1, 0, 'f'}, {"phone", 1, 0, 't'}, {"version", 0, 0, 'v'}, {"interval", 1, 0, 'i'}, {"maxsms", 1, 0, 'S'}, {"inbox", 1, 0, 'b'}, {"firstpos0", 0, 0, '0'}, {"help", 0, 0, 'h'}, {0, 0, 0, 0} }; c = getopt_long (argc, argv, "u:p:d:c:s:e:m:l:f:t:vi:S:b:0h", longOptions, &optionIndex); if (c == EOF) break; switch (c) { case 'u': g_free (connection.user); connection.user = g_strdup (optarg); memset (optarg, 'x', strlen (optarg)); break; case 'p': g_free (connection.password); connection.password = g_strdup (optarg); memset (optarg, 'x', strlen (optarg)); break; case 'd': g_free (connection.db); connection.db = g_strdup (optarg); memset (optarg, 'x', strlen (optarg)); break; case 'c': g_free (connection.host); connection.host = g_strdup (optarg); memset (optarg, 'x', strlen (optarg)); break; case 's': g_free (connection.schema); connection.schema = g_strdup (optarg); memset (optarg, 'x', strlen (optarg)); break; case 'e': g_free (connection.clientEncoding); connection.clientEncoding = g_strdup (optarg); memset (optarg, 'x', strlen (optarg)); break; case 'm': g_free (smsdConfig.dbMod); smsdConfig.dbMod = g_strdup (optarg); break; case 'l': g_free (smsdConfig.libDir); smsdConfig.libDir = g_strdup (optarg); break; case 'f': if (smsdConfig.logFile) g_free (smsdConfig.logFile); smsdConfig.logFile = g_strdup (optarg); break; case 't': if (smsdConfig.phone) g_free (smsdConfig.phone); smsdConfig.phone = g_strdup (optarg); break; case 'i': smsdConfig.refreshInt = atoi (optarg); break; case 'S': smsdConfig.maxSMS = atoi (optarg); break; case 'b': smsdConfig.memoryType = gn_str2memory_type (optarg); break; case '0': smsdConfig.firstSMS = 0; break; case 'v': Version (); exit (0); break; case 'h': case '?': Usage (argv[0]); exit (1); break; default: g_print ("getopt returned 0%o\n", c); } } if ((argc - optind) != 0) { g_print (_("Wrong number of arguments\n")); Usage (argv[0]); exit (1); } if (LoadDB ()) { g_print (_("Cannot load database module %s in directory %s!\n"), smsdConfig.dbMod, smsdConfig.libDir); exit (-2); } } static void *SendSMS (void *a) { if ((*DB_ConnectOutbox) (connection)) { pthread_exit (0); return (NULL); } while (1) { pthread_mutex_lock (&db_monitorMutex); if (!db_monitor) { pthread_mutex_unlock (&db_monitorMutex); pthread_exit (0); return (NULL); } pthread_mutex_unlock (&db_monitorMutex); if ((*DB_Look) (smsdConfig.phone) == SMSD_OUTBOXEMPTY) sleep (5); } } static void MainExit (gint sig) { PhoneEvent *e = (PhoneEvent *) g_malloc (sizeof (PhoneEvent)); e->event = Event_Exit; e->data = NULL; InsertEvent (e); pthread_mutex_lock (&db_monitorMutex); db_monitor = FALSE; pthread_mutex_unlock (&db_monitorMutex); pthread_join (monitor_th, NULL); pthread_join (db_monitor_th, NULL); (*DB_Bye) (); exit (sig); } GNOKII_API gint WriteSMS (gn_sms *sms) { gn_error error; PhoneEvent *e = (PhoneEvent *) g_malloc (sizeof (PhoneEvent)); D_SMSMessage *m = (D_SMSMessage *) g_malloc (sizeof (D_SMSMessage)); m->sms = sms; e->event = Event_SendSMSMessage; e->data = m; InsertEvent (e); pthread_mutex_lock (&sendSMSMutex); pthread_cond_wait (&sendSMSCond, &sendSMSMutex); pthread_mutex_unlock (&sendSMSMutex); gn_log_xdebug ("Address: %s\nText: %s\n", sms->remote.number, sms->user_data[0].u.text); error = m->status; g_free (m); if (error) { gn_log_xdebug ("Sending to %s unsuccessful. Error: %s\n", sms->remote.number, gn_error_print(error)); if (smsdConfig.logFile) LogFile (_("Sending to %s unsuccessful. Error: %s\n"), sms->remote.number, gn_error_print(error)); } else { gn_log_xdebug ("Sending to %s successful.\n", sms->remote.number); if (smsdConfig.logFile) LogFile (_("Sending to %s successful.\n"), sms->remote.number); } return (error); } static void ReadSMS (gpointer d, gpointer userData) { gn_sms *data = (gn_sms *)d; PhoneEvent *e; gint error; if (data->type == GN_SMS_MT_Deliver || data->type == GN_SMS_MT_StatusReport) { gn_log_xdebug ("%d. %s ", data->number, data->remote.number); gn_log_xdebug ("%02d-%02d-%02d %02d:%02d:%02d+%02d %s\n", data->smsc_time.year, data->smsc_time.month, data->smsc_time.day, data->smsc_time.hour, data->smsc_time.minute, data->smsc_time.second, data->smsc_time.timezone, data->user_data[0].u.text); error = (*DB_InsertSMS) (data, smsdConfig.phone); switch (error) { case SMSD_OK: if (smsdConfig.logFile) LogFile (_("Inserting sms from %s successful.\n"), data->remote.number); gn_log_xdebug ("Inserting sms from %s successful.\n", data->remote.number); e = (PhoneEvent *) g_malloc (sizeof(PhoneEvent)); e->event = Event_DeleteSMSMessage; e->data = data; InsertEvent (e); break; case SMSD_DUPLICATE: if (smsdConfig.logFile) LogFile (_("Duplicated sms from %s.\n"), data->remote.number); gn_log_xdebug ("Duplicated sms from %s.\n", data->remote.number); e = (PhoneEvent *) g_malloc(sizeof(PhoneEvent)); e->event = Event_DeleteSMSMessage; e->data = data; InsertEvent (e); break; case SMSD_WAITING: if (smsdConfig.logFile) LogFile (_("Multipart sms from %s. Waiting for the next parts.\n"), data->remote.number); gn_log_xdebug ("Multipart sms from %s. Waiting for the next parts.\n", data->remote.number); e = (PhoneEvent *) g_malloc (sizeof(PhoneEvent)); e->event = Event_DeleteSMSMessage; e->data = data; InsertEvent (e); break; default: if (smsdConfig.logFile) LogFile (_("Inserting sms from %s unsuccessful.\nDate: %02d-%02d-%02d %02d:%02d:%02d+%02d\nText: %s\n\nExiting.\n"), data->remote.number, data->smsc_time.year, data->smsc_time.month, data->smsc_time.day, data->smsc_time.hour, data->smsc_time.minute, data->smsc_time.second, data->smsc_time.timezone, data->user_data[0].u.text); gn_log_xdebug ("Inserting sms from %s unsuccessful.\nDate: %02d-%02d-%02d %02d:%02d:%02d+%02d\nText: %s\n\nExiting.\n", data->remote.number, data->smsc_time.year, data->smsc_time.month, data->smsc_time.day, data->smsc_time.hour, data->smsc_time.minute, data->smsc_time.second, data->smsc_time.timezone, data->user_data[0].u.text); break; } } } static void GetSMS (void) { while (1) { pthread_mutex_lock (&smsMutex); // Waiting for signal pthread_cond_wait (&smsCond, &smsMutex); // Signal arrived. pthread_mutex_unlock (&smsMutex); // Check if Mutex is free pthread_mutex_lock (&smsMutex); phoneMonitor.sms.messages = g_slist_reverse(phoneMonitor.sms.messages); g_slist_foreach (phoneMonitor.sms.messages, ReadSMS, (gpointer) NULL); pthread_mutex_unlock (&smsMutex); } } static void Run (void) { /* Windows doesn't support signaling */ #ifndef WIN32 struct sigaction act; act.sa_flags = 0; act.sa_handler = MainExit; sigemptyset (&(act.sa_mask)); sigaction (SIGQUIT, &act, NULL); sigaction (SIGTERM, &act, NULL); sigaction (SIGINT, &act, NULL); #if __unices__ act.sa_handler = SIG_IGN; sigemptyset (&(act.sa_mask)); sigaction (SIGALRM, &act, NULL); #endif #endif InitPhoneMonitor (); if ((*DB_ConnectInbox) (connection)) exit (2); pthread_create (&monitor_th, NULL, Connect, smsdConfig.phone); db_monitor = TRUE; pthread_mutex_init (&db_monitorMutex, NULL); pthread_create (&db_monitor_th, NULL, SendSMS, NULL); GetSMS (); } int main (int argc, char *argv[]) { #ifdef ENABLE_NLS setlocale(LC_ALL, ""); bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR); textdomain(GETTEXT_PACKAGE); #endif gn_elog_handler = NULL; ReadConfig (argc, argv); /* Introduce yourself */ Short_Version (); GTerminateThread = false; Run (); return(0); } gnokii-0.6.31/smsd/sms.tables.pq.sql0000644000175000017500000000313711666163120015370 0ustar leoleo-- \set ON_ERROR_STOP 1; -- CREATE USER "smsd" WITH NOCREATEDB NOCREATEUSER; -- CREATE DATABASE "smsd" WITH OWNER = "smsd"; -- \connect "smsd" "smsd" -- COMMENT ON DATABASE "smsd" IS 'Gnokii SMSD Database'; -- \set ON_ERROR_STOP 1; -- CREATE USER "smsd" WITH NOCREATEDB NOCREATEUSER; -- CREATE DATABASE "smsd" WITH OWNER = "smsd"; -- \connect "smsd" "smsd" -- COMMENT ON DATABASE "smsd" IS 'Gnokii SMSD Database'; CREATE TABLE "inbox" ( "id" serial, "number" character varying(20) NOT NULL, "smsdate" timestamp NOT NULL, "insertdate" timestamp DEFAULT now() NOT NULL, "text" text, "phone" integer, "processed" bool DEFAULT 'false', PRIMARY KEY ("id") ); CREATE TABLE "outbox" ( "id" serial, "number" character varying(20) NOT NULL CHECK (number <> ''), "processed_date" timestamp DEFAULT now() NOT NULL, "insertdate" timestamp DEFAULT now() NOT NULL, "text" text, "phone" integer, "processed" bool DEFAULT 'false', "error" smallint DEFAULT '-1' NOT NULL, "dreport" smallint DEFAULT '0' NOT NULL, "not_before" time without time zone DEFAULT '00:00:00' NOT NULL, "not_after" time without time zone DEFAULT '23:59:59' NOT NULL, PRIMARY KEY ("id") ); CREATE TABLE "multipartinbox" ( "id" serial, "number" character varying(20) NOT NULL, "smsdate" timestamp NOT NULL DEFAULT 'epoch', "insertdate" timestamp DEFAULT now() NOT NULL, "text" character varying(160), "phone" integer, "processed" bool DEFAULT 'false', "refnum" smallint DEFAULT NULL, "maxnum" smallint DEFAULT NULL, "curnum" smallint DEFAULT NULL, PRIMARY KEY ("id") ); -- CREATE INDEX "outbox_processed_ix" ON "outbox" (processed); gnokii-0.6.31/smsd/utils.h0000644000175000017500000000203511666163120013462 0ustar leoleo/* S M S D A Linux/Unix tool for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999 Pavel Janik ml., Hugh Blemings Copyright (C) 1999-2011 Jan Derfinak Utils functions for SMSD plugins. */ #ifndef __smsd_utils_h_ #define __smsd_utils_h_ #include extern gchar *strEscape (const gchar *const s); #endif /* __smsd_utils_h_ */ gnokii-0.6.31/smsd/mysql.c0000644000175000017500000003373311666163120013473 0ustar leoleo/* S M S D A Linux/Unix tool for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999 Pavel Janík ml., Hugh Blemings Copyright (C) 1999-2011 Jan Derfinak This file is a module to smsd for MySQL db server. */ #include "config.h" #include #include #include #include #include "smsd.h" #include "gnokii.h" #include "compat.h" //#include "utils.h" static MYSQL mysqlIn; static MYSQL mysqlOut; GNOKII_API void DB_Bye (void) { mysql_close (&mysqlIn); mysql_close (&mysqlOut); } static gint Connect (const DBConfig connect, MYSQL *mysql) { #if MYSQL_VERSION_ID >= 50013 my_bool reconnect = 1; #endif mysql_init (mysql); if (connect.clientEncoding[0] != '\0') mysql_options (mysql, MYSQL_SET_CHARSET_NAME, connect.clientEncoding); #if MYSQL_VERSION_ID >= 50500 else mysql_options (mysql, MYSQL_SET_CHARSET_NAME, MYSQL_AUTODETECT_CHARSET_NAME); #endif #if MYSQL_VERSION_ID >= 50013 mysql_options (mysql, MYSQL_OPT_RECONNECT, &reconnect); #endif if (!mysql_real_connect (mysql, connect.host[0] != '\0' ? connect.host : NULL, connect.user[0] != '\0' ? connect.user : NULL, connect.password[0] != '\0' ? connect.password : NULL, connect.db, 0, NULL, 0)) { g_print (_("Connection to database '%s' on host '%s' failed.\n"), connect.db, connect.host); g_print (_("Error: %s\n"), mysql_error (mysql)); return (SMSD_NOK); } return (SMSD_OK); } GNOKII_API gint DB_ConnectInbox (const DBConfig connect) { return (Connect (connect, &mysqlIn)); } GNOKII_API gint DB_ConnectOutbox (const DBConfig connect) { return (Connect (connect, &mysqlOut)); } GNOKII_API gint DB_InsertSMS (const gn_sms * const data, const gchar * const phone) { GString *buf, *phnStr; gchar *text; MYSQL_RES *res; MYSQL_ROW row; if (phone[0] == '\0') phnStr = g_string_new (""); else { phnStr = g_string_sized_new (32); g_string_printf (phnStr, "'%s',", phone); } text = g_malloc (strlen ((gchar *)data->user_data[0].u.text) * 2 + 1); mysql_real_escape_string (&mysqlIn, text, data->user_data[0].u.text, strlen ((gchar *)data->user_data[0].u.text)); buf = g_string_sized_new (256); if (data->udh.udh[0].type == GN_SMS_UDH_ConcatenatedMessages) { // Multipart Message ! gn_log_xdebug ("Multipart message\n"); /* Check for duplicates */ g_string_printf (buf, "SELECT count(id) FROM multipartinbox \ WHERE number = '%s' AND text = '%s' AND \ refnum = %d AND maxnum = %d AND curnum = %d AND \ smsdate = '%04d-%02d-%02d %02d:%02d:%02d'", data->remote.number, text, data->udh.udh[0].u.concatenated_short_message.reference_number, data->udh.udh[0].u.concatenated_short_message.maximum_number, data->udh.udh[0].u.concatenated_short_message.current_number, data->smsc_time.year, data->smsc_time.month, data->smsc_time.day, data->smsc_time.hour, data->smsc_time.minute, data->smsc_time.second); if (mysql_real_query (&mysqlIn, buf->str, buf->len)) { g_print (_("%d: SELECT FROM multipart command failed.\n"), __LINE__); gn_log_xdebug ("%s\n", buf->str); g_print (_("Error: %s\n"), mysql_error (&mysqlIn)); g_string_free (buf, TRUE); g_string_free (phnStr, TRUE); g_free (text); return (SMSD_NOK); } res = mysql_store_result (&mysqlIn); row = mysql_fetch_row (res); mysql_free_result (res); if (atoi (row[0]) > 0) { gn_log_xdebug ("%d: SMS already stored in the database (refnum=%i, maxnum=%i, curnum=%i).\n", __LINE__, data->udh.udh[0].u.concatenated_short_message.reference_number, data->udh.udh[0].u.concatenated_short_message.maximum_number, data->udh.udh[0].u.concatenated_short_message.current_number); g_string_free (buf, TRUE); g_string_free (phnStr, TRUE); g_free (text); return (SMSD_DUPLICATE); } /* insert into multipart */ g_string_printf (buf, "INSERT INTO multipartinbox (number, smsdate, \ text, refnum , maxnum , curnum, %s processed) VALUES ('%s', \ '%04d-%02d-%02d %02d:%02d:%02d', '%s', %d, %d, %d, %s '0')", phone[0] != '\0' ? "phone," : "", data->remote.number, data->smsc_time.year, data->smsc_time.month, data->smsc_time.day, data->smsc_time.hour, data->smsc_time.minute, data->smsc_time.second, text, data->udh.udh[0].u.concatenated_short_message.reference_number, data->udh.udh[0].u.concatenated_short_message.maximum_number, data->udh.udh[0].u.concatenated_short_message.current_number, phnStr->str); if (mysql_real_query (&mysqlIn, buf->str, buf->len)) { g_print (_("%d: INSERT INTO multipartinbox command failed.\n"), __LINE__); gn_log_xdebug ("%s\n", buf->str); g_print (_("Error: %s\n"), mysql_error (&mysqlIn)); g_string_free (buf, TRUE); g_string_free (phnStr, TRUE); g_free (text); return (SMSD_NOK); } /* If all parts are already in multipart inbox, move it into inbox */ g_string_printf (buf, "SELECT text FROM multipartinbox \ WHERE number='%s' AND refnum=%d AND maxnum=%d \ ORDER BY curnum", data->remote.number, data->udh.udh[0].u.concatenated_short_message.reference_number, data->udh.udh[0].u.concatenated_short_message.maximum_number); if (mysql_real_query (&mysqlOut, buf->str, buf->len)) { g_print (_("%d: SELECT FROM multipartinbox command failed.\n"), __LINE__); gn_log_xdebug ("%s\n", buf->str); g_print (_("Error: %s\n"), mysql_error (&mysqlOut)); g_string_free (buf, TRUE); g_string_free (phnStr, TRUE); g_free (text); return (SMSD_NOK); } if (!(res = mysql_store_result (&mysqlOut))) { gn_log_xdebug ("%d: Store Mysql Result Failed.\n", __LINE__); gn_log_xdebug (_("Error: %s\n"), mysql_error (&mysqlOut)); g_string_free (buf, TRUE); g_string_free (phnStr, TRUE); g_free (text); return (SMSD_NOK); } gn_log_xdebug ("maxnumber: %d - count: %d\n", data->udh.udh[0].u.concatenated_short_message.maximum_number, mysql_num_rows (res)); if (mysql_num_rows (res) == data->udh.udh[0].u.concatenated_short_message.maximum_number ) /* all parts collected */ { GString *mbuf = g_string_sized_new (256); while ((row = mysql_fetch_row (res))) g_string_append (mbuf, row[0]); mysql_free_result (res); g_string_printf(buf, "DELETE from multipartinbox \ WHERE number='%s' AND refnum=%d AND maxnum=%d", data->remote.number, data->udh.udh[0].u.concatenated_short_message.reference_number, data->udh.udh[0].u.concatenated_short_message.maximum_number); if (mysql_real_query (&mysqlIn, buf->str, buf->len)) { g_print (_("%d: DELETE FROM multipartinbox command failed.\n"), __LINE__); gn_log_xdebug ("%s\n", buf->str); g_print (_("Error: %s\n"), mysql_error (&mysqlIn)); g_string_free (buf, TRUE); g_string_free (mbuf, TRUE); g_string_free (phnStr, TRUE); g_free (text); return (SMSD_NOK); } g_free (text); text = g_malloc (mbuf->len * 2 + 1); mysql_real_escape_string (&mysqlIn, text, mbuf->str, mbuf->len); g_string_free (mbuf, TRUE); } else { mysql_free_result (res); gn_log_xdebug ("Not whole message collected.\n"); g_string_free (buf, TRUE); g_string_free (phnStr, TRUE); g_free (text); return (SMSD_WAITING); } } gn_log_xdebug ("Message: %s\n", text); /* Detect duplicates */ g_string_printf (buf, "SELECT count(id) FROM inbox \ WHERE number = '%s' AND text = '%s' AND \ smsdate = '%04d-%02d-%02d %02d:%02d:%02d'", data->remote.number, text, data->smsc_time.year, data->smsc_time.month, data->smsc_time.day, data->smsc_time.hour, data->smsc_time.minute, data->smsc_time.second); if (mysql_real_query (&mysqlIn, buf->str, buf->len)) { g_print (_("%d: SELECT FROM inbox command failed.\n"), __LINE__); gn_log_xdebug ("%s\n", buf->str); g_print (_("Error: %s\n"), mysql_error (&mysqlIn)); g_string_free (buf, TRUE); g_string_free (phnStr, TRUE); g_free (text); return (SMSD_NOK); } res = mysql_store_result (&mysqlIn); row = mysql_fetch_row (res); mysql_free_result (res); if (atoi (row[0]) > 0) { gn_log_xdebug ("%d: MSG already stored in database.\n", __LINE__); g_string_free (buf, TRUE); g_string_free (phnStr, TRUE); g_free (text); return (SMSD_DUPLICATE); } g_string_printf (buf, "INSERT INTO inbox (number, smsdate, \ text, %s processed) VALUES ('%s', \ '%04d-%02d-%02d %02d:%02d:%02d', '%s', %s '0')", phone[0] != '\0' ? "phone," : "", data->remote.number, data->smsc_time.year, data->smsc_time.month, data->smsc_time.day, data->smsc_time.hour, data->smsc_time.minute, data->smsc_time.second, text, phnStr->str); g_free (text); g_string_free (phnStr, TRUE); if (mysql_real_query (&mysqlIn, buf->str, buf->len)) { g_print (_("%d: INSERT INTO inbox command failed.\n"), __LINE__); gn_log_xdebug ("%s\n", buf->str); g_print (_("Error: %s\n"), mysql_error (&mysqlIn)); g_string_free (buf, TRUE); return (SMSD_NOK); } g_string_free (buf, TRUE); gn_log_xdebug ("Everything OK\n"); return SMSD_OK; } GNOKII_API gint DB_Look (const gchar * const phone) { GString *buf, *phnStr; MYSQL_RES *res1; MYSQL_ROW row; gint numError, error; gint empty = 1; if (phone[0] == '\0') phnStr = g_string_new (""); else { phnStr = g_string_sized_new (32); g_string_printf (phnStr, "AND phone = '%s'", phone); } buf = g_string_sized_new (256); mysql_real_query (&mysqlOut, "BEGIN", strlen ("BEGIN")); g_string_printf (buf, "SELECT id, number, text, dreport FROM outbox \ WHERE processed='0' AND CURTIME() >= not_before \ AND CURTIME() <= not_after %s LIMIT 1 FOR UPDATE", phnStr->str); g_string_free (phnStr, TRUE); if (mysql_real_query (&mysqlOut, buf->str, buf->len)) { g_print (_("%d: SELECT FROM outbox command failed.\n"), __LINE__); gn_log_xdebug ("%s\n", buf->str); g_print (_("Error: %s\n"), mysql_error (&mysqlOut)); mysql_real_query (&mysqlOut, "ROLLBACK TRANSACTION", strlen ("ROLLBACK TRANSACTION")); g_string_free (buf, TRUE); return (SMSD_NOK); } if (!(res1 = mysql_store_result (&mysqlOut))) { g_print (_("%d: Store Mysql Result Failed.\n"), __LINE__); g_print (_("Error: %s\n"), mysql_error (&mysqlOut)); mysql_real_query (&mysqlOut, "ROLLBACK TRANSACTION", strlen ("ROLLBACK TRANSACTION")); g_string_free (buf, TRUE); return (SMSD_NOK); } while ((row = mysql_fetch_row (res1))) { gn_sms sms; empty = 0; gn_sms_default_submit (&sms); memset (&sms.remote.number, 0, sizeof (sms.remote.number)); sms.delivery_report = atoi (row[3]); if (row[1] != NULL) strncpy (sms.remote.number, row[1], sizeof (sms.remote.number) - 1); else *sms.remote.number = '\0'; sms.remote.number[sizeof (sms.remote.number) - 1] = '\0'; if (sms.remote.number[0] == '+') sms.remote.type = GN_GSM_NUMBER_International; else sms.remote.type = GN_GSM_NUMBER_Unknown; if (row[2] != NULL) strncpy((gchar *)sms.user_data[0].u.text, row[2], 10 * GN_SMS_MAX_LENGTH + 1); else *sms.user_data[0].u.text = '\0'; sms.user_data[0].u.text[10 * GN_SMS_MAX_LENGTH] = '\0'; sms.user_data[0].length = strlen ((gchar *) sms.user_data[0].u.text); sms.user_data[0].type = GN_SMS_DATA_Text; sms.user_data[1].type = GN_SMS_DATA_None; if (!gn_char_def_alphabet (sms.user_data[0].u.text)) sms.dcs.u.general.alphabet = GN_SMS_DCS_UCS2; gn_log_xdebug ("Sending SMS: %s, %s\n", sms.remote.number, sms.user_data[0].u.text); numError = 0; do { error = WriteSMS (&sms); sleep (1); } while ((error == GN_ERR_TIMEOUT || error == GN_ERR_FAILED) && numError++ < 3); g_string_printf (buf, "UPDATE outbox SET processed='1', error='%d', \ processed_date=NULL WHERE id='%s'", error, row[0]); if (mysql_real_query (&mysqlOut, buf->str, buf->len)) { g_print (_("%d: UPDATE command failed.\n"), __LINE__); gn_log_xdebug ("%s\n", buf->str); g_print (_("Error: %s\n"), mysql_error (&mysqlOut)); } } mysql_free_result (res1); mysql_real_query (&mysqlOut, "COMMIT", strlen ("COMMIT")); g_string_free (buf, TRUE); if (empty) return (SMSD_OUTBOXEMPTY); else return (SMSD_OK); } gnokii-0.6.31/smsd/sqlite.c0000644000175000017500000001766211666163120013632 0ustar leoleo/* S M S D A Linux/Unix tool for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999 Pavel Janik ml., Hugh Blemings Copyright (C) 1999-2005 Jan Derfinak This file is a module to smsd for SQLite db server. */ #include "config.h" #include #include #include #include #include "smsd.h" #include "gnokii.h" #include "compat.h" #include "utils.h" static sqlite3 *ppDbInbox; static sqlite3 *ppDbOutbox; GNOKII_API void DB_Bye(void) { if (ppDbInbox) sqlite3_close(ppDbInbox); if (ppDbOutbox) sqlite3_close(ppDbOutbox); } GNOKII_API gint DB_ConnectInbox(DBConfig connect) { int rc; rc = sqlite3_open(connect.db, &ppDbInbox); if (rc != SQLITE_OK) { g_print(_("Connection to database '%s' failed.\n"), connect.db); g_print(_("Error: %s\n"), sqlite3_errmsg(ppDbInbox)); return 1; } return 0; } GNOKII_API gint DB_ConnectOutbox(DBConfig connect) { int rc; rc = sqlite3_open(connect.db, &ppDbOutbox); if (rc != SQLITE_OK) { g_print(_("Connection to database '%s' failed.\n"), connect.db); g_print(_("Error: %s\n"), sqlite3_errmsg(ppDbOutbox)); return 1; } return 0; } GNOKII_API gint DB_InsertSMS(const gn_sms * const data, const gchar * const phone) { GString *buf, *phnStr, *text; time_t rawtime; struct tm * timeinfo; int error, i; sqlite3_stmt *stmt; if (phone[0] == '\0') phnStr = g_string_new(""); else { phnStr = g_string_sized_new(32); g_string_printf(phnStr, "'%s',", phone); } text = g_string_sized_new(480); g_string_append(text, strEscape((gchar *) data->user_data[0].u.text)); time(&rawtime); timeinfo = localtime(&rawtime); buf = g_string_sized_new(1024); g_string_printf(buf, "INSERT INTO inbox (\"number\", \"smsdate\", \"insertdate\",\ \"text\", %s \"processed\") VALUES ('%s', \ '%02d-%02d-%02d %02d:%02d:%02d',\ '%02d-%02d-%02d %02d:%02d:%02d', '%s', %s 0)", phone[0] != '\0' ? "\"phone\"," : "", data->remote.number, data->smsc_time.year, data->smsc_time.month, data->smsc_time.day, data->smsc_time.hour, data->smsc_time.minute, data->smsc_time.second, timeinfo->tm_year + 1900, timeinfo->tm_mon, timeinfo->tm_mday, timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec, text->str, phnStr->str); g_string_free(text, TRUE); g_string_free(phnStr, TRUE); error = sqlite3_prepare_v2(ppDbInbox, buf->str, -1, &stmt, NULL); if (error != SQLITE_OK) { g_print(_("%d: Parsing query %s failed!"), __LINE__, buf->str); g_print(_("Error: %s"), sqlite3_errmsg(ppDbInbox)); return SMSD_NOK; } /* run query */ for (i = 0; i < 6; i++) { error = sqlite3_step(stmt); if (error == SQLITE_DONE) break; sleep(1); sqlite3_reset(stmt); } if (error != SQLITE_DONE) { sqlite3_finalize(stmt); g_print(_("%d: INSERT INTO inbox failed.\n"), __LINE__); g_print(_("Error %d: %s\n"), error, sqlite3_errmsg(ppDbInbox)); g_print(_("Query: %s\n"), buf->str); g_string_free(buf, TRUE); return SMSD_NOK; } sqlite3_finalize(stmt); g_string_free(buf, TRUE); return SMSD_OK; } GNOKII_API gint DB_Look(const gchar * const phone) { GString *buf, *phnStr, *timebuf; gint ret1, numError, error; time_t rawtime; struct tm * timeinfo; sqlite3_stmt * stmt; gint empty = 1; if (phone[0] == '\0') phnStr = g_string_new(""); else { phnStr = g_string_sized_new(32); g_string_printf(phnStr, "AND phone = '%s'", phone); } time(&rawtime); timeinfo = localtime(&rawtime); timebuf = g_string_sized_new(25); g_string_printf(timebuf, "'%02d:%02d:%02d'", timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec); sqlite3_exec(ppDbOutbox, "BEGIN TRANSACTION;", NULL, NULL, NULL); /* poll for outgoing messages */ buf = g_string_sized_new(256); g_string_printf(buf, "SELECT id, number, text, dreport FROM outbox \ WHERE processed=0 \ AND %s >= not_before \ AND %s <= not_after \ %s", timebuf->str, timebuf->str, phnStr->str); g_string_free(phnStr, TRUE); ret1 = sqlite3_prepare_v2(ppDbOutbox, buf->str, -1, &stmt, NULL); if (ret1 != SQLITE_OK) { g_print(_("%d: Parsing query %s failed!"), __LINE__, buf->str); g_print(_("Error: %s"), sqlite3_errmsg(ppDbInbox)); return (SMSD_NOK); } g_string_printf(timebuf, "'%02d-%02d-%02d %02d:%02d:%02d'", timeinfo->tm_year, timeinfo->tm_mon, timeinfo->tm_mday, timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec ); ret1 = sqlite3_step(stmt); while (ret1 == SQLITE_ROW) { int gerror = 0; gn_sms sms; empty = 0; gn_sms_default_submit(&sms); memset(&sms.remote.number, 0, sizeof (sms.remote.number)); sms.delivery_report = sqlite3_column_int(stmt, 3); strncpy(sms.remote.number, sqlite3_column_text(stmt, 1), sizeof (sms.remote.number) - 1); sms.remote.number[sizeof (sms.remote.number) - 1] = '\0'; if (sms.remote.number[0] == '+') sms.remote.type = GN_GSM_NUMBER_International; else sms.remote.type = GN_GSM_NUMBER_Unknown; strncpy((gchar *) sms.user_data[0].u.text, sqlite3_column_text(stmt, 2), 10 * GN_SMS_MAX_LENGTH + 1); sms.user_data[0].u.text[10 * GN_SMS_MAX_LENGTH] = '\0'; sms.user_data[0].length = strlen((gchar *) sms.user_data[0].u.text); sms.user_data[0].type = GN_SMS_DATA_Text; sms.user_data[1].type = GN_SMS_DATA_None; if (!gn_char_def_alphabet(sms.user_data[0].u.text)) sms.dcs.u.general.alphabet = GN_SMS_DCS_UCS2; gn_log_xdebug("Sending SMS: %s, %s\n", sms.remote.number, sms.user_data[0].u.text); numError = 0; do { error = WriteSMS(&sms); sleep(1); } while ((error == GN_ERR_TIMEOUT || error == GN_ERR_FAILED) && numError++ < 3); /* mark sended */ g_string_printf(buf, "UPDATE outbox SET processed=1, error='%d', \ processed_date=%s \ WHERE id=%d", gerror, timebuf->str, sqlite3_column_int(stmt, 0) ); sqlite3_exec(ppDbOutbox, buf->str, NULL, NULL, NULL); ret1 = sqlite3_step(stmt); } /* rollback if found any errors */ if (ret1 != SQLITE_DONE) { g_print(_("%d: SELECT FROM outbox command failed.\n"), __LINE__); g_print(_("Error: %s\n"), sqlite3_errmsg(ppDbOutbox)); sqlite3_finalize(stmt); sqlite3_exec(ppDbOutbox, "ROLLBACK TRANSACTION;", NULL, NULL, NULL); g_string_free(timebuf, TRUE); g_string_free(buf, TRUE); return (SMSD_NOK); } sqlite3_finalize(stmt); sqlite3_exec(ppDbOutbox, "COMMIT;", NULL, NULL, NULL); g_string_free(timebuf, TRUE); g_string_free(buf, TRUE); if (empty) return (SMSD_OUTBOXEMPTY); else return (SMSD_OK); } gnokii-0.6.31/smsd/README.Tru640000644000175000017500000000036011666163120013753 0ustar leoleoFrom: Peter Kolmisoppi Hey Jan! I just wanted to point out to you that under Tru64 there is something called "SysMan Station Daemon" which has "smsd" for shortname. So, 'killall -HUP smsd' under tru64 would not be a good idea for people. gnokii-0.6.31/smsd/lowlevel.c0000644000175000017500000003014511666163120014151 0ustar leoleo/* S M S D A Linux/Unix tool for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999 Pavel Janík ml., Hugh Blemings Copyright (C) 1999-2011 Jan Derfinak */ #include "config.h" #include #include #include #include "misc.h" #include "gnokii.h" #include "compat.h" #include "smsd.h" #include "lowlevel.h" pthread_t monitor_th; PhoneMonitor phoneMonitor; pthread_mutex_t smsMutex; pthread_cond_t smsCond; pthread_mutex_t sendSMSMutex; pthread_cond_t sendSMSCond; static pthread_mutex_t eventsMutex; static GSList *ScheduledEvents = NULL; static struct gn_statemachine *sm; inline void InsertEvent (PhoneEvent *event) { gn_log_xdebug ("Inserting Event: %d\n", event->event); pthread_mutex_lock (&eventsMutex); ScheduledEvents = g_slist_prepend (ScheduledEvents, event); pthread_mutex_unlock (&eventsMutex); } inline static PhoneEvent *RemoveEvent (void) { GSList *list; PhoneEvent *event = NULL; pthread_mutex_lock (&eventsMutex); list = g_slist_last (ScheduledEvents); if (list) { event = (PhoneEvent *) list->data; ScheduledEvents = g_slist_remove_link (ScheduledEvents, list); g_slist_free_1 (list); } pthread_mutex_unlock (&eventsMutex); return (event); } static gn_error InitModelInf (void) { phoneMonitor.phone.version = gn_lib_get_phone_product_name (sm); phoneMonitor.phone.model = gn_lib_get_phone_model (sm); phoneMonitor.supported = gn_phone_model_get (phoneMonitor.phone.model)->flags; phoneMonitor.phone.revision = gn_lib_get_phone_revision (sm); gn_log_xdebug ("Model : %s\n", gn_lib_get_phone_model (sm)); gn_log_xdebug ("Product name : %s\n", gn_lib_get_phone_product_name (sm)); gn_log_xdebug ("Revision : %s\n", gn_lib_get_phone_revision (sm)); return GN_ERR_NONE; } static void busterminate (void) { if (sm) { gn_lib_phone_close(sm); gn_lib_phoneprofile_free(&sm); } gn_lib_library_free(); } static gn_error fbusinit (const char * const iname) { gn_error error; error = gn_lib_phoneprofile_load(iname, &sm); if (error != GN_ERR_NONE) { g_print (_("Cannot load phone %s!\nDo you have proper section in the config file?\n"), iname); g_print (_("Error: %s\n"), gn_error_print (error)); exit (-1); } /* register cleanup function */ atexit(busterminate); /* Initialise the code for the GSM interface. */ error = gn_lib_phone_open(sm); gn_log_xdebug ("fbusinit: error %d\n", error); if (error != GN_ERR_NONE) { g_print (_("GSM/FBUS init failed! (Unknown model?). Quitting.\n")); g_print (_("Error: %s\n"), gn_error_print (error)); return (error); } /* Why GSM_Initialise returns before initialization is completed? We must wait cca 2 seconds. If smsd segfaults during initialiazation try to increase number of seconds. */ sleep (2); return InitModelInf (); } void InitPhoneMonitor (void) { phoneMonitor.phone.model = _("unknown"); phoneMonitor.phone.version = _("unknown"); phoneMonitor.phone.revision = _("unknown"); phoneMonitor.supported = 0; // phoneMonitor.working = FALSE; // phoneMonitor.sms.unRead = 0; phoneMonitor.sms.number = 0; phoneMonitor.sms.messages = NULL; pthread_mutex_init (&smsMutex, NULL); pthread_cond_init (&smsCond, NULL); pthread_mutex_init (&sendSMSMutex, NULL); pthread_cond_init (&sendSMSCond, NULL); pthread_mutex_init (&eventsMutex, NULL); } static inline void FreeElement (gpointer data, gpointer userData) { g_free ((gn_sms *) data); } static inline void FreeArray (GSList **array) { if (*array) { g_slist_foreach (*array, FreeElement, NULL); g_slist_free (*array); *array = NULL; } } static void RefreshSMS (const gint number) { static gn_data data; gn_error error; gn_sms *msg; static gn_sms_folder folder; static gn_sms_folder_list folderlist; register gint i; if (number < 1) { gn_log_xdebug ("RefreshSMS is started with number of sms less than 1.\n\ This should not happen.\nSkipping."); return; } gn_log_xdebug ("RefreshSMS is running...\nNumber of messages: %d\n", number); FreeArray (&(phoneMonitor.sms.messages)); phoneMonitor.sms.number = 0; gn_data_clear(&data); data.sms_folder_list = &folderlist; folder.folder_id = 0; data.sms_folder = &folder; i = smsdConfig.firstSMS; while (1) { msg = g_malloc (sizeof (gn_sms)); memset (msg, 0, sizeof (gn_sms)); msg->memory_type = smsdConfig.memoryType; msg->number = i++; data.sms = msg; gn_log_xdebug ("Reading SMS %d of %d\n", i - 1, number); if ((error = gn_sms_get (&data, sm)) == GN_ERR_NONE) { phoneMonitor.sms.messages = g_slist_append (phoneMonitor.sms.messages, msg); phoneMonitor.sms.number++; gn_log_xdebug ("Message counter: %d\n", phoneMonitor.sms.number); if (phoneMonitor.sms.number >= number) { pthread_cond_signal (&smsCond); return; } } /* * GN_ERR_INVALIDLOCATION indicates all positions are read. * In case when we were reading location 0, ignore potential error. */ else if (error == GN_ERR_INVALIDLOCATION && i > 1) { gn_log_xdebug ("gn_sms_get returned error %d: %s\n", error, gn_error_print (error)); g_free (msg); pthread_cond_signal (&smsCond); break; } else { gn_log_xdebug ("gn_sms_get returned error %d: %s\n", error, gn_error_print (error)); g_free (msg); } usleep (500000); } } static gint A_SendSMSMessage (gpointer data) { D_SMSMessage *d = (D_SMSMessage *) data; gn_data *dt; gn_error status; if (!d) return (GN_ERR_UNKNOWN); pthread_mutex_lock (&sendSMSMutex); dt = calloc (1, sizeof (gn_data)); if (!d->sms->smsc.number[0]) { /* keep the local cache of smsc information, it doesn't change too often */ static gn_gsm_number_type smsc_type = -1; /* -1: unititialized, -2: GetSMSCenter does not work */ static char smsc_number[GN_BCD_STRING_MAX_LENGTH]; if (smsc_type == -2) status = GN_ERR_FAILED; else status = GN_ERR_NONE; if (smsc_type == -1) { dt->message_center = calloc (1, sizeof (gn_sms_message_center)); dt->message_center->id = 1; if ((status = gn_sm_functions (GN_OP_GetSMSCenter, dt, sm)) == GN_ERR_NONE) { strcpy (smsc_number, dt->message_center->smsc.number); smsc_type = dt->message_center->smsc.type; } else { smsc_type = -2; } free (dt->message_center); dt->message_center = NULL; } if (status == GN_ERR_NONE) { strcpy (d->sms->smsc.number, smsc_number); d->sms->smsc.type = smsc_type; } } if (!d->sms->smsc.type) d->sms->smsc.type = GN_GSM_NUMBER_Unknown; gn_data_clear (dt); dt->sms = d->sms; d->status = gn_sms_send (dt, sm); status = d->status; /* we do not use sms reference numbers in smsd */ free (dt->sms->reference); dt->sms->reference = NULL; free (dt); pthread_cond_signal (&sendSMSCond); pthread_mutex_unlock (&sendSMSMutex); return (status); } /* * Argument passed here should be gn_sms structure. * Required fields for sms deletion are: * - gn_sms.number * - gn_sms.memory_type */ static gint A_DeleteSMSMessage (gpointer data) { gn_data *dt; gn_error error = GN_ERR_UNKNOWN; gn_sms_folder SMSFolder; gn_sms_folder_list SMSFolderList; dt = calloc (1, sizeof (gn_data)); if (!dt) { gn_log_xdebug ("Failed to allocate memory.\n"); return GN_ERR_FAILED; } dt->sms = (gn_sms *) data; SMSFolder.folder_id = 0; dt->sms_folder = &SMSFolder; dt->sms_folder_list = &SMSFolderList; if (dt->sms) { gn_log_xdebug ("Deleting SMS %d\n", dt->sms->number); /* FIXME: error handling */ error = gn_sms_delete (dt, sm); gn_log_xdebug ("gn_sms_delete returned error %d: %s\n", error, gn_error_print (error)); // pthread_mutex_lock (&smsMutex); phoneMonitor.sms.messages = g_slist_remove (phoneMonitor.sms.messages, data); phoneMonitor.sms.number--; FreeElement (data, NULL); // pthread_mutex_unlock (&smsMutex); } else gn_log_xdebug ("Internal error: dt->sms == NULL\n"); free (dt); return (error); } static gint A_Exit (gpointer data) { pthread_exit (0); return (0); /* just to be proper */ } gint (*DoAction[])(gpointer) = { A_SendSMSMessage, A_DeleteSMSMessage, A_Exit }; static void RealConnect (void *phone) { gn_data *data; gn_sms_status SMSStatus = {0, 0, 0, 0}; gn_sms_folder SMSFolder; PhoneEvent *event; gn_error error; int consecutive_errors = 0; data = calloc (1, sizeof (gn_data)); gn_log_xdebug ("Initializing connection...\n"); if (fbusinit ((gchar *)phone) != GN_ERR_NONE) { free (data); exit (1); } if (smsdConfig.memoryType == GN_MT_XX) { if (phoneMonitor.supported & PM_FOLDERS) smsdConfig.memoryType = GN_MT_IN; else smsdConfig.memoryType = GN_MT_SM; } gn_log_xdebug ("Phone connected. Starting monitoring...\n"); while (1) { pthread_mutex_lock (&smsMutex); /* The event queue must be processed before RefreshSMS ()! */ while ((event = RemoveEvent ()) != NULL) { gn_log_xdebug ("Processing Event: %d\n", event->event); if (event->event <= Event_Exit) if ((error = DoAction[event->event] (event->data)) != GN_ERR_NONE) g_print (_("Event %d failed with return code %d!\n"), event->event, error); g_free (event); } if (phoneMonitor.supported & PM_FOLDERS) { data->sms_folder = &SMSFolder; SMSFolder.folder_id = smsdConfig.memoryType; if ((error = gn_sm_functions (GN_OP_GetSMSFolderStatus, data, sm)) == GN_ERR_NONE) { gn_log_xdebug ("GN_OP_GetSMSFolderStatus returned (number) %d\n", SMSFolder.number); gn_log_xdebug ("phoneMonitor.sms.number %d\n", phoneMonitor.sms.number); if (phoneMonitor.sms.number != SMSFolder.number) { RefreshSMS (SMSFolder.number); } // phoneMonitor.sms.unRead = 0; } } else { gn_memory_status dummy; dummy.memory_type = smsdConfig.memoryType; data->sms_status = &SMSStatus; data->memory_status = &dummy; if ((error = gn_sm_functions (GN_OP_GetSMSStatus, data, sm)) == GN_ERR_NONE) { gn_log_xdebug ("GN_OP_GetSMSStatus returned (number, unread) %d, %d\n", SMSStatus.number, SMSStatus.unread); gn_log_xdebug ("phoneMonitor.sms.number %d\n", phoneMonitor.sms.number); if (/* phoneMonitor.sms.unRead != SMSStatus.unread || */ phoneMonitor.sms.number != SMSStatus.number) { RefreshSMS (SMSStatus.number); } // phoneMonitor.sms.unRead = SMSStatus.unread; } } pthread_mutex_unlock (&smsMutex); if (error != GN_ERR_NONE) { if (error == GN_ERR_TIMEOUT) { g_print (_("Timeout in file %s, line %d, restarting connection.\n"), __FILE__, __LINE__); break; } else { g_print ("%s:%d error: %d, %s\n", __FILE__, __LINE__, error, gn_error_print(error)); consecutive_errors++; if (consecutive_errors > MAX_CONSECUTIVE_ERRORS) { g_print (_("Too many consecutive errors, restarting connection.\n")); break; } } } else { consecutive_errors = 0; } sleep (smsdConfig.refreshInt); } free (data); } void *Connect (void *phone) { while (1) { RealConnect (phone); busterminate (); sleep (1); } } gnokii-0.6.31/smsd/sms.tables.mysql.sql0000644000175000017500000000267611666163120016124 0ustar leoleo-- CREATE DATABASE smsd; -- USE smsd; CREATE TABLE inbox ( id int(10) unsigned NOT NULL auto_increment, number varchar(20) NOT NULL default '', smsdate datetime NOT NULL default '0000-00-00 00:00:00', insertdate timestamp DEFAULT CURRENT_TIMESTAMP, text text, phone tinyint(4), processed tinyint(4) NOT NULL default '0', PRIMARY KEY (id) ); CREATE TABLE outbox ( id int(10) unsigned NOT NULL auto_increment, -- MySQL parses but ignores CHECK clause number varchar(20) NOT NULL CHECK (number <> ''), processed_date timestamp DEFAULT 0, insertdate timestamp DEFAULT CURRENT_TIMESTAMP, text text default NULL, phone tinyint(4), processed tinyint(4) NOT NULL default '0', error tinyint(4) NOT NULL default '-1', dreport tinyint(4) NOT NULL default '0', not_before time NOT NULL default '00:00:00', not_after time NOT NULL default '23:59:59', PRIMARY KEY (id) ); CREATE TABLE multipartinbox ( id int(10) unsigned NOT NULL auto_increment, number varchar(20) NOT NULL default '', smsdate datetime NOT NULL default '0000-00-00 00:00:00', insertdate timestamp DEFAULT CURRENT_TIMESTAMP, text varchar(160), phone tinyint(4), processed tinyint(4) NOT NULL default '0', refnum smallint default NULL, maxnum smallint default NULL, curnum smallint default NULL, PRIMARY KEY (id) ); -- CREATE INDEX outbox_processed_ix ON outbox (processed); -- GRANT SELECT, INSERT, UPDATE, DELETE ON smsd.* TO smsd@localhost; gnokii-0.6.31/smsd/utils.c0000644000175000017500000000252111666163120013455 0ustar leoleo/* S M S D A Linux/Unix tool for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999 Pavel Janik ml., Hugh Blemings Copyright (C) 1999-2011 Jan Derfinak Utils functions for SMSD plugins */ #include "config.h" #include "utils.h" /* Escapes ' and \ with \. */ /* Returned value needs to be free with g_free(). */ gchar *strEscape (const gchar *const s) { GString *str = g_string_new (s); register gint i = 0; gchar *ret; while (str->str[i] != '\0') { if (str->str[i] == '\\' || str->str[i] == '\'') g_string_insert_c (str, i++, '\\'); i++; } ret = str->str; g_string_free (str, FALSE); return (ret); } gnokii-0.6.31/smsd/man/0000755000175000017500000000000011666163466012741 5ustar leoleognokii-0.6.31/smsd/man/smsd.80000644000175000017500000001732711666163120013775 0ustar leoleo.TH "smsd" "8" "September 27, 2010" "" "Gnokii" .SH "NAME" smsd \- daemon for handling incoming and outgoing SMSes using libgnokii .SH "SYNOPSIS" .B smsd \fI[OPTIONS]\fR .SH "DESCRIPTION" .PP The .B SMSD (SMS daemon) program is intended for receiving and sending SMSes. .PP The program is designed to use modules (plugins) to work with different backends. Currently are supported PostgreSQL, MySQL and a special module 'file' which is designed to work without an SQL database (see below for special instructions in the file module section). When \fBSMSD\fR uses an SQL server as a repository for SMSes you must create a database (default name is 'sms') with tables defined in sms.tables.{module}.sql files. Table 'inbox' is for received SMSes. \fBSMSD\fR periodically checks a given phone memory to move messages to this table. Only received SMSes and status reports are deleted from the phone, other kinds of messages are not removed. .PP Table 'inbox' has the following fields: .RS .TP .B number phone number from which is sms received .TP .B smsdate date set by SMS center .TP .B insertdate date SMS was inserted into table .TP .B text SMS text .TP .B phone number of phone to use. If you use smsd without -t option you can ignore this column. See -t option below. .TP .B processed smsd sets this always to FALSE. You can use it for another program which will parse SMSes. .RE .PP Table 'outbox' is for outgoing SMSes. \fBSMSD\fR periodically looks into this table and searches for lines with attribute 'processed' set to FALSE. If it finds such SMS, it will send SMS to 'number'. .PP Table 'outbox' has the following fields: .RS .TP .B number recipient's phone number .TP .B processed_date date of processing SMS. .TP .B insertdate date of inserting SMS in table .TP .B text SMS text .TP .B phone number of phone to use. If you use smsd without -t option you must not fill this column. See -t option below. .TP .B processed new SMS must have this attribute set to FALSE. \fBSMSD\fR will send this SMS and will update 'processed' to TRUE. .TP .B error This attribute contains return value of gn_sms_send() function. For explanation of numeric values see in gnokii source. .TP .B dreport request for delivery report per message. Possible values are 0 for no delivery report, 1 for delivery report. .TP .B not_before sms will not be sent before this time (default 00:00:00). .TP .B not_after sms will not be sent after this time (default 23:59:59). .RE .PP \fBSMSD\fR is multi threaded program. If you list processes you will see more than one instance of smsd. .SS THE FILE MODULE .PP This module doesn't need an SQL server to work. For incoming messages it works in a way that it calls a program giving phone number, date as parameter and the message text on stdin. In the smsd directory there is an example file action. It shows sms data to stdout. If you want something useful you must write your own action. .BR For outgoing messages you can set spool directory where smsd looks regularly. .PP Incoming sms are passed in format .RS .PD 0 .TP .BR action\ number\ date\ <\ sms .PD .RE .PP Outgoing sms must be in format: .RS .PD 0 .TP .B number .TP .B text .PD .RE .PP The name of file is unimportant but smsd ignores all files with prefix "ERR.". If smsd succesfully sends sms, it removes file from spool directory. If smsd cannot send sms prepends file with "ERR." prefix and ignores it. If you use \fI-m file\fR, \fI-u\fR (\fI--user\fR) and \fI-c\fR (\fI--host\fR) will have other meaning. \fI-u\fR is for action (action must be executable) \fI-c\fR is for spool directory where smsd looks for smses. Smsd must have read and write permissions to this directory. .PP \fI-p\fR, \fI-d\fR parameters have no meaning when \fI-m file\fR is used. .PP If you don't specify \fI-u\fR, default action is to print sms to stdout. If you don't specify \fI-c\fR, sms sending will be disabled. .SS OPTIONS .PP Available options: .TP .BR -u,\ --user\ db_username Specify user name. .TP .BR -p,\ --password\ db_password Specify user password. .TP .BR -d,\ --db\ db_name Specify database name for 'pq' and 'mysql' modules or full path to database file for 'sqlite' module (defaults to 'sms'). .TP .BR -c,\ --host\ db_hostname Specify database server host name. .TP .BR -s,\ --schema\ db_hostname Specify database schema used by the PostgreSQL module (defaults to 'public'). .TP .BR -e,\ --encoding\ client_encoding Specify client encoding for database connection. .TP .BR -m,\ --module\ db_module Specify which module to use for connection to DB server. Currently supported values are 'pq' for PostgreSQL, 'mysql' for MySQL, 'sqlite' for SQLite3 and 'file'. File module is not supported in Windows. .TP .BR -l,\ --libdir\ path_to_db_module Specify path to DB modules. If you specify pq module, smsd searches in libdir for file libsmsd_pq.so (for mysql - libsmsd_mysql.so). Do not interchange these plugins with default SQL libraries from database distribution! .TP .BR -f,\ --logfile\ file If used, smsd will monitor sms traffic to file "file". File is reopened and closed for every message so you can simply rename or delete it if you want to rotate logs. If you use '-' as filename smsd will use standard output. .TP .BR -t,\ --phone\ phone_number You can run more instances of smsd. One instance per phone. In this setup you must configure phone section in the config file. For example: .PD 0 .RS [global] .P port = /dev/ttyS0 .P model = 6110 .P initlength = default .P connection = serial .P bindir = /usr/local/sbin/ .P use_locking = no .P serial_baudrate = 38400 .P smsc_timeout = 10 .P [phone_1] .P port = /dev/ttyS0 .P model = 6110 .P initlength = default .P connection = serial .P bindir = /usr/local/sbin/ .P use_locking = no .P serial_baudrate = 38400 .P [phone_2] .P port = /dev/ttyS1 .P model = AT .P initlength = default .P connection = serial .P bindir = /usr/local/sbin/ .P use_locking = no .P serial_baudrate = 38400 .P smsc_timeout = 10 .PD In this setup if you run smsd without -t option it will use config from global section. If you run smsd with -t 1 it will use config from phone_1 and likewise with -t 2 uses phone_2. In case of use -t option smsd fills phone number for incoming sms's and in outbox it looks only for sms's with the specified phone number in column \&'phone'. This behaviour gives you possibility to run one instance of smsd for every phone you have at the same time. .RE .TP .BR -i,\ --interval\ interval Polling interval for incoming sms's in seconds. Default is 1 second. .TP .BR -S,\ --maxsms\ number When phone driver doesn't support sms status it is possible to specify number of sms's supported by phone. Default is 10. If driver support sms status this option is ignored. .TP .BR -b,\ --inbox\ memory_type Where to look for new messages (defaults to IN for most Nokia phones and to SM for all other phones). For debugging or for unusual setups you can use another memory type supported by your phone (eg. IN for the Inbox, OU for the Outbox, AR for the Archive, TE for the Templates and F1,...,F20 for your own folders). Use gnokii --showsmsfolderstatus for a list of such memory types. .TP .BR -0,\ --firstpos0 SMSD starts messages reading from position 1. If your phone stores sms's from postion 0, use this option. .TP .BR -v,\ --version Shows smsd version. .TP .BR -h,\ --help Shows short help. .SH "DIAGNOSTICS" Various error messages are printed to STDERR. Debug output can be enabled setting xdebug=on (for messages specific to \fBSMSD\fR) and debug=on (for messages specific to \fBlibgnokii\fR) in the configuration file. .SH "BUGS" .PP None reported. .SH "AUTHOR" \fBSMSD\fR was written by Jan Derfinak and contributed by other people. See also Docs/CREDITS from the Gnokii sources. .SH "COPYING" This program is distributed under the GNU Public License. .SH "SEE ALSO" gnokii(1) gnokii-0.6.31/smsd/db.h0000644000175000017500000000231411666163120012707 0ustar leoleo/* S M S D A Linux/Unix tool for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999 Pavel Janík ml., Hugh Blemings Copyright (C) 1999-2011 Jan Derfinak */ #ifndef DB_H #define DB_H #include #include "smsd.h" #include "gnokii.h" GNOKII_API void (*DB_Bye) (void); GNOKII_API gint (*DB_ConnectInbox) (const DBConfig); GNOKII_API gint (*DB_ConnectOutbox) (const DBConfig); GNOKII_API gint (*DB_InsertSMS) (const gn_sms * const, const gchar * const); GNOKII_API gint (*DB_Look) (const gchar * const); #endif gnokii-0.6.31/smsd/lowlevel.h0000644000175000017500000000340111666163120014151 0ustar leoleo/* S M S D A Linux/Unix tool for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999 Pavel Janík ml., Hugh Blemings Copyright (C) 1999-2011 Jan Derfinak */ #ifndef LOWLEVEL_H #define LOWLEVEL_H #include #include #include "gnokii.h" #define MAX_CONSECUTIVE_ERRORS 5 typedef enum { Event_SendSMSMessage, Event_DeleteSMSMessage, Event_Exit } PhoneAction; typedef struct { PhoneAction event; gpointer data; } PhoneEvent; typedef struct { gn_sms *sms; gn_error status; } D_SMSMessage; typedef struct { struct { const gchar *model; const gchar *revision; const gchar *version; } phone; struct { // gint unRead; gint number; GSList *messages; } sms; gint supported; } PhoneMonitor; extern pthread_t monitor_th; extern PhoneMonitor phoneMonitor; extern pthread_mutex_t smsMutex; extern pthread_cond_t smsCond; extern pthread_mutex_t sendSMSMutex; extern pthread_cond_t sendSMSCond; extern void InitPhoneMonitor (void); extern void *Connect (void *); extern void InsertEvent (PhoneEvent *event); #endif gnokii-0.6.31/smsd/action0000755000175000017500000000010311666163120013346 0ustar leoleo#!/bin/bash echo "Phone number: $1" echo "Date: $2" cat echo "" gnokii-0.6.31/smsd/file.c0000644000175000017500000001577711666163120013255 0ustar leoleo/* S M S D A Linux/Unix tool for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2002-2011 Jan Derfinak This file is a module to smsd for file access. */ #include "config.h" #include #include #include #include #include #include #include "smsd.h" #include "gnokii.h" #include "compat.h" #include "utils.h" static gchar *action; static gchar *spool; GNOKII_API void DB_Bye (void) { return; } GNOKII_API gint DB_ConnectInbox (DBConfig connect) { struct stat status; if (connect.user[0] != '\0') { if ((stat (connect.user, &status)) != 0) { g_print (_("Cannot stat file %s!\n"), connect.user); return (1); } if (!((S_IFREG & status.st_mode) && (((status.st_uid == geteuid ()) && (S_IXUSR & status.st_mode)) || ((status.st_gid == getegid ()) && (S_IXGRP & status.st_mode)) || (S_IXGRP & status.st_mode)))) { g_print (_("File %s is not regular file or\nyou have not executable permission to this file!\n"), connect.user); return (2); } } action = connect.user; return (0); } GNOKII_API gint DB_ConnectOutbox (DBConfig connect) { struct stat status; if (connect.host[0] == '\0') g_print (_("You have not set spool directory, sms sending is disabled!\n")); else { if ((stat (connect.host, &status)) != 0) { g_print (_("Cannot stat file %s!\n"), connect.host); return (1); } if (!((S_IFDIR & status.st_mode) && (((status.st_uid == geteuid ()) && (S_IRUSR & status.st_mode) && (S_IWUSR & status.st_mode)) || ((status.st_gid == getegid ()) && (S_IRGRP & status.st_mode) && (S_IWGRP & status.st_mode)) || ((S_IROTH & status.st_mode) && (S_IWOTH & status.st_mode))))) { g_print (_("File %s is not directory or\nyou have not read and write permissions to this directory,\nsms sending is disabled!\n!"), connect.host); return (2); } } spool = connect.host; return (0); } GNOKII_API gint DB_InsertSMS (const gn_sms * const data, const gchar * const phone) { FILE *p; GString *buf; gchar *text; text = strEscape ((gchar *) data->user_data[0].u.text); if (action[0] == '\0') g_print ("Number: %s, Date: %02d-%02d-%02d %02d:%02d:%02d\nText:\n%s\n", \ data->remote.number, data->smsc_time.year, data->smsc_time.month, \ data->smsc_time.day, data->smsc_time.hour, data->smsc_time.minute, \ data->smsc_time.second, text); else { buf = g_string_sized_new (256); g_string_printf (buf, "%s %s \"%02d-%02d-%02d %02d:%02d:%02d\"", \ action, data->remote.number, data->smsc_time.year, \ data->smsc_time.month, data->smsc_time.day, \ data->smsc_time.hour, data->smsc_time.minute, \ data->smsc_time.second); if ((p = popen (buf->str, "w")) == NULL) { g_free (text); g_string_free (buf, TRUE); return (1); } g_string_free (buf, TRUE); fprintf (p, "%s", text); pclose (p); } g_free (text); return (0); } GNOKII_API gint DB_Look (const gchar * const phone) { DIR *dir; struct dirent *dirent; FILE *smsFile; GString *buf; gint numError, error; gint empty = 1; if (spool[0] == '\0') // if user don't set spool dir, sending is disabled return (SMSD_NOK); if ((dir = opendir (spool)) == NULL) { g_print (_("Cannot open directory %s\n"), spool); return (SMSD_NOK); } buf = g_string_sized_new (64); while ((dirent = readdir (dir))) { gn_sms sms; gint slen = 0; if (strcmp (dirent->d_name, ".") == 0 || strcmp (dirent->d_name, "..") == 0 || strncmp (dirent->d_name, "ERR.", 4) == 0) continue; g_string_printf (buf, "%s/%s", spool, dirent->d_name); if ((smsFile = fopen (buf->str, "r")) == NULL) { g_print (_("Can't open file %s for reading!\n"), buf->str); continue; } empty = 0; gn_sms_default_submit (&sms); memset (&sms.remote.number, 0, sizeof (sms.remote.number)); if (fgets (sms.remote.number, sizeof (sms.remote.number), smsFile)) slen = strlen (sms.remote.number); if (slen < 1) { error = -1; fclose (smsFile); g_print (_("Remote number is empty in %s!\n"), buf->str); goto handle_file; } if (sms.remote.number[slen - 1] == '\n') sms.remote.number[slen - 1] = '\0'; /* Initialize SMS text */ memset (&sms.user_data[0].u.text, 0, sizeof (sms.user_data[0].u.text)); slen = fread ((gchar *) sms.user_data[0].u.text, 1, GN_SMS_MAX_LENGTH, smsFile); if (slen > 0 && sms.user_data[0].u.text[slen - 1] == '\n') sms.user_data[0].u.text[slen - 1] = '\0'; fclose (smsFile); // sms.delivery_report = (smsdConfig.smsSets & SMSD_READ_REPORTS); if (sms.remote.number[0] == '+') sms.remote.type = GN_GSM_NUMBER_International; else sms.remote.type = GN_GSM_NUMBER_Unknown; sms.user_data[0].length = strlen ((gchar *) sms.user_data[0].u.text); sms.user_data[0].type = GN_SMS_DATA_Text; sms.user_data[1].type = GN_SMS_DATA_None; if (!gn_char_def_alphabet (sms.user_data[0].u.text)) sms.dcs.u.general.alphabet = GN_SMS_DCS_UCS2; gn_log_xdebug ("Sending SMS: %s, %s\n", sms.remote.number, sms.user_data[0].u.text); numError = 0; do { error = WriteSMS (&sms); sleep (1); } while ((error == GN_ERR_TIMEOUT || error == GN_ERR_FAILED) && numError++ < 3); handle_file: if (error == GN_ERR_NONE) { if (unlink (buf->str)) g_print (_("Cannot unlink %s."), buf->str); } else { GString *buf2; buf2 = g_string_sized_new (64); g_string_printf (buf2, "%s/ERR.%s", spool, dirent->d_name); g_print (_("Cannot send sms from file %s\n"), buf->str); if (rename (buf->str, buf2->str)) { g_print (_("Cannot rename file %s to %s. Trying to unlink it.\n"), buf->str, buf2->str); if (unlink (buf->str)) g_print (_("Cannot unlink %s."), buf->str); } g_string_free (buf2, TRUE); } } g_string_free (buf, TRUE); closedir (dir); if (empty) return (SMSD_OUTBOXEMPTY); else return (SMSD_OK); } gnokii-0.6.31/smsd/sms.tables.sqlite.sql0000644000175000017500000000124111666163120016243 0ustar leoleo-- $ sqlite3 -init ./sms.tables.sqlite.sql smsd.db create table inbox ( "id" integer primary key, "number" text not null, "smsdate" text not null, "insertdate" text not null, "text" text, "phone" integer, "processed" integer default 0 ); create table outbox ( "id" integer primary key, "number" text not null, "processed_date" text not null, "insertdate" text not null, "text" text, "phone" integer, "processed" integer default 0, "error" integer default -1 not null, "dreport" integer default 0 not null, "not_before" text default '00:00:00' not null, "not_after" text default '23:59:59' not null ); gnokii-0.6.31/smsd/ChangeLog0000644000175000017500000002421211666163120013724 0ustar leoleo* Thu 01 Dec 2011 PaweÅ‚ Kot - Version changed to 1.5.2 * Wed 03 Aug 2011 Daniele Forsi - Apply the changes in patch from 28 May 2011 also to the file module. (Bug report by tanker on #gnokii). * Sat 28 May 2011 Jan Derfinak - After patch from 09 Apr 2011, the query interval for looking to outbox was too small and smsd overloads db server. Added 5 seconds sleep if outbox doesn't contain unprocessed sms. (Bug report from João Areias). * Fri 13 May 2011 PaweÅ‚ Kot - Do not call GetSMSC every time SMS is being sent. * Sat 09 Apr 2011 Jan Derfinak - Changed DB_Look() to use one trasaction per sms instead of one big transaction for all sms in the outbox table. - Version changed to 1.5.1 * Mon 28 Feb 2011 Jan Derfinak - Changed type of column 'outbox.text' from 'varchar(160)' to 'text' to enable sending long sms in PostgreSQL. - Added CHECK () constrain to outbox table definition for PostgreSQL and MySQL to disable inserting of sms with empty phone number. It works only for PostgreSQL, because it is parsed but not implemented in MySQL server. * Sun 20 Feb 2011 Jan Derfinak - Simplify DB_Connect functions in pq and mysql modules by moving shared code to the separate function. (Pawel Kot) * Sat 19 Feb 2011 Jan Derfinak - Version changed to 1.5.0 - Added support for concatenated messages to pq module. - DATABASE FORMAT FOR POSTGRESQL CHANGED! Dump data, delete db, create new db from new schema and load data from backup. - Fixed bug #31222: smsd crashes in mysql module if a concatenated sms full of escapable characters is received. * Tue 15 Feb 2011 Jan Derfinak - Version changed to 1.4.6 - New option -e, --encoding enables to specify client encoding for database connection. Based on idea from Daniel Müller. * Thu 25 Sep 2010 Daniele Forsi - Add even more information to man page * Thu 9 Sep 2010 Daniele Forsi - Add more information to man page * Fri 20 Aug 2010 PaweÅ‚ Kot - Add SQLite3 backend module by Santeri Toikka. - Version changed to 1.4.5 * Tue 10 Aug 2010 Daniele Forsi - Specify in man page that only regular messages and status reports area handled, all other remain in the phone memory. * Thu 24 Dec 2009 Daniele Forsi - Add quoting around phone number to mysql code that handles multipart messages. Patch by Paulius Bulotas. * Sun Aug 23 2009 PaweÅ‚ Kot - Enable sending long messages with pq module. * Fri Mar 27 2009 PaweÅ‚ Kot - Print short version on every startup for better bugreports. * Tue Feb 10 2009 Jan Derfinak - g_string_sprintf() replaced with g_string_printf(). * Mon Feb 9 2009 Jan Derfinak - Rollback autodection of first sms position. First position now defaults to 1 and can be changed to 0 with -0, --firstpos0 command line argument. * Mon Feb 9 2009 Daniele Forsi - Add examples directory with action files. * Sun Feb 8 2009 Daniele Forsi - Fix segfault when using the nk6100 driver. * Wed 24 Dec 2008 Daniele Forsi - Minor changes to man page. * Mon Dec 1 2008 BORBELY Zoltan - Restart connection if there're too many consequetive errors. * Sun Nov 16 2008 Jan Derfinak - ReadSMS() prepared gn_sms structure to remove in A_DeleteSMSMessage(). But in some situation RefreshSMS() deallocated gn_sms structure before A_DeleteSMSMessage() which resulted in double free bug (#23550, #23842). Fixed by processing all events before RefreshSMS(). (Paul Praet) * Mon Oct 6 2008 PaweÅ‚ Kot - Marked as 1.4.3 * Mon Oct 5 2008 PaweÅ‚ Kot - Default module is file module. * Sat Jul 29 2008 Jan Derfinak - Added possibility to use multiline SMS text in file module (idea from Joan). * Sat Jul 29 2008 Jan Derfinak - Fixed potential SEGFAULT in file module when input file contains empty SMS text. * Sun May 25 2008 PaweÅ‚ Kot - Avoid "duplicated message" error with concatenated messages on MySQL. - More verbose debug information. * Thu May 8 2008 Daniele Forsi - always search the translations in $localedir, which can be choosen by the user at configure time, not in system default directory * Sun Jan 27 2007 Jan Derfinak - Added detection of first sms position. - Simplified locking of smsMutex. - A_DeleteSMSMessage now decrements phoneMonitor.sms.number. - phoneMonitor.working and phoneMonitor.sms.unRead commented out. They will be removed in future. * Mon Jul 16 2007 Jan Derfinak - Switch reconnect flag (part of the MYSQL structure) to on for MySQL 5.0.13 and newer. It was by default on in versions of the API older than 5.0.3. * Sat Jul 7 2007 PaweÅ‚ Kot - add support for multipart SMS for MySQL backend (Alain Degreffe) * Fri Nov 17 2006 PaweÅ‚ Kot - reconnect only on timeout * Sun Oct 1 2006 Jan Derfinak - exit after unsuccessful insert into DB (Massimo Citterio) * Thu Aug 10 2006 PaweÅ‚ Kot - fix problems with exporting symbols from shared libraries/plugins with newer gcc versions * Wed May 10 2006 Jan Derfinak - added setlocale() call * Thu May 4 2006 Helge Deller, PaweÅ‚ Kot - Switch smsd to new libgnokii functions * Mon Jan 30 2006 Jan Derfinak - Added schema support for PostgreSQL. * Sat Jan 21 2006 Jan Derfinak - Fix gcc 4 type check warnings. * Sun Jan 15 2006 Daniele Forsi - Changed again some messages to be consistent across the whole project * Sat Jan 7 2006 Daniele Forsi - Added smsd/file.c smsd/mysql.c smsd/pq.c smsd/smsd.c to the list of translatable files in po/POTFILES.in (they were already gettextized) - Changed some messages to be consistent across the whole project * Wed Aug 10 2005 Jan Derfinak - Switch to glib2. * Fri May 13 2005 PaweÅ‚ Kot - README should say about pq/mysql.la not pq/mysql.so * Sat Apr 9 2005 Jan Derfinak - version 1.4 - added time window for outgoing sms (Martin White ) - fixed strncpy() if mysql_fetch_row returns NULL - DATABASE FORMAT CHANGED - please add new columns 'not_before', 'not_after' to outbox * Tue Jan 25 2005 Jan Derfinak - Improved db modules handling in Makefile by David Vrabel. * Tue Jan 25 2005 David Vrabel - Make configurable where to look for the new messages. * Sun Oct 17 2004 PaweÅ‚ Kot - Correctly exit when the device is locked. * Mon Oct 11 2004 Jan Derfinak - Added support for drivers without GN_OP_GetSMSStatus. * Tue Aug 3 2004 Jan Derfinak - Changed LDLIBS for FreeBSD. Idea from . * Sat Jul 10 2004 PaweÅ‚ Kot - Use pq_config instead of hardcoding paths in Makefile * Sun Jun 27 2004 PaweÅ‚ Kot - Move appending LDLIBS to ../Makefile.global (in case of common libraries) * Sun Jun 20 2004 PaweÅ‚ Kot - Really finish libtolization: use *.lo objects instead of *.o. It avoids mixing fPIC (from libgnokii) and non-fPIC (from smsd) code. * Wed May 19 2004 Jan Derfinak - The meaning of default value 'now' changed in latest postgresql. It is replaced with function now(). Thanks to Stefan de Konink . * Sun May 9 2004 PaweÅ‚ Kot - gn_cfg_read changed the signature * Thu Feb 19 2004 BORBELY Zoltan - XDEBUG eliminated, using gn_log_xdebug * Wed Jan 22 2004 BORBELY Zoltan - libtoolization finished - Update README to reflect libtoolization * Sun Jan 04 2004 PaweÅ‚ Kot - Update README with some modules clarification * Fri Jan 02 2004 Guido Falsi - Use $(CC) detected by configure script instead of hardcoded gcc. Taken from FreeBSD ports. * Sun Oct 05 2003 Jan Derfinak - Added possibility to run multiple instances at the same time. - Version changed to 1.2. * Tue Sep 30 2003 Jan Derfinak - added alpha support for glib2 * Fri Aug 29 2003 PaweÅ‚ Kot - Add the manual page * Tue Jun 03 2003 Ville Skyttä - Make SMSD install FHS compliant. * Tue Apr 08 2003 Bernhard Minks - compat.h added to file.c, mysql.c and pq.c. * Mon Feb 10 2003 BORBELY Zoltan - Bad SQL statement fixed in the mysql module. * Sun Feb 09 2003 Jan Definak - Added comment for Tru64 from Peter Kolmisoppi . - Added support for logging to file. - Added possibility to request delivery report per message. Global option -r, --report is deprecated. - Version number changed from 1.0 to 1.1-cvs. * Sat Jan 18 2003 PaweÅ‚ Kot - FreeBSD doesn't have libdl and can compile smsd without -ldl. Add the comment in the Makefile as well as the correct LDLIBS for FreeBSD (disabled by default). * Fri Dec 27 2002 BORBELY Zoltan - Converted libfile.so to new libgnokii API. * Thu Dec 26 2002 PaweÅ‚ Kot - Converted to new libgnokii API. * Sun Aug 11 2002 Jan Derfinak - Added libfile. * Sun Aug 4 2002 Jan Derfinak - Added support for phones with sms folders. * Sun Jul 21 2002 PaweÅ‚ Kot - When some characters are not from the default alphabet encode them in the unicode. * Sun Jul 07 2002 Jan Derfinak - Fixed sms's sending to reflect changes in gnokii code. * Fri Jun 28 2002 Jan Derfinak - Fixed sms's receiving to reflect changes in gnokii code. - Sms's sending still don't work. * Tue Apr 23 2002 PaweÅ‚ Kot - Don't use 'connect' as the variable name. - GE_SMSSENDOK is deprecated. * Wed Mar 20 2002 BORBELY Zoltan - GSM_Data structures initialised correctly. - Minor locking fixes. * Thu Feb 14 2002 Jan Derfinak - Rewrited PostgreSQL plugin. - Added retrying when sending sms's. - Removed GSMLinkOK test. - Code and documentation cleanup. * Sun Feb 03 2002 Jan Derfinak - MySQL support is now really working. * Fri Feb 01 2002 Jan Derfinak - Added experimental support for MySQL. Fixes will coming soon. (Ganesh Lohia ) * Sun Jan 27 2002 Jan Derfinak - Fix core dumps. - Added support for database's plugins. - Added option for reading delivery reports. * Mon Jan 14 2002 Jan Derfinak - added parsing for \ and ' in incoming sms's. - Changed "insert into values ( .. )" to "insert into
( .. ) values ( .. )". - Rename GetSMS to GetSMS2 (function with this name appears in gsm-api.h) - Rename SendSMS to SendSMS2 (function with this name appears in gsm-api.h) - More fixes to new structure. * Mon Dec 3 2001 PaweÅ‚ Kot - Updated to the new libsms. - Be more friendly to the other postgresql includes and libraries locations. - Use libgnokii.so. * Fri 02 Feb 2001 Jan Derfinak - Fixed smsd to new capability code. gnokii-0.6.31/gnokii/0000755000175000017500000000000011666163464012476 5ustar leoleognokii-0.6.31/gnokii/Makefile.am0000644000175000017500000000156411666163120014525 0ustar leoleoDEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ bin_PROGRAMS = gnokii gnokii_SOURCES = gnokii.c gnokii-calendar.c gnokii-dial.c gnokii-file.c gnokii-logo.c gnokii-mms.c \ gnokii-monitor.c \ gnokii-other.c gnokii-phonebook.c gnokii-profile.c gnokii-ringtone.c gnokii-security.c \ gnokii-settings.c gnokii-sms.c gnokii-todo.c gnokii-utils.c gnokii-wap.c gnokii-app.h gnokii_LDADD = $(top_builddir)/common/libgnokii.la $(INTLLIBS) $(TERMLDFLAGS) $(TERMLIBS) gnokii_CFLAGS = -I$(top_srcdir)/include # Following http://sourceware.org/ml/automake/2000-08/msg00014.html: # Compile getopt1.c and getopt.c unconditionally on all platforms, it # has its own magic for the platforms that already have it. gnokii_LDADD += $(top_builddir)/getopt/libgetopt.a #FIXME cross compiling #if WIN32_CROSS #PRGNAME=gnokii.exe #TARGET=-mconsole #AM_CFLAGS=-DGNOKIIDLL_IMPORTS #else PRGNAME=gnokii #endif gnokii-0.6.31/gnokii/gnokii-logo.c0000644000175000017500000003757211666163120015063 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 1999-2000 Gary Reuter, Reinhold Jordan Copyright (C) 1999-2006 Pawel Kot Copyright (C) 2000-2002 Marcin Wiacek, Chris Kemp, Manfred Jonsson Copyright (C) 2001 Marian Jancar, Bartek Klepacz Copyright (C) 2001-2002 Pavel Machek, Markus Plail Copyright (C) 2002 Ladis Michl, Simon Huggins Copyright (C) 2002-2004 BORBELY Zoltan Copyright (C) 2003 Bertrik Sikken Copyright (C) 2004 Martin Goldhahn Mainline code for gnokii utility. Logo handling functions. */ #include "config.h" #include "misc.h" #include "compat.h" #include #include #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #include #include "gnokii-app.h" #include "gnokii.h" void logo_usage(FILE *f) { fprintf(f, _("Logo options:\n" " --sendlogo {caller|op|picture} destination logofile\n" " [network_code]\n" " --setlogo op [logofile [network_code]]\n" " --setlogo startup [logofile]\n" " --setlogo caller [logofile [caller_group_number [group_name]]]\n" " --setlogo {dealer|text} [text]\n" " --getlogo op [logofile [network_code]]\n" " --getlogo startup [logofile [network_code]]\n" " --getlogo caller [caller_group_number [logofile\n" " [network_code]]]\n" " --getlogo {dealer|text}\n" " --viewlogo logofile\n" )); } static gn_bmp_types set_bitmap_type(char *s) { if (!strcmp(s, "text")) return GN_BMP_WelcomeNoteText; if (!strcmp(s, "dealer")) return GN_BMP_DealerNoteText; if (!strcmp(s, "op")) return GN_BMP_OperatorLogo; if (!strcmp(s, "startup")) return GN_BMP_StartupLogo; if (!strcmp(s, "caller")) return GN_BMP_CallerLogo; if (!strcmp(s, "picture")) return GN_BMP_PictureMessage; if (!strcmp(s, "emspicture")) return GN_BMP_EMSPicture; if (!strcmp(s, "emsanimation")) return GN_BMP_EMSAnimation; return GN_BMP_None; } /* FIXME: Integrate with sendsms */ /* The following function allows to send logos using SMS */ gn_error sendlogo(int argc, char *argv[], gn_data *data, struct gn_statemachine *state) { gn_sms sms; gn_error error; int type; gn_sms_default_submit(&sms); /* The first argument is the type of the logo. */ switch (type = set_bitmap_type(optarg)) { case GN_BMP_OperatorLogo: fprintf(stderr, _("Sending operator logo.\n")); break; case GN_BMP_CallerLogo: fprintf(stderr, _("Sending caller line identification logo.\n")); break; case GN_BMP_PictureMessage: fprintf(stderr, _("Sending Multipart Message: Picture Message.\n")); break; case GN_BMP_EMSPicture: fprintf(stderr, _("Sending EMS-compliant Picture Message.\n")); break; case GN_BMP_EMSAnimation: fprintf(stderr, _("Sending EMS-compliant Animation.\n")); break; default: fprintf(stderr, _("You should specify what kind of logo to send!\n")); return -1; } sms.user_data[0].type = GN_SMS_DATA_Bitmap; /* The second argument is the destination, ie the phone number of recipient. */ memset(&sms.remote.number, 0, sizeof(sms.remote.number)); snprintf(sms.remote.number, sizeof(sms.remote.number), "%s", argv[optind]); if (sms.remote.number[0] == '+') sms.remote.type = GN_GSM_NUMBER_International; else sms.remote.type = GN_GSM_NUMBER_Unknown; if (loadbitmap(&sms.user_data[0].u.bitmap, argv[optind+1], type, state) != GN_ERR_NONE) return GN_ERR_FAILED; if (type != sms.user_data[0].u.bitmap.type) { fprintf(stderr, _("Cannot send logo: specified and loaded bitmap type differ!\n")); return GN_ERR_FAILED; } /* If we are sending op logo we can rewrite network code. */ if ((sms.user_data[0].u.bitmap.type == GN_BMP_OperatorLogo) && (argc > optind + 2)) { /* * The fourth argument, if present, is the Network code of the operator. * Network code is in this format: "xxx yy". */ snprintf(sms.user_data[0].u.bitmap.netcode, sizeof(sms.user_data[0].u.bitmap.netcode), "%s", argv[optind+2]); dprintf("Operator code: %s\n", argv[optind+2]); } sms.user_data[1].type = GN_SMS_DATA_None; if (sms.user_data[0].u.bitmap.type == GN_BMP_PictureMessage) { sms.user_data[1].type = GN_SMS_DATA_NokiaText; readtext(&sms.user_data[1]); sms.user_data[2].type = GN_SMS_DATA_None; } data->message_center = calloc(1, sizeof(gn_sms_message_center)); data->message_center->id = 1; if (gn_sm_functions(GN_OP_GetSMSCenter, data, state) == GN_ERR_NONE) { snprintf(sms.smsc.number, sizeof(sms.smsc.number), "%s", data->message_center->smsc.number); sms.smsc.type = data->message_center->smsc.type; } free(data->message_center); if (!sms.smsc.type) sms.smsc.type = GN_GSM_NUMBER_Unknown; /* Send the message. */ data->sms = &sms; error = gn_sms_send(data, state); if (error == GN_ERR_NONE) { if (sms.parts > 1) { int j; fprintf(stderr, _("Message sent in %d parts with reference numbers:"), sms.parts); for (j = 0; j < sms.parts; j++) fprintf(stderr, " %d", sms.reference[j]); fprintf(stderr, "\n"); } else fprintf(stderr, _("Send succeeded with reference %d!\n"), sms.reference[0]); } else fprintf(stderr, _("SMS Send failed (%s)\n"), gn_error_print(error)); return error; } /* Getting logos. */ static gn_error SaveBitmapFileDialog(char *FileName, gn_bmp *bitmap, gn_phone *info) { int confirm; char ans[4]; struct stat buf; gn_error error; /* Ask before overwriting */ while (stat(FileName, &buf) == 0) { confirm = 0; while (!confirm) { fprintf(stderr, _("Saving logo. File \"%s\" exists. (O)verwrite, create (n)ew or (s)kip ? "), FileName); gn_line_get(stdin, ans, 4); if (!strcmp(ans, _("O")) || !strcmp(ans, _("o"))) confirm = 1; if (!strcmp(ans, _("N")) || !strcmp(ans, _("n"))) confirm = 2; if (!strcmp(ans, _("S")) || !strcmp(ans, _("s"))) return GN_ERR_USERCANCELED; } if (confirm == 1) break; if (confirm == 2) { fprintf(stderr, _("Enter name of new file: ")); gn_line_get(stdin, FileName, 50); if (!FileName || (*FileName == 0)) return GN_ERR_USERCANCELED; } } error = gn_file_bitmap_save(FileName, bitmap, info); switch (error) { case GN_ERR_FAILED: fprintf(stderr, _("Can't open file %s for writing!\n"), FileName); break; default: break; } return error; } gn_error getlogo(int argc, char *argv[], gn_data *data, struct gn_statemachine *state) { gn_bmp bitmap; gn_error error; gn_phone *info = &state->driver.phone; memset(&bitmap, 0, sizeof(gn_bmp)); bitmap.type = set_bitmap_type(optarg); /* There is caller group number missing in argument list. */ if ((bitmap.type == GN_BMP_CallerLogo) && (argc >= optind + 1)) { bitmap.number = (argv[optind][0] < '0') ? 0 : argv[optind][0] - '0'; if (bitmap.number > 9) bitmap.number = 0; } if (bitmap.type != GN_BMP_None) { data->bitmap = &bitmap; error = gn_sm_functions(GN_OP_GetBitmap, data, state); gn_bmp_print(&bitmap, stderr); switch (error) { case GN_ERR_NONE: switch (bitmap.type) { case GN_BMP_DealerNoteText: fprintf(stdout, _("Dealer welcome note ")); if (bitmap.text[0]) fprintf(stdout, _("currently set to \"%s\"\n"), bitmap.text); else fprintf(stdout, _("currently empty\n")); break; case GN_BMP_WelcomeNoteText: fprintf(stdout, _("Welcome note ")); if (bitmap.text[0]) fprintf(stdout, _("currently set to \"%s\"\n"), bitmap.text); else fprintf(stdout, _("currently empty\n")); break; case GN_BMP_OperatorLogo: case GN_BMP_NewOperatorLogo: if (!bitmap.width) goto empty_bitmap; fprintf(stderr, _("Operator logo for %s (%s) network got successfully\n"), bitmap.netcode, gn_network_name_get(bitmap.netcode)); if (argc == optind + 2) { snprintf(bitmap.netcode, sizeof(bitmap.netcode), "%s", argv[optind + 1]); if (!strcmp(gn_network_name_get(bitmap.netcode), _("unknown"))) { fprintf(stderr, _("Sorry, gnokii doesn't know %s network !\n"), bitmap.netcode); return GN_ERR_FAILED; } } break; case GN_BMP_StartupLogo: if (!bitmap.width) goto empty_bitmap; fprintf(stderr, _("Startup logo got successfully\n")); if (argc == optind + 2) { snprintf(bitmap.netcode, sizeof(bitmap.netcode), "%s", argv[optind + 1]); if (!strcmp(gn_network_name_get(bitmap.netcode), _("unknown"))) { fprintf(stderr, _("Sorry, gnokii doesn't know %s network !\n"), bitmap.netcode); return GN_ERR_FAILED; } } break; case GN_BMP_CallerLogo: if (!bitmap.width) fprintf(stderr, _("Your phone doesn't have logo uploaded !\n")); else fprintf(stderr, _("Caller logo got successfully\n")); fprintf(stdout, _("Caller group name: %s, ringing tone: %s (%d)\n"), bitmap.text, get_ringtone_name(bitmap.ringtone, data, state), bitmap.ringtone); if (argc == optind + 3) { snprintf(bitmap.netcode, sizeof(bitmap.netcode), "%s", argv[optind + 2]); if (!strcmp(gn_network_name_get(bitmap.netcode), _("unknown"))) { fprintf(stderr, _("Sorry, gnokii doesn't know %s network !\n"), bitmap.netcode); return GN_ERR_FAILED; } } break; default: fprintf(stderr, _("Unknown bitmap type.\n")); break; empty_bitmap: fprintf(stderr, _("Your phone doesn't have logo uploaded !\n")); return GN_ERR_FAILED; } if ((argc > optind) && (SaveBitmapFileDialog(argv[optind], &bitmap, info) != GN_ERR_NONE)) return GN_ERR_FAILED; break; default: fprintf(stderr, _("Error: %s\n"), gn_error_print(error)); break; } } else { fprintf(stderr, _("What kind of logo do you want to get ?\n")); return GN_ERR_FAILED; } return error; } /* Sending logos. */ static gn_error ReadBitmapFileDialog(char *FileName, gn_bmp *bitmap, gn_phone *info) { gn_error error; error = gn_file_bitmap_read(FileName, bitmap, info); switch (error) { case GN_ERR_NONE: break; default: fprintf(stderr, _("Error while reading file \"%s\": %s\n"), FileName, gn_error_print(error)); break; } return error; } gn_error setlogo(int argc, char *argv[], gn_data *data, struct gn_statemachine *state) { gn_bmp bitmap, oldbit; gn_network_info networkinfo; gn_error error = GN_ERR_NOTSUPPORTED; gn_phone *phone = &state->driver.phone; int i; gn_data_clear(data); data->bitmap = &bitmap; data->network_info = &networkinfo; memset(&bitmap.text, 0, sizeof(bitmap.text)); bitmap.type = set_bitmap_type(optarg); switch (bitmap.type) { case GN_BMP_WelcomeNoteText: case GN_BMP_DealerNoteText: if (argc > optind) snprintf(bitmap.text, sizeof(bitmap.text), "%s", argv[optind]); break; case GN_BMP_OperatorLogo: error = (argc > optind) ? ReadBitmapFileDialog(argv[optind], &bitmap, phone) : gn_bmp_null(&bitmap, phone); if (error != GN_ERR_NONE) return error; memset(&bitmap.netcode, 0, sizeof(bitmap.netcode)); /* FIXME: ugly as hell */ if (!strncmp(state->driver.phone.models, "6510", 4)) gn_bmp_resize(&bitmap, GN_BMP_NewOperatorLogo, phone); else gn_bmp_resize(&bitmap, GN_BMP_OperatorLogo, phone); if (argc > optind + 1) { snprintf(bitmap.netcode, sizeof(bitmap.netcode), "%s", argv[optind + 1]); if (!strcmp(gn_network_name_get(bitmap.netcode), _("unknown"))) { fprintf(stderr, _("Sorry, gnokii doesn't know %s network !\n"), bitmap.netcode); return GN_ERR_UNKNOWN; } } else { if (gn_sm_functions(GN_OP_GetNetworkInfo, data, state) == GN_ERR_NONE) snprintf(bitmap.netcode, sizeof(bitmap.netcode), "%s", networkinfo.network_code); } break; case GN_BMP_StartupLogo: if ((argc > optind) && ((error = ReadBitmapFileDialog(argv[optind], &bitmap, phone)) != GN_ERR_NONE)) return error; gn_bmp_resize(&bitmap, GN_BMP_StartupLogo, phone); break; case GN_BMP_CallerLogo: if ((argc > optind) && ((error = ReadBitmapFileDialog(argv[optind], &bitmap, phone)) != GN_ERR_NONE)) return error; gn_bmp_resize(&bitmap, GN_BMP_CallerLogo, phone); if (argc > optind + 1) { bitmap.number = (argv[optind+1][0] < '0') ? 0 : argv[optind+1][0] - '0'; if (bitmap.number > 9) bitmap.number = 0; dprintf("%i \n", bitmap.number); oldbit.type = GN_BMP_CallerLogo; oldbit.number = bitmap.number; data->bitmap = &oldbit; if (gn_sm_functions(GN_OP_GetBitmap, data, state) == GN_ERR_NONE) { /* We have to get the old name and ringtone!! */ bitmap.ringtone = oldbit.ringtone; snprintf(bitmap.text, sizeof(bitmap.text), "%s", oldbit.text); } if (argc > optind + 2) snprintf(bitmap.text, sizeof(bitmap.text), "%s", argv[optind + 2]); } break; default: fprintf(stderr, _("What kind of logo do you want to set ?\n")); return GN_ERR_UNKNOWN; } data->bitmap = &bitmap; error = gn_sm_functions(GN_OP_SetBitmap, data, state); switch (error) { case GN_ERR_NONE: oldbit.type = bitmap.type; oldbit.number = bitmap.number; data->bitmap = &oldbit; if (gn_sm_functions(GN_OP_GetBitmap, data, state) == GN_ERR_NONE) { switch (bitmap.type) { case GN_BMP_WelcomeNoteText: case GN_BMP_DealerNoteText: if (strcmp(bitmap.text, oldbit.text)) { /* I know, it looks horrible, but... * I set it to the short string - if it won't be set * it means, PIN is required. If it will be correct, previous * (user) text was too long. * * Without it, I could have such thing: * user set text to very short string (for example, "Marcin") * then enable phone without PIN and try to set it to the very long (too long for phone) * string (which start with "Marcin"). If we compare them as only length different, we could think, * that phone accepts strings 6 chars length only (length of "Marcin") * When we make it correct, we don't have this mistake */ strcpy(oldbit.text, "!"); data->bitmap = &oldbit; gn_sm_functions(GN_OP_SetBitmap, data, state); gn_sm_functions(GN_OP_GetBitmap, data, state); if (bitmap.type == GN_BMP_DealerNoteText) { fprintf(stderr, _("Error setting dealer welcome note - ")); } else { fprintf(stderr, _("Error setting welcome note - ")); } if (oldbit.text[0] != '!') { fprintf(stderr, _("SIM card and PIN is required\n")); return GN_ERR_UNKNOWN; } else { data->bitmap = &bitmap; gn_sm_functions(GN_OP_SetBitmap, data, state); data->bitmap = &oldbit; gn_sm_functions(GN_OP_GetBitmap, data, state); fprintf(stderr, _("too long, truncated to \"%s\" (length %zi)\n"), oldbit.text, strlen(oldbit.text)); return GN_ERR_ENTRYTOOLONG; } } break; case GN_BMP_StartupLogo: for (i = 0; i < oldbit.size; i++) { if (oldbit.bitmap[i] != bitmap.bitmap[i]) { fprintf(stderr, _("Error setting startup logo - SIM card and PIN is required\n")); fprintf(stderr, _("i: %i, %2x %2x\n"), i, oldbit.bitmap[i], bitmap.bitmap[i]); return GN_ERR_UNKNOWN; } } break; default: break; } } fprintf(stderr, _("Done.\n")); break; default: fprintf(stderr, _("Error: %s\n"), gn_error_print(error)); break; } return error; } gn_error viewlogo(char *filename) { gn_error error; error = gn_file_bitmap_show(filename); if (error != GN_ERR_NONE) fprintf(stderr, _("Could not load bitmap: %s\n"), gn_error_print(error)); return error; } gnokii-0.6.31/gnokii/Makefile.in0000644000175000017500000014621611666163211014543 0ustar leoleo# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ bin_PROGRAMS = gnokii$(EXEEXT) subdir = gnokii DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_expand_dir.m4 \ $(top_srcdir)/m4/acx_pthread.m4 $(top_srcdir)/m4/intltool.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_gnokii_OBJECTS = gnokii-gnokii.$(OBJEXT) \ gnokii-gnokii-calendar.$(OBJEXT) gnokii-gnokii-dial.$(OBJEXT) \ gnokii-gnokii-file.$(OBJEXT) gnokii-gnokii-logo.$(OBJEXT) \ gnokii-gnokii-mms.$(OBJEXT) gnokii-gnokii-monitor.$(OBJEXT) \ gnokii-gnokii-other.$(OBJEXT) \ gnokii-gnokii-phonebook.$(OBJEXT) \ gnokii-gnokii-profile.$(OBJEXT) \ gnokii-gnokii-ringtone.$(OBJEXT) \ gnokii-gnokii-security.$(OBJEXT) \ gnokii-gnokii-settings.$(OBJEXT) gnokii-gnokii-sms.$(OBJEXT) \ gnokii-gnokii-todo.$(OBJEXT) gnokii-gnokii-utils.$(OBJEXT) \ gnokii-gnokii-wap.$(OBJEXT) gnokii_OBJECTS = $(am_gnokii_OBJECTS) am__DEPENDENCIES_1 = gnokii_DEPENDENCIES = $(top_builddir)/common/libgnokii.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(top_builddir)/getopt/libgetopt.a gnokii_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(gnokii_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(gnokii_SOURCES) DIST_SOURCES = $(gnokii_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLUETOOTH_LIBS = @BLUETOOTH_LIBS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FIND = @FIND@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLDFLAGS = @GLDFLAGS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GMODULE_CFLAGS = @GMODULE_CFLAGS@ GMODULE_LIBS = @GMODULE_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GNOKII_LT_VERSION = @GNOKII_LT_VERSION@ GNOKII_LT_VERSION_AGE = @GNOKII_LT_VERSION_AGE@ GNOKII_LT_VERSION_CURRENT = @GNOKII_LT_VERSION_CURRENT@ GNOKII_LT_VERSION_REVISION = @GNOKII_LT_VERSION_REVISION@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_LIBICAL = @HAVE_LIBICAL@ HAVE_LIBUSB = @HAVE_LIBUSB@ HAVE_SOCKETPHONET = @HAVE_SOCKETPHONET@ HAVE_XGNOKII = @HAVE_XGNOKII@ ICAL_CFLAGS = @ICAL_CFLAGS@ ICAL_LIBS = @ICAL_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBGNOKII_VERSION_MAJOR = @LIBGNOKII_VERSION_MAJOR@ LIBGNOKII_VERSION_MINOR = @LIBGNOKII_VERSION_MINOR@ LIBGNOKII_VERSION_RELEASE = @LIBGNOKII_VERSION_RELEASE@ LIBGNOKII_VERSION_STRING = @LIBGNOKII_VERSION_STRING@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBPCSCLITE_CFLAGS = @LIBPCSCLITE_CFLAGS@ LIBPCSCLITE_LIBS = @LIBPCSCLITE_LIBS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKE = @MAKE@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ MYSQLCONFIG = @MYSQLCONFIG@ MYSQLCONFIG5 = @MYSQLCONFIG5@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_LIBS = @MYSQL_LIBS@ NEED_LOCALE_CHARSET = @NEED_LOCALE_CHARSET@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OWN_GETOPT = @OWN_GETOPT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PGCONFIG = @PGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSTGRES_CFLAGS = @POSTGRES_CFLAGS@ POSTGRES_LIBS = @POSTGRES_LIBS@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LIBS = @SQLITE3_LIBS@ SQLITE_CFLAGS = @SQLITE_CFLAGS@ SQLITE_LIBS = @SQLITE_LIBS@ STRIP = @STRIP@ TCP_LIBS = @TCP_LIBS@ TERMLDFLAGS = @TERMLDFLAGS@ TERMLIBS = @TERMLIBS@ USB_LIBS = @USB_LIBS@ USE_NLS = @USE_NLS@ USE_UNIX98PTYS = @USE_UNIX98PTYS@ VERSION = @VERSION@ WIN32 = @WIN32@ WIN32_CROSS = @WIN32_CROSS@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ XPACKAGE = @XPACKAGE@ XPM_CFLAGS = @XPM_CFLAGS@ XPM_LIBS = @XPM_LIBS@ XVERSION = @XVERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ acx_pthread_config = @acx_pthread_config@ 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@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ gnokii_SOURCES = gnokii.c gnokii-calendar.c gnokii-dial.c gnokii-file.c gnokii-logo.c gnokii-mms.c \ gnokii-monitor.c \ gnokii-other.c gnokii-phonebook.c gnokii-profile.c gnokii-ringtone.c gnokii-security.c \ gnokii-settings.c gnokii-sms.c gnokii-todo.c gnokii-utils.c gnokii-wap.c gnokii-app.h # Following http://sourceware.org/ml/automake/2000-08/msg00014.html: # Compile getopt1.c and getopt.c unconditionally on all platforms, it # has its own magic for the platforms that already have it. gnokii_LDADD = $(top_builddir)/common/libgnokii.la $(INTLLIBS) \ $(TERMLDFLAGS) $(TERMLIBS) $(top_builddir)/getopt/libgetopt.a gnokii_CFLAGS = -I$(top_srcdir)/include #FIXME cross compiling #if WIN32_CROSS #PRGNAME=gnokii.exe #TARGET=-mconsole #AM_CFLAGS=-DGNOKIIDLL_IMPORTS #else PRGNAME = gnokii all: all-am .SUFFIXES: .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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gnokii/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gnokii/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 $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list gnokii$(EXEEXT): $(gnokii_OBJECTS) $(gnokii_DEPENDENCIES) @rm -f gnokii$(EXEEXT) $(gnokii_LINK) $(gnokii_OBJECTS) $(gnokii_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gnokii-gnokii-calendar.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gnokii-gnokii-dial.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gnokii-gnokii-file.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gnokii-gnokii-logo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gnokii-gnokii-mms.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gnokii-gnokii-monitor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gnokii-gnokii-other.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gnokii-gnokii-phonebook.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gnokii-gnokii-profile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gnokii-gnokii-ringtone.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gnokii-gnokii-security.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gnokii-gnokii-settings.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gnokii-gnokii-sms.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gnokii-gnokii-todo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gnokii-gnokii-utils.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gnokii-gnokii-wap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gnokii-gnokii.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @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 $@ $< gnokii-gnokii.o: gnokii.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -MT gnokii-gnokii.o -MD -MP -MF $(DEPDIR)/gnokii-gnokii.Tpo -c -o gnokii-gnokii.o `test -f 'gnokii.c' || echo '$(srcdir)/'`gnokii.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/gnokii-gnokii.Tpo $(DEPDIR)/gnokii-gnokii.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnokii.c' object='gnokii-gnokii.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -c -o gnokii-gnokii.o `test -f 'gnokii.c' || echo '$(srcdir)/'`gnokii.c gnokii-gnokii.obj: gnokii.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -MT gnokii-gnokii.obj -MD -MP -MF $(DEPDIR)/gnokii-gnokii.Tpo -c -o gnokii-gnokii.obj `if test -f 'gnokii.c'; then $(CYGPATH_W) 'gnokii.c'; else $(CYGPATH_W) '$(srcdir)/gnokii.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/gnokii-gnokii.Tpo $(DEPDIR)/gnokii-gnokii.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnokii.c' object='gnokii-gnokii.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -c -o gnokii-gnokii.obj `if test -f 'gnokii.c'; then $(CYGPATH_W) 'gnokii.c'; else $(CYGPATH_W) '$(srcdir)/gnokii.c'; fi` gnokii-gnokii-calendar.o: gnokii-calendar.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -MT gnokii-gnokii-calendar.o -MD -MP -MF $(DEPDIR)/gnokii-gnokii-calendar.Tpo -c -o gnokii-gnokii-calendar.o `test -f 'gnokii-calendar.c' || echo '$(srcdir)/'`gnokii-calendar.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/gnokii-gnokii-calendar.Tpo $(DEPDIR)/gnokii-gnokii-calendar.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnokii-calendar.c' object='gnokii-gnokii-calendar.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -c -o gnokii-gnokii-calendar.o `test -f 'gnokii-calendar.c' || echo '$(srcdir)/'`gnokii-calendar.c gnokii-gnokii-calendar.obj: gnokii-calendar.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -MT gnokii-gnokii-calendar.obj -MD -MP -MF $(DEPDIR)/gnokii-gnokii-calendar.Tpo -c -o gnokii-gnokii-calendar.obj `if test -f 'gnokii-calendar.c'; then $(CYGPATH_W) 'gnokii-calendar.c'; else $(CYGPATH_W) '$(srcdir)/gnokii-calendar.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/gnokii-gnokii-calendar.Tpo $(DEPDIR)/gnokii-gnokii-calendar.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnokii-calendar.c' object='gnokii-gnokii-calendar.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -c -o gnokii-gnokii-calendar.obj `if test -f 'gnokii-calendar.c'; then $(CYGPATH_W) 'gnokii-calendar.c'; else $(CYGPATH_W) '$(srcdir)/gnokii-calendar.c'; fi` gnokii-gnokii-dial.o: gnokii-dial.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -MT gnokii-gnokii-dial.o -MD -MP -MF $(DEPDIR)/gnokii-gnokii-dial.Tpo -c -o gnokii-gnokii-dial.o `test -f 'gnokii-dial.c' || echo '$(srcdir)/'`gnokii-dial.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/gnokii-gnokii-dial.Tpo $(DEPDIR)/gnokii-gnokii-dial.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnokii-dial.c' object='gnokii-gnokii-dial.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -c -o gnokii-gnokii-dial.o `test -f 'gnokii-dial.c' || echo '$(srcdir)/'`gnokii-dial.c gnokii-gnokii-dial.obj: gnokii-dial.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -MT gnokii-gnokii-dial.obj -MD -MP -MF $(DEPDIR)/gnokii-gnokii-dial.Tpo -c -o gnokii-gnokii-dial.obj `if test -f 'gnokii-dial.c'; then $(CYGPATH_W) 'gnokii-dial.c'; else $(CYGPATH_W) '$(srcdir)/gnokii-dial.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/gnokii-gnokii-dial.Tpo $(DEPDIR)/gnokii-gnokii-dial.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnokii-dial.c' object='gnokii-gnokii-dial.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -c -o gnokii-gnokii-dial.obj `if test -f 'gnokii-dial.c'; then $(CYGPATH_W) 'gnokii-dial.c'; else $(CYGPATH_W) '$(srcdir)/gnokii-dial.c'; fi` gnokii-gnokii-file.o: gnokii-file.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -MT gnokii-gnokii-file.o -MD -MP -MF $(DEPDIR)/gnokii-gnokii-file.Tpo -c -o gnokii-gnokii-file.o `test -f 'gnokii-file.c' || echo '$(srcdir)/'`gnokii-file.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/gnokii-gnokii-file.Tpo $(DEPDIR)/gnokii-gnokii-file.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnokii-file.c' object='gnokii-gnokii-file.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -c -o gnokii-gnokii-file.o `test -f 'gnokii-file.c' || echo '$(srcdir)/'`gnokii-file.c gnokii-gnokii-file.obj: gnokii-file.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -MT gnokii-gnokii-file.obj -MD -MP -MF $(DEPDIR)/gnokii-gnokii-file.Tpo -c -o gnokii-gnokii-file.obj `if test -f 'gnokii-file.c'; then $(CYGPATH_W) 'gnokii-file.c'; else $(CYGPATH_W) '$(srcdir)/gnokii-file.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/gnokii-gnokii-file.Tpo $(DEPDIR)/gnokii-gnokii-file.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnokii-file.c' object='gnokii-gnokii-file.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -c -o gnokii-gnokii-file.obj `if test -f 'gnokii-file.c'; then $(CYGPATH_W) 'gnokii-file.c'; else $(CYGPATH_W) '$(srcdir)/gnokii-file.c'; fi` gnokii-gnokii-logo.o: gnokii-logo.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -MT gnokii-gnokii-logo.o -MD -MP -MF $(DEPDIR)/gnokii-gnokii-logo.Tpo -c -o gnokii-gnokii-logo.o `test -f 'gnokii-logo.c' || echo '$(srcdir)/'`gnokii-logo.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/gnokii-gnokii-logo.Tpo $(DEPDIR)/gnokii-gnokii-logo.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnokii-logo.c' object='gnokii-gnokii-logo.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -c -o gnokii-gnokii-logo.o `test -f 'gnokii-logo.c' || echo '$(srcdir)/'`gnokii-logo.c gnokii-gnokii-logo.obj: gnokii-logo.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -MT gnokii-gnokii-logo.obj -MD -MP -MF $(DEPDIR)/gnokii-gnokii-logo.Tpo -c -o gnokii-gnokii-logo.obj `if test -f 'gnokii-logo.c'; then $(CYGPATH_W) 'gnokii-logo.c'; else $(CYGPATH_W) '$(srcdir)/gnokii-logo.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/gnokii-gnokii-logo.Tpo $(DEPDIR)/gnokii-gnokii-logo.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnokii-logo.c' object='gnokii-gnokii-logo.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -c -o gnokii-gnokii-logo.obj `if test -f 'gnokii-logo.c'; then $(CYGPATH_W) 'gnokii-logo.c'; else $(CYGPATH_W) '$(srcdir)/gnokii-logo.c'; fi` gnokii-gnokii-mms.o: gnokii-mms.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -MT gnokii-gnokii-mms.o -MD -MP -MF $(DEPDIR)/gnokii-gnokii-mms.Tpo -c -o gnokii-gnokii-mms.o `test -f 'gnokii-mms.c' || echo '$(srcdir)/'`gnokii-mms.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/gnokii-gnokii-mms.Tpo $(DEPDIR)/gnokii-gnokii-mms.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnokii-mms.c' object='gnokii-gnokii-mms.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -c -o gnokii-gnokii-mms.o `test -f 'gnokii-mms.c' || echo '$(srcdir)/'`gnokii-mms.c gnokii-gnokii-mms.obj: gnokii-mms.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -MT gnokii-gnokii-mms.obj -MD -MP -MF $(DEPDIR)/gnokii-gnokii-mms.Tpo -c -o gnokii-gnokii-mms.obj `if test -f 'gnokii-mms.c'; then $(CYGPATH_W) 'gnokii-mms.c'; else $(CYGPATH_W) '$(srcdir)/gnokii-mms.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/gnokii-gnokii-mms.Tpo $(DEPDIR)/gnokii-gnokii-mms.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnokii-mms.c' object='gnokii-gnokii-mms.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -c -o gnokii-gnokii-mms.obj `if test -f 'gnokii-mms.c'; then $(CYGPATH_W) 'gnokii-mms.c'; else $(CYGPATH_W) '$(srcdir)/gnokii-mms.c'; fi` gnokii-gnokii-monitor.o: gnokii-monitor.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -MT gnokii-gnokii-monitor.o -MD -MP -MF $(DEPDIR)/gnokii-gnokii-monitor.Tpo -c -o gnokii-gnokii-monitor.o `test -f 'gnokii-monitor.c' || echo '$(srcdir)/'`gnokii-monitor.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/gnokii-gnokii-monitor.Tpo $(DEPDIR)/gnokii-gnokii-monitor.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnokii-monitor.c' object='gnokii-gnokii-monitor.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -c -o gnokii-gnokii-monitor.o `test -f 'gnokii-monitor.c' || echo '$(srcdir)/'`gnokii-monitor.c gnokii-gnokii-monitor.obj: gnokii-monitor.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -MT gnokii-gnokii-monitor.obj -MD -MP -MF $(DEPDIR)/gnokii-gnokii-monitor.Tpo -c -o gnokii-gnokii-monitor.obj `if test -f 'gnokii-monitor.c'; then $(CYGPATH_W) 'gnokii-monitor.c'; else $(CYGPATH_W) '$(srcdir)/gnokii-monitor.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/gnokii-gnokii-monitor.Tpo $(DEPDIR)/gnokii-gnokii-monitor.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnokii-monitor.c' object='gnokii-gnokii-monitor.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -c -o gnokii-gnokii-monitor.obj `if test -f 'gnokii-monitor.c'; then $(CYGPATH_W) 'gnokii-monitor.c'; else $(CYGPATH_W) '$(srcdir)/gnokii-monitor.c'; fi` gnokii-gnokii-other.o: gnokii-other.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -MT gnokii-gnokii-other.o -MD -MP -MF $(DEPDIR)/gnokii-gnokii-other.Tpo -c -o gnokii-gnokii-other.o `test -f 'gnokii-other.c' || echo '$(srcdir)/'`gnokii-other.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/gnokii-gnokii-other.Tpo $(DEPDIR)/gnokii-gnokii-other.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnokii-other.c' object='gnokii-gnokii-other.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -c -o gnokii-gnokii-other.o `test -f 'gnokii-other.c' || echo '$(srcdir)/'`gnokii-other.c gnokii-gnokii-other.obj: gnokii-other.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -MT gnokii-gnokii-other.obj -MD -MP -MF $(DEPDIR)/gnokii-gnokii-other.Tpo -c -o gnokii-gnokii-other.obj `if test -f 'gnokii-other.c'; then $(CYGPATH_W) 'gnokii-other.c'; else $(CYGPATH_W) '$(srcdir)/gnokii-other.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/gnokii-gnokii-other.Tpo $(DEPDIR)/gnokii-gnokii-other.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnokii-other.c' object='gnokii-gnokii-other.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -c -o gnokii-gnokii-other.obj `if test -f 'gnokii-other.c'; then $(CYGPATH_W) 'gnokii-other.c'; else $(CYGPATH_W) '$(srcdir)/gnokii-other.c'; fi` gnokii-gnokii-phonebook.o: gnokii-phonebook.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -MT gnokii-gnokii-phonebook.o -MD -MP -MF $(DEPDIR)/gnokii-gnokii-phonebook.Tpo -c -o gnokii-gnokii-phonebook.o `test -f 'gnokii-phonebook.c' || echo '$(srcdir)/'`gnokii-phonebook.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/gnokii-gnokii-phonebook.Tpo $(DEPDIR)/gnokii-gnokii-phonebook.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnokii-phonebook.c' object='gnokii-gnokii-phonebook.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -c -o gnokii-gnokii-phonebook.o `test -f 'gnokii-phonebook.c' || echo '$(srcdir)/'`gnokii-phonebook.c gnokii-gnokii-phonebook.obj: gnokii-phonebook.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -MT gnokii-gnokii-phonebook.obj -MD -MP -MF $(DEPDIR)/gnokii-gnokii-phonebook.Tpo -c -o gnokii-gnokii-phonebook.obj `if test -f 'gnokii-phonebook.c'; then $(CYGPATH_W) 'gnokii-phonebook.c'; else $(CYGPATH_W) '$(srcdir)/gnokii-phonebook.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/gnokii-gnokii-phonebook.Tpo $(DEPDIR)/gnokii-gnokii-phonebook.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnokii-phonebook.c' object='gnokii-gnokii-phonebook.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -c -o gnokii-gnokii-phonebook.obj `if test -f 'gnokii-phonebook.c'; then $(CYGPATH_W) 'gnokii-phonebook.c'; else $(CYGPATH_W) '$(srcdir)/gnokii-phonebook.c'; fi` gnokii-gnokii-profile.o: gnokii-profile.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -MT gnokii-gnokii-profile.o -MD -MP -MF $(DEPDIR)/gnokii-gnokii-profile.Tpo -c -o gnokii-gnokii-profile.o `test -f 'gnokii-profile.c' || echo '$(srcdir)/'`gnokii-profile.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/gnokii-gnokii-profile.Tpo $(DEPDIR)/gnokii-gnokii-profile.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnokii-profile.c' object='gnokii-gnokii-profile.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -c -o gnokii-gnokii-profile.o `test -f 'gnokii-profile.c' || echo '$(srcdir)/'`gnokii-profile.c gnokii-gnokii-profile.obj: gnokii-profile.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -MT gnokii-gnokii-profile.obj -MD -MP -MF $(DEPDIR)/gnokii-gnokii-profile.Tpo -c -o gnokii-gnokii-profile.obj `if test -f 'gnokii-profile.c'; then $(CYGPATH_W) 'gnokii-profile.c'; else $(CYGPATH_W) '$(srcdir)/gnokii-profile.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/gnokii-gnokii-profile.Tpo $(DEPDIR)/gnokii-gnokii-profile.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnokii-profile.c' object='gnokii-gnokii-profile.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -c -o gnokii-gnokii-profile.obj `if test -f 'gnokii-profile.c'; then $(CYGPATH_W) 'gnokii-profile.c'; else $(CYGPATH_W) '$(srcdir)/gnokii-profile.c'; fi` gnokii-gnokii-ringtone.o: gnokii-ringtone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -MT gnokii-gnokii-ringtone.o -MD -MP -MF $(DEPDIR)/gnokii-gnokii-ringtone.Tpo -c -o gnokii-gnokii-ringtone.o `test -f 'gnokii-ringtone.c' || echo '$(srcdir)/'`gnokii-ringtone.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/gnokii-gnokii-ringtone.Tpo $(DEPDIR)/gnokii-gnokii-ringtone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnokii-ringtone.c' object='gnokii-gnokii-ringtone.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -c -o gnokii-gnokii-ringtone.o `test -f 'gnokii-ringtone.c' || echo '$(srcdir)/'`gnokii-ringtone.c gnokii-gnokii-ringtone.obj: gnokii-ringtone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -MT gnokii-gnokii-ringtone.obj -MD -MP -MF $(DEPDIR)/gnokii-gnokii-ringtone.Tpo -c -o gnokii-gnokii-ringtone.obj `if test -f 'gnokii-ringtone.c'; then $(CYGPATH_W) 'gnokii-ringtone.c'; else $(CYGPATH_W) '$(srcdir)/gnokii-ringtone.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/gnokii-gnokii-ringtone.Tpo $(DEPDIR)/gnokii-gnokii-ringtone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnokii-ringtone.c' object='gnokii-gnokii-ringtone.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -c -o gnokii-gnokii-ringtone.obj `if test -f 'gnokii-ringtone.c'; then $(CYGPATH_W) 'gnokii-ringtone.c'; else $(CYGPATH_W) '$(srcdir)/gnokii-ringtone.c'; fi` gnokii-gnokii-security.o: gnokii-security.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -MT gnokii-gnokii-security.o -MD -MP -MF $(DEPDIR)/gnokii-gnokii-security.Tpo -c -o gnokii-gnokii-security.o `test -f 'gnokii-security.c' || echo '$(srcdir)/'`gnokii-security.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/gnokii-gnokii-security.Tpo $(DEPDIR)/gnokii-gnokii-security.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnokii-security.c' object='gnokii-gnokii-security.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -c -o gnokii-gnokii-security.o `test -f 'gnokii-security.c' || echo '$(srcdir)/'`gnokii-security.c gnokii-gnokii-security.obj: gnokii-security.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -MT gnokii-gnokii-security.obj -MD -MP -MF $(DEPDIR)/gnokii-gnokii-security.Tpo -c -o gnokii-gnokii-security.obj `if test -f 'gnokii-security.c'; then $(CYGPATH_W) 'gnokii-security.c'; else $(CYGPATH_W) '$(srcdir)/gnokii-security.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/gnokii-gnokii-security.Tpo $(DEPDIR)/gnokii-gnokii-security.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnokii-security.c' object='gnokii-gnokii-security.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -c -o gnokii-gnokii-security.obj `if test -f 'gnokii-security.c'; then $(CYGPATH_W) 'gnokii-security.c'; else $(CYGPATH_W) '$(srcdir)/gnokii-security.c'; fi` gnokii-gnokii-settings.o: gnokii-settings.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -MT gnokii-gnokii-settings.o -MD -MP -MF $(DEPDIR)/gnokii-gnokii-settings.Tpo -c -o gnokii-gnokii-settings.o `test -f 'gnokii-settings.c' || echo '$(srcdir)/'`gnokii-settings.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/gnokii-gnokii-settings.Tpo $(DEPDIR)/gnokii-gnokii-settings.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnokii-settings.c' object='gnokii-gnokii-settings.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -c -o gnokii-gnokii-settings.o `test -f 'gnokii-settings.c' || echo '$(srcdir)/'`gnokii-settings.c gnokii-gnokii-settings.obj: gnokii-settings.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -MT gnokii-gnokii-settings.obj -MD -MP -MF $(DEPDIR)/gnokii-gnokii-settings.Tpo -c -o gnokii-gnokii-settings.obj `if test -f 'gnokii-settings.c'; then $(CYGPATH_W) 'gnokii-settings.c'; else $(CYGPATH_W) '$(srcdir)/gnokii-settings.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/gnokii-gnokii-settings.Tpo $(DEPDIR)/gnokii-gnokii-settings.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnokii-settings.c' object='gnokii-gnokii-settings.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -c -o gnokii-gnokii-settings.obj `if test -f 'gnokii-settings.c'; then $(CYGPATH_W) 'gnokii-settings.c'; else $(CYGPATH_W) '$(srcdir)/gnokii-settings.c'; fi` gnokii-gnokii-sms.o: gnokii-sms.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -MT gnokii-gnokii-sms.o -MD -MP -MF $(DEPDIR)/gnokii-gnokii-sms.Tpo -c -o gnokii-gnokii-sms.o `test -f 'gnokii-sms.c' || echo '$(srcdir)/'`gnokii-sms.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/gnokii-gnokii-sms.Tpo $(DEPDIR)/gnokii-gnokii-sms.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnokii-sms.c' object='gnokii-gnokii-sms.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -c -o gnokii-gnokii-sms.o `test -f 'gnokii-sms.c' || echo '$(srcdir)/'`gnokii-sms.c gnokii-gnokii-sms.obj: gnokii-sms.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -MT gnokii-gnokii-sms.obj -MD -MP -MF $(DEPDIR)/gnokii-gnokii-sms.Tpo -c -o gnokii-gnokii-sms.obj `if test -f 'gnokii-sms.c'; then $(CYGPATH_W) 'gnokii-sms.c'; else $(CYGPATH_W) '$(srcdir)/gnokii-sms.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/gnokii-gnokii-sms.Tpo $(DEPDIR)/gnokii-gnokii-sms.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnokii-sms.c' object='gnokii-gnokii-sms.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -c -o gnokii-gnokii-sms.obj `if test -f 'gnokii-sms.c'; then $(CYGPATH_W) 'gnokii-sms.c'; else $(CYGPATH_W) '$(srcdir)/gnokii-sms.c'; fi` gnokii-gnokii-todo.o: gnokii-todo.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -MT gnokii-gnokii-todo.o -MD -MP -MF $(DEPDIR)/gnokii-gnokii-todo.Tpo -c -o gnokii-gnokii-todo.o `test -f 'gnokii-todo.c' || echo '$(srcdir)/'`gnokii-todo.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/gnokii-gnokii-todo.Tpo $(DEPDIR)/gnokii-gnokii-todo.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnokii-todo.c' object='gnokii-gnokii-todo.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -c -o gnokii-gnokii-todo.o `test -f 'gnokii-todo.c' || echo '$(srcdir)/'`gnokii-todo.c gnokii-gnokii-todo.obj: gnokii-todo.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -MT gnokii-gnokii-todo.obj -MD -MP -MF $(DEPDIR)/gnokii-gnokii-todo.Tpo -c -o gnokii-gnokii-todo.obj `if test -f 'gnokii-todo.c'; then $(CYGPATH_W) 'gnokii-todo.c'; else $(CYGPATH_W) '$(srcdir)/gnokii-todo.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/gnokii-gnokii-todo.Tpo $(DEPDIR)/gnokii-gnokii-todo.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnokii-todo.c' object='gnokii-gnokii-todo.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -c -o gnokii-gnokii-todo.obj `if test -f 'gnokii-todo.c'; then $(CYGPATH_W) 'gnokii-todo.c'; else $(CYGPATH_W) '$(srcdir)/gnokii-todo.c'; fi` gnokii-gnokii-utils.o: gnokii-utils.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -MT gnokii-gnokii-utils.o -MD -MP -MF $(DEPDIR)/gnokii-gnokii-utils.Tpo -c -o gnokii-gnokii-utils.o `test -f 'gnokii-utils.c' || echo '$(srcdir)/'`gnokii-utils.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/gnokii-gnokii-utils.Tpo $(DEPDIR)/gnokii-gnokii-utils.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnokii-utils.c' object='gnokii-gnokii-utils.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -c -o gnokii-gnokii-utils.o `test -f 'gnokii-utils.c' || echo '$(srcdir)/'`gnokii-utils.c gnokii-gnokii-utils.obj: gnokii-utils.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -MT gnokii-gnokii-utils.obj -MD -MP -MF $(DEPDIR)/gnokii-gnokii-utils.Tpo -c -o gnokii-gnokii-utils.obj `if test -f 'gnokii-utils.c'; then $(CYGPATH_W) 'gnokii-utils.c'; else $(CYGPATH_W) '$(srcdir)/gnokii-utils.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/gnokii-gnokii-utils.Tpo $(DEPDIR)/gnokii-gnokii-utils.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnokii-utils.c' object='gnokii-gnokii-utils.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -c -o gnokii-gnokii-utils.obj `if test -f 'gnokii-utils.c'; then $(CYGPATH_W) 'gnokii-utils.c'; else $(CYGPATH_W) '$(srcdir)/gnokii-utils.c'; fi` gnokii-gnokii-wap.o: gnokii-wap.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -MT gnokii-gnokii-wap.o -MD -MP -MF $(DEPDIR)/gnokii-gnokii-wap.Tpo -c -o gnokii-gnokii-wap.o `test -f 'gnokii-wap.c' || echo '$(srcdir)/'`gnokii-wap.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/gnokii-gnokii-wap.Tpo $(DEPDIR)/gnokii-gnokii-wap.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnokii-wap.c' object='gnokii-gnokii-wap.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -c -o gnokii-gnokii-wap.o `test -f 'gnokii-wap.c' || echo '$(srcdir)/'`gnokii-wap.c gnokii-gnokii-wap.obj: gnokii-wap.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -MT gnokii-gnokii-wap.obj -MD -MP -MF $(DEPDIR)/gnokii-gnokii-wap.Tpo -c -o gnokii-gnokii-wap.obj `if test -f 'gnokii-wap.c'; then $(CYGPATH_W) 'gnokii-wap.c'; else $(CYGPATH_W) '$(srcdir)/gnokii-wap.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/gnokii-gnokii-wap.Tpo $(DEPDIR)/gnokii-gnokii-wap.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnokii-wap.c' object='gnokii-gnokii-wap.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokii_CFLAGS) $(CFLAGS) -c -o gnokii-gnokii-wap.obj `if test -f 'gnokii-wap.c'; then $(CYGPATH_W) 'gnokii-wap.c'; else $(CYGPATH_W) '$(srcdir)/gnokii-wap.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: 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-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-binPROGRAMS #endif # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gnokii-0.6.31/gnokii/gnokii-utils.c0000644000175000017500000001403211666163120015245 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 1999-2000 Gary Reuter, Reinhold Jordan Copyright (C) 1999-2011 Pawel Kot Copyright (C) 2000-2002 Marcin Wiacek, Chris Kemp, Manfred Jonsson Copyright (C) 2001 Marian Jancar, Bartek Klepacz Copyright (C) 2001-2002 Pavel Machek, Markus Plail Copyright (C) 2002 Ladis Michl, Simon Huggins Copyright (C) 2002-2004 BORBELY Zoltan Copyright (C) 2003 Bertrik Sikken Copyright (C) 2004 Martin Goldhahn Mainline code for gnokii utility. Utils functions. */ #include "config.h" #include "misc.h" #include "compat.h" #include #include #ifdef HAVE_SYS_STAT_H # include #endif #include "gnokii-app.h" #include "gnokii.h" int askoverwrite(const char *filename, int mode) { int confirm = -1; char ans[5]; struct stat buf; /* Ask before overwriting */ if ((mode == 1) && (stat(filename, &buf) == 0)) { fprintf(stdout, _("File %s exists.\n"), filename); while (confirm < 0) { fprintf(stdout, _("Overwrite? (yes/no) ")); gn_line_get(stdin, ans, sizeof(ans) - 1); if (!strcmp(ans, _("yes"))) confirm = 1; else if (!strcmp(ans, _("no"))) confirm = 0; } if (!confirm) return -1; } return mode; } /* FIXME - this should not ask for confirmation here - I'm not sure what calls it though */ /* mode == 0 -> overwrite * mode == 1 -> ask * mode == 2 -> append */ int writefile(char *filename, char *text, int mode) { FILE *file; mode = askoverwrite(filename, mode); /* append */ if (mode == 2) file = fopen(filename, "a"); /* overwrite */ else file = fopen(filename, "w"); if (!file) { fprintf(stderr, _("Can't open file %s for writing!\n"), filename); return -1; } fprintf(file, "%s\n", text); fclose(file); /* Return value is used as new mode. Set it to append mode */ return 2; } int writebuffer(const char *filename, const char *buffer, size_t nitems, int mode) { /* Return value is used as new mode. Set it to append mode */ int retval = 2; FILE *file; mode = askoverwrite(filename, mode); /* append */ if (mode == 2) file = fopen(filename, "a"); /* overwrite */ else file = fopen(filename, "w"); if (!file) { fprintf(stderr, _("Can't open file %s for writing!\n"), filename); retval = -1; goto out; } if (fwrite(buffer, 1, nitems, file) != nitems) retval = -1; fclose(file); out: return retval; } gn_error readtext(gn_sms_user_data *udata) { /* The maximum length of an uncompressed concatenated short message is 255 * 153 = 39015 default alphabet characters */ char message_buffer[255 * GN_SMS_MAX_LENGTH]; int chars_read; #ifndef WIN32 if (isatty(0)) #endif fprintf(stderr, _("Please enter SMS text. End your input with :\n")); /* Get message text from stdin. */ chars_read = fread(message_buffer, 1, sizeof(message_buffer), stdin); if (chars_read == 0) { fprintf(stderr, _("Couldn't read from stdin!\n")); return GN_ERR_INTERNALERROR; } if (udata->type != GN_SMS_DATA_iMelody && chars_read > 0 && message_buffer[chars_read - 1] == '\n') message_buffer[--chars_read] = 0; if (chars_read > (sizeof(udata->u.text) - 1)) { fprintf(stderr, _("Input too long! (%d, maximum is %d)\n"), chars_read, (int)(sizeof(udata->u.text) - 1)); return GN_ERR_INTERNALERROR; } udata->length = snprintf(udata->u.text, sizeof(udata->u.text), "%s", message_buffer); return GN_ERR_NONE; } gn_error loadbitmap(gn_bmp *bitmap, char *s, int type, struct gn_statemachine *state) { gn_error error; bitmap->type = type; error = gn_bmp_null(bitmap, &state->driver.phone); if (error != GN_ERR_NONE) { fprintf(stderr, _("Could not null bitmap: %s\n"), gn_error_print(error)); return error; } error = gn_file_bitmap_read(s, bitmap, &state->driver.phone); if (error != GN_ERR_NONE) { fprintf(stderr, _("Could not load bitmap from %s: %s\n"), s, gn_error_print(error)); return error; } return GN_ERR_NONE; } /* * Does almost the same as atoi(). * Returns error in case when the string is not numerical or when strtol returns an error. * Modifies errno variable. */ int gnokii_atoi(char *string) { char *aux = NULL; int num; errno = 0; num = strtol(string, &aux, 10); if (*aux) errno = ERANGE; return num; } /* Calculates end value from the command line of the form: * gnokii --something [...] start [end] * where end can be either number or 'end' string. * If end is less than start, it is set to start value. */ int parse_end_value_option(int argc, char *argv[], int pos, int start_value) { int retval = start_value; if (argc > pos && (argv[pos][0] != '-')) { if (!strcasecmp(argv[pos], "end")) retval = INT_MAX; else retval = gnokii_atoi(argv[pos]); } if (retval < start_value) { fprintf(stderr, _("Warning: end value (%d) is less than start value (%d). Setting it to the start value (%d)\n"), retval, start_value, start_value); retval = start_value; } return retval; } volatile bool bshutdown = false; /* SIGINT signal handler. */ void interrupted(int sig) { signal(sig, SIG_IGN); bshutdown = true; } void console_raw(void) { #ifndef WIN32 struct termios it; tcgetattr(fileno(stdin), &it); it.c_lflag &= ~(ICANON); //it.c_iflag &= ~(INPCK|ISTRIP|IXON); it.c_cc[VMIN] = 1; it.c_cc[VTIME] = 0; tcsetattr(fileno(stdin), TCSANOW, &it); #endif } gnokii-0.6.31/gnokii/gnokii-wap.c0000644000175000017500000002507111666163120014701 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 1999-2000 Gary Reuter, Reinhold Jordan Copyright (C) 1999-2006 Pawel Kot Copyright (C) 2000-2002 Marcin Wiacek, Chris Kemp, Manfred Jonsson Copyright (C) 2001 Marian Jancar, Bartek Klepacz Copyright (C) 2001-2002 Pavel Machek, Markus Plail Copyright (C) 2002 Ladis Michl, Simon Huggins Copyright (C) 2002-2004 BORBELY Zoltan Copyright (C) 2003 Bertrik Sikken Copyright (C) 2004 Martin Goldhahn Mainline code for gnokii utility. WAP handling functions. */ #include "config.h" #include "misc.h" #include "compat.h" #include #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #include #include "gnokii-app.h" #include "gnokii.h" void wap_usage(FILE *f) { fprintf(f, _("WAP options:\n" " --getwapbookmark number\n" " --writewapbookmark name URL\n" " --deletewapbookmark number\n" " --getwapsetting number [-r|--raw]\n" " --writewapsetting\n" " --activatewapsetting number\n" )); } int getwapbookmark_usage(FILE *f, int exitval) { fprintf(f, _(" usage: --getwapbookmark number\n")); return exitval; } /* Getting WAP bookmarks. */ gn_error getwapbookmark(char *number, gn_data *data, struct gn_statemachine *state) { gn_wap_bookmark wapbookmark; gn_error error; wapbookmark.location = gnokii_atoi(number); if (errno || wapbookmark.location < 0) return getwapbookmark_usage(stderr, -1); gn_data_clear(data); data->wap_bookmark = &wapbookmark; error = gn_sm_functions(GN_OP_GetWAPBookmark, data, state); switch (error) { case GN_ERR_NONE: fprintf(stdout, _("WAP bookmark nr. %d:\n"), wapbookmark.location); fprintf(stdout, _("%s: %s\n"), _("Name"), wapbookmark.name); fprintf(stdout, _("%s: %s\n"), _("URL"), wapbookmark.URL); break; default: fprintf(stderr, _("Error: %s\n"), gn_error_print(error)); break; } return error; } int writewapbookmark_usage(FILE *f, int exitval) { fprintf(f, _(" usage: --writebookmark name URL\n")); return exitval; } /* Writing WAP bookmarks. */ gn_error writewapbookmark(int argc, char *argv[], gn_data *data, struct gn_statemachine *state) { gn_wap_bookmark wapbookmark; gn_error error; gn_data_clear(data); data->wap_bookmark = &wapbookmark; if (argc != optind + 1) return writewapbookmark_usage(stderr, -1); snprintf(&wapbookmark.name[0], WAP_NAME_MAX_LENGTH, "%s", optarg); snprintf(&wapbookmark.URL[0], WAP_URL_MAX_LENGTH, "%s", argv[optind]); error = gn_sm_functions(GN_OP_WriteWAPBookmark, data, state); switch (error) { case GN_ERR_NONE: fprintf(stderr, _("WAP bookmark nr. %d successfully written!\n"), wapbookmark.location); break; default: fprintf(stderr, _("Error: %s\n"), gn_error_print(error)); break; } return error; } int deletewapbookmark_usage(FILE *f, int exitval) { fprintf(f, _(" usage: --deletewapbookmark number\n")); return exitval; } /* Deleting WAP bookmarks. */ gn_error deletewapbookmark(char *number, gn_data *data, struct gn_statemachine *state) { gn_wap_bookmark wapbookmark; gn_error error; wapbookmark.location = gnokii_atoi(number); if (errno || wapbookmark.location < 0) return deletewapbookmark_usage(stderr, -1); gn_data_clear(data); data->wap_bookmark = &wapbookmark; error = gn_sm_functions(GN_OP_DeleteWAPBookmark, data, state); switch (error) { case GN_ERR_NONE: fprintf(stderr, _("WAP bookmark nr. %d deleted!\n"), wapbookmark.location); break; default: fprintf(stderr, _("Error: %s\n"), gn_error_print(error)); break; } return error; } int getwapsetting_usage(FILE *f, int exitval) { fprintf(f, _(" usage: --getwapsetting number [-r|--raw]\n")); return exitval; } /* Getting WAP settings. */ gn_error getwapsetting(int argc, char *argv[], gn_data *data, struct gn_statemachine *state) { gn_wap_setting wapsetting; gn_error error; bool raw = false; int i; struct option options[] = { { "raw", no_argument, NULL, 'r'}, { NULL, 0, NULL, 0} }; memset(&wapsetting, 0, sizeof(wapsetting)); wapsetting.location = gnokii_atoi(optarg); if (errno || wapsetting.location < 0) return getwapsetting_usage(stderr, -1); while ((i = getopt_long(argc, argv, "r", options, NULL)) != -1) { switch (i) { case 'r': raw = true; break; default: return getwapsetting_usage(stderr, -1); } } gn_data_clear(data); data->wap_setting = &wapsetting; error = gn_sm_functions(GN_OP_GetWAPSetting, data, state); switch (error) { case GN_ERR_NONE: if (raw) { fprintf(stdout, ("%i;%s;%s;%i;%i;%i;%i;%i;%i;%i;%s;%s;%s;%s;%i;%i;%i;%s;%s;%s;%s;%s;%s;\n"), wapsetting.location, wapsetting.name, wapsetting.home, wapsetting.session, wapsetting.security, wapsetting.bearer, wapsetting.gsm_data_authentication, wapsetting.call_type, wapsetting.call_speed, wapsetting.gsm_data_login, wapsetting.gsm_data_ip, wapsetting.number, wapsetting.gsm_data_username, wapsetting.gsm_data_password, wapsetting.gprs_connection, wapsetting.gprs_authentication, wapsetting.gprs_login, wapsetting.access_point_name, wapsetting.gprs_ip, wapsetting.gprs_username, wapsetting.gprs_password, wapsetting.sms_service_number, wapsetting.sms_server_number); } else { fprintf(stdout, _("WAP bookmark nr. %d:\n"), wapsetting.location); fprintf(stdout, _("%s: %s\n"), _("Name"), wapsetting.name); fprintf(stdout, _("%s: %s\n"), _("Home"), wapsetting.home); fprintf(stdout, _("%s: %s\n"), _("Session mode"), gn_wap_session2str(wapsetting.session)); fprintf(stdout, _("%s: %s\n"), _("Connection security"), (wapsetting.security ? _("yes") : _("no"))); fprintf(stdout, _("%s: %s\n"), _("Data bearer"), gn_wap_bearer2str(wapsetting.bearer)); fprintf(stdout, "%s\n", _("GSM data")); fprintf(stdout, _(" %s: %s\n"), _("Authentication type"), gn_wap_authentication2str(wapsetting.security)); fprintf(stdout, _(" %s: %s\n"), _("Data call type"), gn_wap_call_type2str(wapsetting.call_type)); fprintf(stdout, _(" %s: %s\n"), _("Data call speed"), gn_wap_call_speed2str(wapsetting.call_speed)); fprintf(stdout, _(" %s: %s\n"), _("Login type"), gn_wap_login2str(wapsetting.gsm_data_login)); fprintf(stdout, _(" %s: %s\n"), _("IP"), wapsetting.gsm_data_ip); fprintf(stdout, _(" %s: %s\n"), _("Number"), wapsetting.number); fprintf(stdout, _(" %s: %s\n"), _("Username"), wapsetting.gsm_data_username); fprintf(stdout, _(" %s: %s\n"), _("Password"), wapsetting.gsm_data_password); fprintf(stdout, "%s\n", _("GPRS")); fprintf(stdout, _(" %s: %s\n"), _("Connection"), gn_wap_gprs2str(wapsetting.gprs_connection)); fprintf(stdout, _(" %s: %s\n"), _("Authentication type"), gn_wap_authentication2str(wapsetting.gprs_authentication)); fprintf(stdout, _(" %s: %s\n"), _("Login type"), gn_wap_login2str(wapsetting.gprs_login)); fprintf(stdout, _(" %s: %s\n"), _("Access point"), wapsetting.access_point_name); fprintf(stdout, _(" %s: %s\n"), _("IP"), wapsetting.gprs_ip); fprintf(stdout, _(" %s: %s\n"), _("Username"), wapsetting.gprs_username); fprintf(stdout, _(" %s: %s\n"), _("Password"), wapsetting.gprs_password); fprintf(stdout, "%s\n", _("SMS")); fprintf(stdout, _(" %s: %s\n"), _("Service number"), wapsetting.sms_service_number); fprintf(stdout, _(" %s: %s\n"), _("Server number"), wapsetting.sms_server_number); } break; default: fprintf(stderr, _("Error: %s\n"), gn_error_print(error)); break; } return error; } /* Writes WAP settings to phone */ gn_error writewapsetting(gn_data *data, struct gn_statemachine *state) { int n; gn_wap_setting wapsetting; gn_error error = GN_ERR_NONE; char line[1000]; gn_data_clear(data); data->wap_setting = &wapsetting; while (fgets(line, sizeof(line), stdin)) { n = strlen(line); if (n > 0 && line[n-1] == '\n') { line[--n] = 0; } n = sscanf(line, "%d;%50[^;];%256[^;];%d;%d;%d;%d;%d;%d;%d;%50[^;];%50[^;];%32[^;];%20[^;];%d;%d;%d;%100[^;];%20[^;];%32[^;];%20[^;];%20[^;];%20[^;];", /* n = sscanf(line, "%d;%s;%s;%d;%d;%d;%d;%d;%d;%d;%s;%s;%s;%s;%d;%d;%d;%s;%s;%s;%s;%s;%s;", */ &wapsetting.location, wapsetting.name, wapsetting.home, (int*)&wapsetting.session, (int*)&wapsetting.security, (int*)&wapsetting.bearer, (int*)&wapsetting.gsm_data_authentication, (int*)&wapsetting.call_type, (int*)&wapsetting.call_speed, (int*)&wapsetting.gsm_data_login, wapsetting.gsm_data_ip, wapsetting.number, wapsetting.gsm_data_username, wapsetting.gsm_data_password, (int*)&wapsetting.gprs_connection, (int*)&wapsetting.gprs_authentication, (int*)&wapsetting.gprs_login, wapsetting.access_point_name, wapsetting.gprs_ip, wapsetting.gprs_username, wapsetting.gprs_password, wapsetting.sms_service_number, wapsetting.sms_server_number); if (n != 23) { fprintf(stderr, _("Input line format isn't valid\n")); dprintf("n: %i\n", n); return GN_ERR_WRONGDATAFORMAT; } error = gn_sm_functions(GN_OP_WriteWAPSetting, data, state); if (error != GN_ERR_NONE) fprintf(stderr, _("Cannot write WAP setting: %s\n"), gn_error_print(error)); } return error; } int activatewapsetting_usage(FILE *f, int exitval) { fprintf(f, _(" usage: --activatewapsetting number\n")); return exitval; } /* Deleting WAP bookmarks. */ gn_error activatewapsetting(char *number, gn_data *data, struct gn_statemachine *state) { gn_wap_setting wapsetting; gn_error error; wapsetting.location = gnokii_atoi(number); if (errno || wapsetting.location < 0) return activatewapsetting_usage(stderr, -1); gn_data_clear(data); data->wap_setting = &wapsetting; error = gn_sm_functions(GN_OP_ActivateWAPSetting, data, state); switch (error) { case GN_ERR_NONE: fprintf(stderr, _("WAP setting nr. %d activated!\n"), wapsetting.location); break; default: fprintf(stderr, _("Error: %s\n"), gn_error_print(error)); break; } return error; } gnokii-0.6.31/gnokii/gnokii-ringtone.c0000644000175000017500000003366011666163120015742 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 1999-2000 Gary Reuter, Reinhold Jordan Copyright (C) 1999-2006 Pawel Kot Copyright (C) 2000-2002 Marcin Wiacek, Chris Kemp, Manfred Jonsson Copyright (C) 2001 Marian Jancar, Bartek Klepacz Copyright (C) 2001-2002 Pavel Machek, Markus Plail Copyright (C) 2002 Ladis Michl, Simon Huggins Copyright (C) 2002-2004 BORBELY Zoltan Copyright (C) 2003 Bertrik Sikken Copyright (C) 2004 Martin Goldhahn Mainline code for gnokii utility. Ringtone handling functions. */ #include "config.h" #include "misc.h" #include "compat.h" #include #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #include #include #include "gnokii-app.h" #include "gnokii.h" static gn_ringtone_list ringtone_list; static int ringtone_list_initialised = 0; static void init_ringtone_list(gn_data *data, struct gn_statemachine *state) { gn_error error; if (ringtone_list_initialised) return; memset(&ringtone_list, 0, sizeof(ringtone_list)); data->ringtone_list = &ringtone_list; error = gn_sm_functions(GN_OP_GetRingtoneList, data, state); data->ringtone_list = NULL; if (error != GN_ERR_NONE) { ringtone_list.count = 0; ringtone_list.userdef_location = 0; ringtone_list.userdef_count = 0; ringtone_list_initialised = -1; } else ringtone_list_initialised = 1; } char *get_ringtone_name(int id, gn_data *data, struct gn_statemachine *state) { int i; init_ringtone_list(data, state); for (i = 0; i < ringtone_list.count; i++) { if (ringtone_list.ringtone[i].location == id) return ringtone_list.ringtone[i].name; } return _("Unknown"); } void ringtone_usage(FILE *f) { fprintf(f, _( "Ringtone options:\n" " --sendringtone rtttlfile destination\n" " --getringtone rtttlfile [location] [-r|--raw]\n" " --setringtone rtttlfile [location] [-r|--raw] [--name name]\n" " --playringtone rtttlfile [--volume vol]\n" " --ringtoneconvert source destination\n" " --getringtonelist\n" " --deleteringtone start [end]\n" )); } gn_error sendringtone(int argc, char *argv[], gn_data *data, struct gn_statemachine *state) { gn_sms sms; gn_error error = GN_ERR_NOTSUPPORTED; gn_sms_default_submit(&sms); sms.user_data[0].type = GN_SMS_DATA_Ringtone; sms.user_data[1].type = GN_SMS_DATA_None; if ((error = gn_file_ringtone_read(optarg, &sms.user_data[0].u.ringtone))) { fprintf(stderr, _("Failed to load ringtone: %s\n"), gn_error_print(error)); return error; } /* The second argument is the destination, ie the phone number of recipient. */ snprintf(sms.remote.number, sizeof(sms.remote.number) - 1, "%s", argv[optind]); if (sms.remote.number[0] == '+') sms.remote.type = GN_GSM_NUMBER_International; else sms.remote.type = GN_GSM_NUMBER_Unknown; /* Get the SMS Center */ if (!sms.smsc.number[0]) { data->message_center = calloc(1, sizeof(gn_sms_message_center)); data->message_center->id = 1; if (gn_sm_functions(GN_OP_GetSMSCenter, data, state) == GN_ERR_NONE) { snprintf(sms.smsc.number, sizeof(sms.smsc.number), "%s", data->message_center->smsc.number); sms.smsc.type = data->message_center->smsc.type; } free(data->message_center); } if (!sms.smsc.type) sms.smsc.type = GN_GSM_NUMBER_Unknown; /* Send the message. */ data->sms = &sms; error = gn_sms_send(data, state); if (error == GN_ERR_NONE) { if (sms.parts > 1) { int j; fprintf(stderr, _("Message sent in %d parts with reference numbers:"), sms.parts); for (j = 0; j < sms.parts; j++) fprintf(stderr, " %d", sms.reference[j]); fprintf(stderr, "\n"); } else fprintf(stderr, _("Send succeeded with reference %d!\n"), sms.reference[0]); } else fprintf(stderr, _("SMS Send failed (%s)\n"), gn_error_print(error)); return error; } int getringtone_usage(FILE *f, int exitval) { fprintf(f, _(" usage: --getringtone rtttlfile [location] [-r|--raw]\n")); return exitval; } gn_error getringtone(int argc, char *argv[], gn_data *data, struct gn_statemachine *state) { gn_ringtone ringtone; gn_raw_data rawdata; gn_error error; unsigned char buff[512]; char *filename = optarg; int i; bool raw = false; struct option options[] = { { "raw", no_argument, NULL, 'r'}, { NULL, 0, NULL, 0} }; memset(&ringtone, 0, sizeof(ringtone)); rawdata.data = buff; rawdata.length = sizeof(buff); gn_data_clear(data); data->ringtone = &ringtone; data->raw_data = &rawdata; while ((i = getopt_long(argc, argv, "r", options, NULL)) != -1) { switch (i) { case 'r': raw = true; break; default: return getringtone_usage(stderr, -1); } } if (argc == optind) { /* There are 0 arguments that don't start with '-' */ init_ringtone_list(data, state); ringtone.location = ringtone_list.userdef_location; } else if (argc - optind == 1) { /* There is 1 argument that doesn't start with '-' */ ringtone.location = gnokii_atoi(argv[optind]); if (errno || ringtone.location < 0) return getringtone_usage(stderr, -1); } else { /* There are too many arguments that don't start with '-' */ return getringtone_usage(stderr, -1); } if (raw) error = gn_sm_functions(GN_OP_GetRawRingtone, data, state); else error = gn_sm_functions(GN_OP_GetRingtone, data, state); if (error != GN_ERR_NONE) { fprintf(stderr, _("Getting ringtone %d failed: %s\n"), ringtone.location, gn_error_print(error)); goto out; } fprintf(stderr, _("Getting ringtone %d (\"%s\") succeeded!\n"), ringtone.location, ringtone.name); if (!filename) { fprintf(stderr, _("Internal gnokii error: null filename\n")); error = GN_ERR_FAILED; goto out; } if (raw) { FILE *f; if ((f = fopen(filename, "wb")) == NULL) { fprintf(stderr, _("Failed to save ringtone.\n")); error = -1; goto out; } if (fwrite(rawdata.data, 1, rawdata.length, f) < 0) { fprintf(stderr, _("Failed to write ringtone.\n")); error = -1; } fclose(f); } else { if ((error = gn_file_ringtone_save(filename, &ringtone)) != GN_ERR_NONE) { fprintf(stderr, _("Failed to save ringtone: %s\n"), gn_error_print(error)); /* return */ } } out: return error; } int setringtone_usage(FILE *f, int exitval) { fprintf(f, _(" usage: --setringtone rtttlfile [location] [-r|--raw] [--name name]\n")); return exitval; } gn_error setringtone(int argc, char *argv[], gn_data *data, struct gn_statemachine *state) { gn_ringtone ringtone; gn_raw_data rawdata; gn_error error; unsigned char buff[512]; char *filename = optarg; int i, location; bool raw = false; char name[16] = ""; struct option options[] = { { "raw", no_argument, NULL, 'r'}, { "name", required_argument, NULL, 'n'}, { NULL, 0, NULL, 0} }; while ((i = getopt_long(argc, argv, "rn:", options, NULL)) != -1) { switch (i) { case 'r': raw = true; break; case 'n': snprintf(name, sizeof(name), "%s", optarg); break; default: return setringtone_usage(stderr, -1); } } if (argc - optind > 2) { /* There are too many arguments that don't start with '-' */ return setringtone_usage(stderr, -1); } memset(&ringtone, 0, sizeof(ringtone)); rawdata.data = buff; rawdata.length = sizeof(buff); gn_data_clear(data); data->ringtone = &ringtone; data->raw_data = &rawdata; errno = 0; location = (argc > optind + 1) ? gnokii_atoi(argv[optind + 1]) : -1; if (errno) return setringtone_usage(stderr, -1); if (!filename) { fprintf(stderr, _("Internal gnokii error: null filename\n")); return GN_ERR_FAILED; } if (raw) { FILE *f; if ((f = fopen(filename, "rb")) == NULL) { fprintf(stderr, _("Failed to load ringtone.\n")); return GN_ERR_FAILED; } rawdata.length = fread(rawdata.data, 1, rawdata.length, f); fclose(f); ringtone.location = location; if (*name) snprintf(ringtone.name, sizeof(ringtone.name), "%s", name); else snprintf(ringtone.name, sizeof(ringtone.name), "GNOKII"); error = gn_sm_functions(GN_OP_SetRawRingtone, data, state); } else { if ((error = gn_file_ringtone_read(filename, &ringtone))) { fprintf(stderr, _("Failed to load ringtone.\n")); return error; } ringtone.location = location; if (*name) snprintf(ringtone.name, sizeof(ringtone.name), "%s", name); error = gn_sm_functions(GN_OP_SetRingtone, data, state); } if (error == GN_ERR_NONE) fprintf(stderr, _("Send succeeded!\n")); else fprintf(stderr, _("Send failed: %s\n"), gn_error_print(error)); return error; } int playringtone_usage(FILE *f, int exitval) { fprintf(f, _(" usage: --playringtone rtttlfile [-v|--volume vol]\n")); return exitval; } gn_error playringtone(int argc, char *argv[], gn_data *data, struct gn_statemachine *state) { gn_ringtone ringtone; gn_tone tone; gn_error error; char *filename = optarg; int i, ulen; struct timeval dt; #if (defined HAVE_TIMEOPS) && (defined HAVE_GETTIMEOFDAY) struct timeval t1, t2; #endif int volume = 5; struct option options[] = { { "volume", required_argument, NULL, 'v'}, { NULL, 0, NULL, 0} }; while ((i = getopt_long(argc, argv, "v:", options, NULL)) != -1) { switch (i) { case 'v': volume = gnokii_atoi(optarg); if (errno || volume < 0) return playringtone_usage(stderr, -1); break; default: return playringtone_usage(stderr, -1); } } if (argc > optind) { /* There are too many arguments that don't start with '-' */ return playringtone_usage(stderr, -1); } memset(&ringtone, 0, sizeof(ringtone)); memset(&tone, 0, sizeof(tone)); gn_data_clear(data); data->ringtone = &ringtone; data->tone = &tone; if (!filename) { fprintf(stderr, _("Internal gnokii error: null filename\n")); return GN_ERR_FAILED; } if ((error = gn_file_ringtone_read(filename, &ringtone))) { fprintf(stderr, _("Failed to load ringtone: %s\n"), gn_error_print(error)); return error; } #if (defined HAVE_TIMEOPS) && (defined HAVE_GETTIMEOFDAY) gettimeofday(&t1, NULL); tone.frequency = 0; tone.volume = 0; gn_sm_functions(GN_OP_PlayTone, data, state); gettimeofday(&t2, NULL); timersub(&t2, &t1, &dt); #else dt.tv_sec = 0; dt.tv_usec = 20000; #endif signal(SIGINT, interrupted); for (i = 0; !bshutdown && i < ringtone.notes_count; i++) { tone.volume = volume; gn_ringtone_get_tone(&ringtone, i, &tone.frequency, &ulen); if ((error = gn_sm_functions(GN_OP_PlayTone, data, state)) != GN_ERR_NONE) break; if (ulen > 2 * dt.tv_usec + 20000) usleep(ulen - 2 * dt.tv_usec - 20000); tone.volume = 0; if ((error = gn_sm_functions(GN_OP_PlayTone, data, state)) != GN_ERR_NONE) break; usleep(20000); } tone.frequency = 0; tone.volume = 0; gn_sm_functions(GN_OP_PlayTone, data, state); if (error == GN_ERR_NONE) fprintf(stderr, _("Play succeeded!\n")); else fprintf(stderr, _("Play failed: %s\n"), gn_error_print(error)); return error; } int ringtoneconvert_usage(FILE *f, int exitval) { fprintf(f, _(" usage: --ringtoneconvert source destination\n")); return exitval; } gn_error ringtoneconvert(int argc, char *argv[]) { gn_ringtone ringtone; gn_error error; if (argc != optind + 1) { return ringtoneconvert_usage(stderr, -1); } if ((error = gn_file_ringtone_read(optarg, &ringtone)) != GN_ERR_NONE) { fprintf(stderr, _("Failed to load ringtone: %s\n"), gn_error_print(error)); return error; } if ((error = gn_file_ringtone_save(argv[optind], &ringtone)) != GN_ERR_NONE) { fprintf(stderr, _("Failed to save ringtone: %s\n"), gn_error_print(error)); return error; } fprintf(stderr, _("%d note(s) converted.\n"), ringtone.notes_count); return error; } gn_error getringtonelist(gn_data *data, struct gn_statemachine *state) { int i; init_ringtone_list(data, state); if (ringtone_list_initialised < 0) { fprintf(stderr, _("Failed to get the list of ringtones\n")); return GN_ERR_UNKNOWN; } printf(_("First user defined ringtone location: %3d\n"), ringtone_list.userdef_location); printf(_("Number of user defined ringtones: %d\n\n"), ringtone_list.userdef_count); printf(_("loc rwu name\n")); printf(_("===============================\n")); for (i = 0; i < ringtone_list.count; i++) { printf(_("%3d %d%d%d %-20s\n"), ringtone_list.ringtone[i].location, ringtone_list.ringtone[i].readable, ringtone_list.ringtone[i].writable, ringtone_list.ringtone[i].user_defined, ringtone_list.ringtone[i].name); } return GN_ERR_NONE; } int deleteringtone_usage(FILE *f, int exitval) { fprintf(f, _(" usage: --deleteringtone start [end]\n")); return exitval; } gn_error deleteringtone(int argc, char *argv[], gn_data *data, struct gn_statemachine *state) { gn_ringtone ringtone; gn_error error; int i, start, end; memset(&ringtone, 0, sizeof(ringtone)); gn_data_clear(data); data->ringtone = &ringtone; start = gnokii_atoi(optarg); if (errno || start < 0) return deleteringtone_usage(stderr, -1); end = parse_end_value_option(argc, argv, optind, start); if (errno || end < 0) return deleteringtone_usage(stderr, -1); for (i = start; i <= end; i++) { ringtone.location = i; if ((error = gn_sm_functions(GN_OP_DeleteRingtone, data, state)) == GN_ERR_NONE) fprintf(stderr, _("Ringtone %d deleted\n"), i); else fprintf(stderr, _("Failed to delete ringtone %d: %s\n"), i, gn_error_print(error)); } return GN_ERR_NONE; } gnokii-0.6.31/gnokii/gnokii-profile.c0000644000175000017500000002032011666163120015542 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 1999-2000 Gary Reuter, Reinhold Jordan Copyright (C) 1999-2006 Pawel Kot Copyright (C) 2000-2002 Marcin Wiacek, Chris Kemp, Manfred Jonsson Copyright (C) 2001 Marian Jancar, Bartek Klepacz Copyright (C) 2001-2002 Pavel Machek, Markus Plail Copyright (C) 2002 Ladis Michl, Simon Huggins Copyright (C) 2002-2004 BORBELY Zoltan Copyright (C) 2003 Bertrik Sikken Copyright (C) 2004 Martin Goldhahn Mainline code for gnokii utility. Profile handling functions. */ #include "config.h" #include "misc.h" #include "compat.h" #include #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #include #include "gnokii-app.h" #include "gnokii.h" void profile_usage(FILE *f) { fprintf(f, _("Profile options:\n" " --getprofile [start_number [end_number]] [-r|--raw]\n" " --setprofile\n" " --getactiveprofile\n" " --setactiveprofile profile_number\n" )); } int getprofile_usage(FILE *f, int exitval) { fprintf(f, _(" usage: --getprofile [start_number [end_number]] [-r|--raw]\n")); return exitval; } /* Reads profile from phone and displays its' settings */ gn_error getprofile(int argc, char *argv[], gn_data *data, struct gn_statemachine *state) { int max_profiles; int start, stop, i; gn_profile p; gn_ringtone_list rl; gn_error error = GN_ERR_NOTSUPPORTED; /* Hopefully is 64 larger as FB38_MAX* / FB61_MAX* */ char model[64] = ""; bool raw = false; struct option options[] = { { "raw", no_argument, NULL, 'r'}, { NULL, 0, NULL, 0} }; while ((i = getopt_long(argc, argv, "r", options, NULL)) != -1) { switch (i) { case 'r': raw = true; break; default: return getprofile_usage(stderr, -1); /* FIXME */ } } gn_data_clear(data); data->model = model; while (gn_sm_functions(GN_OP_GetModel, data, state) != GN_ERR_NONE) sleep(1); p.number = 0; memset(&rl, 0, sizeof(gn_ringtone_list)); gn_data_clear(data); data->profile = &p; data->ringtone_list = &rl; error = gn_sm_functions(GN_OP_GetProfile, data, state); switch (error) { case GN_ERR_NONE: break; default: fprintf(stderr, _("Error: %s\n"), gn_error_print(error)); return error; } max_profiles = 7; /* This is correct for 6110 (at least my). How do we get the number of profiles? */ /* For N5110 */ /* FIXME: It should be set to 3 for N5130 and 3210 too */ if (!strcmp(model, "NSE-1")) max_profiles = 3; if (argc > optind) { start = gnokii_atoi(argv[optind]); if (errno || start < 0) return getprofile_usage(stderr, -1); stop = (argc > optind + 1) ? gnokii_atoi(argv[optind + 1]) : start; if (errno || stop < 0) return getprofile_usage(stderr, -1); if (start > stop) { fprintf(stderr, _("Starting profile number is greater than stop\n")); return GN_ERR_FAILED; } if (start < 0) { fprintf(stderr, _("Profile number must be value from 0 to %d!\n"), max_profiles - 1); return GN_ERR_FAILED; } if (stop >= max_profiles) { fprintf(stderr, _("This phone supports only %d profiles!\n"), max_profiles); return GN_ERR_FAILED; } } else { start = 0; stop = max_profiles - 1; } gn_data_clear(data); data->profile = &p; data->ringtone_list = &rl; for (i = start; i <= stop; i++) { p.number = i; if (p.number != 0) { error = gn_sm_functions(GN_OP_GetProfile, data, state); if (error != GN_ERR_NONE) { fprintf(stderr, _("Cannot get profile %d\n"), i); fprintf(stderr, _("Error: %s\n"), gn_error_print(error)); return error; } } if (raw) { fprintf(stdout, "%d;%s;%d;%d;%d;%d;%d;%d;%d;%d;%d;%d;%d\n", p.number, p.name, p.default_name, p.keypad_tone, p.lights, p.call_alert, p.ringtone, p.volume, p.message_tone, p.vibration, p.warning_tone, p.caller_groups, p.automatic_answer); } else { /* Translators: %d is the profile number, %s is the profile name. Example: 1. "Outdoors" */ fprintf(stdout, _("%d. \"%s\"\n"), p.number, p.name); if (p.default_name == -1) fprintf(stdout, _(" (name defined)\n")); fprintf(stdout, _("Incoming call alert: %s\n"), gn_profile_callalert_type2str(p.call_alert)); fprintf(stdout, _("Ringing tone: %s (%d)\n"), get_ringtone_name(p.ringtone, data, state), p.ringtone); fprintf(stdout, _("Ringing volume: %s\n"), gn_profile_volume_type2str(p.volume)); fprintf(stdout, _("Message alert tone: %s\n"), gn_profile_message_type2str(p.message_tone)); fprintf(stdout, _("Keypad tones: %s\n"), gn_profile_keyvol_type2str(p.keypad_tone)); fprintf(stdout, _("Warning and game tones: %s\n"), gn_profile_warning_type2str(p.warning_tone)); /* FIXME: Light settings is only used for Car */ if (p.number == (max_profiles - 2)) fprintf(stdout, _("Lights: %s\n"), p.lights ? _("On") : _("Automatic")); fprintf(stdout, _("Vibration: %s\n"), gn_profile_vibration_type2str(p.vibration)); /* FIXME: it will be nice to add here reading caller group name. */ if (max_profiles != 3) fprintf(stdout, _("Caller groups: 0x%02x\n"), p.caller_groups); /* FIXME: Automatic answer is only used for Car and Headset. */ if (p.number >= (max_profiles - 2)) fprintf(stdout, _("Automatic answer: %s\n"), p.automatic_answer ? _("On") : _("Off")); fprintf(stdout, "\n"); } } return error; } /* Writes profiles to phone */ gn_error setprofile(gn_data *data, struct gn_statemachine *state) { int n; gn_profile p; gn_error error = GN_ERR_NONE; char line[256], ch; gn_data_clear(data); data->profile = &p; while (fgets(line, sizeof(line), stdin)) { n = strlen(line); if (n > 0 && line[n-1] == '\n') { line[--n] = 0; } n = sscanf(line, "%d;%39[^;];%d;%d;%d;%d;%d;%d;%d;%d;%d;%d;%d%c", &p.number, p.name, &p.default_name, &p.keypad_tone, &p.lights, &p.call_alert, &p.ringtone, &p.volume, &p.message_tone, &p.vibration, &p.warning_tone, &p.caller_groups, &p.automatic_answer, &ch); if (n != 13) { fprintf(stderr, _("Input line format isn't valid\n")); return GN_ERR_WRONGDATAFORMAT; } error = gn_sm_functions(GN_OP_SetProfile, data, state); if (error != GN_ERR_NONE) { fprintf(stderr, _("Cannot set profile: %s\n"), gn_error_print(error)); return error; } } return error; } /* Queries the active profile */ gn_error getactiveprofile(gn_data *data, struct gn_statemachine *state) { gn_profile p; gn_error error; gn_data_clear(data); data->profile = &p; error = gn_sm_functions(GN_OP_GetActiveProfile, data, state); if (error != GN_ERR_NONE) { fprintf(stderr, _("Cannot get active profile: %s\n"), gn_error_print(error)); return error; } error = gn_sm_functions(GN_OP_GetProfile, data, state); if (error != GN_ERR_NONE) fprintf(stderr, _("Cannot get profile %d\n"), p.number); else fprintf(stdout, _("Active profile: %d (%s)\n"), p.number, p.name); return error; } int setactiveprofile_usage(FILE *f, int exitval) { fprintf(f, _(" usage: --setactiveprofile profile_number\n")); return exitval; } /* Select the specified profile */ gn_error setactiveprofile(int argc, char *argv[], gn_data *data, struct gn_statemachine *state) { gn_profile p; gn_error error; gn_data_clear(data); data->profile = &p; p.number = gnokii_atoi(optarg); if (errno || p.number < 0) return setactiveprofile_usage(stderr, -1); error = gn_sm_functions(GN_OP_SetActiveProfile, data, state); if (error != GN_ERR_NONE) fprintf(stderr, _("Cannot set active profile to %d: %s\n"), p.number, gn_error_print(error)); return error; } gnokii-0.6.31/gnokii/gnokii.c0000644000175000017500000007777211666163120014133 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 1999-2000 Gary Reuter, Reinhold Jordan Copyright (C) 1999-2011 Pawel Kot Copyright (C) 2000-2002 Marcin Wiacek, Chris Kemp, Manfred Jonsson Copyright (C) 2001 Marian Jancar, Bartek Klepacz Copyright (C) 2001-2002 Pavel Machek, Markus Plail Copyright (C) 2002 Ladis Michl, Simon Huggins Copyright (C) 2002-2004 BORBELY Zoltan Copyright (C) 2003 Bertrik Sikken Copyright (C) 2004 Martin Goldhahn Mainline code for gnokii utility. Handles command line parsing and reading/writing phonebook entries and other stuff. */ #include "config.h" #include "misc.h" #include "compat.h" #include #ifdef HAVE_STDLIB_H # include #endif #include #ifdef HAVE_STRING_H # include #endif #ifdef HAVE_STRINGS_H # include /* for memset */ #endif #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef HAVE_CTYPE_H # include #endif #ifdef HAVE_LIMITS_H # include #endif #ifdef WIN32 # include # include # include #else # include # include # include # include #endif #ifdef ENABLE_NLS # include #endif #ifdef HAVE_READLINE # include # include #endif #include "gnokii-app.h" #include "gnokii.h" struct gnokii_arg_len { int gal_opt; /* option name (opt_index) */ int gal_min; /* minimal number of arguments to give */ int gal_max; /* maximal number of arguments to give */ int gal_flags; }; /* This is used for checking correct argument count. If it is used then if the user specifies some argument, their count should be equivalent to the count the programmer expects. */ #define GAL_XOR 0x01 typedef enum { OPT_HELP = 256, OPT_VERSION, OPT_MONITOR, OPT_ENTERSECURITYCODE, OPT_GETSECURITYCODESTATUS, /* 260 */ OPT_CHANGESECURITYCODE, OPT_SETDATETIME, OPT_GETDATETIME, OPT_SETALARM, OPT_GETALARM, OPT_DIALVOICE, OPT_ANSWERCALL, OPT_HANGUP, OPT_GETTODO, OPT_WRITETODO, /* 270 */ OPT_DELETEALLTODOS, OPT_GETCALENDARNOTE, OPT_WRITECALENDARNOTE, OPT_DELCALENDARNOTE, OPT_GETDISPLAYSTATUS, OPT_GETPHONEBOOK, OPT_WRITEPHONEBOOK, OPT_DELETEPHONEBOOK, OPT_GETSPEEDDIAL, OPT_SETSPEEDDIAL, /* 280 */ OPT_GETSMS, OPT_DELETESMS, OPT_SENDSMS, OPT_SAVESMS, OPT_SENDLOGO, OPT_SENDRINGTONE, OPT_GETSMSC, OPT_SETSMSC, OPT_GETWELCOMENOTE, OPT_SETWELCOMENOTE, /* 290 */ OPT_PMON, OPT_NETMONITOR, OPT_IDENTIFY, OPT_SENDDTMF, OPT_RESET, OPT_SETLOGO, OPT_GETLOGO, OPT_VIEWLOGO, OPT_GETRINGTONE, OPT_SETRINGTONE, /* 300 */ OPT_PLAYRINGTONE, OPT_RINGTONECONVERT, OPT_GETPROFILE, OPT_SETPROFILE, OPT_GETACTIVEPROFILE, OPT_SETACTIVEPROFILE, OPT_DISPLAYOUTPUT, OPT_KEYPRESS, OPT_ENTERCHAR, OPT_DIVERT, /* 310 */ OPT_SMSREADER, OPT_FOOGLE, OPT_GETSECURITYCODE, OPT_GETWAPBOOKMARK, OPT_WRITEWAPBOOKMARK, OPT_GETWAPSETTING, OPT_WRITEWAPSETTING, OPT_ACTIVATEWAPSETTING, OPT_DELETEWAPBOOKMARK, OPT_DELETESMSFOLDER, /* 320 */ OPT_CREATESMSFOLDER, OPT_LISTNETWORKS, OPT_GETNETWORKINFO, OPT_GETLOCKSINFO, OPT_GETRINGTONELIST, OPT_DELETERINGTONE, OPT_SHOWSMSFOLDERSTATUS, OPT_GETFILELIST, OPT_GETFILEDETAILSBYID, OPT_GETFILEID, /* 330 */ OPT_GETFILE, OPT_GETFILEBYID, OPT_GETALLFILES, OPT_PUTFILE, OPT_DELETEFILE, OPT_DELETEFILEBYID, OPT_CONFIGFILE, OPT_CONFIGMODEL, OPT_SHELL, OPT_GETMMS, /* 340 */ OPT_DELETEMMS } opt_index; static FILE *logfile = NULL; static char *configfile = NULL; static char *configmodel = NULL; static void short_version(void) { fprintf(stderr, _("GNOKII Version %s\n"), VERSION); } /* This function shows the copyright and some informations useful for debugging. */ static void version(void) { fprintf(stderr, _("Copyright (C) Hugh Blemings , 1999, 2000\n" "Copyright (C) Pavel Janik ml. , 1999, 2000\n" "Copyright (C) Pavel Machek , 2001\n" "Copyright (C) Pawel Kot , 2001-2011\n" "Copyright (C) BORBELY Zoltan , 2002\n" "Copyright (C) Daniele Forsi , 2004-2011\n" "gnokii is free software, covered by the GNU General Public License, and you are\n" "welcome to change it and/or distribute copies of it under certain conditions.\n" "There is absolutely no warranty for gnokii. See GPL for details.\n" "Built %s %s\n"), __TIME__, __DATE__); } /* The function usage is only informative - it prints this program's usage and command-line options. */ static int usage(FILE *f, int argc, char *argv[]) { int i; int all = 0; for (i = 1; i < argc; i++) { if (!strcmp(argv[i], "all")) { all = 1; break; } } /* Don't print general options if specific help was requested */ if (all || argc == -1) fprintf(f, _("Usage:\n" " gnokii [CONFIG OPTIONS] OPTIONS\n" "\nCONFIG OPTIONS\n" " --config filename\n" " --phone phone_section\n" "\nOPTIONS\n" "Use just one option at a time.\n" "General options:\n" " --help [all] [monitor] [sms] [mms] [phonebook] [calendar] [todo]\n" " [dial] [profile] [settings] [wap] [logo] [ringtone]\n" " [security] [file] [other]\n" " --version\n" " --shell\n")); /* FIXME? throw an error if argv[i] is duplicated or unknown */ for (i = 1; i < argc; i++) { if (all || !strcmp(argv[i], "monitor")) monitor_usage(f); if (all || !strcmp(argv[i], "sms")) sms_usage(f); if (all || !strcmp(argv[i], "mms")) mms_usage(f); if (all || !strcmp(argv[i], "phonebook")) phonebook_usage(f); if (all || !strcmp(argv[i], "calendar")) calendar_usage(f); if (all || !strcmp(argv[i], "todo")) todo_usage(f); if (all || !strcmp(argv[i], "dial")) dial_usage(f); if (all || !strcmp(argv[i], "profile")) profile_usage(f); if (all || !strcmp(argv[i], "settings")) settings_usage(f); if (all || !strcmp(argv[i], "wap")) wap_usage(f); if (all || !strcmp(argv[i], "logo")) logo_usage(f); if (all || !strcmp(argv[i], "ringtone")) ringtone_usage(f); /* Unconditional compile here because security_usage() has its own conditional */ if (all || !strcmp(argv[i], "security")) security_usage(f); if (all || !strcmp(argv[i], "file")) file_usage(f); if (all || !strcmp(argv[i], "other")) other_usage(f); if (all) break; } return 0; } static void gnokii_error_logger(const char *fmt, va_list ap) { if (logfile) { vfprintf(logfile, fmt, ap); fflush(logfile); } } #define MAX_PATH_LEN 255 static int install_log_handler(void) { int retval = 0; char logname[MAX_PATH_LEN]; char *path, *basepath; char *file = "gnokii-errors"; int free_path = 0; struct stat buf; int st; #if !defined WIN32 && !defined __MACH__ int home = 0; #endif path = gn_cfg_get(gn_cfg_info, "gnokii", "errorlogpath"); if (!path) { #ifdef WIN32 basepath = getenv("APPDATA"); #elif __MACH__ basepath = getenv("HOME"); #else /* freedesktop.org compliancy: http://standards.freedesktop.org/basedir-spec/latest/ar01s03.html */ #define XDG_CACHE_HOME "/.cache" /* $HOME/.cache */ basepath = getenv("XDG_CACHE_HOME"); if (!basepath) { basepath = getenv("HOME"); home = 1; } #endif if (!basepath) path = "."; else { path = calloc(MAX_PATH_LEN, sizeof(char)); free_path = 1; #ifdef WIN32 /* Windows */ snprintf(path, MAX_PATH_LEN, "%s\\gnokii", basepath); #elif __MACH__ snprintf(path, MAX_PATH_LEN, "%s/Library/Logs/gnokii", basepath); #else if (home) { snprintf(path, MAX_PATH_LEN, "%s%s/gnokii", basepath, XDG_CACHE_HOME); } else { snprintf(path, MAX_PATH_LEN, "%s/gnokii", basepath); } #endif } st = stat(basepath, &buf); if (st) mkdir(basepath, S_IRWXU); st = stat(path, &buf); if (st) mkdir(path, S_IRWXU); } snprintf(logname, sizeof(logname), "%s/%s", path, file); if ((logfile = fopen(logname, "a")) == NULL) { fprintf(stderr, _("Cannot open logfile %s\n"), logname); retval = -1; goto out; } gn_elog_handler = gnokii_error_logger; out: if (free_path) free(path); return retval; } /* businit is the generic function which waits for the FBUS link. The limit is 10 seconds. After 10 seconds we quit. */ static struct gn_statemachine *state; static gn_data *data; static void busterminate(void) { gn_lib_phone_close(state); gn_lib_phoneprofile_free(&state); if (logfile) fclose(logfile); gn_lib_library_free(); } static int businit(void) { gn_error err; if ((err = gn_lib_phoneprofile_load_from_file(configfile, configmodel, &state)) != GN_ERR_NONE) { fprintf(stderr, "%s\n", gn_error_print(err)); if (configfile) fprintf(stderr, _("File: %s\n"), configfile); if (configmodel) fprintf(stderr, _("Phone section: [phone_%s]\n"), configmodel); return 2; } /* register cleanup function */ atexit(busterminate); /* signal(SIGINT, bussignal); */ if (install_log_handler()) { fprintf(stderr, _("WARNING: cannot open logfile, logs will be directed to stderr\n")); } if ((err = gn_lib_phone_open(state)) != GN_ERR_NONE) { fprintf(stderr, "%s\n", gn_error_print(err)); return 2; } data = &state->sm_data; return 0; } /* This function checks that the argument count for a given options is within an allowed range. */ static int checkargs(int opt, struct gnokii_arg_len gals[], int argc, int has_arg) { int i; switch (has_arg) { case required_argument: has_arg = 1; break; default: has_arg = 0; } /* Walk through the whole array with options requiring arguments. */ for (i = 0; gals[i].gal_opt != 0; i++) { /* Current option. */ if (gals[i].gal_opt == opt) { /* Argument count checking. */ if (gals[i].gal_flags == GAL_XOR) { if (gals[i].gal_min == argc - optind + has_arg || gals[i].gal_max == argc - optind + has_arg) return 0; } else { if (gals[i].gal_min <= argc - optind + has_arg && gals[i].gal_max >= argc - optind + has_arg) return 0; } return 1; } } /* We do not have options without arguments in the array, so check them. */ if (argc-optind+has_arg == 0) return 0; else return 1; } /* This is a "convenience" function to allow quick test of new API stuff which doesn't warrant a "proper" command line function. */ #ifndef WIN32 static int foogle(int argc, char *argv[]) { /* Fill in what you would like to test here... */ /* remember to call businit(); if you need to communicate with your phone */ return GN_ERR_NONE; } #endif static int parse_options(int argc, char *argv[]) { int c; int opt_index = -1; gn_error rc; /* Every option should be in this array. */ static struct option long_options[] = { /* FIXME: these comments are nice, but they would be more useful as docs for the user */ /* Display usage. */ { "help", optional_argument, NULL, OPT_HELP }, /* Display version and build information. */ { "version", no_argument, NULL, OPT_VERSION }, /* Monitor mode */ { "monitor", optional_argument, NULL, OPT_MONITOR }, /* Alternate config file location */ { "config", required_argument, NULL, OPT_CONFIGFILE }, /* Alternate phone section from the config */ { "phone", required_argument, NULL, OPT_CONFIGMODEL }, #ifdef SECURITY /* Get Security Code */ { "getsecuritycode", no_argument, NULL, OPT_GETSECURITYCODE }, /* Enter Security Code mode */ { "entersecuritycode", required_argument, NULL, OPT_ENTERSECURITYCODE }, /* Get Security Code status */ { "getsecuritycodestatus", no_argument, NULL, OPT_GETSECURITYCODESTATUS }, /* Change Security Code */ { "changesecuritycode", required_argument, NULL, OPT_CHANGESECURITYCODE }, #endif /* Set date and time */ { "setdatetime", optional_argument, NULL, OPT_SETDATETIME }, /* Get date and time mode */ { "getdatetime", no_argument, NULL, OPT_GETDATETIME }, /* Set alarm */ { "setalarm", optional_argument, NULL, OPT_SETALARM }, /* Get alarm */ { "getalarm", no_argument, NULL, OPT_GETALARM }, /* Voice call mode */ { "dialvoice", required_argument, NULL, OPT_DIALVOICE }, /* Answer the incoming call */ { "answercall", required_argument, NULL, OPT_ANSWERCALL }, /* Hangup call */ { "hangup", required_argument, NULL, OPT_HANGUP }, /* Get ToDo note mode */ { "gettodo", required_argument, NULL, OPT_GETTODO }, /* Write ToDo note mode */ { "writetodo", required_argument, NULL, OPT_WRITETODO }, /* Delete all ToDo notes mode */ { "deletealltodos", no_argument, NULL, OPT_DELETEALLTODOS }, /* Get calendar note mode */ { "getcalendarnote", required_argument, NULL, OPT_GETCALENDARNOTE }, /* Write calendar note mode */ { "writecalendarnote", required_argument, NULL, OPT_WRITECALENDARNOTE }, /* Delete calendar note mode */ { "deletecalendarnote", required_argument, NULL, OPT_DELCALENDARNOTE }, /* Get display status mode */ { "getdisplaystatus", no_argument, NULL, OPT_GETDISPLAYSTATUS }, /* Get memory mode */ { "getphonebook", required_argument, NULL, OPT_GETPHONEBOOK }, /* Write phonebook (memory) mode */ { "writephonebook", optional_argument, NULL, OPT_WRITEPHONEBOOK }, /* Delete phonebook entry from memory mode */ { "deletephonebook", required_argument, NULL, OPT_DELETEPHONEBOOK }, /* Get speed dial mode */ { "getspeeddial", required_argument, NULL, OPT_GETSPEEDDIAL }, /* Set speed dial mode */ { "setspeeddial", required_argument, NULL, OPT_SETSPEEDDIAL }, /* Create SMS folder mode */ { "createsmsfolder", required_argument, NULL, OPT_CREATESMSFOLDER }, /* Delete SMS folder mode */ { "deletesmsfolder", required_argument, NULL, OPT_DELETESMSFOLDER }, /* Show SMS folder names and its attributes */ { "showsmsfolderstatus",no_argument, NULL, OPT_SHOWSMSFOLDERSTATUS }, /* Get SMS message mode */ { "getsms", required_argument, NULL, OPT_GETSMS }, /* Delete SMS message mode */ { "deletesms", required_argument, NULL, OPT_DELETESMS }, /* Send SMS message mode */ { "sendsms", required_argument, NULL, OPT_SENDSMS }, /* Ssve SMS message mode */ { "savesms", optional_argument, NULL, OPT_SAVESMS }, /* Send logo as SMS message mode */ { "sendlogo", required_argument, NULL, OPT_SENDLOGO }, /* Send ringtone as SMS message */ { "sendringtone", required_argument, NULL, OPT_SENDRINGTONE }, /* Get ringtone */ { "getringtone", required_argument, NULL, OPT_GETRINGTONE }, /* Set ringtone */ { "setringtone", required_argument, NULL, OPT_SETRINGTONE }, /* Play ringtone */ { "playringtone", required_argument, NULL, OPT_PLAYRINGTONE }, /* Convert ringtone */ { "ringtoneconvert", required_argument, NULL, OPT_RINGTONECONVERT }, /* Get list of the ringtones */ { "getringtonelist", no_argument, NULL, OPT_GETRINGTONELIST }, /* Delete ringtones */ { "deleteringtone", required_argument, NULL, OPT_DELETERINGTONE }, /* Get SMS center number mode */ { "getsmsc", optional_argument, NULL, OPT_GETSMSC }, /* Set SMS center number mode */ { "setsmsc", no_argument, NULL, OPT_SETSMSC }, /* For development purposes: run in passive monitoring mode */ { "pmon", no_argument, NULL, OPT_PMON }, /* NetMonitor mode */ { "netmonitor", required_argument, NULL, OPT_NETMONITOR }, /* Identify */ { "identify", no_argument, NULL, OPT_IDENTIFY }, /* Send DTMF sequence */ { "senddtmf", required_argument, NULL, OPT_SENDDTMF }, /* Resets the phone */ { "reset", required_argument, NULL, OPT_RESET }, /* Set logo */ { "setlogo", required_argument, NULL, OPT_SETLOGO }, /* Get logo */ { "getlogo", required_argument, NULL, OPT_GETLOGO }, /* View logo */ { "viewlogo", required_argument, NULL, OPT_VIEWLOGO }, /* Show profile */ { "getprofile", optional_argument, NULL, OPT_GETPROFILE }, /* Set profile */ { "setprofile", no_argument, NULL, OPT_SETPROFILE }, /* Get the active profile */ { "getactiveprofile", no_argument, NULL, OPT_GETACTIVEPROFILE }, /* Set the active profile */ { "setactiveprofile", required_argument, NULL, OPT_SETACTIVEPROFILE }, /* Show texts from phone's display */ { "displayoutput", no_argument, NULL, OPT_DISPLAYOUTPUT }, /* Simulate pressing the keys */ { "keysequence", no_argument, NULL, OPT_KEYPRESS }, /* Simulate pressing the keys */ { "enterchar", no_argument, NULL, OPT_ENTERCHAR }, /* Divert calls */ { "divert", no_argument, NULL, OPT_DIVERT }, /* SMS reader */ { "smsreader", no_argument, NULL, OPT_SMSREADER }, /* For development purposes: insert you function calls here */ { "foogle", no_argument, NULL, OPT_FOOGLE }, /* Get WAP bookmark */ { "getwapbookmark", required_argument, NULL, OPT_GETWAPBOOKMARK }, /* Write WAP bookmark */ { "writewapbookmark", required_argument, NULL, OPT_WRITEWAPBOOKMARK }, /* Delete WAP bookmark */ { "deletewapbookmark", required_argument, NULL, OPT_DELETEWAPBOOKMARK }, /* Get WAP setting */ { "getwapsetting", required_argument, NULL, OPT_GETWAPSETTING }, /* Write WAP setting */ { "writewapsetting", no_argument, NULL, OPT_WRITEWAPSETTING }, /* Activate WAP setting */ { "activatewapsetting", required_argument, NULL, OPT_ACTIVATEWAPSETTING }, /* List GSM networks */ { "listnetworks", no_argument, NULL, OPT_LISTNETWORKS }, /* Get network info */ { "getnetworkinfo", no_argument, NULL, OPT_GETNETWORKINFO }, /* Get (sim)lock info */ { "getlocksinfo", no_argument, NULL, OPT_GETLOCKSINFO }, /* Get file list */ { "getfilelist", required_argument, NULL, OPT_GETFILELIST }, /* Get file details by id */ { "getfiledetailsbyid", optional_argument, NULL, OPT_GETFILEDETAILSBYID }, /* Get file id */ { "getfileid", required_argument, NULL, OPT_GETFILEID }, /* Get file */ { "getfile", required_argument, NULL, OPT_GETFILE }, /* Get file by id */ { "getfilebyid", required_argument, NULL, OPT_GETFILEBYID }, /* Get all files */ { "getallfiles", required_argument, NULL, OPT_GETALLFILES }, /* Put a file */ { "putfile", required_argument, NULL, OPT_PUTFILE }, /* Delete a file */ { "deletefile", required_argument, NULL, OPT_DELETEFILE }, /* Delete a file by id */ { "deletefilebyid", required_argument, NULL, OPT_DELETEFILEBYID }, /* shell like interface */ { "shell", no_argument, NULL, OPT_SHELL }, /* Get MMS message mode */ { "getmms", required_argument, NULL, OPT_GETMMS }, /* Delete MMS message mode */ { "deletemms", required_argument, NULL, OPT_DELETEMMS }, { 0, 0, 0, 0 }, }; /* Every command which requires arguments should have an appropriate entry in this array. */ static struct gnokii_arg_len gals[] = { { OPT_HELP, 1, 100, 0 }, { OPT_CONFIGFILE, 1, 100, 0 }, { OPT_CONFIGMODEL, 1, 100, 0 }, #ifdef SECURITY { OPT_ENTERSECURITYCODE, 1, 100, 0 }, { OPT_CHANGESECURITYCODE,1, 1, 0 }, #endif { OPT_SETDATETIME, 0, 5, 0 }, { OPT_SETALARM, 0, 2, 0 }, { OPT_DIALVOICE, 1, 1, 0 }, { OPT_ANSWERCALL, 1, 1, 0 }, { OPT_HANGUP, 1, 1, 0 }, { OPT_GETTODO, 1, 3, 0 }, { OPT_WRITETODO, 2, 3, 0 }, { OPT_GETCALENDARNOTE, 1, 3, 0 }, { OPT_WRITECALENDARNOTE, 2, 3, 0 }, { OPT_DELCALENDARNOTE, 1, 2, 0 }, { OPT_GETPHONEBOOK, 2, 4, 0 }, { OPT_WRITEPHONEBOOK, 0, 10, 0 }, { OPT_DELETEPHONEBOOK, 2, 3, 0 }, { OPT_GETSPEEDDIAL, 1, 1, 0 }, { OPT_SETSPEEDDIAL, 3, 3, 0 }, { OPT_CREATESMSFOLDER, 1, 1, 0 }, { OPT_DELETESMSFOLDER, 1, 1, 0 }, { OPT_GETSMS, 2, 6, 0 }, { OPT_DELETESMS, 2, 3, 0 }, { OPT_SENDSMS, 1, 10, 0 }, { OPT_SAVESMS, 0, 12, 0 }, { OPT_SENDLOGO, 3, 4, GAL_XOR }, { OPT_SENDRINGTONE, 2, 2, 0 }, { OPT_GETSMSC, 0, 3, 0 }, { OPT_GETWELCOMENOTE, 1, 1, 0 }, { OPT_SETWELCOMENOTE, 1, 1, 0 }, { OPT_NETMONITOR, 1, 1, 0 }, { OPT_SENDDTMF, 1, 1, 0 }, { OPT_SETLOGO, 1, 4, 0 }, { OPT_GETLOGO, 1, 4, 0 }, { OPT_VIEWLOGO, 1, 1, 0 }, { OPT_GETRINGTONE, 1, 3, 0 }, { OPT_SETRINGTONE, 1, 5, 0 }, { OPT_PLAYRINGTONE, 1, 3, 0 }, { OPT_RINGTONECONVERT, 2, 2, 0 }, { OPT_DELETERINGTONE, 1, 2, 0 }, { OPT_RESET, 0, 1, 0 }, { OPT_GETPROFILE, 0, 3, 0 }, { OPT_SETACTIVEPROFILE, 1, 1, 0 }, { OPT_DIVERT, 6, 10, 0 }, { OPT_GETWAPBOOKMARK, 1, 1, 0 }, { OPT_WRITEWAPBOOKMARK, 2, 2, 0 }, { OPT_DELETEWAPBOOKMARK, 1, 1, 0 }, { OPT_GETWAPSETTING, 1, 2, 0 }, { OPT_ACTIVATEWAPSETTING,1, 1, 0 }, { OPT_MONITOR, 0, 1, 0 }, { OPT_GETFILELIST, 1, 1, 0 }, { OPT_GETFILEDETAILSBYID,0, 1, 0 }, { OPT_GETFILEID, 1, 1, 0 }, { OPT_GETFILE, 1, 2, 0 }, { OPT_GETFILEBYID, 1, 2, 0 }, { OPT_GETALLFILES, 1, 1, 0 }, { OPT_PUTFILE, 2, 2, 0 }, { OPT_DELETEFILE, 1, 1, 0 }, { OPT_DELETEFILEBYID, 1, 1, 0 }, { OPT_SHELL, 0, 0, 0 }, { OPT_GETMMS, 2, 6, 0 }, { OPT_DELETEMMS, 2, 3, 0 }, { OPT_FOOGLE, 0, 0, 0 }, { 0, 0, 0, 0 }, }; /* Handle command line arguments. * -c equals to --config * -p equals to --phone */ c = getopt_long(argc, argv, "c:p:", long_options, &opt_index); switch (c) { /* No argument given - we should display usage. */ case -1: return usage(stderr, -1, NULL); /* First, error conditions */ case '?': case ':': /* --shell command does not set argv[0] */ if (argv[0]) fprintf(stderr, _("Use '%s --help' for usage information.\n"), argv[0]); else fprintf(stderr, _("Use '--help' for usage information.\n")); return 1; /* Then, options with no arguments */ case OPT_VERSION: version(); return 0; /* That's a bit ugly... */ case 'c': c = OPT_CONFIGFILE; opt_index = 0; break; case 'p': c = OPT_CONFIGMODEL; opt_index = 1; break; } /* We have to build an array of the arguments which will be passed to the functions. Please note that every text after the --command will be passed as arguments. A syntax like gnokii --cmd1 args --cmd2 args will not work as expected; instead args --cmd2 args is passed as a parameter. */ if (checkargs(c, gals, argc, long_options[opt_index].has_arg)) { return usage(stderr, -1, NULL); } /* Other options that do not need initialization */ switch (c) { case OPT_CONFIGFILE: if (configfile) return usage(stderr, -1, NULL); configfile = optarg; return parse_options(argc, argv); case OPT_CONFIGMODEL: if (configmodel) return usage(stderr, -1, NULL); configmodel = optarg; return parse_options(argc, argv); case OPT_HELP: return usage(stdout, argc, argv); case OPT_VIEWLOGO: return viewlogo(optarg); case OPT_LISTNETWORKS: list_gsm_networks(); return GN_ERR_NONE; case OPT_RINGTONECONVERT: return ringtoneconvert(argc, argv); } /* Initialise the code for the GSM interface. */ if (c != OPT_FOOGLE && state == NULL && businit()) return -1; switch (c) { /* Monitoring options */ case OPT_MONITOR: rc = monitormode(argc, argv, data, state); break; case OPT_GETDISPLAYSTATUS: rc = getdisplaystatus(data, state); break; case OPT_DISPLAYOUTPUT: rc = displayoutput(data, state); break; case OPT_NETMONITOR: rc = netmonitor(optarg, data, state); break; /* SMS options */ case OPT_SENDSMS: rc = sendsms(argc, argv, data, state); break; case OPT_SAVESMS: rc = savesms(argc, argv, data, state); break; case OPT_GETSMS: rc = getsms(argc, argv, data, state); break; case OPT_DELETESMS: rc = deletesms(argc, argv, data, state); break; case OPT_GETSMSC: rc = getsmsc(argc, argv, data, state); break; case OPT_SETSMSC: rc = setsmsc(data, state); break; case OPT_CREATESMSFOLDER: rc = createsmsfolder(optarg, data, state); break; case OPT_DELETESMSFOLDER: rc = deletesmsfolder(optarg, data, state); break; case OPT_SHOWSMSFOLDERSTATUS: rc = showsmsfolderstatus(data, state); break; case OPT_SMSREADER: rc = smsreader(data, state); break; /* Phonebook options */ case OPT_GETPHONEBOOK: rc = getphonebook(argc, argv, data, state); break; case OPT_WRITEPHONEBOOK: rc = writephonebook(argc, argv, data, state); break; case OPT_DELETEPHONEBOOK: rc = deletephonebook(argc, argv, data, state); break; /* Calendar options */ case OPT_GETCALENDARNOTE: rc = getcalendarnote(argc, argv, data, state); break; case OPT_WRITECALENDARNOTE: rc = writecalendarnote(argc, argv, data, state); break; case OPT_DELCALENDARNOTE: rc = deletecalendarnote(argc, argv, data, state); break; /* ToDo options */ case OPT_GETTODO: rc = gettodo(argc, argv, data, state); break; case OPT_WRITETODO: rc = writetodo(argc, argv, data, state); break; case OPT_DELETEALLTODOS: rc = deletealltodos(data, state); break; /* Dialling and call handling options */ case OPT_GETSPEEDDIAL: rc = getspeeddial(optarg, data, state); break; case OPT_SETSPEEDDIAL: rc = setspeeddial(argv, data, state); break; case OPT_DIALVOICE: rc = dialvoice(optarg, data, state); break; case OPT_SENDDTMF: rc = senddtmf(optarg, data, state); break; case OPT_ANSWERCALL: rc = answercall(optarg, data, state); break; case OPT_HANGUP: rc = hangup(optarg, data, state); break; case OPT_DIVERT: rc = divert(argc, argv, data, state); break; /* Profile options */ case OPT_GETPROFILE: rc = getprofile(argc, argv, data, state); break; case OPT_SETPROFILE: rc = setprofile(data, state); break; case OPT_GETACTIVEPROFILE: rc = getactiveprofile(data, state); break; case OPT_SETACTIVEPROFILE: rc = setactiveprofile(argc, argv, data, state); break; /* Phone settings options */ case OPT_RESET: rc = reset(optarg, data, state); break; case OPT_GETDATETIME: rc = getdatetime(data, state); break; case OPT_SETDATETIME: rc = setdatetime(argc, argv, data, state); break; case OPT_GETALARM: rc = getalarm(data, state); break; case OPT_SETALARM: rc = setalarm(argc, argv, data, state); break; /* WAP options */ case OPT_GETWAPBOOKMARK: rc = getwapbookmark(optarg, data, state); break; case OPT_WRITEWAPBOOKMARK: rc = writewapbookmark(argc, argv, data, state); break; case OPT_DELETEWAPBOOKMARK: rc = deletewapbookmark(optarg, data, state); break; case OPT_GETWAPSETTING: rc = getwapsetting(argc, argv, data, state); break; case OPT_WRITEWAPSETTING: rc = writewapsetting(data, state); break; case OPT_ACTIVATEWAPSETTING: rc = activatewapsetting(optarg, data, state); break; /* Logo options */ case OPT_SENDLOGO: rc = sendlogo(argc, argv, data, state); break; case OPT_SETLOGO: rc = setlogo(argc, argv, data, state); break; case OPT_GETLOGO: rc = getlogo(argc, argv, data, state); break; /* Ringtone options */ case OPT_SENDRINGTONE: rc = sendringtone(argc, argv, data, state); break; case OPT_GETRINGTONE: rc = getringtone(argc, argv, data, state); break; case OPT_SETRINGTONE: rc = setringtone(argc, argv, data, state); break; case OPT_PLAYRINGTONE: rc = playringtone(argc, argv, data, state); break; case OPT_GETRINGTONELIST: rc = getringtonelist(data, state); break; case OPT_DELETERINGTONE: rc = deleteringtone(argc, argv, data, state); break; /* Security options */ case OPT_IDENTIFY: rc = identify(state); break; case OPT_GETLOCKSINFO: rc = getlocksinfo(data, state); break; #ifdef SECURITY case OPT_GETSECURITYCODE: rc = getsecuritycode(data, state); break; case OPT_ENTERSECURITYCODE: rc = entersecuritycode(optarg, data, state); if (rc == GN_ERR_NONE && optind < argc) return parse_options(argc, argv); break; case OPT_GETSECURITYCODESTATUS: rc = getsecuritycodestatus(data, state); break; case OPT_CHANGESECURITYCODE: rc = changesecuritycode(optarg, data, state); break; #endif /* File options */ case OPT_GETFILELIST: rc = getfilelist(optarg, data, state); break; case OPT_GETFILEDETAILSBYID: rc = getfiledetailsbyid(argc, argv, data, state); break; case OPT_GETFILEID: rc = getfileid(optarg, data, state); break; case OPT_GETFILE: rc = getfile(argc, argv, data, state); break; case OPT_GETFILEBYID: rc = getfilebyid(argc, argv, data, state); break; case OPT_GETALLFILES: rc = getallfiles(optarg, data, state); break; case OPT_PUTFILE: rc = putfile(argc, argv, data, state); break; case OPT_DELETEFILE: rc = deletefile(optarg, data, state); break; case OPT_DELETEFILEBYID: rc = deletefilebyid(optarg, data, state); break; /* Misc options */ case OPT_PMON: rc = pmon(data, state); break; case OPT_KEYPRESS: rc = presskeysequence(data, state); break; case OPT_ENTERCHAR: rc = enterchar(data, state); break; case OPT_GETNETWORKINFO: rc = getnetworkinfo(data, state); break; case OPT_SHELL: rc = shell(data, state); break; #ifndef WIN32 case OPT_FOOGLE: rc = foogle(argc, argv); break; #endif /* MMS options */ case OPT_GETMMS: rc = getmms(argc, argv, data, state); break; case OPT_DELETEMMS: rc = deletemms(argc, argv, data, state); break; default: rc = GN_ERR_FAILED; fprintf(stderr, _("Unknown option: %d\n"), c); break; } return rc; } #define ARGV_CHUNK 10 int shell(gn_data *data, struct gn_statemachine *state) { #ifdef HAVE_READLINE char *input = NULL, *tmp, *old; int len, i, argc = 1; char **argv = NULL; int size = ARGV_CHUNK; int empty = 1; int retval = 0; argv = calloc(size, sizeof(char *)); while (1) { argc = 1; optind = opterr = optopt = 0; optarg = NULL; input = readline("gnokii> "); old = input; if (!input) break; do { if (argc >= size) { void *aux; size += ARGV_CHUNK; aux = realloc(argv, size * sizeof(char *)); if (aux) argv = aux; else { retval = -1; goto err; } } while (*input == ' ') input++; tmp = strstr(input, " "); if (tmp) { len = tmp - input; *tmp = '\0'; } else len = strlen(input); if (len > 0) { argv[argc++] = strdup(input); empty = 0; } input = tmp + (tmp ? 1 : 0); } while (input); argv[argc] = NULL; if (!empty) parse_options(argc, argv); for (i = 1; i < argc; i++) free(argv[i]); free(old); } err: free(argv); return retval; #else fprintf(stderr, _("gnokii needs to be compiled with readline support to enable this option.\n")); return -1; #endif } /* Main function - handles command line arguments, passes them to separate functions accordingly. */ int main(int argc, char *argv[]) { int rc; /* For GNU gettext */ #ifdef ENABLE_NLS setlocale(LC_ALL, ""); bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR); textdomain(GETTEXT_PACKAGE); #endif opterr = 0; /* Introduce yourself */ short_version(); #ifdef __svr4__ /* have to ignore SIGALARM */ sigignore(SIGALRM); #endif rc = parse_options(argc, argv); exit(rc); } gnokii-0.6.31/gnokii/gnokii-calendar.c0000644000175000017500000002621211666163120015661 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 1999-2000 Gary Reuter, Reinhold Jordan Copyright (C) 1999-2006 Pawel Kot Copyright (C) 2000-2002 Marcin Wiacek, Chris Kemp, Manfred Jonsson Copyright (C) 2001 Marian Jancar, Bartek Klepacz Copyright (C) 2001-2002 Pavel Machek, Markus Plail Copyright (C) 2002 Ladis Michl, Simon Huggins Copyright (C) 2002-2004 BORBELY Zoltan Copyright (C) 2003 Bertrik Sikken Copyright (C) 2004 Martin Goldhahn Mainline code for gnokii utility. Calendar functions. */ #include "config.h" #include "misc.h" #include "compat.h" #include #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #include #include "gnokii-app.h" #include "gnokii.h" void calendar_usage(FILE *f) { fprintf(f, _( "Calendar options:\n" " --getcalendarnote start_number [end_number|end] [-v|--vCal]\n" " --writecalendarnote vcalendarfile start_number [end_number|end]\n" " --deletecalendarnote start [end_number|end]\n" )); } int getcalendarnote_usage(FILE *f, int exitval) { fprintf(f, _("usage: --getcalendarnote start_number [end_number | end] [-v|--vCal]\n" " start_number - entry number in the phone calendar (numeric)\n" " end_number - read to this entry in the phone calendar (numeric, optional)\n" " end - the string \"end\" indicates all entries from start to end\n" " -v - output in iCalendar format\n" " NOTE: if no end is given, only the start entry is read\n" )); return exitval; } /* Calendar notes receiving. */ gn_error getcalendarnote(int argc, char *argv[], gn_data *data, struct gn_statemachine *state) { gn_calnote_list calnotelist; gn_calnote calnote; gn_error error = GN_ERR_NONE; int i, first_location, last_location; bool vcal = false; struct option options[] = { { "vCal", optional_argument, NULL, 'v'}, { NULL, 0, NULL, 0} }; first_location = gnokii_atoi(optarg); if (errno || first_location < 0) return getcalendarnote_usage(stderr, -1); last_location = parse_end_value_option(argc, argv, optind, first_location); if (errno || last_location < 0) return getcalendarnote_usage(stderr, -1); while ((i = getopt_long(argc, argv, "v", options, NULL)) != -1) { switch (i) { case 'v': vcal = true; break; default: return getcalendarnote_usage(stderr, -1); } } if (argc > optind + 1) { /* There are too many arguments that don't start with '-' */ return getcalendarnote_usage(stderr, -1); } for (i = first_location; i <= last_location; i++) { memset(&calnote, 0, sizeof(calnote)); memset(&calnotelist, 0, sizeof(calnotelist)); calnote.location = i; gn_data_clear(data); data->calnote = &calnote; data->calnote_list = &calnotelist; error = gn_sm_functions(GN_OP_GetCalendarNote, data, state); if (error == GN_ERR_NONE) { if (vcal) { char *ical; ical = gn_calnote2icalstr(&calnote); fprintf(stdout, "%s\n", ical); free (ical); } else { /* Plain text output */ /* Translators: this is the header of a calendar note. Example: 1 (1). Type: Meeting */ fprintf(stdout, _("%d (%d). %s: %s\n"), i, calnote.location, _("Type"), gn_calnote_type2str(calnote.type)); fprintf(stdout, _(" Start date: %d-%02d-%02d\n"), calnote.time.year, calnote.time.month, calnote.time.day); if (calnote.type != GN_CALNOTE_BIRTHDAY) { fprintf(stdout, _(" Start time: %02d:%02d:%02d\n"), calnote.time.hour, calnote.time.minute, calnote.time.second); if (calnote.end_time.year) { fprintf(stdout, _(" End date: %d-%02d-%02d\n"), calnote.end_time.year, calnote.end_time.month, calnote.end_time.day); fprintf(stdout, _(" End time: %02d:%02d:%02d\n"), calnote.end_time.hour, calnote.end_time.minute, calnote.end_time.second); } } if (calnote.alarm.enabled) { if (calnote.type == GN_CALNOTE_BIRTHDAY) { fprintf(stdout, _(" Alarm date: %02d-%02d\n"), calnote.alarm.timestamp.month, calnote.alarm.timestamp.day); } else { fprintf(stdout, _(" Alarm date: %d-%02d-%02d\n"), calnote.alarm.timestamp.year, calnote.alarm.timestamp.month, calnote.alarm.timestamp.day); } fprintf(stdout, _(" Alarm time: %02d:%02d:%02d\n"), calnote.alarm.timestamp.hour, calnote.alarm.timestamp.minute, calnote.alarm.timestamp.second); fprintf(stdout, _(" Alarm tone %s\n"), calnote.alarm.tone ? _("enabled") : _("disabled")); } fprintf(stdout, _(" %s: "), _("Repeat")); switch (calnote.recurrence) { case GN_CALNOTE_NEVER: case GN_CALNOTE_DAILY: case GN_CALNOTE_WEEKLY: case GN_CALNOTE_2WEEKLY: case GN_CALNOTE_MONTHLY: case GN_CALNOTE_YEARLY: fprintf(stdout,"%s\n", gn_calnote_recurrence2str(calnote.recurrence)); break; default: fprintf(stdout, _("Every %d hours"), calnote.recurrence); break; } if (calnote.recurrence != GN_CALNOTE_NEVER) { fprintf(stdout, _(" The event will be repeated ")); switch (calnote.occurrences) { case 0: fprintf(stdout, _("forever.")); break; default: fprintf(stdout, _("%d times."), calnote.occurrences); break; } fprintf(stdout, "\n"); } fprintf(stdout, _(" Text: %s\n"), calnote.text); switch (calnote.type) { case GN_CALNOTE_CALL: fprintf(stdout, _(" %s: %s\n"), _("Phone"), calnote.phone_number); break; case GN_CALNOTE_MEETING: fprintf(stdout, _(" %s: %s\n"), _("Location"), calnote.mlocation); break; case GN_CALNOTE_BIRTHDAY: case GN_CALNOTE_REMINDER: case GN_CALNOTE_MEMO: /* was already printed as calnote.text above */ break; } } } else { /* error != GN_ERR_NONE */ /* stop processing if the last note was specified as "end" */ if (last_location == INT_MAX) { /* it's not an error if we read at least a note and the rest is empty */ if ((i > first_location) && ((error == GN_ERR_EMPTYLOCATION) || (error == GN_ERR_INVALIDLOCATION))) { error = GN_ERR_NONE; } last_location = 0; } if (error != GN_ERR_NONE) { fprintf(stderr, _("The calendar note can not be read: %s\n"), gn_error_print(error)); } } } return error; } int writecalendarnote_usage(FILE *f, int exitval) { fprintf(f, _("usage: --writecalendarnote vcalendarfile start_number [end_number|end]\n" " vcalendarfile - file containing calendar notes in vCal format\n" " start_number - first calendar note from vcalendarfile to read\n" " end_number - last calendar note from vcalendarfile to read\n" " end - read all notes from vcalendarfile from start_number\n" " NOTE: it stores the note at the first empty location.\n" )); return exitval; } /* Writing calendar notes. */ gn_error writecalendarnote(int argc, char *argv[], gn_data *data, struct gn_statemachine *state) { gn_calnote calnote; gn_error error = GN_ERR_NONE; int first_location, last_location, i; FILE *f; f = fopen(optarg, "r"); if (f == NULL) { fprintf(stderr, _("Can't open file %s for reading!\n"), optarg); return GN_ERR_FAILED; } first_location = gnokii_atoi(argv[optind]); if (errno || first_location < 0) { fclose(f); return writecalendarnote_usage(stderr, -1); } last_location = parse_end_value_option(argc, argv, optind + 1, first_location); if (errno || last_location < 0) { fclose(f); return writecalendarnote_usage(stderr, -1); } for (i = first_location; i <= last_location; i++) { memset(&calnote, 0, sizeof(calnote)); gn_data_clear(data); data->calnote = &calnote; /* TODO: gn_ical2note expects the pointer to begin file to * iterate. Fix it to not rewind the file each time */ rewind(f); error = gn_ical2calnote(f, &calnote, i); #ifndef WIN32 if (error == GN_ERR_NOTIMPLEMENTED) { switch (gn_vcal_file_event_read(optarg, &calnote, i)) { case 0: error = GN_ERR_NONE; break; default: error = GN_ERR_FAILED; break; } } #endif if (error != GN_ERR_NONE) { /* when reading until 'end' it's not an error if it tried to read a non existant note */ if ((last_location == INT_MAX) && (error == GN_ERR_EMPTYLOCATION)) { error = GN_ERR_NONE; } else { fprintf(stderr, _("Failed to load vCalendar file: %s\n"), gn_error_print(error)); } fclose(f); return error; } error = gn_sm_functions(GN_OP_WriteCalendarNote, data, state); if (error == GN_ERR_NONE) fprintf(stderr, _("Successfully written!\n")); else fprintf(stderr, _("Failed to write calendar note: %s\n"), gn_error_print(error)); } fclose(f); return error; } int deletecalendarnote_usage(FILE *f, int exitval) { fprintf(f, _("usage: --deletecalendarnote start_number [end_number | end]\n" " start_number - first number in the phone calendar (numeric)\n" " end_number - until this entry in the phone calendar (numeric, optional)\n" " end - the string \"end\" indicates all entries from start to end\n" " NOTE: if no end is given, only the start entry is deleted\n" )); return exitval; } /* Calendar note deleting. */ gn_error deletecalendarnote(int argc, char *argv[], gn_data *data, struct gn_statemachine *state) { gn_calnote calnote; gn_calnote_list clist; int i, first_location, last_location; gn_error error = GN_ERR_NONE; gn_data_clear(data); memset(&calnote, 0, sizeof(gn_calnote)); data->calnote = &calnote; memset(&clist, 0, sizeof(gn_calnote_list)); data->calnote_list = &clist; first_location = gnokii_atoi(optarg); if (errno || first_location < 0) return deletecalendarnote_usage(stderr, -1); last_location = parse_end_value_option(argc, argv, optind, first_location); if (errno || last_location < 0) return deletecalendarnote_usage(stderr, -1); for (i = first_location; i <= last_location; i++) { calnote.location = i; error = gn_sm_functions(GN_OP_DeleteCalendarNote, data, state); if (error == GN_ERR_NONE) fprintf(stderr, _("Calendar note deleted.\n")); else { fprintf(stderr, _("The calendar note cannot be deleted: %s\n"), gn_error_print(error)); if (last_location == INT_MAX) last_location = 0; } } return error; } gnokii-0.6.31/gnokii/gnokii-sms.c0000644000175000017500000012662711666163120014725 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 1999-2000 Gary Reuter, Reinhold Jordan Copyright (C) 1999-2011 Pawel Kot Copyright (C) 2000-2002 Marcin Wiacek, Chris Kemp, Manfred Jonsson Copyright (C) 2001 Marian Jancar, Bartek Klepacz Copyright (C) 2001-2002 Pavel Machek, Markus Plail Copyright (C) 2002 Ladis Michl, Simon Huggins Copyright (C) 2002-2004 BORBELY Zoltan Copyright (C) 2003 Bertrik Sikken Copyright (C) 2004 Martin Goldhahn Mainline code for gnokii utility. SMS handling code. */ #include "config.h" #include "misc.h" #include "compat.h" #if defined(WIN32) && !defined(CYGWIN) # include # define getpid _getpid #endif #include #include #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #include #include #include #include #include "gnokii-app.h" #include "gnokii.h" /* Outputs summary of all SMS gnokii commands */ void sms_usage(FILE *f) { fprintf(f, _("SMS options:\n" " --sendsms destination [--smsc message_center_number |\n" " --smscno message_center_index] [-r|--report] [-8|--8bit]\n" " [-C|--class n] [-v|--validity n]\n" " [-i|--imelody] [-a|--animation file;file;file;file]\n" " [-o|--concat this;total;serial] [-w|--wappush url]\n" " --savesms [--sender from] [--smsc message_center_number |\n" " --smscno message_center_index] [-f|--folder folder_id]\n" " [-l|--location number] [-s|--sent|-r|--read] [-d|--deliver]\n" " [-t|--datetime YYMMDDHHMMSS]\n" " --getsms memory_type start [end] [-f|--file file]\n" " [-F|--force-file file] [-a|--append-file file]\n" " [-d|--delete]\n" " --deletesms memory_type start [end]\n" " --getsmsc [start_number [end_number]] [-r|--raw]\n" " --setsmsc\n" " --createsmsfolder name\n" " --deletesmsfolder folderid\n" " --showsmsfolderstatus\n" " --smsreader\n")); } /* Displays usage of --sendsms command */ int sendsms_usage(FILE *f, int exitval) { fprintf(f, _(" usage: --sendsms destination recipient number (msisdn)\n" " --smsc message_center_number number (msisdn) of the message\n" " center\n" " --smscno message_center_index index of the message center stored\n" " in the phone memory\n" " -r\n" " --report request delivery report\n" " -v n\n" " --validity n set message validity\n" " -C n\n" " --class n set message class; possible values\n" " are 0, 1, 2, or 3\n" " -8\n" " --8bit set 8bit coding\n" " -i\n" " --imelody send imelody message, text is read\n" " from stdin\n" " -a file;file;file;file\n" " --animation file;file;file;file send animation message\n" " -o this;total;serial\n" " --concat this;total;serial send 'this' part of all 'total' parts\n" " identified by 'serial'\n" " -w url\n" " --wappush url send wappush to the given url\n" "Message text is read from standard input.\n" "\n" )); return exitval; } gn_gsm_number_type get_number_type(const char *number) { gn_gsm_number_type type; if (!number) return GN_GSM_NUMBER_Unknown; if (*number == '+') { type = GN_GSM_NUMBER_International; number++; } else { type = GN_GSM_NUMBER_Unknown; } while (*number) { if (!isdigit(*number)) return GN_GSM_NUMBER_Alphanumeric; number++; } return type; } /* Send SMS messages. */ gn_error sendsms(int argc, char *argv[], gn_data *data, struct gn_statemachine *state) { gn_sms sms; gn_error error; /* The maximum length of an uncompressed concatenated short message is 255 * 153 = 39015 default alphabet characters */ int i, curpos = 0; struct option options[] = { { "smsc", required_argument, NULL, '1' }, { "smscno", required_argument, NULL, '2' }, { "long", required_argument, NULL, 'l' }, { "report", no_argument, NULL, 'r' }, { "validity", required_argument, NULL, 'v' }, { "class", required_argument, NULL, 'C' }, { "8bit", no_argument, NULL, '8' }, { "imelody", no_argument, NULL, 'i' }, { "animation", required_argument, NULL, 'a' }, { "concat", required_argument, NULL, 'o' }, { "wappush", required_argument, NULL, 'w' }, { NULL, 0, NULL, 0 } }; /* The memory is zeroed here */ gn_sms_default_submit(&sms); snprintf(sms.remote.number, sizeof(sms.remote.number), "%s", optarg); sms.remote.type = get_number_type(sms.remote.number); if (sms.remote.type == GN_GSM_NUMBER_Alphanumeric) { dprintf("Invalid phone number\n"); return GN_ERR_WRONGDATAFORMAT; } while ((i = getopt_long(argc, argv, "l:rv:C:8ia:o:w:", options, NULL)) != -1) { switch (i) { /* -c for compression. not yet implemented. */ case '1': /* SMSC number */ snprintf(sms.smsc.number, sizeof(sms.smsc.number), "%s", optarg); sms.smsc.type = get_number_type(sms.smsc.number); break; case '2': /* SMSC number index in phone memory */ data->message_center = calloc(1, sizeof(gn_sms_message_center)); data->message_center->id = gnokii_atoi(optarg); if (errno || data->message_center->id < 1 || data->message_center->id > 5) { free(data->message_center); return sendsms_usage(stderr, -1); } if (gn_sm_functions(GN_OP_GetSMSCenter, data, state) == GN_ERR_NONE) { snprintf(sms.smsc.number, sizeof(sms.smsc.number), "%s", data->message_center->smsc.number); sms.smsc.type = data->message_center->smsc.type; } free(data->message_center); break; case 'l': /* we send long message */ /* ignored. Left for compatibility */ break; case 'a': /* Animation */ { char buf[10240]; char *s = buf, *t; snprintf(buf, sizeof(buf), "%s", optarg); sms.user_data[curpos].type = GN_SMS_DATA_Animation; for (i = 0; i < 4; i++) { t = strchr(s, ';'); if (t) *t++ = 0; loadbitmap(&sms.user_data[curpos].u.animation[i], s, i ? GN_BMP_EMSAnimation2 : GN_BMP_EMSAnimation, state); s = t; } sms.user_data[++curpos].type = GN_SMS_DATA_None; curpos = -1; break; } case 'o': /* Concat header */ { dprintf("Adding concat header\n"); sms.user_data[curpos].type = GN_SMS_DATA_Concat; if (3 != sscanf(optarg, "%d;%d;%d", &sms.user_data[curpos].u.concat.curr, &sms.user_data[curpos].u.concat.total, &sms.user_data[curpos].u.concat.serial)) { fprintf(stderr, _("Incorrect --concat option\n")); break; } curpos++; break; } case 'r': /* request for delivery report */ sms.delivery_report = true; break; case 'C': /* class Message */ switch (*optarg) { case '0': sms.dcs.u.general.m_class = 1; break; case '1': sms.dcs.u.general.m_class = 2; break; case '2': sms.dcs.u.general.m_class = 3; break; case '3': sms.dcs.u.general.m_class = 4; break; default: return sendsms_usage(stderr, -1); } break; case 'v': sms.validity = gnokii_atoi(optarg); if (errno || sms.validity < 0) return sendsms_usage(stderr, -1); break; case '8': sms.dcs.u.general.alphabet = GN_SMS_DCS_8bit; break; case 'i': sms.user_data[0].type = GN_SMS_DATA_iMelody; sms.user_data[1].type = GN_SMS_DATA_None; error = readtext(&sms.user_data[0]); if (error != GN_ERR_NONE) return error; if (sms.user_data[0].length < 1) { fprintf(stderr, _("Empty message. Quitting.\n")); return GN_ERR_INVALIDSIZE; } curpos = -1; break; case 'w': { gn_wap_push wp; int chars_read; char message_buffer[GN_SMS_MAX_LENGTH]; if (!optarg || strlen(optarg) > 255) { fprintf(stderr, _("URL is too long (max 255 chars). Quitting.\n")); return GN_ERR_INVALIDSIZE; } sms.user_data[curpos].type = GN_SMS_DATA_WAPPush; gn_wap_push_init(&wp); memset(message_buffer, 0, sizeof(message_buffer)); fprintf(stderr, _("Please enter SMS text. End your input with :\n")); chars_read = fread(message_buffer, 1, sizeof(message_buffer), stdin); wp.url = optarg; wp.text = message_buffer; if (gn_wap_push_encode(&wp) != GN_ERR_NONE) { fprintf(stderr, _("WAP Push encoding failed!\n")); return GN_ERR_FAILED; } memcpy(sms.user_data[curpos].u.text, wp.data, wp.data_len); sms.user_data[curpos].length = wp.data_len; free(wp.data); sms.user_data[++curpos].type = GN_SMS_DATA_None; curpos = -1; break; } default: return sendsms_usage(stderr, -1); } } if (argc > optind) { /* There are too many arguments that don't start with '-' */ return sendsms_usage(stderr, -1); } if (!sms.smsc.number[0]) { data->message_center = calloc(1, sizeof(gn_sms_message_center)); data->message_center->id = 1; if (gn_sm_functions(GN_OP_GetSMSCenter, data, state) == GN_ERR_NONE) { snprintf(sms.smsc.number, sizeof(sms.smsc.number), "%s", data->message_center->smsc.number); sms.smsc.type = data->message_center->smsc.type; } free(data->message_center); } /* Either GN_OP_GetSMSCenter failed or it succeded and read an empty number */ if (!sms.smsc.number[0]) { fprintf(stderr, _("Cannot read the SMSC number from your phone. If the sms send will fail, please use --smsc option explicitely giving the number.\n")); } if (!sms.smsc.type) sms.smsc.type = GN_GSM_NUMBER_Unknown; if (curpos != -1) { error = readtext(&sms.user_data[curpos]); if (error != GN_ERR_NONE) return error; sms.user_data[curpos].type = GN_SMS_DATA_Text; if ((sms.dcs.u.general.alphabet != GN_SMS_DCS_8bit) && !gn_char_def_alphabet(sms.user_data[curpos].u.text)) sms.dcs.u.general.alphabet = GN_SMS_DCS_UCS2; sms.user_data[++curpos].type = GN_SMS_DATA_None; } data->sms = &sms; /* Send the message. */ error = gn_sms_send(data, state); if (error == GN_ERR_NONE) { if (sms.parts > 1) { int j; fprintf(stderr, _("Message sent in %d parts with reference numbers:"), sms.parts); for (j = 0; j < sms.parts; j++) fprintf(stderr, " %d", sms.reference[j]); fprintf(stderr, "\n"); } else fprintf(stderr, _("Send succeeded with reference %d!\n"), sms.reference[0]); } else fprintf(stderr, _("SMS Send failed (%s)\n"), gn_error_print(error)); free(sms.reference); return error; } /* Displays usage of --savesms command */ int savesms_usage(FILE *f, int exitval) { fprintf(f, _(" usage: --savesms\n" " --smsc message_center_number number (msisdn) of the message\n" " center\n" " --smscno message_center_index index of the message center stored\n" " in the phone memory\n" " --sender msisdn set sender number\n" " -l n\n" " --location n save message at location n\n" " -r\n" " --read mark message as read\n" " -s\n" " --sent mark message as sent\n" " -f ID\n" " --folder ID save message to the folder ID where\n" " is of type IN, OU...\n" " -d\n" " --deliver set message type as sms deliver\n" " (to be sent)\n" " -t YYMMDDHHMISS\n" " --datetime YYMMDDHHMISS set date and time of message delivery\n" "Message text is read from standard input.\n" "\n" )); return exitval; } gn_error savesms(int argc, char *argv[], gn_data *data, struct gn_statemachine *state) { gn_sms sms; gn_error error = GN_ERR_INTERNALERROR; int i; char tmp[3]; #if 0 int confirm = -1; int interactive = 0; char ans[8]; #endif struct option options[] = { { "smsc", required_argument, NULL, '0' }, { "smscno", required_argument, NULL, '1' }, { "sender", required_argument, NULL, '2' }, { "location", required_argument, NULL, 'l' }, { "read", 0, NULL, 'r' }, { "sent", 0, NULL, 's' }, { "folder", required_argument, NULL, 'f' }, { "deliver", 0 , NULL, 'd' }, { "datetime", required_argument, NULL, 't' }, { NULL, 0, NULL, 0 } }; char memory_type[20] = ""; struct tm *now; time_t nowh; nowh = time(NULL); now = localtime(&nowh); gn_sms_default_submit(&sms); sms.smsc_time.year = now->tm_year; sms.smsc_time.month = now->tm_mon+1; sms.smsc_time.day = now->tm_mday; sms.smsc_time.hour = now->tm_hour; sms.smsc_time.minute = now->tm_min; sms.smsc_time.second = now->tm_sec; sms.smsc_time.timezone = 0; sms.smsc_time.year += 1900; /* nokia 7110 will choke if no number is present when we * try to store a SMS on the phone. maybe others do too * TODO should this be handled here? report an error instead * of setting a default? */ strcpy(sms.remote.number, "0"); sms.remote.type = GN_GSM_NUMBER_International; sms.number = 0; /* Option parsing */ while ((i = getopt_long(argc, argv, "l:rsf:dt:", options, NULL)) != -1) { switch (i) { case '0': /* SMSC number */ snprintf(sms.smsc.number, sizeof(sms.smsc.number), "%s", optarg); sms.smsc.type = get_number_type(sms.smsc.number); break; case '1': /* SMSC number index in phone memory */ data->message_center = calloc(1, sizeof(gn_sms_message_center)); data->message_center->id = gnokii_atoi(optarg); if (errno || data->message_center->id < 1 || data->message_center->id > 5) { free(data->message_center); return savesms_usage(stderr, -1); } if (gn_sm_functions(GN_OP_GetSMSCenter, data, state) == GN_ERR_NONE) { snprintf(sms.smsc.number, sizeof(sms.smsc.number), "%s", data->message_center->smsc.number); sms.smsc.type = data->message_center->smsc.type; } free(data->message_center); break; case '2': /* sender number */ snprintf(sms.remote.number, GN_BCD_STRING_MAX_LENGTH, "%s", optarg); sms.remote.type = get_number_type(sms.remote.number); break; case 'l': /* location to write to */ sms.number = gnokii_atoi(optarg); if (errno || sms.number < 0) return savesms_usage(stderr, -1); break; case 's': /* mark the message as sent */ case 'r': /* mark the message as read */ sms.status = GN_SMS_Sent; break; #if 0 case 'i': /* Ask before overwriting */ interactive = 1; break; #endif case 'f': /* Specify the folder where to save the message */ snprintf(memory_type, 19, "%s", optarg); if (gn_str2memory_type(memory_type) == GN_MT_XX) { fprintf(stderr, _("Unknown memory type %s (use ME, SM, IN, OU, ...)!\n"), optarg); fprintf(stderr, _("Run gnokii --showsmsfolderstatus for a list of supported memory types.\n")); return GN_ERR_INVALIDMEMORYTYPE; } break; case 'd': /* type Deliver */ sms.type = GN_SMS_MT_Deliver; break; case 't': /* set specific date and time of message delivery */ if (strlen(optarg) != 12) { fprintf(stderr, _("Invalid datetime format: %s (should be YYMMDDHHMISS, all digits)!\n"), optarg); return GN_ERR_WRONGDATAFORMAT; } for (i = 0; i < 12; i++) if (!isdigit(optarg[i])) { fprintf(stderr, _("Invalid datetime format: %s (should be YYMMDDHHMISS, all digits)!\n"), optarg); return GN_ERR_WRONGDATAFORMAT; } snprintf(tmp, sizeof(tmp), "%s", optarg); sms.smsc_time.year = atoi(tmp) + 1900; snprintf(tmp, sizeof(tmp), "%s", optarg+2); sms.smsc_time.month = atoi(tmp); snprintf(tmp, sizeof(tmp), "%s", optarg+4); sms.smsc_time.day = atoi(tmp); snprintf(tmp, sizeof(tmp), "%s", optarg+6); sms.smsc_time.hour = atoi(tmp); snprintf(tmp, sizeof(tmp), "%s", optarg+8); sms.smsc_time.minute = atoi(tmp); snprintf(tmp, sizeof(tmp), "%s", optarg+10); sms.smsc_time.second = atoi(tmp); if (!gn_timestamp_isvalid(sms.smsc_time)) { fprintf(stderr, _("Invalid datetime: %s.\n"), optarg); return GN_ERR_WRONGDATAFORMAT; } break; default: return savesms_usage(stderr, -1); } } if (argc > optind) { /* There are too many arguments that don't start with '-' */ return savesms_usage(stderr, -1); } #if 0 if (interactive) { gn_sms aux; aux.number = sms.number; data->sms = &aux; error = gn_sm_functions(GN_OP_GetSMSnoValidate, data, state); switch (error) { case GN_ERR_NONE: fprintf(stderr, _("Message at specified location exists. ")); while (confirm < 0) { fprintf(stderr, _("Overwrite? (yes/no) ")); gn_get_line(stdin, ans, 7); if (!strcmp(ans, _("yes"))) confirm = 1; else if (!strcmp(ans, _("no"))) confirm = 0; } if (!confirm) { return 0; } else break; case GN_ERR_EMPTYLOCATION: /* OK. We can save now. */ break; default: fprintf(stderr, _("Error: %s\n"), gn_error_print(error)); return -1; } } #endif if ((!sms.smsc.number[0]) && (sms.type == GN_SMS_MT_Deliver)) { data->message_center = calloc(1, sizeof(gn_sms_message_center)); data->message_center->id = 1; if (gn_sm_functions(GN_OP_GetSMSCenter, data, state) == GN_ERR_NONE) { snprintf(sms.smsc.number, GN_BCD_STRING_MAX_LENGTH, "%s", data->message_center->smsc.number); dprintf("SMSC number: %s\n", sms.smsc.number); sms.smsc.type = data->message_center->smsc.type; } free(data->message_center); } if (!sms.smsc.type) sms.smsc.type = GN_GSM_NUMBER_Unknown; error = readtext(&sms.user_data[0]); if (error != GN_ERR_NONE) return error; if (sms.user_data[0].length < 1) { fprintf(stderr, _("Empty message. Quitting.\n")); return GN_ERR_WRONGDATAFORMAT; } if (memory_type[0] != '\0') sms.memory_type = gn_str2memory_type(memory_type); sms.user_data[0].type = GN_SMS_DATA_Text; sms.user_data[1].type = GN_SMS_DATA_None; if (!gn_char_def_alphabet(sms.user_data[0].u.text)) sms.dcs.u.general.alphabet = GN_SMS_DCS_UCS2; fprintf(stderr, _("Storing SMS... ")); data->sms = &sms; error = gn_sms_save(data, state); if (error == GN_ERR_NONE) fprintf(stderr, _("Saved to %d!\n"), sms.number); else fprintf(stderr, _("Saving failed (%s)\n"), gn_error_print(error)); return error; } /* Displays usage of --getsms command */ int getsms_usage(FILE *f, int exitval) { fprintf(f, _(" usage: --getsms memory start [end] retrieves messages from memory type (SM, ME,\n" " IN, OU, ...) starting from\n" " location start and ending with end;\n" " if end option is omitted, just one entry\n" " is read;\n" " start must be a number, end may be a number\n" " or 'end' string;\n" " if 'end' is used entries are being read\n" " until empty location\n" " --force-file filename\n" " -F filename save sms to the file overwriting it if\n" " the file already exists;\n" " file is in mbox format\n" " --file filename\n" " -f filename as above but user is prompted before\n" " overwriting the file\n" " --append-file filename\n" " -a filename as above but append to the existing file\n" " --delete\n" " -d delete message after reading\n" "\n" )); return exitval; } /* Get SMS messages. */ gn_error getsms(int argc, char *argv[], gn_data *data, struct gn_statemachine *state) { int i, del = 0; gn_sms_folder folder; gn_sms_folder_list folderlist; gn_sms message; char *memory_type_string; int start_message, end_message, count, mode = 1; int folder_count = -1; int messages_read = 0; char filename[64]; gn_error error = GN_ERR_NONE; gn_bmp bitmap; gn_phone *phone = &state->driver.phone; char ans[5]; struct stat buf; char *message_text; bool cont = true; bool all = false; struct option options[] = { { "delete", no_argument, NULL, 'd' }, { "file", required_argument, NULL, 'f' }, { "force-file", required_argument, NULL, 'F' }, { "append-file",required_argument, NULL, 'a' }, { NULL, 0, NULL, 0 } }; /* Handle command line args that set type, start and end locations. */ memory_type_string = optarg; if (gn_str2memory_type(memory_type_string) == GN_MT_XX) { fprintf(stderr, _("Unknown memory type %s (use ME, SM, IN, OU, ...)!\n"), optarg); fprintf(stderr, _("Run gnokii --showsmsfolderstatus for a list of supported memory types.\n")); return GN_ERR_INVALIDMEMORYTYPE; } start_message = gnokii_atoi(argv[optind]); if (errno || start_message < 0) return getsms_usage(stderr, -1); end_message = parse_end_value_option(argc, argv, optind + 1, start_message); if (errno || end_message < 0) return getsms_usage(stderr, -1); /* Let's determine number of messages in given folder */ if (end_message == INT_MAX) { gn_error e; int j; all = true; memset(&folderlist, 0, sizeof(folderlist)); gn_data_clear(data); data->sms_folder_list = &folderlist; e = gn_sm_functions(GN_OP_GetSMSFolders, data, state); if (e == GN_ERR_NONE) { for (j = 0; j < folderlist.number; j++) { data->sms_folder = folderlist.folder + j; if (folderlist.folder_id[j] == gn_str2memory_type(memory_type_string)) { e = gn_sm_functions(GN_OP_GetSMSFolderStatus, data, state); if (e == GN_ERR_NONE) { folder_count = folderlist.folder[j].number; dprintf("Folder %s (%s) has %u messages\n", folderlist.folder[j].name, gn_memory_type2str(folderlist.folder_id[j]), folderlist.folder[j].number); } } } } } *filename = '\0'; /* parse all options (beginning with '-') */ while ((i = getopt_long(argc, argv, "f:F:a:d", options, NULL)) != -1) { switch (i) { case 'd': del = 1; dprintf("del\n"); break; /* append mode */ case 'a': mode = 2; goto parsefile; /* force mode -- don't ask to overwrite */ case 'F': mode = 0; case 'f': parsefile: if (optarg) { snprintf(filename, sizeof(filename), "%s", optarg); fprintf(stderr, _("Saving into %s\n"), filename); } else return getsms_usage(stderr, -1); break; default: return getsms_usage(stderr, -1); } } if (argc - optind > 3) { /* There are too many arguments that don't start with '-' */ return getsms_usage(stderr, -1); } folder.folder_id = 0; data->sms_folder = &folder; data->sms_folder_list = &folderlist; count = start_message; /* Now retrieve the requested entries. */ while (cont) { bool done = false; int offset = 0; memset(&message, 0, sizeof(gn_sms)); message.memory_type = gn_str2memory_type(memory_type_string); message.number = count; data->sms = &message; dprintf("Getting message #%d from %s\n", count, memory_type_string); error = gn_sms_get(data, state); switch (error) { case GN_ERR_NONE: messages_read++; message_text = NULL; fprintf(stdout, _("%d. %s (%s)\n"), message.number, gn_sms_message_type2str(message.type), gn_sms_message_status2str(message.status)); switch (message.type) { case GN_SMS_MT_StatusReport: fprintf(stdout, _("Sending date/time: %02d/%02d/%04d %02d:%02d:%02d "), \ message.smsc_time.day, message.smsc_time.month, message.smsc_time.year, \ message.smsc_time.hour, message.smsc_time.minute, message.smsc_time.second); if (message.smsc_time.timezone) { /* Translators: this format is for printing a timezone with a leading +/- */ fprintf(stdout,_("%+03d00"), message.smsc_time.timezone); } fprintf(stdout, "\n"); fprintf(stdout, _("Delivery date/time: %02d/%02d/%04d %02d:%02d:%02d "), \ message.time.day, message.time.month, message.time.year, \ message.time.hour, message.time.minute, message.time.second); if (message.time.timezone) { /* Translators: this format is for printing a timezone with a leading +/- */ fprintf(stdout,_("%+03d00"), message.time.timezone); } fprintf(stdout, "\n"); fprintf(stdout, _("Recipient: %s Msg Center: %s\n"), message.remote.number, message.smsc.number); fprintf(stdout, _("Text:\n")); message_text = message.user_data[0].u.text; break; case GN_SMS_MT_Picture: case GN_SMS_MT_PictureTemplate: fprintf(stdout, _("Date/time: %02d/%02d/%04d %02d:%02d:%02d "), \ message.smsc_time.day, message.smsc_time.month, message.smsc_time.year, \ message.smsc_time.hour, message.smsc_time.minute, message.smsc_time.second); if (message.smsc_time.timezone) { /* Translators: this format is for printing a timezone with a leading +/- */ fprintf(stdout,_("%+03d00"), message.smsc_time.timezone); } fprintf(stdout, "\n"); fprintf(stdout, _("Sender: %s Msg Center: %s\n"), message.remote.number, message.smsc.number); fprintf(stdout, _("Bitmap:\n")); gn_bmp_print(&message.user_data[0].u.bitmap, stdout); fprintf(stdout, _("Text:\n")); message_text = message.user_data[1].u.text; break; default: fprintf(stdout, _("Date/time: %02d/%02d/%04d %02d:%02d:%02d "), \ message.smsc_time.day, message.smsc_time.month, message.smsc_time.year, \ message.smsc_time.hour, message.smsc_time.minute, message.smsc_time.second); if (message.smsc_time.timezone) { /* Translators: this format is for printing a timezone with a leading +/- */ fprintf(stdout,_("%+03d00"), message.smsc_time.timezone); } fprintf(stdout, "\n"); switch (message.type) { case GN_SMS_MT_Submit: case GN_SMS_MT_SubmitSent: fprintf(stdout, _("Recipient: %s Msg Center: %s\n"), message.remote.number, message.smsc.number); break; default: fprintf(stdout, _("Sender: %s Msg Center: %s\n"), message.remote.number, message.smsc.number); break; } /* No UDH */ if (!message.udh.number) message.udh.udh[0].type = GN_SMS_UDH_None; fprintf(stdout, _("%s:\n"), gn_sms_udh_type2str(message.udh.udh[0].type)); switch (message.udh.udh[0].type) { case GN_SMS_UDH_None: break; case GN_SMS_UDH_OpLogo: fprintf(stdout, _("GSM operator logo for %s (%s) network.\n"), bitmap.netcode, gn_network_name_get(bitmap.netcode)); if (!strcmp(message.remote.number, "+998000005") && !strcmp(message.smsc.number, "+886935074443")) fprintf(stdout, _("Saved by Logo Express\n")); if (!strcmp(message.remote.number, "+998000002") || !strcmp(message.remote.number, "+998000003")) fprintf(stdout, _("Saved by Operator Logo Uploader by Thomas Kessler\n")); offset = 3; case GN_SMS_UDH_CallerIDLogo: /* put bitmap into bitmap structure */ gn_bmp_sms_read(GN_BMP_OperatorLogo, message.user_data[0].u.text + 2 + offset, message.user_data[0].u.text, &bitmap); gn_bmp_print(&bitmap, stdout); if (*filename) { error = GN_ERR_NONE; /* mode == 1, interactive mode * mode == 0, overwrite mode */ if (mode && (stat(filename, &buf) == 0)) { fprintf(stdout, _("File %s exists.\n"), filename); fprintf(stdout, _("Overwrite? (yes/no) ")); gn_line_get(stdin, ans, 4); if (!strcmp(ans, _("yes"))) { error = gn_file_bitmap_save(filename, &bitmap, phone); } } else error = gn_file_bitmap_save(filename, &bitmap, phone); if (error != GN_ERR_NONE) fprintf(stderr, _("Couldn't save logofile %s!\n"), filename); } done = true; break; case GN_SMS_UDH_Ringtone: done = true; break; case GN_SMS_UDH_ConcatenatedMessages: fprintf(stdout, _("Linked (%d/%d):\n"), message.udh.udh[0].u.concatenated_short_message.current_number, message.udh.udh[0].u.concatenated_short_message.maximum_number); break; case GN_SMS_UDH_WAPvCard: case GN_SMS_UDH_WAPvCalendar: case GN_SMS_UDH_WAPvCardSecure: case GN_SMS_UDH_WAPvCalendarSecure: default: break; } if (done) break; message_text = message.user_data[0].u.text; break; } if (message_text) { fprintf(stdout, "%s\n", message_text); if ((mode != -1) && *filename) { char buf[1024]; char *mbox = gn_sms2mbox(&message, "gnokii"); snprintf(buf, 1023, "%s", filename); mode = writefile(buf, mbox, mode); free(mbox); } } if (del && mode != -1) { data->sms = &message; if (GN_ERR_NONE != gn_sms_delete(data, state)) fprintf(stderr, _("(delete failed)\n")); else fprintf(stderr, _("(message deleted)\n")); } break; default: fprintf(stderr, _("Getting SMS failed (location %d from %s memory)! (%s)\n"), count, memory_type_string, gn_error_print(error)); if (error == GN_ERR_INVALIDMEMORYTYPE) { fprintf(stderr, _("Unknown memory type %s (use ME, SM, IN, OU, ...)!\n"), memory_type_string); fprintf(stderr, _("Run gnokii --showsmsfolderstatus for a list of supported memory types.\n")); } break; } if (mode == -1) cont = false; if (count >= end_message) cont = false; if ((folder_count > 0) && (messages_read >= (folder_count - start_message + 1))) cont = false; /* Avoid infinite loops */ if (all && error != GN_ERR_NONE && error != GN_ERR_EMPTYLOCATION) cont = false; count++; } /* FIXME: We return the value of the last read. * What should we return? */ return error; } /* Displays usage of --deletesms command */ int deletesms_usage(FILE *f, int exitval) { fprintf(f, _(" usage: --deletesms memory start [end] deletes messages from memory type\n" " (SM, ME, IN, OU, ...) starting\n" " from location start and ending with end;\n" " if end option is omitted, just one entry\n" " is removed;\n" " if 'end' is used entries are being removed\n" " until empty location\n" "\n" )); return exitval; } /* Delete SMS messages. */ gn_error deletesms(int argc, char *argv[], gn_data *data, struct gn_statemachine *state) { gn_sms message; gn_sms_folder folder; gn_sms_folder_list folderlist; char *memory_type_string; int start_message, end_message, count; gn_error error = GN_ERR_NONE; /* Handle command line args that set type, start and end locations. */ memory_type_string = optarg; message.memory_type = gn_str2memory_type(memory_type_string); if (message.memory_type == GN_MT_XX) { fprintf(stderr, _("Unknown memory type %s (use ME, SM, IN, OU, ...)!\n"), optarg); fprintf(stderr, _("Run gnokii --showsmsfolderstatus for a list of supported memory types.\n")); return GN_ERR_INVALIDMEMORYTYPE; } start_message = gnokii_atoi(argv[optind]); if (errno || start_message < 0) return deletesms_usage(stderr, -1); end_message = parse_end_value_option(argc, argv, optind + 1, start_message); if (errno || end_message < 0) return deletesms_usage(stderr, -1); /* Now delete the requested entries. */ for (count = start_message; count <= end_message; count++) { message.number = count; data->sms = &message; data->sms_folder = &folder; data->sms_folder_list = &folderlist; error = gn_sms_delete(data, state); if (error == GN_ERR_NONE) fprintf(stderr, _("Deleted SMS (location %d from memory %s)\n"), count, memory_type_string); else { if ((error == GN_ERR_INVALIDLOCATION) && (end_message == INT_MAX) && (count > start_message)) return GN_ERR_NONE; fprintf(stderr, _("Deleting SMS failed (location %d from %s memory)! (%s)\n"), count, memory_type_string, gn_error_print(error)); } } /* FIXME: We return the value of the last read. * What should we return? */ return error; } /* Displays usage of --getsmsc command */ int getsmsc_usage(FILE *f, int exitval) { fprintf(f, _(" usage: --getsmsc [start [end]] reads message center details from\n" " the phone starting with start location\n" " and ending with end location;\n" " no end parameter means to read every\n" " location to the end;\n" " no start parameter means to start with\n" " the first location;\n" "-r\n" "--raw output in raw format (comma separated)\n" " default is human readable form\n" "\n" )); return exitval; } /* Get SMSC number */ gn_error getsmsc(int argc, char *argv[], gn_data *data, struct gn_statemachine *state) { gn_sms_message_center message_center; gn_error error; int start, stop, i; bool raw = false; struct option options[] = { { "raw", no_argument, NULL, 'r'}, { NULL, 0, NULL, 0} }; while ((i = getopt_long(argc, argv, "r", options, NULL)) != -1) { switch (i) { case 'r': raw = true; break; default: return getsmsc_usage(stderr, -1); } } if (argc > optind + 2) { /* There are too many arguments that don't start with '-' */ return getsmsc_usage(stderr, -1); } if (argc > optind) { start = gnokii_atoi(argv[optind]); if (errno || start < 0) return getsmsc_usage(stderr, -1); stop = parse_end_value_option(argc, argv, optind + 1, start); if (errno || stop < 0) return getsmsc_usage(stderr, -1); if (start < 1) { fprintf(stderr, _("SMS center: location number must be greater than 0\n")); return GN_ERR_INVALIDLOCATION; } } else { start = 1; stop = 5; /* FIXME: determine it */ } gn_data_clear(data); data->message_center = &message_center; for (i = start; i <= stop; i++) { memset(&message_center, 0, sizeof(message_center)); message_center.id = i; error = gn_sm_functions(GN_OP_GetSMSCenter, data, state); switch (error) { case GN_ERR_NONE: break; default: /* ignore the error when reading until "end" and at least one entry has alreadly been read */ if ((error == GN_ERR_INVALIDLOCATION) && (stop == INT_MAX) && (i > start)) return GN_ERR_NONE; fprintf(stderr, _("Error: %s\n"), gn_error_print(error)); return error; } if (raw) { fprintf(stdout, "%d;%s;%d;%d;%d;%d;%s;%d;%s\n", message_center.id, message_center.name, message_center.default_name, message_center.format, message_center.validity, message_center.smsc.type, message_center.smsc.number, message_center.recipient.type, message_center.recipient.number); } else { if (message_center.default_name == -1) fprintf(stdout, _("No. %d: \"%s\" (defined name)\n"), message_center.id, message_center.name); else fprintf(stdout, _("No. %d: \"%s\" (default name)\n"), message_center.id, message_center.name); fprintf(stdout, _("SMS center number is %s\n"), message_center.smsc.number); if (message_center.recipient.number[0]) fprintf(stdout, _("Default recipient number is %s\n"), message_center.recipient.number); else fprintf(stdout, _("No default recipient number is defined\n")); fprintf(stdout, _("Messages sent as %s\n"), gn_sms_message_format2str(message_center.format)); fprintf(stdout, _("Message validity is %s\n"), gn_sms_vp_time2str(message_center.validity)); } } return GN_ERR_NONE; } /* Displays usage of --setsmsc command */ int setsmsc_usage(FILE *f, int exitval) { fprintf(f, _(" usage: --setsmsc\n" "SMSC details are read from standard input.\n" "\n" )); return exitval; } /* Set SMSC number */ gn_error setsmsc(gn_data *data, struct gn_statemachine *state) { gn_sms_message_center message_center; gn_error error; char line[256], ch; int n; gn_data_clear(data); data->message_center = &message_center; while (fgets(line, sizeof(line), stdin)) { n = strlen(line); if (n > 0 && line[n-1] == '\n') { line[--n] = 0; } memset(&message_center, 0, sizeof(message_center)); n = sscanf(line, "%d;%19[^;];%d;%d;%d;%d;%39[^;];%d;%39[^;\n]%c", &message_center.id, message_center.name, &message_center.default_name, (int *)&message_center.format, (int *)&message_center.validity, (int *)&message_center.smsc.type, message_center.smsc.number, (int *)&message_center.recipient.type, message_center.recipient.number, &ch); switch (n) { case 6: message_center.smsc.number[0] = 0; case 7: message_center.recipient.number[0] = 0; case 8: break; default: fprintf(stderr, _("Input line format isn't valid\n")); return GN_ERR_WRONGDATAFORMAT; } error = gn_sm_functions(GN_OP_SetSMSCenter, data, state); if (error != GN_ERR_NONE) { fprintf(stderr, _("Error: %s\n"), gn_error_print(error)); return error; } } return GN_ERR_NONE; } /* Displays usage of --createsmsfolder command */ int createsmsfolder_usage(FILE *f, int exitval) { fprintf(f, _(" usage: --createsmsfolder name creates SMS folder with given name\n" "\n" )); return exitval; } /* Creating SMS folder. */ gn_error createsmsfolder(char *name, gn_data *data, struct gn_statemachine *state) { gn_sms_folder folder; gn_error error; gn_data_clear(data); snprintf(folder.name, GN_SMS_FOLDER_NAME_MAX_LENGTH, "%s", name); data->sms_folder = &folder; error = gn_sm_functions(GN_OP_CreateSMSFolder, data, state); if (error != GN_ERR_NONE) fprintf(stderr, _("Error: %s\n"), gn_error_print(error)); else fprintf(stderr, _("Folder with name: %s successfully created!\n"), folder.name); return error; } /* Displays usage of --deletesmsfolder command */ int deletesmsfolder_usage(FILE *f, int exitval) { fprintf(f, _(" usage: --deletesmsfolder folderid removes SMS folder with given id\n" "\n" )); return exitval; } /* Deleting SMS folder. */ gn_error deletesmsfolder(char *number, gn_data *data, struct gn_statemachine *state) { gn_sms_folder folder; gn_error error; gn_data_clear(data); folder.folder_id = gnokii_atoi(number); if (!errno && folder.folder_id > 0 && folder.folder_id <= GN_SMS_FOLDER_MAX_NUMBER) data->sms_folder = &folder; else { fprintf(stderr, _("Error: Number must be between 1 and %i!\n"), GN_SMS_FOLDER_MAX_NUMBER); return GN_ERR_INVALIDLOCATION; } error = gn_sm_functions(GN_OP_DeleteSMSFolder, data, state); if (error != GN_ERR_NONE) fprintf(stderr, _("Error: %s\n"), gn_error_print(error)); else fprintf(stderr, _("Number %i of 'My Folders' successfully deleted!\n"), folder.folder_id); return error; } /* Displays usage of --showsmsfolderstatus command */ int showsmsfolderstatus_usage(FILE *f, int exitval) { fprintf(f, _(" usage: --showsmsfolderstatus shows summary of SMS folders\n" "\n" )); return exitval; } gn_error showsmsfolderstatus(gn_data *data, struct gn_statemachine *state) { gn_sms_folder_list folders; gn_error error; int i; memset(&folders, 0, sizeof(folders)); gn_data_clear(data); data->sms_folder_list = &folders; if ((error = gn_sm_functions(GN_OP_GetSMSFolders, data, state)) != GN_ERR_NONE) { fprintf(stderr, _("Cannot list available folders: %s\n"), gn_error_print(error)); return error; } fprintf(stdout, _("No. Name Id #Msg\n")); fprintf(stdout, _("========================================================\n")); for (i = 0; i < folders.number; i++) { data->sms_folder = folders.folder + i; if ((error = gn_sm_functions(GN_OP_GetSMSFolderStatus, data, state)) != GN_ERR_NONE) { fprintf(stderr, _("Cannot get status of folder \"%s\": %s\n"), folders.folder[i].name, gn_error_print(error)); return error; } fprintf(stdout, _("%3d %-42s %4s %4u\n"), i, folders.folder[i].name, gn_memory_type2str(folders.folder_id[i]), folders.folder[i].number); } return GN_ERR_NONE; } /* SMS handler for --smsreader mode */ static gn_error smsslave(gn_sms *message, struct gn_statemachine *state, void *callback_data) { FILE *output; char *s = message->user_data[0].u.text; char buf[10240]; int i = message->number; int i1, i2, msgno, msgpart; static int unknown = 0; char c, number[GN_BCD_STRING_MAX_LENGTH]; char *p = message->remote.number; const char *smsdir = "/tmp/sms"; if (p[0] == '+') { p++; } snprintf(number, sizeof(number), "%s", p); fprintf(stderr, _("SMS received from number: %s\n"), number); /* From Pavel Machek's email to the gnokii-ml (msgid: <20020414212455.GB9528@elf.ucw.cz>): * It uses fixed format of provider in CR. If your message matches * WWW1/1:1234-5678 where 1234 is msgno and 5678 is msgpart, it should * work. */ while (*s == 'W') s++; fprintf(stderr, _("Got message %d: %s\n"), i, s); if ((sscanf(s, "%d/%d:%d-%c-", &i1, &i2, &msgno, &c) == 4) && (c == 'X')) snprintf(buf, sizeof(buf), "%s/mail_%d_", smsdir, msgno); else if (sscanf(s, "%d/%d:%d-%d-", &i1, &i2, &msgno, &msgpart) == 4) snprintf(buf, sizeof(buf), "%s/mail_%d_%03d", smsdir, msgno, msgpart); else snprintf(buf, sizeof(buf), "%s/sms_%s_%d_%d", smsdir, number, getpid(), unknown++); if ((output = fopen(buf, "r")) != NULL) { fprintf(stderr, _("### Exists?!\n")); fclose(output); return GN_ERR_FAILED; } mkdir(smsdir, 0700); if ((output = fopen(buf, "w+")) == NULL) { fprintf(stderr, _("### Cannot create file %s\n"), buf); return GN_ERR_FAILED; } /* Skip formatting chars */ if (!strstr(buf, "mail")) fprintf(output, "%s", message->user_data[0].u.text); else { s = message->user_data[0].u.text; while (!(*s == '-')) s++; s++; while (!(*s == '-')) s++; s++; fprintf(output, "%s", s); } fclose(output); return GN_ERR_NONE; } /* Displays usage of --smsreader command */ int smsreader_usage(FILE *f, int exitval) { fprintf(f, _(" usage: --smsreader periodically check sms on the phone and stores them\n" " in mbox format\n" "\n" )); return exitval; } gn_error smsreader(gn_data *data, struct gn_statemachine *state) { gn_error error; data->on_sms = smsslave; data->callback_data = NULL; error = gn_sm_functions(GN_OP_OnSMS, data, state); if (!error) { /* We do not want to see texts forever - press Ctrl+C to stop. */ signal(SIGINT, interrupted); fprintf(stderr, _("Entered sms reader mode...\n")); while (!bshutdown) { gn_sm_loop(1, state); /* Some phones may not be able to notify us, thus we give lowlevel chance to poll them */ error = gn_sm_functions(GN_OP_PollSMS, data, state); } fprintf(stderr, _("Shutting down\n")); fprintf(stderr, _("Exiting sms reader mode...\n")); data->on_sms = NULL; error = gn_sm_functions(GN_OP_OnSMS, data, state); if (error != GN_ERR_NONE) fprintf(stderr, _("Error: %s\n"), gn_error_print(error)); } else fprintf(stderr, _("Error: %s\n"), gn_error_print(error)); return error; } gnokii-0.6.31/gnokii/gnokii-security.c0000644000175000017500000001761411666163120015765 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 1999-2000 Gary Reuter, Reinhold Jordan Copyright (C) 1999-2006 Pawel Kot Copyright (C) 2000-2002 Marcin Wiacek, Chris Kemp, Manfred Jonsson Copyright (C) 2001 Marian Jancar, Bartek Klepacz Copyright (C) 2001-2002 Pavel Machek, Markus Plail Copyright (C) 2002 Ladis Michl, Simon Huggins Copyright (C) 2002-2004 BORBELY Zoltan Copyright (C) 2003 Bertrik Sikken Copyright (C) 2004 Martin Goldhahn Mainline code for gnokii utility. Security setting handling functions. */ #include "config.h" #include "misc.h" #include "compat.h" #include #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #include #ifdef WIN32 # include #endif #include "gnokii-app.h" #include "gnokii.h" void security_usage(FILE *f) { fprintf(f, _( "Security options:\n" " --identify\n" " --getlocksinfo\n" )); #ifdef SECURITY fprintf(f, _( " --entersecuritycode PIN|PIN2|PUK|PUK2|SEC [COMMAND]\n" " --getsecuritycodestatus\n" " --getsecuritycode\n" " --changesecuritycode PIN|PIN2|PUK|PUK2\n" )); #endif } gn_error identify(struct gn_statemachine *state) { fprintf(stdout, _("IMEI : %s\n"), gn_lib_get_phone_imei(state)); fprintf(stdout, _("Manufacturer : %s\n"), gn_lib_get_phone_manufacturer(state)); fprintf(stdout, _("Model : %s\n"), gn_lib_get_phone_model(state)); fprintf(stdout, _("Product name : %s\n"), gn_lib_get_phone_product_name(state)); fprintf(stdout, _("Revision : %s\n"), gn_lib_get_phone_revision(state)); return gn_lib_lasterror(state); } gn_error getlocksinfo(gn_data *data, struct gn_statemachine *state) { gn_locks_info locks_info[4]; gn_error error; char *locks_names[] = {"MCC+MNC", "GID1", "GID2", "MSIN"}; int i; gn_data_clear(data); data->locks_info = locks_info; if ((error = gn_sm_functions(GN_OP_GetLocksInfo, data, state)) != GN_ERR_NONE) { fprintf(stderr, _("Error: %s\n"), gn_error_print(error)); return error; } for (i = 0; i < 4; i++) { fprintf(stdout, _("%7s : %10s, %7s, %6s, counter %d\n"), locks_names[i], locks_info[i].data, locks_info[i].userlock ? "user" : "factory", locks_info[i].closed ? "CLOSED" : "open", locks_info[i].counter); } return GN_ERR_NONE; } #ifdef SECURITY gn_error getsecuritycode(gn_data *data, struct gn_statemachine *state) { gn_error error; gn_security_code sc; memset(&sc, 0, sizeof(sc)); sc.type = GN_SCT_SecurityCode; data->security_code = ≻ fprintf(stderr, _("Getting security code... \n")); error = gn_sm_functions(GN_OP_GetSecurityCode, data, state); switch (error) { case GN_ERR_NONE: fprintf(stdout, _("Security code is: %s\n"), sc.code); break; default: fprintf(stderr, _("Error: %s\n"), gn_error_print(error)); break; } return error; } static int get_password(const char *prompt, char *pass, int length) { int fd = fileno(stdin); int count; if (isatty(fd)) { #ifdef HAVE_GETPASS const char *s; /* FIXME: man getpass says it was removed in POSIX.1-2001 */ s = getpass(prompt); if (s) { strncpy(pass, s, length - 1); pass[length - 1] = '\0'; return strlen(pass); } return -1; #else fprintf(stdout, "%s", prompt); #endif } if (fgets(pass, length, stdin)) { /* Strip trailing newline like getpass() would do */ for (count = 0; pass[count] && pass[count] != '\n'; count++) ; pass[count] = '\0'; return count; } return -1; } int entersecuritycode_usage(FILE *f, int exitval) { fprintf(f, _(" usage: --entersecuritycode PIN|PIN2|PUK|PUK2|SEC\n")); return exitval; } /* In this mode we get the code from the keyboard and send it to the mobile phone. */ gn_error entersecuritycode(char *type, gn_data *data, struct gn_statemachine *state) { gn_error error; gn_security_code security_code; if (!strcmp(type, "PIN")) security_code.type = GN_SCT_Pin; else if (!strcmp(type, "PUK")) security_code.type = GN_SCT_Puk; else if (!strcmp(type, "PIN2")) security_code.type = GN_SCT_Pin2; else if (!strcmp(type, "PUK2")) security_code.type = GN_SCT_Puk2; else if (!strcmp(type, "SEC")) security_code.type = GN_SCT_SecurityCode; else return entersecuritycode_usage(stderr, -1); memset(&security_code.code, 0, sizeof(security_code.code)); get_password(_("Enter your code: "), security_code.code, sizeof(security_code.code)); gn_data_clear(data); data->security_code = &security_code; error = gn_sm_functions(GN_OP_EnterSecurityCode, data, state); switch (error) { case GN_ERR_NONE: fprintf(stderr, _("Code ok.\n")); break; default: fprintf(stderr, _("Error: %s\n"), gn_error_print(error)); break; } return error; } gn_error getsecuritycodestatus(gn_data *data, struct gn_statemachine *state) { gn_security_code security_code; gn_error err; gn_data_clear(data); data->security_code = &security_code; err = gn_sm_functions(GN_OP_GetSecurityCodeStatus, data, state); if (err == GN_ERR_NONE) { fprintf(stdout, _("Security code status: ")); switch(security_code.type) { case GN_SCT_SecurityCode: fprintf(stdout, _("waiting for Security Code.\n")); break; case GN_SCT_Pin: fprintf(stdout, _("waiting for PIN.\n")); break; case GN_SCT_Pin2: fprintf(stdout, _("waiting for PIN2.\n")); break; case GN_SCT_Puk: fprintf(stdout, _("waiting for PUK.\n")); break; case GN_SCT_Puk2: fprintf(stdout, _("waiting for PUK2.\n")); break; case GN_SCT_None: fprintf(stdout, _("nothing to enter.\n")); break; default: fprintf(stdout, _("unknown\n")); break; } } else fprintf(stderr, _("Error: %s\n"), gn_error_print(err)); return err; } int changesecuritycode_usage(FILE *f, int exitval) { fprintf(f, _(" usage: --changesecuritycode PIN|PIN2|PUK|PUK2\n")); return exitval; } gn_error changesecuritycode(char *type, gn_data *data, struct gn_statemachine *state) { gn_error error; gn_security_code security_code; char newcode2[10]; memset(&security_code, 0, sizeof(security_code)); if (!strcmp(type, "PIN")) security_code.type = GN_SCT_Pin; else if (!strcmp(type, "PUK")) security_code.type = GN_SCT_Puk; else if (!strcmp(type, "PIN2")) security_code.type = GN_SCT_Pin2; else if (!strcmp(type, "PUK2")) security_code.type = GN_SCT_Puk2; /* FIXME: Entering of security_code does not work :-( else if (!strcmp(type, "security_code")) security_code.type = GN_SCT_security_code; */ else return changesecuritycode_usage(stderr, -1); get_password(_("Enter your code: "), security_code.code, sizeof(security_code.code)); get_password(_("Enter new code: "), security_code.new_code, sizeof(security_code.new_code)); get_password(_("Retype new code: "), newcode2, sizeof(newcode2)); if (strcmp(security_code.new_code, newcode2)) { fprintf(stderr, _("Error: new code differs\n")); return GN_ERR_FAILED; } gn_data_clear(data); data->security_code = &security_code; error = gn_sm_functions(GN_OP_ChangeSecurityCode, data, state); switch (error) { case GN_ERR_NONE: fprintf(stderr, _("Code changed.\n")); break; default: fprintf(stderr, _("Error: %s\n"), gn_error_print(error)); break; } return error; } #endif gnokii-0.6.31/gnokii/gnokii-monitor.c0000644000175000017500000003647511666163120015613 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 1999-2000 Gary Reuter, Reinhold Jordan Copyright (C) 1999-2006 Pawel Kot Copyright (C) 2000-2002 Marcin Wiacek, Chris Kemp, Manfred Jonsson Copyright (C) 2001 Marian Jancar, Bartek Klepacz Copyright (C) 2001-2002 Pavel Machek, Markus Plail Copyright (C) 2002 Ladis Michl, Simon Huggins Copyright (C) 2002-2004 BORBELY Zoltan Copyright (C) 2003 Bertrik Sikken Copyright (C) 2004 Martin Goldhahn Mainline code for gnokii utility. Monitor functions. */ #include "config.h" #include "misc.h" #include "compat.h" #include #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #include #include #ifndef WIN32 # include #else /* # include */ #endif #include "gnokii-app.h" #include "gnokii.h" static gn_cb_message cb_queue[16]; static int cb_ridx = 0; static int cb_widx = 0; void monitor_usage(FILE *f) { fprintf(f, _("Monitoring options:\n" " --monitor [delay|once]\n" " --getdisplaystatus\n" " --displayoutput\n" " --netmonitor {reset|off|field|devel|next|nr}\n" )); } static void callnotifier(gn_call_status call_status, gn_call_info *call_info, struct gn_statemachine *state, void *callback_data) { switch (call_status) { case GN_CALL_Incoming: fprintf(stdout, _("INCOMING CALL: ID: %d, Number: %s, Name: \"%s\"\n"), call_info->call_id, call_info->number, call_info->name); break; case GN_CALL_LocalHangup: fprintf(stdout, _("CALL %d TERMINATED (LOCAL)\n"), call_info->call_id); break; case GN_CALL_RemoteHangup: fprintf(stdout, _("CALL %d TERMINATED (REMOTE)\n"), call_info->call_id); break; case GN_CALL_Established: fprintf(stdout, _("CALL %d ACCEPTED BY THE REMOTE SIDE\n"), call_info->call_id); break; case GN_CALL_Held: fprintf(stdout, _("CALL %d PLACED ON HOLD\n"), call_info->call_id); break; case GN_CALL_Resumed: fprintf(stdout, _("CALL %d RETRIEVED FROM HOLD\n"), call_info->call_id); break; default: break; } gn_call_notifier(call_status, call_info, state); } static void storecbmessage(gn_cb_message *message, struct gn_statemachine *state, void *callback_data) { if (cb_queue[cb_widx].is_new) { /* queue is full */ return; } cb_queue[cb_widx] = *message; cb_widx = (cb_widx + 1) % (sizeof(cb_queue) / sizeof(gn_cb_message)); } static gn_error readcbmessage(gn_cb_message *message) { if (!cb_queue[cb_ridx].is_new) return GN_ERR_NONEWCBRECEIVED; *message = cb_queue[cb_ridx]; cb_queue[cb_ridx].is_new = false; cb_ridx = (cb_ridx + 1) % (sizeof(cb_queue) / sizeof(gn_cb_message)); return GN_ERR_NONE; } static void displaycall(int call_id) { /* FIXME!!! */ #ifndef WIN32 gn_call *call; struct timeval now, delta; char *s; if ((call = gn_call_get_active(call_id)) == NULL) { fprintf(stdout, _("CALL%d: IDLE\n"), call_id); return; } gettimeofday(&now, NULL); switch (call->status) { case GN_CALL_Ringing: case GN_CALL_Incoming: s = _("RINGING"); timersub(&now, &call->start_time, &delta); break; case GN_CALL_Dialing: s = _("DIALING"); timersub(&now, &call->start_time, &delta); break; case GN_CALL_Established: s = _("ESTABLISHED"); timersub(&now, &call->answer_time, &delta); break; case GN_CALL_Held: s = _("ON HOLD"); timersub(&now, &call->answer_time, &delta); break; default: s = _("UNKNOWN STATE"); memset(&delta, 0, sizeof(delta)); break; } fprintf(stdout, _("CALL%d: %s %s (%s) (callid: %d, duration: %d sec)\n"), call_id, s, call->remote_number, call->remote_name, call->call_id, (int)delta.tv_sec); #endif } /* Same code is for getnetworkinfo */ void networkinfo_print(gn_network_info *info, void *callback_data) { int cid, lac; /* Ugly, ugly, ... */ if (info->cell_id[2] == 0 && info->cell_id[3] == 0) cid = (info->cell_id[0] << 8) + info->cell_id[1]; else cid = (info->cell_id[0] << 24) + (info->cell_id[1] << 16) + (info->cell_id[2] << 8) + info->cell_id[3]; lac = (info->LAC[0] << 8) + info->LAC[1]; fprintf(stdout, _("LAC: %04x (%d), CellID: %08x (%d)\n"), lac, lac, cid, cid); } gn_error monitormode(int argc, char *argv[], gn_data *data, struct gn_statemachine *state) { float rflevel = -1, batterylevel = -1; gn_power_source powersource = -1; gn_rf_unit rfunit = GN_RF_Arbitrary; gn_battery_unit battunit = GN_BU_Arbitrary; gn_error error; int i, d; gn_network_info networkinfo; gn_cb_message cbmessage; gn_memory_status simmemorystatus = {GN_MT_SM, 0, 0}; gn_memory_status phonememorystatus = {GN_MT_ME, 0, 0}; gn_memory_status dc_memorystatus = {GN_MT_DC, 0, 0}; gn_memory_status en_memorystatus = {GN_MT_EN, 0, 0}; gn_memory_status fd_memorystatus = {GN_MT_FD, 0, 0}; gn_memory_status ld_memorystatus = {GN_MT_LD, 0, 0}; gn_memory_status mc_memorystatus = {GN_MT_MC, 0, 0}; gn_memory_status on_memorystatus = {GN_MT_ON, 0, 0}; gn_memory_status rc_memorystatus = {GN_MT_RC, 0, 0}; gn_sms_status smsstatus = {0, 0, 0, 0}; errno = 0; if (argc > optind) { d = !strcasecmp(argv[optind], "once") ? -1 : gnokii_atoi(argv[optind]); if (errno) { fprintf(stderr, _("Argument to --monitor delay needs to be positive number\n")); return GN_ERR_FAILED; } } else d = 1; gn_data_clear(data); /* * We do not want to monitor serial line forever - press Ctrl+C to * stop the monitoring mode. */ signal(SIGINT, interrupted); fprintf(stderr, _("Entering monitor mode...\n")); /* * Loop here indefinitely - allows you to see messages from GSM code * in response to unknown messages etc. The loops ends after pressing * the Ctrl+C. */ data->rf_unit = &rfunit; data->rf_level = &rflevel; data->battery_unit = &battunit; data->battery_level = &batterylevel; data->power_source = &powersource; data->sms_status = &smsstatus; data->network_info = &networkinfo; data->on_cell_broadcast = storecbmessage; data->call_notification = callnotifier; data->reg_notification = networkinfo_print; data->callback_data = NULL; gn_sm_functions(GN_OP_SetCallNotification, data, state); memset(cb_queue, 0, sizeof(cb_queue)); cb_ridx = 0; cb_widx = 0; gn_sm_functions(GN_OP_SetCellBroadcast, data, state); memset(&networkinfo, 0, sizeof(gn_network_info)); if (gn_sm_functions(GN_OP_GetNetworkInfo, data, state) == GN_ERR_NONE) { fprintf(stdout, _("Network: %s, %s (%s)\n"), gn_network_name_get(networkinfo.network_code), gn_country_name_get(networkinfo.network_code), (networkinfo.network_code ? networkinfo.network_code : _("undefined"))); networkinfo_print(&networkinfo, NULL); } while (!bshutdown) { if (gn_sm_functions(GN_OP_GetRFLevel, data, state) == GN_ERR_NONE) fprintf(stdout, _("RFLevel: %d\n"), (int)rflevel); if (gn_sm_functions(GN_OP_GetBatteryLevel, data, state) == GN_ERR_NONE) fprintf(stdout, _("Battery: %d\n"), (int)batterylevel); if (gn_sm_functions(GN_OP_GetPowersource, data, state) == GN_ERR_NONE) fprintf(stdout, _("Power Source: %s\n"), gn_power_source2str(powersource)); data->memory_status = &simmemorystatus; if (gn_sm_functions(GN_OP_GetMemoryStatus, data, state) == GN_ERR_NONE) fprintf(stdout, _("SIM: Used %d, Free %d\n"), simmemorystatus.used, simmemorystatus.free); data->memory_status = &phonememorystatus; if (gn_sm_functions(GN_OP_GetMemoryStatus, data, state) == GN_ERR_NONE) fprintf(stdout, _("Phone: Used %d, Free %d\n"), phonememorystatus.used, phonememorystatus.free); data->memory_status = &dc_memorystatus; if (gn_sm_functions(GN_OP_GetMemoryStatus, data, state) == GN_ERR_NONE) fprintf(stdout, _("DC: Used %d, Free %d\n"), dc_memorystatus.used, dc_memorystatus.free); data->memory_status = &en_memorystatus; if (gn_sm_functions(GN_OP_GetMemoryStatus, data, state) == GN_ERR_NONE) fprintf(stdout, _("EN: Used %d, Free %d\n"), en_memorystatus.used, en_memorystatus.free); data->memory_status = &fd_memorystatus; if (gn_sm_functions(GN_OP_GetMemoryStatus, data, state) == GN_ERR_NONE) fprintf(stdout, _("FD: Used %d, Free %d\n"), fd_memorystatus.used, fd_memorystatus.free); data->memory_status = &ld_memorystatus; if (gn_sm_functions(GN_OP_GetMemoryStatus, data, state) == GN_ERR_NONE) fprintf(stdout, _("LD: Used %d, Free %d\n"), ld_memorystatus.used, ld_memorystatus.free); data->memory_status = &mc_memorystatus; if (gn_sm_functions(GN_OP_GetMemoryStatus, data, state) == GN_ERR_NONE) fprintf(stdout, _("MC: Used %d, Free %d\n"), mc_memorystatus.used, mc_memorystatus.free); data->memory_status = &on_memorystatus; if (gn_sm_functions(GN_OP_GetMemoryStatus, data, state) == GN_ERR_NONE) fprintf(stdout, _("ON: Used %d, Free %d\n"), on_memorystatus.used, on_memorystatus.free); data->memory_status = &rc_memorystatus; if (gn_sm_functions(GN_OP_GetMemoryStatus, data, state) == GN_ERR_NONE) fprintf(stdout, _("RC: Used %d, Free %d\n"), rc_memorystatus.used, rc_memorystatus.free); if (gn_sm_functions(GN_OP_GetSMSStatus, data, state) == GN_ERR_NONE) fprintf(stdout, _("SMS Messages: Unread %d, Number %d\n"), smsstatus.unread, smsstatus.number); gn_call_check_active(state); for (i = 0; i < GN_CALL_MAX_PARALLEL; i++) displaycall(i); if (readcbmessage(&cbmessage) == GN_ERR_NONE) fprintf(stdout, _("Cell broadcast received on channel %d: %s\n"), cbmessage.channel, cbmessage.message); if (d < 0) break; sleep(d); } data->on_cell_broadcast = NULL; error = gn_sm_functions(GN_OP_SetCellBroadcast, data, state); fprintf(stderr, _("Leaving monitor mode...\n")); return error; } static void printdisplaystatus(int status) { fprintf(stdout, _("Call in progress: %-3s\n"), status & (1 << GN_DISP_Call_In_Progress) ? _("on") : _("off")); fprintf(stdout, _("Unknown: %-3s\n"), status & (1 << GN_DISP_Unknown) ? _("on") : _("off")); fprintf(stdout, _("Unread SMS: %-3s\n"), status & (1 << GN_DISP_Unread_SMS) ? _("on") : _("off")); fprintf(stdout, _("Voice call: %-3s\n"), status & (1 << GN_DISP_Voice_Call) ? _("on") : _("off")); fprintf(stdout, _("Fax call active: %-3s\n"), status & (1 << GN_DISP_Fax_Call) ? _("on") : _("off")); fprintf(stdout, _("Data call active: %-3s\n"), status & (1 << GN_DISP_Data_Call) ? _("on") : _("off")); fprintf(stdout, _("Keyboard lock: %-3s\n"), status & (1 << GN_DISP_Keyboard_Lock) ? _("on") : _("off")); fprintf(stdout, _("SMS storage full: %-3s\n"), status & (1 << GN_DISP_SMS_Storage_Full) ? _("on") : _("off")); } #ifdef WIN32 # define ESC "\033" #else # define ESC "\e" #endif static void newoutputfn(gn_display_draw_msg *drawmessage) { int x, y, n; static int status; static unsigned char screen[GN_DRAW_SCREEN_MAX_HEIGHT][GN_DRAW_SCREEN_MAX_WIDTH]; static bool init = false; if (!init) { for (y = 0; y < GN_DRAW_SCREEN_MAX_HEIGHT; y++) for (x = 0; x < GN_DRAW_SCREEN_MAX_WIDTH; x++) screen[y][x] = ' '; status = 0; init = true; } fprintf(stdout, ESC "[1;1H"); switch (drawmessage->cmd) { case GN_DISP_DRAW_Clear: for (y = 0; y < GN_DRAW_SCREEN_MAX_HEIGHT; y++) for (x = 0; x < GN_DRAW_SCREEN_MAX_WIDTH; x++) screen[y][x] = ' '; break; case GN_DISP_DRAW_Text: x = drawmessage->data.text.x*GN_DRAW_SCREEN_MAX_WIDTH / 84; y = drawmessage->data.text.y*GN_DRAW_SCREEN_MAX_HEIGHT / 48; n = strlen(drawmessage->data.text.text); if (n > GN_DRAW_SCREEN_MAX_WIDTH) return; if (x + n > GN_DRAW_SCREEN_MAX_WIDTH) x = GN_DRAW_SCREEN_MAX_WIDTH - n; if (y > GN_DRAW_SCREEN_MAX_HEIGHT) y = GN_DRAW_SCREEN_MAX_HEIGHT - 1; memcpy(&screen[y][x], drawmessage->data.text.text, n); break; case GN_DISP_DRAW_Status: status = drawmessage->data.status; break; default: return; } for (y = 0; y < GN_DRAW_SCREEN_MAX_HEIGHT; y++) { for (x = 0; x < GN_DRAW_SCREEN_MAX_WIDTH; x++) fprintf(stdout, "%c", screen[y][x]); fprintf(stdout, "\n"); } fprintf(stdout, "\n"); printdisplaystatus(status); } gn_error displayoutput(gn_data *data, struct gn_statemachine *state) { gn_error error; gn_display_output output; gn_data_clear(data); memset(&output, 0, sizeof(output)); output.output_fn = newoutputfn; data->display_output = &output; error = gn_sm_functions(GN_OP_DisplayOutput, data, state); console_raw(); #ifndef WIN32 fcntl(fileno(stdin), F_SETFL, O_NONBLOCK); #endif switch (error) { case GN_ERR_NONE: /* We do not want to see texts forever - press Ctrl+C to stop. */ signal(SIGINT, interrupted); fprintf (stderr, _("Entered display monitoring mode...\n")); fprintf (stderr, ESC "c" ); /* Loop here indefinitely - allows you to read texts from phone's display. The loops ends after pressing the Ctrl+C. */ while (!bshutdown) { char buf[105]; memset(&buf[0], 0, 102); /* while (read(0, buf, 100) > 0) { fprintf(stderr, _("handling keys (%d).\n"), strlen(buf)); if (GSM && GSM->HandleString && GSM->HandleString(buf) != GN_ERR_NONE) fprintf(stderr, _("Key press simulation failed.\n")); memset(buf, 0, 102); }*/ gn_sm_loop(1, state); gn_sm_functions(GN_OP_PollDisplay, data, state); } fprintf (stderr, _("Shutting down\n")); fprintf (stderr, _("Leaving display monitor mode...\n")); output.output_fn = NULL; error = gn_sm_functions(GN_OP_DisplayOutput, data, state); if (error != GN_ERR_NONE) fprintf (stderr, _("Error: %s\n"), gn_error_print(error)); break; default: fprintf (stderr, _("Error: %s\n"), gn_error_print(error)); break; } return error; } /* Getting the status of the display. */ gn_error getdisplaystatus(gn_data *data, struct gn_statemachine *state) { gn_error error = GN_ERR_INTERNALERROR; int status; gn_data_clear(data); data->display_status = &status; error = gn_sm_functions(GN_OP_GetDisplayStatus, data, state); switch (error) { case GN_ERR_NONE: printdisplaystatus(status); break; default: fprintf(stderr, _("Error: %s\n"), gn_error_print(error)); break; } return error; } /* Displays usage of --netmonitor command */ int netmonitor_usage(FILE *f, int exitval) { fprintf(f, _(" usage: --netmonitor {reset|off|field|devel|next|nr}\n" )); return exitval; } gn_error netmonitor(char *m, gn_data *data, struct gn_statemachine *state) { unsigned char mode; gn_netmonitor nm; gn_error error; if (!strcmp(m, "reset")) mode = 0xf0; else if (!strcmp(m, "off")) mode = 0xf1; else if (!strcmp(m, "field")) mode = 0xf2; else if (!strcmp(m, "devel")) mode = 0xf3; else if (!strcmp(m, "next")) mode = 0x00; else { mode = gnokii_atoi(m); if (errno || mode < 1 || mode >= 0xf0) return netmonitor_usage(stderr, -1); } nm.field = mode; memset(&nm.screen, 0, 50); data->netmonitor = &nm; error = gn_sm_functions(GN_OP_NetMonitor, data, state); if (nm.screen) fprintf(stdout, "%s\n", nm.screen); return error; } gnokii-0.6.31/gnokii/gnokii-dial.c0000644000175000017500000002621711666163120015026 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 1999-2000 Gary Reuter, Reinhold Jordan Copyright (C) 1999-2006 Pawel Kot Copyright (C) 2000-2002 Marcin Wiacek, Chris Kemp, Manfred Jonsson Copyright (C) 2001 Marian Jancar, Bartek Klepacz Copyright (C) 2001-2002 Pavel Machek, Markus Plail Copyright (C) 2002 Ladis Michl, Simon Huggins Copyright (C) 2002-2004 BORBELY Zoltan Copyright (C) 2003 Bertrik Sikken Copyright (C) 2004 Martin Goldhahn Mainline code for gnokii utility. Dialling and call handling functions. */ #include "config.h" #include "compat.h" #include #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #include #include "gnokii-app.h" #include "gnokii.h" void dial_usage(FILE *f) { fprintf(f, _("Dialling and call options:\n" " --getspeeddial location\n" " --setspeeddial number memory_type location\n" " --dialvoice number\n" " --senddtmf string\n" " --answercall callid\n" " --hangup callid\n" " --divert {--op|-o} {register|enable|query|disable|erasure}\n" " {--type|-t} {all|busy|noans|outofreach|notavail}\n" " {--call|-c} {all|voice|fax|data}\n" " [{--timeout|-m} time_in_seconds]\n" " [{--number|-n} number]\n" "All number, location and callid options need to be numeric.\n" )); } int getspeeddial_usage(FILE *f, int exitval) { fprintf(f, _("usage: --getspeeddial location\n" " location - location in the speed dial memory\n" )); return exitval; } /* Getting speed dials. */ gn_error getspeeddial(char *number, gn_data *data, struct gn_statemachine *state) { gn_speed_dial speeddial; gn_error error; speeddial.number = gnokii_atoi(number); if (errno || speeddial.number < 0) return getspeeddial_usage(stderr, -1); gn_data_clear(data); data->speed_dial = &speeddial; error = gn_sm_functions(GN_OP_GetSpeedDial, data, state); switch (error) { case GN_ERR_NONE: fprintf(stdout, _("SpeedDial nr. %d %s %d\n"), speeddial.number, gn_memory_type2str(speeddial.memory_type), speeddial.location); break; default: fprintf(stderr, _("Error: %s\n"), gn_error_print(error)); break; } return error; } int setspeeddial_usage(FILE *f, int exitval) { fprintf(f, _("usage: --setspeeddial number memory_type location\n" " number - phone number to be stored\n" " memory_type - memory type for the speed dial\n" " location - location in the speed dial memory\n" )); return exitval; } /* Setting speed dials. */ gn_error setspeeddial(char *argv[], gn_data *data, struct gn_statemachine *state) { gn_speed_dial entry; gn_error error; gn_data_clear(data); data->speed_dial = &entry; /* Handle command line args that set type, start and end locations. */ if (strcmp(argv[optind], "ME") == 0) { entry.memory_type = GN_MT_ME; } else if (strcmp(argv[optind], "SM") == 0) { entry.memory_type = GN_MT_SM; } else { fprintf(stderr, _("Unknown memory type %s (use ME, SM, ...)!\n"), argv[optind]); return GN_ERR_INVALIDMEMORYTYPE; } entry.number = gnokii_atoi(optarg); if (errno || entry.number < 0) return setspeeddial_usage(stderr, -1); entry.location = gnokii_atoi(argv[optind+1]); if (errno || entry.location < 0) return setspeeddial_usage(stderr, -1); error = gn_sm_functions(GN_OP_SetSpeedDial, data, state); switch (error) { case GN_ERR_NONE: fprintf(stderr, _("Successfully written!\n")); break; default: fprintf(stderr, _("Error: %s\n"), gn_error_print(error)); break; } return error; } /* Voice dialing mode. */ gn_error dialvoice(char *number, gn_data *data, struct gn_statemachine *state) { gn_call_info call_info; gn_error error; int call_id; memset(&call_info, 0, sizeof(call_info)); snprintf(call_info.number, sizeof(call_info.number), "%s", number); call_info.type = GN_CALL_Voice; call_info.send_number = GN_CALL_Default; gn_data_clear(data); data->call_info = &call_info; if ((error = gn_call_dial(&call_id, data, state)) != GN_ERR_NONE) fprintf(stderr, _("Dialing failed: %s\n"), gn_error_print(error)); else fprintf(stdout, _("Dialled call, id: %d (lowlevel id: %d)\n"), call_id, call_info.call_id); return error; } gn_error senddtmf(char *string, gn_data *data, struct gn_statemachine *state) { gn_error error; gn_data_clear(data); data->dtmf_string = string; error = gn_sm_functions(GN_OP_SendDTMF, data, state); if (error != GN_ERR_NONE) { fprintf(stderr, _("Error: %s\n"), gn_error_print(error)); } return error; } int answercall_usage(FILE *f, int exitval) { fprintf(f, _("usage: --answercall callid\n" " callid - call identifier\n" )); return exitval; } /* Answering incoming call */ gn_error answercall(char *callid, gn_data *data, struct gn_statemachine *state) { gn_call_info callinfo; gn_error error; memset(&callinfo, 0, sizeof(callinfo)); callinfo.call_id = gnokii_atoi(callid); if (errno || callinfo.call_id < 0) return answercall_usage(stderr, -1); gn_data_clear(data); data->call_info = &callinfo; error = gn_sm_functions(GN_OP_AnswerCall, data, state); if (error != GN_ERR_NONE) { fprintf(stderr, _("Error: %s\n"), gn_error_print(error)); } return error; } int hangup_usage(FILE *f, int exitval) { fprintf(f, _("usage: --hangup callid\n" " callid - call identifier\n" )); return exitval; } /* Hangup the call */ gn_error hangup(char *callid, gn_data *data, struct gn_statemachine *state) { gn_call_info callinfo; gn_error error; memset(&callinfo, 0, sizeof(callinfo)); callinfo.call_id = gnokii_atoi(callid); if (errno || callinfo.call_id < 0) return hangup_usage(stderr, -1); gn_data_clear(data); data->call_info = &callinfo; error = gn_sm_functions(GN_OP_CancelCall, data, state); if (error != GN_ERR_NONE) { fprintf(stderr, _("Error: %s\n"), gn_error_print(error)); } return error; } int divert_usage(FILE *f, int exitval) { fprintf(f, _(" usage: --divert\n" " -o operation\n" " --op operation operation to be executed, needs to be one\n" " of the following: register, enable, query,\n" " disable, erasure; this is required option\n" " -t type\n" " --type type type of the operation, needs to be one of\n" " the following: all, busy, noans, outofreach,\n" " notavail, unconditional; this is required option\n" " -c calltype\n" " --call calltype type of call for the operation, needs to be\n" " one of the following: all, voice, fax, data;\n" " this is optional\n" " -m sec\n" " --timeout sec timeout to be set; the value is in seconds\n" " -n msisdn\n" " --number msisdn number for redirection\n" "\n" )); return exitval; } /* Options for --divert: --op, -o [register|enable|query|disable|erasure] REQ --type, -t [all|busy|noans|outofreach|notavail] REQ --call, -c [all|voice|fax|data] REQ --timeout, -m time_in_seconds OPT --number, -n number OPT */ gn_error divert(int argc, char *argv[], gn_data *data, struct gn_statemachine *state) { int opt; gn_call_divert cd; gn_error error; struct option options[] = { { "op", required_argument, NULL, 'o'}, { "type", required_argument, NULL, 't'}, { "call", required_argument, NULL, 'c'}, { "number", required_argument, NULL, 'n'}, { "timeout", required_argument, NULL, 'm'}, { NULL, 0, NULL, 0} }; memset(&cd, 0, sizeof(gn_call_divert)); while ((opt = getopt_long(argc, argv, "o:t:n:c:m:", options, NULL)) != -1) { switch (opt) { case 'o': if (!strcmp("register", optarg)) { cd.operation = GN_CDV_Register; } else if (!strcmp("enable", optarg)) { cd.operation = GN_CDV_Enable; } else if (!strcmp("disable", optarg)) { cd.operation = GN_CDV_Disable; } else if (!strcmp("erasure", optarg)) { cd.operation = GN_CDV_Erasure; } else if (!strcmp("query", optarg)) { cd.operation = GN_CDV_Query; } else { return divert_usage(stderr, -1); } break; case 't': if (!strcmp("all", optarg)) { cd.type = GN_CDV_AllTypes; } else if (!strcmp("busy", optarg)) { cd.type = GN_CDV_Busy; } else if (!strcmp("noans", optarg)) { cd.type = GN_CDV_NoAnswer; } else if (!strcmp("outofreach", optarg)) { cd.type = GN_CDV_OutOfReach; } else if (!strcmp("notavail", optarg)) { cd.type = GN_CDV_NotAvailable; } else if (!strcmp("unconditional", optarg)) { cd.type = GN_CDV_Unconditional; } else { return divert_usage(stderr, -1); } break; case 'c': if (!strcmp("all", optarg)) { cd.ctype = GN_CDV_AllCalls; } else if (!strcmp("voice", optarg)) { cd.ctype = GN_CDV_VoiceCalls; } else if (!strcmp("fax", optarg)) { cd.ctype = GN_CDV_FaxCalls; } else if (!strcmp("data", optarg)) { cd.ctype = GN_CDV_DataCalls; } else { return divert_usage(stderr, -1); } break; case 'm': cd.timeout = gnokii_atoi(optarg); if (errno || cd.timeout < 0) return divert_usage(stderr, -1); break; case 'n': snprintf(cd.number.number, sizeof(cd.number.number), "%s", optarg); if (cd.number.number[0] == '+') cd.number.type = GN_GSM_NUMBER_International; else cd.number.type = GN_GSM_NUMBER_Unknown; break; default: return divert_usage(stderr, -1); } } if (argc > optind) { /* There are too many arguments that don't start with '-' */ return divert_usage(stderr, -1); } data->call_divert = &cd; error = gn_sm_functions(GN_OP_CallDivert, data, state); if (error == GN_ERR_NONE) { fprintf(stdout, _("%s: %s\n"), _("Divert type"), gn_call_divert_type2str(cd.type)); fprintf(stdout, _("%s: %s\n"), _("Call type"), gn_call_divert_call_type2str(cd.ctype)); if (cd.number.number[0]) { fprintf(stdout, _("%s: %s\n"), _("Number"), cd.number.number); fprintf(stdout, _("%s: %d\n"), _("Timeout"), cd.timeout); } else fprintf(stdout, _("Divert isn't active.\n")); } else { fprintf(stderr, _("Error: %s\n"), gn_error_print(error)); } return error; } gnokii-0.6.31/gnokii/gnokii-mms.c0000644000175000017500000002213511666163120014704 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2009 Daniele Forsi Mainline code for gnokii utility. MMS handling code. Derived from gnokii-sms.c */ #include "config.h" #include "misc.h" #include "compat.h" #include #include #include #include "gnokii-app.h" #include "gnokii.h" /* Outputs summary of all MMS gnokii commands */ void mms_usage(FILE *f) { fprintf(f, _("MMS options:\n" " --getmms memory_type start [end] [{--mime|--pdu|--raw} file]\n" " [-d|--delete] [-o|--overwrite]\n" " --deletemms memory_type start [end]\n" )); } /* Displays usage of --getmms command */ int getmms_usage(FILE *f, int exitval) { fprintf(f, _(" usage: --getmms memory start [end] retrieves messages from memory type (SM, ME,\n" " IN, OU, ...) starting from\n" " location start and ending with end;\n" " if end option is omitted, just one entry\n" " is read;\n" " start must be a number, end may be a number\n" " or 'end' string;\n" " if 'end' is used entries are being read\n" " until empty location\n" " --mime filename convert MMS in MIME format and save it to\n" " the given file;\n" " --pdu filename extract MMS from raw format and save it to\n" " the given file;\n" " --raw filename get MMS from phone and save it unchanged to\n" " the given file;\n" " --delete\n" " -d delete MMS after reading\n" " --overwrite\n" " -o overwrite destination file without asking\n" "\n" )); return exitval; } gn_error fprint_mms(FILE *file, gn_mms *message) { fprintf(file, _("%d. %s (%s)\n"), message->number, _("MMS"), gn_sms_message_status2str(message->status)); fprintf(file, "%s", message->buffer); return GN_ERR_NONE; } /* Get MMS messages. */ gn_error getmms(int argc, char *argv[], gn_data *data, struct gn_statemachine *state) { int i, del = 0; gn_sms_folder folder; gn_sms_folder_list folderlist; gn_mms *message; char *memory_type_string; int start_message, end_message, count, mode = 1; char filename[64]; gn_error error = GN_ERR_NONE; gn_mms_format output_format_type = GN_MMS_FORMAT_TEXT; struct option options[] = { { "mime", required_argument, NULL, GN_MMS_FORMAT_MIME}, { "pdu", required_argument, NULL, GN_MMS_FORMAT_PDU}, { "raw", required_argument, NULL, GN_MMS_FORMAT_RAW}, { "delete", no_argument, NULL, 'd' }, { "overwrite", no_argument, NULL, 'o' }, { NULL, 0, NULL, 0 } }; /* Handle command line args that set type, start and end locations. */ memory_type_string = optarg; if (gn_str2memory_type(memory_type_string) == GN_MT_XX) { fprintf(stderr, _("Unknown memory type %s (use ME, SM, IN, OU, ...)!\n"), optarg); fprintf(stderr, _("Run gnokii --showsmsfolderstatus for a list of supported memory types.\n")); return GN_ERR_INVALIDMEMORYTYPE; } start_message = gnokii_atoi(argv[optind]); if (errno || start_message < 0) return getmms_usage(stderr, -1); end_message = parse_end_value_option(argc, argv, optind + 1, start_message); if (errno || end_message < 0) return getmms_usage(stderr, -1); *filename = '\0'; /* parse all options (beginning with '-') */ while ((i = getopt_long(argc, argv, "1:2:3:do", options, NULL)) != -1) { switch (i) { case 'd': del = 1; break; /* force mode -- don't ask to overwrite */ case 'o': mode = 0; break; case GN_MMS_FORMAT_MIME: /* FALL THROUGH */ case GN_MMS_FORMAT_PDU: /* FALL THROUGH */ case GN_MMS_FORMAT_RAW: /* output formats are mutually exclusive */ if (output_format_type != GN_MMS_FORMAT_TEXT) { return getmms_usage(stderr, -1); } output_format_type = i; if (!optarg) { return getsms_usage(stderr, -1); } snprintf(filename, sizeof(filename), "%s", optarg); fprintf(stderr, _("Saving into %s\n"), filename); break; default: return getmms_usage(stderr, -1); } } if (argc - optind > 3) { /* There are too many arguments that don't start with '-' */ return getmms_usage(stderr, -1); } folder.folder_id = 0; data->sms_folder = &folder; data->sms_folder_list = &folderlist; /* Now retrieve the requested entries. */ for (count = start_message; count <= end_message; count++) { error = gn_mms_alloc(&message); if (error != GN_ERR_NONE) break; message->memory_type = gn_str2memory_type(memory_type_string); message->number = count; message->buffer_format = output_format_type; data->mms = message; error = gn_mms_get(data, state); switch (error) { case GN_ERR_NONE: if (*filename) { /* writebuffer() will set mode to "append" */ mode = writebuffer(filename, data->mms->buffer, data->mms->buffer_length, mode); } else { error = fprint_mms(stdout, message); fprintf(stdout, "\n"); } if (del && mode != -1) { if (GN_ERR_NONE != gn_mms_delete(data, state)) fprintf(stderr, _("(delete failed)\n")); else fprintf(stderr, _("(message deleted)\n")); } break; default: if ((error == GN_ERR_INVALIDLOCATION) && (end_message == INT_MAX) && (count > start_message)) { error = GN_ERR_NONE; /* Force exit */ mode = -1; break; } fprintf(stderr, _("Getting MMS failed (location %d from memory %s)! (%s)\n"), count, memory_type_string, gn_error_print(error)); if (error == GN_ERR_INVALIDMEMORYTYPE) { fprintf(stderr, _("Unknown memory type %s (use ME, SM, IN, OU, ...)!\n"), optarg); fprintf(stderr, _("Run gnokii --showsmsfolderstatus for a list of supported memory types.\n")); } if (error == GN_ERR_EMPTYLOCATION) error = GN_ERR_NONE; break; } gn_mms_free(message); if (mode == -1) break; } return error; } /* Displays usage of --deletemms command */ int deletemms_usage(FILE *f, int exitval) { fprintf(f, _(" usage: --deletemms memory start [end] deletes messages from memory type\n" " (SM, ME, IN, OU, ...) starting\n" " from location start and ending with end;\n" " if end option is omitted, just one entry\n" " is removed;\n" " if 'end' is used entries are being removed\n" " until empty location\n" "\n" )); return exitval; } /* Delete MMS messages. */ gn_error deletemms(int argc, char *argv[], gn_data *data, struct gn_statemachine *state) { gn_mms message; char *memory_type_string; int start_message, end_message, count; gn_error error = GN_ERR_NONE; /* Handle command line args that set type, start and end locations. */ memory_type_string = optarg; message.memory_type = gn_str2memory_type(memory_type_string); if (message.memory_type == GN_MT_XX) { fprintf(stderr, _("Unknown memory type %s (use ME, SM, IN, OU, ...)!\n"), optarg); fprintf(stderr, _("Run gnokii --showsmsfolderstatus for a list of supported memory types.\n")); return GN_ERR_INVALIDMEMORYTYPE; } start_message = gnokii_atoi(argv[optind]); if (errno || start_message < 0) return deletemms_usage(stderr, -1); end_message = parse_end_value_option(argc, argv, optind + 1, start_message); if (errno || end_message < 0) return deletemms_usage(stderr, -1); /* Now delete the requested entries. */ for (count = start_message; count <= end_message; count++) { message.number = count; data->mms = &message; error = gn_mms_delete(data, state); if (error == GN_ERR_NONE) fprintf(stderr, _("Deleted MMS (location %d from memory %s)\n"), count, memory_type_string); else { if ((error == GN_ERR_INVALIDLOCATION) && (end_message == INT_MAX) && (count > start_message)) return GN_ERR_NONE; fprintf(stderr, _("Deleting MMS failed (location %d from memory %s)! (%s)\n"), count, memory_type_string, gn_error_print(error)); } } /* FIXME: We return the value of the last read. * What should we return? */ return error; } gnokii-0.6.31/gnokii/gnokii-file.c0000644000175000017500000002762011666163120015033 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 1999-2000 Gary Reuter, Reinhold Jordan Copyright (C) 1999-2011 Pawel Kot Copyright (C) 2000-2002 Marcin Wiacek, Chris Kemp, Manfred Jonsson Copyright (C) 2001 Marian Jancar, Bartek Klepacz Copyright (C) 2001-2002 Pavel Machek, Markus Plail Copyright (C) 2002 Ladis Michl, Simon Huggins Copyright (C) 2002-2004 BORBELY Zoltan Copyright (C) 2003 Bertrik Sikken Copyright (C) 2004 Martin Goldhahn Mainline code for gnokii utility. File handling functions. */ #include "config.h" #include "misc.h" #include "compat.h" #include #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #include #include "gnokii-app.h" #include "gnokii.h" void file_usage(FILE *f) { fprintf(f, _("File options:\n" " --getfilelist remote_path\n" " --getfiledetailsbyid [id]\n" " --getfileid remote_filename\n" " --getfile remote_filename [local_filename]\n" " --getfilebyid id [local_filename]\n" " --getallfiles remote_path\n" " --putfile local_filename remote_filename\n" " --deletefile remote_filename\n" " --deletefilebyid id\n" )); } static void set_fileid(gn_file *fi, char *arg) { unsigned long j, index, len = 1; index = j = atol(arg); while (j > 255) { len++; j /= 256; } if (len % 2) len++; fi->id = calloc(len + 1, sizeof(char)); fi->id[0] = len; for (j = len; j > 0; j--) { fi->id[j] = index % 256; index = (index >> 8); } } /* Get file list. */ gn_error getfilelist(char *path, gn_data *data, struct gn_statemachine *state) { gn_file_list fi; gn_error error; int i; memset(&fi, 0, sizeof(fi)); snprintf(fi.path, sizeof(fi.path), "%s", path); gn_data_clear(data); data->file_list = &fi; if ((error = gn_sm_functions(GN_OP_GetFileList, data, state)) != GN_ERR_NONE) fprintf(stderr, _("Failed to get info for %s: %s\n"), path, gn_error_print(error)); else { fprintf(stdout, _("Filelist for path %s:\n"), path); for (i = 0; i < fi.file_count; i++) { fprintf(stdout, _(" %s\n"), fi.files[i]->name); free(fi.files[i]); } } return error; } gn_error getfiledetailsbyid(int argc, char *argv[], gn_data *data, struct gn_statemachine *state) { gn_file fi; gn_file_list fil; gn_error error; int i; memset(&fi, 0, sizeof(fi)); memset(&fil, 0, sizeof(fil)); gn_data_clear(data); data->file = &fi; data->file_list = &fil; /* default parameter is root == 0x01 */ if (argc == optind) { fi.id = calloc(3, sizeof(char)); if (!fi.id) return GN_ERR_INTERNALERROR; fi.id[0] = 2; fi.id[1] = 0x00; fi.id[2] = 0x01; } else { set_fileid(&fi, argv[optind]); } if ((error = gn_sm_functions(GN_OP_GetFileDetailsById, data, state)) != GN_ERR_NONE) fprintf(stderr, _("Failed to get filename: %s\n"), gn_error_print(error)); else { int fileid = 0, counter = 16; for (i = fi.id[0]; i > 0; i--) { fileid += fi.id[i] * (counter / 16); counter *= 16; } fprintf(stdout, _("| %s (%d)\n"), fi.name, fileid); for (i = 0; i < fil.file_count; i++) { int j; gn_file fi2; gn_file_list fil2; gn_error error2; dprintf("getting %s\n", fil.files[i]->id); memset(&fi2, 0, sizeof(fi2)); memset(&fil2, 0, sizeof(fil2)); gn_data_clear(data); data->file = &fi2; data->file_list = &fil2; fi2.id = fil.files[i]->id; error2 = gn_sm_functions(GN_OP_GetFileDetailsById, data, state); switch (error2) { case GN_ERR_NONE: fileid = 0; counter = 16; for (j = fi2.id[0]; j > 0; j--) { fileid += fi2.id[j] * (counter / 16); counter *= 16; } fprintf(stdout, _(" - %s (%d)\n"), fi2.name, fileid); break; default: fprintf(stderr, _("Failed to get filename: %s\n"), gn_error_print(error)); break; } } } free(fi.id); return error; } /* Get file id */ gn_error getfileid(char *filename, gn_data *data, struct gn_statemachine *state) { gn_file fi; gn_error error; memset(&fi, 0, sizeof(fi)); snprintf(fi.name, 512, "%s", filename); gn_data_clear(data); data->file = &fi; if ((error = gn_sm_functions(GN_OP_GetFileId, data, state)) != GN_ERR_NONE) fprintf(stderr, _("Failed to get info for %s: %s\n"),filename, gn_error_print(error)); else { fprintf(stdout, _("Fileid for file %s is %02x %02x %02x %02x %02x %02x\n"), filename, fi.id[0], fi.id[1], fi.id[2], fi.id[3], fi.id[4], fi.id[5]); } return error; } /* Delete file */ gn_error deletefile(char *filename, gn_data *data, struct gn_statemachine *state) { gn_file fi; gn_error error; memset(&fi, 0, sizeof(fi)); snprintf(fi.name, 512, "%s", filename); gn_data_clear(data); data->file = &fi; if ((error = gn_sm_functions(GN_OP_DeleteFile, data, state)) != GN_ERR_NONE) fprintf(stderr, _("Failed to delete %s: %s\n"), filename, gn_error_print(error)); else { fprintf(stderr, _("Deleted: %s\n"), filename); } return error; } /* Delete file */ gn_error deletefilebyid(char *id, gn_data *data, struct gn_statemachine *state) { gn_file fi; gn_error error; memset(&fi, 0, sizeof(fi)); set_fileid(&fi, id); gn_data_clear(data); data->file = &fi; if ((error = gn_sm_functions(GN_OP_DeleteFileById, data, state)) != GN_ERR_NONE) fprintf(stderr, _("Failed to delete %s: %s\n"), id, gn_error_print(error)); else { fprintf(stderr, _("Deleted: %s\n"), id); } return error; } int getfile_usage(FILE *f, int exitval) { fprintf(f, _(" usage: --getfile remote_filename [localfilename]\n")); return exitval; } /* Get file */ gn_error getfile(int argc, char *argv[], gn_data *data, struct gn_statemachine *state) { gn_file fi; gn_error error; FILE *f; char filename2[512]; if (argc < optind) return getfile_usage(stderr, -1); memset(filename2, 0, 512); memset(&fi, 0, sizeof(fi)); snprintf(fi.name, 512, "%s", optarg); gn_data_clear(data); data->file = &fi; data->progress_indication = NULL; if ((error = gn_sm_functions(GN_OP_GetFile, data, state)) != GN_ERR_NONE) fprintf(stderr, _("Failed to get file %s: %s\n"), optarg, gn_error_print(error)); else { if (argc == optind) { if (strrchr(optarg, '/')) snprintf(filename2, sizeof(filename2), "%s", strrchr(optarg, '/') + 1); else if (strrchr(optarg, '\\')) snprintf(filename2, sizeof(filename2), "%s", strrchr(optarg, '\\') + 1); else snprintf(filename2, sizeof(filename2), "default.dat"); fprintf(stdout, _("Got file %s. Save to [%s]: "), optarg, filename2); gn_line_get(stdin, filename2, 512); if (filename2[0] == 0) { if (strrchr(optarg, '/')) snprintf(filename2, sizeof(filename2), "%s", strrchr(optarg, '/') + 1); else if (strrchr(optarg, '\\')) snprintf(filename2, sizeof(filename2), "%s", strrchr(optarg, '\\') + 1); else snprintf(filename2, sizeof(filename2), "default.dat"); } } else { snprintf(filename2, sizeof(filename2), "%s", argv[optind]); } f = fopen(filename2, "w"); if (!f) { fprintf(stderr, _("Can't open file %s for writing!\n"), filename2); return GN_ERR_FAILED; } if (fwrite(fi.file, fi.file_length, 1, f) < 0) { fprintf(stderr, _("Failed to write to file %s.\n"), filename2); error = GN_ERR_FAILED; } fclose(f); free(fi.file); } return error; } int getfilebyid_usage(FILE *f, int exitval) { fprintf(f, _(" usage: --getfilebyid id [localfilename]\n")); return exitval; } /* Get file */ gn_error getfilebyid(int argc, char *argv[], gn_data *data, struct gn_statemachine *state) { gn_file fi; gn_file_list fil; gn_error error; FILE *f; char filename2[512]; if (argc < optind) return getfilebyid_usage(stderr, -1); memset(filename2, 0, 512); memset(&fi, 0, sizeof(fi)); set_fileid(&fi, optarg); gn_data_clear(data); data->file = &fi; data->file_list = &fil; data->progress_indication = NULL; if ((error = gn_sm_functions(GN_OP_GetFileDetailsById, data, state)) != GN_ERR_NONE) fprintf(stderr, _("Failed to get file: %s\n"), gn_error_print(error)); else { dprintf("File is %s\n", fi.name); fi.file = malloc(fi.file_length); error = gn_sm_functions(GN_OP_GetFileById, data, state); if (error == GN_ERR_NONE) { if (argc == optind) { snprintf(filename2, sizeof(filename2), "%s", fi.name); } else { snprintf(filename2, sizeof(filename2), "%s", argv[optind]); } f = fopen(filename2, "w"); if (!f) { fprintf(stderr, _("Can't open file %s for writing!\n"), filename2); return GN_ERR_FAILED; } if (fwrite(fi.file, fi.file_length, 1, f) < 0) { fprintf(stderr, _("Failed to write to file %s.\n"), filename2); error = GN_ERR_FAILED; } fclose(f); free(fi.file); } else { fprintf(stderr, "%s\n", gn_error_print(error)); } } return error; } /* Get all files */ gn_error getallfiles(char *path, gn_data *data, struct gn_statemachine *state) { gn_file_list fi; gn_error error; int i; FILE *f; char filename2[512]; memset(&fi, 0, sizeof(fi)); snprintf(fi.path, sizeof(fi.path), "%s", path); gn_data_clear(data); data->file_list = &fi; if ((error = gn_sm_functions(GN_OP_GetFileList, data, state)) != GN_ERR_NONE) fprintf(stderr, _("Failed to get info for %s: %s\n"), path, gn_error_print(error)); else { char *pos = strrchr(path, '/'); if (!pos) pos = strrchr(path, '\\'); if (pos) *(pos+1) = 0; for (i = 0; i < fi.file_count; i++) { data->file = fi.files[i]; snprintf(filename2, sizeof(filename2), "%s", fi.files[i]->name); snprintf(fi.files[i]->name, sizeof(fi.files[i]->name), "%s%s", path, filename2); if ((error = gn_sm_functions(GN_OP_GetFile, data, state)) != GN_ERR_NONE) fprintf(stderr, _("Failed to get file %s: %s\n"), data->file->name, gn_error_print(error)); else { fprintf(stderr, _("Got file %s.\n"), filename2); f = fopen(filename2, "w"); if (!f) { fprintf(stderr, _("Can't open file %s for writing!\n"), filename2); return GN_ERR_FAILED; } if (fwrite(data->file->file, data->file->file_length, 1, f) < 0) { fprintf(stderr, _("Failed to write to file %s.\n"), filename2); fclose(f); return GN_ERR_FAILED; } fclose(f); free(data->file->file); } free(fi.files[i]); } } return error; } int putfile_usage(FILE *f, int exitval) { fprintf(f, _(" usage: --putfile local_filename remote_filename\n")); return exitval; } /* Put file */ gn_error putfile(int argc, char *argv[], gn_data *data, struct gn_statemachine *state) { gn_file fi; gn_error error = GN_ERR_FAILED; FILE *f; if (argc != optind + 1) return putfile_usage(stderr, -1); memset(&fi, 0, sizeof(fi)); snprintf(fi.name, 512, "%s", argv[optind]); gn_data_clear(data); data->file = &fi; f = fopen(optarg, "rb"); if (!f || fseek(f, 0, SEEK_END)) { fprintf(stderr, _("Can't open file %s for reading!\n"), optarg); goto err; } fi.file_length = ftell(f); rewind(f); fi.file = malloc(fi.file_length); if (fread(fi.file, 1, fi.file_length, f) != fi.file_length) { fprintf(stderr, _("File %s corrupted!\n"), optarg); goto out; } if ((error = gn_sm_functions(GN_OP_PutFile, data, state)) != GN_ERR_NONE) fprintf(stderr, _("Failed to put file to %s: %s\n"), argv[optind], gn_error_print(error)); out: free(fi.file); fclose(f); err: return error; } gnokii-0.6.31/gnokii/gnokii-todo.c0000644000175000017500000001541511666163120015060 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 1999-2000 Gary Reuter, Reinhold Jordan Copyright (C) 1999-2006 Pawel Kot Copyright (C) 2000-2002 Marcin Wiacek, Chris Kemp, Manfred Jonsson Copyright (C) 2001 Marian Jancar, Bartek Klepacz Copyright (C) 2001-2002 Pavel Machek, Markus Plail Copyright (C) 2002 Ladis Michl, Simon Huggins Copyright (C) 2002-2004 BORBELY Zoltan Copyright (C) 2003 Bertrik Sikken Copyright (C) 2004 Martin Goldhahn Mainline code for gnokii utility. Todo functions. */ #include "config.h" #include "misc.h" #include "compat.h" #include #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #include #include "gnokii-app.h" #include "gnokii.h" void todo_usage(FILE *f) { fprintf(f, _( "ToDo options:\n" " --gettodo start_number [end_number|end] [-v|--vCal]\n" " --writetodo vcalendarfile start_number [end_number|end]\n" " --deletealltodos\n" )); } int gettodo_usage(FILE *f, int exitval) { fprintf(f, _("usage: --gettodo start_number [end_number | end] [-v|--vCal]\n" " start_number - entry number in the phone todo (numeric)\n" " end_number - until this entry in the phone todo (numeric, optional)\n" " end - the string \"end\" indicates all entries from start to end\n" " -v - output in iCalendar format\n" " NOTE: if no end is given, only the start entry is written\n" )); return exitval; } /* ToDo notes receiving. */ gn_error gettodo(int argc, char *argv[], gn_data *data, struct gn_statemachine *state) { gn_todo_list todolist; gn_todo todo; gn_error error = GN_ERR_NONE; bool vcal = false; int i, first_location, last_location; struct option options[] = { { "vCal", optional_argument, NULL, 'v'}, { NULL, 0, NULL, 0} }; first_location = gnokii_atoi(optarg); if (errno || first_location < 0) return gettodo_usage(stderr, -1); last_location = parse_end_value_option(argc, argv, optind, first_location); if (errno || last_location < 0) return gettodo_usage(stderr, -1); while ((i = getopt_long(argc, argv, "v", options, NULL)) != -1) { switch (i) { case 'v': vcal = true; break; default: return gettodo_usage(stderr, -1); } } for (i = first_location; i <= last_location; i++) { todo.location = i; gn_data_clear(data); data->todo = &todo; data->todo_list = &todolist; error = gn_sm_functions(GN_OP_GetToDo, data, state); switch (error) { case GN_ERR_NONE: if (vcal) { gn_todo2ical(stdout, &todo); } else { fprintf(stdout, _("%s: %s\n"), _("Todo"), todo.text); fprintf(stdout, _("%s: %s\n"), _("Priority"), gn_todo_priority2str(todo.priority)); } break; default: /* stop processing if the last note was specified as "end" */ if (last_location == INT_MAX) { /* it's not an error if we read at least a note and the rest is empty */ if ((i > first_location) && ((error == GN_ERR_EMPTYLOCATION) || (error == GN_ERR_INVALIDLOCATION))) { error = GN_ERR_NONE; } last_location = 0; } if (error != GN_ERR_NONE) { fprintf(stderr, _("The ToDo note could not be read: %s\n"), gn_error_print(error)); } } } return error; } int writetodo_usage(FILE *f, int exitval) { fprintf(f, _("usage: --writetodo vcalendarfile start_number [end_number|end]\n" " vcalendarfile - file containing todo notes in vCal format\n" " start_number - first note to read from file\n" " end_number - last note to read from file\n" " end - read all notes from file from start_number\n" " NOTE: it stores the note at the first empty location.\n" )); return exitval; } /* ToDo notes writing */ gn_error writetodo(int argc, char *argv[], gn_data *data, struct gn_statemachine *state) { gn_todo todo; gn_error error = GN_ERR_NONE; int first_location, last_location, i; FILE *f; f = fopen(optarg, "r"); if (f == NULL) { fprintf(stderr, _("Can't open file %s for reading!\n"), optarg); return GN_ERR_FAILED; } first_location = gnokii_atoi(argv[optind]); if (errno || first_location < 0) { fclose(f); return writetodo_usage(stderr, -1); } last_location = parse_end_value_option(argc, argv, optind + 1, first_location); if (errno || last_location < 0) { fclose(f); return writetodo_usage(stderr, -1); } for (i = first_location; i <= last_location; i++) { memset(&todo, 0, sizeof(todo)); gn_data_clear(data); data->todo = &todo; /* TODO: gn_ical2todo expects the pointer to begin file to * iterate. Fix it to not rewind the file each time */ rewind(f); error = gn_ical2todo(f, &todo, i); #ifndef WIN32 if (error == GN_ERR_NOTIMPLEMENTED) { switch (gn_vcal_file_todo_read(optarg, &todo, i)) { case 0: error = GN_ERR_NONE; break; default: error = GN_ERR_FAILED; break; } } #endif if (error != GN_ERR_NONE) { /* when reading until 'end' it's not an error if it tried to read a non existant note */ if ((last_location == INT_MAX) && (error == GN_ERR_EMPTYLOCATION)) { error = GN_ERR_NONE; } else { fprintf(stderr, _("Failed to load vCalendar file: %s\n"), gn_error_print(error)); } fclose(f); return error; } error = gn_sm_functions(GN_OP_WriteToDo, data, state); if (error == GN_ERR_NONE) { fprintf(stderr, _("Successfully written!\n")); fprintf(stderr, _("Priority %d. %s\n"), data->todo->priority, data->todo->text); } else fprintf(stderr, _("Failed to write ToDo note: %s\n"), gn_error_print(error)); } fclose(f); return error; } /* Deleting all ToDo notes */ gn_error deletealltodos(gn_data *data, struct gn_statemachine *state) { gn_error error; gn_data_clear(data); error = gn_sm_functions(GN_OP_DeleteAllToDos, data, state); if (error == GN_ERR_NONE) fprintf(stderr, _("Successfully deleted all ToDo notes!\n")); else fprintf(stderr, _("Failed to delete ToDo note: %s\n"), gn_error_print(error)); return error; } gnokii-0.6.31/gnokii/gnokii-app.h0000644000175000017500000002632611666163120014703 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janík ml. Copyright (C) 2000-2006 Pawel Kot Copyright (C) 2001 Jan Kratochvil Copyright (C) 2003 BORBELY Zoltan Header file for gnokii utility. */ #ifndef __gnokii_app_h_ #define __gnokii_app_h_ #include #include "gnokii-internal.h" #define MAX_INPUT_LINE_LEN 512 /* shared globals */ extern volatile bool bshutdown; extern int shell(gn_data *data, struct gn_statemachine *state); /* Utils functions */ int writefile(char *filename, char *text, int mode); int writebuffer(const char *filename, const char *buffer, size_t nitems, int mode); extern gn_error readtext(gn_sms_user_data *udata); extern gn_error loadbitmap(gn_bmp *bitmap, char *s, int type, struct gn_statemachine *state); extern int parse_end_value_option(int argc, char *argv[], int pos, int start_value); extern void interrupted(int sig); extern void console_raw(void); /* Monitoring functions */ extern void monitor_usage(FILE *f); extern gn_error monitormode(int argc, char *argv[], gn_data *data, struct gn_statemachine *state); extern gn_error displayoutput(gn_data *data, struct gn_statemachine *state); extern gn_error getdisplaystatus(gn_data *data, struct gn_statemachine *state); extern gn_error netmonitor(char *m, gn_data *data, struct gn_statemachine *state); /* SMS functions */ extern void sms_usage(FILE *f); extern int sendsms_usage(FILE *f, int exitval); extern gn_error sendsms(int argc, char *argv[], gn_data *data, struct gn_statemachine *state); extern int savesms_usage(FILE *f, int exitval); extern gn_error savesms(int argc, char *argv[], gn_data *data, struct gn_statemachine *state); extern int getsms_usage(FILE *f, int exitval); extern gn_error getsms(int argc, char *argv[], gn_data *data, struct gn_statemachine *state); extern int deletesms_usage(FILE *f, int exitval); extern gn_error deletesms(int argc, char *argv[], gn_data *data, struct gn_statemachine *state); extern int getsmsc_usage(FILE *f, int exitval); extern gn_error getsmsc(int argc, char *argv[], gn_data *data, struct gn_statemachine *state); extern int setsmsc_usage(FILE *f, int exitval); extern gn_error setsmsc(gn_data *data, struct gn_statemachine *state); extern int createsmsfolder_usage(FILE *f, int exitval); extern gn_error createsmsfolder(char *name, gn_data *data, struct gn_statemachine *state); extern int deletesmsfolder_usage(FILE *f, int exitval); extern gn_error deletesmsfolder(char *number, gn_data *data, struct gn_statemachine *state); extern int showsmsfolderstatus_usage(FILE *f, int exitval); extern gn_error showsmsfolderstatus(gn_data *data, struct gn_statemachine *state); gn_error smsreader(gn_data *data, struct gn_statemachine *state); /* MMS functions */ extern void mms_usage(FILE *f); extern int getmms_usage(FILE *f, int exitval); extern gn_error getmms(int argc, char *argv[], gn_data *data, struct gn_statemachine *state); extern int deletemms_usage(FILE *f, int exitval); extern gn_error deletemms(int argc, char *argv[], gn_data *data, struct gn_statemachine *state); /* Phonebook functions */ extern void phonebook_usage(FILE *f); extern int getphonebook_usage(FILE *f, int exitval); extern gn_error getphonebook(int argc, char *argv[], gn_data *data, struct gn_statemachine *state); extern int writephonebook_usage(FILE *f, int exitval); extern gn_error writephonebook(int argc, char *argv[], gn_data *data, struct gn_statemachine *state); extern int deletephonebook_usage(FILE *f, int exitval); extern gn_error deletephonebook(int argc, char *argv[], gn_data *data, struct gn_statemachine *state); /* Calendar functions */ extern void calendar_usage(FILE *f); extern int getcalendarnote_usage(FILE *f, int exitval); extern gn_error getcalendarnote(int argc, char *argv[], gn_data *data, struct gn_statemachine *state); extern int writecalendarnote_usage(FILE *f, int exitval); extern gn_error writecalendarnote(int argc, char *argv[], gn_data *data, struct gn_statemachine *state); extern int deletecalendarnote_usage(FILE *f, int exitval); extern gn_error deletecalendarnote(int argc, char *argv[], gn_data *data, struct gn_statemachine *state); /* ToDo functions */ extern void todo_usage(FILE *f); extern int gettodo_usage(FILE *f, int exitval); extern gn_error gettodo(int argc, char *argv[], gn_data *data, struct gn_statemachine *state); extern int writetodo_usage(FILE *f, int exitval); extern gn_error writetodo(int argc, char *argv[], gn_data *data, struct gn_statemachine *state); extern gn_error deletealltodos(gn_data *data, struct gn_statemachine *state); /* Dialling and call handling functions */ extern void dial_usage(FILE *f); extern gn_error getspeeddial(char *number, gn_data *data, struct gn_statemachine *state); extern gn_error setspeeddial(char *argv[], gn_data *data, struct gn_statemachine *state); extern gn_error dialvoice(char *number, gn_data *data, struct gn_statemachine *state); extern gn_error senddtmf(char *string, gn_data *data, struct gn_statemachine *state); extern int answercall_usage(FILE *f, int exitval); extern gn_error answercall(char *callid, gn_data *data, struct gn_statemachine *state); extern gn_error hangup(char *callid, gn_data *data, struct gn_statemachine *state); extern int divert_usage(FILE *f, int exitval); extern gn_error divert(int argc, char *argv[], gn_data *data, struct gn_statemachine *state); /* Profile options */ extern void profile_usage(FILE *f); extern int getprofile_usage(FILE *f, int exitval); extern gn_error getprofile(int argc, char *argv[], gn_data *data, struct gn_statemachine *state); extern gn_error setprofile(gn_data *data, struct gn_statemachine *state); extern gn_error getactiveprofile(gn_data *data, struct gn_statemachine *state); extern gn_error setactiveprofile(int argc, char *argv[], gn_data *data, struct gn_statemachine *state); /* Phone settings options */ extern void settings_usage(FILE *f); extern gn_error setdatetime(int argc, char *argv[], gn_data *data, struct gn_statemachine *state); extern gn_error getdatetime(gn_data *data, struct gn_statemachine *state); extern gn_error setalarm(int argc, char *argv[], gn_data *data, struct gn_statemachine *state); extern gn_error getalarm(gn_data *data, struct gn_statemachine *state); extern gn_error reset(char *type, gn_data *data, struct gn_statemachine *state); /* WAP options */ extern void wap_usage(FILE *f); extern gn_error getwapbookmark(char *number, gn_data *data, struct gn_statemachine *state); extern int writewapbookmark_usage(FILE *f, int exitval); extern gn_error writewapbookmark(int argc, char *argv[], gn_data *data, struct gn_statemachine *state); extern gn_error deletewapbookmark(char *number, gn_data *data, struct gn_statemachine *state); extern int getwapsetting_usage(FILE *f, int exitval); extern gn_error getwapsetting(int argc, char *argv[], gn_data *data, struct gn_statemachine *state); extern gn_error writewapsetting(gn_data *data, struct gn_statemachine *state); extern gn_error activatewapsetting(char *number, gn_data *data, struct gn_statemachine *state); /* Logo options */ extern void logo_usage(FILE *f); extern gn_error sendlogo(int argc, char *argv[], gn_data *data, struct gn_statemachine *state); extern gn_error getlogo(int argc, char *argv[], gn_data *data, struct gn_statemachine *state); extern gn_error setlogo(int argc, char *argv[], gn_data *data, struct gn_statemachine *state); extern gn_error viewlogo(char *filename); /* Ringtone options */ extern void ringtone_usage(FILE *f); extern char *get_ringtone_name(int id, gn_data *data, struct gn_statemachine *state); extern int getringtone_usage(FILE *f, int exitval); extern gn_error sendringtone(int argc, char *argv[], gn_data *data, struct gn_statemachine *state); extern gn_error getringtone(int argc, char *argv[], gn_data *data, struct gn_statemachine *state); extern int setringtone_usage(FILE *f, int exitval); extern gn_error setringtone(int argc, char *argv[], gn_data *data, struct gn_statemachine *state); extern int playringtone_usage(FILE *f, int exitval); extern gn_error playringtone(int argc, char *argv[], gn_data *data, struct gn_statemachine *state); extern int ringtoneconvert_usage(FILE *f, int exitval); extern gn_error ringtoneconvert(int argc, char *argv[]); extern gn_error getringtonelist(gn_data *data, struct gn_statemachine *state); extern int deleteringtone_usage(FILE *f, int exitval); extern gn_error deleteringtone(int argc, char *argv[], gn_data *data, struct gn_statemachine *state); /* Security options */ extern void security_usage(FILE *f); extern gn_error identify(struct gn_statemachine *state); extern gn_error getlocksinfo(gn_data *data, struct gn_statemachine *state); extern gn_error getsecuritycode(gn_data *data, struct gn_statemachine *state); #ifdef SECURITY extern int entersecuritycode_usage(FILE *f, int exitval); extern gn_error entersecuritycode(char *type, gn_data *data, struct gn_statemachine *state); extern gn_error getsecuritycodestatus(gn_data *data, struct gn_statemachine *state); extern int changesecuritycode_usage(FILE *f, int exitval); extern gn_error changesecuritycode(char *type, gn_data *data, struct gn_statemachine *state); #endif /* File options */ extern void file_usage(FILE *f); extern gn_error getfilelist(char *path, gn_data *data, struct gn_statemachine *state); extern gn_error getfiledetailsbyid(int argc, char *argv[], gn_data *data, struct gn_statemachine *state); extern gn_error getfileid(char *filename, gn_data *data, struct gn_statemachine *state); extern gn_error deletefile(char *filename, gn_data *data, struct gn_statemachine *state); extern gn_error deletefilebyid(char *id, gn_data *data, struct gn_statemachine *state); extern int getfile_usage(FILE *f, int exitval); extern gn_error getfile(int argc, char *argv[], gn_data *data, struct gn_statemachine *state); extern int getfilebyid_usage(FILE *f, int exitval); extern gn_error getfilebyid(int argc, char *argv[], gn_data *data, struct gn_statemachine *state); extern gn_error getallfiles(char *path, gn_data *data, struct gn_statemachine *state); extern int putfile_usage(FILE *f, int exitval); extern gn_error putfile(int argc, char *argv[], gn_data *data, struct gn_statemachine *state); /* Misc options */ extern void other_usage(FILE *f); extern gn_error pmon(gn_data *data, struct gn_statemachine *state); extern gn_error presskeysequence(gn_data *data, struct gn_statemachine *state); extern gn_error enterchar(gn_data *data, struct gn_statemachine *state); extern void list_gsm_networks(void); extern gn_error getnetworkinfo(gn_data *data, struct gn_statemachine *state); extern int gnokii_atoi(char *string); #endif /* __gnokii_app_h_ */ gnokii-0.6.31/gnokii/gnokii-settings.c0000644000175000017500000001275411666163120015756 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 1999-2000 Gary Reuter, Reinhold Jordan Copyright (C) 1999-2006 Pawel Kot Copyright (C) 2000-2002 Marcin Wiacek, Chris Kemp, Manfred Jonsson Copyright (C) 2001 Marian Jancar, Bartek Klepacz Copyright (C) 2001-2002 Pavel Machek, Markus Plail Copyright (C) 2002 Ladis Michl, Simon Huggins Copyright (C) 2002-2004 BORBELY Zoltan Copyright (C) 2003 Bertrik Sikken Copyright (C) 2004 Martin Goldhahn Mainline code for gnokii utility. Phone settings handling functions. */ #include "config.h" #include "misc.h" #include "compat.h" #include #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #include #include #include "gnokii-app.h" #include "gnokii.h" void settings_usage(FILE *f) { fprintf(f, _("Phone settings:\n" " --reset [soft|hard]\n" " --setdatetime [YYYY [MM [DD [HH [MM]]]]]\n" " --getdatetime\n" " --setalarm [HH MM]\n" " --getalarm\n" )); } /* Setting the date and time. */ gn_error setdatetime(int argc, char *argv[], gn_data *data, struct gn_statemachine *state) { struct tm *now; time_t nowh; gn_timestamp date; gn_error error; nowh = time(NULL); now = localtime(&nowh); date.year = now->tm_year; date.month = now->tm_mon+1; date.day = now->tm_mday; date.hour = now->tm_hour; date.minute = now->tm_min; date.second = now->tm_sec; switch (argc - optind - 1) { case 4: date.minute = atoi(argv[optind+4]); case 3: date.hour = atoi(argv[optind+3]); case 2: date.day = atoi(argv[optind+2]); case 1: date.month = atoi(argv[optind+1]); case 0: date.year = atoi(argv[optind]); break; default: break; } if (date.year < 1900) { /* Well, this thing is copyrighted in U.S. This technique is known as Windowing and you can read something about it in LinuxWeekly News: http://lwn.net/1999/features/Windowing.phtml. This thing is beeing written in Czech republic and Poland where algorithms are not allowed to be patented. */ if (date.year > 90) date.year = date.year + 1900; else date.year = date.year + 2000; } gn_data_clear(data); data->datetime = &date; error = gn_sm_functions(GN_OP_SetDateTime, data, state); switch (error) { case GN_ERR_NONE: break; default: fprintf(stderr, _("Error: %s\n"), gn_error_print(error)); break; } return error; } /* In this mode we receive the date and time from mobile phone. */ gn_error getdatetime(gn_data *data, struct gn_statemachine *state) { gn_timestamp date_time; gn_error error; gn_data_clear(data); data->datetime = &date_time; error = gn_sm_functions(GN_OP_GetDateTime, data, state); switch (error) { case GN_ERR_NONE: fprintf(stdout, _("Date: %4d/%02d/%02d\n"), date_time.year, date_time.month, date_time.day); fprintf(stdout, _("Time: %02d:%02d:%02d\n"), date_time.hour, date_time.minute, date_time.second); break; default: fprintf(stderr, _("Error: %s\n"), gn_error_print(error)); break; } return error; } /* Setting the alarm. */ gn_error setalarm(int argc, char *argv[], gn_data *data, struct gn_statemachine *state) { gn_calnote_alarm alarm; gn_error error; if (argc == optind + 2) { alarm.timestamp.hour = atoi(argv[optind]); alarm.timestamp.minute = atoi(argv[optind + 1]); alarm.timestamp.second = 0; alarm.enabled = true; } else { alarm.timestamp.hour = 0; alarm.timestamp.minute = 0; alarm.timestamp.second = 0; alarm.enabled = false; } gn_data_clear(data); data->alarm = &alarm; error = gn_sm_functions(GN_OP_SetAlarm, data, state); switch (error) { case GN_ERR_NONE: break; default: fprintf(stderr, _("Error: %s\n"), gn_error_print(error)); break; } return error; } /* Getting the alarm. */ gn_error getalarm(gn_data *data, struct gn_statemachine *state) { gn_error error; gn_calnote_alarm alarm; gn_data_clear(data); data->alarm = &alarm; error = gn_sm_functions(GN_OP_GetAlarm, data, state); switch (error) { case GN_ERR_NONE: fprintf(stdout, _("Alarm: %s\n"), (alarm.enabled)? _("on"): _("off")); fprintf(stdout, _("Time: %02d:%02d\n"), alarm.timestamp.hour, alarm.timestamp.minute); break; default: fprintf(stderr, _("Error: %s\n"), gn_error_print(error)); break; } return error; } /* Resets the phone */ gn_error reset(char *type, gn_data *data, struct gn_statemachine *state) { gn_data_clear(data); data->reset_type = 0x03; if (type) { if (!strcmp(type, "soft")) data->reset_type = 0x03; else if (!strcmp(type, "hard")) { data->reset_type = 0x04; } else { fprintf(stderr, _("What kind of reset do you want??\n")); return -1; } } return gn_sm_functions(GN_OP_Reset, data, state); } gnokii-0.6.31/gnokii/gnokii-phonebook.c0000644000175000017500000004111511666163120016073 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 1999-2000 Gary Reuter, Reinhold Jordan Copyright (C) 1999-2006 Pawel Kot Copyright (C) 2000-2002 Marcin Wiacek, Chris Kemp, Manfred Jonsson Copyright (C) 2001 Marian Jancar, Bartek Klepacz Copyright (C) 2001-2002 Pavel Machek, Markus Plail Copyright (C) 2002 Ladis Michl, Simon Huggins Copyright (C) 2002-2004 BORBELY Zoltan Copyright (C) 2003 Bertrik Sikken Copyright (C) 2004 Martin Goldhahn Mainline code for gnokii utility. Phonebook functions. */ #include "config.h" #include "misc.h" #include "compat.h" #include #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #include #include "gnokii-app.h" #include "gnokii.h" void phonebook_usage(FILE *f) { fprintf(f, _("Phonebook options:\n" " --getphonebook memory_type start_number [end_number|end]\n" " [[-r|--raw]|[-v|--vcard]|[-l|--ldif]]\n" " --writephonebook [[-o|--overwrite]|[-f|--find-free]]\n" " [-m|--memory-type|--memory memory_type]\n" " [-n|--memory-location|--location number]\n" " [[-v|--vcard]|[-l|--ldif]]\n" " --deletephonebook memory_type start_number [end_number|end]\n")); } /* Displays usage of --getphonebook command */ int getphonebook_usage(FILE *f, int exitval) { fprintf(f, _(" usage: --getphonebook memory start [end] reads phonebook entries from memory type\n" " (SM, ME, IN, OU, ...) messages starting\n" " from location start and ending with end;\n" " if end option is omitted, just one entry\n" " is read;\n" " if 'end' is used all entries are read\n" " -r\n" " --raw output in raw form (comma separated)\n" " -v\n" " --vcard output in vcard format\n" " -l\n" " --ldif output in ldif format\n" "\n" )); return exitval; } /* Get requested range of memory storage entries and output to stdout in easy-to-parse format */ gn_error getphonebook(int argc, char *argv[], gn_data *data, struct gn_statemachine *state) { gn_phonebook_entry entry; gn_memory_status memstat; int i, count, start_entry, end_entry, num_entries = INT_MAX, explicit_end = true; gn_error error = GN_ERR_NONE; char *memory_type_string; int type = 0; /* Output type: 0 - not formatted 1 - CSV 2 - vCard 3 - LDIF */ struct option options[] = { { "raw", no_argument, NULL, 'r' }, { "vcard", no_argument, NULL, 'v' }, { "ldif", no_argument, NULL, 'l' }, { NULL, 0, NULL, 0 } }; /* Handle command line args that set type, start and end locations. */ memory_type_string = optarg; memstat.memory_type = gn_str2memory_type(memory_type_string); if (memstat.memory_type == GN_MT_XX) { fprintf(stderr, _("Unknown memory type %s (use ME, SM, ...)!\n"), optarg); return GN_ERR_INVALIDMEMORYTYPE; } start_entry = gnokii_atoi(argv[optind]); if (errno || start_entry < 0) return getphonebook_usage(stderr, -1); end_entry = parse_end_value_option(argc, argv, optind + 1, start_entry); if (errno || end_entry < 0) return getphonebook_usage(stderr, -1); i = getopt_long(argc, argv, "rvl", options, NULL); switch (i) { case 'r': type = 1; break; case 'v': type = 2; break; case 'l': type = 3; break; case -1: /* default */ break; default: return getphonebook_usage(stderr, -1); } if (argc - optind > 2) { /* There are too many arguments that don't start with '-' */ return getphonebook_usage(stderr, -1); } if (end_entry == INT_MAX) { explicit_end = false; data->memory_status = &memstat; if ((error = gn_sm_functions(GN_OP_GetMemoryStatus, data, state)) == GN_ERR_NONE) { num_entries = memstat.used; end_entry = memstat.used + memstat.free; /* FIXME warn the user like parse_end_value_option() when end_entry < start_entry */ if (end_entry < start_entry) end_entry = start_entry; } } /* Now retrieve the requested entries. */ count = start_entry; while (num_entries > 0 && count <= end_entry) { memset(&entry, 0, sizeof(gn_phonebook_entry)); entry.memory_type = memstat.memory_type; entry.location = count; data->phonebook_entry = &entry; error = gn_sm_functions(GN_OP_ReadPhonebook, data, state); switch (error) { int i; case GN_ERR_NONE: if (entry.empty != false) break; num_entries--; switch (type) { case 1: gn_file_phonebook_raw_write(stdout, &entry, memory_type_string); break; case 2: { char *s; s = gn_phonebook2vcardstr(&entry); fprintf (stdout, "%s", s); free (s); } break; case 3: gn_phonebook2ldif(stdout, &entry); break; default: fprintf(stdout, _("%d. %s: %s\n"), entry.location, _("Name"), entry.name); /* Print out personal information */ if (entry.person.has_person) { if (entry.person.honorific_prefixes[0]) fprintf(stdout, "%s ", entry.person.honorific_prefixes); if (entry.person.given_name[0]) fprintf(stdout, "%s ", entry.person.given_name); if (entry.person.family_name[0]) fprintf(stdout, "%s", entry.person.family_name); fprintf(stdout, "\n"); } fprintf(stdout, _("%s: %s\n"), _("Caller group"), gn_phonebook_group_type2str(entry.caller_group)); /* FIXME: AT driver doesn't set subentries */ if (!entry.subentries_count && entry.number) { fprintf(stdout, _("%s: %s\n"), _("Number"), entry.number); } /* Print out address information */ if (entry.address.has_address) { fprintf(stdout, _("Address information:\n")); if (entry.address.post_office_box[0]) fprintf(stdout, _(" %s: %s\n"), _("Post office address"), entry.address.post_office_box); if (entry.address.extended_address[0]) fprintf(stdout, _(" %s: %s\n"), _("Extended address"), entry.address.extended_address); if (entry.address.street[0]) fprintf(stdout, _(" %s: %s\n"), _("Street"), entry.address.street); if (entry.address.city[0]) fprintf(stdout, _(" %s: %s\n"), _("City"), entry.address.city); if (entry.address.state_province[0]) fprintf(stdout, _(" %s: %s\n"), _("State or province"), entry.address.state_province); if (entry.address.zipcode[0]) fprintf(stdout, _(" %s: %s\n"), _("Zip code"), entry.address.zipcode); if (entry.address.country[0]) fprintf(stdout, _(" %s: %s\n"), _("Country"), entry.address.country); } dprintf("subentries count: %d\n", entry.subentries_count); for (i = 0; i < entry.subentries_count; i++) { fprintf(stdout, "%s: ", gn_subentrytype2string(entry.subentries[i].entry_type, entry.subentries[i].number_type)); switch (entry.subentries[i].entry_type) { case GN_PHONEBOOK_ENTRY_ExtGroup: fprintf(stdout, "%d", entry.subentries[i].data.id); break; case GN_PHONEBOOK_ENTRY_Birthday: case GN_PHONEBOOK_ENTRY_Date: fprintf(stdout, _("%04u.%02u.%02u %02u:%02u:%02u"), entry.subentries[i].data.date.year, entry.subentries[i].data.date.month, entry.subentries[i].data.date.day, entry.subentries[i].data.date.hour, entry.subentries[i].data.date.minute, entry.subentries[i].data.date.second); break; case GN_PHONEBOOK_ENTRY_Image: break; default: fprintf(stdout, "%s", entry.subentries[i].data.number); break; } fprintf(stdout, "\n"); } if ((entry.memory_type == GN_MT_MC || entry.memory_type == GN_MT_DC || entry.memory_type == GN_MT_RC) && entry.date.year) fprintf(stdout, _("Date: %04u.%02u.%02u %02u:%02u:%02u\n"), entry.date.year, entry.date.month, entry.date.day, entry.date.hour, entry.date.minute, entry.date.second); break; } break; case GN_ERR_EMPTYLOCATION: fprintf(stderr, _("Empty memory location. Skipping.\n")); break; default: fprintf(stderr, _("Error reading from the location %d in memory %s\n"), count, memory_type_string); fprintf(stderr, _("Error: %s\n"), gn_error_print(error)); /* some older phones might return GN_ERR_INVALIDLOCATION for lower numbered locations so make it non fatal when a numeric end location was given */ if (!((error == GN_ERR_INVALIDLOCATION) && explicit_end)) { return error; } } count++; } /* ignore non fatal errors that might have occurred above */ return GN_ERR_NONE; } /* Displays usage of --getphonebook command */ int writephonebook_usage(FILE *f, int exitval) { fprintf(f, _(" usage: --writephonebook [[-o|--overwrite]|[-f|--find-free]]\n" " [-m|--memory-type|--memory memory_type]\n" " [-n|--memory-location|--location number]\n" " [[-v|--vcard]|[-l|--ldif]]\n" "\n" )); return exitval; } /* Read data from stdin, parse and write to phone. The parsing is relatively crude and doesn't allow for much variation from the stipulated format. */ /* FIXME: I guess there's *very* similar code in xgnokii */ gn_error writephonebook(int argc, char *argv[], gn_data *data, struct gn_statemachine *state) { gn_phonebook_entry entry; gn_error error = GN_ERR_NONE; gn_memory_type default_mt = GN_MT_ME; /* Default memory_type. Changed if given in the command line */ int default_location = 1; /* default location. Changed if given in the command line */ int find_free = 0; /* By default don't try to find a free location */ int confirm = 0; /* By default don't overwrite existing entries */ int type = 0; /* type of the output: 0 - CSV (default) 1 - vCard 2 - LDIF */ char *line, oline[MAX_INPUT_LINE_LEN]; int i; struct option options[] = { { "overwrite", 0, NULL, 'o'}, { "vcard", 0, NULL, 'v'}, { "ldif", 0, NULL, 'l'}, { "find-free", 0, NULL, 'f'}, { "memory-type", required_argument, NULL, 'm'}, { "memory", required_argument, NULL, 'm'}, { "memory-location", required_argument, NULL, 'n'}, { "location", required_argument, NULL, 'n'}, { NULL, 0, NULL, 0} }; /* Option parsing */ while ((i = getopt_long(argc, argv, "ovlfm:n:", options, NULL)) != -1) { switch (i) { case 'o': confirm = 1; break; case 'v': if (type) return writephonebook_usage(stderr, -1); type = 1; break; case 'l': if (type) return writephonebook_usage(stderr, -1); type = 2; break; case 'f': find_free = 1; break; case 'm': default_mt = gn_str2memory_type(optarg); break; case 'n': default_location = gnokii_atoi(optarg); if (errno || default_location < 0) return writephonebook_usage(stderr, -1); break; default: return writephonebook_usage(stderr, -1); } } if (argc > optind) { /* There are too many arguments that don't start with '-' */ return writephonebook_usage(stderr, -1); } line = oline; /* Go through data from stdin. */ while (!feof(stdin)) { error = GN_ERR_NONE; memset(&entry, 0, sizeof(gn_phonebook_entry)); entry.memory_type = default_mt; entry.location = default_location; switch (type) { case 1: if (gn_vcard2phonebook(stdin, &entry)) error = GN_ERR_WRONGDATAFORMAT; break; case 2: if (gn_ldif2phonebook(stdin, &entry)) error = GN_ERR_WRONGDATAFORMAT; break; default: if (!gn_line_get(stdin, line, MAX_INPUT_LINE_LEN)) goto out; /* it means we read an empty line, but that's not an error */ else error = gn_file_phonebook_raw_parse(&entry, oline); break; } if (error != GN_ERR_NONE) goto out; if (find_free) { #if 0 error = gn_sm_functions(GN_OP_FindFreePhonebookEntry, data, state); if (error == GN_ERR_NOTIMPLEMENTED) { #endif for (i = 1; ; i++) { gn_phonebook_entry aux; memcpy(&aux, &entry, sizeof(gn_phonebook_entry)); data->phonebook_entry = &aux; data->phonebook_entry->location = i; error = gn_sm_functions(GN_OP_ReadPhonebook, data, state); if (error != GN_ERR_NONE && error != GN_ERR_EMPTYLOCATION) { break; } if (aux.empty || error == GN_ERR_EMPTYLOCATION) { entry.location = aux.location; error = GN_ERR_NONE; break; } } #if 0 } #endif if (error != GN_ERR_NONE) goto out; } if (!confirm) { gn_phonebook_entry aux; memcpy(&aux, &entry, sizeof(gn_phonebook_entry)); data->phonebook_entry = &aux; error = gn_sm_functions(GN_OP_ReadPhonebook, data, state); if (error == GN_ERR_NONE || error == GN_ERR_EMPTYLOCATION) { if (!aux.empty && error != GN_ERR_EMPTYLOCATION) { char ans[8] = ""; fprintf(stdout, _("Location busy. ")); confirm = -1; while (confirm < 0) { fprintf(stdout, _("Overwrite? (yes/no) ")); gn_line_get(stdin, ans, 7); if (!strcmp(ans, _("yes"))) confirm = 1; else if (!strcmp(ans, _("no"))) confirm = 0; else { fprintf(stdout, _("\nIncorrect answer [%s]. Assuming 'no'.\n"), ans); confirm = 0; } } /* User chose not to overwrite */ if (!confirm) continue; confirm = 0; } } else { goto out; } } /* Do write and report success/failure. */ gn_phonebook_entry_sanitize(&entry); data->phonebook_entry = &entry; error = gn_sm_functions(GN_OP_WritePhonebook, data, state); if (error == GN_ERR_NONE) { fprintf(stderr, _("Write Succeeded: memory type: %s, loc: %d, name: %s, number: %s\n"), gn_memory_type2str(entry.memory_type), entry.location, entry.name, entry.number); /* If the location was not specified and there are * multiple entries, don't write them to the same * location */ default_location++; } else fprintf(stderr, _("Write failed (%s): memory type: %s, loc: %d, name: %s, number: %s\n"), gn_error_print(error), gn_memory_type2str(entry.memory_type), entry.location, entry.name, entry.number); } out: if (error != GN_ERR_NONE) fprintf(stderr, _("Write failed (%s): memory type: %s, loc: %d, name: %s, number: %s\n"), gn_error_print(error), gn_memory_type2str(entry.memory_type), entry.location, entry.name, entry.number); return error; } /* Displays usage of --deletephonebook command */ int deletephonebook_usage(FILE *f, int exitval) { fprintf(f, _(" usage: --deletephonebook memory_type start_number [end_number|end]\n" "\n" )); return exitval; } /* Delete phonebook entry */ gn_error deletephonebook(int argc, char *argv[], gn_data *data, struct gn_statemachine *state) { gn_phonebook_entry entry; gn_error error; char *memory_type_string; int i, first_location, last_location; if (argc < 3) return deletephonebook_usage(stderr, -1); /* Handle command line args that set memory type and location. */ memory_type_string = optarg; entry.memory_type = gn_str2memory_type(memory_type_string); if (entry.memory_type == GN_MT_XX) { fprintf(stderr, _("Unknown memory type %s (use ME, SM, ...)!\n"), optarg); return GN_ERR_INVALIDMEMORYTYPE; } first_location = gnokii_atoi(argv[optind]); if (errno || first_location < 0) return deletephonebook_usage(stderr, -1); last_location = parse_end_value_option(argc, argv, optind + 1, first_location); if (errno || last_location < 0) return deletephonebook_usage(stderr, -1); for (i = first_location; i <= last_location; i++) { entry.location = i; entry.empty = true; data->phonebook_entry = &entry; error = gn_sm_functions(GN_OP_DeletePhonebook, data, state); switch (error) { case GN_ERR_NONE: fprintf (stderr, _("Phonebook entry removed: memory type: %s, loc: %d\n"), gn_memory_type2str(entry.memory_type), entry.location); break; default: if (last_location == INT_MAX) last_location = 0; else fprintf (stderr, _("Phonebook entry removal FAILED (%s): memory type: %s, loc: %d\n"), gn_error_print(error), gn_memory_type2str(entry.memory_type), entry.location); break; } } return GN_ERR_NONE; } gnokii-0.6.31/gnokii/gnokii-other.c0000644000175000017500000001320711666163120015231 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 1999-2000 Gary Reuter, Reinhold Jordan Copyright (C) 1999-2006 Pawel Kot Copyright (C) 2000-2002 Marcin Wiacek, Chris Kemp, Manfred Jonsson Copyright (C) 2001 Marian Jancar, Bartek Klepacz Copyright (C) 2001-2002 Pavel Machek, Markus Plail Copyright (C) 2002 Ladis Michl, Simon Huggins Copyright (C) 2002-2004 BORBELY Zoltan Copyright (C) 2003 Bertrik Sikken Copyright (C) 2004 Martin Goldhahn Mainline code for gnokii utility. Other phone handling functions. */ #include "config.h" #include "misc.h" #include "compat.h" #include #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #include #ifdef WIN32 # include #endif #include "gnokii-app.h" #include "gnokii.h" void other_usage(FILE *f) { fprintf(f, _("Misc options:\n" " --keysequence\n" " --enterchar\n" " --listnetworks\n" " --getnetworkinfo\n" )); } /* pmon allows fbus code to run in a passive state - it doesn't worry about whether comms are established with the phone. A debugging/development tool. */ gn_error pmon(gn_data *data, struct gn_statemachine *state) { gn_error error; /* Initialise the code for the GSM interface. */ error = gn_gsm_initialise(state); if (error != GN_ERR_NONE) { fprintf(stderr, _("GSM/FBUS init failed! (Unknown model?). Quitting.\n")); return error; } while (1) { usleep(50000); } return GN_ERR_NONE; } static gn_error presskey(gn_data *data, struct gn_statemachine *state) { gn_error error; error = gn_sm_functions(GN_OP_PressPhoneKey, data, state); if (error == GN_ERR_NONE) error = gn_sm_functions(GN_OP_ReleasePhoneKey, data, state); if (error != GN_ERR_NONE) fprintf(stderr, _("Failed to press key: %s\n"), gn_error_print(error)); return error; } gn_error presskeysequence(gn_data *data, struct gn_statemachine *state) { gn_error error = GN_ERR_NONE; unsigned char *syms = "0123456789#*PGR+-UDMN"; gn_key_code keys[] = {GN_KEY_0, GN_KEY_1, GN_KEY_2, GN_KEY_3, GN_KEY_4, GN_KEY_5, GN_KEY_6, GN_KEY_7, GN_KEY_8, GN_KEY_9, GN_KEY_HASH, GN_KEY_ASTERISK, GN_KEY_POWER, GN_KEY_GREEN, GN_KEY_RED, GN_KEY_INCREASEVOLUME, GN_KEY_DECREASEVOLUME, GN_KEY_UP, GN_KEY_DOWN, GN_KEY_MENU, GN_KEY_NAMES}; unsigned char ch, *pos; gn_data_clear(data); console_raw(); while (read(0, &ch, 1) > 0) { if ((pos = strchr(syms, toupper(ch))) != NULL) data->key_code = keys[pos - syms]; else continue; error = presskey(data, state); } return error; } gn_error enterchar(gn_data *data, struct gn_statemachine *state) { unsigned char ch; gn_error error = GN_ERR_NONE; gn_data_clear(data); console_raw(); while ((error = GN_ERR_NONE) && (read(0, &ch, 1) > 0)) { switch (ch) { case '\r': break; case '\n': data->key_code = GN_KEY_MENU; presskey(data, state); break; #ifdef WIN32 case '\033': #else case '\e': #endif data->key_code = GN_KEY_NAMES; presskey(data, state); break; default: data->character = ch; error = gn_sm_functions(GN_OP_EnterChar, data, state); if (error != GN_ERR_NONE) fprintf(stderr, _("Error entering char: %s\n"), gn_error_print(error)); break; } } return error; } void list_gsm_networks(void) { gn_network network; int i = 0; printf(_("Network Name\n")); printf(_("-----------------------------------------\n")); while (gn_network_get(&network, i++)) printf(_("%-7s %s (%s)\n"), network.code, network.name, gn_country_name_get(network.code)); } gn_error getnetworkinfo(gn_data *data, struct gn_statemachine *state) { gn_network_info networkinfo; gn_error error; int lac, cid; char country[4] = {0, 0, 0, 0}; gn_data_clear(data); memset(&networkinfo, 0, sizeof(networkinfo)); data->network_info = &networkinfo; data->reg_notification = NULL; data->callback_data = NULL; if ((error = gn_sm_functions(GN_OP_GetNetworkInfo, data, state)) != GN_ERR_NONE) { fprintf(stderr, _("Error: %s\n"), gn_error_print(error)); return error; } /* Ugly, ugly, ... */ if (networkinfo.cell_id[2] == 0 && networkinfo.cell_id[3] == 0) cid = (networkinfo.cell_id[0] << 8) + networkinfo.cell_id[1]; else cid = (networkinfo.cell_id[0] << 24) + (networkinfo.cell_id[1] << 16) + (networkinfo.cell_id[2] << 8) + networkinfo.cell_id[3]; lac = (networkinfo.LAC[0] << 8) + networkinfo.LAC[1]; memcpy(country, networkinfo.network_code, 3); fprintf(stdout, _("Network : %s (%s)\n"), gn_network_name_get((char *)networkinfo.network_code), gn_country_name_get((char *)country)); fprintf(stdout, _("Network code : %s\n"), (*networkinfo.network_code ? networkinfo.network_code : _("undefined"))); fprintf(stdout, _("LAC : %04x (%d)\n"), lac, lac); fprintf(stdout, _("Cell id : %08x (%d)\n"), cid, cid); return GN_ERR_NONE; } gnokii-0.6.31/Windows/0000755000175000017500000000000011666163466012652 5ustar leoleognokii-0.6.31/Windows/Makefile.am0000644000175000017500000000164411666163120014676 0ustar leoleoEXTRA_DIST = \ gen_gnokii_h.bat \ gnokiirc \ mingw-cross/mingw-cross.sh \ MSVS2005/Gnokii_setup/Gnokii_setup.vdproj \ MSVS2005/gnokii.sln \ MSVS2005/config.h \ MSVS2005/gnokii.vcproj \ MSVS2005/libgnokii.vcproj \ MSVS2008/Gnokii_setup/Gnokii_setup-Win32.vdproj \ MSVS2008/Gnokii_setup/Gnokii_setup-x64.vdproj \ MSVS2008/gnokii.sln \ MSVS2008/config.h \ MSVS2008/gnokii.vcproj \ MSVS2008/libgnokii.vcproj \ MSVC6/config.h \ MSVC6/gnokii.dsp \ MSVC6/libgnokii.dsp \ MSVC6/gnokii.dsw \ MSVC8/gnokii.sln \ MSVC8/config.h \ MSVC8/gnokii.vcproj \ MSVC8/libgnokii.vcproj \ MSVC2010Express/gnokii.sln \ MSVC2010Express/config.h \ MSVC2010Express/README \ MSVC2010Express/gnokii/gnokii.vcxproj \ MSVC2010Express/gnokii/gnokii.vcxproj.filters \ MSVC2010Express/libgnokii/libgnokii.vcxproj \ MSVC2010Express/libgnokii/libgnokii.vcxproj.filters gnokii-0.6.31/Windows/Makefile.in0000644000175000017500000003171211666163211014707 0ustar leoleo# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = Windows DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_expand_dir.m4 \ $(top_srcdir)/m4/acx_pthread.m4 $(top_srcdir)/m4/intltool.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLUETOOTH_LIBS = @BLUETOOTH_LIBS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FIND = @FIND@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLDFLAGS = @GLDFLAGS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GMODULE_CFLAGS = @GMODULE_CFLAGS@ GMODULE_LIBS = @GMODULE_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GNOKII_LT_VERSION = @GNOKII_LT_VERSION@ GNOKII_LT_VERSION_AGE = @GNOKII_LT_VERSION_AGE@ GNOKII_LT_VERSION_CURRENT = @GNOKII_LT_VERSION_CURRENT@ GNOKII_LT_VERSION_REVISION = @GNOKII_LT_VERSION_REVISION@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_LIBICAL = @HAVE_LIBICAL@ HAVE_LIBUSB = @HAVE_LIBUSB@ HAVE_SOCKETPHONET = @HAVE_SOCKETPHONET@ HAVE_XGNOKII = @HAVE_XGNOKII@ ICAL_CFLAGS = @ICAL_CFLAGS@ ICAL_LIBS = @ICAL_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBGNOKII_VERSION_MAJOR = @LIBGNOKII_VERSION_MAJOR@ LIBGNOKII_VERSION_MINOR = @LIBGNOKII_VERSION_MINOR@ LIBGNOKII_VERSION_RELEASE = @LIBGNOKII_VERSION_RELEASE@ LIBGNOKII_VERSION_STRING = @LIBGNOKII_VERSION_STRING@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBPCSCLITE_CFLAGS = @LIBPCSCLITE_CFLAGS@ LIBPCSCLITE_LIBS = @LIBPCSCLITE_LIBS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKE = @MAKE@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ MYSQLCONFIG = @MYSQLCONFIG@ MYSQLCONFIG5 = @MYSQLCONFIG5@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_LIBS = @MYSQL_LIBS@ NEED_LOCALE_CHARSET = @NEED_LOCALE_CHARSET@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OWN_GETOPT = @OWN_GETOPT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PGCONFIG = @PGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSTGRES_CFLAGS = @POSTGRES_CFLAGS@ POSTGRES_LIBS = @POSTGRES_LIBS@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LIBS = @SQLITE3_LIBS@ SQLITE_CFLAGS = @SQLITE_CFLAGS@ SQLITE_LIBS = @SQLITE_LIBS@ STRIP = @STRIP@ TCP_LIBS = @TCP_LIBS@ TERMLDFLAGS = @TERMLDFLAGS@ TERMLIBS = @TERMLIBS@ USB_LIBS = @USB_LIBS@ USE_NLS = @USE_NLS@ USE_UNIX98PTYS = @USE_UNIX98PTYS@ VERSION = @VERSION@ WIN32 = @WIN32@ WIN32_CROSS = @WIN32_CROSS@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ XPACKAGE = @XPACKAGE@ XPM_CFLAGS = @XPM_CFLAGS@ XPM_LIBS = @XPM_LIBS@ XVERSION = @XVERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ acx_pthread_config = @acx_pthread_config@ 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@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ gen_gnokii_h.bat \ gnokiirc \ mingw-cross/mingw-cross.sh \ MSVS2005/Gnokii_setup/Gnokii_setup.vdproj \ MSVS2005/gnokii.sln \ MSVS2005/config.h \ MSVS2005/gnokii.vcproj \ MSVS2005/libgnokii.vcproj \ MSVS2008/Gnokii_setup/Gnokii_setup-Win32.vdproj \ MSVS2008/Gnokii_setup/Gnokii_setup-x64.vdproj \ MSVS2008/gnokii.sln \ MSVS2008/config.h \ MSVS2008/gnokii.vcproj \ MSVS2008/libgnokii.vcproj \ MSVC6/config.h \ MSVC6/gnokii.dsp \ MSVC6/libgnokii.dsp \ MSVC6/gnokii.dsw \ MSVC8/gnokii.sln \ MSVC8/config.h \ MSVC8/gnokii.vcproj \ MSVC8/libgnokii.vcproj \ MSVC2010Express/gnokii.sln \ MSVC2010Express/config.h \ MSVC2010Express/README \ MSVC2010Express/gnokii/gnokii.vcxproj \ MSVC2010Express/gnokii/gnokii.vcxproj.filters \ MSVC2010Express/libgnokii/libgnokii.vcxproj \ MSVC2010Express/libgnokii/libgnokii.vcxproj.filters all: all-am .SUFFIXES: $(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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Windows/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Windows/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 $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gnokii-0.6.31/Windows/MSVC6/0000755000175000017500000000000011666163466013510 5ustar leoleognokii-0.6.31/Windows/MSVC6/gnokii.dsp0000644000175000017500000001241111666163120015462 0ustar leoleo# Microsoft Developer Studio Project File - Name="gnokii" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Console Application" 0x0103 CFG=gnokii - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "gnokii.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "gnokii.mak" CFG="gnokii - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "gnokii - Win32 Release" (based on "Win32 (x86) Console Application") !MESSAGE "gnokii - Win32 Debug" (based on "Win32 (x86) Console Application") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe RSC=rc.exe !IF "$(CFG)" == "gnokii - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "../../include" /I "../../getopt" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "GNOKIIDLL_IMPORTS" /YX /FD /c # ADD BASE RSC /l 0x407 /d "NDEBUG" # ADD RSC /l 0x407 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 # ADD LINK32 /nologo /subsystem:console /machine:I386 # SUBTRACT LINK32 /verbose /debug /nodefaultlib !ELSEIF "$(CFG)" == "gnokii - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c # ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I "." /I "../../include" /I "../../getopt" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "GNOKIIDLL_IMPORTS" /FR /FD /GZ /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x407 /d "_DEBUG" # ADD RSC /l 0x407 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # ADD LINK32 Debug\gnokiid.lib msvcrtd.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 # SUBTRACT LINK32 /verbose !ENDIF # Begin Target # Name "gnokii - Win32 Release" # Name "gnokii - Win32 Debug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=..\..\getopt\getopt.c # End Source File # Begin Source File SOURCE=..\..\getopt\getopt1.c # End Source File # Begin Source File SOURCE="..\..\gnokii\gnokii-app.h" # End Source File # Begin Source File SOURCE="..\..\gnokii\gnokii-calendar.c" # End Source File # Begin Source File SOURCE="..\..\gnokii\gnokii-dial.c" # End Source File # Begin Source File SOURCE="..\..\gnokii\gnokii-file.c" # End Source File # Begin Source File SOURCE="..\..\gnokii\gnokii-logo.c" # End Source File # Begin Source File SOURCE="..\..\gnokii\gnokii-mms.c" # End Source File # Begin Source File SOURCE="..\..\gnokii\gnokii-monitor.c" # End Source File # Begin Source File SOURCE="..\..\gnokii\gnokii-other.c" # End Source File # Begin Source File SOURCE="..\..\gnokii\gnokii-phonebook.c" # End Source File # Begin Source File SOURCE="..\..\gnokii\gnokii-profile.c" # End Source File # Begin Source File SOURCE="..\..\gnokii\gnokii-ringtone.c" # End Source File # Begin Source File SOURCE="..\..\gnokii\gnokii-security.c" # End Source File # Begin Source File SOURCE="..\..\gnokii\gnokii-settings.c" # End Source File # Begin Source File SOURCE="..\..\gnokii\gnokii-sms.c" # End Source File # Begin Source File SOURCE="..\..\gnokii\gnokii-todo.c" # End Source File # Begin Source File SOURCE="..\..\gnokii\gnokii-utils.c" # End Source File # Begin Source File SOURCE="..\..\gnokii\gnokii-wap.c" # End Source File # Begin Source File SOURCE=..\..\gnokii\gnokii.c # ADD CPP /I "../../getopt" # End Source File # End Group # End Target # End Project gnokii-0.6.31/Windows/MSVC6/libgnokii.dsp0000644000175000017500000002165311666163120016161 0ustar leoleo# Microsoft Developer Studio Project File - Name="libgnokii" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 CFG=libgnokii - Win32 Release !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "libgnokii.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "libgnokii.mak" CFG="libgnokii - Win32 Release" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "libgnokii - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "libgnokii - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe MTL=midl.exe RSC=rc.exe !IF "$(CFG)" == "libgnokii - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GNOKIIDLL_EXPORTS" /D "HAVE_CONFIG_H" /YX /FD /c # ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "../../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GNOKIIDLL_EXPORTS" /D "HAVE_CONFIG_H" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x407 /d "NDEBUG" # ADD RSC /l 0x407 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib ws2_32.lib /nologo /dll /machine:I386 # ADD LINK32 /nologo /dll /machine:I386 # SUBTRACT LINK32 /verbose /nodefaultlib !ELSEIF "$(CFG)" == "libgnokii - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GNOKIIDLL_EXPORTS" /D "HAVE_CONFIG_H" /YX /FD /GZ /c # ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I "." /I "../../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GNOKIIDLL_EXPORTS" /D "HAVE_CONFIG_H" /FR /FD /GZ /c # SUBTRACT CPP /YX # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x407 /d "_DEBUG" # ADD RSC /l 0x407 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib ws2_32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept # ADD LINK32 msvcrtd.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"Debug/gnokiid.dll" # Begin Custom Build - Copying GNOKII DLL & LIB ... OutDir=.\Debug ProjDir=. InputPath=.\Debug\gnokiid.dll SOURCE="$(InputPath)" "$(ProjDir)\gnokiid.dll" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" echo on copy $(OutDir)\gnokiid.lib $(ProjDir)\gnokiid.lib copy $(OutDir)\gnokiid.dll $(ProjDir)\gnokiid.dll # End Custom Build !ENDIF # Begin Target # Name "libgnokii - Win32 Release" # Name "libgnokii - Win32 Debug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=..\..\common\phones\atbosch.c # End Source File # Begin Source File SOURCE=..\..\common\links\atbus.c # End Source File # Begin Source File SOURCE=..\..\common\phones\ateric.c # End Source File # Begin Source File SOURCE=..\..\common\phones\atgen.c # End Source File # Begin Source File SOURCE=..\..\common\phones\athuawei.c # End Source File # Begin Source File SOURCE=..\..\common\phones\atlg.c # End Source File # Begin Source File SOURCE=..\..\common\phones\atmot.c # End Source File # Begin Source File SOURCE=..\..\common\phones\atnok.c # End Source File # Begin Source File SOURCE=..\..\common\phones\atsag.c # End Source File # Begin Source File SOURCE=..\..\common\phones\atsam.c # End Source File # Begin Source File SOURCE=..\..\common\phones\atsie.c # End Source File # Begin Source File SOURCE=..\..\common\phones\atsoer.c # End Source File # Begin Source File SOURCE=..\..\common\devices\bluetooth.c # End Source File # Begin Source File SOURCE=..\..\common\cfgreader.c # End Source File # Begin Source File SOURCE=..\..\common\compat.c # End Source File # Begin Source File SOURCE=..\..\common\device.c # End Source File # Begin Source File SOURCE=..\..\common\devices\dku2libusb.c # End Source File # Begin Source File SOURCE=..\..\common\phones\fake.c # End Source File # Begin Source File SOURCE="..\..\common\links\fbus-3110.c" # End Source File # Begin Source File SOURCE="..\..\common\links\fbus-phonet.c" # End Source File # Begin Source File SOURCE=..\..\common\links\fbus.c # End Source File # Begin Source File SOURCE=..\..\common\phones\generic.c # End Source File # Begin Source File SOURCE=..\..\common\phones\gnapplet.c # End Source File # Begin Source File SOURCE=..\..\common\links\gnbus.c # End Source File # Begin Source File SOURCE="..\..\common\gsm-api.c" # End Source File # Begin Source File SOURCE="..\..\common\gsm-bitmaps.c" # End Source File # Begin Source File SOURCE="..\..\common\gsm-call.c" # End Source File # Begin Source File SOURCE="..\..\common\gsm-common.c" # End Source File # Begin Source File SOURCE="..\..\common\gsm-encoding.c" # End Source File # Begin Source File SOURCE="..\..\common\gsm-error.c" # End Source File # Begin Source File SOURCE="..\..\common\gsm-filetypes.c" # End Source File # Begin Source File SOURCE="..\..\common\gsm-mms.c" # End Source File # Begin Source File SOURCE="..\..\common\gsm-networks.c" # End Source File # Begin Source File SOURCE="..\..\common\gsm-ringtones.c" # End Source File # Begin Source File SOURCE="..\..\common\gsm-sms.c" # End Source File # Begin Source File SOURCE="..\..\common\gsm-statemachine.c" # End Source File # Begin Source File SOURCE=..\..\common\devices\irda.c # End Source File # Begin Source File SOURCE=..\..\common\ldif.c # End Source File # Begin Source File SOURCE=..\..\common\libfunctions.c # End Source File # Begin Source File SOURCE=..\..\intl\localcharset.c # PROP Exclude_From_Build 1 # End Source File # Begin Source File SOURCE=..\..\common\links\m2bus.c # End Source File # Begin Source File SOURCE=..\..\common\map.c # End Source File # Begin Source File SOURCE=..\..\common\misc.c # End Source File # Begin Source File SOURCE=..\..\common\phones\nk3110.c # End Source File # Begin Source File SOURCE=..\..\common\phones\nk6100.c # End Source File # Begin Source File SOURCE=..\..\common\phones\nk6160.c # End Source File # Begin Source File SOURCE=..\..\common\phones\nk6510.c # End Source File # Begin Source File SOURCE=..\..\common\phones\nk7110.c # End Source File # Begin Source File SOURCE="..\..\common\nokia-decoding.c" # End Source File # Begin Source File SOURCE=..\..\common\phones\nokia.c # End Source File # Begin Source File SOURCE=..\..\common\devices\osxbluetooth.c # End Source File # Begin Source File SOURCE=..\..\common\pkt.c # End Source File # Begin Source File SOURCE=..\..\common\readmidi.c # End Source File # Begin Source File SOURCE="..\..\common\sms-nokia.c" # End Source File # Begin Source File SOURCE=..\..\common\snprintf.c # End Source File # Begin Source File SOURCE=..\..\common\devices\tcp.c # End Source File # Begin Source File SOURCE=..\..\common\devices\tekram.c # End Source File # Begin Source File SOURCE=..\..\common\devices\unixbluetooth.c # End Source File # Begin Source File SOURCE=..\..\common\links\utils.c # End Source File # Begin Source File SOURCE=..\..\common\vcal.c # End Source File # Begin Source File SOURCE=..\..\common\vcard.c # End Source File # Begin Source File SOURCE=..\..\common\devices\winirda.c # End Source File # Begin Source File SOURCE=..\..\common\devices\winserial.c # End Source File # End Group # End Target # End Project gnokii-0.6.31/Windows/MSVC6/config.h0000644000175000017500000000675711666163120015130 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2003 Marcus Godehardt This is the config.h file for GNOKII for MSVC6 compiler, you can edit this manually. This is not auto generated. */ #ifndef _config_h #define _config_h #if defined(_MSC_VER) && defined(WIN32) # pragma once #else # error This config.h is only for MSVC6 compiler !!! #endif #undef VERSION #define VERSION "0.6.31" /* No bluetooth and no IRDA */ #undef HAVE_BLUETOOTH #undef HAVE_IRDA /* Define if you have the following headers */ #define HAVE_STDARG_H 1 #define HAVE_STRING_H 1 #undef HAVE_STRINGS_H #undef HAVE_STDINT_H #undef HAVE_INTTYPES_H #define HAVE_SYS_TYPES_H 1 #undef HAVE_SYS_FILE_H #undef HAVE_SYS_TIME_H #undef HAVE_UNISTD_H #define HAVE_CTYPE_H 1 #define HAVE_STDLIB_H 1 #define HAVE_DIRECT_H 1 #define HAVE_LIMITS_H 1 #define HAVE_SYS_STAT_H 1 /* Define if your compiler supports long long */ #undef HAVE_LONG_LONG /* Define if your compiler supports long double */ #undef HAVE_LONG_DOUBLE /* Define if you have timersub() */ #undef HAVE_TIMEOPS /* Define if you have gettimeofday() */ #undef HAVE_GETTIMEOFDAY /* Define if you have tm_gmtoff field in tm structure */ #undef HAVE_TM_GMTON /* Define if you have cfsetspeed, cfsetispeed, cfsetospeed, c_ispeed and c_ospeed in struct termios */ #undef HAVE_CFSETSPEED #undef HAVE_CFSETOSPEED #undef HAVE_TERMIOS_CSPEED /* Define both if you have ISO C99 compliant snprintf */ #undef HAVE_SNPRINTF #undef HAVE_C99_SNPRINTF /* Define both if you have ISO C99 compliant vsnprintf */ #define HAVE_VSNPRINTF 1 #undef HAVE_C99_VSNPRINTF /* Define if you have asprintf */ #define HAVE_ASPRINTF 1 /* Define if you have vasprintf */ #define HAVE_VASPRINTF 1 /* Define if you have strsep */ #undef HAVE_STRSEP /* Define debug level */ #define DEBUG 1 #define XDEBUG 1 #define RLP_DEBUG 1 /* Decide if you want security options enabled */ #define SECURITY /* Define if you have XPM components */ #undef XPM /* Define if you want NLS */ #undef ENABLE_NLS /* Define if you have and nl_langinfo(CODESET). */ #undef HAVE_LANGINFO_CODESET /* Define if you want to use Unix98 PTYs */ #undef USE_UNIX98PTYS /* Define if struct msghdr has msg_control field */ #undef HAVE_MSGHDR_MSG_CONTROL /* FIXME: Disable some odd warnings, comment these lines if u wanna fix the bad code lines */ #pragma warning(disable : 4244) // conversion from 'int ' to 'float ', possible loss of data #pragma warning(disable : 4761) // integral size mismatch in argument; conversion supplied #pragma warning(disable : 4018) // signed/unsigned mismatch #pragma warning(disable : 4305) // truncation from 'const int ' to 'char ' #pragma warning(disable : 4996) // 'strnicmp' was declared deprecated /* Suppress CRT warnings */ #define _CRT_SECURE_NO_DEPRECATE #endif // _config_h gnokii-0.6.31/Windows/MSVC6/gnokii.dsw0000644000175000017500000000146211666163120015475 0ustar leoleoMicrosoft Developer Studio Workspace File, Format Version 6.00 # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! ############################################################################### Project: "gnokii"=.\gnokii.dsp - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ Begin Project Dependency Project_Dep_Name libgnokii End Project Dependency }}} ############################################################################### Project: "libgnokii"=.\libgnokii.dsp - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Global: Package=<5> {{{ }}} Package=<3> {{{ }}} ############################################################################### gnokii-0.6.31/Windows/gen_gnokii_h.bat0000644000175000017500000000365111666163120015752 0ustar leoleo@echo off set GNOKII_H_IN_PATH=..\include set SED=sed.exe if not exist %GNOKII_H_IN_PATH%\gnokii.h.in goto :path_error call :path_search %SED% if not exist %SED_PATH%%SED% goto :sed_error findstr /r /c:"^GNOKII_LT_VERSION_" ..\configure.in > %TEMP%\gnokii_ver.txt for /F %%i in (%TEMP%\gnokii_ver.txt) do set %%i del /q %TEMP%\gnokii_ver.txt rem echo Got versions! rem echo GNOKII_LT_VERSION_CURRENT: %GNOKII_LT_VERSION_CURRENT% rem echo GNOKII_LT_VERSION_REVISION: %GNOKII_LT_VERSION_REVISION% rem echo GNOKII_LT_VERSION_AGE: %GNOKII_LT_VERSION_AGE% rem Determine LibGnokii version set /a LIBGNOKII_VERSION_MAJOR=%GNOKII_LT_VERSION_CURRENT% - %GNOKII_LT_VERSION_AGE% set LIBGNOKII_VERSION_MINOR=%GNOKII_LT_VERSION_AGE% set LIBGNOKII_VERSION_RELEASE=%GNOKII_LT_VERSION_REVISION% set LIBGNOKII_VERSION_STRING=%LIBGNOKII_VERSION_MAJOR%.%LIBGNOKII_VERSION_MINOR%.%LIBGNOKII_VERSION_RELEASE% echo Ver: %LIBGNOKII_VERSION_STRING% rem include\gnokii.h.in has: rem #define LIBGNOKII_VERSION_STRING "@LIBGNOKII_VERSION_STRING@" rem #define LIBGNOKII_VERSION_MAJOR @LIBGNOKII_VERSION_MAJOR@ rem #define LIBGNOKII_VERSION_MINOR @LIBGNOKII_VERSION_MINOR@ rem #define LIBGNOKII_VERSION_RELEASE @LIBGNOKII_VERSION_RELEASE@ rem Prepare echo s/@LIBGNOKII_VERSION_STRING@/%LIBGNOKII_VERSION_STRING%/ > %temp%\gnokii_version.sed echo s/@LIBGNOKII_VERSION_MAJOR@/%LIBGNOKII_VERSION_MAJOR%/ >> %temp%\gnokii_version.sed echo s/@LIBGNOKII_VERSION_MINOR@/%LIBGNOKII_VERSION_MINOR%/ >> %temp%\gnokii_version.sed echo s/@LIBGNOKII_VERSION_RELEASE@/%LIBGNOKII_VERSION_RELEASE%/ >> %temp%\gnokii_version.sed rem Execute sed with parameters sed -f %temp%\gnokii_version.sed %GNOKII_H_IN_PATH%\gnokii.h.in > %GNOKII_H_IN_PATH%\gnokii.h del /q %TEMP%\gnokii_version.sed echo done! goto :EOF :path_search set SED_PATH= set SED_PATH=%~dp$PATH:1% goto :EOF :sed_error echo Error! Cannot find sed.exe in path goto :EOF :path_error echo Error! Cannot find gnokii.h.in goto :EOF gnokii-0.6.31/Windows/MSVS2005/0000755000175000017500000000000011666163466013751 5ustar leoleognokii-0.6.31/Windows/MSVS2005/gnokii.vcproj0000644000175000017500000001675111666163120016453 0ustar leoleo gnokii-0.6.31/Windows/MSVS2005/gnokii.sln0000644000175000017500000000351211666163120015733 0ustar leoleo Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gnokii", "gnokii.vcproj", "{681F70AD-B62A-42F3-A85E-94DE5E160437}" ProjectSection(ProjectDependencies) = postProject {93B245DE-6DCE-46E2-BFF1-171383B0643C} = {93B245DE-6DCE-46E2-BFF1-171383B0643C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libgnokii", "libgnokii.vcproj", "{93B245DE-6DCE-46E2-BFF1-171383B0643C}" EndProject Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "Gnokii setup", "Gnokii_setup\Gnokii_setup.vdproj", "{52325EA7-CFC3-488D-A213-2ACF154E30DA}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {681F70AD-B62A-42F3-A85E-94DE5E160437}.Debug|Win32.ActiveCfg = Debug|Win32 {681F70AD-B62A-42F3-A85E-94DE5E160437}.Debug|Win32.Build.0 = Debug|Win32 {681F70AD-B62A-42F3-A85E-94DE5E160437}.Release|Win32.ActiveCfg = Release|Win32 {681F70AD-B62A-42F3-A85E-94DE5E160437}.Release|Win32.Build.0 = Release|Win32 {93B245DE-6DCE-46E2-BFF1-171383B0643C}.Debug|Win32.ActiveCfg = Debug|Win32 {93B245DE-6DCE-46E2-BFF1-171383B0643C}.Debug|Win32.Build.0 = Debug|Win32 {93B245DE-6DCE-46E2-BFF1-171383B0643C}.Release|Win32.ActiveCfg = Release|Win32 {93B245DE-6DCE-46E2-BFF1-171383B0643C}.Release|Win32.Build.0 = Release|Win32 {52325EA7-CFC3-488D-A213-2ACF154E30DA}.Debug|Win32.ActiveCfg = Debug {52325EA7-CFC3-488D-A213-2ACF154E30DA}.Release|Win32.ActiveCfg = Release {52325EA7-CFC3-488D-A213-2ACF154E30DA}.Release|Win32.Build.0 = Release EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal gnokii-0.6.31/Windows/MSVS2005/Gnokii_setup/0000755000175000017500000000000011666163466016411 5ustar leoleognokii-0.6.31/Windows/MSVS2005/Gnokii_setup/Gnokii_setup.vdproj0000755000175000017500000007213611666163120022276 0ustar leoleo"DeployProject" { "VSVersion" = "3:800" "ProjectType" = "8:{978C614F-708E-4E1A-B201-565925725DBA}" "IsWebType" = "8:FALSE" "ProjectName" = "8:Gnokii setup" "LanguageId" = "3:1033" "CodePage" = "3:1252" "UILanguageId" = "3:1033" "SccProjectName" = "8:" "SccLocalPath" = "8:" "SccAuxPath" = "8:" "SccProvider" = "8:" "Hierarchy" { "Entry" { "MsmKey" = "8:_1E0FA563BAB6403A92865089394592A7" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_8C762EB833514511B0C0A44D32BACDC4" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_8D3BDCF39C2C406881A311BD14F93AE0" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } } "Configurations" { "Debug" { "DisplayName" = "8:Debug" "IsDebugOnly" = "11:TRUE" "IsReleaseOnly" = "11:FALSE" "OutputFilename" = "8:Debug\\Gnokii.msi" "PackageFilesAs" = "3:2" "PackageFileSize" = "3:-2147483648" "CabType" = "3:1" "Compression" = "3:2" "SignOutput" = "11:FALSE" "CertificateFile" = "8:" "PrivateKeyFile" = "8:" "TimeStampServer" = "8:" "InstallerBootstrapper" = "3:2" "BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}" { "Enabled" = "11:TRUE" "PromptEnabled" = "11:TRUE" "PrerequisitesLocation" = "2:1" "Url" = "8:" "ComponentsUrl" = "8:" "Items" { } } } "Release" { "DisplayName" = "8:Release" "IsDebugOnly" = "11:FALSE" "IsReleaseOnly" = "11:TRUE" "OutputFilename" = "8:Release\\Gnokii.msi" "PackageFilesAs" = "3:2" "PackageFileSize" = "3:-2147483648" "CabType" = "3:1" "Compression" = "3:2" "SignOutput" = "11:FALSE" "CertificateFile" = "8:" "PrivateKeyFile" = "8:" "TimeStampServer" = "8:" "InstallerBootstrapper" = "3:2" "BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}" { "Enabled" = "11:TRUE" "PromptEnabled" = "11:TRUE" "PrerequisitesLocation" = "2:1" "Url" = "8:" "ComponentsUrl" = "8:" "Items" { "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.Net.Framework.2.0" { "Name" = "8:Microsoft .NET Framework 2.0" "ProductCode" = "8:Microsoft.Net.Framework.2.0" } } } } } "Deployable" { "CustomAction" { } "DefaultFeature" { "Name" = "8:DefaultFeature" "Title" = "8:" "Description" = "8:" } "ExternalPersistence" { "LaunchCondition" { } } "File" { "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_8D3BDCF39C2C406881A311BD14F93AE0" { "SourcePath" = "8:..\\..\\gnokiirc" "TargetName" = "8:gnokiirc" "Tag" = "8:" "Folder" = "8:_47594F28A2A641EEABDAF46CE48F9285" "Condition" = "8:" "Transitive" = "11:FALSE" "Vital" = "11:TRUE" "ReadOnly" = "11:FALSE" "Hidden" = "11:FALSE" "System" = "11:FALSE" "Permanent" = "11:FALSE" "SharedLegacy" = "11:FALSE" "PackageAs" = "3:1" "Register" = "3:1" "Exclude" = "11:FALSE" "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } } "FileType" { } "Folder" { "{3C67513D-01DD-4637-8A68-80971EB9504F}:_47594F28A2A641EEABDAF46CE48F9285" { "DefaultLocation" = "8:[ProgramFilesFolder]\\Gnokii" "Name" = "8:#1925" "AlwaysCreate" = "11:FALSE" "Condition" = "8:" "Transitive" = "11:FALSE" "Property" = "8:TARGETDIR" "Folders" { } } "{1525181F-901A-416C-8A58-119130FE478E}:_5EC0EFD6175C435DB00691539E50F39F" { "Name" = "8:#1919" "AlwaysCreate" = "11:FALSE" "Condition" = "8:" "Transitive" = "11:FALSE" "Property" = "8:ProgramMenuFolder" "Folders" { } } "{1525181F-901A-416C-8A58-119130FE478E}:_D64F03035CE242908659F708343C34BF" { "Name" = "8:#1916" "AlwaysCreate" = "11:FALSE" "Condition" = "8:" "Transitive" = "11:FALSE" "Property" = "8:DesktopFolder" "Folders" { } } } "LaunchCondition" { } "Locator" { } "MsiBootstrapper" { "LangId" = "3:1033" } "Product" { "Name" = "8:Microsoft Visual Studio" "ProductName" = "8:Gnokii" "ProductCode" = "8:{25D47B1C-EAD4-41BD-B69E-7E507C10D6A6}" "PackageCode" = "8:{F43F712E-5664-47E6-8AFA-71D553D877A5}" "UpgradeCode" = "8:{D725933B-6423-4BB1-B06D-7E905E9AA9D1}" "RestartWWWService" = "11:FALSE" "RemovePreviousVersions" = "11:FALSE" "DetectNewerInstalledVersion" = "11:TRUE" "InstallAllUsers" = "11:FALSE" "ProductVersion" = "8:1.0.0" "Manufacturer" = "8:Gnokii project" "ARPHELPTELEPHONE" = "8:" "ARPHELPLINK" = "8:" "Title" = "8:Gnokii" "Subject" = "8:" "ARPCONTACT" = "8:Gnokii project" "Keywords" = "8:" "ARPCOMMENTS" = "8:" "ARPURLINFOABOUT" = "8:" "ARPPRODUCTICON" = "8:" "ARPIconIndex" = "3:0" "SearchPath" = "8:" "UseSystemSearchPath" = "11:TRUE" "TargetPlatform" = "3:0" "PreBuildEvent" = "8:" "PostBuildEvent" = "8:" "RunPostBuildEvent" = "3:0" } "Registry" { "HKLM" { "Keys" { "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_647D54F07CD84FBABAB761F5C0B6B622" { "Name" = "8:Software" "Condition" = "8:" "AlwaysCreate" = "11:FALSE" "DeleteAtUninstall" = "11:FALSE" "Transitive" = "11:FALSE" "Keys" { "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_77ADFDDEC8AA495A916D75096C53DEAF" { "Name" = "8:[Manufacturer]" "Condition" = "8:" "AlwaysCreate" = "11:FALSE" "DeleteAtUninstall" = "11:FALSE" "Transitive" = "11:FALSE" "Keys" { } "Values" { } } } "Values" { } } } } "HKCU" { "Keys" { "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_5C95416E97FD4F6BAE9DF463B37621FB" { "Name" = "8:Software" "Condition" = "8:" "AlwaysCreate" = "11:FALSE" "DeleteAtUninstall" = "11:FALSE" "Transitive" = "11:FALSE" "Keys" { "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_D16E46C7066E4C42A722584FAA2A5AF3" { "Name" = "8:[Manufacturer]" "Condition" = "8:" "AlwaysCreate" = "11:FALSE" "DeleteAtUninstall" = "11:FALSE" "Transitive" = "11:FALSE" "Keys" { } "Values" { } } } "Values" { } } } } "HKCR" { "Keys" { } } "HKU" { "Keys" { } } "HKPU" { "Keys" { } } } "Sequences" { } "Shortcut" { } "UserInterface" { "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_36C9A40D901344EE92EE7782225B52F7" { "Name" = "8:#1902" "Sequence" = "3:1" "Attributes" = "3:3" "Dialogs" { "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_513987191E7F402DBE57BD761AD42454" { "Sequence" = "3:100" "DisplayName" = "8:Finished" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdFinishedDlg.wid" "Properties" { "BannerBitmap" { "Name" = "8:BannerBitmap" "DisplayName" = "8:#1001" "Description" = "8:#1101" "Type" = "3:8" "ContextData" = "8:Bitmap" "Attributes" = "3:4" "Setting" = "3:1" "UsePlugInResources" = "11:TRUE" } "UpdateText" { "Name" = "8:UpdateText" "DisplayName" = "8:#1058" "Description" = "8:#1158" "Type" = "3:15" "ContextData" = "8:" "Attributes" = "3:0" "Setting" = "3:1" "Value" = "8:#1258" "DefaultValue" = "8:#1258" "UsePlugInResources" = "11:TRUE" } } } } } "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_4F4A2C06A79541D59B064DF792C54BD9" { "Name" = "8:#1901" "Sequence" = "3:1" "Attributes" = "3:2" "Dialogs" { "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_E15FD96B4276435F89E3B1747EA89207" { "Sequence" = "3:100" "DisplayName" = "8:Progress" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdProgressDlg.wid" "Properties" { "BannerBitmap" { "Name" = "8:BannerBitmap" "DisplayName" = "8:#1001" "Description" = "8:#1101" "Type" = "3:8" "ContextData" = "8:Bitmap" "Attributes" = "3:4" "Setting" = "3:1" "UsePlugInResources" = "11:TRUE" } "ShowProgress" { "Name" = "8:ShowProgress" "DisplayName" = "8:#1009" "Description" = "8:#1109" "Type" = "3:5" "ContextData" = "8:1;True=1;False=0" "Attributes" = "3:0" "Setting" = "3:0" "Value" = "3:1" "DefaultValue" = "3:1" "UsePlugInResources" = "11:TRUE" } } } } } "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_54530E94C7F14F45817077D9041332A1" { "Name" = "8:#1902" "Sequence" = "3:2" "Attributes" = "3:3" "Dialogs" { "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_307AFD37A3C141BC88F223B3B6B6C21A" { "Sequence" = "3:100" "DisplayName" = "8:Finished" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdAdminFinishedDlg.wid" "Properties" { "BannerBitmap" { "Name" = "8:BannerBitmap" "DisplayName" = "8:#1001" "Description" = "8:#1101" "Type" = "3:8" "ContextData" = "8:Bitmap" "Attributes" = "3:4" "Setting" = "3:1" "UsePlugInResources" = "11:TRUE" } } } } } "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_5CA2B462C9D84A97A14FC8CB465E1C39" { "Name" = "8:#1901" "Sequence" = "3:2" "Attributes" = "3:2" "Dialogs" { "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_8CB42C99D90B485B966D4481BBBD8472" { "Sequence" = "3:100" "DisplayName" = "8:Progress" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdAdminProgressDlg.wid" "Properties" { "BannerBitmap" { "Name" = "8:BannerBitmap" "DisplayName" = "8:#1001" "Description" = "8:#1101" "Type" = "3:8" "ContextData" = "8:Bitmap" "Attributes" = "3:4" "Setting" = "3:1" "UsePlugInResources" = "11:TRUE" } "ShowProgress" { "Name" = "8:ShowProgress" "DisplayName" = "8:#1009" "Description" = "8:#1109" "Type" = "3:5" "ContextData" = "8:1;True=1;False=0" "Attributes" = "3:0" "Setting" = "3:0" "Value" = "3:1" "DefaultValue" = "3:1" "UsePlugInResources" = "11:TRUE" } } } } } "{2479F3F5-0309-486D-8047-8187E2CE5BA0}:_6DE70A3C4ADE4F1497B803EA8A711D2B" { "UseDynamicProperties" = "11:FALSE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdUserInterface.wim" } "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_75E181815C9443898B301921AC5FA130" { "Name" = "8:#1900" "Sequence" = "3:1" "Attributes" = "3:1" "Dialogs" { "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_0EE52DA5193C457D85F8542DBA45DC90" { "Sequence" = "3:300" "DisplayName" = "8:Confirm Installation" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdConfirmDlg.wid" "Properties" { "BannerBitmap" { "Name" = "8:BannerBitmap" "DisplayName" = "8:#1001" "Description" = "8:#1101" "Type" = "3:8" "ContextData" = "8:Bitmap" "Attributes" = "3:4" "Setting" = "3:1" "UsePlugInResources" = "11:TRUE" } } } "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_9CD4374A6C714242B40E16A6A244D0B5" { "Sequence" = "3:200" "DisplayName" = "8:Installation Folder" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdFolderDlg.wid" "Properties" { "BannerBitmap" { "Name" = "8:BannerBitmap" "DisplayName" = "8:#1001" "Description" = "8:#1101" "Type" = "3:8" "ContextData" = "8:Bitmap" "Attributes" = "3:4" "Setting" = "3:1" "UsePlugInResources" = "11:TRUE" } "InstallAllUsersVisible" { "Name" = "8:InstallAllUsersVisible" "DisplayName" = "8:#1059" "Description" = "8:#1159" "Type" = "3:5" "ContextData" = "8:1;True=1;False=0" "Attributes" = "3:0" "Setting" = "3:0" "Value" = "3:1" "DefaultValue" = "3:1" "UsePlugInResources" = "11:TRUE" } } } "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_FD22BF9BEF6A4BB39065690A9EEB1AB9" { "Sequence" = "3:100" "DisplayName" = "8:Welcome" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdWelcomeDlg.wid" "Properties" { "BannerBitmap" { "Name" = "8:BannerBitmap" "DisplayName" = "8:#1001" "Description" = "8:#1101" "Type" = "3:8" "ContextData" = "8:Bitmap" "Attributes" = "3:4" "Setting" = "3:1" "UsePlugInResources" = "11:TRUE" } "CopyrightWarning" { "Name" = "8:CopyrightWarning" "DisplayName" = "8:#1002" "Description" = "8:#1102" "Type" = "3:3" "ContextData" = "8:" "Attributes" = "3:0" "Setting" = "3:1" "Value" = "8:#1202" "DefaultValue" = "8:#1202" "UsePlugInResources" = "11:TRUE" } "Welcome" { "Name" = "8:Welcome" "DisplayName" = "8:#1003" "Description" = "8:#1103" "Type" = "3:3" "ContextData" = "8:" "Attributes" = "3:0" "Setting" = "3:1" "Value" = "8:#1203" "DefaultValue" = "8:#1203" "UsePlugInResources" = "11:TRUE" } } } } } "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_E73614463FBB4CCBBCDB472309D26FC7" { "Name" = "8:#1900" "Sequence" = "3:2" "Attributes" = "3:1" "Dialogs" { "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_89820ADC9D974789AAC1F03520BEE188" { "Sequence" = "3:200" "DisplayName" = "8:Installation Folder" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdAdminFolderDlg.wid" "Properties" { "BannerBitmap" { "Name" = "8:BannerBitmap" "DisplayName" = "8:#1001" "Description" = "8:#1101" "Type" = "3:8" "ContextData" = "8:Bitmap" "Attributes" = "3:4" "Setting" = "3:1" "UsePlugInResources" = "11:TRUE" } } } "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_93DEBD2461C745C3893CDA58312D2FCC" { "Sequence" = "3:100" "DisplayName" = "8:Welcome" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdAdminWelcomeDlg.wid" "Properties" { "BannerBitmap" { "Name" = "8:BannerBitmap" "DisplayName" = "8:#1001" "Description" = "8:#1101" "Type" = "3:8" "ContextData" = "8:Bitmap" "Attributes" = "3:4" "Setting" = "3:1" "UsePlugInResources" = "11:TRUE" } "CopyrightWarning" { "Name" = "8:CopyrightWarning" "DisplayName" = "8:#1002" "Description" = "8:#1102" "Type" = "3:3" "ContextData" = "8:" "Attributes" = "3:0" "Setting" = "3:1" "Value" = "8:#1202" "DefaultValue" = "8:#1202" "UsePlugInResources" = "11:TRUE" } "Welcome" { "Name" = "8:Welcome" "DisplayName" = "8:#1003" "Description" = "8:#1103" "Type" = "3:3" "ContextData" = "8:" "Attributes" = "3:0" "Setting" = "3:1" "Value" = "8:#1203" "DefaultValue" = "8:#1203" "UsePlugInResources" = "11:TRUE" } } } "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_F2892C8894714BF99C84BC671F1EB235" { "Sequence" = "3:300" "DisplayName" = "8:Confirm Installation" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdAdminConfirmDlg.wid" "Properties" { "BannerBitmap" { "Name" = "8:BannerBitmap" "DisplayName" = "8:#1001" "Description" = "8:#1101" "Type" = "3:8" "ContextData" = "8:Bitmap" "Attributes" = "3:4" "Setting" = "3:1" "UsePlugInResources" = "11:TRUE" } } } } } "{2479F3F5-0309-486D-8047-8187E2CE5BA0}:_E74F490E433D4F789FC1F05D41356CEC" { "UseDynamicProperties" = "11:FALSE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdBasicDialogs.wim" } } "MergeModule" { } "ProjectOutput" { "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_1E0FA563BAB6403A92865089394592A7" { "SourcePath" = "8:..\\release\\gnokii.exe" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_47594F28A2A641EEABDAF46CE48F9285" "Condition" = "8:" "Transitive" = "11:FALSE" "Vital" = "11:TRUE" "ReadOnly" = "11:FALSE" "Hidden" = "11:FALSE" "System" = "11:FALSE" "Permanent" = "11:FALSE" "SharedLegacy" = "11:FALSE" "PackageAs" = "3:1" "Register" = "3:1" "Exclude" = "11:FALSE" "IsDependency" = "11:FALSE" "IsolateTo" = "8:" "ProjectOutputGroupRegister" = "3:1" "OutputConfiguration" = "8:" "OutputGroupCanonicalName" = "8:Built" "OutputProjectGuid" = "8:{681F70AD-B62A-42F3-A85E-94DE5E160437}" "ShowKeyOutput" = "11:TRUE" "ExcludeFilters" { } } "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_8C762EB833514511B0C0A44D32BACDC4" { "SourcePath" = "8:..\\release\\gnokii.dll" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_47594F28A2A641EEABDAF46CE48F9285" "Condition" = "8:" "Transitive" = "11:FALSE" "Vital" = "11:TRUE" "ReadOnly" = "11:FALSE" "Hidden" = "11:FALSE" "System" = "11:FALSE" "Permanent" = "11:FALSE" "SharedLegacy" = "11:FALSE" "PackageAs" = "3:1" "Register" = "3:1" "Exclude" = "11:FALSE" "IsDependency" = "11:FALSE" "IsolateTo" = "8:" "ProjectOutputGroupRegister" = "3:1" "OutputConfiguration" = "8:" "OutputGroupCanonicalName" = "8:Built" "OutputProjectGuid" = "8:{93B245DE-6DCE-46E2-BFF1-171383B0643C}" "ShowKeyOutput" = "11:TRUE" "ExcludeFilters" { } } } "VJSharpPlugin" { } } } gnokii-0.6.31/Windows/MSVS2005/config.h0000644000175000017500000000702011666163120015351 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2003 Marcus Godehardt This is the config.h file for GNOKII for MSVS2005 compiler, you can edit this manually. This is not auto generated. */ #ifndef _config_h #define _config_h #if defined(_MSC_VER) && defined(WIN32) # pragma once #else # error This config.h is only for MSVS2005 compiler !!! #endif #undef VERSION #define VERSION "0.6.31" /* We support Bluetooth and IRDA on MSVS 2005 */ #define HAVE_BLUETOOTH 1 #define HAVE_IRDA 1 /* Define if you have the following headers */ #define HAVE_STDARG_H 1 #define HAVE_STRING_H 1 #undef HAVE_STRINGS_H #undef HAVE_STDINT_H #undef HAVE_INTTYPES_H #define HAVE_SYS_TYPES_H 1 #undef HAVE_SYS_FILE_H #undef HAVE_SYS_TIME_H #undef HAVE_UNISTD_H #define HAVE_CTYPE_H 1 #define HAVE_STDLIB_H 1 #define HAVE_DIRECT_H 1 #define HAVE_LIMITS_H 1 #define HAVE_SYS_STAT_H 1 /* Define if your compiler supports long long */ #undef HAVE_LONG_LONG /* Define if your compiler supports long double */ #undef HAVE_LONG_DOUBLE /* Define if you have timersub() */ #undef HAVE_TIMEOPS /* Define if you have gettimeofday() */ #undef HAVE_GETTIMEOFDAY /* Define if you have tm_gmtoff field in tm structure */ #undef HAVE_TM_GMTON /* Define if you have cfsetspeed, cfsetispeed, cfsetospeed, c_ispeed and c_ospeed in struct termios */ #undef HAVE_CFSETSPEED #undef HAVE_CFSETOSPEED #undef HAVE_TERMIOS_CSPEED /* Define both if you have ISO C99 compliant snprintf */ #undef HAVE_SNPRINTF #undef HAVE_C99_SNPRINTF /* Define both if you have ISO C99 compliant vsnprintf */ #define HAVE_VSNPRINTF 1 #define HAVE_C99_VSNPRINTF 1 /* Define if you have asprintf */ #define HAVE_ASPRINTF 1 /* Define if you have vasprintf */ #define HAVE_VASPRINTF 1 /* Define if you have strsep */ #undef HAVE_STRSEP /* Define debug level */ #define DEBUG 1 #define XDEBUG 1 #define RLP_DEBUG 1 /* Decide if you want security options enabled */ #define SECURITY /* Define if you have XPM components */ #undef XPM /* Define if you want NLS */ #undef ENABLE_NLS /* Define if you have and nl_langinfo(CODESET). */ #undef HAVE_LANGINFO_CODESET /* Define if you want to use Unix98 PTYs */ #undef USE_UNIX98PTYS /* Define if struct msghdr has msg_control field */ #undef HAVE_MSGHDR_MSG_CONTROL /* FIXME: Disable some odd warnings, comment these lines if u wanna fix the bad code lines */ #pragma warning(disable : 4244) // conversion from 'int ' to 'float ', possible loss of data #pragma warning(disable : 4761) // integral size mismatch in argument; conversion supplied #pragma warning(disable : 4018) // signed/unsigned mismatch #pragma warning(disable : 4305) // truncation from 'const int ' to 'char ' #pragma warning(disable : 4996) // 'strnicmp' was declared deprecated /* Suppress CRT warnings */ #define _CRT_SECURE_NO_DEPRECATE #endif // _config_h gnokii-0.6.31/Windows/MSVS2005/libgnokii.vcproj0000644000175000017500000010152011666163120017127 0ustar leoleo gnokii-0.6.31/Windows/mingw-cross/0000755000175000017500000000000011666163466015122 5ustar leoleognokii-0.6.31/Windows/mingw-cross/mingw-cross.sh0000755000175000017500000000057411666163120017722 0ustar leoleo#!/bin/sh ##### config begin ##### HOST=i386-mingw32 ##### config end ####### ./configure --host=$HOST --prefix=/ --enable-security --disable-nls --enable-win --without-x HOST_CC="cc" export HOST_CC cat <confsubst s%^soname_spec=.*$%soname_spec="\\\\\${name}.dll"% EOF cp libtool libtool.orig sed -f confsubst libtool rm confsubst chmod +x libtool make gnokii-0.6.31/Windows/MSVS2008/0000755000175000017500000000000011666163466013754 5ustar leoleognokii-0.6.31/Windows/MSVS2008/gnokii.vcproj0000755000175000017500000003203111666163120016446 0ustar leoleo gnokii-0.6.31/Windows/MSVS2008/gnokii.sln0000755000175000017500000000620211666163120015740 0ustar leoleoMicrosoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gnokii", "gnokii.vcproj", "{681F70AD-B62A-42F3-A85E-94DE5E160437}" ProjectSection(ProjectDependencies) = postProject {93B245DE-6DCE-46E2-BFF1-171383B0643C} = {93B245DE-6DCE-46E2-BFF1-171383B0643C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libgnokii", "libgnokii.vcproj", "{93B245DE-6DCE-46E2-BFF1-171383B0643C}" EndProject Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "Gnokii setup Win32", "Gnokii_setup\Gnokii_setup-Win32.vdproj", "{52325EA7-CFC3-488D-A213-2ACF154E30DA}" EndProject Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "Gnokii setup x64", "Gnokii_setup\Gnokii_setup-x64.vdproj", "{ECA1C110-D9D3-4A9E-A375-2F5B516D50A8}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Debug|x64 = Debug|x64 Release|Win32 = Release|Win32 Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {681F70AD-B62A-42F3-A85E-94DE5E160437}.Debug|Win32.ActiveCfg = Debug|Win32 {681F70AD-B62A-42F3-A85E-94DE5E160437}.Debug|Win32.Build.0 = Debug|Win32 {681F70AD-B62A-42F3-A85E-94DE5E160437}.Debug|x64.ActiveCfg = Debug|x64 {681F70AD-B62A-42F3-A85E-94DE5E160437}.Debug|x64.Build.0 = Debug|x64 {681F70AD-B62A-42F3-A85E-94DE5E160437}.Release|Win32.ActiveCfg = Release|Win32 {681F70AD-B62A-42F3-A85E-94DE5E160437}.Release|Win32.Build.0 = Release|Win32 {681F70AD-B62A-42F3-A85E-94DE5E160437}.Release|x64.ActiveCfg = Release|x64 {681F70AD-B62A-42F3-A85E-94DE5E160437}.Release|x64.Build.0 = Release|x64 {93B245DE-6DCE-46E2-BFF1-171383B0643C}.Debug|Win32.ActiveCfg = Debug|Win32 {93B245DE-6DCE-46E2-BFF1-171383B0643C}.Debug|Win32.Build.0 = Debug|Win32 {93B245DE-6DCE-46E2-BFF1-171383B0643C}.Debug|x64.ActiveCfg = Debug|x64 {93B245DE-6DCE-46E2-BFF1-171383B0643C}.Debug|x64.Build.0 = Debug|x64 {93B245DE-6DCE-46E2-BFF1-171383B0643C}.Release|Win32.ActiveCfg = Release|Win32 {93B245DE-6DCE-46E2-BFF1-171383B0643C}.Release|Win32.Build.0 = Release|Win32 {93B245DE-6DCE-46E2-BFF1-171383B0643C}.Release|x64.ActiveCfg = Release|x64 {93B245DE-6DCE-46E2-BFF1-171383B0643C}.Release|x64.Build.0 = Release|x64 {52325EA7-CFC3-488D-A213-2ACF154E30DA}.Debug|Win32.ActiveCfg = Debug {52325EA7-CFC3-488D-A213-2ACF154E30DA}.Debug|x64.ActiveCfg = Debug {52325EA7-CFC3-488D-A213-2ACF154E30DA}.Release|Win32.ActiveCfg = Release {52325EA7-CFC3-488D-A213-2ACF154E30DA}.Release|Win32.Build.0 = Release {52325EA7-CFC3-488D-A213-2ACF154E30DA}.Release|x64.ActiveCfg = Release {ECA1C110-D9D3-4A9E-A375-2F5B516D50A8}.Debug|Win32.ActiveCfg = Debug {ECA1C110-D9D3-4A9E-A375-2F5B516D50A8}.Debug|x64.ActiveCfg = Debug {ECA1C110-D9D3-4A9E-A375-2F5B516D50A8}.Release|Win32.ActiveCfg = Release {ECA1C110-D9D3-4A9E-A375-2F5B516D50A8}.Release|x64.ActiveCfg = Release {ECA1C110-D9D3-4A9E-A375-2F5B516D50A8}.Release|x64.Build.0 = Release EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal gnokii-0.6.31/Windows/MSVS2008/Gnokii_setup/0000755000175000017500000000000011666163466016414 5ustar leoleognokii-0.6.31/Windows/MSVS2008/Gnokii_setup/Gnokii_setup-Win32.vdproj0000755000175000017500000007221711666163120023201 0ustar leoleo"DeployProject" { "VSVersion" = "3:800" "ProjectType" = "8:{978C614F-708E-4E1A-B201-565925725DBA}" "IsWebType" = "8:FALSE" "ProjectName" = "8:Gnokii setup Win32" "LanguageId" = "3:1033" "CodePage" = "3:1252" "UILanguageId" = "3:1033" "SccProjectName" = "8:" "SccLocalPath" = "8:" "SccAuxPath" = "8:" "SccProvider" = "8:" "Hierarchy" { "Entry" { "MsmKey" = "8:_1E0FA563BAB6403A92865089394592A7" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_6DE5FD49C7954A7293D123EB048BDB33" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_A8EA662D9A5C490DABEDD816754BE6FD" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } } "Configurations" { "Debug" { "DisplayName" = "8:Debug" "IsDebugOnly" = "11:TRUE" "IsReleaseOnly" = "11:FALSE" "OutputFilename" = "8:Win32\\Debug\\Gnokii-Win32.msi" "PackageFilesAs" = "3:2" "PackageFileSize" = "3:-2147483648" "CabType" = "3:1" "Compression" = "3:2" "SignOutput" = "11:FALSE" "CertificateFile" = "8:" "PrivateKeyFile" = "8:" "TimeStampServer" = "8:" "InstallerBootstrapper" = "3:2" "BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}" { "Enabled" = "11:TRUE" "PromptEnabled" = "11:TRUE" "PrerequisitesLocation" = "2:1" "Url" = "8:" "ComponentsUrl" = "8:" "Items" { } } } "Release" { "DisplayName" = "8:Release" "IsDebugOnly" = "11:FALSE" "IsReleaseOnly" = "11:TRUE" "OutputFilename" = "8:Win32\\Release\\Gnokii-Win32.msi" "PackageFilesAs" = "3:2" "PackageFileSize" = "3:-2147483648" "CabType" = "3:1" "Compression" = "3:2" "SignOutput" = "11:FALSE" "CertificateFile" = "8:" "PrivateKeyFile" = "8:" "TimeStampServer" = "8:" "InstallerBootstrapper" = "3:2" "BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}" { "Enabled" = "11:TRUE" "PromptEnabled" = "11:TRUE" "PrerequisitesLocation" = "2:1" "Url" = "8:" "ComponentsUrl" = "8:" "Items" { "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.Net.Framework.2.0" { "Name" = "8:Microsoft .NET Framework 2.0" "ProductCode" = "8:Microsoft.Net.Framework.2.0" } } } } } "Deployable" { "CustomAction" { } "DefaultFeature" { "Name" = "8:DefaultFeature" "Title" = "8:" "Description" = "8:" } "ExternalPersistence" { "LaunchCondition" { } } "File" { "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_6DE5FD49C7954A7293D123EB048BDB33" { "SourcePath" = "8:..\\..\\gnokiirc" "TargetName" = "8:gnokiirc" "Tag" = "8:" "Folder" = "8:_47594F28A2A641EEABDAF46CE48F9285" "Condition" = "8:" "Transitive" = "11:FALSE" "Vital" = "11:TRUE" "ReadOnly" = "11:FALSE" "Hidden" = "11:FALSE" "System" = "11:FALSE" "Permanent" = "11:FALSE" "SharedLegacy" = "11:FALSE" "PackageAs" = "3:1" "Register" = "3:1" "Exclude" = "11:FALSE" "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } } "FileType" { } "Folder" { "{3C67513D-01DD-4637-8A68-80971EB9504F}:_47594F28A2A641EEABDAF46CE48F9285" { "DefaultLocation" = "8:[ProgramFilesFolder]\\Gnokii" "Name" = "8:#1925" "AlwaysCreate" = "11:FALSE" "Condition" = "8:" "Transitive" = "11:FALSE" "Property" = "8:TARGETDIR" "Folders" { } } "{1525181F-901A-416C-8A58-119130FE478E}:_5EC0EFD6175C435DB00691539E50F39F" { "Name" = "8:#1919" "AlwaysCreate" = "11:FALSE" "Condition" = "8:" "Transitive" = "11:FALSE" "Property" = "8:ProgramMenuFolder" "Folders" { } } "{1525181F-901A-416C-8A58-119130FE478E}:_D64F03035CE242908659F708343C34BF" { "Name" = "8:#1916" "AlwaysCreate" = "11:FALSE" "Condition" = "8:" "Transitive" = "11:FALSE" "Property" = "8:DesktopFolder" "Folders" { } } } "LaunchCondition" { } "Locator" { } "MsiBootstrapper" { "LangId" = "3:1033" "RequiresElevation" = "11:FALSE" } "Product" { "Name" = "8:Microsoft Visual Studio" "ProductName" = "8:Gnokii" "ProductCode" = "8:{25D47B1C-EAD4-41BD-B69E-7E507C10D6A6}" "PackageCode" = "8:{16F1637B-43DC-49A1-A791-D4992D9FA731}" "UpgradeCode" = "8:{D725933B-6423-4BB1-B06D-7E905E9AA9D1}" "RestartWWWService" = "11:FALSE" "RemovePreviousVersions" = "11:FALSE" "DetectNewerInstalledVersion" = "11:TRUE" "InstallAllUsers" = "11:FALSE" "ProductVersion" = "8:1.0.0" "Manufacturer" = "8:Gnokii project" "ARPHELPTELEPHONE" = "8:" "ARPHELPLINK" = "8:" "Title" = "8:Gnokii setup-Win32" "Subject" = "8:" "ARPCONTACT" = "8:Gnokii project" "Keywords" = "8:" "ARPCOMMENTS" = "8:" "ARPURLINFOABOUT" = "8:" "ARPPRODUCTICON" = "8:" "ARPIconIndex" = "3:0" "SearchPath" = "8:" "UseSystemSearchPath" = "11:TRUE" "TargetPlatform" = "3:0" "PreBuildEvent" = "8:" "PostBuildEvent" = "8:" "RunPostBuildEvent" = "3:0" } "Registry" { "HKLM" { "Keys" { "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_647D54F07CD84FBABAB761F5C0B6B622" { "Name" = "8:Software" "Condition" = "8:" "AlwaysCreate" = "11:FALSE" "DeleteAtUninstall" = "11:FALSE" "Transitive" = "11:FALSE" "Keys" { "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_77ADFDDEC8AA495A916D75096C53DEAF" { "Name" = "8:[Manufacturer]" "Condition" = "8:" "AlwaysCreate" = "11:FALSE" "DeleteAtUninstall" = "11:FALSE" "Transitive" = "11:FALSE" "Keys" { } "Values" { } } } "Values" { } } } } "HKCU" { "Keys" { "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_5C95416E97FD4F6BAE9DF463B37621FB" { "Name" = "8:Software" "Condition" = "8:" "AlwaysCreate" = "11:FALSE" "DeleteAtUninstall" = "11:FALSE" "Transitive" = "11:FALSE" "Keys" { "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_D16E46C7066E4C42A722584FAA2A5AF3" { "Name" = "8:[Manufacturer]" "Condition" = "8:" "AlwaysCreate" = "11:FALSE" "DeleteAtUninstall" = "11:FALSE" "Transitive" = "11:FALSE" "Keys" { } "Values" { } } } "Values" { } } } } "HKCR" { "Keys" { } } "HKU" { "Keys" { } } "HKPU" { "Keys" { } } } "Sequences" { } "Shortcut" { } "UserInterface" { "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_36C9A40D901344EE92EE7782225B52F7" { "Name" = "8:#1902" "Sequence" = "3:1" "Attributes" = "3:3" "Dialogs" { "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_513987191E7F402DBE57BD761AD42454" { "Sequence" = "3:100" "DisplayName" = "8:Finished" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdFinishedDlg.wid" "Properties" { "BannerBitmap" { "Name" = "8:BannerBitmap" "DisplayName" = "8:#1001" "Description" = "8:#1101" "Type" = "3:8" "ContextData" = "8:Bitmap" "Attributes" = "3:4" "Setting" = "3:1" "UsePlugInResources" = "11:TRUE" } "UpdateText" { "Name" = "8:UpdateText" "DisplayName" = "8:#1058" "Description" = "8:#1158" "Type" = "3:15" "ContextData" = "8:" "Attributes" = "3:0" "Setting" = "3:1" "Value" = "8:#1258" "DefaultValue" = "8:#1258" "UsePlugInResources" = "11:TRUE" } } } } } "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_4F4A2C06A79541D59B064DF792C54BD9" { "Name" = "8:#1901" "Sequence" = "3:1" "Attributes" = "3:2" "Dialogs" { "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_E15FD96B4276435F89E3B1747EA89207" { "Sequence" = "3:100" "DisplayName" = "8:Progress" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdProgressDlg.wid" "Properties" { "BannerBitmap" { "Name" = "8:BannerBitmap" "DisplayName" = "8:#1001" "Description" = "8:#1101" "Type" = "3:8" "ContextData" = "8:Bitmap" "Attributes" = "3:4" "Setting" = "3:1" "UsePlugInResources" = "11:TRUE" } "ShowProgress" { "Name" = "8:ShowProgress" "DisplayName" = "8:#1009" "Description" = "8:#1109" "Type" = "3:5" "ContextData" = "8:1;True=1;False=0" "Attributes" = "3:0" "Setting" = "3:0" "Value" = "3:1" "DefaultValue" = "3:1" "UsePlugInResources" = "11:TRUE" } } } } } "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_54530E94C7F14F45817077D9041332A1" { "Name" = "8:#1902" "Sequence" = "3:2" "Attributes" = "3:3" "Dialogs" { "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_307AFD37A3C141BC88F223B3B6B6C21A" { "Sequence" = "3:100" "DisplayName" = "8:Finished" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdAdminFinishedDlg.wid" "Properties" { "BannerBitmap" { "Name" = "8:BannerBitmap" "DisplayName" = "8:#1001" "Description" = "8:#1101" "Type" = "3:8" "ContextData" = "8:Bitmap" "Attributes" = "3:4" "Setting" = "3:1" "UsePlugInResources" = "11:TRUE" } } } } } "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_5CA2B462C9D84A97A14FC8CB465E1C39" { "Name" = "8:#1901" "Sequence" = "3:2" "Attributes" = "3:2" "Dialogs" { "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_8CB42C99D90B485B966D4481BBBD8472" { "Sequence" = "3:100" "DisplayName" = "8:Progress" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdAdminProgressDlg.wid" "Properties" { "BannerBitmap" { "Name" = "8:BannerBitmap" "DisplayName" = "8:#1001" "Description" = "8:#1101" "Type" = "3:8" "ContextData" = "8:Bitmap" "Attributes" = "3:4" "Setting" = "3:1" "UsePlugInResources" = "11:TRUE" } "ShowProgress" { "Name" = "8:ShowProgress" "DisplayName" = "8:#1009" "Description" = "8:#1109" "Type" = "3:5" "ContextData" = "8:1;True=1;False=0" "Attributes" = "3:0" "Setting" = "3:0" "Value" = "3:1" "DefaultValue" = "3:1" "UsePlugInResources" = "11:TRUE" } } } } } "{2479F3F5-0309-486D-8047-8187E2CE5BA0}:_6DE70A3C4ADE4F1497B803EA8A711D2B" { "UseDynamicProperties" = "11:FALSE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdUserInterface.wim" } "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_75E181815C9443898B301921AC5FA130" { "Name" = "8:#1900" "Sequence" = "3:1" "Attributes" = "3:1" "Dialogs" { "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_0EE52DA5193C457D85F8542DBA45DC90" { "Sequence" = "3:300" "DisplayName" = "8:Confirm Installation" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdConfirmDlg.wid" "Properties" { "BannerBitmap" { "Name" = "8:BannerBitmap" "DisplayName" = "8:#1001" "Description" = "8:#1101" "Type" = "3:8" "ContextData" = "8:Bitmap" "Attributes" = "3:4" "Setting" = "3:1" "UsePlugInResources" = "11:TRUE" } } } "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_9CD4374A6C714242B40E16A6A244D0B5" { "Sequence" = "3:200" "DisplayName" = "8:Installation Folder" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdFolderDlg.wid" "Properties" { "BannerBitmap" { "Name" = "8:BannerBitmap" "DisplayName" = "8:#1001" "Description" = "8:#1101" "Type" = "3:8" "ContextData" = "8:Bitmap" "Attributes" = "3:4" "Setting" = "3:1" "UsePlugInResources" = "11:TRUE" } "InstallAllUsersVisible" { "Name" = "8:InstallAllUsersVisible" "DisplayName" = "8:#1059" "Description" = "8:#1159" "Type" = "3:5" "ContextData" = "8:1;True=1;False=0" "Attributes" = "3:0" "Setting" = "3:0" "Value" = "3:1" "DefaultValue" = "3:1" "UsePlugInResources" = "11:TRUE" } } } "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_FD22BF9BEF6A4BB39065690A9EEB1AB9" { "Sequence" = "3:100" "DisplayName" = "8:Welcome" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdWelcomeDlg.wid" "Properties" { "BannerBitmap" { "Name" = "8:BannerBitmap" "DisplayName" = "8:#1001" "Description" = "8:#1101" "Type" = "3:8" "ContextData" = "8:Bitmap" "Attributes" = "3:4" "Setting" = "3:1" "UsePlugInResources" = "11:TRUE" } "CopyrightWarning" { "Name" = "8:CopyrightWarning" "DisplayName" = "8:#1002" "Description" = "8:#1102" "Type" = "3:3" "ContextData" = "8:" "Attributes" = "3:0" "Setting" = "3:1" "Value" = "8:#1202" "DefaultValue" = "8:#1202" "UsePlugInResources" = "11:TRUE" } "Welcome" { "Name" = "8:Welcome" "DisplayName" = "8:#1003" "Description" = "8:#1103" "Type" = "3:3" "ContextData" = "8:" "Attributes" = "3:0" "Setting" = "3:1" "Value" = "8:#1203" "DefaultValue" = "8:#1203" "UsePlugInResources" = "11:TRUE" } } } } } "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_E73614463FBB4CCBBCDB472309D26FC7" { "Name" = "8:#1900" "Sequence" = "3:2" "Attributes" = "3:1" "Dialogs" { "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_89820ADC9D974789AAC1F03520BEE188" { "Sequence" = "3:200" "DisplayName" = "8:Installation Folder" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdAdminFolderDlg.wid" "Properties" { "BannerBitmap" { "Name" = "8:BannerBitmap" "DisplayName" = "8:#1001" "Description" = "8:#1101" "Type" = "3:8" "ContextData" = "8:Bitmap" "Attributes" = "3:4" "Setting" = "3:1" "UsePlugInResources" = "11:TRUE" } } } "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_93DEBD2461C745C3893CDA58312D2FCC" { "Sequence" = "3:100" "DisplayName" = "8:Welcome" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdAdminWelcomeDlg.wid" "Properties" { "BannerBitmap" { "Name" = "8:BannerBitmap" "DisplayName" = "8:#1001" "Description" = "8:#1101" "Type" = "3:8" "ContextData" = "8:Bitmap" "Attributes" = "3:4" "Setting" = "3:1" "UsePlugInResources" = "11:TRUE" } "CopyrightWarning" { "Name" = "8:CopyrightWarning" "DisplayName" = "8:#1002" "Description" = "8:#1102" "Type" = "3:3" "ContextData" = "8:" "Attributes" = "3:0" "Setting" = "3:1" "Value" = "8:#1202" "DefaultValue" = "8:#1202" "UsePlugInResources" = "11:TRUE" } "Welcome" { "Name" = "8:Welcome" "DisplayName" = "8:#1003" "Description" = "8:#1103" "Type" = "3:3" "ContextData" = "8:" "Attributes" = "3:0" "Setting" = "3:1" "Value" = "8:#1203" "DefaultValue" = "8:#1203" "UsePlugInResources" = "11:TRUE" } } } "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_F2892C8894714BF99C84BC671F1EB235" { "Sequence" = "3:300" "DisplayName" = "8:Confirm Installation" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdAdminConfirmDlg.wid" "Properties" { "BannerBitmap" { "Name" = "8:BannerBitmap" "DisplayName" = "8:#1001" "Description" = "8:#1101" "Type" = "3:8" "ContextData" = "8:Bitmap" "Attributes" = "3:4" "Setting" = "3:1" "UsePlugInResources" = "11:TRUE" } } } } } "{2479F3F5-0309-486D-8047-8187E2CE5BA0}:_E74F490E433D4F789FC1F05D41356CEC" { "UseDynamicProperties" = "11:FALSE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdBasicDialogs.wim" } } "MergeModule" { } "ProjectOutput" { "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_1E0FA563BAB6403A92865089394592A7" { "SourcePath" = "8:..\\x64\\Release\\gnokii.exe" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_47594F28A2A641EEABDAF46CE48F9285" "Condition" = "8:" "Transitive" = "11:FALSE" "Vital" = "11:TRUE" "ReadOnly" = "11:FALSE" "Hidden" = "11:FALSE" "System" = "11:FALSE" "Permanent" = "11:FALSE" "SharedLegacy" = "11:FALSE" "PackageAs" = "3:1" "Register" = "3:1" "Exclude" = "11:FALSE" "IsDependency" = "11:FALSE" "IsolateTo" = "8:" "ProjectOutputGroupRegister" = "3:1" "OutputConfiguration" = "8:" "OutputGroupCanonicalName" = "8:Built" "OutputProjectGuid" = "8:{681F70AD-B62A-42F3-A85E-94DE5E160437}" "ShowKeyOutput" = "11:TRUE" "ExcludeFilters" { } } "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_A8EA662D9A5C490DABEDD816754BE6FD" { "SourcePath" = "8:..\\x64\\Release\\gnokii.dll" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_47594F28A2A641EEABDAF46CE48F9285" "Condition" = "8:" "Transitive" = "11:FALSE" "Vital" = "11:TRUE" "ReadOnly" = "11:FALSE" "Hidden" = "11:FALSE" "System" = "11:FALSE" "Permanent" = "11:FALSE" "SharedLegacy" = "11:FALSE" "PackageAs" = "3:1" "Register" = "3:1" "Exclude" = "11:FALSE" "IsDependency" = "11:FALSE" "IsolateTo" = "8:" "ProjectOutputGroupRegister" = "3:1" "OutputConfiguration" = "8:" "OutputGroupCanonicalName" = "8:Built" "OutputProjectGuid" = "8:{93B245DE-6DCE-46E2-BFF1-171383B0643C}" "ShowKeyOutput" = "11:TRUE" "ExcludeFilters" { } } } } } gnokii-0.6.31/Windows/MSVS2008/Gnokii_setup/Gnokii_setup-x64.vdproj0000755000175000017500000007221111666163120022712 0ustar leoleo"DeployProject" { "VSVersion" = "3:800" "ProjectType" = "8:{978C614F-708E-4E1A-B201-565925725DBA}" "IsWebType" = "8:FALSE" "ProjectName" = "8:Gnokii setup x64" "LanguageId" = "3:1033" "CodePage" = "3:1252" "UILanguageId" = "3:1033" "SccProjectName" = "8:" "SccLocalPath" = "8:" "SccAuxPath" = "8:" "SccProvider" = "8:" "Hierarchy" { "Entry" { "MsmKey" = "8:_1E0FA563BAB6403A92865089394592A7" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_6DE5FD49C7954A7293D123EB048BDB33" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_A8EA662D9A5C490DABEDD816754BE6FD" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } } "Configurations" { "Debug" { "DisplayName" = "8:Debug" "IsDebugOnly" = "11:TRUE" "IsReleaseOnly" = "11:FALSE" "OutputFilename" = "8:Win32\\Debug\\Gnokii-Win32.msi" "PackageFilesAs" = "3:2" "PackageFileSize" = "3:-2147483648" "CabType" = "3:1" "Compression" = "3:2" "SignOutput" = "11:FALSE" "CertificateFile" = "8:" "PrivateKeyFile" = "8:" "TimeStampServer" = "8:" "InstallerBootstrapper" = "3:2" "BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}" { "Enabled" = "11:TRUE" "PromptEnabled" = "11:TRUE" "PrerequisitesLocation" = "2:1" "Url" = "8:" "ComponentsUrl" = "8:" "Items" { } } } "Release" { "DisplayName" = "8:Release" "IsDebugOnly" = "11:FALSE" "IsReleaseOnly" = "11:TRUE" "OutputFilename" = "8:x64\\Release\\Gnokii-x64.msi" "PackageFilesAs" = "3:2" "PackageFileSize" = "3:-2147483648" "CabType" = "3:1" "Compression" = "3:2" "SignOutput" = "11:FALSE" "CertificateFile" = "8:" "PrivateKeyFile" = "8:" "TimeStampServer" = "8:" "InstallerBootstrapper" = "3:2" "BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}" { "Enabled" = "11:TRUE" "PromptEnabled" = "11:TRUE" "PrerequisitesLocation" = "2:1" "Url" = "8:" "ComponentsUrl" = "8:" "Items" { "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.Net.Framework.2.0" { "Name" = "8:Microsoft .NET Framework 2.0" "ProductCode" = "8:Microsoft.Net.Framework.2.0" } } } } } "Deployable" { "CustomAction" { } "DefaultFeature" { "Name" = "8:DefaultFeature" "Title" = "8:" "Description" = "8:" } "ExternalPersistence" { "LaunchCondition" { } } "File" { "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_6DE5FD49C7954A7293D123EB048BDB33" { "SourcePath" = "8:..\\..\\gnokiirc" "TargetName" = "8:gnokiirc" "Tag" = "8:" "Folder" = "8:_47594F28A2A641EEABDAF46CE48F9285" "Condition" = "8:" "Transitive" = "11:FALSE" "Vital" = "11:TRUE" "ReadOnly" = "11:FALSE" "Hidden" = "11:FALSE" "System" = "11:FALSE" "Permanent" = "11:FALSE" "SharedLegacy" = "11:FALSE" "PackageAs" = "3:1" "Register" = "3:1" "Exclude" = "11:FALSE" "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } } "FileType" { } "Folder" { "{3C67513D-01DD-4637-8A68-80971EB9504F}:_47594F28A2A641EEABDAF46CE48F9285" { "DefaultLocation" = "8:[ProgramFiles64Folder]\\Gnokii" "Name" = "8:#1925" "AlwaysCreate" = "11:FALSE" "Condition" = "8:" "Transitive" = "11:FALSE" "Property" = "8:TARGETDIR" "Folders" { } } "{1525181F-901A-416C-8A58-119130FE478E}:_5EC0EFD6175C435DB00691539E50F39F" { "Name" = "8:#1919" "AlwaysCreate" = "11:FALSE" "Condition" = "8:" "Transitive" = "11:FALSE" "Property" = "8:ProgramMenuFolder" "Folders" { } } "{1525181F-901A-416C-8A58-119130FE478E}:_D64F03035CE242908659F708343C34BF" { "Name" = "8:#1916" "AlwaysCreate" = "11:FALSE" "Condition" = "8:" "Transitive" = "11:FALSE" "Property" = "8:DesktopFolder" "Folders" { } } } "LaunchCondition" { } "Locator" { } "MsiBootstrapper" { "LangId" = "3:1033" "RequiresElevation" = "11:FALSE" } "Product" { "Name" = "8:Microsoft Visual Studio" "ProductName" = "8:Gnokii" "ProductCode" = "8:{25D47B1C-EAD4-41BD-B69E-7E507C10D6A6}" "PackageCode" = "8:{05FF8EE8-1C4A-47D3-9909-793893969C46}" "UpgradeCode" = "8:{D725933B-6423-4BB1-B06D-7E905E9AA9D1}" "RestartWWWService" = "11:FALSE" "RemovePreviousVersions" = "11:FALSE" "DetectNewerInstalledVersion" = "11:TRUE" "InstallAllUsers" = "11:FALSE" "ProductVersion" = "8:1.0.0" "Manufacturer" = "8:Gnokii project" "ARPHELPTELEPHONE" = "8:" "ARPHELPLINK" = "8:" "Title" = "8:Gnokii setup-x64" "Subject" = "8:" "ARPCONTACT" = "8:Gnokii project" "Keywords" = "8:" "ARPCOMMENTS" = "8:" "ARPURLINFOABOUT" = "8:" "ARPPRODUCTICON" = "8:" "ARPIconIndex" = "3:0" "SearchPath" = "8:" "UseSystemSearchPath" = "11:TRUE" "TargetPlatform" = "3:1" "PreBuildEvent" = "8:" "PostBuildEvent" = "8:" "RunPostBuildEvent" = "3:0" } "Registry" { "HKLM" { "Keys" { "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_647D54F07CD84FBABAB761F5C0B6B622" { "Name" = "8:Software" "Condition" = "8:" "AlwaysCreate" = "11:FALSE" "DeleteAtUninstall" = "11:FALSE" "Transitive" = "11:FALSE" "Keys" { "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_77ADFDDEC8AA495A916D75096C53DEAF" { "Name" = "8:[Manufacturer]" "Condition" = "8:" "AlwaysCreate" = "11:FALSE" "DeleteAtUninstall" = "11:FALSE" "Transitive" = "11:FALSE" "Keys" { } "Values" { } } } "Values" { } } } } "HKCU" { "Keys" { "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_5C95416E97FD4F6BAE9DF463B37621FB" { "Name" = "8:Software" "Condition" = "8:" "AlwaysCreate" = "11:FALSE" "DeleteAtUninstall" = "11:FALSE" "Transitive" = "11:FALSE" "Keys" { "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_D16E46C7066E4C42A722584FAA2A5AF3" { "Name" = "8:[Manufacturer]" "Condition" = "8:" "AlwaysCreate" = "11:FALSE" "DeleteAtUninstall" = "11:FALSE" "Transitive" = "11:FALSE" "Keys" { } "Values" { } } } "Values" { } } } } "HKCR" { "Keys" { } } "HKU" { "Keys" { } } "HKPU" { "Keys" { } } } "Sequences" { } "Shortcut" { } "UserInterface" { "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_36C9A40D901344EE92EE7782225B52F7" { "Name" = "8:#1902" "Sequence" = "3:1" "Attributes" = "3:3" "Dialogs" { "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_513987191E7F402DBE57BD761AD42454" { "Sequence" = "3:100" "DisplayName" = "8:Finished" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdFinishedDlg.wid" "Properties" { "BannerBitmap" { "Name" = "8:BannerBitmap" "DisplayName" = "8:#1001" "Description" = "8:#1101" "Type" = "3:8" "ContextData" = "8:Bitmap" "Attributes" = "3:4" "Setting" = "3:1" "UsePlugInResources" = "11:TRUE" } "UpdateText" { "Name" = "8:UpdateText" "DisplayName" = "8:#1058" "Description" = "8:#1158" "Type" = "3:15" "ContextData" = "8:" "Attributes" = "3:0" "Setting" = "3:1" "Value" = "8:#1258" "DefaultValue" = "8:#1258" "UsePlugInResources" = "11:TRUE" } } } } } "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_4F4A2C06A79541D59B064DF792C54BD9" { "Name" = "8:#1901" "Sequence" = "3:1" "Attributes" = "3:2" "Dialogs" { "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_E15FD96B4276435F89E3B1747EA89207" { "Sequence" = "3:100" "DisplayName" = "8:Progress" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdProgressDlg.wid" "Properties" { "BannerBitmap" { "Name" = "8:BannerBitmap" "DisplayName" = "8:#1001" "Description" = "8:#1101" "Type" = "3:8" "ContextData" = "8:Bitmap" "Attributes" = "3:4" "Setting" = "3:1" "UsePlugInResources" = "11:TRUE" } "ShowProgress" { "Name" = "8:ShowProgress" "DisplayName" = "8:#1009" "Description" = "8:#1109" "Type" = "3:5" "ContextData" = "8:1;True=1;False=0" "Attributes" = "3:0" "Setting" = "3:0" "Value" = "3:1" "DefaultValue" = "3:1" "UsePlugInResources" = "11:TRUE" } } } } } "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_54530E94C7F14F45817077D9041332A1" { "Name" = "8:#1902" "Sequence" = "3:2" "Attributes" = "3:3" "Dialogs" { "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_307AFD37A3C141BC88F223B3B6B6C21A" { "Sequence" = "3:100" "DisplayName" = "8:Finished" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdAdminFinishedDlg.wid" "Properties" { "BannerBitmap" { "Name" = "8:BannerBitmap" "DisplayName" = "8:#1001" "Description" = "8:#1101" "Type" = "3:8" "ContextData" = "8:Bitmap" "Attributes" = "3:4" "Setting" = "3:1" "UsePlugInResources" = "11:TRUE" } } } } } "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_5CA2B462C9D84A97A14FC8CB465E1C39" { "Name" = "8:#1901" "Sequence" = "3:2" "Attributes" = "3:2" "Dialogs" { "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_8CB42C99D90B485B966D4481BBBD8472" { "Sequence" = "3:100" "DisplayName" = "8:Progress" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdAdminProgressDlg.wid" "Properties" { "BannerBitmap" { "Name" = "8:BannerBitmap" "DisplayName" = "8:#1001" "Description" = "8:#1101" "Type" = "3:8" "ContextData" = "8:Bitmap" "Attributes" = "3:4" "Setting" = "3:1" "UsePlugInResources" = "11:TRUE" } "ShowProgress" { "Name" = "8:ShowProgress" "DisplayName" = "8:#1009" "Description" = "8:#1109" "Type" = "3:5" "ContextData" = "8:1;True=1;False=0" "Attributes" = "3:0" "Setting" = "3:0" "Value" = "3:1" "DefaultValue" = "3:1" "UsePlugInResources" = "11:TRUE" } } } } } "{2479F3F5-0309-486D-8047-8187E2CE5BA0}:_6DE70A3C4ADE4F1497B803EA8A711D2B" { "UseDynamicProperties" = "11:FALSE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdUserInterface.wim" } "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_75E181815C9443898B301921AC5FA130" { "Name" = "8:#1900" "Sequence" = "3:1" "Attributes" = "3:1" "Dialogs" { "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_0EE52DA5193C457D85F8542DBA45DC90" { "Sequence" = "3:300" "DisplayName" = "8:Confirm Installation" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdConfirmDlg.wid" "Properties" { "BannerBitmap" { "Name" = "8:BannerBitmap" "DisplayName" = "8:#1001" "Description" = "8:#1101" "Type" = "3:8" "ContextData" = "8:Bitmap" "Attributes" = "3:4" "Setting" = "3:1" "UsePlugInResources" = "11:TRUE" } } } "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_9CD4374A6C714242B40E16A6A244D0B5" { "Sequence" = "3:200" "DisplayName" = "8:Installation Folder" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdFolderDlg.wid" "Properties" { "BannerBitmap" { "Name" = "8:BannerBitmap" "DisplayName" = "8:#1001" "Description" = "8:#1101" "Type" = "3:8" "ContextData" = "8:Bitmap" "Attributes" = "3:4" "Setting" = "3:1" "UsePlugInResources" = "11:TRUE" } "InstallAllUsersVisible" { "Name" = "8:InstallAllUsersVisible" "DisplayName" = "8:#1059" "Description" = "8:#1159" "Type" = "3:5" "ContextData" = "8:1;True=1;False=0" "Attributes" = "3:0" "Setting" = "3:0" "Value" = "3:1" "DefaultValue" = "3:1" "UsePlugInResources" = "11:TRUE" } } } "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_FD22BF9BEF6A4BB39065690A9EEB1AB9" { "Sequence" = "3:100" "DisplayName" = "8:Welcome" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdWelcomeDlg.wid" "Properties" { "BannerBitmap" { "Name" = "8:BannerBitmap" "DisplayName" = "8:#1001" "Description" = "8:#1101" "Type" = "3:8" "ContextData" = "8:Bitmap" "Attributes" = "3:4" "Setting" = "3:1" "UsePlugInResources" = "11:TRUE" } "CopyrightWarning" { "Name" = "8:CopyrightWarning" "DisplayName" = "8:#1002" "Description" = "8:#1102" "Type" = "3:3" "ContextData" = "8:" "Attributes" = "3:0" "Setting" = "3:1" "Value" = "8:#1202" "DefaultValue" = "8:#1202" "UsePlugInResources" = "11:TRUE" } "Welcome" { "Name" = "8:Welcome" "DisplayName" = "8:#1003" "Description" = "8:#1103" "Type" = "3:3" "ContextData" = "8:" "Attributes" = "3:0" "Setting" = "3:1" "Value" = "8:#1203" "DefaultValue" = "8:#1203" "UsePlugInResources" = "11:TRUE" } } } } } "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_E73614463FBB4CCBBCDB472309D26FC7" { "Name" = "8:#1900" "Sequence" = "3:2" "Attributes" = "3:1" "Dialogs" { "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_89820ADC9D974789AAC1F03520BEE188" { "Sequence" = "3:200" "DisplayName" = "8:Installation Folder" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdAdminFolderDlg.wid" "Properties" { "BannerBitmap" { "Name" = "8:BannerBitmap" "DisplayName" = "8:#1001" "Description" = "8:#1101" "Type" = "3:8" "ContextData" = "8:Bitmap" "Attributes" = "3:4" "Setting" = "3:1" "UsePlugInResources" = "11:TRUE" } } } "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_93DEBD2461C745C3893CDA58312D2FCC" { "Sequence" = "3:100" "DisplayName" = "8:Welcome" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdAdminWelcomeDlg.wid" "Properties" { "BannerBitmap" { "Name" = "8:BannerBitmap" "DisplayName" = "8:#1001" "Description" = "8:#1101" "Type" = "3:8" "ContextData" = "8:Bitmap" "Attributes" = "3:4" "Setting" = "3:1" "UsePlugInResources" = "11:TRUE" } "CopyrightWarning" { "Name" = "8:CopyrightWarning" "DisplayName" = "8:#1002" "Description" = "8:#1102" "Type" = "3:3" "ContextData" = "8:" "Attributes" = "3:0" "Setting" = "3:1" "Value" = "8:#1202" "DefaultValue" = "8:#1202" "UsePlugInResources" = "11:TRUE" } "Welcome" { "Name" = "8:Welcome" "DisplayName" = "8:#1003" "Description" = "8:#1103" "Type" = "3:3" "ContextData" = "8:" "Attributes" = "3:0" "Setting" = "3:1" "Value" = "8:#1203" "DefaultValue" = "8:#1203" "UsePlugInResources" = "11:TRUE" } } } "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_F2892C8894714BF99C84BC671F1EB235" { "Sequence" = "3:300" "DisplayName" = "8:Confirm Installation" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdAdminConfirmDlg.wid" "Properties" { "BannerBitmap" { "Name" = "8:BannerBitmap" "DisplayName" = "8:#1001" "Description" = "8:#1101" "Type" = "3:8" "ContextData" = "8:Bitmap" "Attributes" = "3:4" "Setting" = "3:1" "UsePlugInResources" = "11:TRUE" } } } } } "{2479F3F5-0309-486D-8047-8187E2CE5BA0}:_E74F490E433D4F789FC1F05D41356CEC" { "UseDynamicProperties" = "11:FALSE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdBasicDialogs.wim" } } "MergeModule" { } "ProjectOutput" { "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_1E0FA563BAB6403A92865089394592A7" { "SourcePath" = "8:..\\x64\\Release\\gnokii.exe" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_47594F28A2A641EEABDAF46CE48F9285" "Condition" = "8:" "Transitive" = "11:FALSE" "Vital" = "11:TRUE" "ReadOnly" = "11:FALSE" "Hidden" = "11:FALSE" "System" = "11:FALSE" "Permanent" = "11:FALSE" "SharedLegacy" = "11:FALSE" "PackageAs" = "3:1" "Register" = "3:1" "Exclude" = "11:FALSE" "IsDependency" = "11:FALSE" "IsolateTo" = "8:" "ProjectOutputGroupRegister" = "3:1" "OutputConfiguration" = "8:" "OutputGroupCanonicalName" = "8:Built" "OutputProjectGuid" = "8:{681F70AD-B62A-42F3-A85E-94DE5E160437}" "ShowKeyOutput" = "11:TRUE" "ExcludeFilters" { } } "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_A8EA662D9A5C490DABEDD816754BE6FD" { "SourcePath" = "8:..\\x64\\Release\\gnokii.dll" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_47594F28A2A641EEABDAF46CE48F9285" "Condition" = "8:" "Transitive" = "11:FALSE" "Vital" = "11:TRUE" "ReadOnly" = "11:FALSE" "Hidden" = "11:FALSE" "System" = "11:FALSE" "Permanent" = "11:FALSE" "SharedLegacy" = "11:FALSE" "PackageAs" = "3:1" "Register" = "3:1" "Exclude" = "11:FALSE" "IsDependency" = "11:FALSE" "IsolateTo" = "8:" "ProjectOutputGroupRegister" = "3:1" "OutputConfiguration" = "8:" "OutputGroupCanonicalName" = "8:Built" "OutputProjectGuid" = "8:{93B245DE-6DCE-46E2-BFF1-171383B0643C}" "ShowKeyOutput" = "11:TRUE" "ExcludeFilters" { } } } } } gnokii-0.6.31/Windows/MSVS2008/config.h0000644000175000017500000000712611666163120015363 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2003 Marcus Godehardt This is the config.h file for GNOKII for MSVS2008 compiler, you can edit this manually. This is not auto generated. */ #ifndef _config_h #define _config_h #if defined(_MSC_VER) && defined(WIN32) # pragma once #else # error This config.h is only for MSVS2008 compiler !!! #endif #undef VERSION #define VERSION "0.6.31" /* We support Bluetooth and IRDA on MSVS 2008 */ #define HAVE_BLUETOOTH 1 #define HAVE_IRDA 1 /* Define if you have the following headers */ #define HAVE_STDARG_H 1 #define HAVE_STRING_H 1 #undef HAVE_STRINGS_H #undef HAVE_STDINT_H #undef HAVE_INTTYPES_H #define HAVE_SYS_TYPES_H 1 #undef HAVE_SYS_FILE_H #undef HAVE_SYS_TIME_H #undef HAVE_UNISTD_H #define HAVE_CTYPE_H 1 #define HAVE_STDLIB_H 1 #define HAVE_DIRECT_H 1 #define HAVE_LIMITS_H 1 #define HAVE_SYS_STAT_H 1 /* Define if your compiler supports long long */ #undef HAVE_LONG_LONG /* Define if your compiler supports long double */ #undef HAVE_LONG_DOUBLE /* Define if you have timersub() */ #undef HAVE_TIMEOPS /* Define if you have gettimeofday() */ #undef HAVE_GETTIMEOFDAY /* Define if you have tm_gmtoff field in tm structure */ #undef HAVE_TM_GMTON /* Define if you have cfsetspeed, cfsetispeed, cfsetospeed, c_ispeed and c_ospeed in struct termios */ #undef HAVE_CFSETSPEED #undef HAVE_CFSETOSPEED #undef HAVE_TERMIOS_CSPEED /* Define both if you have ISO C99 compliant snprintf */ #undef HAVE_SNPRINTF #undef HAVE_C99_SNPRINTF /* Define both if you have ISO C99 compliant vsnprintf */ #define HAVE_VSNPRINTF 1 #define HAVE_C99_VSNPRINTF 1 /* Define if you have asprintf */ #undef HAVE_ASPRINTF /* Define if you have vasprintf */ #undef HAVE_VASPRINTF /* Define if you have strsep */ #undef HAVE_STRSEP /* Define debug level */ #define DEBUG 1 #define XDEBUG 1 #define RLP_DEBUG 1 /* Decide if you want security options enabled */ #define SECURITY /* Define if you have XPM components */ #undef XPM /* Define if you want NLS */ #undef ENABLE_NLS /* Define if you have and nl_langinfo(CODESET). */ #undef HAVE_LANGINFO_CODESET /* Define if you want to use Unix98 PTYs */ #undef USE_UNIX98PTYS /* Define if struct msghdr has msg_control field */ #undef HAVE_MSGHDR_MSG_CONTROL /* Define to 1 if you have the `setenv' function. */ #define HAVE_SETENV 1 /* FIXME: Disable some odd warnings, comment these lines if u wanna fix the bad code lines */ #pragma warning(disable : 4244) // conversion from 'int ' to 'float ', possible loss of data #pragma warning(disable : 4761) // integral size mismatch in argument; conversion supplied #pragma warning(disable : 4018) // signed/unsigned mismatch #pragma warning(disable : 4305) // truncation from 'const int ' to 'char ' #pragma warning(disable : 4996) // 'strnicmp' was declared deprecated /* Suppress CRT warnings */ #define _CRT_SECURE_NO_DEPRECATE #endif // _config_h gnokii-0.6.31/Windows/MSVS2008/libgnokii.vcproj0000755000175000017500000017057611666163120017156 0ustar leoleo gnokii-0.6.31/Windows/MSVC2010Express/0000755000175000017500000000000011666163466015277 5ustar leoleognokii-0.6.31/Windows/MSVC2010Express/libgnokii/0000755000175000017500000000000011666163466017246 5ustar leoleognokii-0.6.31/Windows/MSVC2010Express/libgnokii/libgnokii.vcxproj.filters0000644000175000017500000003535211666163120024274 0ustar leoleo {4FC737F1-C7A5-4376-A066-2A32D752A2FF} cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hpp;hxx;hm;inl;inc;xsd {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files gnokii-0.6.31/Windows/MSVC2010Express/libgnokii/libgnokii.vcxproj0000644000175000017500000002770211666163120022625 0ustar leoleo Debug Win32 Release Win32 {BCAF23A4-33E2-4D41-9897-4801197F0344} libgnokii DynamicLibrary true MultiByte DynamicLibrary false true MultiByte ..;..\..\..\include;..\..\..\ext\glib\include\glib-2.0;..\..\..\ext\glib\lib\glib-2.0\include;..\..\..\ext\libusb;..\..\..\ext\iconv\include;$(IncludePath) .dll ..;..\..\..\include;..\..\..\ext\glib\include\glib-2.0;..\..\..\ext\glib\lib\glib-2.0\include;..\..\..\ext\libusb;..\..\..\ext\iconv\include;$(IncludePath) .dll Level3 Disabled WIN32;_USRDLL;GNOKIIDLL_EXPORTS;%(PreprocessorDefinitions) true ..\..\..\ext\glib\lib;..\..\..\ext\libusb;..\..\..\ext\iconv\lib;%(AdditionalLibraryDirectories) WS2_32.lib;winmm.lib;glib-2.0.lib;libusb.lib;iconv.lib;%(AdditionalDependencies) Level3 MaxSpeed true true WIN32;_USRDLL;GNOKIIDLL_EXPORTS;%(PreprocessorDefinitions) true true true ..\..\..\ext\glib\lib;..\..\..\ext\libusb;..\..\..\ext\iconv\lib;%(AdditionalLibraryDirectories) WS2_32.lib;winmm.lib;glib-2.0.lib;libusb.lib;iconv.lib;%(AdditionalDependencies) gnokii-0.6.31/Windows/MSVC2010Express/gnokii/0000755000175000017500000000000011666163466016557 5ustar leoleognokii-0.6.31/Windows/MSVC2010Express/gnokii/gnokii.vcxproj.filters0000644000175000017500000001236511666163120023115 0ustar leoleo {4FC737F1-C7A5-4376-A066-2A32D752A2FF} cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hpp;hxx;hm;inl;inc;xsd {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files gnokii-0.6.31/Windows/MSVC2010Express/gnokii/gnokii.vcxproj0000644000175000017500000001461211666163120021443 0ustar leoleo Debug Win32 Release Win32 {FADF8721-4E1B-4971-9B70-A149DD5E336A} gnokii Application true MultiByte Application false true MultiByte ..\..\..\gnokii;..\..\..\include;..;..\..\..\getopt;$(IncludePath) ..\..\..\gnokii;..\..\..\include;..;..\..\..\getopt;$(IncludePath) Level3 Disabled WIN32;GNOKIIDLL_IMPORTS;%(PreprocessorDefinitions) true ..\Debug;%(AdditionalLibraryDirectories) libgnokii.lib;%(AdditionalDependencies) Level3 MaxSpeed true true WIN32;GNOKIIDLL_IMPORTS;%(PreprocessorDefinitions) true true true ..\Release;%(AdditionalLibraryDirectories) libgnokii.lib;%(AdditionalDependencies) gnokii-0.6.31/Windows/MSVC2010Express/README0000644000175000017500000000444311666163120016147 0ustar leoleoWindows build hints (2011-12-02) ================================ Compilation prerequisits ======================== 1. Make sure proper config.h file is placed in this directory. 2. glib dependencies 2.1 Download from http://www.gtk.org/download/win32.php - glib dev (http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.28/glib-dev_2.28.8-1_win32.zip) - glib runtime (http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.28/glib_2.28.8-1_win32.zip) - gettext-runtime runtime (http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-runtime_0.18.1.1-2_win32.zip) 3. libusb dependencies 3.1 Download from http://sourceforge.net/projects/libusb-win32/files/libusb-win32-releases/1.2.5.0/ - libusb-win32 binaries (http://sourceforge.net/projects/libusb-win32/files/libusb-win32-releases/1.2.5.0/libusb-win32-bin-1.2.5.0.zip/download) 4. iconv dependencies 4.1 Download from http://sourceforge.net/projects/gettext/ - libiconv-1.9.1.bin.woe32 binaries (http://sourceforge.net/projects/gettext/files/libiconv-win32/1.9.1/libiconv-1.9.1.bin.woe32.zip/download) 5. Create ext directory in top-level gnokii directory 5.1 Create glib subdirectory in ext directory and extract there glib dev zip 5.2 Create libusb subdirectory in ext directory and extract there libusb-win32 binaries: - libusb-win32-bin-1.2.5.0/include/lusb0_usb.h -> usb.h - libusb-win32-bin-1.2.5.0/lib/msvc/libusb.lib -> libusb.lib 5.3 Create iconv subdirectory in ext directory and extract there libiconv zip Runtime prerequsits =================== Install libusb following instructions from the downloaded zipfile. Make sure that following files are present in the same directory as gnokii.exe and libgnokii.dll: - intl.dll (from gettext-runtime runtime) - libglib-2.0-0.dll (from glib runtime) - libusb0.dll (from libusb-win32: libusb-win32-bin-1.2.5.0/bin/x86/libusb0_x86.dll) - iconv.dll (from libiconv binaries) Place the sample config file (gnokiirc from Windows directory) into one of the locations: - %APPDATA%\gnokii\gnokii.ini (C:\Documents and Settings\\Application Data\gnokii\gnokii.ini or C:\Users\\AppData\Roaming\gnokii\gnokii.ini) - %HOMEDRIVER%\%HOMEPATH%\gnokii.ini (C:\Documents and Settings\\gnokii.ini or C:\Users\\gnokii.ini) - %SYSTEMROOT%\gnokii.ini (C:\Windows\gnokii.ini) gnokii-0.6.31/Windows/MSVC2010Express/gnokii.sln0000644000175000017500000000246211666163120017264 0ustar leoleo Microsoft Visual Studio Solution File, Format Version 11.00 # Visual C++ Express 2010 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gnokii", "gnokii\gnokii.vcxproj", "{FADF8721-4E1B-4971-9B70-A149DD5E336A}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libgnokii", "libgnokii\libgnokii.vcxproj", "{BCAF23A4-33E2-4D41-9897-4801197F0344}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {FADF8721-4E1B-4971-9B70-A149DD5E336A}.Debug|Win32.ActiveCfg = Debug|Win32 {FADF8721-4E1B-4971-9B70-A149DD5E336A}.Debug|Win32.Build.0 = Debug|Win32 {FADF8721-4E1B-4971-9B70-A149DD5E336A}.Release|Win32.ActiveCfg = Release|Win32 {FADF8721-4E1B-4971-9B70-A149DD5E336A}.Release|Win32.Build.0 = Release|Win32 {BCAF23A4-33E2-4D41-9897-4801197F0344}.Debug|Win32.ActiveCfg = Debug|Win32 {BCAF23A4-33E2-4D41-9897-4801197F0344}.Debug|Win32.Build.0 = Debug|Win32 {BCAF23A4-33E2-4D41-9897-4801197F0344}.Release|Win32.ActiveCfg = Release|Win32 {BCAF23A4-33E2-4D41-9897-4801197F0344}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal gnokii-0.6.31/Windows/MSVC2010Express/config.h0000644000175000017500000000741011666163120016702 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2011 PaweÅ‚ Kot This is the config.h file for GNOKII for MSVC2010Express compiler, you can edit this manually. This is not auto generated. */ #ifndef _config_h #define _config_h #if defined(_MSC_VER) && defined(WIN32) # pragma once #else # error This config.h is only for MSVC2010Express compiler !!! #endif #undef VERSION #define VERSION "0.6.31" /* We support Bluetooth and IRDA on MSVS 2010 */ #define HAVE_BLUETOOTH 1 #define HAVE_IRDA 1 /* Define if you have the following headers */ #define HAVE_STDARG_H 1 #define HAVE_STRING_H 1 #undef HAVE_STRINGS_H #undef HAVE_STDINT_H #undef HAVE_INTTYPES_H #define HAVE_SYS_TYPES_H 1 #undef HAVE_SYS_FILE_H #undef HAVE_SYS_TIME_H #undef HAVE_UNISTD_H #define HAVE_CTYPE_H 1 #define HAVE_STDLIB_H 1 #define HAVE_DIRECT_H 1 #define HAVE_LIMITS_H 1 #define HAVE_SYS_STAT_H 1 /* Define if your compiler supports long long */ #undef HAVE_LONG_LONG /* Define if your compiler supports long double */ #undef HAVE_LONG_DOUBLE /* Define if you have timersub() */ #undef HAVE_TIMEOPS /* Define if you have gettimeofday() */ #undef HAVE_GETTIMEOFDAY /* Define if you have tm_gmtoff field in tm structure */ #undef HAVE_TM_GMTON /* Define if you have cfsetspeed, cfsetispeed, cfsetospeed, c_ispeed and c_ospeed in struct termios */ #undef HAVE_CFSETSPEED #undef HAVE_CFSETOSPEED #undef HAVE_TERMIOS_CSPEED /* Define both if you have ISO C99 compliant snprintf */ #undef HAVE_SNPRINTF #undef HAVE_C99_SNPRINTF /* Define both if you have ISO C99 compliant vsnprintf */ #define HAVE_VSNPRINTF 1 #define HAVE_C99_VSNPRINTF 1 /* Define if you have asprintf */ #undef HAVE_ASPRINTF /* Define if you have vasprintf */ #undef HAVE_VASPRINTF /* Define if you have strsep */ #undef HAVE_STRSEP /* Define debug level */ #define DEBUG 1 #define XDEBUG 1 #define RLP_DEBUG 1 /* Decide if you want security options enabled */ #define SECURITY /* Define if you have XPM components */ #undef XPM /* Define if you want NLS */ #undef ENABLE_NLS /* Define if you have and nl_langinfo(CODESET). */ #undef HAVE_LANGINFO_CODESET /* Define if you want to use Unix98 PTYs */ #undef USE_UNIX98PTYS /* Define if struct msghdr has msg_control field */ #undef HAVE_MSGHDR_MSG_CONTROL /* Define to 1 if you have the `setenv' function. */ #define HAVE_SETENV 1 /* Define to 1 if you have libusb installed */ #define HAVE_LIBUSB 1 /* Define to 1 if you have libiconv installed */ #define HAVE_ICONV 1 #define HAVE_LOCALE_CHARSET 1 /* FIXME: Disable some odd warnings, comment these lines if u wanna fix the bad code lines */ #pragma warning(disable : 4244) // conversion from 'int ' to 'float ', possible loss of data #pragma warning(disable : 4761) // integral size mismatch in argument; conversion supplied #pragma warning(disable : 4018) // signed/unsigned mismatch #pragma warning(disable : 4305) // truncation from 'const int ' to 'char ' #pragma warning(disable : 4996) // 'strnicmp' was declared deprecated /* Suppress CRT warnings */ #define _CRT_SECURE_NO_DEPRECATE #endif // _config_h gnokii-0.6.31/Windows/gnokiirc0000644000175000017500000001754111666163120014375 0ustar leoleo# This is a sample config file for Windows systems. # See Docs/sample/gnokiirc for a unix-like sample. # Copy this file into # - gnokii installation directory (%APPDATA%\gnokii) and name it config # - your home directory (%HOMEDRIVE%\%HOMEPATH%) and name it _gnokiirc # - windows installation directory (%SYSTEMROOT%) and name it gnokiirc # Then change port, connection and model settings following the comments # below. See http://wiki.gnokii.org/index.php/Config for working examples. # [global] # Set port to the physical port used to connect to your phone. # For Win32 and ports from 1 to 9 you want to use: port = com1: # or similiar. For ports greater than 9 you want to use: # port = \\.\COM10 # or similiar. # # Use this setting also for the Bluetooth connection: # port = aa:bb:cc:dd:ee:ff # Change it according to instructions: model = fake # Set model to the model number of your phone. For the # Symbian phones use: # model = symbian # # For other non-Nokia phones and when you want to use AT # mode use: # model = AT # # If you can't figure out what to put here read the FAQ. # If it still doesn't help, consult gnokii-ml or #gnokii at freenode. # For Nokia phones (non-Symbian), most likely you'll need: # model = 6510 # There are few main models that when chosen should make use of the # appropriate drivers. These are: 6110, 7110, 6510, 3110, 2110, 6160. # Set IrDA device name. # If you use irda connection you may want gnokii to autodetect the irda # device it connects to. This is fine for most of the cases. if you have # more than one device in range you may want to give manually the device # name so gnokii correctly recognizes it. Use the name that you can see # in the discovery log when the phone with infrared is in the range of # your irda port. # Note that you need to set this for each phone_ section separately. It # isn't nested from the global section. # irda_string = Nokia 6610i # Initlength controls the number of characters sent to the # phone during initialisation. You can either set it to # the word "default" or a positive integer. # # You can try setting this value if you want to connect # to the phone quicker. If you've never noticed the # connection to be slow, it is suggested that you # leave this alone. Read the initialisation code in fbus-xxxx # to understand what this changes if you're curious. initlength = default # The type of the connection, for IR set this to infrared or irda. # For the nk6110 driver only infrared is valid for the IrDA connection. # See Docs/gnokii-ir-howto for more detailes on this. # If you have 6210/6250/7110 phone and dau9p cable (the one you can # use with 6100 series and cannot use hardware modem from the phone) # you may want to use 'dau9p' value to get faster initialization. # If you use dlr3 or dlr3p cable for nokia phones in FBUS mode (ie. # you don't use model = AT) you may want to use 'dlr3p' value here. # Note that it is recommended and currently the best way to use this # cable with nk6510 driver. connection = serial # With DKU-2 cable use the following setting if you want to libusb driver # (recommended): # connection = dku2libusb # or the following setting if you want to use Linux kernel driver # connection = dku2 # With DKU-5 cable use the following setting # connection = dku5 # For Bluetooth and AT driver use the following setting # connection = serial # For other Bluetooth settings use # connection = bluetooth # For infrared connection with phones other than Nokia 6110/6130/6150 use: # connection = irda # Don't forget to run: 'irattach irda0 -s' or similiar before running gnokii # Set this to 'yes' if you want gnokii to set and check the lock file in # /var/lock directory. It avoids potential conflicts with other serial # port software (eg. minicom). If you have wrong permissions for the # directory, a warning will be generated. If you don't want a lockfile, set # it to 'no'. use_locking = no # Baudrate to use on serial port connections. # Currently used only by models AT and BIP/CIMD. Defaults to 19200. serial_baudrate = 19200 # Force waiting after each sent character the specified usec time. # Value -1 forces the fastest 'block' writing, # value 0 writes each character separately without any explicit waiting, # other positive values specify the appropriate 1/1000000 sec delaying. # Siemens M20 requires at least "1"! FIXME: Model-driven autodetection #serial_write_usleep = 10000 # Force serial port handshaking mode, useful primarily for "AT" model. # Gnokii "AT" model uses software handshake by default. # Possible values: hardware (RTS/CTS - 7 wires) or software (XON/XOFF - 3 wires) #handshake = software # If defined (not commented out by '#') it will quit Gnokii anytime # when DCD line will drop. #require_dcd = 1 # If you are using a bluetooth connection, you can specify the rfcomm # channel number here. If you don't specify the value, it is autodetected # on connection (it may take an additional second). FBUS connections always # ignore this value and use channel 14. #rfcomm_channel = 1 # There may happen various timeouts during the communication with the phone. # This parameter enables the retransmission policy. Ie. if the phone doesn't # respond, we send the frame again. This happened mainly with the older # phones. You may want to enable it when you see mysterious timeouts. # Be very careful with this option. It is suspected to cause phone breakage # with new DCT4 phones (like Nokia 6100). By default it is switched off # (sm_retry = 0) #sm_retry = 1 # Run the specified script(s) right after opening and initializing the device # and before any communication (right before closing for disconnect_script). # You may find handy to use it to connect your modem to SMS Center # when using BIP or CIMD protocols # Non-absolute path is relative to the specific directory where gnokii is run! #connect_script = /absolute/path/to/gnokii/Docs/sample/cimd-connect #disconnect_script = # When sending SMS you can experience timeouts. This is the feature of the # overloaded SMSCs. The phones waits for the response from the SMSC confirming # that it received the short message. When the SMSC is DoSed with many requests # it will take more time to get the response. Adjust it to your needs. The # value is given in seconds to wait. Defaults to 10 seconds. Set to 0 to wait # forever. smsc_timeout = 10 # Set this to 1 if you want to break your phone with xgnokii. Works only # with few Nokia models and FBUS communication [xgnokii] allow_breakage = 0 # Set bindir to point to the location of the various gnokiid binaries. # In particular ensure that mgnokiidev is in this location, with # permissions 4750, owned by root, group gnokii. Ensure you # are in the gnokii group and that the group exists... [gnokiid] bindir = /usr/local/sbin/ # Any entries in the following two sections will be set as environment # variables when running the scripts. # Handy for use for $VAR substitutions in your chat(8) script. [connect_script] # Don't put your phone number here!!! TELEPHONE = 12345678 [disconnect_script] # The following parameters control how libgnokii handles the debugging messages. # Currently there are three categories: "debug" controls the libgnokii # normal debug output, "rlpdebug" controls the debug output of the RLP # subsystem, and "xdebug" is used by the xgnokii or smsd. [logging] # where to log the debug output (on: stderr, off: /dev/null) debug = on # where to log the rlp debug output (on: stderr, off: /dev/null) rlpdebug = off # where to log X debug output (on: stderr, off: /dev/null) xdebug = off # Fake-phone can be used for testing Gnokii functionality without # having a physical phone connected. # Example usage: # gnokii.exe --config gnokiirc --phone fake --identify [phone_fake] port = foobar model = fake connection = serial gnokii-0.6.31/Windows/MSVC8/0000755000175000017500000000000011666163466013512 5ustar leoleognokii-0.6.31/Windows/MSVC8/gnokii.vcproj0000644000175000017500000001145111666163120016204 0ustar leoleo gnokii-0.6.31/Windows/MSVC8/gnokii.sln0000644000175000017500000000266611666163120015505 0ustar leoleo Microsoft Visual Studio Solution File, Format Version 9.00 # Visual C++ Express 2005 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libgnokii", "libgnokii.vcproj", "{AB5E11A5-79E3-4722-82BC-25FD9FF71471}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gnokii", "gnokii.vcproj", "{0E0CED41-EECB-4D26-A2C6-62C6157C5219}" ProjectSection(ProjectDependencies) = postProject {AB5E11A5-79E3-4722-82BC-25FD9FF71471} = {AB5E11A5-79E3-4722-82BC-25FD9FF71471} EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {AB5E11A5-79E3-4722-82BC-25FD9FF71471}.Debug|Win32.ActiveCfg = Debug|Win32 {AB5E11A5-79E3-4722-82BC-25FD9FF71471}.Debug|Win32.Build.0 = Debug|Win32 {AB5E11A5-79E3-4722-82BC-25FD9FF71471}.Release|Win32.ActiveCfg = Release|Win32 {AB5E11A5-79E3-4722-82BC-25FD9FF71471}.Release|Win32.Build.0 = Release|Win32 {0E0CED41-EECB-4D26-A2C6-62C6157C5219}.Debug|Win32.ActiveCfg = Debug|Win32 {0E0CED41-EECB-4D26-A2C6-62C6157C5219}.Debug|Win32.Build.0 = Debug|Win32 {0E0CED41-EECB-4D26-A2C6-62C6157C5219}.Release|Win32.ActiveCfg = Release|Win32 {0E0CED41-EECB-4D26-A2C6-62C6157C5219}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal gnokii-0.6.31/Windows/MSVC8/config.h0000644000175000017500000000700511666163120015115 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2003 Marcus Godehardt This is the config.h file for GNOKII for MSVC8 compiler, you can edit this manually. This is not auto generated. */ #ifndef _config_h #define _config_h #if defined(_MSC_VER) && defined(WIN32) # pragma once #else # error This config.h is only for MSVC8 compiler !!! #endif #undef VERSION #define VERSION "0.6.31" /* We support Bluetooth and IRDA on MSVC8 */ #define HAVE_BLUETOOTH 1 #define HAVE_IRDA 1 /* Define if you have the following headers */ #define HAVE_STDARG_H 1 #define HAVE_STRING_H 1 #undef HAVE_STRINGS_H #undef HAVE_STDINT_H #undef HAVE_INTTYPES_H #define HAVE_SYS_TYPES_H 1 #undef HAVE_SYS_FILE_H #undef HAVE_SYS_TIME_H #undef HAVE_UNISTD_H #define HAVE_CTYPE_H 1 #define HAVE_STDLIB_H 1 #define HAVE_DIRECT_H 1 #define HAVE_LIMITS_H 1 #define HAVE_SYS_STAT_H 1 /* Define if your compiler supports long long */ #undef HAVE_LONG_LONG /* Define if your compiler supports long double */ #undef HAVE_LONG_DOUBLE /* Define if you have timersub() */ #undef HAVE_TIMEOPS /* Define if you have gettimeofday() */ #undef HAVE_GETTIMEOFDAY /* Define if you have tm_gmtoff field in tm structure */ #undef HAVE_TM_GMTON /* Define if you have cfsetspeed, cfsetispeed, cfsetospeed, c_ispeed and c_ospeed in struct termios */ #undef HAVE_CFSETSPEED #undef HAVE_CFSETOSPEED #undef HAVE_TERMIOS_CSPEED /* Define both if you have ISO C99 compliant snprintf */ #undef HAVE_SNPRINTF #undef HAVE_C99_SNPRINTF /* Define both if you have ISO C99 compliant vsnprintf */ #define HAVE_VSNPRINTF 1 #define HAVE_C99_VSNPRINTF 1 /* Define if you have asprintf */ #define HAVE_ASPRINTF 1 /* Define if you have vasprintf */ #define HAVE_VASPRINTF 1 /* Define if you have strsep */ #undef HAVE_STRSEP /* Define debug level */ #define DEBUG 1 #define XDEBUG 1 #define RLP_DEBUG 1 /* Decide if you want security options enabled */ #define SECURITY /* Define if you have XPM components */ #undef XPM /* Define if you want NLS */ #undef ENABLE_NLS /* Define if you have and nl_langinfo(CODESET). */ #undef HAVE_LANGINFO_CODESET /* Define if you want to use Unix98 PTYs */ #undef USE_UNIX98PTYS /* Define if struct msghdr has msg_control field */ #undef HAVE_MSGHDR_MSG_CONTROL /* FIXME: Disable some odd warnings, comment these lines if u wanna fix the bad code lines */ #pragma warning(disable : 4244) // conversion from 'int ' to 'float ', possible loss of data #pragma warning(disable : 4761) // integral size mismatch in argument; conversion supplied #pragma warning(disable : 4018) // signed/unsigned mismatch #pragma warning(disable : 4305) // truncation from 'const int ' to 'char ' #pragma warning(disable : 4996) // 'strnicmp' was declared deprecated /* Suppress CRT warnings */ #define _CRT_SECURE_NO_DEPRECATE #endif // _config_h gnokii-0.6.31/Windows/MSVC8/libgnokii.vcproj0000644000175000017500000002157211666163120016700 0ustar leoleo gnokii-0.6.31/ltmain.sh0000755000175000017500000105052711666163202013041 0ustar leoleo # libtool (GNU libtool) 2.4 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007, 2008, 2009, 2010 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --config show all configuration variables # --debug enable verbose shell tracing # -n, --dry-run display commands without modifying any files # --features display basic configuration information and exit # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages # --version print version information # -h, --help, --help-all print short, long, or detailed help message # # MODE must be one of the following: # # clean remove files from the build directory # compile compile a source file into a libtool object # execute automatically set library path, then run a program # finish complete the installation of libtool libraries # install install libraries or executables # link create a library or an executable # uninstall remove libraries from an installed directory # # MODE-ARGS vary depending on the MODE. When passed as first option, # `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool) 2.4 Debian-2.4-2ubuntu1 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . # GNU libtool home page: . # General help using GNU software: . PROGRAM=libtool PACKAGE=libtool VERSION="2.4 Debian-2.4-2ubuntu1" TIMESTAMP="" package_revision=1.3293 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # NLS nuisances: We save the old values to restore during execute mode. lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done LC_ALL=C LANGUAGE=C export LANGUAGE LC_ALL $lt_unset CDPATH # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} : ${EGREP="/bin/grep -E"} : ${FGREP="/bin/grep -F"} : ${GREP="/bin/grep"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SED="/bin/sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_dirname may be replaced by extended shell implementation # func_basename file func_basename () { func_basename_result=`$ECHO "${1}" | $SED "$basename"` } # func_basename may be replaced by extended shell implementation # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` } # func_dirname_and_basename may be replaced by extended shell implementation # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname may be replaced by extended shell implementation # These SED scripts presuppose an absolute path with a trailing slash. pathcar='s,^/\([^/]*\).*$,\1,' pathcdr='s,^/[^/]*,,' removedotparts=':dotsl s@/\./@/@g t dotsl s,/\.$,/,' collapseslashes='s@/\{1,\}@/@g' finalslash='s,/*$,/,' # func_normal_abspath PATH # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. # value returned in "$func_normal_abspath_result" func_normal_abspath () { # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` while :; do # Processed it all yet? if test "$func_normal_abspath_tpath" = / ; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result" ; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_relative_path SRCDIR DSTDIR # generates a relative path from SRCDIR to DSTDIR, with a trailing # slash if non-empty, suitable for immediately appending a filename # without needing to append a separator. # value returned in "$func_relative_path_result" func_relative_path () { func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=${func_dirname_result} if test "x$func_relative_path_tlibdir" = x ; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test "x$func_stripname_result" != x ; then func_relative_path_result=${func_relative_path_result}/${func_stripname_result} fi # Normalisation. If bindir is libdir, return empty string, # else relative path ending with a slash; either way, target # file name can be directly appended. if test ! -z "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result/" func_relative_path_result=$func_stripname_result fi } # The name of this program: func_dirname_and_basename "$progpath" progname=$func_basename_result # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=: for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' # Sed substitution that converts a w32 file name or path # which contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname: ${opt_mode+$opt_mode: }$*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` done my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "$my_tmpdir" } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "$1" | $SED \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_tr_sh # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_version # Echo version message to standard output and exit. func_version () { $opt_debug $SED -n '/(C)/!b go :more /\./!{ N s/\n# / / b more } :go /^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $opt_debug $SED -n '/^# Usage:/,/^# *.*--help/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" echo $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help [NOEXIT] # Echo long help message to standard output and exit, # unless 'noexit' is passed as argument. func_help () { $opt_debug $SED -n '/^# Usage:/,/# Report bugs to/ { :print s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ p d } /^# .* home page:/b print /^# General help using/b print ' < "$progpath" ret=$? if test -z "$1"; then exit $ret fi } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $opt_debug func_error "missing argument for $1." exit_cmd=exit } # func_split_short_opt shortopt # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. func_split_short_opt () { my_sed_short_opt='1s/^\(..\).*$/\1/;q' my_sed_short_rest='1s/^..\(.*\)$/\1/;q' func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` } # func_split_short_opt may be replaced by extended shell implementation # func_split_long_opt longopt # Set func_split_long_opt_name and func_split_long_opt_arg shell # variables after splitting LONGOPT at the `=' sign. func_split_long_opt () { my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^--[^=]*=//' func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` } # func_split_long_opt may be replaced by extended shell implementation exit_cmd=: magic="%%%MAGIC variable%%%" magic_exe="%%%MAGIC EXE variable%%%" # Global variables. nonopt= preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "${1}=\$${1}\${2}" } # func_append may be replaced by extended shell implementation # func_append_quoted var value # Quote VALUE and append to the end of shell variable VAR, separated # by a space. func_append_quoted () { func_quote_for_eval "${2}" eval "${1}=\$${1}\\ \$func_quote_for_eval_result" } # func_append_quoted may be replaced by extended shell implementation # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "${@}"` } # func_arith may be replaced by extended shell implementation # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` } # func_len may be replaced by extended shell implementation # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` } # func_lo2o may be replaced by extended shell implementation # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` } # func_xform may be replaced by extended shell implementation # func_fatal_configuration arg... # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func_error ${1+"$@"} func_error "See the $PACKAGE documentation for more information." func_fatal_error "Fatal configuration error." } # func_config # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # Display the features supported by this script. func_features () { echo "host: $host" if test "$build_libtool_libs" = yes; then echo "enable shared libraries" else echo "disable shared libraries" fi if test "$build_old_libs" = yes; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag tagname # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname="$1" re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf="/$re_begincf/,/$re_endcf/p" # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Option defaults: opt_debug=: opt_dry_run=false opt_config=false opt_preserve_dup_deps=false opt_features=false opt_finish=false opt_help=false opt_help_all=false opt_silent=: opt_verbose=: opt_silent=false opt_verbose=false # Parse options once, thoroughly. This comes as soon as possible in the # script to make things like `--version' happen as quickly as we can. { # this just eases exit handling while test $# -gt 0; do opt="$1" shift case $opt in --debug|-x) opt_debug='set -x' func_echo "enabling shell trace mode" $opt_debug ;; --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) opt_config=: func_config ;; --dlopen|-dlopen) optarg="$1" opt_dlopen="${opt_dlopen+$opt_dlopen }$optarg" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) opt_features=: func_features ;; --finish) opt_finish=: set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help_all=: opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_mode="$optarg" case $optarg in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_silent=false func_append preserve_args " $opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $opt" ;; --silent|--quiet) opt_silent=: func_append preserve_args " $opt" opt_verbose=false ;; --verbose|-v) opt_verbose=: func_append preserve_args " $opt" opt_silent=false ;; --tag) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_tag="$optarg" func_append preserve_args " $opt $optarg" func_enable_tag "$optarg" shift ;; -\?|-h) func_usage ;; --help) func_help ;; --version) func_version ;; # Separate optargs to long options: --*=*) func_split_long_opt "$opt" set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-n*|-v*) func_split_short_opt "$opt" set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) set dummy "$opt" ${1+"$@"}; shift; break ;; esac done # Validate options: # save first non-option argument if test "$#" -gt 0; then nonopt="$opt" shift fi # preserve --debug test "$opt_debug" = : || func_append preserve_args " --debug" case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test "$opt_mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$opt_mode' for more information." } # Bail if the options were screwed $exit_cmd $EXIT_FAILURE } ## ----------- ## ## Main. ## ## ----------- ## # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case "$lt_sysroot:$1" in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result="=$func_stripname_result" ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$lt_sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $opt_debug # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result="" if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result" ; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $opt_debug if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $opt_debug # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $opt_debug if test -z "$2" && test -n "$1" ; then func_error "Could not determine host file name corresponding to" func_error " \`$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result="$1" fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $opt_debug if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " \`$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result="$3" fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $opt_debug case $4 in $1 ) func_to_host_path_result="$3$func_to_host_path_result" ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via `$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $opt_debug $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $opt_debug case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result="$1" } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result="$func_convert_core_msys_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via `$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $opt_debug if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd="func_convert_path_${func_stripname_result}" fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $opt_debug func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result="$1" } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_msys_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_mode_compile arg... func_mode_compile () { $opt_debug # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= pie_flag= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) test -n "$libobj" && \ func_fatal_error "you cannot specify \`-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append later " $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" func_append_quoted lastarg "$arg" done IFS="$save_ifs" func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append base_compile " $lastarg" continue ;; *) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with \`-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj="$func_basename_result" } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from \`$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$opt_mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode \`$opt_mode'" ;; esac echo $ECHO "Try \`$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test "$opt_help" = :; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | sed -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | sed '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } test "$opt_mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "\`$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument \`$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and \`=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use the \`-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the \`$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the \`$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test "$opt_mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test "x$prev" = x-m && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$opt_mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename="" if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname" ; then func_basename "$dlprefile_dlname" dlprefile_dlbasename="$func_basename_result" else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename" ; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $opt_debug win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $opt_debug sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $opt_debug match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive which possess that section. Heuristic: eliminate # all those which have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $opt_debug if func_cygming_gnu_implib_p "$1" ; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1" ; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result="" fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" if test "$lock_old_archive_extraction" = yes; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test "$lock_old_archive_extraction" = yes; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ which is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options which match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include /* declarations of non-ANSI functions */ #if defined(__MINGW32__) # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined(__CYGWIN__) # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined (other platforms) ... */ #endif /* portability defines, excluding path handling macros */ #if defined(_MSC_VER) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC # ifndef _INTPTR_T_DEFINED # define _INTPTR_T_DEFINED # define intptr_t int # endif #elif defined(__MINGW32__) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined(__CYGWIN__) # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined (other platforms) ... */ #endif #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #if defined(LT_DEBUGWRAPPER) static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (strcmp (str, pat) == 0) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -e 's/\([\\"]\)/\\\1/g' \ -e 's/^/ fputs ("/' -e 's/$/\\n", f);/' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $opt_debug case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir="$arg" prev= continue ;; dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-flto*|-fwhopr*|-fuse-linker-plugin) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test "$prev" = dlfiles; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_preserve_dup_deps ; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs="$dlprefiles" fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." else echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test "$prefer_static_libs" = yes || test "$prefer_static_libs,$installed" = "built,no"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib="$l" done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. func_append dlprefiles " $lib $dependency_libs" else func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$lt_sysroot$libdir" absdir="$lt_sysroot$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later func_append notinst_path " $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi case "$host" in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test "$installed" = no; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then echo if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname="$1" shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$opt_mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else add="$dir/$old_library" fi elif test -n "$old_library"; then add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$opt_mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo $ECHO "*** Warning: This system can not link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs="$temp_deplibs" fi func_append newlib_search_path " $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path="$deplib" ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$1" number_minor="$2" number_revision="$3" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|qnx|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; *) func_fatal_configuration "$modename: unknown library version type \`$version_type'" ;; esac ;; no) current="$1" revision="$2" age="$3" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. func_append verstring ":${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" func_append libobjs " $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$opt_mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) func_append dlfiles " $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then func_append deplibs " -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test "X$deplibs_check_method" = "Xnone"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes ;; esac ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$opt_mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_apped perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname="$1" shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd1 in $cmds; do IFS="$save_ifs" # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test "$try_normal_branch" = yes \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=${output_objdir}/${output_la}.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\${concat_cmds}$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` else gentop="$output_objdir/${obj}x" func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " ${wl}-bind_at_load" func_append finalize_command " ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs="$new_libs" func_append compile_command " $compile_deplibs" func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append finalize_perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=no ;; *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then func_append oldobjs " $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test "x$bindir" != x ; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$opt_mode" = link || test "$opt_mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) func_append RM " $arg"; rmforce=yes ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then odir="$objdir" else odir="$dir/$objdir" fi func_basename "$file" name="$func_basename_result" test "$opt_mode" = uninstall && odir="$dir" # Remember odir for removal later, being careful to avoid duplicates if test "$opt_mode" = clean; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case "$opt_mode" in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test "$opt_mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name" ; then func_append rmfiles " $odir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$opt_mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 gnokii-0.6.31/po/0000755000175000017500000000000011666163466011636 5ustar leoleognokii-0.6.31/po/pl.po0000644000175000017500000060620711666163120012607 0ustar leoleo# translation of pl.po to Polish # This is the Polish locale definition for Gnokii. # Copyright (C) 2000 Jacek Fiok . # Copyright (C) 2002, 2005, 2007, 2008, 2009, 2010, 2011 PaweÅ‚ Kot # Copyright (C) 2003, 2004 Daniel Koć # msgid "" msgstr "" "Project-Id-Version: pl\n" "Report-Msgid-Bugs-To: feedback@gnokii.org\n" "POT-Creation-Date: 2011-12-01 21:36+0100\n" "PO-Revision-Date: 2011-12-02 21:23+0200\n" "Last-Translator: PaweÅ‚ Kot \n" "Language-Team: Polish \n" "Language: pl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Line not part of any heading #: ../common/cfgreader.c:458 #, c-format msgid "" "Orphaned line: %s\n" "If in doubt place this line into [global] section.\n" msgstr "" "Osierocona linia: %s\n" "W razie wÄ…tpliwoÅ›ci umieść tÄ™ liniÄ™ w sekcji [global].\n" #: ../common/cfgreader.c:732 ../common/cfgreader.c:962 #, c-format msgid "No %s section in the config file.\n" msgstr "Brak sekcji %s w pliku konfiguracyjnym.\n" #: ../common/cfgreader.c:738 ../common/cfgreader.c:744 #: ../common/cfgreader.c:750 #, c-format msgid "You need to define '%s' in the config file.\n" msgstr "W pliku konfiguracyjnym trzeba zdefiniować %s.\n" #: ../common/cfgreader.c:755 ../common/cfgreader.c:768 #: ../common/cfgreader.c:777 ../common/cfgreader.c:785 #: ../common/cfgreader.c:797 ../common/cfgreader.c:806 #: ../common/cfgreader.c:814 ../common/cfgreader.c:824 #: ../common/cfgreader.c:842 ../common/cfgreader.c:850 #: ../common/cfgreader.c:871 ../common/cfgreader.c:980 #, c-format msgid "Unsupported [%s] %s value \"%s\"\n" msgstr "NieobsÅ‚ugiwana [%s] %s wartość \"%s\".\n" #: ../common/cfgreader.c:769 ../common/cfgreader.c:778 #: ../common/cfgreader.c:786 ../common/cfgreader.c:807 #: ../common/cfgreader.c:815 ../common/cfgreader.c:825 #: ../common/cfgreader.c:843 ../common/cfgreader.c:851 #, c-format msgid "Assuming: %d\n" msgstr "ZakÅ‚adam: %d\n" #: ../common/cfgreader.c:798 ../common/cfgreader.c:872 #: ../common/cfgreader.c:981 #, c-format msgid "Use either \"%s\" or \"%s\".\n" msgstr "Użyj \"%s\" lub \"%s\".\n" #: ../common/cfgreader.c:799 ../common/cfgreader.c:873 #: ../common/cfgreader.c:982 #, c-format msgid "Assuming: %s\n" msgstr "ZakÅ‚adam: %s\n" #: ../common/cfgreader.c:1172 #, c-format msgid "Couldn't read %s config file.\n" msgstr "Nieudana próba otwarcia pliku konfiguracyjnego %s.\n" #: ../common/cfgreader.c:1187 #, c-format msgid "Failed to initialize libgnokii.\n" msgstr "Nie udaÅ‚o zainicjalizować libgnokii.\n" #: ../common/cfgreader.c:1192 #, c-format msgid "Couldn't open a config file or memory.\n" msgstr "Nieudana próba otwarcia konfiguracji z pliku lub pamiÄ™ci.\n" #: ../common/cfgreader.c:1282 #, c-format msgid "Config error - no model specified.\n" msgstr "Błąd konfiguracji - nie podano modelu.\n" #: ../common/cfgreader.c:1286 #, c-format msgid "Config error - no port specified.\n" msgstr "Błąd konfiguracji - nie podano portu.\n" #: ../common/data/virtmodem.c:144 #, c-format msgid "gn_vm_initialise - VM_GSMInitialise failed!\n" msgstr "gn_vm_initialise - nieudane wywoÅ‚anie VM_GSMInitialise!\n" #: ../common/data/virtmodem.c:151 #, c-format msgid "gn_vm_initialise - VM_PtySetup failed!\n" msgstr "gn_vm_initialise - nieudane wywoÅ‚anie VM_PtySetup!\n" #: ../common/data/virtmodem.c:156 #, c-format msgid "gn_vm_initialise - gn_atem_initialise failed!\n" msgstr "gn_vm_initialise - nieudane wywoÅ‚anie gn_atem_initialise!\n" #: ../common/data/virtmodem.c:161 #, c-format msgid "gn_vm_initialise - dp_Initialise failed!\n" msgstr "gn_vm_Initialise - nieudane wywoÅ‚anie dp_Initialise!\n" #: ../common/data/virtmodem.c:365 #, c-format msgid "Cannot access %s, check the bindir in your config file!\n" msgstr "Błąd dostÄ™pu do %s, sprawdź wartość bindir w pliku konfiguracyjnym!\n" #: ../common/data/virtmodem.c:372 ../utils/mgnokiidev.c:186 #, c-format msgid "Couldn't open pty!\n" msgstr "Nieudana próba otwarcia pty!\n" #: ../common/data/virtmodem.c:389 ../gnokii/gnokii-other.c:78 #: ../smsd/lowlevel.c:124 ../xgnokii/xgnokii_lowlevel.c:200 #, c-format msgid "GSM/FBUS init failed! (Unknown model?). Quitting.\n" msgstr "Nieudana inicjalizacja GSM/FBUS! (Nieznany model?). Koniec pracy.\n" #: ../common/devices/tcp.c:80 msgid "Gnokii tcp_open: socket()" msgstr "Gnokii tcp_open: socket()" #: ../common/devices/tcp.c:89 #, c-format msgid "Gnokii tcp_open: colon (':') not found in connect strings \"%s\"!\n" msgstr "Gnokii tcp_open: brak dwukropka w poleceniu inicjalizacji \"%s\"!\n" #: ../common/devices/tcp.c:97 #, c-format msgid "Gnokii tcp_open: Port string \"%s\" not valid for IPv4 connection!\n" msgstr "Gnokii tcp_open: port \"%s\" nie jest poprawnym portem IPv4!\n" #: ../common/devices/tcp.c:101 #, c-format msgid "Gnokii tcp_open: Unknown host \"%s\"!\n" msgstr "Gnokii tcp_open: nieznane urzÄ…rzenie \"%s\"!\n" #: ../common/devices/tcp.c:105 #, c-format msgid "Gnokii tcp_open: Address resolve for host \"%s\" not compatible!\n" msgstr "Gnokii tcp_open: nieudane rozwiÄ…zanie adresu dla urzÄ…dzenia \"%s\"!\n" #: ../common/devices/tcp.c:115 msgid "Gnokii tcp_open: connect()" msgstr "Gnokii tcp_open: connect()" #: ../common/devices/tcp.c:127 #, c-format msgid "Gnokii tcp_close: disconnect_script\n" msgstr "Gnokii tcp_close: disconnect_script\n" #: ../common/devices/tcp.c:150 #, c-format msgid "Gnokii tcp_opendevice: connect_script\n" msgstr "Gnokii tcp_opendevice: connect_script\n" #: ../common/devices/tcp.c:160 msgid "Gnokii tcp_opendevice: fcntl(F_SETOWN)" msgstr "Gnokii tcp_opendevice: fcntl(F_SETOWN)" #: ../common/devices/tcp.c:183 msgid "Gnokii tcp_opendevice: fcntl(F_SETFL)" msgstr "Gnokii tcp_opendevice: fcntl(F_SETFL)" #: ../common/devices/unixbluetooth.c:497 #, c-format msgid "Invalid bluetooth address \"%s\"\n" msgstr "NieprawidÅ‚owy adres bluetooth \"%s\"\n" #: ../common/devices/unixbluetooth.c:502 msgid "Can't create socket" msgstr "Nieudana próba stworzenia gniazda" #: ../common/devices/unixbluetooth.c:521 #, c-format msgid "" "Cannot find any appropriate rfcomm channel and none was specified in the " "config.\n" msgstr "" "Nie mogÄ™ znaleźć odpowiedniego kanaÅ‚u rfcomm ani żaden kanaÅ‚ nie zostaÅ‚ " "wyspecyfikowany w pliku konfiguracyjnym.\n" #: ../common/devices/unixbluetooth.c:530 msgid "Can't connect" msgstr "Nieudana próba połączenia" #: ../common/devices/unixirda.c:150 #, c-format msgid "Virtual IrCOMM device unsupported under Linux\n" msgstr "Wirtualne urzÄ…dzenie IrCOMM nie jest dostÄ™pne pod Linuksem.\n" #: ../common/devices/unixserial.c:117 #, c-format msgid "device_script(\"%s\"): fork() failure: %s!\n" msgstr "device_script(\"%s\"): nieudane wywoÅ‚anie fork(): %s!\n" #: ../common/devices/unixserial.c:124 #, c-format msgid "device_script(\"%s\"): file descriptor preparation failure: %s\n" msgstr "" "device_script(\"%s\"): nieudana próba przygotowania deskryptora pliku: %s\n" #: ../common/devices/unixserial.c:130 #, c-format msgid "device_script(\"%s\"): script execution failure: %s\n" msgstr "device_script(\"%s\"): nieudana próba wykonania skryptu: %s!\n" #: ../common/devices/unixserial.c:137 #, c-format msgid "" "device_script(\"%s\"): child script execution failure: %s, exit code=%d\n" msgstr "" "device_script(\"%s\"): nieudana próba wykonania skryptu: %s, kod powrotu=%d\n" #: ../common/devices/unixserial.c:138 msgid "normal exit" msgstr "normalne zakoÅ„czenie" #: ../common/devices/unixserial.c:138 msgid "abnormal exit" msgstr "nieprawidÅ‚owe zakoÅ„czenie" #: ../common/devices/unixserial.c:394 #, c-format msgid "Serial port speed %d not supported!\n" msgstr "PrÄ™dkość portu szeregowego %d nie jest obsÅ‚ugiwana!\n" #: ../common/devices/unixserial.c:434 #, c-format msgid "ERROR: Modem DCD is down and global/require_dcd parameter is set!\n" msgstr "" "BÅÄ„D: modem DCD nie dziaÅ‚a, a parametr global/require_dcd jest ustawiony!\n" #: ../common/devices/winbluetooth.c:70 ../common/devices/winirda.c:113 #, c-format msgid "Failed to initialize socket subsystem: need WINSOCK2. Please upgrade.\n" msgstr "" "Nieudana próba inicjalizacji podsystemu obsÅ‚ugi gniazd (wymagana biblioteka " "WINSOCK2).\n" #: ../common/gsm-common.c:148 msgid "Internal memory" msgstr "Pamięć wewnÄ™trzna" #: ../common/gsm-common.c:149 msgid "SIM card" msgstr "Karta SIM" #: ../common/gsm-common.c:150 msgid "Fixed dial numbers" msgstr "Zapisane numery do wybierania" #: ../common/gsm-common.c:151 msgid "Own numbers" msgstr "WÅ‚asne numery" #: ../common/gsm-common.c:152 msgid "Emergency numbers" msgstr "Numery alarmowe" #: ../common/gsm-common.c:153 msgid "Dialled numbers" msgstr "Wybierane numery" #: ../common/gsm-common.c:154 msgid "Received numbers" msgstr "Odebrane połączenia" #: ../common/gsm-common.c:155 msgid "Missed numbers" msgstr "Nieodebrane połączenia" #: ../common/gsm-common.c:156 msgid "Last dialled" msgstr "Ostatnio wybrane" #: ../common/gsm-common.c:157 msgid "Barred dialling numbers" msgstr "Zablokowane numery" #: ../common/gsm-common.c:158 msgid "Service dialling numbers" msgstr "Numery informacyjne operatora" #: ../common/gsm-common.c:159 msgid "Combined ME and SIM phonebook" msgstr "Połączona książka adresowa telefonu i karty SIM" #: ../common/gsm-common.c:160 msgid "Computer memory" msgstr "Pamięć komputera" #: ../common/gsm-common.c:161 msgid "Currently selected memory" msgstr "Wybrana pamięć" #: ../common/gsm-common.c:162 msgid "SMS Inbox" msgstr "Skrzynka odbiorcza SMS" #: ../common/gsm-common.c:163 msgid "SMS Outbox, sent items" msgstr "Skrzynka nadawcza SMS, elementy wysÅ‚ane" #: ../common/gsm-common.c:164 msgid "SMS Archive" msgstr "Archiwum SMS" #: ../common/gsm-common.c:165 msgid "SMS Templates" msgstr "Szablony SMS" #: ../common/gsm-common.c:166 msgid "SMS Status Reports" msgstr "Raporty statusu SMS" #: ../common/gsm-common.c:167 msgid "SMS Drafts" msgstr "Robocze kopie SMS" #: ../common/gsm-common.c:168 msgid "SMS Outbox, items to be sent" msgstr "Skrzynka nadawcza SMS, elementy do wysÅ‚ania" #: ../common/gsm-common.c:169 msgid "SMS Folder 1" msgstr "1 folder SMS" #: ../common/gsm-common.c:170 msgid "SMS Folder 2" msgstr "2 folder SMS" #: ../common/gsm-common.c:171 msgid "SMS Folder 3" msgstr "3 folder SMS" #: ../common/gsm-common.c:172 msgid "SMS Folder 4" msgstr "4 folder SMS" #: ../common/gsm-common.c:173 msgid "SMS Folder 5" msgstr "5 folder SMS" #: ../common/gsm-common.c:174 msgid "SMS Folder 6" msgstr "6 folder SMS" #: ../common/gsm-common.c:175 msgid "SMS Folder 7" msgstr "7 folder SMS" #: ../common/gsm-common.c:176 msgid "SMS Folder 8" msgstr "8 folder SMS" #: ../common/gsm-common.c:177 msgid "SMS Folder 9" msgstr "9 folder SMS" #: ../common/gsm-common.c:178 msgid "SMS Folder 10" msgstr "10 folder SMS" #: ../common/gsm-common.c:179 msgid "SMS Folder 11" msgstr "11 folder SMS" #: ../common/gsm-common.c:180 msgid "SMS Folder 12" msgstr "12 fodler SMS" #: ../common/gsm-common.c:181 msgid "SMS Folder 13" msgstr "13 folder SMS" #: ../common/gsm-common.c:182 msgid "SMS Folder 14" msgstr "14 folder SMS" #: ../common/gsm-common.c:183 msgid "SMS Folder 15" msgstr "15 folder SMS" #: ../common/gsm-common.c:184 msgid "SMS Folder 16" msgstr "16 folder SMS" #: ../common/gsm-common.c:185 msgid "SMS Folder 17" msgstr "17 folder SMS" #: ../common/gsm-common.c:186 msgid "SMS Folder 18" msgstr "18 folder SMS" #: ../common/gsm-common.c:187 msgid "SMS Folder 19" msgstr "19 folder SMS" #: ../common/gsm-common.c:188 msgid "SMS Folder 20" msgstr "20 folder SMS" #: ../common/gsm-common.c:189 msgid "Cell Broadcast" msgstr "Nadawanie komórkowe" #: ../common/gsm-common.c:190 ../common/gsm-common.c:211 #: ../common/gsm-common.c:222 ../common/gsm-common.c:235 #: ../common/gsm-common.c:290 ../common/gsm-common.c:343 #: ../common/gsm-common.c:356 ../common/gsm-common.c:380 #: ../common/gsm-common.c:381 ../common/gsm-common.c:398 #: ../common/gsm-common.c:409 ../common/gsm-common.c:424 #: ../common/gsm-common.c:437 ../common/gsm-common.c:451 #: ../common/gsm-common.c:464 ../common/gsm-common.c:474 #: ../common/gsm-common.c:485 ../common/gsm-common.c:494 #: ../common/gsm-common.c:505 ../common/gsm-common.c:514 #: ../common/gsm-common.c:524 ../common/gsm-common.c:533 #: ../common/gsm-common.c:542 ../common/gsm-common.c:556 #: ../common/gsm-common.c:565 ../common/gsm-common.c:574 #: ../common/gsm-common.c:587 ../common/gsm-common.c:598 #: ../common/gsm-common.c:610 ../common/gsm-common.c:624 #: ../common/gsm-common.c:635 ../common/gsm-common.c:647 #: ../common/gsm-sms.c:409 ../common/libfunctions.c:219 #: ../common/phones/atgen.c:2695 ../common/phones/atgen.c:2702 #: ../common/phones/atgen.c:3183 ../common/phones/nk6100.c:4087 #: ../gnokii/gnokii-ringtone.c:90 ../xgnokii/xgnokii_calendar.c:187 #: ../xgnokii/xgnokii_contacts.c:765 ../xgnokii/xgnokii_contacts.c:821 #: ../xgnokii/xgnokii_contacts.c:948 ../xgnokii/xgnokii_contacts.c:990 #: ../xgnokii/xgnokii_contacts.c:1206 ../xgnokii/xgnokii_contacts.c:1230 #, c-format msgid "Unknown" msgstr "Nieznany" #: ../common/gsm-common.c:197 ../common/gsm-common.c:234 #: ../common/gsm-common.c:355 msgid "None" msgstr "brak" #: ../common/gsm-common.c:198 msgid "Serial" msgstr "szeregowy" #: ../common/gsm-common.c:199 msgid "Serial DAU9P" msgstr "szeregowy DAU9P" #: ../common/gsm-common.c:200 msgid "Serial DLR3P" msgstr "szeregowy DLR3P" #: ../common/gsm-common.c:201 msgid "Infrared (old Nokias)" msgstr "podczerwieÅ„ (stare Nokie)" #: ../common/gsm-common.c:202 msgid "IrDA" msgstr "podczerwieÅ„" #: ../common/gsm-common.c:203 msgid "Bluetooth" msgstr "Bluetooth" #: ../common/gsm-common.c:204 msgid "Tekram Ir-Dongle" msgstr "Tekram Ir-Dongle" #: ../common/gsm-common.c:205 msgid "TCP" msgstr "TCP" #: ../common/gsm-common.c:206 msgid "M2BUS" msgstr "M2BUS" #: ../common/gsm-common.c:207 msgid "DKU2 (kernel support)" msgstr "DKU2 (z obsÅ‚ugÄ… w jÄ…drze)" #: ../common/gsm-common.c:208 msgid "DKU2 (libusb support)" msgstr "DKU2 (z obsÅ‚ugÄ… libusb)" #: ../common/gsm-common.c:209 msgid "Smart Card reader (libpcsclite support)" msgstr "czytnik Smart Card (z obsÅ‚ugÄ… libpcsclite)" #: ../common/gsm-common.c:210 msgid "Linux Phonet (kernel support)" msgstr "Linux Phonet (z obsÅ‚ugÄ… w jÄ…drze)" #: ../common/gsm-common.c:218 msgid "AC-DC" msgstr "z sieci" #: ../common/gsm-common.c:219 msgid "Battery" msgstr "bateria" #: ../common/gsm-common.c:220 msgid "No battery" msgstr "brak baterii" #: ../common/gsm-common.c:221 msgid "Power fault" msgstr "Awaria zasilania" #: ../common/gsm-common.c:229 msgid "Security code" msgstr "Kod zabezpieczajÄ…cy" #: ../common/gsm-common.c:230 msgid "PIN" msgstr "PIN" #: ../common/gsm-common.c:231 msgid "PIN2" msgstr "PIN2" #: ../common/gsm-common.c:232 msgid "PUK" msgstr "PUK" #: ../common/gsm-common.c:233 msgid "PUK2" msgstr "PUK2" #: ../common/gsm-common.c:244 ../common/gsm-common.c:245 #: ../common/gsm-common.c:250 msgid "General number" msgstr "Numer domyÅ›lny" #: ../common/gsm-common.c:246 msgid "Home number" msgstr "Numer domowy" #: ../common/gsm-common.c:247 msgid "Mobile number" msgstr "Numer komórkowy" #: ../common/gsm-common.c:248 msgid "Fax number" msgstr "Numer faksu" #: ../common/gsm-common.c:249 msgid "Work number" msgstr "Numer do pracy" #: ../common/gsm-common.c:251 ../common/gsm-common.c:340 msgid "Unknown number" msgstr "Nieznany numer" #: ../common/gsm-common.c:258 ../gnokii/gnokii-phonebook.c:187 #: ../gnokii/gnokii-wap.c:89 ../gnokii/gnokii-wap.c:220 #: ../xgnokii/xgnokii_contacts.c:749 ../xgnokii/xgnokii_contacts.c:815 #: ../xgnokii/xgnokii_contacts.c:946 ../xgnokii/xgnokii_contacts.c:988 #: ../xgnokii/xgnokii_contacts.c:1224 ../xgnokii/xgnokii_contacts.c:1729 #: ../xgnokii/xgnokii_contacts.c:2936 ../xgnokii/xgnokii_contacts.c:3120 #: ../xgnokii/xgnokii_speed.c:542 msgid "Name" msgstr "Nazwa" #: ../common/gsm-common.c:259 ../common/gsm-common.c:422 #: ../xgnokii/xgnokii.c:542 ../xgnokii/xgnokii.c:1433 #: ../xgnokii/xgnokii_contacts.c:743 ../xgnokii/xgnokii_contacts.c:812 #: ../xgnokii/xgnokii_contacts.c:945 ../xgnokii/xgnokii_contacts.c:987 #: ../xgnokii/xgnokii_contacts.c:1220 msgid "Email" msgstr "E-mail" #: ../common/gsm-common.c:260 ../common/gsm-common.c:277 msgid "Postal address" msgstr "Adres pocztowy" #: ../common/gsm-common.c:261 ../xgnokii/xgnokii_contacts.c:731 #: ../xgnokii/xgnokii_contacts.c:806 ../xgnokii/xgnokii_contacts.c:943 #: ../xgnokii/xgnokii_contacts.c:985 ../xgnokii/xgnokii_contacts.c:1026 #: ../xgnokii/xgnokii_contacts.c:1212 msgid "Note" msgstr "Notatka" #: ../common/gsm-common.c:262 ../gnokii/gnokii-dial.c:376 #: ../gnokii/gnokii-phonebook.c:203 ../gnokii/gnokii-wap.c:231 #: ../xgnokii/xgnokii_calendar.c:1540 ../xgnokii/xgnokii_contacts.c:1737 #: ../xgnokii/xgnokii_contacts.c:2936 ../xgnokii/xgnokii_contacts.c:3120 #: ../xgnokii/xgnokii_speed.c:542 msgid "Number" msgstr "Numer" #: ../common/gsm-common.c:263 ../common/gsm-common.c:272 #: ../common/gsm-common.c:367 ../xgnokii/xgnokii.c:1142 #: ../xgnokii/xgnokii_xring.c:845 msgid "Ringtone" msgstr "Dzwonek" #: ../common/gsm-common.c:264 msgid "Date" msgstr "Data" #: ../common/gsm-common.c:265 msgid "Pointer" msgstr "Wskaźnik" #: ../common/gsm-common.c:266 ../common/gsm-common.c:369 msgid "Logo" msgstr "Logo" #: ../common/gsm-common.c:267 msgid "Logo switch" msgstr "Logo" #: ../common/gsm-common.c:268 ../xgnokii/xgnokii_contacts.c:2936 #: ../xgnokii/xgnokii_contacts.c:3120 msgid "Group" msgstr "Grupa" #: ../common/gsm-common.c:269 ../gnokii/gnokii-wap.c:90 #: ../xgnokii/xgnokii_contacts.c:758 ../xgnokii/xgnokii_contacts.c:818 #: ../xgnokii/xgnokii_contacts.c:947 ../xgnokii/xgnokii_contacts.c:989 #: ../xgnokii/xgnokii_contacts.c:1227 msgid "URL" msgstr "URL" #: ../common/gsm-common.c:270 ../gnokii/gnokii-calendar.c:206 #: ../xgnokii/xgnokii_calendar.c:1541 msgid "Location" msgstr "Pozycja" #: ../common/gsm-common.c:271 msgid "Image" msgstr "Obrazek" #: ../common/gsm-common.c:273 msgid "User ID" msgstr "Identyfikator użytkownika" #: ../common/gsm-common.c:274 msgid "Push-To-Talk address" msgstr "Adres naciÅ›nij-i-mów" #: ../common/gsm-common.c:275 msgid "First name" msgstr "ImiÄ™" #: ../common/gsm-common.c:276 msgid "Last name" msgstr "Nazwisko" #: ../common/gsm-common.c:278 ../gnokii/gnokii-phonebook.c:212 msgid "Extended address" msgstr "Adres rozszerzony" #: ../common/gsm-common.c:279 ../gnokii/gnokii-phonebook.c:214 msgid "Street" msgstr "Ulica" #: ../common/gsm-common.c:280 ../gnokii/gnokii-phonebook.c:216 msgid "City" msgstr "Miasto" #: ../common/gsm-common.c:281 ../gnokii/gnokii-phonebook.c:218 msgid "State or province" msgstr "Stan lub prowincja" #: ../common/gsm-common.c:282 ../gnokii/gnokii-phonebook.c:220 msgid "Zip code" msgstr "Kod pocztowy" #: ../common/gsm-common.c:283 ../gnokii/gnokii-phonebook.c:222 msgid "Country" msgstr "Kraj" #: ../common/gsm-common.c:284 msgid "Formal name" msgstr "TytuÅ‚ naukowy/zawodowy" #: ../common/gsm-common.c:285 msgid "Job title" msgstr "Zawód" #: ../common/gsm-common.c:286 msgid "Company" msgstr "Firma" #: ../common/gsm-common.c:287 msgid "Nickname" msgstr "Pseudonim" #: ../common/gsm-common.c:288 ../common/gsm-common.c:448 #: ../xgnokii/xgnokii_calendar.c:181 ../xgnokii/xgnokii_calendar.c:288 msgid "Birthday" msgstr "Urodziny" #: ../common/gsm-common.c:289 msgid "Caller group id" msgstr "Identyfikator grupy dzwoniÄ…cych" #: ../common/gsm-common.c:350 ../common/nokia-decoding.c:349 #: ../common/phones/nk6100.c:1007 ../xgnokii/xgnokii.c:221 #: ../xgnokii/xgnokii.c:1027 msgid "Family" msgstr "Rodzina" #: ../common/gsm-common.c:351 msgid "VIPs" msgstr "VIP" #: ../common/gsm-common.c:352 ../common/nokia-decoding.c:355 #: ../common/phones/nk6100.c:1013 ../xgnokii/xgnokii.c:223 #: ../xgnokii/xgnokii.c:1051 msgid "Friends" msgstr "Przyjaciele" #: ../common/gsm-common.c:353 ../xgnokii/xgnokii_contacts.c:713 #: ../xgnokii/xgnokii_contacts.c:797 ../xgnokii/xgnokii_contacts.c:940 #: ../xgnokii/xgnokii_contacts.c:982 ../xgnokii/xgnokii_contacts.c:1194 msgid "Work" msgstr "Praca" #: ../common/gsm-common.c:354 msgid "Others" msgstr "Inni" #: ../common/gsm-common.c:365 ../common/gsm-common.c:416 #: ../xgnokii/xgnokii.c:529 ../xgnokii/xgnokii.c:558 ../xgnokii/xgnokii.c:1415 #: ../xgnokii/xgnokii_calendar.c:1539 msgid "Text" msgstr "Tekst" #: ../common/gsm-common.c:366 msgid "Linked" msgstr "Połączone" #: ../common/gsm-common.c:368 msgid "GSM Operator Logo" msgstr "Logo operatora" #: ../common/gsm-common.c:370 msgid "Multipart Message" msgstr "Wiadomość wieloczęściowa" #: ../common/gsm-common.c:371 msgid "WAP vCard" msgstr "wizytówka WAP" #: ../common/gsm-common.c:372 msgid "WAP vCalendar" msgstr "kalendarz WAP" #: ../common/gsm-common.c:373 msgid "WAP vCardSecure" msgstr "bezpieczna wizytówka WAP" #: ../common/gsm-common.c:374 msgid "WAP vCalendarSecure" msgstr "bezpieczny kalendarz WAP" #: ../common/gsm-common.c:375 msgid "Voice Message" msgstr "Wiadomość gÅ‚osowa" #: ../common/gsm-common.c:376 msgid "Fax Message" msgstr "Wiadomość faksowa" #: ../common/gsm-common.c:377 msgid "Email Message" msgstr "Wiadomość email" #: ../common/gsm-common.c:378 msgid "WAP Push" msgstr "WAP Push" #: ../common/gsm-common.c:379 msgid "Other Message" msgstr "Inna wiadomość" #: ../common/gsm-common.c:388 msgid "Inbox Message" msgstr "Wiadomość przychodzÄ…ca" #: ../common/gsm-common.c:389 msgid "Delivery Report" msgstr "Raport dorÄ™czenia" #: ../common/gsm-common.c:390 ../common/gsm-common.c:397 msgid "MO Message" msgstr "Wiadomość wychodzÄ…dza" #: ../common/gsm-common.c:391 msgid "Submit Report" msgstr "Raport wysÅ‚ania" #: ../common/gsm-common.c:392 msgid "Command" msgstr "Polecenie" #: ../common/gsm-common.c:393 msgid "Status Report" msgstr "Raport statusu" #: ../common/gsm-common.c:394 msgid "Picture Message" msgstr "Wiadomość graficzna" #: ../common/gsm-common.c:395 msgid "Template" msgstr "Szablon" #: ../common/gsm-common.c:396 msgid "Picture Message Template" msgstr "Szablon wiadomoÅ›ci graficznej" #: ../common/gsm-common.c:405 msgid "Read" msgstr "przeczytane" #: ../common/gsm-common.c:406 msgid "Unread" msgstr "nieprzeczytane" #: ../common/gsm-common.c:407 msgid "Sent" msgstr "wysÅ‚ane" #: ../common/gsm-common.c:408 msgid "Unsent" msgstr "niewysÅ‚ane" #: ../common/gsm-common.c:417 ../common/gsm-common.c:632 #: ../xgnokii/xgnokii.c:537 ../xgnokii/xgnokii.c:1421 #: ../xgnokii/xgnokii_contacts.c:719 ../xgnokii/xgnokii_contacts.c:800 #: ../xgnokii/xgnokii_contacts.c:941 ../xgnokii/xgnokii_contacts.c:983 #: ../xgnokii/xgnokii_contacts.c:1198 msgid "Fax" msgstr "Faks" #: ../common/gsm-common.c:418 msgid "VoiceMail" msgstr "Poczta gÅ‚osowa" #: ../common/gsm-common.c:419 ../xgnokii/xgnokii.c:546 msgid "ERMES" msgstr "ERMES" #: ../common/gsm-common.c:420 ../xgnokii/xgnokii.c:533 #: ../xgnokii/xgnokii.c:1427 msgid "Paging" msgstr "Pager" #: ../common/gsm-common.c:421 msgid "Email message in 8110i" msgstr "Wiadomość email w 8110i" #: ../common/gsm-common.c:423 ../xgnokii/xgnokii.c:550 msgid "X.400" msgstr "X.400" #: ../common/gsm-common.c:431 ../xgnokii/xgnokii.c:564 #: ../xgnokii/xgnokii.c:1461 msgid "1 hour" msgstr "1 godzina" #: ../common/gsm-common.c:432 ../xgnokii/xgnokii.c:568 #: ../xgnokii/xgnokii.c:1467 msgid "6 hours" msgstr "6 godzin" #: ../common/gsm-common.c:433 ../xgnokii/xgnokii.c:572 #: ../xgnokii/xgnokii.c:588 ../xgnokii/xgnokii.c:1473 msgid "24 hours" msgstr "24 godziny" #: ../common/gsm-common.c:434 ../xgnokii/xgnokii.c:576 #: ../xgnokii/xgnokii.c:1479 msgid "72 hours" msgstr "72 godziny" #: ../common/gsm-common.c:435 ../xgnokii/xgnokii.c:580 #: ../xgnokii/xgnokii.c:1485 msgid "1 week" msgstr "1 tydzieÅ„" #: ../common/gsm-common.c:436 msgid "Maximum time" msgstr "Czas maksymalny" #: ../common/gsm-common.c:446 ../common/phones/nk6100.c:2113 #: ../xgnokii/xgnokii_calendar.c:175 #, c-format msgid "Meeting" msgstr "Spotkanie" #: ../common/gsm-common.c:447 ../xgnokii/xgnokii_calendar.c:169 msgid "Call" msgstr "Rozmowa" #: ../common/gsm-common.c:449 ../xgnokii/xgnokii_calendar.c:163 msgid "Reminder" msgstr "Przypomnienie" #: ../common/gsm-common.c:450 ../xgnokii/xgnokii_calendar.c:157 msgid "Memo" msgstr "Adnotacja" #: ../common/gsm-common.c:458 ../xgnokii/xgnokii_calendar.c:831 msgid "Never" msgstr "nigdy" #: ../common/gsm-common.c:459 msgid "Daily" msgstr "codziennie" #: ../common/gsm-common.c:460 msgid "Weekly" msgstr "co tydzieÅ„" #: ../common/gsm-common.c:461 msgid "Every 2 weeks" msgstr "co dwa tygodnie" #: ../common/gsm-common.c:462 msgid "Monthly" msgstr "co miesiÄ…c" #: ../common/gsm-common.c:463 msgid "Yearly" msgstr "co rok" #: ../common/gsm-common.c:471 msgid "Low" msgstr "niski" #: ../common/gsm-common.c:472 msgid "Medium" msgstr "Å›redni" #: ../common/gsm-common.c:473 msgid "High" msgstr "wysoki" #: ../common/gsm-common.c:483 msgid "Temporary" msgstr "tymczasowa" #: ../common/gsm-common.c:484 msgid "Permanent" msgstr "staÅ‚a" #: ../common/gsm-common.c:492 msgid "Normal" msgstr "zwykÅ‚e" #: ../common/gsm-common.c:493 msgid "Secure" msgstr "bezpieczne" #: ../common/gsm-common.c:501 ../gnokii/gnokii-wap.c:225 msgid "GSM data" msgstr "Dane GSM" #: ../common/gsm-common.c:502 ../gnokii/gnokii-wap.c:234 msgid "GPRS" msgstr "GPRS" #: ../common/gsm-common.c:503 ../gnokii/gnokii-wap.c:242 #: ../xgnokii/xgnokii.c:1106 ../xgnokii/xgnokii.c:1848 msgid "SMS" msgstr "SMS" #: ../common/gsm-common.c:504 msgid "USSD" msgstr "USSD" #: ../common/gsm-common.c:512 msgid "Analogue" msgstr "analogowe" #: ../common/gsm-common.c:513 msgid "ISDN" msgstr "ISDN" #: ../common/gsm-common.c:521 ../common/gsm-common.c:532 #: ../gnokii/gnokii-profile.c:185 msgid "Automatic" msgstr "automatyczne" #: ../common/gsm-common.c:522 msgid "9600" msgstr "9600" #: ../common/gsm-common.c:523 msgid "14400" msgstr "14400" #: ../common/gsm-common.c:531 msgid "Manual" msgstr "rÄ™czne" #: ../common/gsm-common.c:540 msgid "Always" msgstr "ciÄ…gÅ‚e" #: ../common/gsm-common.c:541 msgid "When needed" msgstr "kiedy potrzebne" #: ../common/gsm-common.c:551 msgid "No tone" msgstr "Bez dźwiÄ™ku" #: ../common/gsm-common.c:552 msgid "Standard" msgstr "Standardowy" #: ../common/gsm-common.c:553 msgid "Special" msgstr "Specjalny" #: ../common/gsm-common.c:554 ../common/gsm-common.c:582 msgid "Beep once" msgstr "Jeden sygnaÅ‚" #: ../common/gsm-common.c:555 ../common/gsm-common.c:585 msgid "Ascending" msgstr "RosnÄ…cy" #: ../common/gsm-common.c:563 ../common/gsm-common.c:572 #: ../common/gsm-common.c:583 ../common/gsm-common.c:594 #: ../gnokii/gnokii-profile.c:192 msgid "Off" msgstr "wyłączone" #: ../common/gsm-common.c:564 ../common/gsm-common.c:573 #: ../gnokii/gnokii-profile.c:185 ../gnokii/gnokii-profile.c:192 msgid "On" msgstr "włączone" #: ../common/gsm-common.c:581 msgid "Ringing" msgstr "CiÄ…gÅ‚y" #: ../common/gsm-common.c:584 msgid "Ring once" msgstr "Jeden dzwonek" #: ../common/gsm-common.c:586 msgid "Caller groups" msgstr "Grupa dzwoniÄ…cych:" #: ../common/gsm-common.c:595 ../common/gsm-common.c:605 msgid "Level 1" msgstr "Poziom 1" #: ../common/gsm-common.c:596 ../common/gsm-common.c:606 msgid "Level 2" msgstr "Poziom 2" #: ../common/gsm-common.c:597 ../common/gsm-common.c:607 msgid "Level 3" msgstr "Poziom 3" #: ../common/gsm-common.c:608 msgid "Level 4" msgstr "Poziom 4" #: ../common/gsm-common.c:609 msgid "Level 5" msgstr "Poziom 5" #: ../common/gsm-common.c:619 msgid "Busy" msgstr "zajÄ™ty" #: ../common/gsm-common.c:620 msgid "No answer" msgstr "nie odpowiada" #: ../common/gsm-common.c:621 msgid "Out of reach" msgstr "poza zasiÄ™giem" #: ../common/gsm-common.c:622 msgid "Not available" msgstr "niedostÄ™pny" #: ../common/gsm-common.c:623 ../common/gsm-common.c:634 msgid "All" msgstr "wszystkie" #: ../common/gsm-common.c:631 ../xgnokii/xgnokii.c:554 msgid "Voice" msgstr "GÅ‚osowa" #: ../common/gsm-common.c:633 msgid "Data" msgstr "Dane" #: ../common/gsm-common.c:642 ../xgnokii/xgnokii_data.c:124 msgid "Disable" msgstr "Wyłącz" #: ../common/gsm-common.c:643 ../xgnokii/xgnokii_data.c:120 msgid "Enable" msgstr "Włącz" #: ../common/gsm-common.c:644 msgid "Query" msgstr "Zapytanie" #: ../common/gsm-common.c:645 msgid "Register" msgstr "Rejestracja" #: ../common/gsm-common.c:646 msgid "Erasure" msgstr "UsuniÄ™cie" #: ../common/gsm-error.c:42 msgid "No error." msgstr "Brak błędu." #: ../common/gsm-error.c:43 msgid "Command failed." msgstr "Wykonanie polecenia nieudane." #: ../common/gsm-error.c:44 msgid "Model specified isn't known/supported." msgstr "Podany model telefonu nie jest obsÅ‚ugiwany." #: ../common/gsm-error.c:45 msgid "Invalid Security code." msgstr "NieprawidÅ‚owy kod zabezpieczajÄ…cy." #: ../common/gsm-error.c:46 msgid "Problem occurred internal to model specific code." msgstr "Problem wewnÄ™trzny w sterowniku telefonu." #: ../common/gsm-error.c:47 msgid "Command called isn't implemented in model." msgstr "WywoÅ‚ane polecenie nie jest zaimplementowane w sterowniku telefonu." #: ../common/gsm-error.c:48 msgid "" "Function or connection type not supported by the phone or by the phone " "driver." msgstr "Sterownik telefonu lub telefon nie obsÅ‚uguje tego typu połączenia." #: ../common/gsm-error.c:49 msgid "User aborted the action." msgstr "Użytkownik przerwaÅ‚ wykonanie akcji." #: ../common/gsm-error.c:50 msgid "Unknown error - well better than nothing!!" msgstr "Nieznany błąd - lepszy rydz niż nic!!" #: ../common/gsm-error.c:51 msgid "The specified memory is full." msgstr "Pamięć jest peÅ‚na." #: ../common/gsm-error.c:52 msgid "Couldn't establish link with phone." msgstr "Nieudane nawiÄ…zanie połączenia z telefonem." #: ../common/gsm-error.c:53 msgid "Command timed out." msgstr "Przekroczony czas oczekiwania." #: ../common/gsm-error.c:54 msgid "Try again." msgstr "Spróbuj ponownie." #: ../common/gsm-error.c:55 msgid "Waiting for the next part of the message." msgstr "Oczekiwanie na nastÄ™pnÄ… część komunikatu." #: ../common/gsm-error.c:56 msgid "Device not ready." msgstr "UrzÄ…dzenie nie jest gotowe." #: ../common/gsm-error.c:57 msgid "Command is still being executed." msgstr "Polecenie jest nadal wykonywane." #: ../common/gsm-error.c:58 msgid "The given memory location is invalid." msgstr "Podane miejsce w pamiÄ™ci jest nieprawidÅ‚owe." #: ../common/gsm-error.c:59 msgid "Invalid type of memory." msgstr "NieprawidÅ‚owy typ pamiÄ™ci." #: ../common/gsm-error.c:60 msgid "The given location is empty." msgstr "Podane miejsce w pamiÄ™ci jest puste." #: ../common/gsm-error.c:61 msgid "The given entry is too long." msgstr "Podany wpis jest zbyt dÅ‚ugi." #: ../common/gsm-error.c:62 msgid "Data format is not valid." msgstr "Format danych wejÅ›ciowych jest niepoprawny." #: ../common/gsm-error.c:63 msgid "Wrong size of the object." msgstr "NieprawidÅ‚owy rozmiar obiektu." #: ../common/gsm-error.c:64 msgid "Outgoing call requested reported line busy." msgstr "Próba wykonania połączenia wykryÅ‚a zajÄ™tość linii." #: ../common/gsm-error.c:65 msgid "No Carrier error during data call setup?" msgstr "Próba wykonania połączenia transmisji danych zwróciÅ‚a błąd." #: ../common/gsm-error.c:66 msgid "The current frame isn't handled by the incoming function." msgstr "Otrzymana ramka nie jest obsÅ‚ugiwana." #: ../common/gsm-error.c:67 msgid "Unsolicited message received." msgstr "Otrzymano nieoczekiwany komunikat." #: ../common/gsm-error.c:68 msgid "Attempt to read CB when no new CB received." msgstr "Próba odczytania CB, podczas gdy nie otrzymano CB." #: ../common/gsm-error.c:69 msgid "SIM card missing or damaged." msgstr "Brak karty SIM lub karta SIM uszkodzona." #: ../common/gsm-error.c:70 msgid "PIN or PUK code required." msgstr "Wymagany kod PIN lub PUK." #: ../common/gsm-error.c:71 msgid "The requested information is not available." msgstr "Wymagana informacja nie jest dostÄ™pna." #: ../common/gsm-error.c:72 msgid "Config file cannot be read." msgstr "Nie można otworzyć pliku konfiguracyjnego." #: ../common/gsm-error.c:73 msgid "Either global or given phone section cannot be found." msgstr "Brak sekcji ogólnej lub sekcji telefonu w pliku konfiguracyjnym." #: ../common/gsm-error.c:74 msgid "Incorrect logging section configuration." msgstr "NieprawidÅ‚owa konfiguracja sekcji logowania." #: ../common/gsm-error.c:75 msgid "No phone model specified in the config file." msgstr "W pliku konfiguracyjnym nie zostaÅ‚ podany model telefonu." #: ../common/gsm-error.c:76 msgid "No port specified in the config file." msgstr "W pliku konfiguracyjnym nie zostaÅ‚ podany port." #: ../common/gsm-error.c:77 msgid "No connection type specified in the config file." msgstr "W pliku konfiguracyjnym nie zostaÅ‚ podany typ połączenia." #: ../common/gsm-error.c:78 msgid "Device is locked and cannot be unlocked." msgstr "UrzÄ…dzenie jest zablokowane." #: ../common/gsm-error.c:79 msgid "The actual response will be sent asynchronously." msgstr "WÅ‚aÅ›ciwa odpowiedź zostanie przesÅ‚ana asynchronicznie." #: ../common/gsm-error.c:80 msgid "Unknown error." msgstr "Nieznany błąd." #: ../common/gsm-filetypes.c:599 #, c-format msgid "Sorry, gnokii was not compiled with XPM support.\n" msgstr "gnokii jest skompilowane bez obsÅ‚ugi XPM.\n" #: ../common/gsm-filetypes.c:642 #, c-format msgid "Bitmap too large\n" msgstr "Zbyt duża bitmapa\n" #: ../common/gsm-filetypes.c:1519 #, c-format msgid "Formatting error: too many subentries\n" msgstr "NieprawidÅ‚owy format danych: za dużo podpozycji\n" #: ../common/gsm-filetypes.c:1528 #, c-format msgid "Formatting error: unknown error while reading subentry type\n" msgstr "" "NieprawidÅ‚owy format danych: nieznany błąd przy odczytywaniu typu pola.\n" #: ../common/gsm-filetypes.c:1532 #, c-format msgid "Formatting error: empty entry type\n" msgstr "NieprawidÅ‚owy format danych: pusty typ danych.\n" #: ../common/gsm-filetypes.c:1542 #, c-format msgid "Formatting error: subentry has only entry type field\n" msgstr "NieprawidÅ‚owy format danych: pole nie ma okreÅ›lonego typu.\n" #: ../common/gsm-filetypes.c:1551 #, c-format msgid "Formatting error: unknown error while reading subentry number type\n" msgstr "" "NierawidÅ‚owy format danych: nieznany błąd przy odczytywaniu typu numeru.\n" #: ../common/gsm-filetypes.c:1555 #, c-format msgid "Formatting error: empty number type\n" msgstr "NieprawidÅ‚owy format danych: pusty typ numeru.\n" #: ../common/gsm-filetypes.c:1570 ../common/gsm-filetypes.c:1593 #, c-format msgid "Formatting error: subentry has only entry and number type fields\n" msgstr "NieprawidÅ‚owy format danych: pole nie ma okreÅ›lonego typu.\n" #: ../common/gsm-filetypes.c:1579 #, c-format msgid "Formatting error: unknown error while reading subentry id\n" msgstr "" "NieprawidÅ‚owy format danych: nieznany błąd przy odczycie identyfikatora " "pola.\n" #: ../common/gsm-filetypes.c:1583 #, c-format msgid "Formatting error: empty id\n" msgstr "NieprawidÅ‚owy format danych: pusty identyfikator.\n" #: ../common/gsm-filetypes.c:1617 #, c-format msgid "Formatting error: unknown error while reading subentry contents\n" msgstr "NieprawidÅ‚owy format danych: nieznany błąd przy odczycie pola.\n" #: ../common/gsm-filetypes.c:1621 #, c-format msgid "Formatting error: empty subentry contents\n" msgstr "NieprawidÅ‚owy format danych: puste pole wpisu\n" #. for now be compacrapatible ;) #: ../common/gsm-networks.c:1294 ../common/gsm-networks.c:1341 #: ../gnokii/gnokii-logo.c:254 ../gnokii/gnokii-logo.c:266 #: ../gnokii/gnokii-logo.c:281 ../gnokii/gnokii-logo.c:362 #: ../smsd/lowlevel.c:141 ../smsd/lowlevel.c:142 ../smsd/lowlevel.c:143 #: ../xgnokii/xgnokii_lowlevel.c:220 ../xgnokii/xgnokii_lowlevel.c:221 #: ../xgnokii/xgnokii_lowlevel.c:222 ../xgnokii/xgnokii_lowlevel.c:223 #: ../xgnokii/xgnokii_sms.c:262 ../xgnokii/xgnokii_sms.c:342 msgid "unknown" msgstr "nieznany" #: ../common/gsm-networks.c:1304 ../common/gsm-networks.c:1318 #: ../common/gsm-networks.c:1355 ../gnokii/gnokii-monitor.c:256 #: ../gnokii/gnokii-other.c:205 msgid "undefined" msgstr "nieokreÅ›lone" #: ../common/gsm-sms.c:299 msgid "Delivered" msgstr "DorÄ™czono" #: ../common/gsm-sms.c:312 msgid "Failed" msgstr "Nieudane" #: ../common/gsm-sms.c:381 msgid "Pending" msgstr "Oczekuje" #: ../common/gsm-statemachine.c:390 msgid "" "UNHANDLED FRAME RECEIVED\n" "request: " msgstr "" "OTRZYMANO NIEOBSÅUGIWANY KOMUNIKAT\n" "żądanie: " #: ../common/gsm-statemachine.c:393 msgid "reply: " msgstr "odpowiedź: " #: ../common/gsm-statemachine.c:396 ../common/phones/nokia.c:679 msgid "Please read Docs/Bugs and send a bug report!\n" msgstr "Przeczytaj Docs/Bugs i wyÅ›lij raport z bÅ‚edem!\n" #: ../common/libfunctions.c:183 ../gnokiid/gnokiid.c:164 #, c-format msgid "Lock file error. Exiting.\n" msgstr "Błąd obsÅ‚ugi pliku blokady. Koniec.\n" #: ../common/libfunctions.c:191 #, c-format msgid "" "Telephone interface init failed: %s\n" "Quitting.\n" msgstr "" "Nieudana inicjalizacja interfejsu telefonu: %s\n" "Koniec pracy.\n" #: ../common/links/atbus.c:69 msgid "gnokii I/O error" msgstr "Błąd we/wy." #: ../common/links/atbus.c:85 msgid "Couldn't open ATBUS device" msgstr "Nieudane otwarcie urzÄ…dzenia ATBUS" #: ../common/links/cbus.c:284 msgid "Couldn't open CBUS device" msgstr "Nieudane otwarcie urzÄ…dzenia CBUS" #: ../common/links/fbus-3110.c:77 ../common/links/fbus.c:85 #: ../common/links/fbus.c:141 ../common/links/fbus.c:184 msgid "Couldn't open FBUS device" msgstr "Nieudane otwarcie urzÄ…dzenia FBUS" #: ../common/links/fbus-3110.c:258 #, c-format msgid "fb3110_tx_frame_send - message too long!\n" msgstr "fb3110_tx_frame_send - komunikat zbyt dÅ‚ugi!\n" #: ../common/links/fbus-phonet.c:107 msgid "Couldn't open PHONET device" msgstr "Nieudane otwarcie urzÄ…dzenia PHONET" #: ../common/links/gnbus.c:305 msgid "Couldn't open GNBUS device" msgstr "Nieudane otwarcie urzÄ…dzenia GNBUS" #: ../common/links/m2bus.c:78 msgid "Couldn't open M2BUS device" msgstr "Nieudane otwarcie urzÄ…dzenia M2BUS" #: ../common/misc.c:466 #, c-format msgid "Cannot lock NULL device. Set port config parameter correctly.\n" msgstr "" "Nie mogÄ™ zablokować pustego urzÄ…dzenia. Ustaw odpowiednio parametr port w " "pliku konfiguracyjnym.\n" #: ../common/misc.c:481 #, c-format msgid "Out of memory error while locking device.\n" msgstr "Podczas blokowania urzÄ…dzenia zabrakÅ‚o pamiÄ™ci.\n" #: ../common/misc.c:510 #, c-format msgid "Lockfile %s is stale. Overriding it...\n" msgstr "Plik blokowania %s jest nieaktualny. NadpisujÄ™ go.\n" #: ../common/misc.c:513 #, c-format msgid "Overriding file %s failed, please check the permissions.\n" msgstr "Nadpisywanie pliku blokady %s nieudane, sprawdź prawa dostÄ™pu.\n" #: ../common/misc.c:514 ../common/misc.c:529 #, c-format msgid "Cannot lock device.\n" msgstr "Zablokowanie urzÄ…dzenia niemożliwe.\n" #: ../common/misc.c:518 #, c-format msgid "Device already locked with %s.\n" msgstr "UrzÄ…dzenie jest już zablokowane plikiem blokady %s.\n" #: ../common/misc.c:527 #, c-format msgid "Unable to read lockfile %s.\n" msgstr "Nieudany odczyt pliku blokowania %s.\n" #: ../common/misc.c:528 #, c-format msgid "Please check for reason and remove the lockfile by hand.\n" msgstr "Sprawdź przyczynÄ™ i rÄ™cznie usuÅ„ plik blokowania.\n" #: ../common/misc.c:538 #, c-format msgid "Device seems to be locked by unknown process.\n" msgstr "UrzÄ…dzenie wyglÄ…da na zablokowane przez nieznany proces.\n" #: ../common/misc.c:540 #, c-format msgid "Please check permission on lock directory.\n" msgstr "Sprawdź prawa dostÄ™pu na katalogu z blokadami.\n" #: ../common/misc.c:542 #, c-format msgid "Cannot create lockfile %s. Please check for existence of the path.\n" msgstr "" "Nie można utworzyć pliku blokowania %s. Sprawdź czy istnieje Å›cieżka dostÄ™pu " "do pliku.\n" #: ../common/misc.c:547 #, c-format msgid "Failed to write to the lockfile %s.\n" msgstr "Nieudana próba stworzenia pliku blokady %s.\n" #: ../common/misc.c:572 #, c-format msgid "Cannot unlock device: %s\n" msgstr "Nie można odblokować urzÄ…dzenia: %s\n" #: ../common/nokia-decoding.c:352 ../common/phones/nk6100.c:1010 #: ../xgnokii/xgnokii.c:222 ../xgnokii/xgnokii.c:1039 msgid "VIP" msgstr "VIP" #: ../common/nokia-decoding.c:358 ../common/phones/nk6100.c:1016 #: ../xgnokii/xgnokii.c:224 ../xgnokii/xgnokii.c:1063 msgid "Colleagues" msgstr "Znajomi" #: ../common/nokia-decoding.c:361 ../common/phones/nk6100.c:1019 #: ../xgnokii/xgnokii.c:225 ../xgnokii/xgnokii.c:1075 msgid "Other" msgstr "Inni" #. Set a default SMSC name because +CSCA doesn't provide one #. Set a default name #: ../common/phones/atgen.c:2075 ../common/phones/nk6100.c:1552 #: ../common/phones/nk6510.c:1951 ../common/phones/nk7110.c:1479 #: ../common/phones/pcsc.c:692 ../xgnokii/xgnokii.c:521 #: ../xgnokii/xgnokii_sms.c:832 #, c-format msgid "Set %d" msgstr "Zestaw %d" #: ../common/phones/atgen.c:2692 #, c-format msgid "Withheld" msgstr "Ukryty" #: ../common/phones/fake.c:95 #, c-format msgid "" "Apparently you didn't configure gnokii. Please do it prior to using it.\n" "You can get some clues from comments included in sample config file or give\n" "a try with gnokii-configure utility included in gnokii distribution.\n" msgstr "" "WyglÄ…da na to, że gnokii nie jest skonfigurowane. Przed użyciem należy\n" "przygotować wÅ‚aÅ›ciwÄ… konfiguracjÄ™. Wskazówki, jak to zrobić, sÄ… umieszczone\n" "w przykÅ‚adowym pliku konfiguracyjnym. Można również wykorzystać program\n" "gnokii-configure, który jest rozpowszechniany razem z gnokii.\n" #: ../common/phones/nk6100.c:2092 #, c-format msgid "Personal" msgstr "Osobiste" #: ../common/phones/nk6100.c:2095 ../common/phones/nk6100.c:2122 #, c-format msgid "Car" msgstr "Samochód" #: ../common/phones/nk6100.c:2098 ../common/phones/nk6100.c:2125 #, c-format msgid "Headset" msgstr "SÅ‚uchawka" #: ../common/phones/nk6100.c:2101 ../common/phones/nk6100.c:2128 #, c-format msgid "Unknown (%d)" msgstr "Nieznany (%d)" #: ../common/phones/nk6100.c:2107 ../xgnokii/xgnokii_contacts.c:701 #: ../xgnokii/xgnokii_contacts.c:791 ../xgnokii/xgnokii_contacts.c:938 #: ../xgnokii/xgnokii_contacts.c:980 ../xgnokii/xgnokii_contacts.c:1021 #: ../xgnokii/xgnokii_contacts.c:1094 ../xgnokii/xgnokii_contacts.c:1186 #, c-format msgid "General" msgstr "Ogólne" #: ../common/phones/nk6100.c:2110 #, c-format msgid "Silent" msgstr "Milczy" #: ../common/phones/nk6100.c:2116 #, c-format msgid "Outdoor" msgstr "Na zewnÄ…trz" #: ../common/phones/nk6100.c:2119 #, c-format msgid "Pager" msgstr "Pager" #: ../common/phones/nk6510.c:1811 #, c-format msgid "" "6510 series phones seem to be quite sensitive to malformed SMS messages\n" "It may have to be sent to Nokia Service if something fails!\n" "Do you really want to continue? " msgstr "" "Telefony serii 6510 sÄ… wrażliwe na nieprawidÅ‚owo zbudowane SMS-y. Jeżeli\n" "coÅ› siÄ™ nie uda, możesz zostać odesÅ‚any do serwisu Nokii!\n" "Czy chcesz kontynuować? " #: ../common/phones/nk6510.c:1814 #, c-format msgid "(yes/no) " msgstr "(tak/nie) " #: ../common/phones/nk6510.c:1816 ../gnokii/gnokii-phonebook.c:421 #: ../gnokii/gnokii-sms.c:542 ../gnokii/gnokii-sms.c:833 #: ../gnokii/gnokii-utils.c:63 ../gnokii/gnokii-wap.c:223 msgid "yes" msgstr "tak" #: ../common/phones/nk6510.c:2361 ../common/phones/nk6510.c:2426 #, c-format msgid "Progress: %3d%% completed" msgstr "PostÄ™p: %3d%% ukoÅ„czone" #: ../common/phones/nokia.c:338 msgid "Tried to activate CONTACT SERVICE\n" msgstr "To byÅ‚a próba włączenia CONTACT SERVICE\n" #: ../common/phones/nokia.c:667 msgid "" "NOKIA RAW RINGTONE DECODING FAILED\n" "ringtone:\n" msgstr "" "Nieudane dekodowanie dzwonka Nokia\n" "dzwonek:\n" #: ../common/phones/nokia.c:678 #, c-format msgid "offset: %04x\n" msgstr "przesuniÄ™cie: %04x\n" #: ../common/phones/pcsc.c:593 #, c-format msgid "Phase %s SIM" msgstr "Logowanie SIM %s" #: ../common/vcal.lx:161 #, c-format msgid "Error: Invalid calendar note number!\n" msgstr "Błąd: nieprawidÅ‚owy numer pozycji kalendarza!\n" #. translators: %s are replaced by function names #: ../common/vcal.lx:282 ../common/vcal.lx:344 #, c-format msgid "Function %s() is deprecated. Use %s() instead.\n" msgstr "Funkcja %s() jest przestarzaÅ‚a. Zamiast niej użyj %s().\n" #: ../common/vcal.lx:285 ../common/vcal.lx:347 ../gnokii/gnokii-calendar.c:256 #: ../gnokii/gnokii-file.c:437 ../gnokii/gnokii-todo.c:162 ../smsd/file.c:185 #: ../xgnokii/xgnokii_contacts.c:2700 ../xgnokii/xgnokii_dtmf.c:93 #: ../xgnokii/xgnokii_logos.c:1372 ../xgnokii/xgnokii_speed.c:324 #, c-format msgid "Can't open file %s for reading!\n" msgstr "Nie można otworzyć pliku %s do odczytu!\n" #: ../common/vcal.lx:294 ../common/vcal.lx:356 #, c-format msgid "Error parsing vCalendar file!\n" msgstr "Błąd analizy pliku vCalendar!\n" #: ../getopt/getopt.c:566 ../getopt/getopt.c:582 #, c-format msgid "%s: option '%s' is ambiguous\n" msgstr "%s: opcja '%s' jest niejednoznaczna\n" #: ../getopt/getopt.c:615 ../getopt/getopt.c:619 #, c-format msgid "%s: option '--%s' doesn't allow an argument\n" msgstr "%s: opcja '--%s' nie przyjmuje argumentów\n" #: ../getopt/getopt.c:628 ../getopt/getopt.c:633 #, c-format msgid "%s: option '%c%s' doesn't allow an argument\n" msgstr "%s: opcja '%c%s' nie przyjmuje argumentów\n" #: ../getopt/getopt.c:676 ../getopt/getopt.c:695 ../getopt/getopt.c:998 #: ../getopt/getopt.c:1017 #, c-format msgid "%s: option '%s' requires an argument\n" msgstr "%s: opcja '%s' wymaga argumentów\n" #: ../getopt/getopt.c:733 ../getopt/getopt.c:736 #, c-format msgid "%s: unrecognized option '--%s'\n" msgstr "%s: nierozpoznana opcja '--%s'\n" #: ../getopt/getopt.c:744 ../getopt/getopt.c:747 #, c-format msgid "%s: unrecognized option '%c%s'\n" msgstr "%s: nierozpoznana opcja '%c%s'\n" #: ../getopt/getopt.c:796 ../getopt/getopt.c:799 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s: nieprawidÅ‚owa opcja -- '%c'\n" #: ../getopt/getopt.c:849 ../getopt/getopt.c:866 ../getopt/getopt.c:1069 #: ../getopt/getopt.c:1087 #, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: opcja wymaga argumentu -- '%c'\n" #: ../getopt/getopt.c:919 ../getopt/getopt.c:935 #, c-format msgid "%s: option '-W %s' is ambiguous\n" msgstr "%s: opcja '-W %s' jest niejednoznaczna\n" #: ../getopt/getopt.c:959 ../getopt/getopt.c:977 #, c-format msgid "%s: option '-W %s' doesn't allow an argument\n" msgstr "%s: opcja '-W %s' nie przyjmuje argumentów\n" #: ../gnokiid/gnokiid.c:65 #, c-format msgid "GNOKIID Version %s\n" msgstr "GNOKIID wersja %s\n" #: ../gnokiid/gnokiid.c:70 #, c-format msgid "" "Copyright (C) Hugh Blemings , 1999\n" "Copyright (C) Pavel Janik ml. , 1999\n" "Built %s %s\n" msgstr "" "Copyright (C) Hugh Blemings , 1999\n" "Copyright (C) Pavel Janik ml. , 1999\n" "Budowane %s %s\n" #: ../gnokiid/gnokiid.c:81 #, c-format msgid "" " usage: gnokiid [--help|--version|--debug]\n" " --help display usage information\n" " --version displays version and copyright information\n" " --debug uses stdin/stdout for virtual modem comms\n" msgstr "" " użycie: gnokiid [--help|--version|--debug]\n" " --help wyÅ›wietla pomoc o używaniu\n" " --version wyÅ›wietla wersjÄ™ i informacjÄ™ o prawach " "autorskich\n" " --debug używa stdin/stdout jako wirtualne polecenia " "modemu\n" #: ../gnokiid/gnokiid.c:149 #, c-format msgid "" "gnokiid purpose is to work only with the phones that do not have AT Hayes\n" "commands interpreter.\n" msgstr "" "gnokiid jest przeznaczone jedynie dla telefonów nieposiadajÄ…cych " "interpretera poleceÅ„ Hayes AT.\n" #: ../gnokii/gnokii.c:203 #, c-format msgid "GNOKII Version %s\n" msgstr "GNOKII wersja %s\n" #: ../gnokii/gnokii.c:210 #, c-format msgid "" "Copyright (C) Hugh Blemings , 1999, 2000\n" "Copyright (C) Pavel Janik ml. , 1999, 2000\n" "Copyright (C) Pavel Machek , 2001\n" "Copyright (C) Pawel Kot , 2001-2011\n" "Copyright (C) BORBELY Zoltan , 2002\n" "Copyright (C) Daniele Forsi , 2004-2011\n" "gnokii is free software, covered by the GNU General Public License, and you " "are\n" "welcome to change it and/or distribute copies of it under certain " "conditions.\n" "There is absolutely no warranty for gnokii. See GPL for details.\n" "Built %s %s\n" msgstr "" "Copyright (C) Hugh Blemings , 1999, 2000\n" "Copyright (C) Pavel Janik ml. , 1999, 2000\n" "Copyright (C) Pavel Machek , 2001\n" "Copyright (C) Pawel Kot , 2001-2011\n" "Copyright (C) BORBELY Zoltan , 2002\n" "Copyright (C) Daniele Forsi , 2004-2011\n" "gnokii jest Wolnym Oprogramowaniem na licecnji GNU General Public License.\n" "Masz prawo je modyfikować i/lub rozpowszechniać pod kilkoma warunkami.\n" "Nie udziela siÄ™ żadnej gwarancji na gnokii. Szczegóły znajdziesz w tekÅ›cie " "GPL.\n" "Zbudowano %s %s\n" #: ../gnokii/gnokii.c:238 #, c-format msgid "" "Usage:\n" "\tgnokii [CONFIG OPTIONS] OPTIONS\n" "\n" "CONFIG OPTIONS\n" "\t\t--config filename\n" "\t\t--phone phone_section\n" "\n" "OPTIONS\n" "Use just one option at a time.\n" "General options:\n" " --help [all] [monitor] [sms] [mms] [phonebook] [calendar] [todo]\n" " [dial] [profile] [settings] [wap] [logo] [ringtone]\n" " [security] [file] [other]\n" " --version\n" " --shell\n" msgstr "" "Sposób użycia:\n" "\tgnokii [OPCJE KONFIGURACYJNE] OPCJE\n" "\n" "OPCJE KONFIGURACYJNE\n" "\t\t--config plik\n" "\t\t--phone sekcja_telefonu\n" "\n" "OPCJE\n" "Można użyć tylko jednej opcji w wywoÅ‚aniu.\n" "Opcje ogólne:\n" " --help [all] [monitor] [sms] [mms] [phonebook] [calendar] [todo]\n" " [dial] [profile] [settings] [wap] [logo] [ringtone]\n" " [security] [file] [other]\n" " --version\n" " --shell\n" #: ../gnokii/gnokii.c:359 #, c-format msgid "Cannot open logfile %s\n" msgstr "Nieudane otwarcie pliku logowania %s\n" #: ../gnokii/gnokii.c:392 #, c-format msgid "File: %s\n" msgstr "Plik: %s\n" #: ../gnokii/gnokii.c:394 #, c-format msgid "Phone section: [phone_%s]\n" msgstr "Sekcja telefonu: [phone_%s]\n" #: ../gnokii/gnokii.c:403 #, c-format msgid "WARNING: cannot open logfile, logs will be directed to stderr\n" msgstr "" "Uwaga: nie można otworzyć pliku logowania, wpisy zostanÄ… przekierowane na " "stderr\n" #: ../gnokii/gnokii.c:819 #, c-format msgid "Use '%s --help' for usage information.\n" msgstr "Aby obejrzeć pomoc, użyj '%s --help'.\n" #: ../gnokii/gnokii.c:821 #, c-format msgid "Use '--help' for usage information.\n" msgstr "Aby obejrzeć pomoc, użyj '%s --help'.\n" #: ../gnokii/gnokii.c:1142 #, c-format msgid "Unknown option: %d\n" msgstr "Nieznana opcja: %d\n" #: ../gnokii/gnokii.c:1206 #, c-format msgid "" "gnokii needs to be compiled with readline support to enable this option.\n" msgstr "Do użycia tej opcji musisz skompilować gnokii z obsÅ‚ugÄ… readline.\n" #: ../gnokii/gnokii-calendar.c:56 #, c-format msgid "" "Calendar options:\n" " --getcalendarnote start_number [end_number|end] [-v|--vCal]\n" " --writecalendarnote vcalendarfile start_number [end_number|end]\n" " --deletecalendarnote start [end_number|end]\n" msgstr "" "Opcje kalendarza:\n" " --getcalendarnote poczÄ…tek [koniec|end] [-v|--vCal]\n" " --writecalendarnote vcalendarfile poczÄ…tek [koniec|end]\n" " --deletecalendarnote poczÄ…tek [koniec|end]\n" #: ../gnokii/gnokii-calendar.c:65 #, c-format msgid "" "usage: --getcalendarnote start_number [end_number | end] [-v|--vCal]\n" " start_number - entry number in the phone calendar " "(numeric)\n" " end_number - read to this entry in the phone " "calendar (numeric, optional)\n" " end - the string \"end\" indicates all " "entries from start to end\n" " -v - output in iCalendar format\n" " NOTE: if no end is given, only the start entry is read\n" msgstr "" "sposób użycia: --getcalendarnote poczÄ…tek [koniec | end] [-v|--vCal]\n" " poczÄ…tek - numer pozycji w kalendarzu telefonu (liczba)\n" " koniec - do tej pozycji w kalendarzu telefonu (liczba, " "opcjonalnie)\n" " end - napis \"end\" oznacza wszystkie pozycje od poczÄ…tku do " "koÅ„ca\n" " -v - wyjÅ›cie w formacie iCalendar\n" " UWAGA: jeÅ›li nie podana jest ostatnia pozycja, odczytywana jest tylko " "pierwsza\n" #. Plain text output #. Translators: this is the header of a calendar note. Example: 1 (1). Type: Meeting #: ../gnokii/gnokii-calendar.c:130 #, c-format msgid "%d (%d). %s: %s\n" msgstr "%d (%d). %s: %s\n" #: ../gnokii/gnokii-calendar.c:130 ../xgnokii/xgnokii_calendar.c:1536 msgid "Type" msgstr "Typ" #: ../gnokii/gnokii-calendar.c:132 #, c-format msgid " Start date: %d-%02d-%02d\n" msgstr " Data poczÄ…tkowa: %d-%02d-%02d\n" #: ../gnokii/gnokii-calendar.c:137 #, c-format msgid " Start time: %02d:%02d:%02d\n" msgstr " Godzina poczkÄ…tkowa: %02d:%02d:%02d\n" #: ../gnokii/gnokii-calendar.c:142 #, c-format msgid " End date: %d-%02d-%02d\n" msgstr " Data koÅ„cowa: %d-%02d-%02d\n" #: ../gnokii/gnokii-calendar.c:146 #, c-format msgid " End time: %02d:%02d:%02d\n" msgstr " Czas koÅ„cowa: %02d:%02d:%02d\n" #: ../gnokii/gnokii-calendar.c:154 #, c-format msgid " Alarm date: %02d-%02d\n" msgstr " Data alarmu: %02d-%02d\n" #: ../gnokii/gnokii-calendar.c:158 #, c-format msgid " Alarm date: %d-%02d-%02d\n" msgstr " Data alarmu: %d-%02d-%02d\n" #: ../gnokii/gnokii-calendar.c:163 #, c-format msgid " Alarm time: %02d:%02d:%02d\n" msgstr " Czas alarmu: %02d:%02d:%02d\n" #: ../gnokii/gnokii-calendar.c:167 #, c-format msgid " Alarm tone %s\n" msgstr " DźwiÄ™k alarmu %s\n" #: ../gnokii/gnokii-calendar.c:168 ../xgnokii/xgnokii_calendar.c:214 #: ../xgnokii/xgnokii_calendar.c:220 msgid "enabled" msgstr "włączony" #: ../gnokii/gnokii-calendar.c:168 ../xgnokii/xgnokii_calendar.c:214 #: ../xgnokii/xgnokii_calendar.c:220 msgid "disabled" msgstr "wyłączony" #: ../gnokii/gnokii-calendar.c:171 #, c-format msgid " %s: " msgstr " %s: " #: ../gnokii/gnokii-calendar.c:171 msgid "Repeat" msgstr "Powtarzanie" #: ../gnokii/gnokii-calendar.c:182 #, c-format msgid "Every %d hours" msgstr "co %d godzin" #: ../gnokii/gnokii-calendar.c:187 #, c-format msgid " The event will be repeated " msgstr " Zdarzenie bÄ™dzie powtarzane " #: ../gnokii/gnokii-calendar.c:190 #, c-format msgid "forever." msgstr "zawsze." #: ../gnokii/gnokii-calendar.c:193 #, c-format msgid "%d times." msgstr "%d razy." #: ../gnokii/gnokii-calendar.c:199 #, c-format msgid " Text: %s\n" msgstr " Tekst: %s\n" #: ../gnokii/gnokii-calendar.c:203 ../gnokii/gnokii-calendar.c:206 #: ../gnokii/gnokii-wap.c:226 ../gnokii/gnokii-wap.c:227 #: ../gnokii/gnokii-wap.c:228 ../gnokii/gnokii-wap.c:229 #: ../gnokii/gnokii-wap.c:230 ../gnokii/gnokii-wap.c:231 #: ../gnokii/gnokii-wap.c:232 ../gnokii/gnokii-wap.c:233 #: ../gnokii/gnokii-wap.c:235 ../gnokii/gnokii-wap.c:236 #: ../gnokii/gnokii-wap.c:237 ../gnokii/gnokii-wap.c:238 #: ../gnokii/gnokii-wap.c:239 ../gnokii/gnokii-wap.c:240 #: ../gnokii/gnokii-wap.c:241 ../gnokii/gnokii-wap.c:243 #: ../gnokii/gnokii-wap.c:244 #, c-format msgid " %s: %s\n" msgstr " %s: %s\n" #: ../gnokii/gnokii-calendar.c:203 ../xgnokii/xgnokii.c:1709 msgid "Phone" msgstr "Telefon" #: ../gnokii/gnokii-calendar.c:226 #, c-format msgid "The calendar note can not be read: %s\n" msgstr "Notatka nie może być odczytana: %s\n" #: ../gnokii/gnokii-calendar.c:236 #, c-format msgid "" "usage: --writecalendarnote vcalendarfile start_number [end_number|end]\n" " vcalendarfile - file containing calendar notes in " "vCal format\n" " start_number - first calendar note from " "vcalendarfile to read\n" " end_number - last calendar note from " "vcalendarfile to read\n" " end - read all notes from vcalendarfile " "from start_number\n" " NOTE: it stores the note at the first empty location.\n" msgstr "" "sposób użycia: --writealendarnote plik_vcalendar poczÄ…tek [koniec|end]\n" " plik_vcalendar - plik z notatkami w formacie vCal\n" " poczÄ…tek - pierwsza notatka z pliku do odczytania\n" " koniec - ostatnia notatka z pliku do odczytania\n" " end - odczytaj wszystkie notatki od poczÄ…tek do " "koÅ„ca\n" " UWAGA: notatki sÄ… zapisywanie w wolnych pozycjach w pamiÄ™ci.\n" #: ../gnokii/gnokii-calendar.c:300 ../gnokii/gnokii-todo.c:206 #, c-format msgid "Failed to load vCalendar file: %s\n" msgstr "Nieudana próba wczytania pliku vCalendar: %s\n" #: ../gnokii/gnokii-calendar.c:309 ../gnokii/gnokii-dial.c:143 #: ../gnokii/gnokii-todo.c:215 #, c-format msgid "Successfully written!\n" msgstr "Zapisano pomyÅ›lnie!\n" #: ../gnokii/gnokii-calendar.c:311 #, c-format msgid "Failed to write calendar note: %s\n" msgstr "Nieudana próba zapisu notatki: %s\n" #: ../gnokii/gnokii-calendar.c:320 #, c-format msgid "" "usage: --deletecalendarnote start_number [end_number | end]\n" " start_number - first number in the phone calendar " "(numeric)\n" " end_number - until this entry in the phone " "calendar (numeric, optional)\n" " end - the string \"end\" indicates all " "entries from start to end\n" " NOTE: if no end is given, only the start entry is deleted\n" msgstr "" "sposób użycia: gnokii --deletecalendarnote poczÄ…tek [koniec | end]\n" " poczÄ…tek - numer pierwszej pozycji w kalendarzu telefonu do " "usuniÄ™cia (liczba)\n" " koniec - numer ostatniej pozycji w kalendarzu telefonu do " "usuniÄ™cia (liczba, opcjonalnie)\n" " end - napis \"end\" oznacza usuniÄ™cie wszystkich pozycje od " "poczÄ…tek do koÅ„ca\n" " UWAGA: jeÅ›li nie podana jest ostatnia pozycja, usuwana jest tylko " "pierwsza\n" #: ../gnokii/gnokii-calendar.c:355 #, c-format msgid "Calendar note deleted.\n" msgstr "Notatka usuniÄ™ta.\n" #: ../gnokii/gnokii-calendar.c:357 #, c-format msgid "The calendar note cannot be deleted: %s\n" msgstr "Nieudana próba usuniÄ™cia notatki: %s\n" #: ../gnokii/gnokii-dial.c:52 #, c-format msgid "" "Dialling and call options:\n" " --getspeeddial location\n" " --setspeeddial number memory_type location\n" " --dialvoice number\n" " --senddtmf string\n" " --answercall callid\n" " --hangup callid\n" " --divert {--op|-o} {register|enable|query|disable|erasure}\n" " {--type|-t} {all|busy|noans|outofreach|notavail}\n" " {--call|-c} {all|voice|fax|data}\n" " [{--timeout|-m} time_in_seconds]\n" " [{--number|-n} number]\n" "All number, location and callid options need to be numeric.\n" msgstr "" "Opcje obsÅ‚ugi połączeÅ„:\n" " --getspeeddial pozycja\n" " --setspeeddial numer typ_pamiÄ™ci pozycja\n" " --dialvoice numer\n" " --senddtmf napis\n" " --answercall id_rozmowy\n" " --hangup id_rozmowy\n" " --divert {--op|-o} {register|enable|query|disable|erasure}\n" " {--type|-t} {all|busy|noans|outofreach|notavail}\n" " {--call|-c} {all|voice|fax|data}\n" " [{--timeout|-m} czas_w_sekundach]\n" " [{--number|-n} numer]\n" #: ../gnokii/gnokii-dial.c:70 #, c-format msgid "" "usage: --getspeeddial location\n" " location - location in the speed dial memory\n" msgstr "" "sposób użycia: --getspeeddial pozycja\n" " pozycja - pozycja w pamiÄ™ci szybkiego wybierania\n" #: ../gnokii/gnokii-dial.c:93 #, c-format msgid "SpeedDial nr. %d %s %d\n" msgstr "Szybkie wybieranie nr %d %s %d\n" #: ../gnokii/gnokii-dial.c:96 ../gnokii/gnokii-dial.c:146 #: ../gnokii/gnokii-dial.c:186 ../gnokii/gnokii-dial.c:217 #: ../gnokii/gnokii-dial.c:248 ../gnokii/gnokii-dial.c:381 #: ../gnokii/gnokii-logo.c:298 ../gnokii/gnokii-logo.c:469 #: ../gnokii/gnokii-monitor.c:454 ../gnokii/gnokii-monitor.c:457 #: ../gnokii/gnokii-monitor.c:480 ../gnokii/gnokii-other.c:190 #: ../gnokii/gnokii-phonebook.c:256 ../gnokii/gnokii-profile.c:112 #: ../gnokii/gnokii-profile.c:162 ../gnokii/gnokii-security.c:95 #: ../gnokii/gnokii-security.c:127 ../gnokii/gnokii-security.c:205 #: ../gnokii/gnokii-security.c:247 ../gnokii/gnokii-security.c:298 #: ../gnokii/gnokii-settings.c:122 ../gnokii/gnokii-settings.c:146 #: ../gnokii/gnokii-settings.c:180 ../gnokii/gnokii-settings.c:204 #: ../gnokii/gnokii-sms.c:552 ../gnokii/gnokii-sms.c:1048 #: ../gnokii/gnokii-sms.c:1126 ../gnokii/gnokii-sms.c:1156 #: ../gnokii/gnokii-sms.c:1189 ../gnokii/gnokii-sms.c:1329 #: ../gnokii/gnokii-sms.c:1331 ../gnokii/gnokii-wap.c:94 #: ../gnokii/gnokii-wap.c:129 ../gnokii/gnokii-wap.c:162 #: ../gnokii/gnokii-wap.c:248 ../gnokii/gnokii-wap.c:323 #: ../smsd/lowlevel.c:112 ../smsd/lowlevel.c:125 ../smsd/mysql.c:77 #: ../smsd/mysql.c:134 ../smsd/mysql.c:171 ../smsd/mysql.c:189 #: ../smsd/mysql.c:199 ../smsd/mysql.c:225 ../smsd/mysql.c:263 #: ../smsd/mysql.c:296 ../smsd/mysql.c:336 ../smsd/mysql.c:345 #: ../smsd/mysql.c:399 ../smsd/pq.c:68 ../smsd/pq.c:77 ../smsd/pq.c:121 #: ../smsd/pq.c:150 ../smsd/pq.c:190 ../smsd/pq.c:212 ../smsd/pq.c:241 #: ../smsd/pq.c:258 ../smsd/pq.c:296 ../smsd/pq.c:333 ../smsd/pq.c:376 #: ../smsd/pq.c:427 ../smsd/sqlite.c:58 ../smsd/sqlite.c:70 #: ../smsd/sqlite.c:240 #, c-format msgid "Error: %s\n" msgstr "Błąd: %s\n" #: ../gnokii/gnokii-dial.c:105 #, c-format msgid "" "usage: --setspeeddial number memory_type location\n" " number - phone number to be stored\n" " memory_type - memory type for the speed dial\n" " location - location in the speed dial memory\n" msgstr "" "sposób użycia: --setspeeddial numer typ_pamiÄ™ci pozycja\n" " numer - numer telefonu do zapisania\n" " typ_pamiÄ™ci - typ pamiÄ™ci dla szybkiego wybierania\n" " pozycja - pozycja w pamiÄ™ci szybkiego wybierania\n" #: ../gnokii/gnokii-dial.c:128 ../gnokii/gnokii-phonebook.c:111 #: ../gnokii/gnokii-phonebook.c:487 #, c-format msgid "Unknown memory type %s (use ME, SM, ...)!\n" msgstr "Nieznany typ pamiÄ™ci %s (użyj ME, SM, ...)!\n" #: ../gnokii/gnokii-dial.c:169 #, c-format msgid "Dialing failed: %s\n" msgstr "Nieudane wybieranie numeru: %s\n" #: ../gnokii/gnokii-dial.c:171 #, c-format msgid "Dialled call, id: %d (lowlevel id: %d)\n" msgstr "Rozmowa poÅ‚aczona, id: %d (id wewnÄ™trzny: %d)\n" #: ../gnokii/gnokii-dial.c:194 #, c-format msgid "" "usage: --answercall callid\n" " callid - call identifier\n" msgstr "" "sposób użycia: --answercall id_rozmowy\n" " id_rozmowy - identyfikator rozmowy\n" #: ../gnokii/gnokii-dial.c:225 #, c-format msgid "" "usage: --hangup callid\n" " callid - call identifier\n" msgstr "" "sposób użycia: --hangup id_rozmowy\n" " id_rozmowy -- identyfikator rozmowy\n" #: ../gnokii/gnokii-dial.c:256 #, c-format msgid "" " usage: --divert\n" " -o operation\n" " --op operation operation to be executed, needs to be one\n" " of the following: register, enable, query,\n" " disable, erasure; this is required option\n" " -t type\n" " --type type type of the operation, needs to be one of\n" " the following: all, busy, noans, outofreach,\n" " notavail, unconditional; this is required " "option\n" " -c calltype\n" " --call calltype type of call for the operation, needs to be\n" " one of the following: all, voice, fax, data;\n" " this is optional\n" " -m sec\n" " --timeout sec timeout to be set; the value is in seconds\n" " -n msisdn\n" " --number msisdn number for redirection\n" "\n" msgstr "" " sposób użycia: --divert\n" " -o operacja\n" " --op operacja operacja do wykonania, musi być jednym z:\n" " register, enable, query, disable, erasure;\n" " to jest wymagana opcja\n" " -t typ\n" " --type typ typ operacji, musi być jednym z: all, busy, \n" " noans, outofreach, notavail, unconditional;\n" " to jestwymagana opcja\n" " -c typ_połączenia\n" " --call typ_połączenia typ połączenia dla operacji, musi być jednym " "z:\n" " all, voice, fax, data; to jest wymagana opcja\n" " -m sekundy\n" " --timeout sekundy ustawienie czasu oczekiwania; wartość " "argumentu w sekundach\n" " -n numer\n" " --number numer numer do przekierowania\n" "\n" #: ../gnokii/gnokii-dial.c:373 ../gnokii/gnokii-dial.c:374 #: ../gnokii/gnokii-dial.c:376 ../gnokii/gnokii-phonebook.c:199 #: ../gnokii/gnokii-phonebook.c:203 ../gnokii/gnokii-todo.c:119 #: ../gnokii/gnokii-todo.c:120 ../gnokii/gnokii-wap.c:89 #: ../gnokii/gnokii-wap.c:90 ../gnokii/gnokii-wap.c:220 #: ../gnokii/gnokii-wap.c:221 ../gnokii/gnokii-wap.c:222 #: ../gnokii/gnokii-wap.c:223 ../gnokii/gnokii-wap.c:224 #, c-format msgid "%s: %s\n" msgstr "%s: %s\n" #: ../gnokii/gnokii-dial.c:373 msgid "Divert type" msgstr "Typ przekazywania" #: ../gnokii/gnokii-dial.c:374 msgid "Call type" msgstr "Typ połączenia" #: ../gnokii/gnokii-dial.c:377 #, c-format msgid "%s: %d\n" msgstr "%s: %d\n" #: ../gnokii/gnokii-dial.c:377 msgid "Timeout" msgstr "Przekroczenie czasu" #: ../gnokii/gnokii-dial.c:379 #, c-format msgid "Divert isn't active.\n" msgstr "Przekazywanie nieaktywne.\n" #: ../gnokii/gnokii-file.c:53 #, c-format msgid "" "File options:\n" " --getfilelist remote_path\n" " --getfiledetailsbyid [id]\n" " --getfileid remote_filename\n" " --getfile remote_filename [local_filename]\n" " --getfilebyid id [local_filename]\n" " --getallfiles remote_path\n" " --putfile local_filename remote_filename\n" " --deletefile remote_filename\n" " --deletefilebyid id\n" msgstr "" "Opcje obsÅ‚ugi plików:\n" " --getfilelist zdalna_Å›cieżka\n" " --getfiledetailsbyid [id]\n" " --getfileid zdalny_plik\n" " --getfile zdalny_plik [lokalny_plik]\n" " --getfilebyid id [lokalny_plik]\n" " --getallfiles zdalna_Å›cieżka\n" " --putfile lokalny_plik zdalny_plik\n" " --deletefile zdalny_plik\n" " --deletefilebyid id\n" #: ../gnokii/gnokii-file.c:98 ../gnokii/gnokii-file.c:192 #: ../gnokii/gnokii-file.c:377 #, c-format msgid "Failed to get info for %s: %s\n" msgstr "Nieudana próba pobrania informacji o %s: %s\n" #: ../gnokii/gnokii-file.c:100 #, c-format msgid "Filelist for path %s:\n" msgstr "Lista plików w Å›cieżce %s:\n" #: ../gnokii/gnokii-file.c:102 #, c-format msgid " %s\n" msgstr " %s\n" #: ../gnokii/gnokii-file.c:135 ../gnokii/gnokii-file.c:170 #, c-format msgid "Failed to get filename: %s\n" msgstr "Nieudana próba pobrania pliku: %s\n" #: ../gnokii/gnokii-file.c:142 #, c-format msgid "| %s (%d)\n" msgstr "| %s (%d)\n" #: ../gnokii/gnokii-file.c:167 #, c-format msgid " - %s (%d)\n" msgstr " - %s (%d)\n" #: ../gnokii/gnokii-file.c:194 #, c-format msgid "Fileid for file %s is %02x %02x %02x %02x %02x %02x\n" msgstr "Identyfikator pliku %s to %02x %02x %02x %02x %02x %02x\n" #: ../gnokii/gnokii-file.c:212 ../gnokii/gnokii-file.c:232 #, c-format msgid "Failed to delete %s: %s\n" msgstr "Nieudana próba usuniÄ™cia %s: %s\n" #: ../gnokii/gnokii-file.c:214 ../gnokii/gnokii-file.c:234 #, c-format msgid "Deleted: %s\n" msgstr "UsuniÄ™to: %s\n" #: ../gnokii/gnokii-file.c:241 #, c-format msgid " usage: --getfile remote_filename [localfilename]\n" msgstr " sposób użycia: --getfile zdalny_plik [lokalny_plik]\n" #: ../gnokii/gnokii-file.c:266 ../gnokii/gnokii-file.c:391 #, c-format msgid "Failed to get file %s: %s\n" msgstr "Nieudana próba pobrania pliku %s: %s\n" #: ../gnokii/gnokii-file.c:275 #, c-format msgid "Got file %s. Save to [%s]: " msgstr "Pobrano plik %s. Zapisz jako [%s]: " #: ../gnokii/gnokii-file.c:290 ../gnokii/gnokii-file.c:345 #: ../gnokii/gnokii-file.c:396 ../gnokii/gnokii-logo.c:198 #: ../gnokii/gnokii-utils.c:93 ../gnokii/gnokii-utils.c:118 #: ../xgnokii/xgnokii_contacts.c:2620 ../xgnokii/xgnokii_dtmf.c:135 #: ../xgnokii/xgnokii_speed.c:417 #, c-format msgid "Can't open file %s for writing!\n" msgstr "Nie można otworzyć pliku %s do zapisu!\n" #: ../gnokii/gnokii-file.c:294 ../gnokii/gnokii-file.c:349 #: ../gnokii/gnokii-file.c:400 #, c-format msgid "Failed to write to file %s.\n" msgstr "Nieudana próba zapisu do pliku %s.\n" #: ../gnokii/gnokii-file.c:305 #, c-format msgid " usage: --getfilebyid id [localfilename]\n" msgstr " sposób użycia: --getfilebyid id [lokalny_plik]\n" #: ../gnokii/gnokii-file.c:332 #, c-format msgid "Failed to get file: %s\n" msgstr "Nieudana próba pobrania pliku: %s\n" #: ../gnokii/gnokii-file.c:393 #, c-format msgid "Got file %s.\n" msgstr "Pobrano plik %s.\n" #: ../gnokii/gnokii-file.c:415 #, c-format msgid " usage: --putfile local_filename remote_filename\n" msgstr " sposób użycia: --putfile lokalny_plik zdalny_plik\n" #: ../gnokii/gnokii-file.c:444 #, c-format msgid "File %s corrupted!\n" msgstr "Plik %s jest uszkodzony!\n" #: ../gnokii/gnokii-file.c:449 #, c-format msgid "Failed to put file to %s: %s\n" msgstr "Nieudany zapis pliku %s: %s\n" #: ../gnokii/gnokii-logo.c:56 #, c-format msgid "" "Logo options:\n" " --sendlogo {caller|op|picture} destination logofile\n" " [network_code]\n" " --setlogo op [logofile [network_code]]\n" " --setlogo startup [logofile]\n" " --setlogo caller [logofile [caller_group_number [group_name]]]\n" " --setlogo {dealer|text} [text]\n" " --getlogo op [logofile [network_code]]\n" " --getlogo startup [logofile [network_code]]\n" " --getlogo caller [caller_group_number [logofile\n" " [network_code]]]\n" " --getlogo {dealer|text}\n" " --viewlogo logofile\n" msgstr "" "Opcje logo:\n" " --sendlogo {caller|op|picture} numer plik_logo\n" " [kod_sieci]\n" " --setlogo op [plik_logo [kod_sieci]]\n" " --setlogo startup [plik_logo]\n" " --setlogo caller [plik_logo [numer_grupy_dzwoniÄ…cych " "[nazwa_grupy]]]\n" " --setlogo {dealer|text} [tekst]\n" " --getlogo op [plik_logo [kod_sieci]]\n" " --getlogo startup [plik_logo [kod_sieci]]\n" " --getlogo caller [numer_grupy_dzwoniÄ…cych [plik_logo\n" " [kod_sieci]]]\n" " --getlogo {dealer|text}\n" " --viewlogo plik_logo\n" #: ../gnokii/gnokii-logo.c:97 #, c-format msgid "Sending operator logo.\n" msgstr "WysyÅ‚anie logo operatora.\n" #: ../gnokii/gnokii-logo.c:98 #, c-format msgid "Sending caller line identification logo.\n" msgstr "WysyÅ‚anie logo identyfikacji dzwoniÄ…cego.\n" #: ../gnokii/gnokii-logo.c:99 #, c-format msgid "Sending Multipart Message: Picture Message.\n" msgstr "WysyÅ‚am obrazek jako wiadomość wieloczęściowÄ….\n" #: ../gnokii/gnokii-logo.c:100 #, c-format msgid "Sending EMS-compliant Picture Message.\n" msgstr "WysyÅ‚am obrazek jako EMS.\n" #: ../gnokii/gnokii-logo.c:101 #, c-format msgid "Sending EMS-compliant Animation.\n" msgstr "WysyÅ‚am animacjÄ™ EMS.\n" #: ../gnokii/gnokii-logo.c:102 #, c-format msgid "You should specify what kind of logo to send!\n" msgstr "Podaj rodzaj logo do wysÅ‚ania!\n" #: ../gnokii/gnokii-logo.c:118 #, c-format msgid "Cannot send logo: specified and loaded bitmap type differ!\n" msgstr "Nie mogÄ™ wysÅ‚ać logo: typy podanej i zaÅ‚adowanej bitmapy różniÄ… siÄ™!\n" #: ../gnokii/gnokii-logo.c:156 ../gnokii/gnokii-ringtone.c:148 #: ../gnokii/gnokii-sms.c:352 #, c-format msgid "Message sent in %d parts with reference numbers:" msgstr "Wiadomość wysÅ‚ana w %d częściach o numerach referencyjnych:" #: ../gnokii/gnokii-logo.c:161 ../gnokii/gnokii-ringtone.c:153 #: ../gnokii/gnokii-sms.c:357 #, c-format msgid "Send succeeded with reference %d!\n" msgstr "Udane wysÅ‚anie. Numer referencyjny wiadomoÅ›ci: %d\n" #: ../gnokii/gnokii-logo.c:163 ../gnokii/gnokii-ringtone.c:155 #: ../gnokii/gnokii-sms.c:359 #, c-format msgid "SMS Send failed (%s)\n" msgstr "Nieudane wysÅ‚anie SMS (%s)\n" #: ../gnokii/gnokii-logo.c:180 #, c-format msgid "Saving logo. File \"%s\" exists. (O)verwrite, create (n)ew or (s)kip ? " msgstr "" "Zapisywanie logo. Plik: \"%s\" juz istnieje. (N)adpisać, (u)tworzyć nowy czy " "(p)ominąć? " #: ../gnokii/gnokii-logo.c:182 msgid "O" msgstr "N" #: ../gnokii/gnokii-logo.c:182 msgid "o" msgstr "n" #: ../gnokii/gnokii-logo.c:183 msgid "N" msgstr "U" #: ../gnokii/gnokii-logo.c:183 msgid "n" msgstr "u" #: ../gnokii/gnokii-logo.c:184 msgid "S" msgstr "P" #: ../gnokii/gnokii-logo.c:184 msgid "s" msgstr "p" #: ../gnokii/gnokii-logo.c:188 #, c-format msgid "Enter name of new file: " msgstr "Podaj nazwÄ™ pliku: " #: ../gnokii/gnokii-logo.c:233 #, c-format msgid "Dealer welcome note " msgstr "Komunikat powitalny operatora" #: ../gnokii/gnokii-logo.c:235 ../gnokii/gnokii-logo.c:242 #, c-format msgid "currently set to \"%s\"\n" msgstr "ustawiony jako \"%s\"\n" #: ../gnokii/gnokii-logo.c:237 ../gnokii/gnokii-logo.c:244 #, c-format msgid "currently empty\n" msgstr "pusty\n" #: ../gnokii/gnokii-logo.c:240 #, c-format msgid "Welcome note " msgstr "Komunikat powitalny " #: ../gnokii/gnokii-logo.c:250 #, c-format msgid "Operator logo for %s (%s) network got successfully\n" msgstr "Logo operatora sieci %s (%s) pobrane prawidÅ‚owo\n" #: ../gnokii/gnokii-logo.c:255 ../gnokii/gnokii-logo.c:267 #: ../gnokii/gnokii-logo.c:282 ../gnokii/gnokii-logo.c:363 #, c-format msgid "Sorry, gnokii doesn't know %s network !\n" msgstr "Niestety gnokii nie zna sieci %s!\n" #: ../gnokii/gnokii-logo.c:263 #, c-format msgid "Startup logo got successfully\n" msgstr "Logo startowe pobrane prawidÅ‚owo\n" #: ../gnokii/gnokii-logo.c:274 ../gnokii/gnokii-logo.c:291 #, c-format msgid "Your phone doesn't have logo uploaded !\n" msgstr "Twój telefon nie ma zaÅ‚adowanego logo!\n" #: ../gnokii/gnokii-logo.c:276 #, c-format msgid "Caller logo got successfully\n" msgstr "Logo dzwoniÄ…cego pobrane prawidÅ‚owo\n" #: ../gnokii/gnokii-logo.c:277 #, c-format msgid "Caller group name: %s, ringing tone: %s (%d)\n" msgstr "Nazwa grupy: %s, dzwonek: %s (%d)\n" #: ../gnokii/gnokii-logo.c:288 #, c-format msgid "Unknown bitmap type.\n" msgstr "Nieznany typ obrazka.\n" #: ../gnokii/gnokii-logo.c:302 #, c-format msgid "What kind of logo do you want to get ?\n" msgstr "Jakiego typu logo chcesz pobrać?\n" #: ../gnokii/gnokii-logo.c:320 #, c-format msgid "Error while reading file \"%s\": %s\n" msgstr "Nieudana próba odczytu pliku \"%s\": %s\n" #: ../gnokii/gnokii-logo.c:398 #, c-format msgid "What kind of logo do you want to set ?\n" msgstr "Jakiego typu logo chcesz zapisać?\n" #: ../gnokii/gnokii-logo.c:434 #, c-format msgid "Error setting dealer welcome note - " msgstr "Nieudana próba zapisu komunikatu powitalnego operatora - " #: ../gnokii/gnokii-logo.c:436 #, c-format msgid "Error setting welcome note - " msgstr "Nieudana próba zapisu komunikatu powitalnego - " #: ../gnokii/gnokii-logo.c:440 #, c-format msgid "SIM card and PIN is required\n" msgstr "Wymagana karta SIM i podanie numeru PIN\n" #: ../gnokii/gnokii-logo.c:447 #, c-format msgid "too long, truncated to \"%s\" (length %zi)\n" msgstr "zbyt dÅ‚ugi, skrócony do \"%s\" (dÅ‚ugość %zi)\n" #: ../gnokii/gnokii-logo.c:455 #, c-format msgid "Error setting startup logo - SIM card and PIN is required\n" msgstr "" "Nieudana próba ustawienia logo startowego - wymagana karta SIM i podanie " "PIN\n" #: ../gnokii/gnokii-logo.c:456 #, c-format msgid "i: %i, %2x %2x\n" msgstr "i: %i, %2x %2x\n" #: ../gnokii/gnokii-logo.c:466 #, c-format msgid "Done.\n" msgstr "Gotowe.\n" #: ../gnokii/gnokii-logo.c:481 #, c-format msgid "Could not load bitmap: %s\n" msgstr "Nieudana próba zaÅ‚adowania obrazka: %s\n" #: ../gnokii/gnokii-mms.c:46 #, c-format msgid "" "MMS options:\n" " --getmms memory_type start [end] [{--mime|--pdu|--raw} file]\n" " [-d|--delete] [-o|--overwrite]\n" " --deletemms memory_type start [end]\n" msgstr "" "opcje MMS:\n" " --getmms typ_pamiÄ™ci poczÄ…tek [koniec] [{--mime|--pdu|--raw} " "plik]\n" " [-d|--delete] [-o|--overwrite]\n" " --deletemms typ_pamiÄ™ci poczÄ…tek [koniec]\n" #: ../gnokii/gnokii-mms.c:56 #, c-format msgid "" " usage: --getmms memory start [end] retrieves messages from memory type " "(SM, ME,\n" " IN, OU, ...) starting from\n" " location start and ending with end;\n" " if end option is omitted, just one " "entry\n" " is read;\n" " start must be a number, end may be a " "number\n" " or 'end' string;\n" " if 'end' is used entries are being read\n" " until empty location\n" " --mime filename convert MMS in MIME format and save it " "to\n" " the given file;\n" " --pdu filename extract MMS from raw format and save it " "to\n" " the given file;\n" " --raw filename get MMS from phone and save it unchanged " "to\n" " the given file;\n" " --delete\n" " -d delete MMS after reading\n" " --overwrite\n" " -o overwrite destination file without " "asking\n" "\n" msgstr "" " sposób użycia:\n" " --getmms typ_pamiÄ™ci poczÄ…tek [koniec] odczytuje wiadomoÅ›ci z " "typ_pamiÄ™ci\n" " (SM, ME, IN, OU, ...) od pozycji\n" " poczÄ…tek do pozycji koniec; jeÅ›li\n" " koniec nie jest podany, odczytywana\n" " jest tylko jedna pozycja;\n" " poczÄ…tek musi być liczbÄ…, koniec może\n" " być liczbÄ… lub napisem 'end'; 'end'\n" " oznacza odczytanie wszystkich\n" " wiadomoÅ›ci do koÅ„ca\n" " --mime plik przekształć MMS do formatu MIME i " "zapisz\n" " w podanym pliku;\n" " --pdu plik przekształć MMS i zapisz w podanym " "pliku;\n" " the given file;\n" " --raw plik pobierz MMS z telefonu i zapisz w\n" " niezmienionej postaci w podanym pliku;\n" " --delete\n" " -d usuÅ„ MMS po odczytaniu\n" " --overwrite\n" " -o nadpisz plik bez pytania\n" "\n" #: ../gnokii/gnokii-mms.c:82 ../gnokii/gnokii-sms.c:749 #, c-format msgid "%d. %s (%s)\n" msgstr "%d. %s (%s)\n" #: ../gnokii/gnokii-mms.c:82 msgid "MMS" msgstr "MMS" #: ../gnokii/gnokii-mms.c:113 ../gnokii/gnokii-mms.c:201 #: ../gnokii/gnokii-mms.c:243 ../gnokii/gnokii-sms.c:486 #: ../gnokii/gnokii-sms.c:658 ../gnokii/gnokii-sms.c:884 #: ../gnokii/gnokii-sms.c:936 #, c-format msgid "Unknown memory type %s (use ME, SM, IN, OU, ...)!\n" msgstr "Nieznany typ pamiÄ™ci %s (użyj ME, SM, IN, OU, ...)!\n" #: ../gnokii/gnokii-mms.c:114 ../gnokii/gnokii-mms.c:202 #: ../gnokii/gnokii-mms.c:244 ../gnokii/gnokii-sms.c:487 #: ../gnokii/gnokii-sms.c:659 ../gnokii/gnokii-sms.c:885 #: ../gnokii/gnokii-sms.c:937 #, c-format msgid "" "Run gnokii --showsmsfolderstatus for a list of supported memory types.\n" msgstr "" "Uruchom gnokii --showsmsfolderstatus, żeby sprawdzić obsÅ‚ugiwane typy " "pamiÄ™ci.\n" #: ../gnokii/gnokii-mms.c:150 ../gnokii/gnokii-sms.c:715 #, c-format msgid "Saving into %s\n" msgstr "ZapisujÄ™ do %s\n" #: ../gnokii/gnokii-mms.c:187 ../gnokii/gnokii-sms.c:876 #, c-format msgid "(delete failed)\n" msgstr "(usuwanie nieudane)\n" #: ../gnokii/gnokii-mms.c:189 ../gnokii/gnokii-sms.c:878 #, c-format msgid "(message deleted)\n" msgstr "(wiadomość usuniÄ™ta)\n" #: ../gnokii/gnokii-mms.c:199 #, c-format msgid "Getting MMS failed (location %d from memory %s)! (%s)\n" msgstr "Nieudany odczyt MMS %d z pamiÄ™ci %s! (%s)\n" #: ../gnokii/gnokii-mms.c:219 #, c-format msgid "" " usage: --deletemms memory start [end] deletes messages from memory type\n" " (SM, ME, IN, OU, ...) starting\n" " from location start and ending with " "end;\n" " if end option is omitted, just one " "entry\n" " is removed;\n" " if 'end' is used entries are being " "removed\n" " until empty location\n" "\n" msgstr "" " sposób użycia:\n" " --deletemms typ_pamiÄ™ci poczÄ…tek [koniec] usuwa wiadomoÅ›ci z typ_pamiÄ™ci\n" " (SM, ME, IN, OU, ...) od " "pozycji\n" " poczÄ…tek do pozycji koniec; " "jeÅ›li\n" " koniec nie jest podany, " "usuwana\n" " jest tylko jedna pozycja;\n" " poczÄ…tek musi być liczbÄ…, " "koniec może\n" " być liczbÄ… lub napisem 'end'; " "'end'\n" " oznacza usuniÄ™cie wszystkich\n" " wiadomoÅ›ci do koÅ„ca\n" #: ../gnokii/gnokii-mms.c:262 #, c-format msgid "Deleted MMS (location %d from memory %s)\n" msgstr "MMS zostaÅ‚ usuniÄ™ty (pozycja %d z pamiÄ™ci %s)\n" #: ../gnokii/gnokii-mms.c:266 #, c-format msgid "Deleting MMS failed (location %d from memory %s)! (%s)\n" msgstr "Nieudane usuniÄ™cie MMS (pozycja %d z pamiÄ™ci %s)! (%s)\n" #: ../gnokii/gnokii-monitor.c:67 #, c-format msgid "" "Monitoring options:\n" " --monitor [delay|once]\n" " --getdisplaystatus\n" " --displayoutput\n" " --netmonitor {reset|off|field|devel|next|nr}\n" msgstr "" "Opcje monitorowania:\n" " --monitor [opóźnienie|once]\n" " --getdisplaystatus\n" " --displayoutput\n" " --netmonitor {reset|off|field|devel|next|nr}\n" #: ../gnokii/gnokii-monitor.c:79 #, c-format msgid "INCOMING CALL: ID: %d, Number: %s, Name: \"%s\"\n" msgstr "ROZMOWA PRZYCHODZÄ„CA: ID: %d, Numer: %s, Nazwa: \"%s\"\n" #: ../gnokii/gnokii-monitor.c:82 #, c-format msgid "CALL %d TERMINATED (LOCAL)\n" msgstr "ROZMOWA %d ZAKOŃCZONA (LOKALNIE)\n" #: ../gnokii/gnokii-monitor.c:85 #, c-format msgid "CALL %d TERMINATED (REMOTE)\n" msgstr "ROZMOWA %d ZAKOŃCZONA (ZDALNIE)\n" #: ../gnokii/gnokii-monitor.c:88 #, c-format msgid "CALL %d ACCEPTED BY THE REMOTE SIDE\n" msgstr "ROZMOWA %d ZAAKCEPTOWANA PRZEZ DRUGÄ„ STRONĘ\n" #: ../gnokii/gnokii-monitor.c:91 #, c-format msgid "CALL %d PLACED ON HOLD\n" msgstr "ROZMOWA %d ZAWIESZONA\n" #: ../gnokii/gnokii-monitor.c:94 #, c-format msgid "CALL %d RETRIEVED FROM HOLD\n" msgstr "ROZMOWA %d PRZYWRÓCONA\n" #: ../gnokii/gnokii-monitor.c:135 #, c-format msgid "CALL%d: IDLE\n" msgstr "ROZMOWA %d: NIEAKTYWNA\n" #: ../gnokii/gnokii-monitor.c:143 msgid "RINGING" msgstr "DZWONI" #: ../gnokii/gnokii-monitor.c:147 msgid "DIALING" msgstr "WYBIERA NUMER" #: ../gnokii/gnokii-monitor.c:151 msgid "ESTABLISHED" msgstr "POÅÄ„CZENIE NAWIÄ„ZANE" #: ../gnokii/gnokii-monitor.c:155 msgid "ON HOLD" msgstr "POÅÄ„CZENIE ZAWIESZONE" #: ../gnokii/gnokii-monitor.c:159 msgid "UNKNOWN STATE" msgstr "NIEZNANY STAN" #: ../gnokii/gnokii-monitor.c:164 #, c-format msgid "CALL%d: %s %s (%s) (callid: %d, duration: %d sec)\n" msgstr "" "ROZMOWA %d: %s %s (%s) (identyfikator rozmowy: %d, czas trwania: %d s)\n" #: ../gnokii/gnokii-monitor.c:182 #, c-format msgid "LAC: %04x (%d), CellID: %08x (%d)\n" msgstr "LAC: %04x (%d), CellID: %08x (%d)\n" #: ../gnokii/gnokii-monitor.c:212 #, c-format msgid "Argument to --monitor delay needs to be positive number\n" msgstr "Argumentem --monitor once musi być dodatnia liczba caÅ‚kowita\n" #: ../gnokii/gnokii-monitor.c:226 #, c-format msgid "Entering monitor mode...\n" msgstr "Uruchamiam tryb monitorowania...\n" #: ../gnokii/gnokii-monitor.c:254 #, c-format msgid "Network: %s, %s (%s)\n" msgstr "Sieć: %s, %s (%s)\n" #: ../gnokii/gnokii-monitor.c:262 #, c-format msgid "RFLevel: %d\n" msgstr "RFLevel: %d\n" #: ../gnokii/gnokii-monitor.c:265 #, c-format msgid "Battery: %d\n" msgstr "Bateria: %d\n" #: ../gnokii/gnokii-monitor.c:268 #, c-format msgid "Power Source: %s\n" msgstr "ZródÅ‚o zasilania: %s\n" #: ../gnokii/gnokii-monitor.c:272 #, c-format msgid "SIM: Used %d, Free %d\n" msgstr "SIM: zajÄ™te %d, wolne %d\n" #: ../gnokii/gnokii-monitor.c:276 #, c-format msgid "Phone: Used %d, Free %d\n" msgstr "Telefon: zajÄ™te %d, wolne %d\n" #: ../gnokii/gnokii-monitor.c:280 #, c-format msgid "DC: Used %d, Free %d\n" msgstr "DC: zajÄ™te %d, wolne %d\n" #: ../gnokii/gnokii-monitor.c:284 #, c-format msgid "EN: Used %d, Free %d\n" msgstr "EN: zajÄ™te %d, wolne %d\n" #: ../gnokii/gnokii-monitor.c:288 #, c-format msgid "FD: Used %d, Free %d\n" msgstr "FD: zajÄ™te %d, wolne %d\n" #: ../gnokii/gnokii-monitor.c:292 #, c-format msgid "LD: Used %d, Free %d\n" msgstr "LD: zajÄ™te %d, wolne %d\n" #: ../gnokii/gnokii-monitor.c:296 #, c-format msgid "MC: Used %d, Free %d\n" msgstr "MC: zajÄ™te %d, wolne %d\n" #: ../gnokii/gnokii-monitor.c:300 #, c-format msgid "ON: Used %d, Free %d\n" msgstr "ON: zajÄ™te %d, wolne %d\n" #: ../gnokii/gnokii-monitor.c:304 #, c-format msgid "RC: Used %d, Free %d\n" msgstr "RC: zajÄ™te %d, wolne %d\n" #: ../gnokii/gnokii-monitor.c:307 #, c-format msgid "SMS Messages: Unread %d, Number %d\n" msgstr "WiadomoÅ›ci SMS: nieprzeczytanych %d, wszystkich %d\n" #: ../gnokii/gnokii-monitor.c:313 #, c-format msgid "Cell broadcast received on channel %d: %s\n" msgstr "CB odebrane na kanale %d: %s\n" #: ../gnokii/gnokii-monitor.c:323 #, c-format msgid "Leaving monitor mode...\n" msgstr "WyjÅ›cie z trybu monitorowania...\n" #: ../gnokii/gnokii-monitor.c:330 #, c-format msgid "Call in progress: %-3s\n" msgstr "Trwa rozmowa: %-3s\n" #: ../gnokii/gnokii-monitor.c:331 ../gnokii/gnokii-monitor.c:333 #: ../gnokii/gnokii-monitor.c:335 ../gnokii/gnokii-monitor.c:337 #: ../gnokii/gnokii-monitor.c:339 ../gnokii/gnokii-monitor.c:341 #: ../gnokii/gnokii-monitor.c:343 ../gnokii/gnokii-monitor.c:345 #: ../gnokii/gnokii-settings.c:200 msgid "on" msgstr "włączony" #: ../gnokii/gnokii-monitor.c:331 ../gnokii/gnokii-monitor.c:333 #: ../gnokii/gnokii-monitor.c:335 ../gnokii/gnokii-monitor.c:337 #: ../gnokii/gnokii-monitor.c:339 ../gnokii/gnokii-monitor.c:341 #: ../gnokii/gnokii-monitor.c:343 ../gnokii/gnokii-monitor.c:345 #: ../gnokii/gnokii-settings.c:200 msgid "off" msgstr "wyłączony" #: ../gnokii/gnokii-monitor.c:332 #, c-format msgid "Unknown: %-3s\n" msgstr "Nieznany: %-3s\n" #: ../gnokii/gnokii-monitor.c:334 #, c-format msgid "Unread SMS: %-3s\n" msgstr "Nieprzeczytany SMS: %-3s\n" #: ../gnokii/gnokii-monitor.c:336 #, c-format msgid "Voice call: %-3s\n" msgstr "Połączenie gÅ‚osowe: %-3s\n" #: ../gnokii/gnokii-monitor.c:338 #, c-format msgid "Fax call active: %-3s\n" msgstr "Aktywne połączenie faksowe: %-3s\n" #: ../gnokii/gnokii-monitor.c:340 #, c-format msgid "Data call active: %-3s\n" msgstr "Aktywne połączenie transmisji danych: %-3s\n" #: ../gnokii/gnokii-monitor.c:342 #, c-format msgid "Keyboard lock: %-3s\n" msgstr "Blokada klawiatury: %-3s\n" #: ../gnokii/gnokii-monitor.c:344 #, c-format msgid "SMS storage full: %-3s\n" msgstr "Pamięć SMS peÅ‚na: %-3s\n" #: ../gnokii/gnokii-monitor.c:430 #, c-format msgid "Entered display monitoring mode...\n" msgstr "Uruchamiam tryb monitorowania wyÅ›wietlacza...\n" #: ../gnokii/gnokii-monitor.c:447 ../gnokii/gnokii-sms.c:1322 #, c-format msgid "Shutting down\n" msgstr "Zamykanie\n" #: ../gnokii/gnokii-monitor.c:449 #, c-format msgid "Leaving display monitor mode...\n" msgstr "WyjÅ›cie z trybu monitorowania wyÅ›wietlacza...\n" #: ../gnokii/gnokii-monitor.c:490 #, c-format msgid " usage: --netmonitor {reset|off|field|devel|next|nr}\n" msgstr " sposób użycia: --netmonitor {reset|off|field|devel|next|nr}\n" #: ../gnokii/gnokii-other.c:59 #, c-format msgid "" "Misc options:\n" " --keysequence\n" " --enterchar\n" " --listnetworks\n" " --getnetworkinfo\n" msgstr "" "Inne opcje:\n" " gnokii --keysequence\n" " gnokii --enterchar\n" " gnokii --listnetworks\n" " gnokii --getnetworkinfo\n" #: ../gnokii/gnokii-other.c:96 #, c-format msgid "Failed to press key: %s\n" msgstr "Nieudane wciÅ›niÄ™cie klawisza: %s\n" #: ../gnokii/gnokii-other.c:155 #, c-format msgid "Error entering char: %s\n" msgstr "Nieudane wprowadzenie znaku: %s\n" #: ../gnokii/gnokii-other.c:169 #, c-format msgid "Network Name\n" msgstr "Nazwa sieci\n" #: ../gnokii/gnokii-other.c:170 #, c-format msgid "-----------------------------------------\n" msgstr "-----------------------------------------\n" #: ../gnokii/gnokii-other.c:172 #, c-format msgid "%-7s %s (%s)\n" msgstr "%-7s %s (%s)\n" #: ../gnokii/gnokii-other.c:202 #, c-format msgid "Network : %s (%s)\n" msgstr "Sieć : %s (%s)\n" #: ../gnokii/gnokii-other.c:205 #, c-format msgid "Network code : %s\n" msgstr "Kod sieci : %s\n" #: ../gnokii/gnokii-other.c:206 #, c-format msgid "LAC : %04x (%d)\n" msgstr "LAC : %04x (%d)\n" #: ../gnokii/gnokii-other.c:207 #, c-format msgid "Cell id : %08x (%d)\n" msgstr "ID komórki : %08x (%d)\n" #: ../gnokii/gnokii-phonebook.c:55 #, c-format msgid "" "Phonebook options:\n" " --getphonebook memory_type start_number [end_number|end]\n" " [[-r|--raw]|[-v|--vcard]|[-l|--ldif]]\n" " --writephonebook [[-o|--overwrite]|[-f|--find-free]]\n" " [-m|--memory-type|--memory memory_type]\n" " [-n|--memory-location|--location number]\n" " [[-v|--vcard]|[-l|--ldif]]\n" " --deletephonebook memory_type start_number [end_number|end]\n" msgstr "" "Opcje książki adresowej:\n" " --getphonebook typ_pamiÄ™ci poczÄ…tek [koniec|end]\n" " [[-r|--raw]|[-v|--vcard]|[-l|--ldif]]\n" " --writephonebook [[-o|--overwrite]|[-f|--find-free]]\n" " [-m|--memory-type|--memory typ_pamiÄ™ci]\n" " [-n|--memory-location|--location numer]\n" " [[-v|--vcard]|[-l|--ldif]]\n" " --deletephonebook typ_pamiÄ™ci poczÄ…tek [koniec|end]\n" #: ../gnokii/gnokii-phonebook.c:68 #, c-format msgid "" " usage: --getphonebook memory start [end] reads phonebook entries from " "memory type\n" " (SM, ME, IN, OU, ...) messages " "starting\n" " from location start and ending with " "end;\n" " if end option is omitted, just one " "entry\n" " is read;\n" " if 'end' is used all entries are " "read\n" " -r\n" " --raw output in raw form (comma " "separated)\n" " -v\n" " --vcard output in vcard format\n" " -l\n" " --ldif output in ldif format\n" "\n" msgstr "" " sposób użycia: --getphonebook typ_pamiÄ™ci poczÄ…tek [koniec | end] " "odczytuje\n" " wpisy z pamiÄ™ci typ_pamiÄ™ci (SM, ME, IN, OU, ...) " "rozpoczynajÄ…c\n" " od pozycji poczÄ…tek i koÅ„czÄ…c na pozycji koniec; jeÅ›li jest\n" " użyte sÅ‚owo end, odczytywane sÄ… wszystkie pozycje; jeÅ›li " "ten\n" " argument nie jest podany, odczytywana jest tylko jedna " "pozycja.\n" " -r\n" " --raw wyjÅ›cie w formacie csv\n" " -v\n" " --vcard wyjÅ›cie w formacie vcard\n" " -l\n" " --ldif wyjÅ›cie w formacje ldif\n" "\n" #: ../gnokii/gnokii-phonebook.c:187 #, c-format msgid "%d. %s: %s\n" msgstr "%d. %s: %s\n" #: ../gnokii/gnokii-phonebook.c:199 msgid "Caller group" msgstr "Grupa dzwoniÄ…cych" #: ../gnokii/gnokii-phonebook.c:208 #, c-format msgid "Address information:\n" msgstr "Informacje adresowe:\n" #: ../gnokii/gnokii-phonebook.c:210 ../gnokii/gnokii-phonebook.c:212 #: ../gnokii/gnokii-phonebook.c:214 ../gnokii/gnokii-phonebook.c:216 #: ../gnokii/gnokii-phonebook.c:218 ../gnokii/gnokii-phonebook.c:220 #: ../gnokii/gnokii-phonebook.c:222 #, c-format msgid " %s: %s\n" msgstr " %s: %s\n" #: ../gnokii/gnokii-phonebook.c:210 msgid "Post office address" msgstr "Adres pocztowy" #: ../gnokii/gnokii-phonebook.c:233 #, c-format msgid "%04u.%02u.%02u %02u:%02u:%02u" msgstr "%04u.%02u.%02u %02u:%02u:%02u" #: ../gnokii/gnokii-phonebook.c:247 #, c-format msgid "Date: %04u.%02u.%02u %02u:%02u:%02u\n" msgstr "Data: %04u.%02u.%02u %02u:%02u:%02u\n" #: ../gnokii/gnokii-phonebook.c:252 #, c-format msgid "Empty memory location. Skipping.\n" msgstr "Puste miejsce w pamiÄ™ci. Pomijane.\n" #: ../gnokii/gnokii-phonebook.c:255 #, c-format msgid "Error reading from the location %d in memory %s\n" msgstr "Nieudany odczyt pozycji %d z pamiÄ™ci %s\n" #: ../gnokii/gnokii-phonebook.c:272 #, c-format msgid "" " usage: --writephonebook [[-o|--overwrite]|[-f|--find-free]]\n" " [-m|--memory-type|--memory memory_type]\n" " [-n|--memory-location|--location number]\n" " [[-v|--vcard]|[-l|--ldif]]\n" "\n" msgstr "" " sposób użycia: --writephonebook [[-o|--overwrite]|[-f|--find-free]]\n" " [-m|--memory-type|--memory typ_pamiÄ™ci]\n" " [-n|--memory-location|--location numer]\n" " [[-v|--vcard]|[-l|--ldif]]\n" "\n" #: ../gnokii/gnokii-phonebook.c:416 #, c-format msgid "Location busy. " msgstr "PoÅ‚ożenie zajÄ™te. " #: ../gnokii/gnokii-phonebook.c:419 ../gnokii/gnokii-sms.c:540 #: ../gnokii/gnokii-sms.c:831 ../gnokii/gnokii-utils.c:61 #, c-format msgid "Overwrite? (yes/no) " msgstr "Nadpisać? (tak/nie) " #: ../gnokii/gnokii-phonebook.c:423 ../gnokii/gnokii-sms.c:543 #: ../gnokii/gnokii-utils.c:65 ../gnokii/gnokii-wap.c:223 msgid "no" msgstr "nie" #: ../gnokii/gnokii-phonebook.c:426 #, c-format msgid "" "\n" "Incorrect answer [%s]. Assuming 'no'.\n" msgstr "" "\n" "Niepoprawna odpowiedź [%s]. ZakÅ‚adam 'nie'.\n" #: ../gnokii/gnokii-phonebook.c:446 #, c-format msgid "Write Succeeded: memory type: %s, loc: %d, name: %s, number: %s\n" msgstr "" "Zapisano pomyÅ›lnie: typ pamiÄ™ci: %s, pozycja: %d, nazwa: %s, numer: %s\n" #: ../gnokii/gnokii-phonebook.c:453 ../gnokii/gnokii-phonebook.c:458 #, c-format msgid "Write failed (%s): memory type: %s, loc: %d, name: %s, number: %s\n" msgstr "" "Nieudany zapis (%s): typ pamiÄ™ci: %s, pozycja: %d, nazwa: %s, numer: %s\n" #: ../gnokii/gnokii-phonebook.c:466 #, c-format msgid "" " usage: --deletephonebook memory_type start_number [end_number|end]\n" "\n" msgstr "" " sposób użycia: --deletephonebook typ_pamiÄ™ci poczÄ…tek [koniec|end]\n" "\n" #: ../gnokii/gnokii-phonebook.c:505 #, c-format msgid "Phonebook entry removed: memory type: %s, loc: %d\n" msgstr "Wpis usuniÄ™ty z książki adresowej: typ pamiÄ™ci: %s, pozycja: %d\n" #: ../gnokii/gnokii-phonebook.c:512 #, c-format msgid "Phonebook entry removal FAILED (%s): memory type: %s, loc: %d\n" msgstr "" "Nieudana próba usuniÄ™cia wpisu z książki adresowej (%s): typ pamiÄ™ci: %s, " "pozycja: %d\n" #: ../gnokii/gnokii-profile.c:55 #, c-format msgid "" "Profile options:\n" " --getprofile [start_number [end_number]] [-r|--raw]\n" " --setprofile\n" " --getactiveprofile\n" " --setactiveprofile profile_number\n" msgstr "" "Opcje obsÅ‚ugi profili:\n" " --getprofile [poczÄ…tek [koniec]] [-r|--raw]\n" " --setprofile\n" " --getactiveprofile\n" " --setactiveprofile numer_profilu\n" #: ../gnokii/gnokii-profile.c:65 #, c-format msgid " usage: --getprofile [start_number [end_number]] [-r|--raw]\n" msgstr " sposób użycia: --getprofile [poczÄ…tek [koniec]] [-r|--raw]\n" #: ../gnokii/gnokii-profile.c:133 #, c-format msgid "Starting profile number is greater than stop\n" msgstr "PoczÄ…tkowy numer profilu jest wiÄ™kszy niż koÅ„cowy\n" #: ../gnokii/gnokii-profile.c:138 #, c-format msgid "Profile number must be value from 0 to %d!\n" msgstr "Numer profilu musi mieć wartość od 0 do %d!\n" #: ../gnokii/gnokii-profile.c:143 #, c-format msgid "This phone supports only %d profiles!\n" msgstr "Ten telefon obsÅ‚uguje tylko %d profili!\n" #: ../gnokii/gnokii-profile.c:161 ../gnokii/gnokii-profile.c:254 #, c-format msgid "Cannot get profile %d\n" msgstr "Nieudana próba pobrania profilu %d!\n" #. Translators: %d is the profile number, %s is the profile name. Example: 1. "Outdoors" #: ../gnokii/gnokii-profile.c:175 #, c-format msgid "%d. \"%s\"\n" msgstr "%d. \"%s\"\n" #: ../gnokii/gnokii-profile.c:176 #, c-format msgid " (name defined)\n" msgstr " (nazwa przypisana)\n" #: ../gnokii/gnokii-profile.c:177 #, c-format msgid "Incoming call alert: %s\n" msgstr "Rozmowa przychodzÄ…ca: %s\n" #: ../gnokii/gnokii-profile.c:178 #, c-format msgid "Ringing tone: %s (%d)\n" msgstr "Dzwonek: %s (%d)\n" #: ../gnokii/gnokii-profile.c:179 #, c-format msgid "Ringing volume: %s\n" msgstr "GÅ‚oÅ›ność dzwonka: %s\n" #: ../gnokii/gnokii-profile.c:180 #, c-format msgid "Message alert tone: %s\n" msgstr "SygnaÅ‚ nadejÅ›cia wiadomoÅ›ci: %s\n" #: ../gnokii/gnokii-profile.c:181 #, c-format msgid "Keypad tones: %s\n" msgstr "DźwiÄ™ki klawiatury: %s\n" #: ../gnokii/gnokii-profile.c:182 #, c-format msgid "Warning and game tones: %s\n" msgstr "Ostrzeżenia i dźwiÄ™ki gier: %s\n" #. FIXME: Light settings is only used for Car #: ../gnokii/gnokii-profile.c:185 #, c-format msgid "Lights: %s\n" msgstr "PodÅ›wietlanie: %s\n" #: ../gnokii/gnokii-profile.c:186 #, c-format msgid "Vibration: %s\n" msgstr "Wibracja: %s\n" #. FIXME: it will be nice to add here reading caller group name. #: ../gnokii/gnokii-profile.c:189 #, c-format msgid "Caller groups: 0x%02x\n" msgstr "Grupy dzwoniÄ…cych: 0x%02x\n" #. FIXME: Automatic answer is only used for Car and Headset. #: ../gnokii/gnokii-profile.c:192 #, c-format msgid "Automatic answer: %s\n" msgstr "Automatyczna odpowiedź: %s\n" #: ../gnokii/gnokii-profile.c:223 ../gnokii/gnokii-sms.c:1120 #: ../gnokii/gnokii-wap.c:285 #, c-format msgid "Input line format isn't valid\n" msgstr "Format wiersza wejÅ›ciowego jest niepoprawny\n" #: ../gnokii/gnokii-profile.c:229 #, c-format msgid "Cannot set profile: %s\n" msgstr "Nieudana próba zapisu profilu: %s\n" #: ../gnokii/gnokii-profile.c:248 #, c-format msgid "Cannot get active profile: %s\n" msgstr "Nieudane pobranie aktywnego profilu: %s\n" #: ../gnokii/gnokii-profile.c:256 #, c-format msgid "Active profile: %d (%s)\n" msgstr "Aktywny profil: %d (%s)\n" #: ../gnokii/gnokii-profile.c:263 #, c-format msgid " usage: --setactiveprofile profile_number\n" msgstr " sposób użycia: --getactiveprofile numer_profilu\n" #: ../gnokii/gnokii-profile.c:281 #, c-format msgid "Cannot set active profile to %d: %s\n" msgstr "Nieudana zmiana aktywnego profilu na %d: %s\n" #: ../gnokii/gnokii-ringtone.c:96 #, c-format msgid "" "Ringtone options:\n" " --sendringtone rtttlfile destination\n" " --getringtone rtttlfile [location] [-r|--raw]\n" " --setringtone rtttlfile [location] [-r|--raw] [--name name]\n" " --playringtone rtttlfile [--volume vol]\n" " --ringtoneconvert source destination\n" " --getringtonelist\n" " --deleteringtone start [end]\n" msgstr "" "Opcje obsÅ‚ugi dzwonków:\n" " --sendringtone plik_rtttl numer\n" " --getringtone plik_rtttl [pozycja] [-r|--raw]\n" " --setringtone plik_rtttl [pozycja] [-r|--raw] [--name nazwa]\n" " --playringtone plik_rtttl [--volume gÅ‚oÅ›ność]\n" " --ringtoneconvert plik_źródÅ‚owy plik_docelowy\n" " --getringtonelist\n" " --deleteringtone poczÄ…tek [koniec]\n" #: ../gnokii/gnokii-ringtone.c:117 ../gnokii/gnokii-ringtone.c:392 #: ../gnokii/gnokii-ringtone.c:447 #, c-format msgid "Failed to load ringtone: %s\n" msgstr "Nieudana próba zaÅ‚adowania dzwonka: %s\n" #: ../gnokii/gnokii-ringtone.c:162 #, c-format msgid " usage: --getringtone rtttlfile [location] [-r|--raw]\n" msgstr " sposób użycia: --getringtone plik_rtttl [pozycja] [-r|--raw]\n" #: ../gnokii/gnokii-ringtone.c:216 #, c-format msgid "Getting ringtone %d failed: %s\n" msgstr "Pobieranie dzwonka %d nie udaÅ‚o siÄ™: %s\n" #: ../gnokii/gnokii-ringtone.c:219 #, c-format msgid "Getting ringtone %d (\"%s\") succeeded!\n" msgstr "Pobranie dzwonka %d (\"%s\") udaÅ‚o siÄ™!\n" #: ../gnokii/gnokii-ringtone.c:222 ../gnokii/gnokii-ringtone.c:303 #: ../gnokii/gnokii-ringtone.c:387 #, c-format msgid "Internal gnokii error: null filename\n" msgstr "WewnÄ™trzny błąd gnokii: pusta nazwa pliku\n" #: ../gnokii/gnokii-ringtone.c:231 #, c-format msgid "Failed to save ringtone.\n" msgstr "Nie udaÅ‚o siÄ™ zapisać dzwonka.\n" #: ../gnokii/gnokii-ringtone.c:236 #, c-format msgid "Failed to write ringtone.\n" msgstr "Nie udaÅ‚o siÄ™ zapisać dzwonka.\n" #: ../gnokii/gnokii-ringtone.c:242 ../gnokii/gnokii-ringtone.c:451 #, c-format msgid "Failed to save ringtone: %s\n" msgstr "Nie udaÅ‚o siÄ™ zapisać dzwonka: %s\n" #: ../gnokii/gnokii-ringtone.c:252 #, c-format msgid " usage: --setringtone rtttlfile [location] [-r|--raw] [--name name]\n" msgstr "" " sposób użycia: --setringtone plik_rtttl [pozycja] [-r|--raw] [--name " "nazwa]\n" #: ../gnokii/gnokii-ringtone.c:311 ../gnokii/gnokii-ringtone.c:324 #, c-format msgid "Failed to load ringtone.\n" msgstr "Nieudana próba zaÅ‚adowania dzwonka.\n" #: ../gnokii/gnokii-ringtone.c:333 #, c-format msgid "Send succeeded!\n" msgstr "WysÅ‚ano.\n" #: ../gnokii/gnokii-ringtone.c:335 #, c-format msgid "Send failed: %s\n" msgstr "WysyÅ‚anie nieudane: %s\n" #: ../gnokii/gnokii-ringtone.c:342 #, c-format msgid " usage: --playringtone rtttlfile [-v|--volume vol]\n" msgstr " sposób użycia: --playringtone plik_rtttl [--volume gÅ‚oÅ›ność]\n" #: ../gnokii/gnokii-ringtone.c:424 #, c-format msgid "Play succeeded!\n" msgstr "Odegrano!\n" #: ../gnokii/gnokii-ringtone.c:426 #, c-format msgid "Play failed: %s\n" msgstr "Nieudane odegranie:%s\n" #: ../gnokii/gnokii-ringtone.c:433 #, c-format msgid " usage: --ringtoneconvert source destination\n" msgstr " sposób użycia: --ringtoneconvert plik_źródÅ‚owy plik_docelowy\n" #: ../gnokii/gnokii-ringtone.c:455 #, c-format msgid "%d note(s) converted.\n" msgstr "%d nut przekonwertowanych.\n" #: ../gnokii/gnokii-ringtone.c:467 #, c-format msgid "Failed to get the list of ringtones\n" msgstr "Nieudana próba pobrania listy dzwonków.\n" #: ../gnokii/gnokii-ringtone.c:471 #, c-format msgid "First user defined ringtone location: %3d\n" msgstr "Pierwsza pozycja dla dzwonków użytkownika: %3d\n" #: ../gnokii/gnokii-ringtone.c:472 #, c-format msgid "" "Number of user defined ringtones: %d\n" "\n" msgstr "" "Liczba dzwonków użytkownika: %d\n" "\n" #: ../gnokii/gnokii-ringtone.c:473 #, c-format msgid "loc rwu name\n" msgstr "poz rwu nazwa\n" #: ../gnokii/gnokii-ringtone.c:474 #, c-format msgid "===============================\n" msgstr "===============================\n" #: ../gnokii/gnokii-ringtone.c:476 #, c-format msgid "%3d %d%d%d %-20s\n" msgstr "%3d %d%d%d %-20s\n" #: ../gnokii/gnokii-ringtone.c:488 #, c-format msgid " usage: --deleteringtone start [end]\n" msgstr " sposób użycia: --deleteringtone poczÄ…tek [koniec]\n" #: ../gnokii/gnokii-ringtone.c:512 #, c-format msgid "Ringtone %d deleted\n" msgstr "Dzwonek %d zostaÅ‚ usuniÄ™ty\n" #: ../gnokii/gnokii-ringtone.c:514 #, c-format msgid "Failed to delete ringtone %d: %s\n" msgstr "Nieudana próba usuniÄ™cia dzwonka %d: %s\n" #: ../gnokii/gnokii-security.c:59 #, c-format msgid "" "Security options:\n" " --identify\n" " --getlocksinfo\n" msgstr "" "Opcje bezpieczeÅ„stwa:\n" " --identify\n" " --getlocksinfo\n" #: ../gnokii/gnokii-security.c:65 #, c-format msgid "" " --entersecuritycode PIN|PIN2|PUK|PUK2|SEC [COMMAND]\n" " --getsecuritycodestatus\n" " --getsecuritycode\n" " --changesecuritycode PIN|PIN2|PUK|PUK2\n" msgstr "" " --entersecuritycode PIN|PIN2|PUK|PUK2|SEC [POLECENIE]\n" " --getsecuritycodestatus\n" " --getsecuritycode\n" " --changesecuritycode PIN|PIN2|PUK|PUK2\n" #: ../gnokii/gnokii-security.c:75 #, c-format msgid "IMEI : %s\n" msgstr "IMEI : %s\n" #: ../gnokii/gnokii-security.c:76 #, c-format msgid "Manufacturer : %s\n" msgstr "Producent : %s\n" #: ../gnokii/gnokii-security.c:77 #, c-format msgid "Model : %s\n" msgstr "Model : %s\n" #: ../gnokii/gnokii-security.c:78 #, c-format msgid "Product name : %s\n" msgstr "Nazwa produktu : %s\n" #: ../gnokii/gnokii-security.c:79 #, c-format msgid "Revision : %s\n" msgstr "Wydanie : %s\n" #: ../gnokii/gnokii-security.c:100 #, c-format msgid "%7s : %10s, %7s, %6s, counter %d\n" msgstr "%7s : %10s, %7s, %6s, licznik %d\n" #: ../gnokii/gnokii-security.c:120 #, c-format msgid "Getting security code... \n" msgstr "Pobieranie kodu zabezpieczajÄ…cego...\n" #: ../gnokii/gnokii-security.c:124 #, c-format msgid "Security code is: %s\n" msgstr "Kod zabezpieczajÄ…cy to: %s\n" #: ../gnokii/gnokii-security.c:168 #, c-format msgid " usage: --entersecuritycode PIN|PIN2|PUK|PUK2|SEC\n" msgstr " sposób użycia: --entersecuritycode PIN|PIN2|PUK|PUK2|SEC\n" #: ../gnokii/gnokii-security.c:193 ../gnokii/gnokii-security.c:281 msgid "Enter your code: " msgstr "Wprowadź kod: " #: ../gnokii/gnokii-security.c:202 #, c-format msgid "Code ok.\n" msgstr "Kod poprawny.\n" #: ../gnokii/gnokii-security.c:221 #, c-format msgid "Security code status: " msgstr "Stan kodu zabezpieczajÄ…cego: " #: ../gnokii/gnokii-security.c:225 #, c-format msgid "waiting for Security Code.\n" msgstr "czeka na kod zabezpieczajÄ…cy.\n" #: ../gnokii/gnokii-security.c:228 #, c-format msgid "waiting for PIN.\n" msgstr "czeka na PIN.\n" #: ../gnokii/gnokii-security.c:231 #, c-format msgid "waiting for PIN2.\n" msgstr "czeka na PIN2.\n" #: ../gnokii/gnokii-security.c:234 #, c-format msgid "waiting for PUK.\n" msgstr "czeka na PUK.\n" #: ../gnokii/gnokii-security.c:237 #, c-format msgid "waiting for PUK2.\n" msgstr "czeka na PUK2.\n" #: ../gnokii/gnokii-security.c:240 #, c-format msgid "nothing to enter.\n" msgstr "nic do wprowadzenia.\n" #: ../gnokii/gnokii-security.c:243 #, c-format msgid "unknown\n" msgstr "nieznana\n" #: ../gnokii/gnokii-security.c:254 #, c-format msgid " usage: --changesecuritycode PIN|PIN2|PUK|PUK2\n" msgstr " sposób użycia: --changesecuritycode PIN|PIN2|PUK|PUK2\n" #: ../gnokii/gnokii-security.c:282 msgid "Enter new code: " msgstr "Wprowadź nowy kod: " #: ../gnokii/gnokii-security.c:283 msgid "Retype new code: " msgstr "Powtórz nowy kod: " #: ../gnokii/gnokii-security.c:285 #, c-format msgid "Error: new code differs\n" msgstr "Błąd: kody siÄ™ nie zgadzajÄ…\n" #: ../gnokii/gnokii-security.c:295 #, c-format msgid "Code changed.\n" msgstr "Kod zmieniony.\n" #: ../gnokii/gnokii-settings.c:56 #, c-format msgid "" "Phone settings:\n" " --reset [soft|hard]\n" " --setdatetime [YYYY [MM [DD [HH [MM]]]]]\n" " --getdatetime\n" " --setalarm [HH MM]\n" " --getalarm\n" msgstr "" "Ustawienia telefonu:\n" " --reset [soft|hard]\n" " --setdatetime [YYYY [MM [DD [HH [MM]]]]]\n" " --getdatetime\n" " --setalarm [HH MM]\n" " --getalarm\n" #: ../gnokii/gnokii-settings.c:142 #, c-format msgid "Date: %4d/%02d/%02d\n" msgstr "Data: %4d/%02d/%02d\n" #: ../gnokii/gnokii-settings.c:143 #, c-format msgid "Time: %02d:%02d:%02d\n" msgstr "Czas: %02d:%02d:%02d\n" #: ../gnokii/gnokii-settings.c:200 #, c-format msgid "Alarm: %s\n" msgstr "Alarm: %s\n" #: ../gnokii/gnokii-settings.c:201 #, c-format msgid "Time: %02d:%02d\n" msgstr "Czas: %02d:%02d\n" #: ../gnokii/gnokii-settings.c:223 #, c-format msgid "What kind of reset do you want??\n" msgstr "Jakiego typu resetu sobie życzysz?\n" #: ../gnokii/gnokii-sms.c:63 #, c-format msgid "" "SMS options:\n" " --sendsms destination [--smsc message_center_number |\n" " --smscno message_center_index] [-r|--report] [-8|--8bit]\n" " [-C|--class n] [-v|--validity n]\n" " [-i|--imelody] [-a|--animation file;file;file;file]\n" " [-o|--concat this;total;serial] [-w|--wappush url]\n" " --savesms [--sender from] [--smsc message_center_number |\n" " --smscno message_center_index] [-f|--folder folder_id]\n" " [-l|--location number] [-s|--sent|-r|--read] [-d|--" "deliver]\n" " [-t|--datetime YYMMDDHHMMSS]\n" " --getsms memory_type start [end] [-f|--file file]\n" " [-F|--force-file file] [-a|--append-file file]\n" " [-d|--delete]\n" " --deletesms memory_type start [end]\n" " --getsmsc [start_number [end_number]] [-r|--raw]\n" " --setsmsc\n" " --createsmsfolder name\n" " --deletesmsfolder folderid\n" " --showsmsfolderstatus\n" " --smsreader\n" msgstr "" "Opcje SMS:\n" " --sendsms numer [--smsc numer_centrum_sms |\n" " --smscno id_centrum_sms] [-r|--report] [-8|--8bit]\n" " [-C|--class n] [-v|--validity n]\n" " [-i|--imelody] [-a|--animation plik;plik;plik;plik]\n" " [-o|--concat x;y;z] [-w|--wappush url]\n" " --savesms [--sender od] [--smsc numer_centrum_sms |\n" " --smscno id_centrum_sms] [-f|--folder id_folderu]\n" " [-l|--location numer] [-s|--sent|-r|--read] [-d|--deliver]\n" " [-t|--datetime YYMMDDHHMMSS]\n" " --getsms typ_pamiÄ™ci poczÄ…tek [koniec] [-f|--file plik]\n" " [-F|--force-file plik] [-a|--append-file plik]\n" " [-d|--delete]\n" " --deletesms typ_pamiÄ™ci poczÄ…tek [koniec]\n" " --getsmsc [poczÄ…tek [koniec]] [-r|--raw]\n" " --setsmsc\n" " --createsmsfolder nazwa\n" " --deletesmsfolder id_folderu\n" " --showsmsfolderstatus\n" " --smsreader\n" #: ../gnokii/gnokii-sms.c:88 #, c-format msgid "" " usage: --sendsms destination recipient number (msisdn)\n" " --smsc message_center_number number (msisdn) of the message\n" " center\n" " --smscno message_center_index index of the message center " "stored\n" " in the phone memory\n" " -r\n" " --report request delivery report\n" " -v n\n" " --validity n set message validity\n" " -C n\n" " --class n set message class; possible " "values\n" " are 0, 1, 2, or 3\n" " -8\n" " --8bit set 8bit coding\n" " -i\n" " --imelody send imelody message, text is " "read\n" " from stdin\n" " -a file;file;file;file\n" " --animation file;file;file;file send animation message\n" " -o this;total;serial\n" " --concat this;total;serial send 'this' part of all 'total' " "parts\n" " identified by 'serial'\n" " -w url\n" " --wappush url send wappush to the given url\n" "Message text is read from standard input.\n" "\n" msgstr "" "sposób użycia:\n" " --sendsms numer numer odbiorcy\n" " --smsc numer_centrum_sms numer centrum sms\n" " --smscno id_centrum_sms pozycja zapisanego centrum sms w\n" " telefonie\n" " -r\n" " --report pokaż raport dorÄ™czenia\n" " -v n\n" " --validity n ustaw termin ważnoÅ›ci wiadomoÅ›ci\n" " -C n\n" " --class n ustaw klasÄ™ wiadomoÅ›ci; możliwe\n" " wartoÅ›ci to 0, 1, 2 lub 3\n" " -8\n" " -8bit użyj 8-bitowego kodowania\n" " -i\n" " --imelody wyÅ›lij wiadomość imelody, tekst\n" " jest odczytywany ze " "standardowego\n" " wejÅ›cia\n" " -a plik;plik;plik;plik\n" " --animation plik;plik;plik;plik wyÅ›lij wiadomość z animacjÄ…\n" " -o x;y;z\n" " --concat x;y;z wyÅ›lij wieloczęściowÄ… wiadomość:\n" " część x z łącznej liczby y o\n" " identyfikatorze z\n" " -w url\n" " --wappush url wyÅ›lij wappush pod wskazany url\n" "Tekst wiadomoÅ›ci jest odczytywany ze standardowego wejÅ›cia.\n" "\n" #: ../gnokii/gnokii-sms.c:220 #, c-format msgid "Incorrect --concat option\n" msgstr "nieprawidÅ‚owa opcja --concat\n" #: ../gnokii/gnokii-sms.c:267 ../gnokii/gnokii-sms.c:574 #, c-format msgid "Empty message. Quitting.\n" msgstr "Pusta wiadomość. Koniec.\n" #: ../gnokii/gnokii-sms.c:278 #, c-format msgid "URL is too long (max 255 chars). Quitting.\n" msgstr "" "URL jest zbyt dÅ‚ugi (maksymalna dÅ‚ugość to 255 znaków). Koniec pracy.\n" #: ../gnokii/gnokii-sms.c:287 ../gnokii/gnokii-utils.c:139 #, c-format msgid "Please enter SMS text. End your input with :\n" msgstr "Wprowadź treść SMS-a. ZakoÅ„cz przez :\n" #: ../gnokii/gnokii-sms.c:294 #, c-format msgid "WAP Push encoding failed!\n" msgstr "Nieudana próba zakodowania WAP Push!\n" #: ../gnokii/gnokii-sms.c:329 #, c-format msgid "" "Cannot read the SMSC number from your phone. If the sms send will fail, " "please use --smsc option explicitely giving the number.\n" msgstr "" "Nie mogÄ™ odczytać numeru SMSC z telefonu. Jesli wysÅ‚anie SMS siÄ™ nie " "powiedzie, użyj opcji --smsc do podania numeru SMSC wprost.\n" #: ../gnokii/gnokii-sms.c:368 #, c-format msgid "" " usage: --savesms\n" " --smsc message_center_number number (msisdn) of the message\n" " center\n" " --smscno message_center_index index of the message center stored\n" " in the phone memory\n" " --sender msisdn set sender number\n" " -l n\n" " --location n save message at location n\n" " -r\n" " --read mark message as read\n" " -s\n" " --sent mark message as sent\n" " -f ID\n" " --folder ID save message to the folder ID where\n" " is of type IN, OU...\n" " -d\n" " --deliver set message type as sms deliver\n" " (to be sent)\n" " -t YYMMDDHHMISS\n" " --datetime YYMMDDHHMISS set date and time of message " "delivery\n" "Message text is read from standard input.\n" "\n" msgstr "" " sposób użycia:\n" " --savesms\n" " --smsc numer_centrum_sms numer centrum sms\n" " --smscno id_centrum_sms identyfikator centrum sms z pamiÄ™ci " "telefonu\n" " --sender numer numer nadawcy\n" " -l n\n" " --location n pozycja w pamiÄ™ci do zapisania wiadomoÅ›ci\n" " -r\n" " --read oznacza wiadomość jako przeczytanÄ…\n" " -s\n" " --sent oznacza wiadomość jako wysÅ‚anÄ…\n" " -f ID\n" " --folder ID zapisuje wiadomość w folderze ID (IN, " "OU, ...)\n" " -d\n" " --deliver oznacz wiadomość jako wiadomość do wysÅ‚ania\n" " -t YYMMDDHHMISS\n" " --datetime YYMMDDHHMISS ustaw czas i datÄ™ wiadomoÅ›ci\n" "Tekst wiadomoÅ›ci jest odczytywany ze standardowego wejÅ›cia.\n" "\n" #: ../gnokii/gnokii-sms.c:496 ../gnokii/gnokii-sms.c:501 #, c-format msgid "Invalid datetime format: %s (should be YYMMDDHHMISS, all digits)!\n" msgstr "NieprawidÅ‚owy format daty: %s (użyj YYMMDDHHSS, jedynie cyfry)!\n" #: ../gnokii/gnokii-sms.c:517 #, c-format msgid "Invalid datetime: %s.\n" msgstr "NieprawidÅ‚owy format daty: %s.\n" #: ../gnokii/gnokii-sms.c:538 #, c-format msgid "Message at specified location exists. " msgstr "Istnieje już wiadomość na tej pozycji." #: ../gnokii/gnokii-sms.c:585 #, c-format msgid "Storing SMS... " msgstr "ZapisujÄ™ SMS..." #: ../gnokii/gnokii-sms.c:591 #, c-format msgid "Saved to %d!\n" msgstr "Zapisano do %d!\n" #: ../gnokii/gnokii-sms.c:593 #, c-format msgid "Saving failed (%s)\n" msgstr "Zapisywanie nieudane (%s)\n" #: ../gnokii/gnokii-sms.c:601 #, c-format msgid "" " usage: --getsms memory start [end] retrieves messages from memory type " "(SM, ME,\n" " IN, OU, ...) starting from\n" " location start and ending with end;\n" " if end option is omitted, just one " "entry\n" " is read;\n" " start must be a number, end may be a " "number\n" " or 'end' string;\n" " if 'end' is used entries are being read\n" " until empty location\n" " --force-file filename\n" " -F filename save sms to the file overwriting it if\n" " the file already exists;\n" " file is in mbox format\n" " --file filename\n" " -f filename as above but user is prompted before\n" " overwriting the file\n" " --append-file filename\n" " -a filename as above but append to the existing " "file\n" " --delete\n" " -d delete message after reading\n" "\n" msgstr "" " sposób użycia:\n" " --getsms typ_pamiÄ™ci poczÄ…tek [koniec] odczytuje wiadomoÅ›ci z " "typ_pamiÄ™ci\n" " (SM, ME, IN, OU, ...) od pozycji\n" " poczÄ…tek do pozycji koniec; jeÅ›li\n" " koniec nie jest podany, " "odczytywana\n" " jest tylko jedna pozycja;\n" " poczÄ…tek musi być liczbÄ…, koniec " "może\n" " być liczbÄ… lub napisem 'end'; " "'end'\n" " oznacza odczytanie wszystkich\n" " wiadomoÅ›ci do koÅ„ca\n" " --force-file plik\n" " -F plik zapisuje SMS do pliku nadpisujÄ…c " "go,\n" " jeżeli istnieje;\n" " jeÅ›li odczytywanych jest wiele " "SMSów\n" " do nazwy pliku dodawany jest\n" " identyfikator wiadomoÅ›ci;\n" " plik jest w formacie mbox\n" " --file plik\n" " -f plik jak powyżej, ale użytkownik jest " "pytany\n" " przed nadpisaniem pliku\n" " --append-file plik\n" " -a plik jak powyżej, ale dopisuje do " "pliku\n" " --delete\n" " -d usuwa wiadomość po odczytaniu\n" "\n" #: ../gnokii/gnokii-sms.c:752 #, c-format msgid "Sending date/time: %02d/%02d/%04d %02d:%02d:%02d " msgstr "Data wysÅ‚ania: %02d/%02d/%04d %02d:%02d:%02d " #. Translators: this format is for printing a timezone with a leading +/- #: ../gnokii/gnokii-sms.c:757 ../gnokii/gnokii-sms.c:765 #: ../gnokii/gnokii-sms.c:779 ../gnokii/gnokii-sms.c:794 #, c-format msgid "%+03d00" msgstr "%+03d00" #: ../gnokii/gnokii-sms.c:760 #, c-format msgid "Delivery date/time: %02d/%02d/%04d %02d:%02d:%02d " msgstr "Data/czas dorÄ™czenia: %02d/%02d/%04d %02d:%02d:%02d " #: ../gnokii/gnokii-sms.c:768 ../gnokii/gnokii-sms.c:800 #, c-format msgid "Recipient: %s Msg Center: %s\n" msgstr "Odbiorca: %s Centrum wiadomoÅ›ci: %s\n" #: ../gnokii/gnokii-sms.c:769 ../gnokii/gnokii-sms.c:785 #, c-format msgid "Text:\n" msgstr "Tekst:\n" #: ../gnokii/gnokii-sms.c:774 ../gnokii/gnokii-sms.c:789 #, c-format msgid "Date/time: %02d/%02d/%04d %02d:%02d:%02d " msgstr "Data/czas: %02d/%02d/%04d %02d:%02d:%02d " #: ../gnokii/gnokii-sms.c:782 ../gnokii/gnokii-sms.c:803 #, c-format msgid "Sender: %s Msg Center: %s\n" msgstr "Nadawca: %s Centrum SMS: %s\n" #: ../gnokii/gnokii-sms.c:783 #, c-format msgid "Bitmap:\n" msgstr "Obrazek:\n" #: ../gnokii/gnokii-sms.c:809 #, c-format msgid "%s:\n" msgstr "%s:\n" #: ../gnokii/gnokii-sms.c:814 #, c-format msgid "GSM operator logo for %s (%s) network.\n" msgstr "Logo operatora sieci %s (%s).\n" #: ../gnokii/gnokii-sms.c:816 #, c-format msgid "Saved by Logo Express\n" msgstr "Zapisane przez Logo Express\n" #: ../gnokii/gnokii-sms.c:818 #, c-format msgid "Saved by Operator Logo Uploader by Thomas Kessler\n" msgstr "Zapisane przez Logo Uploadera Thomasa Kesslera\n" #: ../gnokii/gnokii-sms.c:830 ../gnokii/gnokii-utils.c:59 #, c-format msgid "File %s exists.\n" msgstr "Plik %s istnieje.\n" #: ../gnokii/gnokii-sms.c:839 #, c-format msgid "Couldn't save logofile %s!\n" msgstr "Nieudana próba zapisu pliku logo %s!\n" #: ../gnokii/gnokii-sms.c:847 #, c-format msgid "Linked (%d/%d):\n" msgstr "Połączony (%d/%d):\n" #: ../gnokii/gnokii-sms.c:882 #, c-format msgid "Getting SMS failed (location %d from %s memory)! (%s)\n" msgstr "Nieudany odczyt SMS %d z pamiÄ™ci %s! (%s)\n" #: ../gnokii/gnokii-sms.c:910 #, c-format msgid "" " usage: --deletesms memory start [end] deletes messages from memory type\n" " (SM, ME, IN, OU, ...) starting\n" " from location start and ending with " "end;\n" " if end option is omitted, just one " "entry\n" " is removed;\n" " if 'end' is used entries are being " "removed\n" " until empty location\n" "\n" msgstr "" " sposób użycia:\n" " --deletesms typ_pamiÄ™ci poczÄ…tek [koniec] usuwa wiadomoÅ›ci z typ_pamiÄ™ci\n" " (SM, ME, IN, OU, ...) od " "pozycji\n" " poczÄ…tek do pozycji koniec; " "jeÅ›li\n" " koniec nie jest podany, " "usuwana\n" " jest tylko jedna pozycja;\n" " poczÄ…tek musi być liczbÄ…, " "koniec może\n" " być liczbÄ… lub napisem 'end'; " "'end'\n" " oznacza usuniÄ™cie wszystkich\n" " wiadomoÅ›ci do koÅ„ca\n" #: ../gnokii/gnokii-sms.c:957 #, c-format msgid "Deleted SMS (location %d from memory %s)\n" msgstr "UsuniÄ™to SMS (pozycja %d z pamiÄ™ci %s)\n" #: ../gnokii/gnokii-sms.c:961 #, c-format msgid "Deleting SMS failed (location %d from %s memory)! (%s)\n" msgstr "Nieudane usuniÄ™cie SMS (pozycja %d z pamiÄ™ci %s)! (%s)\n" #: ../gnokii/gnokii-sms.c:974 #, c-format msgid "" " usage: --getsmsc [start [end]] reads message center details from\n" " the phone starting with start location\n" " and ending with end location;\n" " no end parameter means to read every\n" " location to the end;\n" " no start parameter means to start with\n" " the first location;\n" "-r\n" "--raw output in raw format (comma separated)\n" " default is human readable form\n" "\n" msgstr "" " sposób użycia:\n" " --getsmsc [poczatek [koniec]] odczytuje szczegóły centrum wiadomoÅ›ci\n" " rozpoczynajÄ…c od pozycji poczÄ…tek i " "koÅ„czÄ…c\n" " na pozycji koniec;\n" " brak argumentu koniec oznacza odczytanie\n" " wszystkich pozycji do koÅ„ca;\n" " brak argumentu poczÄ…tek oznacza " "odczytanie\n" " od pierwszej pozycji;\n" "-r\n" "--raw wyjÅ›cie w formacie csv; domyÅ›lnym " "formatem\n" " jest sformatowane wyjÅ›cie\n" "\n" #: ../gnokii/gnokii-sms.c:1025 #, c-format msgid "SMS center: location number must be greater than 0\n" msgstr "Numer pozycji centrum wiadomoÅ›ci musi być wiÄ™kszy niż 0\n" #: ../gnokii/gnokii-sms.c:1061 #, c-format msgid "No. %d: \"%s\" (defined name)\n" msgstr "Nr %d: \"%s\" (zdefiniowana nazwa)\n" #: ../gnokii/gnokii-sms.c:1063 #, c-format msgid "No. %d: \"%s\" (default name)\n" msgstr "Nr %d: \"%s\" (nazwa domyÅ›lna)\n" #: ../gnokii/gnokii-sms.c:1064 #, c-format msgid "SMS center number is %s\n" msgstr "Numer centrum wiadomoÅ›ci to %s\n" #: ../gnokii/gnokii-sms.c:1066 #, c-format msgid "Default recipient number is %s\n" msgstr "DomyÅ›lny numer odbiorcy to %s\n" #: ../gnokii/gnokii-sms.c:1068 #, c-format msgid "No default recipient number is defined\n" msgstr "DomyÅ›lny numer odbiorcy nie jest zdefiniowany\n" #: ../gnokii/gnokii-sms.c:1069 #, c-format msgid "Messages sent as %s\n" msgstr "WiadomoÅ›ci wysÅ‚ane jako %s\n" # nie wiem czy dobrze zrobione #: ../gnokii/gnokii-sms.c:1070 #, c-format msgid "Message validity is %s\n" msgstr "Ważność wiadomoÅ›ci to %s\n" #: ../gnokii/gnokii-sms.c:1080 #, c-format msgid "" " usage: --setsmsc\n" "SMSC details are read from standard input.\n" "\n" msgstr "" " sposób użycia: --setsmsc\n" "Szczegóły centrum SMS sÄ… odczytywane ze standardowego wejÅ›cia.\n" "\n" #: ../gnokii/gnokii-sms.c:1137 #, c-format msgid "" " usage: --createsmsfolder name creates SMS folder with given name\n" "\n" msgstr "" " sposób użycia: --createsmsfolder nazwa tworzy folder SMS o podanej nazwie\n" "\n" #: ../gnokii/gnokii-sms.c:1158 #, c-format msgid "Folder with name: %s successfully created!\n" msgstr "PrawidÅ‚owo utworzony folder o nazwie: %s!\n" #: ../gnokii/gnokii-sms.c:1165 #, c-format msgid "" " usage: --deletesmsfolder folderid removes SMS folder with given id\n" "\n" msgstr "" " sposób użycia: --deletesmsfolder id_folderu usuwa folder SMS o podanym\n" " identyfikatorze\n" "\n" #: ../gnokii/gnokii-sms.c:1183 #, c-format msgid "Error: Number must be between 1 and %i!\n" msgstr "Błąd: numer musi siÄ™ zawierać miÄ™dzy 1 a %i!\n" #: ../gnokii/gnokii-sms.c:1191 #, c-format msgid "Number %i of 'My Folders' successfully deleted!\n" msgstr "Numer %i pomyÅ›lnie usuniÄ™ty z Moich folderów!\n" #: ../gnokii/gnokii-sms.c:1198 #, c-format msgid "" " usage: --showsmsfolderstatus shows summary of SMS folders\n" "\n" msgstr "" " sposób użycia: --showsmsfolderstatus pokazuje podsumowanie informacji o\n" " folderach SMS\n" "\n" #: ../gnokii/gnokii-sms.c:1215 #, c-format msgid "Cannot list available folders: %s\n" msgstr "Nie można pokazać dostÄ™pnych folderów: %s\n" #: ../gnokii/gnokii-sms.c:1219 #, c-format msgid "No. Name Id #Msg\n" msgstr "Nr Nazwa Id #Msg\n" #: ../gnokii/gnokii-sms.c:1220 #, c-format msgid "========================================================\n" msgstr "========================================================\n" #: ../gnokii/gnokii-sms.c:1224 #, c-format msgid "Cannot get status of folder \"%s\": %s\n" msgstr "Nie można sprawdzić statusu katalogu \"%s\": %s\n" #: ../gnokii/gnokii-sms.c:1227 #, c-format msgid "%3d %-42s %4s %4u\n" msgstr "%3d %-42s %4s %4u\n" #: ../gnokii/gnokii-sms.c:1250 #, c-format msgid "SMS received from number: %s\n" msgstr "Otrzymano wiadomość od numeru: %s\n" #: ../gnokii/gnokii-sms.c:1259 #, c-format msgid "Got message %d: %s\n" msgstr "Wiadomość %d: %s\n" #: ../gnokii/gnokii-sms.c:1267 #, c-format msgid "### Exists?!\n" msgstr "### Istnieje?!\n" #: ../gnokii/gnokii-sms.c:1273 #, c-format msgid "### Cannot create file %s\n" msgstr "### Nie można utworzyć pliku %s\n" #: ../gnokii/gnokii-sms.c:1297 #, c-format msgid "" " usage: --smsreader periodically check sms on the phone and stores them\n" " in mbox format\n" "\n" msgstr "" " sposób użycia: --smsreader okresowo sprawdza nowe SMS-y w telefonie i\n" " zapisuje je w formacie mbox\n" "\n" #: ../gnokii/gnokii-sms.c:1314 #, c-format msgid "Entered sms reader mode...\n" msgstr "Uruchamiam tryb odczytu wiadomoÅ›ci...\n" #: ../gnokii/gnokii-sms.c:1324 #, c-format msgid "Exiting sms reader mode...\n" msgstr "WychodzÄ™ z trybu odczytu wiadomoÅ›ci...\n" #: ../gnokii/gnokii-todo.c:56 #, c-format msgid "" "ToDo options:\n" " --gettodo start_number [end_number|end] [-v|--vCal]\n" " --writetodo vcalendarfile start_number [end_number|end]\n" " --deletealltodos\n" msgstr "" "Opcje zadaÅ„:\n" " --gettodo poczÄ…tek [koniec|end] [-v|--vCal]\n" " --writetodo plik_vcal poczÄ…tek [koniec|end]\n" " --deletealltodos\n" #: ../gnokii/gnokii-todo.c:65 #, c-format msgid "" "usage: --gettodo start_number [end_number | end] [-v|--vCal]\n" " start_number - entry number in the phone todo (numeric)\n" " end_number - until this entry in the phone todo (numeric, " "optional)\n" " end - the string \"end\" indicates all entries from start to " "end\n" " -v - output in iCalendar format\n" " NOTE: if no end is given, only the start entry is written\n" msgstr "" "sposób użycia:\n" " --gettodo poczÄ…tek [koniec | end] [-v|--vCal] odczytuje zadane pozycje\n" " z listy zadaÅ„ w telefonie\n" " poczÄ…tek - numer pierszej pozycji do odczytania na liÅ›cie zadaÅ„ w\n" " telefonie (liczba)\n" " koniec - numer ostatniej pozycji do odczytania na liÅ›cie zadaÅ„ w\n" " telefonie (liczba, opcjonalnie)\n" " end - napis \"end\" oznacza wszystkie pozycje od poczÄ…tku do " "koÅ„ca\n" " -v - wyjÅ›cie w formacie iCalendar\n" " UWAGA: jeÅ›li nie podana jest ostatnia pozycja, odczytywana jest tylko " "pierwsza\n" #: ../gnokii/gnokii-todo.c:119 msgid "Todo" msgstr "Zadania" #: ../gnokii/gnokii-todo.c:120 msgid "Priority" msgstr "Priorytet" #: ../gnokii/gnokii-todo.c:133 #, c-format msgid "The ToDo note could not be read: %s\n" msgstr "Zadanie nie może być odczytane: %s\n" #: ../gnokii/gnokii-todo.c:142 #, c-format msgid "" "usage: --writetodo vcalendarfile start_number [end_number|end]\n" " vcalendarfile - file containing todo notes in vCal format\n" " start_number - first note to read from file\n" " end_number - last note to read from file\n" " end - read all notes from file from start_number\n" " NOTE: it stores the note at the first empty location.\n" msgstr "" "sposób użycia:\n" " --writetodo plik_vcal poczÄ…tek [koniec|end]\n" " plik_vcal - plik zawierajÄ…cy zadania w formacie vCal\n" " poczÄ…tek - pierwsze zadanie do odczytania z pliku\n" " koniec - ostatnie zadanie do odczytania z pliku\n" " end - czytaj wszystkie zadania poczÄ…wszy od poczÄ…tek\n" " UWAGA: zadania zapisywane sÄ… w wolnych pozycjach pamiÄ™ci telefonu.\n" #: ../gnokii/gnokii-todo.c:216 #, c-format msgid "Priority %d. %s\n" msgstr "Priorytet %d. %s\n" #: ../gnokii/gnokii-todo.c:218 #, c-format msgid "Failed to write ToDo note: %s\n" msgstr "Nieudana próba zapisu zadania: %s\n" #: ../gnokii/gnokii-todo.c:234 #, c-format msgid "Successfully deleted all ToDo notes!\n" msgstr "PomyÅ›lnie usuniÄ™to wszystkie zadania!\n" #: ../gnokii/gnokii-todo.c:236 #, c-format msgid "Failed to delete ToDo note: %s\n" msgstr "Nieudana próba usuniÄ™cia zadania: %s\n" #: ../gnokii/gnokii-utils.c:145 #, c-format msgid "Couldn't read from stdin!\n" msgstr "Błąd podczas czytania ze standardowego wejÅ›cia!\n" #: ../gnokii/gnokii-utils.c:151 #, c-format msgid "Input too long! (%d, maximum is %d)\n" msgstr "WejÅ›cie za dÅ‚ugie (%d, powinno być najwyżej %d)!\n" #: ../gnokii/gnokii-utils.c:166 #, c-format msgid "Could not null bitmap: %s\n" msgstr "Błąd czyszczenia obrazka: %s\n" #: ../gnokii/gnokii-utils.c:171 #, c-format msgid "Could not load bitmap from %s: %s\n" msgstr "Błąd Å‚adowania obrazka z %s: %s\n" #: ../gnokii/gnokii-utils.c:210 #, c-format msgid "" "Warning: end value (%d) is less than start value (%d). Setting it to the " "start value (%d)\n" msgstr "" "Uwaga: wartość koÅ„cowa (%d) jest mniejsza niż wartość poczÄ…tkowa (%d). " "PrzyjmujÄ™ wartość poczÄ…tkowÄ… (%d).\n" #: ../gnokii/gnokii-wap.c:55 #, c-format msgid "" "WAP options:\n" " --getwapbookmark number\n" " --writewapbookmark name URL\n" " --deletewapbookmark number\n" " --getwapsetting number [-r|--raw]\n" " --writewapsetting\n" " --activatewapsetting number\n" msgstr "" "Opcje WAP:\n" " --getwapbookmark numer\n" " --writewapbookmark nazwa URL\n" " --deletewapbookmark numer\n" " --getwapsetting numer [-r|--raw]\n" " --writewapsetting\n" " --activatewapsetting numer\n" #: ../gnokii/gnokii-wap.c:67 #, c-format msgid " usage: --getwapbookmark number\n" msgstr " sposób użycia: --getwapbookmark numer\n" #: ../gnokii/gnokii-wap.c:88 ../gnokii/gnokii-wap.c:219 #, c-format msgid "WAP bookmark nr. %d:\n" msgstr "ZakÅ‚adka WAP nr %d:\n" #: ../gnokii/gnokii-wap.c:103 #, c-format msgid " usage: --writebookmark name URL\n" msgstr " sposób użycia: --writephonebook nazwa URL\n" #: ../gnokii/gnokii-wap.c:126 #, c-format msgid "WAP bookmark nr. %d successfully written!\n" msgstr "ZakÅ‚adka WAP nr %d zapisana pomyÅ›lnie!\n" #: ../gnokii/gnokii-wap.c:138 #, c-format msgid " usage: --deletewapbookmark number\n" msgstr " sposób użycia: --deletewapbookmark numer\n" #: ../gnokii/gnokii-wap.c:159 #, c-format msgid "WAP bookmark nr. %d deleted!\n" msgstr "ZakÅ‚adka WAP nr %d usuniÄ™ta!\n" #: ../gnokii/gnokii-wap.c:171 #, c-format msgid " usage: --getwapsetting number [-r|--raw]\n" msgstr " sposób użycia: --getwapsetting numer [-r|--raw]\n" #: ../gnokii/gnokii-wap.c:221 ../xgnokii/xgnokii_contacts.c:725 #: ../xgnokii/xgnokii_contacts.c:803 ../xgnokii/xgnokii_contacts.c:942 #: ../xgnokii/xgnokii_contacts.c:984 ../xgnokii/xgnokii_contacts.c:1202 msgid "Home" msgstr "Domowy" #: ../gnokii/gnokii-wap.c:222 msgid "Session mode" msgstr "Tryb sesji" #: ../gnokii/gnokii-wap.c:223 msgid "Connection security" msgstr "Połączenie zabezpieczone" #: ../gnokii/gnokii-wap.c:224 msgid "Data bearer" msgstr "NoÅ›nik danych" #: ../gnokii/gnokii-wap.c:226 ../gnokii/gnokii-wap.c:236 msgid "Authentication type" msgstr "Typ uwierzytelnienia" #: ../gnokii/gnokii-wap.c:227 msgid "Data call type" msgstr "Typ połączenia danych" #: ../gnokii/gnokii-wap.c:228 msgid "Data call speed" msgstr "PrÄ™dkość połączenia danych" #: ../gnokii/gnokii-wap.c:229 ../gnokii/gnokii-wap.c:237 msgid "Login type" msgstr "Typ logowania" #: ../gnokii/gnokii-wap.c:230 ../gnokii/gnokii-wap.c:239 msgid "IP" msgstr "IP" #: ../gnokii/gnokii-wap.c:232 ../gnokii/gnokii-wap.c:240 msgid "Username" msgstr "Nazwa użytkownika" #: ../gnokii/gnokii-wap.c:233 ../gnokii/gnokii-wap.c:241 msgid "Password" msgstr "HasÅ‚o" #: ../gnokii/gnokii-wap.c:235 ../xgnokii/xgnokii.c:1615 msgid "Connection" msgstr "Połączenie" #: ../gnokii/gnokii-wap.c:238 msgid "Access point" msgstr "Punkt dostÄ™pu" #: ../gnokii/gnokii-wap.c:243 msgid "Service number" msgstr "Numer usÅ‚ugi" #: ../gnokii/gnokii-wap.c:244 msgid "Server number" msgstr "Numer serwera" #: ../gnokii/gnokii-wap.c:292 #, c-format msgid "Cannot write WAP setting: %s\n" msgstr "Nie można zapisać ustawieÅ„ WAP: %s\n" #: ../gnokii/gnokii-wap.c:299 #, c-format msgid " usage: --activatewapsetting number\n" msgstr " sposób użycua: --activatewapsetting numer\n" #: ../gnokii/gnokii-wap.c:320 #, c-format msgid "WAP setting nr. %d activated!\n" msgstr "Ustawienie WAP nr %d włączone!\n" #: ../smsd/file.c:59 ../smsd/file.c:90 #, c-format msgid "Cannot stat file %s!\n" msgstr "Nieudane pobranie informacji o pliku %s!\n" #: ../smsd/file.c:68 #, c-format msgid "" "File %s is not regular file or\n" "you have not executable permission to this file!\n" msgstr "" "Plik %s nie jest zwykÅ‚em plikiem lub nie masz uprawnieÅ„ do jego " "wykonywania!\n" #: ../smsd/file.c:85 #, c-format msgid "You have not set spool directory, sms sending is disabled!\n" msgstr "" "Katalog wysyÅ‚kowy nie jest skonfigurowany, wiÄ™c wysyÅ‚anie sms jest " "wyłączone!\n" #: ../smsd/file.c:99 #, c-format msgid "" "File %s is not directory or\n" "you have not read and write permissions to this directory,\n" "sms sending is disabled!\n" "!" msgstr "" "Plik %s nie jest katalogiem\n" "lub nie masz uprawnieÅ„ do odczytu i zapisu w tym katalogu.\n" "WysyÅ‚anie sms jest wyłączone!\n" "!" #: ../smsd/file.c:166 #, c-format msgid "Cannot open directory %s\n" msgstr "Nie można otworzyć pliku %s\n" #: ../smsd/file.c:199 #, c-format msgid "Remote number is empty in %s!\n" msgstr "W %s numer nadawcy jest pusty!\n" #: ../smsd/file.c:243 ../smsd/file.c:258 #, c-format msgid "Cannot unlink %s." msgstr "Nie można usunąć %s!" #: ../smsd/file.c:252 #, c-format msgid "Cannot send sms from file %s\n" msgstr "Nieudane wysÅ‚anie sms z pliku %s\n" #: ../smsd/file.c:255 #, c-format msgid "Cannot rename file %s to %s. Trying to unlink it.\n" msgstr "Nieudana zmiana nazwy pliku z %s na %s. Próba usuniÄ™cia.\n" #: ../smsd/lowlevel.c:111 #, c-format msgid "" "Cannot load phone %s!\n" "Do you have proper section in the config file?\n" msgstr "" "Nie mogÄ™ zaÅ‚adować konfiguracji telefonu %s!\n" "Czy w pliku konfiguracyjnym znajduje siÄ™ odpowiednia sekcja?\n" #: ../smsd/lowlevel.c:400 ../xgnokii/xgnokii_lowlevel.c:1349 #, c-format msgid "Event %d failed with return code %d!\n" msgstr "Zdarzenie %d zakoÅ„czyÅ‚o siÄ™ niepowodzeniem zwracajÄ…c kod %d!\n" #: ../smsd/lowlevel.c:449 #, c-format msgid "Timeout in file %s, line %d, restarting connection.\n" msgstr "" "Przekroczony czas oczekiwania w pliku %s, w linii %d, restart połączenia.\n" #: ../smsd/lowlevel.c:459 #, c-format msgid "Too many consecutive errors, restarting connection.\n" msgstr "WystÄ…piÅ‚o zbyt dużo błędów, restartujÄ™ połączenie.\n" #: ../smsd/mysql.c:75 ../smsd/pq.c:66 #, c-format msgid "Connection to database '%s' on host '%s' failed.\n" msgstr "Nieudane połączenie do bazy '%s' na '%s'.\n" #: ../smsd/mysql.c:132 #, c-format msgid "%d: SELECT FROM multipart command failed.\n" msgstr "%d: nieudana operacja bazodanowa SELECT FROM multipart.\n" #: ../smsd/mysql.c:169 #, c-format msgid "%d: INSERT INTO multipartinbox command failed.\n" msgstr "%d: nieudana operacja bazodanowa INSERT INTO multipartinbox.\n" #: ../smsd/mysql.c:187 #, c-format msgid "%d: SELECT FROM multipartinbox command failed.\n" msgstr "%d: nieudana operacja bazodanowa SELECT FROM multipartinbox.\n" #: ../smsd/mysql.c:223 #, c-format msgid "%d: DELETE FROM multipartinbox command failed.\n" msgstr "%d: nieudana operacja bazodanowa SELECT FROM multipartinbox.\n" #: ../smsd/mysql.c:261 #, c-format msgid "%d: SELECT FROM inbox command failed.\n" msgstr "%d: nieudana operacja bazodanowa SELECT FROM inbox.\n" #: ../smsd/mysql.c:294 #, c-format msgid "%d: INSERT INTO inbox command failed.\n" msgstr "%d: nieudana operacja bazodanowa INSERT INTO inbox.\n" #: ../smsd/mysql.c:334 ../smsd/sqlite.c:239 #, c-format msgid "%d: SELECT FROM outbox command failed.\n" msgstr "%d: nieudana operacja bazodanowa SELECT FROM outbox.\n" #: ../smsd/mysql.c:344 #, c-format msgid "%d: Store Mysql Result Failed.\n" msgstr "%d: nieudane zapisanie wyniku operacji bazodanowej.\n" #: ../smsd/mysql.c:397 ../smsd/pq.c:425 #, c-format msgid "%d: UPDATE command failed.\n" msgstr "%d: nieudana operacja bazodanowa UPDATE\n" #: ../smsd/pq.c:75 #, c-format msgid "Setting client charset '%s' for database '%s' on host '%s' failed.\n" msgstr "Nieudane ustalenie strony kodowej '%s' w bazie '%s' na '%s'.\n" #: ../smsd/pq.c:120 ../smsd/pq.c:257 #, c-format msgid "%d: Escaping string failed.\n" msgstr "%d: nieudane wstawianie sekwencji Escape.\n" #: ../smsd/pq.c:148 ../smsd/pq.c:210 #, c-format msgid "%d: SELECT FROM %s.multipart command failed.\n" msgstr "%d: nieudana operacja bazodanowa SELECT FROM %s.multipart.\n" #: ../smsd/pq.c:188 #, c-format msgid "%d: INSERT INTO %s.multipartinbox failed.\n" msgstr "%d: nieudana operacja bazodanowa INSERT INTO %s.multipartinbox.\n" #: ../smsd/pq.c:239 #, c-format msgid "%d: DELETE FROM %s.multipartinbox command failed.\n" msgstr "%d: nieudana operacja bazodanowa DELETE FROM %s.multipartinbox.\n" #: ../smsd/pq.c:294 #, c-format msgid "%d: SELECT FROM %s.inbox command failed.\n" msgstr "%d: nieudana operacja bazodanowa SELECT FROM %s.inbox.\n" #: ../smsd/pq.c:331 #, c-format msgid "%d: INSERT INTO %s.inbox failed.\n" msgstr "%d: nieudana operacja bazodanowa INSERT INTO %s.inbox.\n" #: ../smsd/pq.c:374 #, c-format msgid "%d: SELECT FROM %s.outbox command failed.\n" msgstr "%d: nieudana operacja bazodanowa %s.outbox.\n" #: ../smsd/smsd.c:137 #, c-format msgid "smsd - version %s from gnokii %s\n" msgstr "smsd - wersja %s z gnokii %s\n" #: ../smsd/smsd.c:142 #, c-format msgid "" "smsd - version %s from gnokii %s\n" "Copyright Jan Derfinak 1999-2011\n" msgstr "" "smsd - wersja %s z gnokii %s\n" "Copyright Jan Derfinak 1999-2011\n" #: ../smsd/smsd.c:149 #, c-format msgid "" "\n" "Usage: %s [options]\n" " -u, --user db_username OR action if -m file\n" " -p, --password db_password\n" " -d, --db db_name\n" " -c, --host db_hostname OR spool directory if -m file\n" " -s, --schema db_schema\n" " -e, --encoding client_encoding\n" " -m, --module db_module (pq, mysql, sqlite, file)\n" " -l, --libdir path_to_db_module\n" " -f, --logfile file\n" " -t, --phone phone_number\n" " -i, --interval polling_interval_for_incoming_sms's_in_seconds\n" " -S, --maxsms number_of_sms's (only in dumb mode)\n" " -b, --inbox memoryType\n" " -0, --firstpos0\n" " -v, --version\n" " -h, --help\n" msgstr "" "\n" "Sposób użycia: %s [opcje]\n" " -u, --user nazwa_użytkownika LUB akcja jeżeli użyto -m file\n" " -p, --password hasÅ‚o\n" " -d, --db nazwa_bazy\n" " -c, --host serwer_bazy LUB katalog_wysylkowy jeżeli użyto -m " "file\n" " -s, --schema schemat_bazy\n" " -e, --encoding kodowanie_klienta\n" " -m, --module moduÅ‚ (pq, mysql, file)\n" " -l, --libdir Å›cieżka_do_katalogu_z_moduÅ‚ami\n" " -f, --logfile plik_z_logami\n" " -t, --phone numer_telefonu\n" " -i, --interval " "czÄ™stotliwość_sprawdzania_przychodzÄ…cych_sms_w_sekundach\n" " -S, --maxsms liczba_smsów (tylko w trybie dumb)\n" " -b, --inbox typ_pamiÄ™ci\n" " -0, --firstpos0\n" " -v, --version\n" " -h, --help\n" #: ../smsd/smsd.c:183 #, c-format msgid "WARNING: Cannot open file %s for appending.\n" msgstr "UWAGA: Nie można otworzyć pliku %s do dopisywania.\n" #: ../smsd/smsd.c:342 #, c-format msgid "Wrong number of arguments\n" msgstr "Niepoprawna liczba argumentów\n" #: ../smsd/smsd.c:349 #, c-format msgid "Cannot load database module %s in directory %s!\n" msgstr "Nieudane zaÅ‚adowanie moduÅ‚u bazy danych %s z katalogu %s!\n" #: ../smsd/smsd.c:423 #, c-format msgid "Sending to %s unsuccessful. Error: %s\n" msgstr "Niedane wysÅ‚anie SMS do %s. Błąd: %s\n" #: ../smsd/smsd.c:429 #, c-format msgid "Sending to %s successful.\n" msgstr "Udane wysÅ‚anie SMS do %s.\n" #: ../smsd/smsd.c:455 #, c-format msgid "Inserting sms from %s successful.\n" msgstr "Udane wstawienie sms z %s\n" #: ../smsd/smsd.c:465 #, c-format msgid "Duplicated sms from %s.\n" msgstr "Duplikat sms od %s\n" #: ../smsd/smsd.c:475 #, c-format msgid "Multipart sms from %s. Waiting for the next parts.\n" msgstr "WieloczeÅ›ciowy sms od %s. Czekam na kolejne części.\n" #: ../smsd/smsd.c:485 #, c-format msgid "" "Inserting sms from %s unsuccessful.\n" "Date: %02d-%02d-%02d %02d:%02d:%02d+%02d\n" "Text: %s\n" "\n" "Exiting.\n" msgstr "" "Nieudane wstawienie SMS od %s\n" "Data: %02d-%02d-%02d %02d:%02d:%02d+%02d\n" "Tekst: %s\n" "\n" "Koniec pracy.\n" #: ../smsd/sqlite.c:57 ../smsd/sqlite.c:69 #, c-format msgid "Connection to database '%s' failed.\n" msgstr "Nieudane połączenie do bazy '%s'.\n" #: ../smsd/sqlite.c:116 ../smsd/sqlite.c:182 #, c-format msgid "%d: Parsing query %s failed!" msgstr "%d: nieudane parsowanie zapytania %s!" #: ../smsd/sqlite.c:117 ../smsd/sqlite.c:183 #, c-format msgid "Error: %s" msgstr "Błąd: %s" #: ../smsd/sqlite.c:133 #, c-format msgid "%d: INSERT INTO inbox failed.\n" msgstr "%d: nieudana operacja bazodanowa INSERT INTO inbox.\n" #: ../smsd/sqlite.c:134 #, c-format msgid "Error %d: %s\n" msgstr "Błąd %d: %s\n" #: ../smsd/sqlite.c:135 #, c-format msgid "Query: %s\n" msgstr "Zapytanie: %s\n" #: ../utils/mgnokiidev.c:179 #, c-format msgid "mgnokiidev takes one and only one argument!\n" msgstr "mgnokiidev przyjmuje tylko jeden argument!\n" #: ../xgnokii/xgnokii.c:217 msgid "Reading caller groups names ..." msgstr "Wczytywanie nazw grup..." #: ../xgnokii/xgnokii.c:226 msgid "No group" msgstr "Brak grupy" #: ../xgnokii/xgnokii.c:347 msgid "Short Message received" msgstr "Otrzymano wiadomość SMS" #: ../xgnokii/xgnokii.c:353 ../xgnokii/xgnokii_lowlevel.c:1346 msgid "Working..." msgstr "PracujÄ™..." #: ../xgnokii/xgnokii.c:370 msgid "Call in progress" msgstr "Trwa rozmowa" #: ../xgnokii/xgnokii.c:383 msgid "Hide" msgstr "Ukryj" #: ../xgnokii/xgnokii.c:457 msgid "anonymous" msgstr "anonimowy" #: ../xgnokii/xgnokii.c:470 #, c-format msgid "" "Outgoing call in progress:\n" "Time: %s" msgstr "" "Trwa wychodzÄ…ce połączenie:\n" "Czas: %s" #: ../xgnokii/xgnokii.c:472 #, c-format msgid "" "Incoming call from: %s\n" "Time: %s" msgstr "" "Rozmowa przychodzÄ…ca od: %s\n" "Czas: %s" #: ../xgnokii/xgnokii.c:584 ../xgnokii/xgnokii.c:1455 msgid "Max. Time" msgstr "Maksymalny czas" #: ../xgnokii/xgnokii.c:631 msgid "Reading SMS centers ..." msgstr "Odczyt centrów wiadomoÅ›ci..." #: ../xgnokii/xgnokii.c:896 msgid "SMS not supported!" msgstr "ObsÅ‚uga SMS wyłączona!" #: ../xgnokii/xgnokii.c:901 msgid "Calendar not supported!" msgstr "ObsÅ‚uga kalendarza wyłączona!" #: ../xgnokii/xgnokii.c:1088 msgid "Error writing configuration file!" msgstr "Nieudany zapis konfiguracji!" #: ../xgnokii/xgnokii.c:1100 ../xgnokii/xgnokii_contacts.c:3126 msgid "Contacts" msgstr "Kontakty" #: ../xgnokii/xgnokii.c:1111 ../xgnokii/xgnokii_calendar.c:1547 msgid "Calendar" msgstr "Kalendarz" #: ../xgnokii/xgnokii.c:1116 ../xgnokii/xgnokii_logos.c:1525 msgid "Logos" msgstr "Logo" #: ../xgnokii/xgnokii.c:1122 msgid "DTMF" msgstr "DTMF" #: ../xgnokii/xgnokii.c:1127 ../xgnokii/xgnokii_speed.c:548 msgid "Speed Dial" msgstr "Szybkie wybieranie" #: ../xgnokii/xgnokii.c:1132 msgid "Keyboard" msgstr "Klawiatura" #: ../xgnokii/xgnokii.c:1137 ../xgnokii/xgnokii_netmon.c:294 msgid "Net Monitor" msgstr "Monitor sieci" #: ../xgnokii/xgnokii.c:1147 msgid "Data calls" msgstr "Transmisja danych" #: ../xgnokii/xgnokii.c:1156 ../xgnokii/xgnokii.c:1575 msgid "Options" msgstr "Opcje" #: ../xgnokii/xgnokii.c:1166 ../xgnokii/xgnokii.c:1183 msgid "About" msgstr "O..." #: ../xgnokii/xgnokii.c:1186 ../xgnokii/xgnokii.c:1358 #: ../xgnokii/xgnokii_calendar.c:688 ../xgnokii/xgnokii_calendar.c:734 #: ../xgnokii/xgnokii_calendar.c:881 ../xgnokii/xgnokii_calendar.c:1001 #: ../xgnokii/xgnokii_calendar.c:1141 ../xgnokii/xgnokii_calendar.c:1274 #: ../xgnokii/xgnokii_calendar.c:1435 ../xgnokii/xgnokii_contacts.c:875 #: ../xgnokii/xgnokii_contacts.c:1119 ../xgnokii/xgnokii_contacts.c:1255 #: ../xgnokii/xgnokii_contacts.c:1406 ../xgnokii/xgnokii_contacts.c:2949 #: ../xgnokii/xgnokii_sms.c:570 msgid "Ok" msgstr "OK" #: ../xgnokii/xgnokii.c:1197 #, c-format msgid "" "xgnokii version: %s\n" "gnokii version: %s\n" "\n" "Copyright (C) 1999-2004 Pavel Janik ml.,\n" "Hugh Blemings, Jan Derfinak,\n" "Pawel Kot and others\n" "xgnokii is free software, covered by the GNU General Public License,\n" "and you are welcome to change it and/or distribute copies of it under\n" "certain conditions. There is absolutely no warranty for xgnokii.\n" "See GPL for details.\n" msgstr "" "wersja xgnokii: %s\n" "wersja gnokii: %s\n" "\n" "Copyright (C) 1999-2004 Pavel Jank ml.,\n" "Hugh Blemings, Jan Derfinak, PaweÅ‚ Kot i inni\n" "xgnokii jest Wolnym Oprogramowaniem na licencji GNU General Public License.\n" "Masz prawo je zmieniać i/lub rozpowszechniać pod kilkoma warunkami.\n" "Nie ma żadnej gwarancji na xgnokii. Szczegóły znajdziesz w treÅ›ci GPL.\n" #: ../xgnokii/xgnokii.c:1352 msgid "Edit SMS Setting" msgstr "Edycja ustawieÅ„ SMS" #: ../xgnokii/xgnokii.c:1366 ../xgnokii/xgnokii_calendar.c:697 #: ../xgnokii/xgnokii_calendar.c:743 ../xgnokii/xgnokii_calendar.c:890 #: ../xgnokii/xgnokii_calendar.c:1010 ../xgnokii/xgnokii_calendar.c:1150 #: ../xgnokii/xgnokii_calendar.c:1283 ../xgnokii/xgnokii_calendar.c:1443 #: ../xgnokii/xgnokii_common.c:80 ../xgnokii/xgnokii_common.c:162 #: ../xgnokii/xgnokii_contacts.c:886 ../xgnokii/xgnokii_contacts.c:1263 #: ../xgnokii/xgnokii_contacts.c:1414 ../xgnokii/xgnokii_contacts.c:1651 #: ../xgnokii/xgnokii_contacts.c:1698 ../xgnokii/xgnokii_contacts.c:1816 #: ../xgnokii/xgnokii_contacts.c:2212 ../xgnokii/xgnokii_contacts.c:2956 #: ../xgnokii/xgnokii_sms.c:578 msgid "Cancel" msgstr "Anuluj" #: ../xgnokii/xgnokii.c:1379 msgid "Set's name:" msgstr "Nazwa zestawu:" #: ../xgnokii/xgnokii.c:1393 msgid "Center:" msgstr "Centrum:" #: ../xgnokii/xgnokii.c:1407 msgid "Sending Format:" msgstr "Format wysyÅ‚ania:" #: ../xgnokii/xgnokii.c:1447 msgid "Validity Period:" msgstr "Okres ważnoÅ›ci:" #: ../xgnokii/xgnokii.c:1572 msgid "Set's name" msgstr "Nazwa zestawu" #: ../xgnokii/xgnokii.c:1572 msgid "Center number" msgstr "Numer centrum" #: ../xgnokii/xgnokii.c:1572 msgid "Format" msgstr "Format" #: ../xgnokii/xgnokii.c:1572 msgid "Validity" msgstr "Ważność" #: ../xgnokii/xgnokii.c:1580 msgid "Apply" msgstr "Zastosuj" #: ../xgnokii/xgnokii.c:1588 ../xgnokii/xgnokii_contacts.c:2198 #: ../xgnokii/xgnokii_dtmf.c:181 msgid "Save" msgstr "Zapisz" #: ../xgnokii/xgnokii.c:1594 msgid "Close" msgstr "Zamknij" #. ** Connection notebook ** #: ../xgnokii/xgnokii.c:1608 msgid "Phone and connection type" msgstr "Telefon i typ połączenia" #: ../xgnokii/xgnokii.c:1622 msgid "Port:" msgstr "Port:" #: ../xgnokii/xgnokii.c:1636 ../xgnokii/xgnokii.c:1716 msgid "Model:" msgstr "Model:" #: ../xgnokii/xgnokii.c:1650 msgid "Bindir:" msgstr "Katalog z binariami:" #: ../xgnokii/xgnokii.c:1664 msgid "Init length:" msgstr "DÅ‚ugość sekwencji inicjujÄ…cej:" #: ../xgnokii/xgnokii.c:1679 msgid "Connection:" msgstr "Type połączenia:" #: ../xgnokii/xgnokii.c:1683 msgid "infrared" msgstr "podczerwieÅ„ (tylko stare Nokie)" #: ../xgnokii/xgnokii.c:1690 msgid "serial" msgstr "szeregowe" #: ../xgnokii/xgnokii.c:1697 msgid "irda" msgstr "podczerwieÅ„" #. ** Phone notebook ** #: ../xgnokii/xgnokii.c:1702 msgid "Phone information" msgstr "Informacje o telefonie" #: ../xgnokii/xgnokii.c:1730 msgid "Version:" msgstr "Wersja:" #: ../xgnokii/xgnokii.c:1744 msgid "Revision:" msgstr "Wydanie:" #: ../xgnokii/xgnokii.c:1758 msgid "IMEI:" msgstr "IMEI:" #: ../xgnokii/xgnokii.c:1772 msgid "Names length:" msgstr "Maksymalna dÅ‚ugość nazw:" #: ../xgnokii/xgnokii.c:1780 msgid "SIM:" msgstr "SIM:" #: ../xgnokii/xgnokii.c:1798 msgid "Phone:" msgstr "Telefon:" #: ../xgnokii/xgnokii.c:1805 msgid "Alarm setting" msgstr "Ustawianie alarmu" #: ../xgnokii/xgnokii.c:1812 ../xgnokii/xgnokii.c:1819 #: ../xgnokii/xgnokii_calendar.c:957 ../xgnokii/xgnokii_calendar.c:1089 #: ../xgnokii/xgnokii_calendar.c:1218 ../xgnokii/xgnokii_calendar.c:1350 #: ../xgnokii/xgnokii_calendar.c:1542 msgid "Alarm" msgstr "Alarm" #. ** SMS notebook ** #: ../xgnokii/xgnokii.c:1842 ../xgnokii/xgnokii_sms.c:1672 msgid "Short Message Service" msgstr "UsÅ‚uga SMS" #: ../xgnokii/xgnokii.c:1875 msgid "Edit" msgstr "Edycja" #. ** Business notebook ** #: ../xgnokii/xgnokii.c:1887 ../xgnokii/xgnokii_sms.c:1541 #: ../xgnokii/xgnokii_sms.c:1716 msgid "Business Card" msgstr "Wizytówka" #: ../xgnokii/xgnokii.c:1893 msgid "User" msgstr "Użytkownik" #: ../xgnokii/xgnokii.c:1911 ../xgnokii/xgnokii_calendar.c:1206 #: ../xgnokii/xgnokii_calendar.c:1338 ../xgnokii/xgnokii_contacts.c:1276 msgid "Name:" msgstr "Nazwa:" #: ../xgnokii/xgnokii.c:1936 msgid "Title:" msgstr "TytuÅ‚:" #: ../xgnokii/xgnokii.c:1961 msgid "Company:" msgstr "Firma:" #: ../xgnokii/xgnokii.c:1986 msgid "Telephone:" msgstr "Telefon:" #: ../xgnokii/xgnokii.c:2012 msgid "Fax:" msgstr "Faks:" #: ../xgnokii/xgnokii.c:2037 msgid "Email:" msgstr "E-mail:" #: ../xgnokii/xgnokii.c:2062 msgid "Address:" msgstr "Adres:" #. ** Groups notebook ** #: ../xgnokii/xgnokii.c:2085 msgid "Caller groups names" msgstr "Nazwy grup dzwoniÄ…cych" #: ../xgnokii/xgnokii.c:2092 msgid "Groups" msgstr "Grupy" #: ../xgnokii/xgnokii.c:2100 #, c-format msgid "Group %d:" msgstr "Grupa %d:" #. Mail #: ../xgnokii/xgnokii.c:2113 msgid "Mailbox" msgstr "Skrzynka pocztowa" #: ../xgnokii/xgnokii.c:2120 msgid "Mail" msgstr "E-mail" #: ../xgnokii/xgnokii.c:2127 msgid "Path to mailbox:" msgstr "Åšcieżka do skrzynki pocztowej:" #: ../xgnokii/xgnokii_calendar.c:131 msgid "Function not implemented!" msgstr "Funkcja niezaimplementowana!" #: ../xgnokii/xgnokii_calendar.c:194 #, c-format msgid "%04d/%02d/%02d" msgstr "%04d/%02d/%02d" #: ../xgnokii/xgnokii_calendar.c:197 ../xgnokii/xgnokii_calendar.c:203 #, c-format msgid "%04d/%02d/%02d %02d:%02d" msgstr "%04d/%02d/%02d %02d:%02d" #: ../xgnokii/xgnokii_calendar.c:211 #, c-format msgid "%02d/%02d %02d:%02d tone %s" msgstr "%02d/%02d %02d:%02d dźwiÄ™k %s" #: ../xgnokii/xgnokii_calendar.c:216 #, c-format msgid "%04d/%02d/%02d %02d:%02d tone %s" msgstr "%04d/%02d/%02d %02d:%02d dźwiÄ™k %s" #: ../xgnokii/xgnokii_calendar.c:229 msgid "never" msgstr "nigdy" #: ../xgnokii/xgnokii_calendar.c:232 msgid "daily" msgstr "codziennie" #: ../xgnokii/xgnokii_calendar.c:235 msgid "weekly" msgstr "co tydzieÅ„" #: ../xgnokii/xgnokii_calendar.c:238 msgid "every two weeks" msgstr "co dwa tygodnie" #: ../xgnokii/xgnokii_calendar.c:241 msgid "monthly" msgstr "co miesiÄ…c" #: ../xgnokii/xgnokii_calendar.c:244 msgid "yearly" msgstr "co rok" #: ../xgnokii/xgnokii_calendar.c:247 #, c-format msgid "every %d minutes" msgstr "co %d minut" #: ../xgnokii/xgnokii_calendar.c:282 msgid "Type: " msgstr "Typ: " #: ../xgnokii/xgnokii_calendar.c:292 msgid "Start date: " msgstr "Data poczÄ…tkowa: " #: ../xgnokii/xgnokii_calendar.c:322 msgid "End date: " msgstr "Data koÅ„cowa: " #: ../xgnokii/xgnokii_calendar.c:333 msgid "Alarm: " msgstr "Alarm: " #: ../xgnokii/xgnokii_calendar.c:344 msgid "Number: " msgstr "Numer: " #: ../xgnokii/xgnokii_calendar.c:355 msgid "Location: " msgstr "Pozycja: " #: ../xgnokii/xgnokii_calendar.c:366 msgid "Recurrence: " msgstr "Powtarzalność: " #: ../xgnokii/xgnokii_calendar.c:374 msgid "Text: " msgstr "Tekst: " #: ../xgnokii/xgnokii_calendar.c:504 #, c-format msgid "" "Error saving calendar note\n" "%s" msgstr "" "Nieudany zapis notatki kalendarza\n" "%s" #: ../xgnokii/xgnokii_calendar.c:632 #, c-format msgid "%d-%02d-%02d" msgstr "%d-%02d-%02d" #: ../xgnokii/xgnokii_calendar.c:641 #, c-format msgid "%d-%02d-%02d %02d:%02d" msgstr "%d-%02d-%02d %02d:%02d" #: ../xgnokii/xgnokii_calendar.c:681 ../xgnokii/xgnokii_calendar.c:727 msgid "Choose date" msgstr "Wybierz datÄ™" #: ../xgnokii/xgnokii_calendar.c:767 msgid "Alarm time:" msgstr "Czas alarmu:" #: ../xgnokii/xgnokii_calendar.c:837 msgid "Every Day" msgstr "codziennie" #: ../xgnokii/xgnokii_calendar.c:843 msgid "Every Week" msgstr "co tydzieÅ„" #: ../xgnokii/xgnokii_calendar.c:849 msgid "Every 2 Weeks" msgstr "co dwa tygodnie" #: ../xgnokii/xgnokii_calendar.c:855 msgid "Every Year" msgstr "co rok" #. #. gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL, _("Edit note"), NULL, #. NewPixmap(Edit_xpm, GUI_CalendarWindow->window, #. &GUI_CalendarWindow->style->bg[GTK_STATE_NORMAL]), #. (GtkSignalFunc) NULL, NULL); #. #: ../xgnokii/xgnokii_calendar.c:874 ../xgnokii/xgnokii_calendar.c:1610 msgid "Add reminder" msgstr "Dodaj przypomnienie" #: ../xgnokii/xgnokii_calendar.c:910 ../xgnokii/xgnokii_calendar.c:1029 #: ../xgnokii/xgnokii_calendar.c:1170 ../xgnokii/xgnokii_calendar.c:1303 msgid "Date:" msgstr "Data:" #: ../xgnokii/xgnokii_calendar.c:945 msgid "Subject:" msgstr "Temat:" #: ../xgnokii/xgnokii_calendar.c:994 msgid "Add Call" msgstr "Dodaj połączenie" #: ../xgnokii/xgnokii_calendar.c:1064 ../xgnokii/xgnokii_contacts.c:1289 #: ../xgnokii/xgnokii_contacts.c:1827 msgid "Number:" msgstr "Numer:" #: ../xgnokii/xgnokii_calendar.c:1077 msgid "Text:" msgstr "Tekst:" #: ../xgnokii/xgnokii_calendar.c:1109 ../xgnokii/xgnokii_calendar.c:1241 msgid "Repeat:" msgstr "Powtarzanie:" #: ../xgnokii/xgnokii_calendar.c:1134 ../xgnokii/xgnokii_calendar.c:1618 msgid "Add meeting" msgstr "Dodaj spotkanie" #: ../xgnokii/xgnokii_calendar.c:1267 ../xgnokii/xgnokii_calendar.c:1622 msgid "Add birthday" msgstr "Dodaj urodziny" #: ../xgnokii/xgnokii_calendar.c:1428 msgid "Delete calendar note" msgstr "UsuÅ„ notatkÄ™ kalendarza" #: ../xgnokii/xgnokii_calendar.c:1460 msgid "Do you want to delete selected note(s)?" msgstr "Czy chcesz usunąć zaznaczone notatki?" #: ../xgnokii/xgnokii_calendar.c:1496 ../xgnokii/xgnokii_contacts.c:3081 #: ../xgnokii/xgnokii_dtmf.c:219 ../xgnokii/xgnokii_logos.c:1474 #: ../xgnokii/xgnokii_netmon.c:258 ../xgnokii/xgnokii_sms.c:1245 #: ../xgnokii/xgnokii_sms.c:1633 ../xgnokii/xgnokii_speed.c:516 #: ../xgnokii/xgnokii_xkeyb.c:235 ../xgnokii/xgnokii_xring.c:826 msgid "/_File" msgstr "/_Plik" #: ../xgnokii/xgnokii_calendar.c:1497 ../xgnokii/xgnokii_contacts.c:3082 #: ../xgnokii/xgnokii_speed.c:517 msgid "/File/_Read from phone" msgstr "/Plik/_Odczyt z telefonu" #: ../xgnokii/xgnokii_calendar.c:1498 ../xgnokii/xgnokii_contacts.c:3083 #: ../xgnokii/xgnokii_speed.c:518 msgid "/File/_Save to phone" msgstr "/Plik/Za_pis do telefonu" #: ../xgnokii/xgnokii_calendar.c:1499 ../xgnokii/xgnokii_contacts.c:3084 #: ../xgnokii/xgnokii_dtmf.c:222 ../xgnokii/xgnokii_logos.c:1478 #: ../xgnokii/xgnokii_sms.c:1248 ../xgnokii/xgnokii_sms.c:1637 #: ../xgnokii/xgnokii_speed.c:519 msgid "/File/Sep1" msgstr "/Plik/Sep1" #: ../xgnokii/xgnokii_calendar.c:1500 msgid "/File/Send via S_MS" msgstr "/Plik/WyÅ›lij wiadomość _SMS" #: ../xgnokii/xgnokii_calendar.c:1501 ../xgnokii/xgnokii_contacts.c:3087 #: ../xgnokii/xgnokii_logos.c:1482 ../xgnokii/xgnokii_sms.c:1251 #: ../xgnokii/xgnokii_speed.c:522 msgid "/File/Sep2" msgstr "/Plik/Sep2" #: ../xgnokii/xgnokii_calendar.c:1502 ../xgnokii/xgnokii_contacts.c:3085 #: ../xgnokii/xgnokii_speed.c:520 msgid "/File/_Import from file" msgstr "/Plik/_Import z pliku" #: ../xgnokii/xgnokii_calendar.c:1503 ../xgnokii/xgnokii_contacts.c:3086 #: ../xgnokii/xgnokii_speed.c:521 msgid "/File/_Export to file" msgstr "/Plik/_Eksport do pliku" #: ../xgnokii/xgnokii_calendar.c:1504 msgid "/File/Sep3" msgstr "/Plik/Sep3" #: ../xgnokii/xgnokii_calendar.c:1505 ../xgnokii/xgnokii_contacts.c:3088 #: ../xgnokii/xgnokii_dtmf.c:223 ../xgnokii/xgnokii_logos.c:1483 #: ../xgnokii/xgnokii_netmon.c:259 ../xgnokii/xgnokii_sms.c:1252 #: ../xgnokii/xgnokii_sms.c:1638 ../xgnokii/xgnokii_speed.c:523 #: ../xgnokii/xgnokii_xkeyb.c:236 ../xgnokii/xgnokii_xring.c:836 msgid "/File/_Close" msgstr "/Plik/_Zamknij" #: ../xgnokii/xgnokii_calendar.c:1506 ../xgnokii/xgnokii_contacts.c:3089 #: ../xgnokii/xgnokii_logos.c:1484 ../xgnokii/xgnokii_speed.c:524 #: ../xgnokii/xgnokii_xring.c:837 msgid "/_Edit" msgstr "/_Edycja" #: ../xgnokii/xgnokii_calendar.c:1507 msgid "/Edit/Add _reminder" msgstr "/Edycja/Dodaj _przypomnienie" #: ../xgnokii/xgnokii_calendar.c:1508 msgid "/Edit/Add _call" msgstr "/Edycja/Dodaj p_ołączenie" #: ../xgnokii/xgnokii_calendar.c:1509 msgid "/Edit/Add _meeting" msgstr "/Edycja/Dodaj _spotkanie" #: ../xgnokii/xgnokii_calendar.c:1510 msgid "/Edit/Add _birthday" msgstr "/Edycja/Dodaj u_rodziny" #. #. menu_items[15].path = _("/Edit/_Edit"); #. #: ../xgnokii/xgnokii_calendar.c:1514 ../xgnokii/xgnokii_contacts.c:3093 msgid "/Edit/_Delete" msgstr "/Edycja/_UsuÅ„" #: ../xgnokii/xgnokii_calendar.c:1515 ../xgnokii/xgnokii_contacts.c:3096 #: ../xgnokii/xgnokii_logos.c:1492 msgid "/Edit/Sep4" msgstr "/Edycja/Sep4" #: ../xgnokii/xgnokii_calendar.c:1516 ../xgnokii/xgnokii_contacts.c:3100 msgid "/Edit/Select _all" msgstr "/Edycja/Zaznacz _wszystko" #: ../xgnokii/xgnokii_calendar.c:1517 ../xgnokii/xgnokii_contacts.c:3103 #: ../xgnokii/xgnokii_dtmf.c:224 ../xgnokii/xgnokii_netmon.c:263 #: ../xgnokii/xgnokii_sms.c:1253 ../xgnokii/xgnokii_sms.c:1647 #: ../xgnokii/xgnokii_speed.c:526 ../xgnokii/xgnokii_xkeyb.c:237 msgid "/_Help" msgstr "/_Pomoc" #: ../xgnokii/xgnokii_calendar.c:1518 ../xgnokii/xgnokii_contacts.c:3104 #: ../xgnokii/xgnokii_dtmf.c:225 ../xgnokii/xgnokii_netmon.c:264 #: ../xgnokii/xgnokii_sms.c:1254 ../xgnokii/xgnokii_sms.c:1648 #: ../xgnokii/xgnokii_speed.c:527 ../xgnokii/xgnokii_xkeyb.c:238 msgid "/Help/_About" msgstr "/Pomoc/_O..." #: ../xgnokii/xgnokii_calendar.c:1535 msgid "#" msgstr "#" #: ../xgnokii/xgnokii_calendar.c:1537 msgid "Start date" msgstr "Data poczÄ…tkowa" #: ../xgnokii/xgnokii_calendar.c:1538 msgid "End date" msgstr "Data koÅ„cowa" #: ../xgnokii/xgnokii_calendar.c:1543 msgid "Recurrence" msgstr "Powtarzalność" #: ../xgnokii/xgnokii_calendar.c:1576 ../xgnokii/xgnokii_contacts.c:3157 #: ../xgnokii/xgnokii_speed.c:579 msgid "Read from phone" msgstr "Odczyt z telefonu" #: ../xgnokii/xgnokii_calendar.c:1580 ../xgnokii/xgnokii_contacts.c:3161 #: ../xgnokii/xgnokii_speed.c:583 msgid "Save to phone" msgstr "Zapis do telefonu" #: ../xgnokii/xgnokii_calendar.c:1587 msgid "Send via SMS" msgstr "WyÅ›lij jako wiadomość SMS" #: ../xgnokii/xgnokii_calendar.c:1594 ../xgnokii/xgnokii_contacts.c:2753 #: ../xgnokii/xgnokii_contacts.c:3168 ../xgnokii/xgnokii_logos.c:1572 #: ../xgnokii/xgnokii_speed.c:395 ../xgnokii/xgnokii_speed.c:590 #: ../xgnokii/xgnokii_xring.c:894 msgid "Import from file" msgstr "Import z pliku" #: ../xgnokii/xgnokii_calendar.c:1598 ../xgnokii/xgnokii_contacts.c:2671 #: ../xgnokii/xgnokii_contacts.c:3172 ../xgnokii/xgnokii_logos.c:1576 #: ../xgnokii/xgnokii_speed.c:474 ../xgnokii/xgnokii_speed.c:594 #: ../xgnokii/xgnokii_xring.c:898 msgid "Export to file" msgstr "Eksport do pliku" #: ../xgnokii/xgnokii_calendar.c:1614 msgid "Add call" msgstr "Dodaj połączenie" #: ../xgnokii/xgnokii_calendar.c:1626 msgid "Delete note" msgstr "Kasowanie notatki" #: ../xgnokii/xgnokii_calendar.c:1691 ../xgnokii/xgnokii_contacts.c:2290 #: ../xgnokii/xgnokii_contacts.c:2316 ../xgnokii/xgnokii_contacts.c:2979 #: ../xgnokii/xgnokii_contacts.c:3225 ../xgnokii/xgnokii_sms.c:1799 #: ../xgnokii/xgnokii_speed.c:190 ../xgnokii/xgnokii_speed.c:196 #: ../xgnokii/xgnokii_speed.c:256 ../xgnokii/xgnokii_speed.c:340 #: ../xgnokii/xgnokii_speed.c:624 #, c-format msgid "Error: %s: line %d: Can't allocate memory!\n" msgstr "Błąd: %s: wiersz %d: Nieudana alokacja pamiÄ™ci!\n" #: ../xgnokii/xgnokii_calendar.c:1720 ../xgnokii/xgnokii_sms.c:1833 msgid "couldn't allocate colour" msgstr "nieudana alokacja koloru" #: ../xgnokii/xgnokii_cfg.c:117 #, c-format msgid "WARNING: Can't allocate memory for config reading!\n" msgstr "UWAGA: Nieudana alokacja pamiÄ™ci do odczytu konfiguracji!\n" #: ../xgnokii/xgnokii_cfg.c:211 #, c-format msgid "ERROR: Can't open file %s for writing!\n" msgstr "BÅÄ„D: Nieudane otwarcie pliku %s do zapisu!\n" #: ../xgnokii/xgnokii_cfg.c:221 #, c-format msgid "ERROR: Can't allocate memory for config writing!\n" msgstr "BÅÄ„D: Nieudana alokacja pamiÄ™ci do zapisu konfiguracji!\n" #: ../xgnokii/xgnokii_cfg.c:226 #, c-format msgid "ERROR: Can't write config file!\n" msgstr "BÅÄ„D: Nieudany zapis konfiguracji!\n" #: ../xgnokii/xgnokii_common.c:73 msgid "Error" msgstr "Błąd" #: ../xgnokii/xgnokii_common.c:110 msgid "Info" msgstr "Informacja" #: ../xgnokii/xgnokii_common.c:146 msgid "Yes" msgstr "Tak" #: ../xgnokii/xgnokii_common.c:155 msgid "No" msgstr "Nie" #: ../xgnokii/xgnokii_common.c:236 #, c-format msgid "Can't exec %s\n" msgstr "Nieudana próba uruchomienia %s\n" #: ../xgnokii/xgnokii_contacts.c:143 #, c-format msgid "SIM: %d/%d%c Phone: %d/%d%c" msgstr "SIM: %d/%d%c Telefon: %d/%d%c" #: ../xgnokii/xgnokii_contacts.c:317 ../xgnokii/xgnokii_contacts.c:337 msgid "Can't change memory type!" msgstr "Nieudana zmiana typu pamiÄ™ci!" #: ../xgnokii/xgnokii_contacts.c:383 #, c-format msgid "" "Phonebook name will be truncated to\n" "%.*s" msgstr "" "Pozycja książku adresowej zostanie obciÄ™ta do\n" "%.*s" #: ../xgnokii/xgnokii_contacts.c:611 msgid "Can't find pattern!" msgstr "Nie odnaleziono wzorca!" #: ../xgnokii/xgnokii_contacts.c:707 ../xgnokii/xgnokii_contacts.c:794 #: ../xgnokii/xgnokii_contacts.c:939 ../xgnokii/xgnokii_contacts.c:981 #: ../xgnokii/xgnokii_contacts.c:1190 msgid "Mobile" msgstr "Komórkowy" #: ../xgnokii/xgnokii_contacts.c:737 ../xgnokii/xgnokii_contacts.c:809 #: ../xgnokii/xgnokii_contacts.c:944 ../xgnokii/xgnokii_contacts.c:986 #: ../xgnokii/xgnokii_contacts.c:1216 msgid "Postal" msgstr "Adres pocztowy" #: ../xgnokii/xgnokii_contacts.c:869 msgid "Edit subentries" msgstr "Edycja pól wpisów" #: ../xgnokii/xgnokii_contacts.c:894 msgid "Delete" msgstr "UsuÅ„" #: ../xgnokii/xgnokii_contacts.c:913 msgid "Number/Text:" msgstr "Numer/Tekst:" #: ../xgnokii/xgnokii_contacts.c:925 msgid "Type:" msgstr "Typ:" #: ../xgnokii/xgnokii_contacts.c:960 ../xgnokii/xgnokii_contacts.c:1356 #: ../xgnokii/xgnokii_contacts.c:3187 ../xgnokii/xgnokii_speed.c:601 msgid "Edit entry" msgstr "Edycja wpisu" #: ../xgnokii/xgnokii_contacts.c:1111 msgid "Numbers" msgstr "Numery" #: ../xgnokii/xgnokii_contacts.c:1131 msgid "New" msgstr "Nowe" #: ../xgnokii/xgnokii_contacts.c:1315 msgid "Memory:" msgstr "Pamięć:" #: ../xgnokii/xgnokii_contacts.c:1319 msgid "phone" msgstr "telefon" #: ../xgnokii/xgnokii_contacts.c:1336 msgid "Caller group:" msgstr "Grupa dzwoniÄ…cych:" #: ../xgnokii/xgnokii_contacts.c:1399 msgid "Delete entries" msgstr "UsuÅ„ wpisy" #: ../xgnokii/xgnokii_contacts.c:1431 msgid "Do you want to delete selected entries?" msgstr "Czy chcesz usunąć zaznaczone wpisy?" #: ../xgnokii/xgnokii_contacts.c:1449 ../xgnokii/xgnokii_contacts.c:3179 msgid "New entry" msgstr "Nowy wpis" #: ../xgnokii/xgnokii_contacts.c:1493 ../xgnokii/xgnokii_contacts.c:3183 msgid "Duplicate entry" msgstr "Powiel wpis" #: ../xgnokii/xgnokii_contacts.c:1562 ../xgnokii/xgnokii_contacts.c:1570 #: ../xgnokii/xgnokii_contacts.c:1598 msgid "Can't find free memory." msgstr "Brak wolnej pamiÄ™ci." #: ../xgnokii/xgnokii_contacts.c:1635 msgid "Changing memory type" msgstr "Zmieniam typ pamiÄ™ci" #: ../xgnokii/xgnokii_contacts.c:1642 msgid "Continue" msgstr "Dalej" #: ../xgnokii/xgnokii_contacts.c:1664 msgid "" "If you change from phone memory to SIM memory\n" "some entries may be truncated." msgstr "" "Jesli zmienisz pamięć telefonu na SIM\n" "niektóre wpisy mogÄ… zostać uciÄ™te." #: ../xgnokii/xgnokii_contacts.c:1682 ../xgnokii/xgnokii_contacts.c:1688 msgid "Find" msgstr "Szukaj" #: ../xgnokii/xgnokii_contacts.c:1714 msgid "Pattern:" msgstr "Wzorzec:" #: ../xgnokii/xgnokii_contacts.c:1800 msgid "Dial pad" msgstr "Klawiatura numeryczna" #: ../xgnokii/xgnokii_contacts.c:1806 msgid "Dial" msgstr "Wybierz numer" #: ../xgnokii/xgnokii_contacts.c:2059 msgid "Phone memory..." msgstr "Pamięć telefonu..." #: ../xgnokii/xgnokii_contacts.c:2070 msgid "SIM memory..." msgstr "Pamięć karty SIM..." #: ../xgnokii/xgnokii_contacts.c:2135 msgid "Saving entries" msgstr "ZapisujÄ™ wpisy" #: ../xgnokii/xgnokii_contacts.c:2150 ../xgnokii/xgnokii_contacts.c:2170 #, c-format msgid "%s: line %d: Can't write %s memory entry number %d! Error: %s\n" msgstr "" "%s: wiersz %d: Nieudany zapis wpisu %s do pamiÄ™ci pod pozycjÄ… %d! Błąd: %s\n" #: ../xgnokii/xgnokii_contacts.c:2192 msgid "Save changes?" msgstr "Zapisać zmiany?" #: ../xgnokii/xgnokii_contacts.c:2206 msgid "Don't save" msgstr "Nie zapisuj" #: ../xgnokii/xgnokii_contacts.c:2228 msgid "" "You have made changes in your\n" "contacts directory.\n" "\n" "\n" "Do you want to save these changes into your phone?\n" msgstr "" "DokonaÅ‚eÅ› zmian w książce adresowej.\n" "\n" "\n" "Czy chcesz zapisać te zmiany do telefonu?\n" #: ../xgnokii/xgnokii_contacts.c:2420 msgid "Getting entries" msgstr "Pobieranie wpisów" #: ../xgnokii/xgnokii_contacts.c:2654 ../xgnokii/xgnokii_dtmf.c:166 #: ../xgnokii/xgnokii_logos.c:1350 ../xgnokii/xgnokii_speed.c:457 msgid "Overwrite file?" msgstr "Nadpisać plik?" #: ../xgnokii/xgnokii_contacts.c:2655 ../xgnokii/xgnokii_dtmf.c:167 #: ../xgnokii/xgnokii_logos.c:1351 ../xgnokii/xgnokii_speed.c:458 #, c-format msgid "" "File %s already exists.\n" "Overwrite?" msgstr "" "Plik %s juz istnieje.\n" "Nadpisać?" #: ../xgnokii/xgnokii_contacts.c:2936 ../xgnokii/xgnokii_contacts.c:3120 msgid "Memory" msgstr "Pamięć" #: ../xgnokii/xgnokii_contacts.c:2946 ../xgnokii/xgnokii_sms.c:1358 msgid "Select contacts" msgstr "Wybierz wpisy" #: ../xgnokii/xgnokii_contacts.c:3090 msgid "/Edit/_New" msgstr "/Edycja/_Nowe" #: ../xgnokii/xgnokii_contacts.c:3091 msgid "/Edit/D_uplicate" msgstr "/Edycja/_Powielanie" #: ../xgnokii/xgnokii_contacts.c:3092 ../xgnokii/xgnokii_speed.c:525 msgid "/Edit/_Edit" msgstr "/Edycja/_Edycja" #: ../xgnokii/xgnokii_contacts.c:3094 ../xgnokii/xgnokii_logos.c:1487 msgid "/Edit/Sep3" msgstr "/Edycja/Sep3" #: ../xgnokii/xgnokii_contacts.c:3095 msgid "/Edit/_Change memory type" msgstr "/Edycja/_ZmieÅ„ typ pamiÄ™ci" #: ../xgnokii/xgnokii_contacts.c:3097 msgid "/Edit/_Find" msgstr "/Edycja/Zna_jdź" #: ../xgnokii/xgnokii_contacts.c:3098 msgid "/Edit/Find ne_xt" msgstr "/Edycja/Znajdź na_stÄ™pne" #: ../xgnokii/xgnokii_contacts.c:3099 msgid "/Edit/Sep5" msgstr "/Edycja/Sep5" #: ../xgnokii/xgnokii_contacts.c:3101 msgid "/_Dial" msgstr "/_DzwoÅ„" #: ../xgnokii/xgnokii_contacts.c:3102 msgid "/Dial/Dial _voice" msgstr "/DzwoÅ„/Rozmowa _gÅ‚osowa" #: ../xgnokii/xgnokii_contacts.c:3191 msgid "Delete entry" msgstr "Skasuj wpis" #: ../xgnokii/xgnokii_contacts.c:3198 msgid "Dial voice" msgstr "Połączenie gÅ‚osowe" #: ../xgnokii/xgnokii_data.c:52 #, c-format msgid "" "Data calls are currently\n" "Disabled\n" " " msgstr "" "Transmisja danych jest obecnie\n" "NiedostÄ™pna\n" " " #: ../xgnokii/xgnokii_data.c:54 #, c-format msgid "" "Data calls are currently\n" "Enabled\n" " " msgstr "" "Transmisja danych jest obecnie\n" "DostÄ™pna\n" " " #: ../xgnokii/xgnokii_data.c:102 msgid "Virtual Modem" msgstr "Wirtualny modem" #: ../xgnokii/xgnokii.desktop.in.h:1 msgid "Manage your mobile phone" msgstr "ZarzÄ…dzaj swoim telefonem komórkowym" #: ../xgnokii/xgnokii.desktop.in.h:2 msgid "Mobile Phone Suite" msgstr "Zestaw do obsÅ‚ugi telefonu komórkowego" #: ../xgnokii/xgnokii.desktop.in.h:3 msgid "Xgnokii" msgstr "Xgnokii" #: ../xgnokii/xgnokii_dtmf.c:100 ../xgnokii/xgnokii_speed.c:351 #: ../xgnokii/xgnokii_speed.c:376 #, c-format msgid "Error reading file!" msgstr "Nieudana próba odczytu pliku!" #: ../xgnokii/xgnokii_dtmf.c:116 msgid "Load" msgstr "Odczyt" #: ../xgnokii/xgnokii_dtmf.c:220 ../xgnokii/xgnokii_logos.c:1475 #: ../xgnokii/xgnokii_xring.c:827 msgid "/File/_Open" msgstr "/Plik/_Otwórz" #: ../xgnokii/xgnokii_dtmf.c:221 ../xgnokii/xgnokii_logos.c:1476 #: ../xgnokii/xgnokii_sms.c:1247 ../xgnokii/xgnokii_sms.c:1634 #: ../xgnokii/xgnokii_xring.c:828 msgid "/File/_Save" msgstr "/Plik/_Zapisz" #: ../xgnokii/xgnokii_dtmf.c:247 msgid "Dial Tone" msgstr "Wybieranie tonowe" #: ../xgnokii/xgnokii_dtmf.c:312 msgid "Pause" msgstr "Pauza" #: ../xgnokii/xgnokii_dtmf.c:317 msgid "Wait" msgstr "Czekaj" #: ../xgnokii/xgnokii_logos.c:972 #, c-format msgid "" "Error getting network info\n" "%s" msgstr "" "Nieudane pobranie informacji o sieci\n" "%s" #: ../xgnokii/xgnokii_logos.c:1018 #, c-format msgid "" "Error getting bitmap\n" "%s" msgstr "" "Nieudane pobranie bitmapy\n" "%s" #: ../xgnokii/xgnokii_logos.c:1068 #, c-format msgid "" "Error setting bitmap\n" "%s" msgstr "" "Nieudane wczytanie obrazka\n" "%s" #: ../xgnokii/xgnokii_logos.c:1323 ../xgnokii/xgnokii_xring.c:650 #: ../xgnokii/xgnokii_xring.c:693 #, c-format msgid "" "Error writing file\n" "%s" msgstr "" "Nieudana próba zapisu pliku\n" "%s" #: ../xgnokii/xgnokii_logos.c:1382 ../xgnokii/xgnokii_xring.c:613 #, c-format msgid "" "Error reading file\n" "%s" msgstr "" "Nieudana próba odczytu pliku\n" "%s" #: ../xgnokii/xgnokii_logos.c:1409 msgid "Save logo as ..." msgstr "Zapisz logo jako..." #: ../xgnokii/xgnokii_logos.c:1434 msgid "Open logo..." msgstr "Otwórz logo..." #: ../xgnokii/xgnokii_logos.c:1477 ../xgnokii/xgnokii_xring.c:829 msgid "/File/Save _as ..." msgstr "/Plik/Zapisz _jako..." #: ../xgnokii/xgnokii_logos.c:1479 msgid "/File/_Get operator" msgstr "/Plik/Pobierz _operatora" #: ../xgnokii/xgnokii_logos.c:1480 msgid "/File/Get _logo" msgstr "/Plik/Pobierz _logo" #: ../xgnokii/xgnokii_logos.c:1481 msgid "/File/Se_t logo" msgstr "/Plik/_Ustaw logo" #: ../xgnokii/xgnokii_logos.c:1485 ../xgnokii/xgnokii_xring.c:838 msgid "/Edit/_Clear" msgstr "/Edycja/_Wyczyść" #: ../xgnokii/xgnokii_logos.c:1486 msgid "/Edit/_Invert" msgstr "/Edycja/_Inwersja kolorów" #: ../xgnokii/xgnokii_logos.c:1488 msgid "/Edit/_Up logo" msgstr "/Edycja/Logo w _górÄ™" #: ../xgnokii/xgnokii_logos.c:1489 msgid "/Edit/_Down logo" msgstr "/Edycja/Logo w _dół" #: ../xgnokii/xgnokii_logos.c:1490 msgid "/Edit/_Left logo" msgstr "/Edycja/Logo w _lewo" #: ../xgnokii/xgnokii_logos.c:1491 msgid "/Edit/_Right logo" msgstr "/Edycja/Logo w _prawo" #: ../xgnokii/xgnokii_logos.c:1493 msgid "/Edit/Flip _horizontal" msgstr "/Edycja/Odbicie p_oziome" #: ../xgnokii/xgnokii_logos.c:1494 msgid "/Edit/Flip _vertical" msgstr "/Edycja/Odbicie p_ionowe" #: ../xgnokii/xgnokii_logos.c:1553 msgid "Clear logo" msgstr "Wyczyść logo" #: ../xgnokii/xgnokii_logos.c:1560 msgid "Get logo" msgstr "Pobierz logo" #: ../xgnokii/xgnokii_logos.c:1565 msgid "Set logo" msgstr "Ustaw logo" #: ../xgnokii/xgnokii_logos.c:1585 msgid "Startup logo" msgstr "Logo startowe" #: ../xgnokii/xgnokii_logos.c:1594 msgid "Operator logo" msgstr "Logo operatora" #: ../xgnokii/xgnokii_logos.c:1604 msgid "Caller logo" msgstr "Logo dzwoniÄ…cego" #: ../xgnokii/xgnokii_logos.c:1731 msgid "Brush tool" msgstr "Szczotka" #: ../xgnokii/xgnokii_logos.c:1742 msgid "Line tool" msgstr "Linia" #: ../xgnokii/xgnokii_logos.c:1752 msgid "Rectangle tool" msgstr "ProstokÄ…t" #: ../xgnokii/xgnokii_logos.c:1762 msgid "Filled rectangle tool" msgstr "WypeÅ‚niony prostokÄ…t" #: ../xgnokii/xgnokii_logos.c:1771 msgid "Invert logo" msgstr "Inwersja kolorów logo" #: ../xgnokii/xgnokii_logos.c:1776 msgid "Horizontal flip" msgstr "Odbicie poziome" #: ../xgnokii/xgnokii_logos.c:1781 msgid "Vertical flip" msgstr "Odbicie pionowe" #: ../xgnokii/xgnokii_logos.c:1836 msgid "Load preview pixmap error, feature disabled." msgstr "Nieudane wczytanie podglÄ…du obrazka, funkcja wyłączona." #: ../xgnokii/xgnokii_lowlevel.c:210 #, c-format msgid "Failed to open the phone. Quitting.\n" msgstr "Nieudane połączenie z telefonem. Koniec pracy.\n" #. We have some misconfiguration: phone doesn't handle #. neither folders nor SIM #: ../xgnokii/xgnokii_lowlevel.c:403 #, c-format msgid "" "Misconfiguration detected: phone handles neither folders nor sim.\n" "Contact gnokii developers to fix the issue.\n" msgstr "" "Wykryto błąd konfiguracji: telefon nie obsÅ‚uguje ani folderów ani pamiÄ™ci " "SMS.\n" "Skontaktuj siÄ™ z deweloperami gnokii (gnokii-users@nongnu.org), aby " "rozwiÄ…zać problem.\n" #: ../xgnokii/xgnokii_lowlevel.c:481 #, c-format msgid "%s: line %d: Can't get memory entry number %d from memory %d! %d\n" msgstr "%s: wiersz %d: Nieudane pobranie wpisu %d z pamiÄ™ci %d! %d\n" #: ../xgnokii/xgnokii_lowlevel.c:1249 msgid "Connecting..." msgstr "ÅÄ…czenie..." #: ../xgnokii/xgnokii_lowlevel.c:1260 msgid "" "It has been reported that your phone is known to be broken by xgnokii.\n" "Exiting application to avoid breakage. If you want to take a risk and\n" "run xgnokii anyway, set:\n" "\n" "\tallow_breakage = 1\n" "\n" "in xgnokii section in your config file.\n" "See http://thread.gmane.org/gmane.linux.drivers.gnokii/3195 for details.\n" msgstr "" "SÄ… znane przypadki, że Twój model telefonu zostaÅ‚ uszkodzony przez xgnokii.\n" "Aby zapobiec temu, koÅ„czÄ™ pracÄ™. JeÅ›li chcesz podjąć ryzyko i mimo to\n" "używać xgnokii, ustaw:\n" "\n" "\tallow_breakage = 1\n" "\n" "w sekcji xgnokii w pliku konfiguracyjnym.\n" #: ../xgnokii/xgnokii_lowlevel.c:1397 msgid "Refreshing SMSes..." msgstr "Odswieżanie wiadomoÅ›ci SMS..." #: ../xgnokii/xgnokii_netmon.c:260 msgid "/_Tools" msgstr "/_NarzÄ™dzia" #: ../xgnokii/xgnokii_netmon.c:261 msgid "/Tools/Net monitor o_n" msgstr "/NarzÄ™dzia/_Włącz monitor sieci" #: ../xgnokii/xgnokii_netmon.c:262 msgid "/Tools/Net monitor o_ff" msgstr "/NarzÄ™dzia/W_yłącz monitor sieci" #: ../xgnokii/xgnokii_netmon.c:354 ../xgnokii/xgnokii_netmon.c:357 msgid "Active cell" msgstr "Aktywna komórka" #: ../xgnokii/xgnokii_netmon.c:360 msgid "NCELL list I" msgstr "I lista NCELL" #: ../xgnokii/xgnokii_netmon.c:363 msgid "NCELL list II" msgstr "II lista NCELL" #: ../xgnokii/xgnokii_netmon.c:366 msgid "NCELL list III" msgstr "III lista NCELL" #: ../xgnokii/xgnokii_netmon.c:369 msgid "Preferred/Denied networks" msgstr "Sieci preferowane/zablokowane" #: ../xgnokii/xgnokii_netmon.c:372 msgid "System information bits" msgstr "Informacja o systemie" #: ../xgnokii/xgnokii_netmon.c:375 msgid "TMSI, Paging, PLU" msgstr "TMSI, Paging, PLU" #: ../xgnokii/xgnokii_netmon.c:378 msgid "Cells info" msgstr "Informacja o komórkach" #: ../xgnokii/xgnokii_netmon.c:381 msgid "DTX, Cipher, Hopping" msgstr "DTX, szyfr, Hopping" #: ../xgnokii/xgnokii_netmon.c:392 msgid "Uplink DTX" msgstr "Połączenie DTX" #: ../xgnokii/xgnokii_netmon.c:395 msgid "BTS TEST" msgstr "TEST BTS" #: ../xgnokii/xgnokii_netmon.c:398 msgid "CELL BARR-Flag" msgstr "Flaga CELL BARR" #: ../xgnokii/xgnokii_netmon.c:401 msgid "Accumulator, Charge status" msgstr "Bateria, stan naÅ‚adowania" #: ../xgnokii/xgnokii_netmon.c:404 msgid "?Constant voltage charging display" msgstr "?WyÅ›wietlanie Å‚adowania staÅ‚ym napiÄ™ciem" #: ../xgnokii/xgnokii_netmon.c:407 msgid "?Battery full detection" msgstr "?Wykrywanie peÅ‚nego naÅ‚adowania baterii" #: ../xgnokii/xgnokii_netmon.c:410 msgid "Accumulator" msgstr "Bateria" #: ../xgnokii/xgnokii_netmon.c:413 msgid "SW-Resets" msgstr "MiÄ™kkie restarty" #: ../xgnokii/xgnokii_netmon.c:416 msgid "Reset-Counter" msgstr "Licznik restartów" #: ../xgnokii/xgnokii_netmon.c:420 msgid "Cause codes for last connection abortion" msgstr "Kody przyczyn zerwania ostatnich połączeÅ„" #: ../xgnokii/xgnokii_netmon.c:431 msgid "Reset handover counters" msgstr "Wyzeruj liczniki przejęć" #: ../xgnokii/xgnokii_netmon.c:434 msgid "Handover Counter" msgstr "Licznik przejęć" #: ../xgnokii/xgnokii_netmon.c:437 msgid "Handover Counter (Dual)" msgstr "Licznik przejęć (podwójny)" #: ../xgnokii/xgnokii_netmon.c:440 msgid "L2-Timeouts" msgstr "Przekroczenia czasu L2" #: ../xgnokii/xgnokii_netmon.c:443 msgid "SIM" msgstr "SIM" #: ../xgnokii/xgnokii_netmon.c:446 msgid "?Block display 1" msgstr "?Zablokuj wyÅ›wietlacz 1" #: ../xgnokii/xgnokii_netmon.c:452 msgid "Memory status before reset" msgstr "Stan pamiÄ™ci sprzed restartu" #: ../xgnokii/xgnokii_netmon.c:455 msgid "Reset Counters" msgstr "Wyzeruj liczniki" #: ../xgnokii/xgnokii_netmon.c:459 msgid "Counter for PLMN Search and Cell reselection (Singleband)" msgstr "Licznik wyszukiwaÅ„ PLMN i wyborów komórek (pojedynczy zakres)" #: ../xgnokii/xgnokii_netmon.c:470 msgid "Neighbourhood measurement" msgstr "Pomiary sÄ…siedztwa" #: ../xgnokii/xgnokii_netmon.c:473 msgid "Calls" msgstr "Połączenia" #: ../xgnokii/xgnokii_netmon.c:476 msgid "Temporary counters of DSP" msgstr "Tymczasowe liczniki DSP" #: ../xgnokii/xgnokii_netmon.c:480 msgid "Control of task information displays" msgstr "Kontrola wyÅ›wietlania informacji o zadaniach" #: ../xgnokii/xgnokii_netmon.c:483 msgid "Information about task numbers 0-7" msgstr "Informacje o zadaniach 0-7" #: ../xgnokii/xgnokii_netmon.c:487 msgid "Information about task numbers 8-15" msgstr "Informacje o zadaniach 8-15" #: ../xgnokii/xgnokii_netmon.c:491 msgid "Information about task numbers 16-23" msgstr "Informacje o zadaniach 16-23" #: ../xgnokii/xgnokii_netmon.c:494 msgid "Information about OS_SYSTEM_STACK" msgstr "Informacje o OS-SYSTEM_STACK" #: ../xgnokii/xgnokii_netmon.c:498 msgid "Information about current MCU and DSP software versions" msgstr "Informacje o bieżących wersjach MCU i DSP" #: ../xgnokii/xgnokii_netmon.c:501 msgid "Hardware version" msgstr "Wersja sprzÄ™tu" #: ../xgnokii/xgnokii_netmon.c:520 msgid "Chan" msgstr "Chan" #: ../xgnokii/xgnokii_netmon.c:521 msgid "RxLv" msgstr "RxLv" #: ../xgnokii/xgnokii_netmon.c:522 msgid "C1" msgstr "C1" #: ../xgnokii/xgnokii_netmon.c:523 msgid "C2" msgstr "C2" #: ../xgnokii/xgnokii_netmon.c:524 msgid "ACT" msgstr "ACT" #: ../xgnokii/xgnokii_netmon.c:525 msgid "NC2" msgstr "NC2" #: ../xgnokii/xgnokii_netmon.c:526 msgid "NC3" msgstr "NC3" #: ../xgnokii/xgnokii_netmon.c:527 msgid "NC4" msgstr "NC4" #: ../xgnokii/xgnokii_netmon.c:528 msgid "NC5" msgstr "NC5" #: ../xgnokii/xgnokii_netmon.c:529 msgid "NC6" msgstr "NC6" #: ../xgnokii/xgnokii_netmon.c:530 msgid "NC7" msgstr "NC7" #: ../xgnokii/xgnokii_netmon.c:560 msgid "Page:" msgstr "Strona:" #: ../xgnokii/xgnokii_sms.c:250 ../xgnokii/xgnokii_sms.c:330 #: ../xgnokii/xgnokii_sms.c:444 msgid "read" msgstr "przeczytane" #: ../xgnokii/xgnokii_sms.c:253 ../xgnokii/xgnokii_sms.c:333 #: ../xgnokii/xgnokii_sms.c:430 msgid "unread" msgstr "nieprzeczytane" #: ../xgnokii/xgnokii_sms.c:256 ../xgnokii/xgnokii_sms.c:336 msgid "sent" msgstr "wysÅ‚ane" #: ../xgnokii/xgnokii_sms.c:259 ../xgnokii/xgnokii_sms.c:339 msgid "not sent" msgstr "niewysÅ‚ane" #: ../xgnokii/xgnokii_sms.c:302 msgid "read report" msgstr "przeczytany raport" #: ../xgnokii/xgnokii_sms.c:305 msgid "unread report" msgstr "nieprzeczytany raport" #: ../xgnokii/xgnokii_sms.c:312 msgid "seen picture" msgstr "obejrzany obrazek" #: ../xgnokii/xgnokii_sms.c:315 msgid "unseen picture" msgstr "nieobejrzany obrazek" #: ../xgnokii/xgnokii_sms.c:318 msgid "sent picture" msgstr "wysÅ‚any obrazek" #: ../xgnokii/xgnokii_sms.c:321 msgid "not sent picture" msgstr "niewysÅ‚any obrazek" #: ../xgnokii/xgnokii_sms.c:324 msgid "unknown picture" msgstr "nieznany obrazek" #: ../xgnokii/xgnokii_sms.c:349 #, c-format msgid "%02d/%02d/%04d %02d:%02d:%02d %c%02d00" msgstr "%02d/%02d/%04d %02d:%02d:%02d %c%02d00" #: ../xgnokii/xgnokii_sms.c:355 ../xgnokii/xgnokii_sms.c:360 #, c-format msgid "%02d/%02d/%04d %02d:%02d:%02d" msgstr "%02d/%02d/%04d %02d:%02d:%02d" #: ../xgnokii/xgnokii_sms.c:368 #, c-format msgid "Picture Message: %s" msgstr "Wiadomość graficzna: %s" #: ../xgnokii/xgnokii_sms.c:461 msgid "From: " msgstr "Od: " #: ../xgnokii/xgnokii_sms.c:466 msgid "Date: " msgstr "Data: " #: ../xgnokii/xgnokii_sms.c:563 msgid "Delete SMS" msgstr "UsuÅ„ SMS" #: ../xgnokii/xgnokii_sms.c:595 msgid "Do you want to delete selected SMS?" msgstr "Czy chcesz usunąć wybrane wiadomoÅ›ci?" #: ../xgnokii/xgnokii_sms.c:617 #, c-format msgid "Cannot open mailbox %s for appending!" msgstr "Nieudane otwarcie skrzynki pocztowej %s do dopisywania!" #: ../xgnokii/xgnokii_sms.c:631 #, c-format msgid "" "Cannot save to mailbox %s.\n" "\\%s is locked for process %d!" msgstr "" "Nieudany zapis do skrzynki pocztowej %s.\n" "\\%s jest zablokowane przez proces %d!" #: ../xgnokii/xgnokii_sms.c:644 #, c-format msgid "Cannot lock mailbox %s!" msgstr "Nieudana próba zalbokowania skrzynki pocztowej %s!" #: ../xgnokii/xgnokii_sms.c:699 #, c-format msgid "Cannot unlock mailbox %s!" msgstr "Nieudana próba odblokowania skrzynki pocztowej %s!" #: ../xgnokii/xgnokii_sms.c:747 msgid "Choose Mailbox File" msgstr "Wybierz plik skrzynki pocztowej" #: ../xgnokii/xgnokii_sms.c:857 #, c-format msgid "" "Name: %s\n" "Number: %s\n" "Used: %d\n" msgstr "" "Nazwa: %s\n" "Numer: %s\n" "Użyte: %d\n" #: ../xgnokii/xgnokii_sms.c:956 ../xgnokii/xgnokii_sms.c:1089 msgid "Address line contains illegal address!" msgstr "NieprawidÅ‚owy adres!" #: ../xgnokii/xgnokii_sms.c:1060 #, c-format msgid "" "Error sending SMS to %s\n" "%s" msgstr "" "Nieudane wysÅ‚anie SMS do %s\n" "%s" #: ../xgnokii/xgnokii_sms.c:1066 #, c-format msgid "Message sent to: %s\n" msgstr "Wiadomość wysÅ‚ana do: %s\n" #: ../xgnokii/xgnokii_sms.c:1153 ../xgnokii/xgnokii_sms.c:1185 #: ../xgnokii/xgnokii_sms.c:1211 #, c-format msgid "Sending SMS to %s (%d/%d) ...\n" msgstr "WysyÅ‚anie wiadomoÅ›ci do %s (%d/%d)...\n" #: ../xgnokii/xgnokii_sms.c:1246 msgid "/File/Sen_d" msgstr "/Plik/_WyÅ›lij" #: ../xgnokii/xgnokii_sms.c:1249 msgid "/File/Check _Names" msgstr "/Plik/Sprawdź _nazwy" #: ../xgnokii/xgnokii_sms.c:1250 msgid "/File/C_ontacts" msgstr "/Plik/_Kontakty" #: ../xgnokii/xgnokii_sms.c:1310 msgid "Send message" msgstr "WyÅ›lij wiadomość" #: ../xgnokii/xgnokii_sms.c:1314 msgid "Save message to outbox" msgstr "Zapisz do skrzynki nadawczej" #: ../xgnokii/xgnokii_sms.c:1321 msgid "Check names" msgstr "Sprawdź nazwy" #: ../xgnokii/xgnokii_sms.c:1334 msgid "To:" msgstr "Do:" #: ../xgnokii/xgnokii_sms.c:1402 msgid "Delivery report" msgstr "Raport dorÄ™czenia" #: ../xgnokii/xgnokii_sms.c:1406 msgid "Send as Long SMS" msgstr "WyÅ›lij jako dÅ‚ugi SMS" #: ../xgnokii/xgnokii_sms.c:1410 msgid "SMS Center:" msgstr "Centrum SMS:" #: ../xgnokii/xgnokii_sms.c:1431 msgid "New Message" msgstr "Nowa wiadomość" #: ../xgnokii/xgnokii_sms.c:1457 msgid "Forward Message" msgstr "PrzeÅ›lij dalej" #: ../xgnokii/xgnokii_sms.c:1498 msgid "Reply Message" msgstr "Odpowiedz" #: ../xgnokii/xgnokii_sms.c:1635 msgid "/File/Save to mailbo_x" msgstr "/Plik/Zapisz do _skrzynki pocztowej" #: ../xgnokii/xgnokii_sms.c:1636 msgid "/File/Save to _file" msgstr "/Plik/Zapisz do _pliku" #: ../xgnokii/xgnokii_sms.c:1639 msgid "/_Messages" msgstr "/_WiadomoÅ›ci" #: ../xgnokii/xgnokii_sms.c:1640 msgid "/_Messages/_Activate SMS reading" msgstr "/_WiadomoÅ›ci/W(_y)łącz czytanie wiadomoÅ›ci" #: ../xgnokii/xgnokii_sms.c:1641 msgid "/_Messages/_New" msgstr "/_WiadomoÅ›ci/_Nowa" #: ../xgnokii/xgnokii_sms.c:1642 msgid "/_Messages/_Forward" msgstr "/_WiadomoÅ›ci/_PrzeÅ›lij dalej" #: ../xgnokii/xgnokii_sms.c:1643 msgid "/_Messages/_Reply" msgstr "/_WiadomoÅ›ci/_Odpowiedz" #: ../xgnokii/xgnokii_sms.c:1644 msgid "/_Messages/_Delete" msgstr "/_WiadomoÅ›ci/_UsuÅ„" #: ../xgnokii/xgnokii_sms.c:1645 msgid "/Messages/Sep3" msgstr "/WiadomoÅ›ci/Sep3" #: ../xgnokii/xgnokii_sms.c:1646 msgid "/_Messages/_Business card" msgstr "/_WiadomoÅ›ci/_Wizytówka" #: ../xgnokii/xgnokii_sms.c:1666 msgid "Status" msgstr "Status" #: ../xgnokii/xgnokii_sms.c:1666 msgid "Date / Time" msgstr "Data / Czas" #: ../xgnokii/xgnokii_sms.c:1666 msgid "Sender" msgstr "Nadawca" #: ../xgnokii/xgnokii_sms.c:1666 msgid "Message" msgstr "Wiadomość" #: ../xgnokii/xgnokii_sms.c:1703 msgid "New message" msgstr "Nowa wiadomość" #: ../xgnokii/xgnokii_sms.c:1707 msgid "Forward message" msgstr "PrzeÅ›lij dalej" #: ../xgnokii/xgnokii_sms.c:1711 msgid "Reply message" msgstr "Odpowiedz" #: ../xgnokii/xgnokii_sms.c:1723 msgid "Delete message" msgstr "UsuÅ„ wiadomość" #: ../xgnokii/xgnokii_sms.c:1748 msgid "SMS's" msgstr "SMS-y" #: ../xgnokii/xgnokii_speed.c:181 msgid "Reading data ..." msgstr "Odczyt danych..." #: ../xgnokii/xgnokii_speed.c:207 #, c-format msgid "Cannot read speed dial key %d!\n" msgstr "Nieudana próba odczytu klawisza szybkiego wybierania %d!\n" #: ../xgnokii/xgnokii_speed.c:268 #, c-format msgid "Error writing speed dial for key %d!\n" msgstr "" "Nieudana próba przypisania numeru do klawisza szybkiego wybierania %d!\n" #: ../xgnokii/xgnokii_speed.c:542 msgid "Key" msgstr "Klawisz" #: ../xgnokii/xgnokii_xkeyb.c:180 msgid "Cannot load background pixmap!" msgstr "Nieudana próba wczytania tÅ‚a!" #: ../xgnokii/xgnokii_xkeyb.c:253 msgid "XGnokii Keyboard" msgstr "Klawiatura XGnokii" #: ../xgnokii/xgnokii_xring.c:404 #, c-format msgid "User #%d (%s)" msgstr "Użytkownik #%d (%s)" #: ../xgnokii/xgnokii_xring.c:423 #, c-format msgid "User #%d (*EMPTY*)" msgstr "Użytkownik #%d (*PUSTE*)" #: ../xgnokii/xgnokii_xring.c:628 msgid "Open ringtone..." msgstr "Otwórz dzwonek..." #: ../xgnokii/xgnokii_xring.c:670 msgid "Save ringtone as..." msgstr "Zapisz dzwonek jako..." #: ../xgnokii/xgnokii_xring.c:736 #, c-format msgid "Empty ringtone list" msgstr "Pusta lista dzwonków" #: ../xgnokii/xgnokii_xring.c:746 #, c-format msgid "" "Error getting ringtone\n" "%s" msgstr "" "Nieudana próba pobrania dzwonka\n" "%s" #: ../xgnokii/xgnokii_xring.c:763 #, c-format msgid "" "Error setting ringtone\n" "%s" msgstr "" "Nieudana próba zapisania dzwonka\n" "%s" #: ../xgnokii/xgnokii_xring.c:782 #, c-format msgid "" "Error deleting ringtone\n" "%s" msgstr "" "Nieudana próba usuniÄ™cia dzwonka\n" "%s" #: ../xgnokii/xgnokii_xring.c:830 msgid "/File/S1" msgstr "/Plik/S1" #: ../xgnokii/xgnokii_xring.c:831 msgid "/File/_Get ringtone" msgstr "/Plik/_Pobierz dzwonek" #: ../xgnokii/xgnokii_xring.c:832 msgid "/File/Se_t ringtone" msgstr "/Plik/Us_taw dzwonek" #: ../xgnokii/xgnokii_xring.c:833 msgid "/File/Delete ringtone" msgstr "/Plik/_UsuÅ„ dzwonek" #: ../xgnokii/xgnokii_xring.c:834 msgid "/File/_Play" msgstr "/Plik/_Odtwórz" #: ../xgnokii/xgnokii_xring.c:835 msgid "/File/S2" msgstr "/Plik/S2" #: ../xgnokii/xgnokii_xring.c:874 msgid "Clear ringtone" msgstr "Wyczyść dzwonek" #: ../xgnokii/xgnokii_xring.c:880 msgid "Get ringtone" msgstr "Pobierz dzwonek" #: ../xgnokii/xgnokii_xring.c:884 msgid "Set ringtone" msgstr "Zapisz dzwonek" #: ../xgnokii/xgnokii_xring.c:888 msgid "Delete ringtone" msgstr "UsuÅ„ dzwonek" #: ../xgnokii/xgnokii_xring.c:904 msgid "Play" msgstr "Odtwórz" #: ../xgnokii/xgnokii_xring.c:913 msgid "Select ringtone" msgstr "Wybierz dzwonek" #: ../xgnokii/xgnokii_xring.c:918 msgid "Ringtone name" msgstr "Nazwa dzwonka" #: ../xgnokii/xgnokii_xring.c:930 msgid "Set tempo" msgstr "Ustaw tempo" #~ msgid "ERROR: Can't find HOME environment variable!\n" #~ msgstr "BÅÄ„D: niezdefiniowana zmienna HOME!\n" #~ msgid "+%02d00" #~ msgstr "+%02d00" #~ msgid "%02d00" #~ msgstr "%02d00" #~ msgid "Response date/time: %02d/%02d/%04d %02d:%02d:%02d " #~ msgstr "Data/godzina odpowiedzi: %02d/%02d/%04d %02d:%02d:%02d " #~ msgid "WARNING: Can't find HOME environment variable!\n" #~ msgstr "UWAGA: Niezdefiniowana zmienna $HOME!\n" #~ msgid "GetMMS %s %d failed! (%s)\n" #~ msgstr "Nieudane pobranie MMS z pozycji %d w pamiÄ™ci %s! (%s)\n" #~ msgid "Deleted MMS %s %d\n" #~ msgstr "MMS %s %d usuniÄ™ty\n" #~ msgid "" #~ "DeleteMMS %s %d failed!(%s)\n" #~ "\n" #~ msgstr "" #~ "Nieudane usuniÄ™cie MMS %s %d!(%s)\n" #~ "\n" #~ msgid "Deleted SMS %s %d\n" #~ msgstr "SMS %s %d usuniÄ™ty\n" #~ msgid "" #~ "Deleting SMS %s %d failed!(%s)\n" #~ "\n" #~ msgstr "" #~ "Nieudane usuniÄ™cie SMS %s %d! (%s)\n" #~ "\n" #~ msgid "Couldn't read config.\n" #~ msgstr "Nieudana próba odczytu konfiguracji.\n" #~ msgid "Write error!\n" #~ msgstr "Błąd zapisu!\n" #~ msgid "Read ack error!\n" #~ msgstr "Błąd odczytu potwierdzenia!\n" #~ msgid "Write FAILED (%s): memory type: %s, loc: %d, name: %s, number: %s\n" #~ msgstr "" #~ "Nieudany zapis (%s): typ pamiÄ™ci: %s, pozycja: %d, nazwa: %s, numer: %s\n" #~ msgid "" #~ "See the gnokii manual page for the supported memory types with the phone\n" #~ "you use.\n" #~ msgstr "" #~ "ObsÅ‚ugiwane typy pamiÄ™ci dla twojego telefonu znajdziesz w podrÄ™czniku " #~ "gnokii.\n" #~ msgid "Starting SMS center number is greater than stop\n" #~ msgstr "PoczÄ…tkowy numer centrum wiadomoÅ›ci jest mniejszy niz koÅ„cowy\n" #~ msgid "%s\n" #~ msgstr "%s\n" #~ msgid "Orphaned line: %s\n" #~ msgstr "Osierocona linia: %s\n" #~ msgid "Help" #~ msgstr "Pomoc" #~ msgid "Help viewer" #~ msgstr "PrzeglÄ…darka pomocy" #~ msgid "Viewer:" #~ msgstr "PrzeglÄ…darka:" #~ msgid "/Help/_Help" #~ msgstr "/Pomoc/_Pomoc" #~ msgid "Cannot lock NULL device.\n" #~ msgstr "Zablokowanie urzÄ…dzenia NULL jest niemożliwe.\n" #~ msgid "Vcard began but not ended?" #~ msgstr "NiezakoÅ„czona vCard" #~ msgid "Please enter SMS text. End your input with :" #~ msgstr "Wprowadź treść SMS-a. ZakoÅ„cz przez :" #~ msgid "Business number" #~ msgstr "Numer sÅ‚użbowy" #~ msgid "Birthday date" #~ msgstr "Data urodzin" #~ msgid " Repeat: every day\n" #~ msgstr " Powtarzanie: codziennie\n" #~ msgid " Repeat: every week\n" #~ msgstr " Powtarzanie: co tydzieÅ„\n" #~ msgid " Repeat: every 2 weeks\n" #~ msgstr " Powtarzanie: co dwa tygodnie\n" #~ msgid " Repeat: every month\n" #~ msgstr " Powtarzanie: co miesiÄ…c\n" #~ msgid " Repeat: every year\n" #~ msgstr " Powtarzanie: co roku\n" #~ msgid " Repeat: %d hours\n" #~ msgstr " Powtarzanie: co %d godzin\n" #~ msgid " Phone: %s\n" #~ msgstr " Telefon: %s\n" #~ msgid " Location: %s\n" #~ msgstr " Pozycja: %s\n" #~ msgid "all\n" #~ msgstr "wszystkie\n" #~ msgid "noans\n" #~ msgstr "nie odpowiada\n" #~ msgid "unknown(0x%02x)\n" #~ msgstr "nieznane(0x%02x)\n" #~ msgid "voice\n" #~ msgstr "gÅ‚osowe\n" #~ msgid "fax\n" #~ msgstr "faks\n" #~ msgid "data\n" #~ msgstr "dane\n" #~ msgid "Timeout: %d\n" #~ msgstr "Czas oczekiwania: %d\n" #~ msgid "Network: %s, %s (%s), LAC: %02x%02x, CellID: %02x%02x\n" #~ msgstr "Sieć: %s, %s (%s), LAC: %02x%02x, CellID: %02x%02x\n" #~ msgid "Group: " #~ msgstr "Grupa: " #~ msgid " Extended address: %s\n" #~ msgstr " Adres rozszerzony : %s\n" #~ msgid " Street: %s\n" #~ msgstr " Ulica: %s\n" #~ msgid " City: %s\n" #~ msgstr " Miasto: %s\n" #~ msgid " State or province: %s\n" #~ msgstr " Stan lub prowincja: %s\n" #~ msgid " Zipcode: %s\n" #~ msgstr " Kod pocztowy: %s\n" #~ msgid " Country: %s\n" #~ msgstr " Kraj: %s\n" #~ msgid "Filename too long - will be truncated to 63 characters.\n" #~ msgstr "Nazwa pliku zbyt dÅ‚uga - zostanie skrócona do 63 znaków.\n" #~ msgid "%d. Delivery Report " #~ msgstr "%d. Raport dorÄ™czenia " #~ msgid "(read)\n" #~ msgstr "(przeczytana)\n" #~ msgid "(unread)\n" #~ msgstr "(nieprzeczytana)\n" #~ msgid "(sent)\n" #~ msgstr "(wysÅ‚ana)\n" #~ msgid "(unsent)\n" #~ msgstr "(niewysÅ‚ana)\n" #~ msgid "%d. Picture Message " #~ msgstr "%d. Wiadomość graficzna " #~ msgid "%d. MO Message " #~ msgstr "%d. Wiadomość wychodzÄ…ca" #~ msgid "Logo:\n" #~ msgstr "Logo:\n" #~ msgid "Ringtone\n" #~ msgstr "Dzwonek\n" #~ msgid "Unknown\n" #~ msgstr "Nieznany\n" #~ msgid "low\n" #~ msgstr "niski\n" #~ msgid "Name: %s\n" #~ msgstr "Nazwa: %s\n" #~ msgid "URL: %s\n" #~ msgstr "URL: %s\n" #~ msgid "Home: %s\n" #~ msgstr "Strona domowa: %s\n" #~ msgid "yes\n" #~ msgstr "tak\n" #~ msgid "no\n" #~ msgstr "nie\n" #~ msgid "SMS\n" #~ msgstr "SMS\n" #~ msgid "automatic\n" #~ msgstr "automatycznie\n" #~ msgid " Number: %s\n" #~ msgstr " Numer: %s\n" #~ msgid " connection: " #~ msgstr " połączenie: " #~ msgid " Server number: %s\n" #~ msgstr " Numer serwera: %s\n" #~ msgid "" #~ "Sorry, phonebook name will be truncated,\n" #~ "because you save it into SIM memory!" #~ msgstr "" #~ "Z powodu zapisu na karcie SIM nazwa wpisu\n" #~ "w książce telefonicznej zostanie skrócona!" #~ msgid "%s: line %d: Can't write SM memory entry number %d! Error: %d\n" #~ msgstr "" #~ "%s: wiersz %d: Nieudany zapis wpisu %d w pamiÄ™ci karty SIM! Błąd: %d\n" #~ msgid "Unrecognized [%s] option \"%s\", use \"%s\" or \"%s\" value\n" #~ msgstr "Nieznana [%s] opcja \"%s\", użyj wartoÅ›ci \"%s\" lub \"%s\".\n" #~ msgid "Unrecognized [logging] option \"%s\", use \"off\" or \"on\" value\n" #~ msgstr "Nieznana opcja logowania\"%s\", użyj wartoÅ›ci \"on\" lub \"off\".\n" #~ msgid "Cannot allocate memory!\n" #~ msgstr "Nieudana próba przydzielenia pamiÄ™ci!\n" gnokii-0.6.31/po/POTFILES.skip0000644000175000017500000000017111666163120013735 0ustar leoleocommon/data/at-emulator.c common/devices/winserial.c common/gnvcal.c common/phones/nk2110.c utils/gnokii-configure.glade gnokii-0.6.31/po/fi.po0000644000175000017500000046707711666163120012604 0ustar leoleo# This is the Finnish locale definition for Gnokii. # Copyright (C) 2008 Jari Turkia # msgid "" msgstr "" "Project-Id-Version: fi\n" "Report-Msgid-Bugs-To: feedback@gnokii.org\n" "POT-Creation-Date: 2011-12-01 21:36+0100\n" "PO-Revision-Date: 2008-09-16 21:44+0300\n" "Last-Translator: Jari Turkia \n" "Language-Team: Finnish \n" "Language: fi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Xgettext-Options: -a -k_ -s -v -d gnokii\n" "Files: fbus-3810.h fbus-6110.h gsm-api.h gsm-common.h misc.h fbus-3810.c " "fbus-6110.c gnokii.c gsm-api.c\n" "X-Generator: KBabel 1.11.4\n" #. Line not part of any heading #: ../common/cfgreader.c:458 #, c-format msgid "" "Orphaned line: %s\n" "If in doubt place this line into [global] section.\n" msgstr "" #: ../common/cfgreader.c:732 ../common/cfgreader.c:962 #, c-format msgid "No %s section in the config file.\n" msgstr "Osio %s puuttuu konfigurointitiedostosta.\n" #: ../common/cfgreader.c:738 ../common/cfgreader.c:744 #: ../common/cfgreader.c:750 #, c-format msgid "You need to define '%s' in the config file.\n" msgstr "Konfigurointitiedostossa on pakko määritellä '%s'.\n" #: ../common/cfgreader.c:755 ../common/cfgreader.c:768 #: ../common/cfgreader.c:777 ../common/cfgreader.c:785 #: ../common/cfgreader.c:797 ../common/cfgreader.c:806 #: ../common/cfgreader.c:814 ../common/cfgreader.c:824 #: ../common/cfgreader.c:842 ../common/cfgreader.c:850 #: ../common/cfgreader.c:871 ../common/cfgreader.c:980 #, c-format msgid "Unsupported [%s] %s value \"%s\"\n" msgstr "Osiossa [%s] asetuksen %s arvo \"%s\" ei ole tuettu\n" #: ../common/cfgreader.c:769 ../common/cfgreader.c:778 #: ../common/cfgreader.c:786 ../common/cfgreader.c:807 #: ../common/cfgreader.c:815 ../common/cfgreader.c:825 #: ../common/cfgreader.c:843 ../common/cfgreader.c:851 #, c-format msgid "Assuming: %d\n" msgstr "Olettaa: %d\n" #: ../common/cfgreader.c:798 ../common/cfgreader.c:872 #: ../common/cfgreader.c:981 #, c-format msgid "Use either \"%s\" or \"%s\".\n" msgstr "Käytä joko \"%s\" tai \"%s\".\n" #: ../common/cfgreader.c:799 ../common/cfgreader.c:873 #: ../common/cfgreader.c:982 #, c-format msgid "Assuming: %s\n" msgstr "Olettaa: %s\n" #: ../common/cfgreader.c:1172 #, c-format msgid "Couldn't read %s config file.\n" msgstr "Konfigurointitiedostoa %s ei voitu lukea.\n" #: ../common/cfgreader.c:1187 #, fuzzy, c-format msgid "Failed to initialize libgnokii.\n" msgstr "Soittoäänen kirjoitus epäonnistui.\n" #: ../common/cfgreader.c:1192 #, c-format msgid "Couldn't open a config file or memory.\n" msgstr "Konfigurointitiedostotoa ei voitu avata tai muistia ei ole.\n" #: ../common/cfgreader.c:1282 #, c-format msgid "Config error - no model specified.\n" msgstr "Konfigurointivirhe - mallia ei ole määritelty.\n" #: ../common/cfgreader.c:1286 #, c-format msgid "Config error - no port specified.\n" msgstr "Konfigurointivirhe - porttia ei ole määritelty.\n" #: ../common/data/virtmodem.c:144 #, c-format msgid "gn_vm_initialise - VM_GSMInitialise failed!\n" msgstr "gn_vm_initialise - VM_GSMInitialise epäonnistui!\n" #: ../common/data/virtmodem.c:151 #, c-format msgid "gn_vm_initialise - VM_PtySetup failed!\n" msgstr "gn_vm_initialise - VM_PtySetup epäonnistui!\n" #: ../common/data/virtmodem.c:156 #, c-format msgid "gn_vm_initialise - gn_atem_initialise failed!\n" msgstr "gn_vm_initialise - gn_atem_initialise epäonnistui!\n" #: ../common/data/virtmodem.c:161 #, fuzzy, c-format msgid "gn_vm_initialise - dp_Initialise failed!\n" msgstr "gn_vm_Initialise - dp_Initialise epäonnistui!\n" #: ../common/data/virtmodem.c:365 #, fuzzy, c-format msgid "Cannot access %s, check the bindir in your config file!\n" msgstr "%s ei ole pääsyä, tarkista asetus bindir konfigurointitiedostostasi!\n" #: ../common/data/virtmodem.c:372 ../utils/mgnokiidev.c:186 #, c-format msgid "Couldn't open pty!\n" msgstr "Pseudoterminaalia ei voitu avata!\n" #: ../common/data/virtmodem.c:389 ../gnokii/gnokii-other.c:78 #: ../smsd/lowlevel.c:124 ../xgnokii/xgnokii_lowlevel.c:200 #, c-format msgid "GSM/FBUS init failed! (Unknown model?). Quitting.\n" msgstr "" "GSM/FBUS alustus epäonnistui! (Tuntematon puhelimen malli?). Lopetetaan.\n" #: ../common/devices/tcp.c:80 msgid "Gnokii tcp_open: socket()" msgstr "" #: ../common/devices/tcp.c:89 #, c-format msgid "Gnokii tcp_open: colon (':') not found in connect strings \"%s\"!\n" msgstr "" "Gnokii tcp_open: kaksoispiste (':') puuttuu yhteyden merkkijonosta \"%s\"!\n" #: ../common/devices/tcp.c:97 #, c-format msgid "Gnokii tcp_open: Port string \"%s\" not valid for IPv4 connection!\n" msgstr "Gnokii tcp_open: Portti \"%s\" ei ole validi IPv4-yhteydessä!\n" #: ../common/devices/tcp.c:101 #, c-format msgid "Gnokii tcp_open: Unknown host \"%s\"!\n" msgstr "Gnokii tcp_open: Tuntematon osoite \"%s\"!\n" #: ../common/devices/tcp.c:105 #, c-format msgid "Gnokii tcp_open: Address resolve for host \"%s\" not compatible!\n" msgstr "Gnokii tcp_open: Osoiteen määrittely \"%s\" ei ole yhteensopiva!\n" #: ../common/devices/tcp.c:115 msgid "Gnokii tcp_open: connect()" msgstr "" #: ../common/devices/tcp.c:127 #, c-format msgid "Gnokii tcp_close: disconnect_script\n" msgstr "" #: ../common/devices/tcp.c:150 #, c-format msgid "Gnokii tcp_opendevice: connect_script\n" msgstr "" #: ../common/devices/tcp.c:160 msgid "Gnokii tcp_opendevice: fcntl(F_SETOWN)" msgstr "" #: ../common/devices/tcp.c:183 msgid "Gnokii tcp_opendevice: fcntl(F_SETFL)" msgstr "" #: ../common/devices/unixbluetooth.c:497 #, c-format msgid "Invalid bluetooth address \"%s\"\n" msgstr "Epäkelpo bluetooth-osoite \"%s\"\n" #: ../common/devices/unixbluetooth.c:502 msgid "Can't create socket" msgstr "Soketin luonti epäonnistui" #: ../common/devices/unixbluetooth.c:521 #, c-format msgid "" "Cannot find any appropriate rfcomm channel and none was specified in the " "config.\n" msgstr "" #: ../common/devices/unixbluetooth.c:530 msgid "Can't connect" msgstr "Yhteyden avaus epäonnistui" #: ../common/devices/unixirda.c:150 #, c-format msgid "Virtual IrCOMM device unsupported under Linux\n" msgstr "Virtuaalinen IrCOMM-laitet ei ole tuettu Linuxissa\n" #: ../common/devices/unixserial.c:117 #, c-format msgid "device_script(\"%s\"): fork() failure: %s!\n" msgstr "" #: ../common/devices/unixserial.c:124 #, c-format msgid "device_script(\"%s\"): file descriptor preparation failure: %s\n" msgstr "" #: ../common/devices/unixserial.c:130 #, c-format msgid "device_script(\"%s\"): script execution failure: %s\n" msgstr "" #: ../common/devices/unixserial.c:137 #, c-format msgid "" "device_script(\"%s\"): child script execution failure: %s, exit code=%d\n" msgstr "" #: ../common/devices/unixserial.c:138 msgid "normal exit" msgstr "normaali lopetus" #: ../common/devices/unixserial.c:138 msgid "abnormal exit" msgstr "epänormaali lopetus" #: ../common/devices/unixserial.c:394 #, c-format msgid "Serial port speed %d not supported!\n" msgstr "Sarjaportin nopeus %d ei ole tuettu!\n" #: ../common/devices/unixserial.c:434 #, c-format msgid "ERROR: Modem DCD is down and global/require_dcd parameter is set!\n" msgstr "" "VIRHE: Modeemin DCD-linja on alhaalla ja global/require_dcd parametri on " "päällä!\n" #: ../common/devices/winbluetooth.c:70 ../common/devices/winirda.c:113 #, c-format msgid "Failed to initialize socket subsystem: need WINSOCK2. Please upgrade.\n" msgstr "" "TCP/IP-alijärjestelmän alustus epäonnistui: tarvitaan WINSOCK2. Päivitä " "käyttöjärjestelmä.\n" #: ../common/gsm-common.c:148 msgid "Internal memory" msgstr "Sisäinen muisti" #: ../common/gsm-common.c:149 msgid "SIM card" msgstr "SIM-kortti" #: ../common/gsm-common.c:150 msgid "Fixed dial numbers" msgstr "Numero:" #: ../common/gsm-common.c:151 #, fuzzy msgid "Own numbers" msgstr " Numero: " #: ../common/gsm-common.c:152 #, fuzzy msgid "Emergency numbers" msgstr " Numero: " #: ../common/gsm-common.c:153 #, fuzzy msgid "Dialled numbers" msgstr " Numero: " #: ../common/gsm-common.c:154 msgid "Received numbers" msgstr "Numero:" #: ../common/gsm-common.c:155 msgid "Missed numbers" msgstr "Numero:" #: ../common/gsm-common.c:156 #, fuzzy msgid "Last dialled" msgstr "Numero:" #: ../common/gsm-common.c:157 #, fuzzy msgid "Barred dialling numbers" msgstr " Numero: " #: ../common/gsm-common.c:158 #, fuzzy msgid "Service dialling numbers" msgstr " Numero: " #: ../common/gsm-common.c:159 msgid "Combined ME and SIM phonebook" msgstr "Yhdistetty ME ja SIM puhelinluettelo" #: ../common/gsm-common.c:160 msgid "Computer memory" msgstr "Tietokoneen muisti" #: ../common/gsm-common.c:161 msgid "Currently selected memory" msgstr "Valittu muisti" #: ../common/gsm-common.c:162 msgid "SMS Inbox" msgstr "" #: ../common/gsm-common.c:163 msgid "SMS Outbox, sent items" msgstr "" #: ../common/gsm-common.c:164 msgid "SMS Archive" msgstr "" #: ../common/gsm-common.c:165 msgid "SMS Templates" msgstr "" #: ../common/gsm-common.c:166 msgid "SMS Status Reports" msgstr "" #: ../common/gsm-common.c:167 msgid "SMS Drafts" msgstr "" #: ../common/gsm-common.c:168 msgid "SMS Outbox, items to be sent" msgstr "" #: ../common/gsm-common.c:169 msgid "SMS Folder 1" msgstr "" #: ../common/gsm-common.c:170 msgid "SMS Folder 2" msgstr "" #: ../common/gsm-common.c:171 msgid "SMS Folder 3" msgstr "" #: ../common/gsm-common.c:172 msgid "SMS Folder 4" msgstr "" #: ../common/gsm-common.c:173 msgid "SMS Folder 5" msgstr "" #: ../common/gsm-common.c:174 msgid "SMS Folder 6" msgstr "" #: ../common/gsm-common.c:175 msgid "SMS Folder 7" msgstr "" #: ../common/gsm-common.c:176 msgid "SMS Folder 8" msgstr "" #: ../common/gsm-common.c:177 msgid "SMS Folder 9" msgstr "" #: ../common/gsm-common.c:178 msgid "SMS Folder 10" msgstr "" #: ../common/gsm-common.c:179 msgid "SMS Folder 11" msgstr "" #: ../common/gsm-common.c:180 msgid "SMS Folder 12" msgstr "" #: ../common/gsm-common.c:181 msgid "SMS Folder 13" msgstr "" #: ../common/gsm-common.c:182 msgid "SMS Folder 14" msgstr "" #: ../common/gsm-common.c:183 msgid "SMS Folder 15" msgstr "" #: ../common/gsm-common.c:184 msgid "SMS Folder 16" msgstr "" #: ../common/gsm-common.c:185 msgid "SMS Folder 17" msgstr "" #: ../common/gsm-common.c:186 msgid "SMS Folder 18" msgstr "" #: ../common/gsm-common.c:187 msgid "SMS Folder 19" msgstr "" #: ../common/gsm-common.c:188 msgid "SMS Folder 20" msgstr "" #: ../common/gsm-common.c:189 msgid "Cell Broadcast" msgstr "" #: ../common/gsm-common.c:190 ../common/gsm-common.c:211 #: ../common/gsm-common.c:222 ../common/gsm-common.c:235 #: ../common/gsm-common.c:290 ../common/gsm-common.c:343 #: ../common/gsm-common.c:356 ../common/gsm-common.c:380 #: ../common/gsm-common.c:381 ../common/gsm-common.c:398 #: ../common/gsm-common.c:409 ../common/gsm-common.c:424 #: ../common/gsm-common.c:437 ../common/gsm-common.c:451 #: ../common/gsm-common.c:464 ../common/gsm-common.c:474 #: ../common/gsm-common.c:485 ../common/gsm-common.c:494 #: ../common/gsm-common.c:505 ../common/gsm-common.c:514 #: ../common/gsm-common.c:524 ../common/gsm-common.c:533 #: ../common/gsm-common.c:542 ../common/gsm-common.c:556 #: ../common/gsm-common.c:565 ../common/gsm-common.c:574 #: ../common/gsm-common.c:587 ../common/gsm-common.c:598 #: ../common/gsm-common.c:610 ../common/gsm-common.c:624 #: ../common/gsm-common.c:635 ../common/gsm-common.c:647 #: ../common/gsm-sms.c:409 ../common/libfunctions.c:219 #: ../common/phones/atgen.c:2695 ../common/phones/atgen.c:2702 #: ../common/phones/atgen.c:3183 ../common/phones/nk6100.c:4087 #: ../gnokii/gnokii-ringtone.c:90 ../xgnokii/xgnokii_calendar.c:187 #: ../xgnokii/xgnokii_contacts.c:765 ../xgnokii/xgnokii_contacts.c:821 #: ../xgnokii/xgnokii_contacts.c:948 ../xgnokii/xgnokii_contacts.c:990 #: ../xgnokii/xgnokii_contacts.c:1206 ../xgnokii/xgnokii_contacts.c:1230 #, c-format msgid "Unknown" msgstr "Tuntematon" #: ../common/gsm-common.c:197 ../common/gsm-common.c:234 #: ../common/gsm-common.c:355 msgid "None" msgstr "Ei määritelty" #: ../common/gsm-common.c:198 msgid "Serial" msgstr "RS-232" #: ../common/gsm-common.c:199 msgid "Serial DAU9P" msgstr "RS-232 DAU9P" #: ../common/gsm-common.c:200 msgid "Serial DLR3P" msgstr "RS-232 DLR3P" #: ../common/gsm-common.c:201 msgid "Infrared (old Nokias)" msgstr "Infrapuna (vanhoihin Nokioihin)" #: ../common/gsm-common.c:202 msgid "IrDA" msgstr "" #: ../common/gsm-common.c:203 msgid "Bluetooth" msgstr "" #: ../common/gsm-common.c:204 msgid "Tekram Ir-Dongle" msgstr "Tekram Ir-lähetin" #: ../common/gsm-common.c:205 msgid "TCP" msgstr "" #: ../common/gsm-common.c:206 msgid "M2BUS" msgstr "" #: ../common/gsm-common.c:207 msgid "DKU2 (kernel support)" msgstr "" #: ../common/gsm-common.c:208 msgid "DKU2 (libusb support)" msgstr "" #: ../common/gsm-common.c:209 msgid "Smart Card reader (libpcsclite support)" msgstr "" #: ../common/gsm-common.c:210 msgid "Linux Phonet (kernel support)" msgstr "" #: ../common/gsm-common.c:218 #, fuzzy msgid "AC-DC" msgstr "Virtalähde" #: ../common/gsm-common.c:219 msgid "Battery" msgstr "Akku" #: ../common/gsm-common.c:220 #, fuzzy msgid "No battery" msgstr "Akku" #: ../common/gsm-common.c:221 msgid "Power fault" msgstr "" #: ../common/gsm-common.c:229 msgid "Security code" msgstr "Turvakoodi" #: ../common/gsm-common.c:230 msgid "PIN" msgstr "" #: ../common/gsm-common.c:231 msgid "PIN2" msgstr "" #: ../common/gsm-common.c:232 msgid "PUK" msgstr "" #: ../common/gsm-common.c:233 msgid "PUK2" msgstr "" #: ../common/gsm-common.c:244 ../common/gsm-common.c:245 #: ../common/gsm-common.c:250 #, fuzzy msgid "General number" msgstr " Numero: " #: ../common/gsm-common.c:246 #, fuzzy msgid "Home number" msgstr " Numero: " #: ../common/gsm-common.c:247 #, fuzzy msgid "Mobile number" msgstr " Numero: " #: ../common/gsm-common.c:248 #, fuzzy msgid "Fax number" msgstr " Numero: " #: ../common/gsm-common.c:249 #, fuzzy msgid "Work number" msgstr " Numero: " #: ../common/gsm-common.c:251 ../common/gsm-common.c:340 #, fuzzy msgid "Unknown number" msgstr " Numero: " #: ../common/gsm-common.c:258 ../gnokii/gnokii-phonebook.c:187 #: ../gnokii/gnokii-wap.c:89 ../gnokii/gnokii-wap.c:220 #: ../xgnokii/xgnokii_contacts.c:749 ../xgnokii/xgnokii_contacts.c:815 #: ../xgnokii/xgnokii_contacts.c:946 ../xgnokii/xgnokii_contacts.c:988 #: ../xgnokii/xgnokii_contacts.c:1224 ../xgnokii/xgnokii_contacts.c:1729 #: ../xgnokii/xgnokii_contacts.c:2936 ../xgnokii/xgnokii_contacts.c:3120 #: ../xgnokii/xgnokii_speed.c:542 msgid "Name" msgstr "" #: ../common/gsm-common.c:259 ../common/gsm-common.c:422 #: ../xgnokii/xgnokii.c:542 ../xgnokii/xgnokii.c:1433 #: ../xgnokii/xgnokii_contacts.c:743 ../xgnokii/xgnokii_contacts.c:812 #: ../xgnokii/xgnokii_contacts.c:945 ../xgnokii/xgnokii_contacts.c:987 #: ../xgnokii/xgnokii_contacts.c:1220 msgid "Email" msgstr "" #: ../common/gsm-common.c:260 ../common/gsm-common.c:277 msgid "Postal address" msgstr "" #: ../common/gsm-common.c:261 ../xgnokii/xgnokii_contacts.c:731 #: ../xgnokii/xgnokii_contacts.c:806 ../xgnokii/xgnokii_contacts.c:943 #: ../xgnokii/xgnokii_contacts.c:985 ../xgnokii/xgnokii_contacts.c:1026 #: ../xgnokii/xgnokii_contacts.c:1212 msgid "Note" msgstr "" #: ../common/gsm-common.c:262 ../gnokii/gnokii-dial.c:376 #: ../gnokii/gnokii-phonebook.c:203 ../gnokii/gnokii-wap.c:231 #: ../xgnokii/xgnokii_calendar.c:1540 ../xgnokii/xgnokii_contacts.c:1737 #: ../xgnokii/xgnokii_contacts.c:2936 ../xgnokii/xgnokii_contacts.c:3120 #: ../xgnokii/xgnokii_speed.c:542 msgid "Number" msgstr "" #: ../common/gsm-common.c:263 ../common/gsm-common.c:272 #: ../common/gsm-common.c:367 ../xgnokii/xgnokii.c:1142 #: ../xgnokii/xgnokii_xring.c:845 msgid "Ringtone" msgstr "" #: ../common/gsm-common.c:264 msgid "Date" msgstr "" #: ../common/gsm-common.c:265 msgid "Pointer" msgstr "" #: ../common/gsm-common.c:266 ../common/gsm-common.c:369 msgid "Logo" msgstr "" #: ../common/gsm-common.c:267 msgid "Logo switch" msgstr "" #: ../common/gsm-common.c:268 ../xgnokii/xgnokii_contacts.c:2936 #: ../xgnokii/xgnokii_contacts.c:3120 msgid "Group" msgstr "" #: ../common/gsm-common.c:269 ../gnokii/gnokii-wap.c:90 #: ../xgnokii/xgnokii_contacts.c:758 ../xgnokii/xgnokii_contacts.c:818 #: ../xgnokii/xgnokii_contacts.c:947 ../xgnokii/xgnokii_contacts.c:989 #: ../xgnokii/xgnokii_contacts.c:1227 msgid "URL" msgstr "" #: ../common/gsm-common.c:270 ../gnokii/gnokii-calendar.c:206 #: ../xgnokii/xgnokii_calendar.c:1541 msgid "Location" msgstr "Paikka" #: ../common/gsm-common.c:271 msgid "Image" msgstr "" #: ../common/gsm-common.c:273 msgid "User ID" msgstr "" #: ../common/gsm-common.c:274 msgid "Push-To-Talk address" msgstr "" #: ../common/gsm-common.c:275 msgid "First name" msgstr "Etunimi" #: ../common/gsm-common.c:276 msgid "Last name" msgstr "Sukunimi" #: ../common/gsm-common.c:278 ../gnokii/gnokii-phonebook.c:212 msgid "Extended address" msgstr "Lisäosoite" #: ../common/gsm-common.c:279 ../gnokii/gnokii-phonebook.c:214 msgid "Street" msgstr "Katuosoite" #: ../common/gsm-common.c:280 ../gnokii/gnokii-phonebook.c:216 msgid "City" msgstr "Postitoimipaikka" #: ../common/gsm-common.c:281 ../gnokii/gnokii-phonebook.c:218 msgid "State or province" msgstr "Lääni" #: ../common/gsm-common.c:282 ../gnokii/gnokii-phonebook.c:220 msgid "Zip code" msgstr "Postinumero" #: ../common/gsm-common.c:283 ../gnokii/gnokii-phonebook.c:222 msgid "Country" msgstr "Maa" #: ../common/gsm-common.c:284 msgid "Formal name" msgstr "Virallinen nimi" #: ../common/gsm-common.c:285 msgid "Job title" msgstr "Titteli" #: ../common/gsm-common.c:286 msgid "Company" msgstr "Yritys" #: ../common/gsm-common.c:287 msgid "Nickname" msgstr "Lempinimi" #: ../common/gsm-common.c:288 ../common/gsm-common.c:448 #: ../xgnokii/xgnokii_calendar.c:181 ../xgnokii/xgnokii_calendar.c:288 msgid "Birthday" msgstr "Syntymäpäivä" #: ../common/gsm-common.c:289 #, fuzzy msgid "Caller group id" msgstr "Soittajaryhmä" #: ../common/gsm-common.c:350 ../common/nokia-decoding.c:349 #: ../common/phones/nk6100.c:1007 ../xgnokii/xgnokii.c:221 #: ../xgnokii/xgnokii.c:1027 msgid "Family" msgstr "" #: ../common/gsm-common.c:351 msgid "VIPs" msgstr "" #: ../common/gsm-common.c:352 ../common/nokia-decoding.c:355 #: ../common/phones/nk6100.c:1013 ../xgnokii/xgnokii.c:223 #: ../xgnokii/xgnokii.c:1051 msgid "Friends" msgstr "" #: ../common/gsm-common.c:353 ../xgnokii/xgnokii_contacts.c:713 #: ../xgnokii/xgnokii_contacts.c:797 ../xgnokii/xgnokii_contacts.c:940 #: ../xgnokii/xgnokii_contacts.c:982 ../xgnokii/xgnokii_contacts.c:1194 msgid "Work" msgstr "" #: ../common/gsm-common.c:354 msgid "Others" msgstr "" #: ../common/gsm-common.c:365 ../common/gsm-common.c:416 #: ../xgnokii/xgnokii.c:529 ../xgnokii/xgnokii.c:558 ../xgnokii/xgnokii.c:1415 #: ../xgnokii/xgnokii_calendar.c:1539 msgid "Text" msgstr "" #: ../common/gsm-common.c:366 msgid "Linked" msgstr "" #: ../common/gsm-common.c:368 msgid "GSM Operator Logo" msgstr "Operaattorilogo" #: ../common/gsm-common.c:370 msgid "Multipart Message" msgstr "Moniosainen viesti" #: ../common/gsm-common.c:371 msgid "WAP vCard" msgstr "" #: ../common/gsm-common.c:372 msgid "WAP vCalendar" msgstr "" #: ../common/gsm-common.c:373 msgid "WAP vCardSecure" msgstr "" #: ../common/gsm-common.c:374 msgid "WAP vCalendarSecure" msgstr "" #: ../common/gsm-common.c:375 msgid "Voice Message" msgstr "" #: ../common/gsm-common.c:376 msgid "Fax Message" msgstr "" #: ../common/gsm-common.c:377 msgid "Email Message" msgstr "" #: ../common/gsm-common.c:378 msgid "WAP Push" msgstr "" #: ../common/gsm-common.c:379 msgid "Other Message" msgstr "" #: ../common/gsm-common.c:388 msgid "Inbox Message" msgstr "" #: ../common/gsm-common.c:389 msgid "Delivery Report" msgstr "" #: ../common/gsm-common.c:390 ../common/gsm-common.c:397 msgid "MO Message" msgstr "" #: ../common/gsm-common.c:391 msgid "Submit Report" msgstr "" #: ../common/gsm-common.c:392 msgid "Command" msgstr "" #: ../common/gsm-common.c:393 msgid "Status Report" msgstr "" #: ../common/gsm-common.c:394 msgid "Picture Message" msgstr "" #: ../common/gsm-common.c:395 msgid "Template" msgstr "" #: ../common/gsm-common.c:396 msgid "Picture Message Template" msgstr "" #: ../common/gsm-common.c:405 msgid "Read" msgstr "" #: ../common/gsm-common.c:406 msgid "Unread" msgstr "" #: ../common/gsm-common.c:407 msgid "Sent" msgstr "" #: ../common/gsm-common.c:408 msgid "Unsent" msgstr "" #: ../common/gsm-common.c:417 ../common/gsm-common.c:632 #: ../xgnokii/xgnokii.c:537 ../xgnokii/xgnokii.c:1421 #: ../xgnokii/xgnokii_contacts.c:719 ../xgnokii/xgnokii_contacts.c:800 #: ../xgnokii/xgnokii_contacts.c:941 ../xgnokii/xgnokii_contacts.c:983 #: ../xgnokii/xgnokii_contacts.c:1198 msgid "Fax" msgstr "" #: ../common/gsm-common.c:418 msgid "VoiceMail" msgstr "" #: ../common/gsm-common.c:419 ../xgnokii/xgnokii.c:546 msgid "ERMES" msgstr "" #: ../common/gsm-common.c:420 ../xgnokii/xgnokii.c:533 #: ../xgnokii/xgnokii.c:1427 msgid "Paging" msgstr "" #: ../common/gsm-common.c:421 msgid "Email message in 8110i" msgstr "" #: ../common/gsm-common.c:423 ../xgnokii/xgnokii.c:550 msgid "X.400" msgstr "" #: ../common/gsm-common.c:431 ../xgnokii/xgnokii.c:564 #: ../xgnokii/xgnokii.c:1461 msgid "1 hour" msgstr "" #: ../common/gsm-common.c:432 ../xgnokii/xgnokii.c:568 #: ../xgnokii/xgnokii.c:1467 msgid "6 hours" msgstr "" #: ../common/gsm-common.c:433 ../xgnokii/xgnokii.c:572 #: ../xgnokii/xgnokii.c:588 ../xgnokii/xgnokii.c:1473 msgid "24 hours" msgstr "" #: ../common/gsm-common.c:434 ../xgnokii/xgnokii.c:576 #: ../xgnokii/xgnokii.c:1479 msgid "72 hours" msgstr "" #: ../common/gsm-common.c:435 ../xgnokii/xgnokii.c:580 #: ../xgnokii/xgnokii.c:1485 msgid "1 week" msgstr "" #: ../common/gsm-common.c:436 msgid "Maximum time" msgstr "" #: ../common/gsm-common.c:446 ../common/phones/nk6100.c:2113 #: ../xgnokii/xgnokii_calendar.c:175 #, c-format msgid "Meeting" msgstr "" #: ../common/gsm-common.c:447 ../xgnokii/xgnokii_calendar.c:169 msgid "Call" msgstr "" #: ../common/gsm-common.c:449 ../xgnokii/xgnokii_calendar.c:163 msgid "Reminder" msgstr "" #: ../common/gsm-common.c:450 ../xgnokii/xgnokii_calendar.c:157 msgid "Memo" msgstr "" #: ../common/gsm-common.c:458 ../xgnokii/xgnokii_calendar.c:831 msgid "Never" msgstr "" #: ../common/gsm-common.c:459 msgid "Daily" msgstr "" #: ../common/gsm-common.c:460 msgid "Weekly" msgstr "" #: ../common/gsm-common.c:461 msgid "Every 2 weeks" msgstr "" #: ../common/gsm-common.c:462 msgid "Monthly" msgstr "" #: ../common/gsm-common.c:463 msgid "Yearly" msgstr "" #: ../common/gsm-common.c:471 msgid "Low" msgstr "" #: ../common/gsm-common.c:472 msgid "Medium" msgstr "" #: ../common/gsm-common.c:473 msgid "High" msgstr "" #: ../common/gsm-common.c:483 msgid "Temporary" msgstr "" #: ../common/gsm-common.c:484 msgid "Permanent" msgstr "" #: ../common/gsm-common.c:492 msgid "Normal" msgstr "" #: ../common/gsm-common.c:493 msgid "Secure" msgstr "" #: ../common/gsm-common.c:501 ../gnokii/gnokii-wap.c:225 msgid "GSM data" msgstr "" #: ../common/gsm-common.c:502 ../gnokii/gnokii-wap.c:234 msgid "GPRS" msgstr "" #: ../common/gsm-common.c:503 ../gnokii/gnokii-wap.c:242 #: ../xgnokii/xgnokii.c:1106 ../xgnokii/xgnokii.c:1848 msgid "SMS" msgstr "" #: ../common/gsm-common.c:504 msgid "USSD" msgstr "" #: ../common/gsm-common.c:512 msgid "Analogue" msgstr "" #: ../common/gsm-common.c:513 msgid "ISDN" msgstr "" #: ../common/gsm-common.c:521 ../common/gsm-common.c:532 #: ../gnokii/gnokii-profile.c:185 msgid "Automatic" msgstr "" #: ../common/gsm-common.c:522 msgid "9600" msgstr "" #: ../common/gsm-common.c:523 msgid "14400" msgstr "" #: ../common/gsm-common.c:531 msgid "Manual" msgstr "" #: ../common/gsm-common.c:540 msgid "Always" msgstr "" #: ../common/gsm-common.c:541 msgid "When needed" msgstr "" #: ../common/gsm-common.c:551 msgid "No tone" msgstr "" #: ../common/gsm-common.c:552 msgid "Standard" msgstr "" #: ../common/gsm-common.c:553 msgid "Special" msgstr "" #: ../common/gsm-common.c:554 ../common/gsm-common.c:582 msgid "Beep once" msgstr "" #: ../common/gsm-common.c:555 ../common/gsm-common.c:585 msgid "Ascending" msgstr "" #: ../common/gsm-common.c:563 ../common/gsm-common.c:572 #: ../common/gsm-common.c:583 ../common/gsm-common.c:594 #: ../gnokii/gnokii-profile.c:192 msgid "Off" msgstr "" #: ../common/gsm-common.c:564 ../common/gsm-common.c:573 #: ../gnokii/gnokii-profile.c:185 ../gnokii/gnokii-profile.c:192 msgid "On" msgstr "" #: ../common/gsm-common.c:581 msgid "Ringing" msgstr "" #: ../common/gsm-common.c:584 msgid "Ring once" msgstr "Soi kerran" #: ../common/gsm-common.c:586 msgid "Caller groups" msgstr "" #: ../common/gsm-common.c:595 ../common/gsm-common.c:605 msgid "Level 1" msgstr "Kenttävoimakkuus: 1" #: ../common/gsm-common.c:596 ../common/gsm-common.c:606 msgid "Level 2" msgstr "Kenttävoimakkuus: 2" #: ../common/gsm-common.c:597 ../common/gsm-common.c:607 msgid "Level 3" msgstr "Kenttävoimakkuus: 3" #: ../common/gsm-common.c:608 msgid "Level 4" msgstr "Kenttävoimakkuus: 4" #: ../common/gsm-common.c:609 msgid "Level 5" msgstr "Kenttävoimakkuus: 5" #: ../common/gsm-common.c:619 msgid "Busy" msgstr "Varattu" #: ../common/gsm-common.c:620 msgid "No answer" msgstr "Ei vastausta" #: ../common/gsm-common.c:621 msgid "Out of reach" msgstr "" #: ../common/gsm-common.c:622 msgid "Not available" msgstr "" #: ../common/gsm-common.c:623 ../common/gsm-common.c:634 msgid "All" msgstr "" #: ../common/gsm-common.c:631 ../xgnokii/xgnokii.c:554 msgid "Voice" msgstr "" #: ../common/gsm-common.c:633 msgid "Data" msgstr "" #: ../common/gsm-common.c:642 ../xgnokii/xgnokii_data.c:124 msgid "Disable" msgstr "" #: ../common/gsm-common.c:643 ../xgnokii/xgnokii_data.c:120 msgid "Enable" msgstr "" #: ../common/gsm-common.c:644 msgid "Query" msgstr "" #: ../common/gsm-common.c:645 msgid "Register" msgstr "" #: ../common/gsm-common.c:646 msgid "Erasure" msgstr "" #: ../common/gsm-error.c:42 msgid "No error." msgstr "Ei virhettä." #: ../common/gsm-error.c:43 msgid "Command failed." msgstr "" #: ../common/gsm-error.c:44 msgid "Model specified isn't known/supported." msgstr "Antamasi malli ei ole tunnettu/tuettu" #: ../common/gsm-error.c:45 msgid "Invalid Security code." msgstr "Väärä turvakoodi" #: ../common/gsm-error.c:46 msgid "Problem occurred internal to model specific code." msgstr "" #: ../common/gsm-error.c:47 msgid "Command called isn't implemented in model." msgstr "" #: ../common/gsm-error.c:48 msgid "" "Function or connection type not supported by the phone or by the phone " "driver." msgstr "" #: ../common/gsm-error.c:49 msgid "User aborted the action." msgstr "Käyttäjä keskeytti toiminnon" #: ../common/gsm-error.c:50 msgid "Unknown error - well better than nothing!!" msgstr "Tuntematon virhe - parempi tämä on kun ei mitään!!" #: ../common/gsm-error.c:51 msgid "The specified memory is full." msgstr "Määritelty muisti on täynnä" #: ../common/gsm-error.c:52 msgid "Couldn't establish link with phone." msgstr "Puhelimeen ei voitu muodostaa yhteyttä." #: ../common/gsm-error.c:53 msgid "Command timed out." msgstr "Komento aikakatkaistiin." #: ../common/gsm-error.c:54 msgid "Try again." msgstr "Yritä uudelleen." #: ../common/gsm-error.c:55 msgid "Waiting for the next part of the message." msgstr "Odottaa viestin seuraavaa osaa." #: ../common/gsm-error.c:56 msgid "Device not ready." msgstr "Laite ei ole valmiina." #: ../common/gsm-error.c:57 msgid "Command is still being executed." msgstr "Komento on vielä suoritettavana." #: ../common/gsm-error.c:58 msgid "The given memory location is invalid." msgstr "Antamasi muistipaikka on virheellinen" #: ../common/gsm-error.c:59 msgid "Invalid type of memory." msgstr "Vääräntyyppinen muisti" #: ../common/gsm-error.c:60 msgid "The given location is empty." msgstr "Antamasi muistipaikka on tyhjä" #: ../common/gsm-error.c:61 msgid "The given entry is too long." msgstr "Antamasi sisältö on liian pitkä" #: ../common/gsm-error.c:62 msgid "Data format is not valid." msgstr "Päivämäärä on väärässä muodossa." #: ../common/gsm-error.c:63 msgid "Wrong size of the object." msgstr "Objekti on väärän kokoinen." #: ../common/gsm-error.c:64 msgid "Outgoing call requested reported line busy." msgstr "" #: ../common/gsm-error.c:65 msgid "No Carrier error during data call setup?" msgstr "Ei kantoaaltoa -virhe datapuhelun avauksessa?" #: ../common/gsm-error.c:66 msgid "The current frame isn't handled by the incoming function." msgstr "" #: ../common/gsm-error.c:67 msgid "Unsolicited message received." msgstr "" #: ../common/gsm-error.c:68 msgid "Attempt to read CB when no new CB received." msgstr "" #: ../common/gsm-error.c:69 msgid "SIM card missing or damaged." msgstr "SIM-kortti puuttu tai on rikki" #: ../common/gsm-error.c:70 msgid "PIN or PUK code required." msgstr "PIN tai PUK -koodi tarvitaan" #: ../common/gsm-error.c:71 msgid "The requested information is not available." msgstr "Pyytämääsi tietoa ei ole saatavana." #: ../common/gsm-error.c:72 msgid "Config file cannot be read." msgstr "Konfigurointitiedoston luku epäonnistui." #: ../common/gsm-error.c:73 msgid "Either global or given phone section cannot be found." msgstr "" "Konfigurointitiedostossa ei ole globaalia osiota tai annettua puhelinta." #: ../common/gsm-error.c:74 msgid "Incorrect logging section configuration." msgstr "" #: ../common/gsm-error.c:75 msgid "No phone model specified in the config file." msgstr "Antamaasi puhelimen mallia ei ole konfigurointitiedostossa." #: ../common/gsm-error.c:76 msgid "No port specified in the config file." msgstr "Konfigurointitiedosto ei määrittele porttia." #: ../common/gsm-error.c:77 msgid "No connection type specified in the config file." msgstr "Konfigurointitiedosto ei määrittele yhteyden tyyppiä." #: ../common/gsm-error.c:78 #, fuzzy msgid "Device is locked and cannot be unlocked." msgstr "Laite on jo lukittu.\n" #: ../common/gsm-error.c:79 msgid "The actual response will be sent asynchronously." msgstr "" #: ../common/gsm-error.c:80 msgid "Unknown error." msgstr "Tuntematon virhe" #: ../common/gsm-filetypes.c:599 #, c-format msgid "Sorry, gnokii was not compiled with XPM support.\n" msgstr "gnokii ei ole käännetty XPM-tuella. Pahoittelut.\n" #: ../common/gsm-filetypes.c:642 #, c-format msgid "Bitmap too large\n" msgstr "Bittikartta on liian suuri\n" #: ../common/gsm-filetypes.c:1519 #, c-format msgid "Formatting error: too many subentries\n" msgstr "Formatointivirhe: liian monta alakohtaa\n" #: ../common/gsm-filetypes.c:1528 #, c-format msgid "Formatting error: unknown error while reading subentry type\n" msgstr "Formatointivirhe: tuntematon virhe luettaessa alakohdan tyypiä\n" #: ../common/gsm-filetypes.c:1532 #, c-format msgid "Formatting error: empty entry type\n" msgstr "Formatointivirhe: tyhjä syöte\n" #: ../common/gsm-filetypes.c:1542 #, c-format msgid "Formatting error: subentry has only entry type field\n" msgstr "Formatointivirhe: alakohdassa on ainoastaan syöte-kenttä\n" #: ../common/gsm-filetypes.c:1551 #, c-format msgid "Formatting error: unknown error while reading subentry number type\n" msgstr "" "Formatointivirhe: tuntematon virhe luettaessa alakohdan numeerista tietoa\n" #: ../common/gsm-filetypes.c:1555 #, c-format msgid "Formatting error: empty number type\n" msgstr "Formatointivirhe: tyhjä numero\n" #: ../common/gsm-filetypes.c:1570 ../common/gsm-filetypes.c:1593 #, c-format msgid "Formatting error: subentry has only entry and number type fields\n" msgstr "" "Formatointivirhe: alakohdassa on ainoastaan syöte ja numero -tyyppisiä " "kenttiä\n" #: ../common/gsm-filetypes.c:1579 #, c-format msgid "Formatting error: unknown error while reading subentry id\n" msgstr "" "Formatointivirhe: tuntematon virhe luettaessa alakohdan syötteen " "tunnistetta\n" #: ../common/gsm-filetypes.c:1583 #, c-format msgid "Formatting error: empty id\n" msgstr "Formatointivirhe: tyhjä tunniste\n" #: ../common/gsm-filetypes.c:1617 #, c-format msgid "Formatting error: unknown error while reading subentry contents\n" msgstr "Formatointivirhe: tuntematon virhe luettaessa alakohdan sisältöä\n" #: ../common/gsm-filetypes.c:1621 #, c-format msgid "Formatting error: empty subentry contents\n" msgstr "Formatointivirhe: alakohdan sisältö on tyhjä\n" #. for now be compacrapatible ;) #: ../common/gsm-networks.c:1294 ../common/gsm-networks.c:1341 #: ../gnokii/gnokii-logo.c:254 ../gnokii/gnokii-logo.c:266 #: ../gnokii/gnokii-logo.c:281 ../gnokii/gnokii-logo.c:362 #: ../smsd/lowlevel.c:141 ../smsd/lowlevel.c:142 ../smsd/lowlevel.c:143 #: ../xgnokii/xgnokii_lowlevel.c:220 ../xgnokii/xgnokii_lowlevel.c:221 #: ../xgnokii/xgnokii_lowlevel.c:222 ../xgnokii/xgnokii_lowlevel.c:223 #: ../xgnokii/xgnokii_sms.c:262 ../xgnokii/xgnokii_sms.c:342 msgid "unknown" msgstr "tuntematon" #: ../common/gsm-networks.c:1304 ../common/gsm-networks.c:1318 #: ../common/gsm-networks.c:1355 ../gnokii/gnokii-monitor.c:256 #: ../gnokii/gnokii-other.c:205 msgid "undefined" msgstr "määrittelemätön" #: ../common/gsm-sms.c:299 msgid "Delivered" msgstr "Toimitettu" #: ../common/gsm-sms.c:312 msgid "Failed" msgstr "Epäonnistui" #: ../common/gsm-sms.c:381 msgid "Pending" msgstr "Odottaa käsittelyä" #: ../common/gsm-statemachine.c:390 msgid "" "UNHANDLED FRAME RECEIVED\n" "request: " msgstr "" "KÄSITTELEMÄTÖN FRAME VASTAANOTETTU\n" "pyyntö: " #: ../common/gsm-statemachine.c:393 msgid "reply: " msgstr "" #: ../common/gsm-statemachine.c:396 ../common/phones/nokia.c:679 msgid "Please read Docs/Bugs and send a bug report!\n" msgstr "Lue dokumentti Docs/Bugs ja lähetä bugiraportti!\n" #: ../common/libfunctions.c:183 ../gnokiid/gnokiid.c:164 #, c-format msgid "Lock file error. Exiting.\n" msgstr "Lukitustiedoston virhe. Poistutaan.\n" #: ../common/libfunctions.c:191 #, c-format msgid "" "Telephone interface init failed: %s\n" "Quitting.\n" msgstr "" "Puhelimen liittymän alustus epäonnistui: %s\n" "Lopetetaan.\n" #: ../common/links/atbus.c:69 msgid "gnokii I/O error" msgstr "gnokii I/O-virhe" #: ../common/links/atbus.c:85 msgid "Couldn't open ATBUS device" msgstr "ATBUS-laitteen avaus epäonnistui" #: ../common/links/cbus.c:284 msgid "Couldn't open CBUS device" msgstr "CBUS-laitteen avaus epäonnistui" #: ../common/links/fbus-3110.c:77 ../common/links/fbus.c:85 #: ../common/links/fbus.c:141 ../common/links/fbus.c:184 msgid "Couldn't open FBUS device" msgstr "FBUS-laitteen avaus epäonnistui" #: ../common/links/fbus-3110.c:258 #, c-format msgid "fb3110_tx_frame_send - message too long!\n" msgstr "fb3110_tx_frame_send - viesti on liian pitkä!\n" #: ../common/links/fbus-phonet.c:107 msgid "Couldn't open PHONET device" msgstr "PHONET-laitteen avaus epäonnistui" #: ../common/links/gnbus.c:305 msgid "Couldn't open GNBUS device" msgstr "GNBUS-laitteen avaus epäonnistui" #: ../common/links/m2bus.c:78 msgid "Couldn't open M2BUS device" msgstr "M2BUS-laitteen avaus epäonnistui" #: ../common/misc.c:466 #, c-format msgid "Cannot lock NULL device. Set port config parameter correctly.\n" msgstr "" #: ../common/misc.c:481 #, c-format msgid "Out of memory error while locking device.\n" msgstr "Virhe: Muisti loppui laitetta lukittaessa.\n" #: ../common/misc.c:510 #, fuzzy, c-format msgid "Lockfile %s is stale. Overriding it...\n" msgstr "Lukitustiedosto %s on vanhentunut ja se yliajetaan.\n" #: ../common/misc.c:513 #, fuzzy, c-format msgid "Overriding file %s failed, please check the permissions.\n" msgstr "Lukitustiedoston yliajo epäonnistui, varmista tiedoston oikeudet.\n" #: ../common/misc.c:514 ../common/misc.c:529 #, c-format msgid "Cannot lock device.\n" msgstr "Laitetta ei voi lukita.\n" #: ../common/misc.c:518 #, fuzzy, c-format msgid "Device already locked with %s.\n" msgstr "Laite on jo lukittu.\n" #: ../common/misc.c:527 #, c-format msgid "Unable to read lockfile %s.\n" msgstr "Lukitustiedostoa %s ei voi lukea.\n" #: ../common/misc.c:528 #, c-format msgid "Please check for reason and remove the lockfile by hand.\n" msgstr "Tarkista syy ja poista lukitustiedosto käsin.\n" #: ../common/misc.c:538 #, c-format msgid "Device seems to be locked by unknown process.\n" msgstr "Tuntematon prosessi o lukinnut laitteen.\n" #: ../common/misc.c:540 #, c-format msgid "Please check permission on lock directory.\n" msgstr "Tarkista lukitushakemiston oikeudet.\n" #: ../common/misc.c:542 #, fuzzy, c-format msgid "Cannot create lockfile %s. Please check for existence of the path.\n" msgstr "" "Lukitustiedostoa %s ei voida luoda. Tarkista onko antamasi tiedostopolku " "olemassa." #: ../common/misc.c:547 #, c-format msgid "Failed to write to the lockfile %s.\n" msgstr "Lukitustiedostoon %s kirjoitus epäonnistui.\n" #: ../common/misc.c:572 #, fuzzy, c-format msgid "Cannot unlock device: %s\n" msgstr "Laitteen lukituksen vapautus epäonnistui.\n" #: ../common/nokia-decoding.c:352 ../common/phones/nk6100.c:1010 #: ../xgnokii/xgnokii.c:222 ../xgnokii/xgnokii.c:1039 msgid "VIP" msgstr "" #: ../common/nokia-decoding.c:358 ../common/phones/nk6100.c:1016 #: ../xgnokii/xgnokii.c:224 ../xgnokii/xgnokii.c:1063 msgid "Colleagues" msgstr "" #: ../common/nokia-decoding.c:361 ../common/phones/nk6100.c:1019 #: ../xgnokii/xgnokii.c:225 ../xgnokii/xgnokii.c:1075 msgid "Other" msgstr "" #. Set a default SMSC name because +CSCA doesn't provide one #. Set a default name #: ../common/phones/atgen.c:2075 ../common/phones/nk6100.c:1552 #: ../common/phones/nk6510.c:1951 ../common/phones/nk7110.c:1479 #: ../common/phones/pcsc.c:692 ../xgnokii/xgnokii.c:521 #: ../xgnokii/xgnokii_sms.c:832 #, c-format msgid "Set %d" msgstr "" #: ../common/phones/atgen.c:2692 #, c-format msgid "Withheld" msgstr "Vedetty takaisin" #: ../common/phones/fake.c:95 #, c-format msgid "" "Apparently you didn't configure gnokii. Please do it prior to using it.\n" "You can get some clues from comments included in sample config file or give\n" "a try with gnokii-configure utility included in gnokii distribution.\n" msgstr "" #: ../common/phones/nk6100.c:2092 #, c-format msgid "Personal" msgstr "" #: ../common/phones/nk6100.c:2095 ../common/phones/nk6100.c:2122 #, c-format msgid "Car" msgstr "" #: ../common/phones/nk6100.c:2098 ../common/phones/nk6100.c:2125 #, c-format msgid "Headset" msgstr "" #: ../common/phones/nk6100.c:2101 ../common/phones/nk6100.c:2128 #, c-format msgid "Unknown (%d)" msgstr "Tuntematon (%d)" #: ../common/phones/nk6100.c:2107 ../xgnokii/xgnokii_contacts.c:701 #: ../xgnokii/xgnokii_contacts.c:791 ../xgnokii/xgnokii_contacts.c:938 #: ../xgnokii/xgnokii_contacts.c:980 ../xgnokii/xgnokii_contacts.c:1021 #: ../xgnokii/xgnokii_contacts.c:1094 ../xgnokii/xgnokii_contacts.c:1186 #, c-format msgid "General" msgstr "" #: ../common/phones/nk6100.c:2110 #, c-format msgid "Silent" msgstr "" #: ../common/phones/nk6100.c:2116 #, c-format msgid "Outdoor" msgstr "" #: ../common/phones/nk6100.c:2119 #, c-format msgid "Pager" msgstr "" #: ../common/phones/nk6510.c:1811 #, c-format msgid "" "6510 series phones seem to be quite sensitive to malformed SMS messages\n" "It may have to be sent to Nokia Service if something fails!\n" "Do you really want to continue? " msgstr "" "6510-sarjan puhelimet tuntuvat olevan herkkiä väärinmuotoilluille SMS-" "viesteille\n" "Jos joku epäonnistuu, saattaa olla että puhelimesi on lähetettävä Nokia-" "huoltoon!\n" "Oletko varma, että haluat jatkaa? " #: ../common/phones/nk6510.c:1814 #, c-format msgid "(yes/no) " msgstr "" #: ../common/phones/nk6510.c:1816 ../gnokii/gnokii-phonebook.c:421 #: ../gnokii/gnokii-sms.c:542 ../gnokii/gnokii-sms.c:833 #: ../gnokii/gnokii-utils.c:63 ../gnokii/gnokii-wap.c:223 msgid "yes" msgstr "" #: ../common/phones/nk6510.c:2361 ../common/phones/nk6510.c:2426 #, c-format msgid "Progress: %3d%% completed" msgstr "" #: ../common/phones/nokia.c:338 msgid "Tried to activate CONTACT SERVICE\n" msgstr "" #: ../common/phones/nokia.c:667 msgid "" "NOKIA RAW RINGTONE DECODING FAILED\n" "ringtone:\n" msgstr "" #: ../common/phones/nokia.c:678 #, c-format msgid "offset: %04x\n" msgstr "" #: ../common/phones/pcsc.c:593 #, c-format msgid "Phase %s SIM" msgstr "" #: ../common/vcal.lx:161 #, c-format msgid "Error: Invalid calendar note number!\n" msgstr "Virhe: Väärä kalenterimuistiinpanon numero!\n" #. translators: %s are replaced by function names #: ../common/vcal.lx:282 ../common/vcal.lx:344 #, c-format msgid "Function %s() is deprecated. Use %s() instead.\n" msgstr "" #: ../common/vcal.lx:285 ../common/vcal.lx:347 ../gnokii/gnokii-calendar.c:256 #: ../gnokii/gnokii-file.c:437 ../gnokii/gnokii-todo.c:162 ../smsd/file.c:185 #: ../xgnokii/xgnokii_contacts.c:2700 ../xgnokii/xgnokii_dtmf.c:93 #: ../xgnokii/xgnokii_logos.c:1372 ../xgnokii/xgnokii_speed.c:324 #, c-format msgid "Can't open file %s for reading!\n" msgstr "Tiedostoa %s ei voitu avata lukemista varten!\n" #: ../common/vcal.lx:294 ../common/vcal.lx:356 #, c-format msgid "Error parsing vCalendar file!\n" msgstr "Virhe vCalendar tiedoston parsinnassa!\n" #: ../getopt/getopt.c:566 ../getopt/getopt.c:582 #, c-format msgid "%s: option '%s' is ambiguous\n" msgstr "" #: ../getopt/getopt.c:615 ../getopt/getopt.c:619 #, c-format msgid "%s: option '--%s' doesn't allow an argument\n" msgstr "" #: ../getopt/getopt.c:628 ../getopt/getopt.c:633 #, c-format msgid "%s: option '%c%s' doesn't allow an argument\n" msgstr "" #: ../getopt/getopt.c:676 ../getopt/getopt.c:695 ../getopt/getopt.c:998 #: ../getopt/getopt.c:1017 #, c-format msgid "%s: option '%s' requires an argument\n" msgstr "" #: ../getopt/getopt.c:733 ../getopt/getopt.c:736 #, c-format msgid "%s: unrecognized option '--%s'\n" msgstr "" #: ../getopt/getopt.c:744 ../getopt/getopt.c:747 #, c-format msgid "%s: unrecognized option '%c%s'\n" msgstr "" #: ../getopt/getopt.c:796 ../getopt/getopt.c:799 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "" #: ../getopt/getopt.c:849 ../getopt/getopt.c:866 ../getopt/getopt.c:1069 #: ../getopt/getopt.c:1087 #, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "" #: ../getopt/getopt.c:919 ../getopt/getopt.c:935 #, c-format msgid "%s: option '-W %s' is ambiguous\n" msgstr "" #: ../getopt/getopt.c:959 ../getopt/getopt.c:977 #, c-format msgid "%s: option '-W %s' doesn't allow an argument\n" msgstr "" #: ../gnokiid/gnokiid.c:65 #, c-format msgid "GNOKIID Version %s\n" msgstr "GNOKIID Versio %s\n" #: ../gnokiid/gnokiid.c:70 #, c-format msgid "" "Copyright (C) Hugh Blemings , 1999\n" "Copyright (C) Pavel Janik ml. , 1999\n" "Built %s %s\n" msgstr "" #: ../gnokiid/gnokiid.c:81 #, c-format msgid "" " usage: gnokiid [--help|--version|--debug]\n" " --help display usage information\n" " --version displays version and copyright information\n" " --debug uses stdin/stdout for virtual modem comms\n" msgstr "" #: ../gnokiid/gnokiid.c:149 #, c-format msgid "" "gnokiid purpose is to work only with the phones that do not have AT Hayes\n" "commands interpreter.\n" msgstr "" #: ../gnokii/gnokii.c:203 #, c-format msgid "GNOKII Version %s\n" msgstr "GNOKII Versio %s\n" #: ../gnokii/gnokii.c:210 #, c-format msgid "" "Copyright (C) Hugh Blemings , 1999, 2000\n" "Copyright (C) Pavel Janik ml. , 1999, 2000\n" "Copyright (C) Pavel Machek , 2001\n" "Copyright (C) Pawel Kot , 2001-2011\n" "Copyright (C) BORBELY Zoltan , 2002\n" "Copyright (C) Daniele Forsi , 2004-2011\n" "gnokii is free software, covered by the GNU General Public License, and you " "are\n" "welcome to change it and/or distribute copies of it under certain " "conditions.\n" "There is absolutely no warranty for gnokii. See GPL for details.\n" "Built %s %s\n" msgstr "" #: ../gnokii/gnokii.c:238 #, c-format msgid "" "Usage:\n" "\tgnokii [CONFIG OPTIONS] OPTIONS\n" "\n" "CONFIG OPTIONS\n" "\t\t--config filename\n" "\t\t--phone phone_section\n" "\n" "OPTIONS\n" "Use just one option at a time.\n" "General options:\n" " --help [all] [monitor] [sms] [mms] [phonebook] [calendar] [todo]\n" " [dial] [profile] [settings] [wap] [logo] [ringtone]\n" " [security] [file] [other]\n" " --version\n" " --shell\n" msgstr "" #: ../gnokii/gnokii.c:359 #, c-format msgid "Cannot open logfile %s\n" msgstr "Lokitiedoston %s avaus epäonnistui\n" #: ../gnokii/gnokii.c:392 #, c-format msgid "File: %s\n" msgstr "Tiedosto: %s\n" #: ../gnokii/gnokii.c:394 #, c-format msgid "Phone section: [phone_%s]\n" msgstr "Phone-osio: [phone_%s]\n" #: ../gnokii/gnokii.c:403 #, c-format msgid "WARNING: cannot open logfile, logs will be directed to stderr\n" msgstr "" "VAROITUS: lokitiedoston avaus epäonnistui, loki kirjoitetaan stderr:iin\n" #: ../gnokii/gnokii.c:819 #, c-format msgid "Use '%s --help' for usage information.\n" msgstr "" #: ../gnokii/gnokii.c:821 #, c-format msgid "Use '--help' for usage information.\n" msgstr "" #: ../gnokii/gnokii.c:1142 #, c-format msgid "Unknown option: %d\n" msgstr "Tuntematon optio: %d\n" #: ../gnokii/gnokii.c:1206 #, c-format msgid "" "gnokii needs to be compiled with readline support to enable this option.\n" msgstr "" #: ../gnokii/gnokii-calendar.c:56 #, c-format msgid "" "Calendar options:\n" " --getcalendarnote start_number [end_number|end] [-v|--vCal]\n" " --writecalendarnote vcalendarfile start_number [end_number|end]\n" " --deletecalendarnote start [end_number|end]\n" msgstr "" #: ../gnokii/gnokii-calendar.c:65 #, c-format msgid "" "usage: --getcalendarnote start_number [end_number | end] [-v|--vCal]\n" " start_number - entry number in the phone calendar " "(numeric)\n" " end_number - read to this entry in the phone " "calendar (numeric, optional)\n" " end - the string \"end\" indicates all " "entries from start to end\n" " -v - output in iCalendar format\n" " NOTE: if no end is given, only the start entry is read\n" msgstr "" #. Plain text output #. Translators: this is the header of a calendar note. Example: 1 (1). Type: Meeting #: ../gnokii/gnokii-calendar.c:130 #, c-format msgid "%d (%d). %s: %s\n" msgstr "%d (%d). %s: %s\n" #: ../gnokii/gnokii-calendar.c:130 ../xgnokii/xgnokii_calendar.c:1536 msgid "Type" msgstr "Tyyppi" #: ../gnokii/gnokii-calendar.c:132 #, c-format msgid " Start date: %d-%02d-%02d\n" msgstr "Aloituspäivämäärä: %d-%02d-%02d\n" #: ../gnokii/gnokii-calendar.c:137 #, c-format msgid " Start time: %02d:%02d:%02d\n" msgstr "Aloitusaika: %02d:%02d:%02d\n" #: ../gnokii/gnokii-calendar.c:142 #, c-format msgid " End date: %d-%02d-%02d\n" msgstr "Lopetuspäivämäärä: %d-%02d-%02d\n" #: ../gnokii/gnokii-calendar.c:146 #, c-format msgid " End time: %02d:%02d:%02d\n" msgstr "Lopetusaika: %02d:%02d:%02d\n" #: ../gnokii/gnokii-calendar.c:154 #, fuzzy, c-format msgid " Alarm date: %02d-%02d\n" msgstr " Herätyspäivämäärä: %d-%02d-%02d\n" #: ../gnokii/gnokii-calendar.c:158 #, c-format msgid " Alarm date: %d-%02d-%02d\n" msgstr " Herätyspäivämäärä: %d-%02d-%02d\n" #: ../gnokii/gnokii-calendar.c:163 #, c-format msgid " Alarm time: %02d:%02d:%02d\n" msgstr " Herätysaika: %02d:%02d:%02d\n" #: ../gnokii/gnokii-calendar.c:167 #, fuzzy, c-format msgid " Alarm tone %s\n" msgstr " Herätys on %s\n" #: ../gnokii/gnokii-calendar.c:168 ../xgnokii/xgnokii_calendar.c:214 #: ../xgnokii/xgnokii_calendar.c:220 msgid "enabled" msgstr "päällä" #: ../gnokii/gnokii-calendar.c:168 ../xgnokii/xgnokii_calendar.c:214 #: ../xgnokii/xgnokii_calendar.c:220 msgid "disabled" msgstr "pois päältä" #: ../gnokii/gnokii-calendar.c:171 #, c-format msgid " %s: " msgstr " %s: " #: ../gnokii/gnokii-calendar.c:171 msgid "Repeat" msgstr "Toista" #: ../gnokii/gnokii-calendar.c:182 #, c-format msgid "Every %d hours" msgstr "Joka %d tunti" #: ../gnokii/gnokii-calendar.c:187 #, c-format msgid " The event will be repeated " msgstr " Tapahtuma toistetaan " #: ../gnokii/gnokii-calendar.c:190 #, c-format msgid "forever." msgstr "ikuisesti." #: ../gnokii/gnokii-calendar.c:193 #, c-format msgid "%d times." msgstr "%d kertaa." #: ../gnokii/gnokii-calendar.c:199 #, c-format msgid " Text: %s\n" msgstr " Teksti: %s\n" #: ../gnokii/gnokii-calendar.c:203 ../gnokii/gnokii-calendar.c:206 #: ../gnokii/gnokii-wap.c:226 ../gnokii/gnokii-wap.c:227 #: ../gnokii/gnokii-wap.c:228 ../gnokii/gnokii-wap.c:229 #: ../gnokii/gnokii-wap.c:230 ../gnokii/gnokii-wap.c:231 #: ../gnokii/gnokii-wap.c:232 ../gnokii/gnokii-wap.c:233 #: ../gnokii/gnokii-wap.c:235 ../gnokii/gnokii-wap.c:236 #: ../gnokii/gnokii-wap.c:237 ../gnokii/gnokii-wap.c:238 #: ../gnokii/gnokii-wap.c:239 ../gnokii/gnokii-wap.c:240 #: ../gnokii/gnokii-wap.c:241 ../gnokii/gnokii-wap.c:243 #: ../gnokii/gnokii-wap.c:244 #, c-format msgid " %s: %s\n" msgstr " %s: %s\n" #: ../gnokii/gnokii-calendar.c:203 ../xgnokii/xgnokii.c:1709 msgid "Phone" msgstr "Puhelin" #: ../gnokii/gnokii-calendar.c:226 #, c-format msgid "The calendar note can not be read: %s\n" msgstr "Kalenterimerkintää ei voida lukea: %s\n" #: ../gnokii/gnokii-calendar.c:236 #, c-format msgid "" "usage: --writecalendarnote vcalendarfile start_number [end_number|end]\n" " vcalendarfile - file containing calendar notes in " "vCal format\n" " start_number - first calendar note from " "vcalendarfile to read\n" " end_number - last calendar note from " "vcalendarfile to read\n" " end - read all notes from vcalendarfile " "from start_number\n" " NOTE: it stores the note at the first empty location.\n" msgstr "" #: ../gnokii/gnokii-calendar.c:300 ../gnokii/gnokii-todo.c:206 #, c-format msgid "Failed to load vCalendar file: %s\n" msgstr "vCalendar-tiedoston %s lataus epäonnistui\n" #: ../gnokii/gnokii-calendar.c:309 ../gnokii/gnokii-dial.c:143 #: ../gnokii/gnokii-todo.c:215 #, c-format msgid "Successfully written!\n" msgstr "Kirjoitettu onnistuneesti!\n" #: ../gnokii/gnokii-calendar.c:311 #, c-format msgid "Failed to write calendar note: %s\n" msgstr "Kalenterimerkinnän kirjoitus epäonnistui: %s\n" #: ../gnokii/gnokii-calendar.c:320 #, c-format msgid "" "usage: --deletecalendarnote start_number [end_number | end]\n" " start_number - first number in the phone calendar " "(numeric)\n" " end_number - until this entry in the phone " "calendar (numeric, optional)\n" " end - the string \"end\" indicates all " "entries from start to end\n" " NOTE: if no end is given, only the start entry is deleted\n" msgstr "" #: ../gnokii/gnokii-calendar.c:355 #, c-format msgid "Calendar note deleted.\n" msgstr "Kalenterimerkintä poistettu.\n" #: ../gnokii/gnokii-calendar.c:357 #, c-format msgid "The calendar note cannot be deleted: %s\n" msgstr "Kalenterimerkinnän poisto epäonnistui: %s\n" #: ../gnokii/gnokii-dial.c:52 #, c-format msgid "" "Dialling and call options:\n" " --getspeeddial location\n" " --setspeeddial number memory_type location\n" " --dialvoice number\n" " --senddtmf string\n" " --answercall callid\n" " --hangup callid\n" " --divert {--op|-o} {register|enable|query|disable|erasure}\n" " {--type|-t} {all|busy|noans|outofreach|notavail}\n" " {--call|-c} {all|voice|fax|data}\n" " [{--timeout|-m} time_in_seconds]\n" " [{--number|-n} number]\n" "All number, location and callid options need to be numeric.\n" msgstr "" #: ../gnokii/gnokii-dial.c:70 #, c-format msgid "" "usage: --getspeeddial location\n" " location - location in the speed dial memory\n" msgstr "" #: ../gnokii/gnokii-dial.c:93 #, fuzzy, c-format msgid "SpeedDial nr. %d %s %d\n" msgstr "Pikavalintanumero. %d: %d:%d\n" #: ../gnokii/gnokii-dial.c:96 ../gnokii/gnokii-dial.c:146 #: ../gnokii/gnokii-dial.c:186 ../gnokii/gnokii-dial.c:217 #: ../gnokii/gnokii-dial.c:248 ../gnokii/gnokii-dial.c:381 #: ../gnokii/gnokii-logo.c:298 ../gnokii/gnokii-logo.c:469 #: ../gnokii/gnokii-monitor.c:454 ../gnokii/gnokii-monitor.c:457 #: ../gnokii/gnokii-monitor.c:480 ../gnokii/gnokii-other.c:190 #: ../gnokii/gnokii-phonebook.c:256 ../gnokii/gnokii-profile.c:112 #: ../gnokii/gnokii-profile.c:162 ../gnokii/gnokii-security.c:95 #: ../gnokii/gnokii-security.c:127 ../gnokii/gnokii-security.c:205 #: ../gnokii/gnokii-security.c:247 ../gnokii/gnokii-security.c:298 #: ../gnokii/gnokii-settings.c:122 ../gnokii/gnokii-settings.c:146 #: ../gnokii/gnokii-settings.c:180 ../gnokii/gnokii-settings.c:204 #: ../gnokii/gnokii-sms.c:552 ../gnokii/gnokii-sms.c:1048 #: ../gnokii/gnokii-sms.c:1126 ../gnokii/gnokii-sms.c:1156 #: ../gnokii/gnokii-sms.c:1189 ../gnokii/gnokii-sms.c:1329 #: ../gnokii/gnokii-sms.c:1331 ../gnokii/gnokii-wap.c:94 #: ../gnokii/gnokii-wap.c:129 ../gnokii/gnokii-wap.c:162 #: ../gnokii/gnokii-wap.c:248 ../gnokii/gnokii-wap.c:323 #: ../smsd/lowlevel.c:112 ../smsd/lowlevel.c:125 ../smsd/mysql.c:77 #: ../smsd/mysql.c:134 ../smsd/mysql.c:171 ../smsd/mysql.c:189 #: ../smsd/mysql.c:199 ../smsd/mysql.c:225 ../smsd/mysql.c:263 #: ../smsd/mysql.c:296 ../smsd/mysql.c:336 ../smsd/mysql.c:345 #: ../smsd/mysql.c:399 ../smsd/pq.c:68 ../smsd/pq.c:77 ../smsd/pq.c:121 #: ../smsd/pq.c:150 ../smsd/pq.c:190 ../smsd/pq.c:212 ../smsd/pq.c:241 #: ../smsd/pq.c:258 ../smsd/pq.c:296 ../smsd/pq.c:333 ../smsd/pq.c:376 #: ../smsd/pq.c:427 ../smsd/sqlite.c:58 ../smsd/sqlite.c:70 #: ../smsd/sqlite.c:240 #, c-format msgid "Error: %s\n" msgstr "Virhe: %s\n" #: ../gnokii/gnokii-dial.c:105 #, c-format msgid "" "usage: --setspeeddial number memory_type location\n" " number - phone number to be stored\n" " memory_type - memory type for the speed dial\n" " location - location in the speed dial memory\n" msgstr "" #: ../gnokii/gnokii-dial.c:128 ../gnokii/gnokii-phonebook.c:111 #: ../gnokii/gnokii-phonebook.c:487 #, c-format msgid "Unknown memory type %s (use ME, SM, ...)!\n" msgstr "Tuntematon muistityyppi %s (käytä ME, SM, ...)!\n" #: ../gnokii/gnokii-dial.c:169 #, c-format msgid "Dialing failed: %s\n" msgstr "Soittaminen epäonnistui: %s\n" #: ../gnokii/gnokii-dial.c:171 #, c-format msgid "Dialled call, id: %d (lowlevel id: %d)\n" msgstr "Soitettu puhelu, id: %d (lowlevel id: %d)\n" #: ../gnokii/gnokii-dial.c:194 #, c-format msgid "" "usage: --answercall callid\n" " callid - call identifier\n" msgstr "" #: ../gnokii/gnokii-dial.c:225 #, c-format msgid "" "usage: --hangup callid\n" " callid - call identifier\n" msgstr "" #: ../gnokii/gnokii-dial.c:256 #, c-format msgid "" " usage: --divert\n" " -o operation\n" " --op operation operation to be executed, needs to be one\n" " of the following: register, enable, query,\n" " disable, erasure; this is required option\n" " -t type\n" " --type type type of the operation, needs to be one of\n" " the following: all, busy, noans, outofreach,\n" " notavail, unconditional; this is required " "option\n" " -c calltype\n" " --call calltype type of call for the operation, needs to be\n" " one of the following: all, voice, fax, data;\n" " this is optional\n" " -m sec\n" " --timeout sec timeout to be set; the value is in seconds\n" " -n msisdn\n" " --number msisdn number for redirection\n" "\n" msgstr "" #: ../gnokii/gnokii-dial.c:373 ../gnokii/gnokii-dial.c:374 #: ../gnokii/gnokii-dial.c:376 ../gnokii/gnokii-phonebook.c:199 #: ../gnokii/gnokii-phonebook.c:203 ../gnokii/gnokii-todo.c:119 #: ../gnokii/gnokii-todo.c:120 ../gnokii/gnokii-wap.c:89 #: ../gnokii/gnokii-wap.c:90 ../gnokii/gnokii-wap.c:220 #: ../gnokii/gnokii-wap.c:221 ../gnokii/gnokii-wap.c:222 #: ../gnokii/gnokii-wap.c:223 ../gnokii/gnokii-wap.c:224 #, c-format msgid "%s: %s\n" msgstr "%s: %s\n" #: ../gnokii/gnokii-dial.c:373 msgid "Divert type" msgstr "Käännön tyyppi" #: ../gnokii/gnokii-dial.c:374 msgid "Call type" msgstr "Puhelun tyyppi" #: ../gnokii/gnokii-dial.c:377 #, c-format msgid "%s: %d\n" msgstr "%s: %d\n" #: ../gnokii/gnokii-dial.c:377 msgid "Timeout" msgstr "Aikakatkaisu" #: ../gnokii/gnokii-dial.c:379 #, c-format msgid "Divert isn't active.\n" msgstr "Kääntö ei ole päällä.\n" #: ../gnokii/gnokii-file.c:53 #, c-format msgid "" "File options:\n" " --getfilelist remote_path\n" " --getfiledetailsbyid [id]\n" " --getfileid remote_filename\n" " --getfile remote_filename [local_filename]\n" " --getfilebyid id [local_filename]\n" " --getallfiles remote_path\n" " --putfile local_filename remote_filename\n" " --deletefile remote_filename\n" " --deletefilebyid id\n" msgstr "" #: ../gnokii/gnokii-file.c:98 ../gnokii/gnokii-file.c:192 #: ../gnokii/gnokii-file.c:377 #, c-format msgid "Failed to get info for %s: %s\n" msgstr "Informaation haku epäonnistui %s: %s\n" #: ../gnokii/gnokii-file.c:100 #, c-format msgid "Filelist for path %s:\n" msgstr "Tiedostolista polulle %s:\n" #: ../gnokii/gnokii-file.c:102 #, c-format msgid " %s\n" msgstr " %s\n" #: ../gnokii/gnokii-file.c:135 ../gnokii/gnokii-file.c:170 #, c-format msgid "Failed to get filename: %s\n" msgstr "Tiedoston %s lataus epäonnistui\n" #: ../gnokii/gnokii-file.c:142 #, c-format msgid "| %s (%d)\n" msgstr "| %s (%d)\n" #: ../gnokii/gnokii-file.c:167 #, c-format msgid " - %s (%d)\n" msgstr " - %s (%d)\n" #: ../gnokii/gnokii-file.c:194 #, fuzzy, c-format msgid "Fileid for file %s is %02x %02x %02x %02x %02x %02x\n" msgstr "" " Viestin pituus %d, Viestin numero %d, Tuntemattomat tavut: %02x %02x " "%02x %02x %02x %02x\n" #: ../gnokii/gnokii-file.c:212 ../gnokii/gnokii-file.c:232 #, c-format msgid "Failed to delete %s: %s\n" msgstr "Poisto epäonnistui %s: %s\n" #: ../gnokii/gnokii-file.c:214 ../gnokii/gnokii-file.c:234 #, c-format msgid "Deleted: %s\n" msgstr "Poistettu: %s\n" #: ../gnokii/gnokii-file.c:241 #, c-format msgid " usage: --getfile remote_filename [localfilename]\n" msgstr "" #: ../gnokii/gnokii-file.c:266 ../gnokii/gnokii-file.c:391 #, c-format msgid "Failed to get file %s: %s\n" msgstr "Tiedoston %s lataus epäonnistui: %s\n" #: ../gnokii/gnokii-file.c:275 #, c-format msgid "Got file %s. Save to [%s]: " msgstr "Tiedosto %s ladattu. Tallennetaan [%s]: " #: ../gnokii/gnokii-file.c:290 ../gnokii/gnokii-file.c:345 #: ../gnokii/gnokii-file.c:396 ../gnokii/gnokii-logo.c:198 #: ../gnokii/gnokii-utils.c:93 ../gnokii/gnokii-utils.c:118 #: ../xgnokii/xgnokii_contacts.c:2620 ../xgnokii/xgnokii_dtmf.c:135 #: ../xgnokii/xgnokii_speed.c:417 #, c-format msgid "Can't open file %s for writing!\n" msgstr "Tiedostoa %s ei voitu avata kirjoittamista varten!\n" #: ../gnokii/gnokii-file.c:294 ../gnokii/gnokii-file.c:349 #: ../gnokii/gnokii-file.c:400 #, c-format msgid "Failed to write to file %s.\n" msgstr "Tiedoston %s kirjoittaminen epäonnistui\n" #: ../gnokii/gnokii-file.c:305 #, c-format msgid " usage: --getfilebyid id [localfilename]\n" msgstr "" #: ../gnokii/gnokii-file.c:332 #, c-format msgid "Failed to get file: %s\n" msgstr "Tiedoston %s lataus epäonnistui\n" #: ../gnokii/gnokii-file.c:393 #, c-format msgid "Got file %s.\n" msgstr "Ladattu tiedosto %s.\n" #: ../gnokii/gnokii-file.c:415 #, c-format msgid " usage: --putfile local_filename remote_filename\n" msgstr "" #: ../gnokii/gnokii-file.c:444 #, c-format msgid "File %s corrupted!\n" msgstr "" #: ../gnokii/gnokii-file.c:449 #, c-format msgid "Failed to put file to %s: %s\n" msgstr "Tiedoston %s asettaminen epäonnistui: %s\n" #: ../gnokii/gnokii-logo.c:56 #, c-format msgid "" "Logo options:\n" " --sendlogo {caller|op|picture} destination logofile\n" " [network_code]\n" " --setlogo op [logofile [network_code]]\n" " --setlogo startup [logofile]\n" " --setlogo caller [logofile [caller_group_number [group_name]]]\n" " --setlogo {dealer|text} [text]\n" " --getlogo op [logofile [network_code]]\n" " --getlogo startup [logofile [network_code]]\n" " --getlogo caller [caller_group_number [logofile\n" " [network_code]]]\n" " --getlogo {dealer|text}\n" " --viewlogo logofile\n" msgstr "" #: ../gnokii/gnokii-logo.c:97 #, c-format msgid "Sending operator logo.\n" msgstr "Lähetetään operaattorilogo.\n" #: ../gnokii/gnokii-logo.c:98 #, c-format msgid "Sending caller line identification logo.\n" msgstr "Lähetetään soittajalogo.\n" #: ../gnokii/gnokii-logo.c:99 #, c-format msgid "Sending Multipart Message: Picture Message.\n" msgstr "Lähetetään moniosainen viesti: Kuvaviesti.\n" #: ../gnokii/gnokii-logo.c:100 #, c-format msgid "Sending EMS-compliant Picture Message.\n" msgstr "Lähetetään EMS-yhteensopiva kuvaviesti.\n" #: ../gnokii/gnokii-logo.c:101 #, c-format msgid "Sending EMS-compliant Animation.\n" msgstr "Lähetetään EMS-yhteensopiva animaatio.\n" #: ../gnokii/gnokii-logo.c:102 #, c-format msgid "You should specify what kind of logo to send!\n" msgstr "Lähetettävän logon tyyppi on määriteltävä!\n" #: ../gnokii/gnokii-logo.c:118 #, c-format msgid "Cannot send logo: specified and loaded bitmap type differ!\n" msgstr "" "Logon lähetys epäonnistui: määritelty ja ladattu kuva ovat eri tyyppiä!\n" #: ../gnokii/gnokii-logo.c:156 ../gnokii/gnokii-ringtone.c:148 #: ../gnokii/gnokii-sms.c:352 #, c-format msgid "Message sent in %d parts with reference numbers:" msgstr "" #: ../gnokii/gnokii-logo.c:161 ../gnokii/gnokii-ringtone.c:153 #: ../gnokii/gnokii-sms.c:357 #, c-format msgid "Send succeeded with reference %d!\n" msgstr "Lähetys onnistui referenssillä %d!\n" #: ../gnokii/gnokii-logo.c:163 ../gnokii/gnokii-ringtone.c:155 #: ../gnokii/gnokii-sms.c:359 #, c-format msgid "SMS Send failed (%s)\n" msgstr "SMSn lähetys epäonnistui (%s)\n" #: ../gnokii/gnokii-logo.c:180 #, c-format msgid "Saving logo. File \"%s\" exists. (O)verwrite, create (n)ew or (s)kip ? " msgstr "" #: ../gnokii/gnokii-logo.c:182 msgid "O" msgstr "" #: ../gnokii/gnokii-logo.c:182 msgid "o" msgstr "" #: ../gnokii/gnokii-logo.c:183 msgid "N" msgstr "" #: ../gnokii/gnokii-logo.c:183 msgid "n" msgstr "" #: ../gnokii/gnokii-logo.c:184 msgid "S" msgstr "" #: ../gnokii/gnokii-logo.c:184 msgid "s" msgstr "" #: ../gnokii/gnokii-logo.c:188 #, c-format msgid "Enter name of new file: " msgstr "Anna tiedoston nimi: " #: ../gnokii/gnokii-logo.c:233 #, c-format msgid "Dealer welcome note " msgstr "Tervetuloviesti " #: ../gnokii/gnokii-logo.c:235 ../gnokii/gnokii-logo.c:242 #, c-format msgid "currently set to \"%s\"\n" msgstr "tällä hetkellä asetettu \"%s\"\n" #: ../gnokii/gnokii-logo.c:237 ../gnokii/gnokii-logo.c:244 #, c-format msgid "currently empty\n" msgstr "tällä hetkellä tyhjä\n" #: ../gnokii/gnokii-logo.c:240 #, c-format msgid "Welcome note " msgstr "Tervetuloviesti " #: ../gnokii/gnokii-logo.c:250 #, c-format msgid "Operator logo for %s (%s) network got successfully\n" msgstr "" #: ../gnokii/gnokii-logo.c:255 ../gnokii/gnokii-logo.c:267 #: ../gnokii/gnokii-logo.c:282 ../gnokii/gnokii-logo.c:363 #, c-format msgid "Sorry, gnokii doesn't know %s network !\n" msgstr "gnokii ei tiedo %s verkkoa !\n" #: ../gnokii/gnokii-logo.c:263 #, c-format msgid "Startup logo got successfully\n" msgstr "Aloituslogo asetettu onnistuneesti\n" #: ../gnokii/gnokii-logo.c:274 ../gnokii/gnokii-logo.c:291 #, c-format msgid "Your phone doesn't have logo uploaded !\n" msgstr "" #: ../gnokii/gnokii-logo.c:276 #, c-format msgid "Caller logo got successfully\n" msgstr "Soittajalogo haettu onnistuneesti\n" #: ../gnokii/gnokii-logo.c:277 #, c-format msgid "Caller group name: %s, ringing tone: %s (%d)\n" msgstr "" #: ../gnokii/gnokii-logo.c:288 #, c-format msgid "Unknown bitmap type.\n" msgstr "Tuntematon kuvan tyyppi.\n" #: ../gnokii/gnokii-logo.c:302 #, c-format msgid "What kind of logo do you want to get ?\n" msgstr "" #: ../gnokii/gnokii-logo.c:320 #, c-format msgid "Error while reading file \"%s\": %s\n" msgstr "Virhe luettaessa tiedostoa \"%s\": %s\n" #: ../gnokii/gnokii-logo.c:398 #, c-format msgid "What kind of logo do you want to set ?\n" msgstr "" #: ../gnokii/gnokii-logo.c:434 #, c-format msgid "Error setting dealer welcome note - " msgstr "Virhe asetettaessa tervetuloilmoitusta - " #: ../gnokii/gnokii-logo.c:436 #, c-format msgid "Error setting welcome note - " msgstr "Virhe asetettaessa tervetuloilmoitusta - " #: ../gnokii/gnokii-logo.c:440 #, c-format msgid "SIM card and PIN is required\n" msgstr "SIM-kortti ja PIN-koodi tarvitaan\n" #: ../gnokii/gnokii-logo.c:447 #, c-format msgid "too long, truncated to \"%s\" (length %zi)\n" msgstr "liian pitkä, lyhennetty \"%s\" (pituus %zi)\n" #: ../gnokii/gnokii-logo.c:455 #, c-format msgid "Error setting startup logo - SIM card and PIN is required\n" msgstr "Virhe asetettaessa alkulogoa - SIM-kortti ja PIN-koodi vaaditaan\n" #: ../gnokii/gnokii-logo.c:456 #, c-format msgid "i: %i, %2x %2x\n" msgstr "" #: ../gnokii/gnokii-logo.c:466 #, c-format msgid "Done.\n" msgstr "Valmis.\n" #: ../gnokii/gnokii-logo.c:481 #, c-format msgid "Could not load bitmap: %s\n" msgstr "Ei voitu ladata kuvaa: %s\n" #: ../gnokii/gnokii-mms.c:46 #, c-format msgid "" "MMS options:\n" " --getmms memory_type start [end] [{--mime|--pdu|--raw} file]\n" " [-d|--delete] [-o|--overwrite]\n" " --deletemms memory_type start [end]\n" msgstr "" #: ../gnokii/gnokii-mms.c:56 #, c-format msgid "" " usage: --getmms memory start [end] retrieves messages from memory type " "(SM, ME,\n" " IN, OU, ...) starting from\n" " location start and ending with end;\n" " if end option is omitted, just one " "entry\n" " is read;\n" " start must be a number, end may be a " "number\n" " or 'end' string;\n" " if 'end' is used entries are being read\n" " until empty location\n" " --mime filename convert MMS in MIME format and save it " "to\n" " the given file;\n" " --pdu filename extract MMS from raw format and save it " "to\n" " the given file;\n" " --raw filename get MMS from phone and save it unchanged " "to\n" " the given file;\n" " --delete\n" " -d delete MMS after reading\n" " --overwrite\n" " -o overwrite destination file without " "asking\n" "\n" msgstr "" #: ../gnokii/gnokii-mms.c:82 ../gnokii/gnokii-sms.c:749 #, c-format msgid "%d. %s (%s)\n" msgstr "%d. %s (%s)\n" #: ../gnokii/gnokii-mms.c:82 msgid "MMS" msgstr "" #: ../gnokii/gnokii-mms.c:113 ../gnokii/gnokii-mms.c:201 #: ../gnokii/gnokii-mms.c:243 ../gnokii/gnokii-sms.c:486 #: ../gnokii/gnokii-sms.c:658 ../gnokii/gnokii-sms.c:884 #: ../gnokii/gnokii-sms.c:936 #, c-format msgid "Unknown memory type %s (use ME, SM, IN, OU, ...)!\n" msgstr "Tuntematon muistityyppi %s (käytä ME, SM, IN, OU, ...)!\n" #: ../gnokii/gnokii-mms.c:114 ../gnokii/gnokii-mms.c:202 #: ../gnokii/gnokii-mms.c:244 ../gnokii/gnokii-sms.c:487 #: ../gnokii/gnokii-sms.c:659 ../gnokii/gnokii-sms.c:885 #: ../gnokii/gnokii-sms.c:937 #, c-format msgid "" "Run gnokii --showsmsfolderstatus for a list of supported memory types.\n" msgstr "" #: ../gnokii/gnokii-mms.c:150 ../gnokii/gnokii-sms.c:715 #, c-format msgid "Saving into %s\n" msgstr "" #: ../gnokii/gnokii-mms.c:187 ../gnokii/gnokii-sms.c:876 #, c-format msgid "(delete failed)\n" msgstr "(poistaminen epäonnistui)\n" #: ../gnokii/gnokii-mms.c:189 ../gnokii/gnokii-sms.c:878 #, c-format msgid "(message deleted)\n" msgstr "(viesti poistetu)\n" #: ../gnokii/gnokii-mms.c:199 #, fuzzy, c-format msgid "Getting MMS failed (location %d from memory %s)! (%s)\n" msgstr "Virhe luettaessa paikkaa numero %d muistista %s\n" #: ../gnokii/gnokii-mms.c:219 #, c-format msgid "" " usage: --deletemms memory start [end] deletes messages from memory type\n" " (SM, ME, IN, OU, ...) starting\n" " from location start and ending with " "end;\n" " if end option is omitted, just one " "entry\n" " is removed;\n" " if 'end' is used entries are being " "removed\n" " until empty location\n" "\n" msgstr "" #: ../gnokii/gnokii-mms.c:262 #, fuzzy, c-format msgid "Deleted MMS (location %d from memory %s)\n" msgstr "Virhe luettaessa paikkaa numero %d muistista %s\n" #: ../gnokii/gnokii-mms.c:266 #, fuzzy, c-format msgid "Deleting MMS failed (location %d from memory %s)! (%s)\n" msgstr "Virhe luettaessa paikkaa numero %d muistista %s\n" #: ../gnokii/gnokii-monitor.c:67 #, c-format msgid "" "Monitoring options:\n" " --monitor [delay|once]\n" " --getdisplaystatus\n" " --displayoutput\n" " --netmonitor {reset|off|field|devel|next|nr}\n" msgstr "" #: ../gnokii/gnokii-monitor.c:79 #, c-format msgid "INCOMING CALL: ID: %d, Number: %s, Name: \"%s\"\n" msgstr "" #: ../gnokii/gnokii-monitor.c:82 #, c-format msgid "CALL %d TERMINATED (LOCAL)\n" msgstr "" #: ../gnokii/gnokii-monitor.c:85 #, c-format msgid "CALL %d TERMINATED (REMOTE)\n" msgstr "" #: ../gnokii/gnokii-monitor.c:88 #, c-format msgid "CALL %d ACCEPTED BY THE REMOTE SIDE\n" msgstr "" #: ../gnokii/gnokii-monitor.c:91 #, c-format msgid "CALL %d PLACED ON HOLD\n" msgstr "" #: ../gnokii/gnokii-monitor.c:94 #, c-format msgid "CALL %d RETRIEVED FROM HOLD\n" msgstr "" #: ../gnokii/gnokii-monitor.c:135 #, c-format msgid "CALL%d: IDLE\n" msgstr "" #: ../gnokii/gnokii-monitor.c:143 msgid "RINGING" msgstr "" #: ../gnokii/gnokii-monitor.c:147 msgid "DIALING" msgstr "" #: ../gnokii/gnokii-monitor.c:151 msgid "ESTABLISHED" msgstr "" #: ../gnokii/gnokii-monitor.c:155 msgid "ON HOLD" msgstr "" #: ../gnokii/gnokii-monitor.c:159 msgid "UNKNOWN STATE" msgstr "" #: ../gnokii/gnokii-monitor.c:164 #, c-format msgid "CALL%d: %s %s (%s) (callid: %d, duration: %d sec)\n" msgstr "" #: ../gnokii/gnokii-monitor.c:182 #, c-format msgid "LAC: %04x (%d), CellID: %08x (%d)\n" msgstr "" #: ../gnokii/gnokii-monitor.c:212 #, c-format msgid "Argument to --monitor delay needs to be positive number\n" msgstr "" #: ../gnokii/gnokii-monitor.c:226 #, c-format msgid "Entering monitor mode...\n" msgstr "Siirrytään tarkkailutilaan...\n" #: ../gnokii/gnokii-monitor.c:254 #, c-format msgid "Network: %s, %s (%s)\n" msgstr "Verkko: %s, %s (%s)\n" #: ../gnokii/gnokii-monitor.c:262 #, c-format msgid "RFLevel: %d\n" msgstr "Kenttävoimakkuus: %d\n" #: ../gnokii/gnokii-monitor.c:265 #, c-format msgid "Battery: %d\n" msgstr "Akun varaus: %d\n" #: ../gnokii/gnokii-monitor.c:268 #, c-format msgid "Power Source: %s\n" msgstr "Virtalähde: %s\n" #: ../gnokii/gnokii-monitor.c:272 #, c-format msgid "SIM: Used %d, Free %d\n" msgstr "SIM: käytössä %d, vapaaana %d\n" #: ../gnokii/gnokii-monitor.c:276 #, c-format msgid "Phone: Used %d, Free %d\n" msgstr "Puhelin: käytöss: %d, vapaana %d\n" #: ../gnokii/gnokii-monitor.c:280 #, c-format msgid "DC: Used %d, Free %d\n" msgstr "DC: Käytety %d, Vapaana %d\n" #: ../gnokii/gnokii-monitor.c:284 #, c-format msgid "EN: Used %d, Free %d\n" msgstr "EN: Käytetty %d, Vapaana %d\n" #: ../gnokii/gnokii-monitor.c:288 #, c-format msgid "FD: Used %d, Free %d\n" msgstr "FD: Käytetty %d, Vapaana %d\n" #: ../gnokii/gnokii-monitor.c:292 #, c-format msgid "LD: Used %d, Free %d\n" msgstr "LD: Käytetty %d, Vapaana %d\n" #: ../gnokii/gnokii-monitor.c:296 #, c-format msgid "MC: Used %d, Free %d\n" msgstr "MC: Käytetty %d, Vapaana %d\n" #: ../gnokii/gnokii-monitor.c:300 #, c-format msgid "ON: Used %d, Free %d\n" msgstr "ON: Käytetty %d, Vapaana %d\n" #: ../gnokii/gnokii-monitor.c:304 #, c-format msgid "RC: Used %d, Free %d\n" msgstr "RC: Käytetty %d, Vapaana %d\n" #: ../gnokii/gnokii-monitor.c:307 #, c-format msgid "SMS Messages: Unread %d, Number %d\n" msgstr "Tekstiviestejä: lukematta %d, numero %d\n" #: ../gnokii/gnokii-monitor.c:313 #, c-format msgid "Cell broadcast received on channel %d: %s\n" msgstr "Verkon broadcast vastaanotettu kanavalta %d: %s\n" #: ../gnokii/gnokii-monitor.c:323 #, c-format msgid "Leaving monitor mode...\n" msgstr "Lopetetaan tarkkailutila...\n" #: ../gnokii/gnokii-monitor.c:330 #, c-format msgid "Call in progress: %-3s\n" msgstr "Puhelu kesken: %-3s\n" #: ../gnokii/gnokii-monitor.c:331 ../gnokii/gnokii-monitor.c:333 #: ../gnokii/gnokii-monitor.c:335 ../gnokii/gnokii-monitor.c:337 #: ../gnokii/gnokii-monitor.c:339 ../gnokii/gnokii-monitor.c:341 #: ../gnokii/gnokii-monitor.c:343 ../gnokii/gnokii-monitor.c:345 #: ../gnokii/gnokii-settings.c:200 msgid "on" msgstr "päällä" #: ../gnokii/gnokii-monitor.c:331 ../gnokii/gnokii-monitor.c:333 #: ../gnokii/gnokii-monitor.c:335 ../gnokii/gnokii-monitor.c:337 #: ../gnokii/gnokii-monitor.c:339 ../gnokii/gnokii-monitor.c:341 #: ../gnokii/gnokii-monitor.c:343 ../gnokii/gnokii-monitor.c:345 #: ../gnokii/gnokii-settings.c:200 msgid "off" msgstr "pois päältä" #: ../gnokii/gnokii-monitor.c:332 #, c-format msgid "Unknown: %-3s\n" msgstr "" #: ../gnokii/gnokii-monitor.c:334 #, c-format msgid "Unread SMS: %-3s\n" msgstr "" #: ../gnokii/gnokii-monitor.c:336 #, c-format msgid "Voice call: %-3s\n" msgstr "" #: ../gnokii/gnokii-monitor.c:338 #, c-format msgid "Fax call active: %-3s\n" msgstr "" #: ../gnokii/gnokii-monitor.c:340 #, c-format msgid "Data call active: %-3s\n" msgstr "" #: ../gnokii/gnokii-monitor.c:342 #, c-format msgid "Keyboard lock: %-3s\n" msgstr "" #: ../gnokii/gnokii-monitor.c:344 #, c-format msgid "SMS storage full: %-3s\n" msgstr "" #: ../gnokii/gnokii-monitor.c:430 #, c-format msgid "Entered display monitoring mode...\n" msgstr "Siirrytään näytön tarkkailutilaan...\n" #: ../gnokii/gnokii-monitor.c:447 ../gnokii/gnokii-sms.c:1322 #, c-format msgid "Shutting down\n" msgstr "Sammutetaan\n" #: ../gnokii/gnokii-monitor.c:449 #, c-format msgid "Leaving display monitor mode...\n" msgstr "Lopetetaan näytön tarkkailutila...\n" #: ../gnokii/gnokii-monitor.c:490 #, c-format msgid " usage: --netmonitor {reset|off|field|devel|next|nr}\n" msgstr "" #: ../gnokii/gnokii-other.c:59 #, c-format msgid "" "Misc options:\n" " --keysequence\n" " --enterchar\n" " --listnetworks\n" " --getnetworkinfo\n" msgstr "" #: ../gnokii/gnokii-other.c:96 #, c-format msgid "Failed to press key: %s\n" msgstr "Näppäimen painaminen epäonnistui: %s\n" #: ../gnokii/gnokii-other.c:155 #, c-format msgid "Error entering char: %s\n" msgstr "Virhe syötettäessä merkkiä: %s\n" #: ../gnokii/gnokii-other.c:169 #, c-format msgid "Network Name\n" msgstr "Verkon nimi\n" #: ../gnokii/gnokii-other.c:170 #, c-format msgid "-----------------------------------------\n" msgstr "" #: ../gnokii/gnokii-other.c:172 #, c-format msgid "%-7s %s (%s)\n" msgstr "%-7s %s (%s)\n" #: ../gnokii/gnokii-other.c:202 #, c-format msgid "Network : %s (%s)\n" msgstr "Operaattori : %s (%s)\n" #: ../gnokii/gnokii-other.c:205 #, c-format msgid "Network code : %s\n" msgstr "Operaattorin koodi : %s\n" #: ../gnokii/gnokii-other.c:206 #, c-format msgid "LAC : %04x (%d)\n" msgstr "LAC : %04x (%d)\n" #: ../gnokii/gnokii-other.c:207 #, c-format msgid "Cell id : %08x (%d)\n" msgstr "Solun tunniste : %08x (%d)\n" #: ../gnokii/gnokii-phonebook.c:55 #, c-format msgid "" "Phonebook options:\n" " --getphonebook memory_type start_number [end_number|end]\n" " [[-r|--raw]|[-v|--vcard]|[-l|--ldif]]\n" " --writephonebook [[-o|--overwrite]|[-f|--find-free]]\n" " [-m|--memory-type|--memory memory_type]\n" " [-n|--memory-location|--location number]\n" " [[-v|--vcard]|[-l|--ldif]]\n" " --deletephonebook memory_type start_number [end_number|end]\n" msgstr "" #: ../gnokii/gnokii-phonebook.c:68 #, c-format msgid "" " usage: --getphonebook memory start [end] reads phonebook entries from " "memory type\n" " (SM, ME, IN, OU, ...) messages " "starting\n" " from location start and ending with " "end;\n" " if end option is omitted, just one " "entry\n" " is read;\n" " if 'end' is used all entries are " "read\n" " -r\n" " --raw output in raw form (comma " "separated)\n" " -v\n" " --vcard output in vcard format\n" " -l\n" " --ldif output in ldif format\n" "\n" msgstr "" #: ../gnokii/gnokii-phonebook.c:187 #, c-format msgid "%d. %s: %s\n" msgstr "%d. %s: %s\n" #: ../gnokii/gnokii-phonebook.c:199 msgid "Caller group" msgstr "Soittajaryhmä" #: ../gnokii/gnokii-phonebook.c:208 #, c-format msgid "Address information:\n" msgstr "Osoitteen tiedot:\n" #: ../gnokii/gnokii-phonebook.c:210 ../gnokii/gnokii-phonebook.c:212 #: ../gnokii/gnokii-phonebook.c:214 ../gnokii/gnokii-phonebook.c:216 #: ../gnokii/gnokii-phonebook.c:218 ../gnokii/gnokii-phonebook.c:220 #: ../gnokii/gnokii-phonebook.c:222 #, c-format msgid " %s: %s\n" msgstr " %s: %s\n" #: ../gnokii/gnokii-phonebook.c:210 msgid "Post office address" msgstr "" #: ../gnokii/gnokii-phonebook.c:233 #, c-format msgid "%04u.%02u.%02u %02u:%02u:%02u" msgstr "" #: ../gnokii/gnokii-phonebook.c:247 #, c-format msgid "Date: %04u.%02u.%02u %02u:%02u:%02u\n" msgstr "" #: ../gnokii/gnokii-phonebook.c:252 #, fuzzy, c-format msgid "Empty memory location. Skipping.\n" msgstr " Tyhjä tekstiviestimuistipaikka.\n" #: ../gnokii/gnokii-phonebook.c:255 #, c-format msgid "Error reading from the location %d in memory %s\n" msgstr "Virhe luettaessa paikkaa numero %d muistista %s\n" #: ../gnokii/gnokii-phonebook.c:272 #, c-format msgid "" " usage: --writephonebook [[-o|--overwrite]|[-f|--find-free]]\n" " [-m|--memory-type|--memory memory_type]\n" " [-n|--memory-location|--location number]\n" " [[-v|--vcard]|[-l|--ldif]]\n" "\n" msgstr "" #: ../gnokii/gnokii-phonebook.c:416 #, c-format msgid "Location busy. " msgstr "" #: ../gnokii/gnokii-phonebook.c:419 ../gnokii/gnokii-sms.c:540 #: ../gnokii/gnokii-sms.c:831 ../gnokii/gnokii-utils.c:61 #, c-format msgid "Overwrite? (yes/no) " msgstr "" #: ../gnokii/gnokii-phonebook.c:423 ../gnokii/gnokii-sms.c:543 #: ../gnokii/gnokii-utils.c:65 ../gnokii/gnokii-wap.c:223 msgid "no" msgstr "" #: ../gnokii/gnokii-phonebook.c:426 #, c-format msgid "" "\n" "Incorrect answer [%s]. Assuming 'no'.\n" msgstr "" #: ../gnokii/gnokii-phonebook.c:446 #, c-format msgid "Write Succeeded: memory type: %s, loc: %d, name: %s, number: %s\n" msgstr "" #: ../gnokii/gnokii-phonebook.c:453 ../gnokii/gnokii-phonebook.c:458 #, c-format msgid "Write failed (%s): memory type: %s, loc: %d, name: %s, number: %s\n" msgstr "" #: ../gnokii/gnokii-phonebook.c:466 #, c-format msgid "" " usage: --deletephonebook memory_type start_number [end_number|end]\n" "\n" msgstr "" #: ../gnokii/gnokii-phonebook.c:505 #, c-format msgid "Phonebook entry removed: memory type: %s, loc: %d\n" msgstr "" #: ../gnokii/gnokii-phonebook.c:512 #, c-format msgid "Phonebook entry removal FAILED (%s): memory type: %s, loc: %d\n" msgstr "" #: ../gnokii/gnokii-profile.c:55 #, c-format msgid "" "Profile options:\n" " --getprofile [start_number [end_number]] [-r|--raw]\n" " --setprofile\n" " --getactiveprofile\n" " --setactiveprofile profile_number\n" msgstr "" #: ../gnokii/gnokii-profile.c:65 #, c-format msgid " usage: --getprofile [start_number [end_number]] [-r|--raw]\n" msgstr "" #: ../gnokii/gnokii-profile.c:133 #, c-format msgid "Starting profile number is greater than stop\n" msgstr "" #: ../gnokii/gnokii-profile.c:138 #, c-format msgid "Profile number must be value from 0 to %d!\n" msgstr "" #: ../gnokii/gnokii-profile.c:143 #, c-format msgid "This phone supports only %d profiles!\n" msgstr "" #: ../gnokii/gnokii-profile.c:161 ../gnokii/gnokii-profile.c:254 #, c-format msgid "Cannot get profile %d\n" msgstr "Profiilia %d ei voida ladata\n" #. Translators: %d is the profile number, %s is the profile name. Example: 1. "Outdoors" #: ../gnokii/gnokii-profile.c:175 #, fuzzy, c-format msgid "%d. \"%s\"\n" msgstr "%d. %s: %s\n" #: ../gnokii/gnokii-profile.c:176 #, c-format msgid " (name defined)\n" msgstr "" #: ../gnokii/gnokii-profile.c:177 #, c-format msgid "Incoming call alert: %s\n" msgstr "" #: ../gnokii/gnokii-profile.c:178 #, c-format msgid "Ringing tone: %s (%d)\n" msgstr "" #: ../gnokii/gnokii-profile.c:179 #, c-format msgid "Ringing volume: %s\n" msgstr "" #: ../gnokii/gnokii-profile.c:180 #, c-format msgid "Message alert tone: %s\n" msgstr "" #: ../gnokii/gnokii-profile.c:181 #, c-format msgid "Keypad tones: %s\n" msgstr "" #: ../gnokii/gnokii-profile.c:182 #, c-format msgid "Warning and game tones: %s\n" msgstr "" #. FIXME: Light settings is only used for Car #: ../gnokii/gnokii-profile.c:185 #, c-format msgid "Lights: %s\n" msgstr "" #: ../gnokii/gnokii-profile.c:186 #, c-format msgid "Vibration: %s\n" msgstr "" #. FIXME: it will be nice to add here reading caller group name. #: ../gnokii/gnokii-profile.c:189 #, c-format msgid "Caller groups: 0x%02x\n" msgstr "" #. FIXME: Automatic answer is only used for Car and Headset. #: ../gnokii/gnokii-profile.c:192 #, c-format msgid "Automatic answer: %s\n" msgstr "" #: ../gnokii/gnokii-profile.c:223 ../gnokii/gnokii-sms.c:1120 #: ../gnokii/gnokii-wap.c:285 #, c-format msgid "Input line format isn't valid\n" msgstr "" #: ../gnokii/gnokii-profile.c:229 #, c-format msgid "Cannot set profile: %s\n" msgstr "Profiilia ei voida asettaa: %s\n" #: ../gnokii/gnokii-profile.c:248 #, c-format msgid "Cannot get active profile: %s\n" msgstr "Tietoa aktiivisesta profiilista ei saada: %s\n" #: ../gnokii/gnokii-profile.c:256 #, c-format msgid "Active profile: %d (%s)\n" msgstr "Aktiivinen profiili: %d (%s)\n" #: ../gnokii/gnokii-profile.c:263 #, c-format msgid " usage: --setactiveprofile profile_number\n" msgstr "" #: ../gnokii/gnokii-profile.c:281 #, c-format msgid "Cannot set active profile to %d: %s\n" msgstr "Aktiivisen profiilin asetus %d epäonnistui: %s\n" #: ../gnokii/gnokii-ringtone.c:96 #, c-format msgid "" "Ringtone options:\n" " --sendringtone rtttlfile destination\n" " --getringtone rtttlfile [location] [-r|--raw]\n" " --setringtone rtttlfile [location] [-r|--raw] [--name name]\n" " --playringtone rtttlfile [--volume vol]\n" " --ringtoneconvert source destination\n" " --getringtonelist\n" " --deleteringtone start [end]\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:117 ../gnokii/gnokii-ringtone.c:392 #: ../gnokii/gnokii-ringtone.c:447 #, c-format msgid "Failed to load ringtone: %s\n" msgstr "Soittoäänen lataus epäonnistui: %s\n" #: ../gnokii/gnokii-ringtone.c:162 #, c-format msgid " usage: --getringtone rtttlfile [location] [-r|--raw]\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:216 #, c-format msgid "Getting ringtone %d failed: %s\n" msgstr "Soittoäänen %d haku epäonnistui: %s\n" #: ../gnokii/gnokii-ringtone.c:219 #, c-format msgid "Getting ringtone %d (\"%s\") succeeded!\n" msgstr "Soittoäänen %d hakue (\"%s\") onnistui!\n" #: ../gnokii/gnokii-ringtone.c:222 ../gnokii/gnokii-ringtone.c:303 #: ../gnokii/gnokii-ringtone.c:387 #, c-format msgid "Internal gnokii error: null filename\n" msgstr "Sisäinen gnokii-virhe: tiedoston nimi on tyhjä\n" #: ../gnokii/gnokii-ringtone.c:231 #, c-format msgid "Failed to save ringtone.\n" msgstr "Soittoäänen tallentaminen opäonnistui.\n" #: ../gnokii/gnokii-ringtone.c:236 #, c-format msgid "Failed to write ringtone.\n" msgstr "Soittoäänen kirjoitus epäonnistui.\n" #: ../gnokii/gnokii-ringtone.c:242 ../gnokii/gnokii-ringtone.c:451 #, c-format msgid "Failed to save ringtone: %s\n" msgstr "Soittoäänen tallentaminen epäonnistui: %s\n" #: ../gnokii/gnokii-ringtone.c:252 #, c-format msgid " usage: --setringtone rtttlfile [location] [-r|--raw] [--name name]\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:311 ../gnokii/gnokii-ringtone.c:324 #, c-format msgid "Failed to load ringtone.\n" msgstr "Soittoäänen lataus epäonnistui.\n" #: ../gnokii/gnokii-ringtone.c:333 #, c-format msgid "Send succeeded!\n" msgstr "Lähetys onnistui!\n" #: ../gnokii/gnokii-ringtone.c:335 #, c-format msgid "Send failed: %s\n" msgstr "Lähetys epäonnistui: %s\n" #: ../gnokii/gnokii-ringtone.c:342 #, c-format msgid " usage: --playringtone rtttlfile [-v|--volume vol]\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:424 #, c-format msgid "Play succeeded!\n" msgstr "Soittaminen onnistui!\n" #: ../gnokii/gnokii-ringtone.c:426 #, c-format msgid "Play failed: %s\n" msgstr "Soittaminen epäonnistui: %s\n" #: ../gnokii/gnokii-ringtone.c:433 #, c-format msgid " usage: --ringtoneconvert source destination\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:455 #, c-format msgid "%d note(s) converted.\n" msgstr "%d merkintää muutettu.\n" #: ../gnokii/gnokii-ringtone.c:467 #, c-format msgid "Failed to get the list of ringtones\n" msgstr "Soittoäänilistan haku epäonnistui\n" #: ../gnokii/gnokii-ringtone.c:471 #, c-format msgid "First user defined ringtone location: %3d\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:472 #, c-format msgid "" "Number of user defined ringtones: %d\n" "\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:473 #, c-format msgid "loc rwu name\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:474 #, c-format msgid "===============================\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:476 #, c-format msgid "%3d %d%d%d %-20s\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:488 #, c-format msgid " usage: --deleteringtone start [end]\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:512 #, c-format msgid "Ringtone %d deleted\n" msgstr "Soittoääni %d poistettu\n" #: ../gnokii/gnokii-ringtone.c:514 #, c-format msgid "Failed to delete ringtone %d: %s\n" msgstr "Soittoäänen poisto epäonnistui %d: %s\n" #: ../gnokii/gnokii-security.c:59 #, c-format msgid "" "Security options:\n" " --identify\n" " --getlocksinfo\n" msgstr "" #: ../gnokii/gnokii-security.c:65 #, c-format msgid "" " --entersecuritycode PIN|PIN2|PUK|PUK2|SEC [COMMAND]\n" " --getsecuritycodestatus\n" " --getsecuritycode\n" " --changesecuritycode PIN|PIN2|PUK|PUK2\n" msgstr "" #: ../gnokii/gnokii-security.c:75 #, c-format msgid "IMEI : %s\n" msgstr "IMEI : %s\n" #: ../gnokii/gnokii-security.c:76 #, c-format msgid "Manufacturer : %s\n" msgstr "Valmistaja : %s\n" #: ../gnokii/gnokii-security.c:77 #, c-format msgid "Model : %s\n" msgstr "Malli : %s\n" #: ../gnokii/gnokii-security.c:78 #, c-format msgid "Product name : %s\n" msgstr "Tuotteen nimi : %s\n" #: ../gnokii/gnokii-security.c:79 #, c-format msgid "Revision : %s\n" msgstr "Revisio : %s\n" #: ../gnokii/gnokii-security.c:100 #, c-format msgid "%7s : %10s, %7s, %6s, counter %d\n" msgstr "" #: ../gnokii/gnokii-security.c:120 #, c-format msgid "Getting security code... \n" msgstr "Haetaan turvakoodi...\n" #: ../gnokii/gnokii-security.c:124 #, c-format msgid "Security code is: %s\n" msgstr "Turvakoodi on: %s\n" #: ../gnokii/gnokii-security.c:168 #, c-format msgid " usage: --entersecuritycode PIN|PIN2|PUK|PUK2|SEC\n" msgstr "" #: ../gnokii/gnokii-security.c:193 ../gnokii/gnokii-security.c:281 msgid "Enter your code: " msgstr "Syötä koodi: " #: ../gnokii/gnokii-security.c:202 #, c-format msgid "Code ok.\n" msgstr "Koodi ok.\n" #: ../gnokii/gnokii-security.c:221 #, c-format msgid "Security code status: " msgstr "Turvakoodin tila: " #: ../gnokii/gnokii-security.c:225 #, c-format msgid "waiting for Security Code.\n" msgstr "odotellaan turvakoodia.\n" #: ../gnokii/gnokii-security.c:228 #, c-format msgid "waiting for PIN.\n" msgstr "" #: ../gnokii/gnokii-security.c:231 #, c-format msgid "waiting for PIN2.\n" msgstr "" #: ../gnokii/gnokii-security.c:234 #, c-format msgid "waiting for PUK.\n" msgstr "" #: ../gnokii/gnokii-security.c:237 #, c-format msgid "waiting for PUK2.\n" msgstr "" #: ../gnokii/gnokii-security.c:240 #, c-format msgid "nothing to enter.\n" msgstr "" #: ../gnokii/gnokii-security.c:243 #, c-format msgid "unknown\n" msgstr "tuntematon\n" #: ../gnokii/gnokii-security.c:254 #, c-format msgid " usage: --changesecuritycode PIN|PIN2|PUK|PUK2\n" msgstr "" #: ../gnokii/gnokii-security.c:282 msgid "Enter new code: " msgstr "Syötä uusi koodi: " #: ../gnokii/gnokii-security.c:283 msgid "Retype new code: " msgstr "Syötä uusi koodi uudestaan: " #: ../gnokii/gnokii-security.c:285 #, c-format msgid "Error: new code differs\n" msgstr "Virhe: uusi koodi on eri\n" #: ../gnokii/gnokii-security.c:295 #, c-format msgid "Code changed.\n" msgstr "Koodi muutettu.\n" #: ../gnokii/gnokii-settings.c:56 #, c-format msgid "" "Phone settings:\n" " --reset [soft|hard]\n" " --setdatetime [YYYY [MM [DD [HH [MM]]]]]\n" " --getdatetime\n" " --setalarm [HH MM]\n" " --getalarm\n" msgstr "" #: ../gnokii/gnokii-settings.c:142 #, c-format msgid "Date: %4d/%02d/%02d\n" msgstr "" #: ../gnokii/gnokii-settings.c:143 #, c-format msgid "Time: %02d:%02d:%02d\n" msgstr "" #: ../gnokii/gnokii-settings.c:200 #, c-format msgid "Alarm: %s\n" msgstr "" #: ../gnokii/gnokii-settings.c:201 #, c-format msgid "Time: %02d:%02d\n" msgstr "" #: ../gnokii/gnokii-settings.c:223 #, c-format msgid "What kind of reset do you want??\n" msgstr "Minkälaisen resetin haluat??\n" #: ../gnokii/gnokii-sms.c:63 #, c-format msgid "" "SMS options:\n" " --sendsms destination [--smsc message_center_number |\n" " --smscno message_center_index] [-r|--report] [-8|--8bit]\n" " [-C|--class n] [-v|--validity n]\n" " [-i|--imelody] [-a|--animation file;file;file;file]\n" " [-o|--concat this;total;serial] [-w|--wappush url]\n" " --savesms [--sender from] [--smsc message_center_number |\n" " --smscno message_center_index] [-f|--folder folder_id]\n" " [-l|--location number] [-s|--sent|-r|--read] [-d|--" "deliver]\n" " [-t|--datetime YYMMDDHHMMSS]\n" " --getsms memory_type start [end] [-f|--file file]\n" " [-F|--force-file file] [-a|--append-file file]\n" " [-d|--delete]\n" " --deletesms memory_type start [end]\n" " --getsmsc [start_number [end_number]] [-r|--raw]\n" " --setsmsc\n" " --createsmsfolder name\n" " --deletesmsfolder folderid\n" " --showsmsfolderstatus\n" " --smsreader\n" msgstr "" #: ../gnokii/gnokii-sms.c:88 #, c-format msgid "" " usage: --sendsms destination recipient number (msisdn)\n" " --smsc message_center_number number (msisdn) of the message\n" " center\n" " --smscno message_center_index index of the message center " "stored\n" " in the phone memory\n" " -r\n" " --report request delivery report\n" " -v n\n" " --validity n set message validity\n" " -C n\n" " --class n set message class; possible " "values\n" " are 0, 1, 2, or 3\n" " -8\n" " --8bit set 8bit coding\n" " -i\n" " --imelody send imelody message, text is " "read\n" " from stdin\n" " -a file;file;file;file\n" " --animation file;file;file;file send animation message\n" " -o this;total;serial\n" " --concat this;total;serial send 'this' part of all 'total' " "parts\n" " identified by 'serial'\n" " -w url\n" " --wappush url send wappush to the given url\n" "Message text is read from standard input.\n" "\n" msgstr "" #: ../gnokii/gnokii-sms.c:220 #, c-format msgid "Incorrect --concat option\n" msgstr "" #: ../gnokii/gnokii-sms.c:267 ../gnokii/gnokii-sms.c:574 #, c-format msgid "Empty message. Quitting.\n" msgstr "Tyhjä viesti. Lopetataan.\n" #: ../gnokii/gnokii-sms.c:278 #, c-format msgid "URL is too long (max 255 chars). Quitting.\n" msgstr "URL on liian pitkä (max 255 chars). Lopetetaan.\n" #: ../gnokii/gnokii-sms.c:287 ../gnokii/gnokii-utils.c:139 #, c-format msgid "Please enter SMS text. End your input with :\n" msgstr "Kirjoita SMSn teksti. Päätä viesti :\n" #: ../gnokii/gnokii-sms.c:294 #, c-format msgid "WAP Push encoding failed!\n" msgstr "WAP Push enkoodaus epäonnistui!\n" #: ../gnokii/gnokii-sms.c:329 #, c-format msgid "" "Cannot read the SMSC number from your phone. If the sms send will fail, " "please use --smsc option explicitely giving the number.\n" msgstr "" "SMSCn numeron haku puhelimesta epäonnistui. Jos SMSn lähetys epäonnistuu, " "käytä komentorivioptiota --smsc.\n" #: ../gnokii/gnokii-sms.c:368 #, c-format msgid "" " usage: --savesms\n" " --smsc message_center_number number (msisdn) of the message\n" " center\n" " --smscno message_center_index index of the message center stored\n" " in the phone memory\n" " --sender msisdn set sender number\n" " -l n\n" " --location n save message at location n\n" " -r\n" " --read mark message as read\n" " -s\n" " --sent mark message as sent\n" " -f ID\n" " --folder ID save message to the folder ID where\n" " is of type IN, OU...\n" " -d\n" " --deliver set message type as sms deliver\n" " (to be sent)\n" " -t YYMMDDHHMISS\n" " --datetime YYMMDDHHMISS set date and time of message " "delivery\n" "Message text is read from standard input.\n" "\n" msgstr "" #: ../gnokii/gnokii-sms.c:496 ../gnokii/gnokii-sms.c:501 #, c-format msgid "Invalid datetime format: %s (should be YYMMDDHHMISS, all digits)!\n" msgstr "" "Väärä päivämäärä/kellonajan formaatti: %s (pitäisi olla VVKKPPTTMMSS, kaikki " "merkit)!\n" #: ../gnokii/gnokii-sms.c:517 #, c-format msgid "Invalid datetime: %s.\n" msgstr "Väärä päivämäärä/kellonaika: %s.\n" #: ../gnokii/gnokii-sms.c:538 #, c-format msgid "Message at specified location exists. " msgstr "Annetussa paikassa on jo viesti. " #: ../gnokii/gnokii-sms.c:585 #, c-format msgid "Storing SMS... " msgstr "Tallennetaan SMS... " #: ../gnokii/gnokii-sms.c:591 #, c-format msgid "Saved to %d!\n" msgstr "" #: ../gnokii/gnokii-sms.c:593 #, c-format msgid "Saving failed (%s)\n" msgstr "Tallennus epäonnistui (%s)\n" #: ../gnokii/gnokii-sms.c:601 #, c-format msgid "" " usage: --getsms memory start [end] retrieves messages from memory type " "(SM, ME,\n" " IN, OU, ...) starting from\n" " location start and ending with end;\n" " if end option is omitted, just one " "entry\n" " is read;\n" " start must be a number, end may be a " "number\n" " or 'end' string;\n" " if 'end' is used entries are being read\n" " until empty location\n" " --force-file filename\n" " -F filename save sms to the file overwriting it if\n" " the file already exists;\n" " file is in mbox format\n" " --file filename\n" " -f filename as above but user is prompted before\n" " overwriting the file\n" " --append-file filename\n" " -a filename as above but append to the existing " "file\n" " --delete\n" " -d delete message after reading\n" "\n" msgstr "" #: ../gnokii/gnokii-sms.c:752 #, c-format msgid "Sending date/time: %02d/%02d/%04d %02d:%02d:%02d " msgstr "" #. Translators: this format is for printing a timezone with a leading +/- #: ../gnokii/gnokii-sms.c:757 ../gnokii/gnokii-sms.c:765 #: ../gnokii/gnokii-sms.c:779 ../gnokii/gnokii-sms.c:794 #, c-format msgid "%+03d00" msgstr "" #: ../gnokii/gnokii-sms.c:760 #, c-format msgid "Delivery date/time: %02d/%02d/%04d %02d:%02d:%02d " msgstr "" #: ../gnokii/gnokii-sms.c:768 ../gnokii/gnokii-sms.c:800 #, c-format msgid "Recipient: %s Msg Center: %s\n" msgstr "" #: ../gnokii/gnokii-sms.c:769 ../gnokii/gnokii-sms.c:785 #, c-format msgid "Text:\n" msgstr "" #: ../gnokii/gnokii-sms.c:774 ../gnokii/gnokii-sms.c:789 #, c-format msgid "Date/time: %02d/%02d/%04d %02d:%02d:%02d " msgstr "" #: ../gnokii/gnokii-sms.c:782 ../gnokii/gnokii-sms.c:803 #, c-format msgid "Sender: %s Msg Center: %s\n" msgstr "" #: ../gnokii/gnokii-sms.c:783 #, c-format msgid "Bitmap:\n" msgstr "" #: ../gnokii/gnokii-sms.c:809 #, c-format msgid "%s:\n" msgstr "%s:\n" #: ../gnokii/gnokii-sms.c:814 #, c-format msgid "GSM operator logo for %s (%s) network.\n" msgstr "Operaattorilogo %s (%s).\n" #: ../gnokii/gnokii-sms.c:816 #, c-format msgid "Saved by Logo Express\n" msgstr "" #: ../gnokii/gnokii-sms.c:818 #, c-format msgid "Saved by Operator Logo Uploader by Thomas Kessler\n" msgstr "" #: ../gnokii/gnokii-sms.c:830 ../gnokii/gnokii-utils.c:59 #, c-format msgid "File %s exists.\n" msgstr "Tiedosto %s on jo olemassa.\n" #: ../gnokii/gnokii-sms.c:839 #, c-format msgid "Couldn't save logofile %s!\n" msgstr "Logotiedostoa %s ei voitu tallettaa!\n" #: ../gnokii/gnokii-sms.c:847 #, c-format msgid "Linked (%d/%d):\n" msgstr "" #: ../gnokii/gnokii-sms.c:882 #, fuzzy, c-format msgid "Getting SMS failed (location %d from %s memory)! (%s)\n" msgstr "Virhe luettaessa paikkaa numero %d muistista %s\n" #: ../gnokii/gnokii-sms.c:910 #, c-format msgid "" " usage: --deletesms memory start [end] deletes messages from memory type\n" " (SM, ME, IN, OU, ...) starting\n" " from location start and ending with " "end;\n" " if end option is omitted, just one " "entry\n" " is removed;\n" " if 'end' is used entries are being " "removed\n" " until empty location\n" "\n" msgstr "" #: ../gnokii/gnokii-sms.c:957 #, fuzzy, c-format msgid "Deleted SMS (location %d from memory %s)\n" msgstr "Virhe luettaessa paikkaa numero %d muistista %s\n" #: ../gnokii/gnokii-sms.c:961 #, fuzzy, c-format msgid "Deleting SMS failed (location %d from %s memory)! (%s)\n" msgstr "Virhe luettaessa paikkaa numero %d muistista %s\n" #: ../gnokii/gnokii-sms.c:974 #, c-format msgid "" " usage: --getsmsc [start [end]] reads message center details from\n" " the phone starting with start location\n" " and ending with end location;\n" " no end parameter means to read every\n" " location to the end;\n" " no start parameter means to start with\n" " the first location;\n" "-r\n" "--raw output in raw format (comma separated)\n" " default is human readable form\n" "\n" msgstr "" #: ../gnokii/gnokii-sms.c:1025 #, fuzzy, c-format msgid "SMS center: location number must be greater than 0\n" msgstr "Viestikeskuksen numeron täytyy olla suurempi kuin 0\n" #: ../gnokii/gnokii-sms.c:1061 #, c-format msgid "No. %d: \"%s\" (defined name)\n" msgstr "Ei. %d: \"%s\" (määritelty nimi)\n" #: ../gnokii/gnokii-sms.c:1063 #, c-format msgid "No. %d: \"%s\" (default name)\n" msgstr "Ei. %d: \"%s\" (oletusarvoinen nimi)\n" #: ../gnokii/gnokii-sms.c:1064 #, c-format msgid "SMS center number is %s\n" msgstr "Viestikeskuksen numero: %s\n" #: ../gnokii/gnokii-sms.c:1066 #, c-format msgid "Default recipient number is %s\n" msgstr "Oletusvastaanottajan numero on %s\n" #: ../gnokii/gnokii-sms.c:1068 #, c-format msgid "No default recipient number is defined\n" msgstr "Oletusvastaanottajan numeroa ei ole määritelty\n" #: ../gnokii/gnokii-sms.c:1069 #, c-format msgid "Messages sent as %s\n" msgstr "" #: ../gnokii/gnokii-sms.c:1070 #, c-format msgid "Message validity is %s\n" msgstr "" #: ../gnokii/gnokii-sms.c:1080 #, c-format msgid "" " usage: --setsmsc\n" "SMSC details are read from standard input.\n" "\n" msgstr "" #: ../gnokii/gnokii-sms.c:1137 #, c-format msgid "" " usage: --createsmsfolder name creates SMS folder with given name\n" "\n" msgstr "" #: ../gnokii/gnokii-sms.c:1158 #, c-format msgid "Folder with name: %s successfully created!\n" msgstr "Hakemisto nimellä: %s onnistuneesti luotu!\n" #: ../gnokii/gnokii-sms.c:1165 #, c-format msgid "" " usage: --deletesmsfolder folderid removes SMS folder with given id\n" "\n" msgstr "" #: ../gnokii/gnokii-sms.c:1183 #, c-format msgid "Error: Number must be between 1 and %i!\n" msgstr "Virhe: Numeron täytyy olla välillä 1 ja %i!\n" #: ../gnokii/gnokii-sms.c:1191 #, c-format msgid "Number %i of 'My Folders' successfully deleted!\n" msgstr "" #: ../gnokii/gnokii-sms.c:1198 #, c-format msgid "" " usage: --showsmsfolderstatus shows summary of SMS folders\n" "\n" msgstr "" #: ../gnokii/gnokii-sms.c:1215 #, c-format msgid "Cannot list available folders: %s\n" msgstr "Olemassa olevien hakemistojen listaa ei saada: %s\n" #: ../gnokii/gnokii-sms.c:1219 #, c-format msgid "No. Name Id #Msg\n" msgstr "" #: ../gnokii/gnokii-sms.c:1220 #, c-format msgid "========================================================\n" msgstr "" #: ../gnokii/gnokii-sms.c:1224 #, fuzzy, c-format msgid "Cannot get status of folder \"%s\": %s\n" msgstr "Hakemistosta \"%s\" ei saada tietoja: %s\n" #: ../gnokii/gnokii-sms.c:1227 #, fuzzy, c-format msgid "%3d %-42s %4s %4u\n" msgstr "%d. %s: %s\n" #: ../gnokii/gnokii-sms.c:1250 #, c-format msgid "SMS received from number: %s\n" msgstr "SMS vastaanotettu numerosta: %s\n" #: ../gnokii/gnokii-sms.c:1259 #, c-format msgid "Got message %d: %s\n" msgstr "Viesti %d saatu: %s\n" #: ../gnokii/gnokii-sms.c:1267 #, c-format msgid "### Exists?!\n" msgstr "### Jo olemassa?!\n" #: ../gnokii/gnokii-sms.c:1273 #, c-format msgid "### Cannot create file %s\n" msgstr "### Tiedostoa %s ei voida luoda\n" #: ../gnokii/gnokii-sms.c:1297 #, c-format msgid "" " usage: --smsreader periodically check sms on the phone and stores them\n" " in mbox format\n" "\n" msgstr "" #: ../gnokii/gnokii-sms.c:1314 #, c-format msgid "Entered sms reader mode...\n" msgstr "Siirrytty SMSn lukutilaan...\n" #: ../gnokii/gnokii-sms.c:1324 #, c-format msgid "Exiting sms reader mode...\n" msgstr "Poistuttu SMSn lukutilasta...\n" #: ../gnokii/gnokii-todo.c:56 #, c-format msgid "" "ToDo options:\n" " --gettodo start_number [end_number|end] [-v|--vCal]\n" " --writetodo vcalendarfile start_number [end_number|end]\n" " --deletealltodos\n" msgstr "" #: ../gnokii/gnokii-todo.c:65 #, c-format msgid "" "usage: --gettodo start_number [end_number | end] [-v|--vCal]\n" " start_number - entry number in the phone todo (numeric)\n" " end_number - until this entry in the phone todo (numeric, " "optional)\n" " end - the string \"end\" indicates all entries from start to " "end\n" " -v - output in iCalendar format\n" " NOTE: if no end is given, only the start entry is written\n" msgstr "" #: ../gnokii/gnokii-todo.c:119 msgid "Todo" msgstr "" #: ../gnokii/gnokii-todo.c:120 msgid "Priority" msgstr "" #: ../gnokii/gnokii-todo.c:133 #, c-format msgid "The ToDo note could not be read: %s\n" msgstr "Tehtävälistan merkintää ei voitu lukea: %s\n" #: ../gnokii/gnokii-todo.c:142 #, c-format msgid "" "usage: --writetodo vcalendarfile start_number [end_number|end]\n" " vcalendarfile - file containing todo notes in vCal format\n" " start_number - first note to read from file\n" " end_number - last note to read from file\n" " end - read all notes from file from start_number\n" " NOTE: it stores the note at the first empty location.\n" msgstr "" #: ../gnokii/gnokii-todo.c:216 #, c-format msgid "Priority %d. %s\n" msgstr "Prioriteetti %d. %s\n" #: ../gnokii/gnokii-todo.c:218 #, c-format msgid "Failed to write ToDo note: %s\n" msgstr "Tehtävälistan merkinnän kirjoitus epäonnistui: %s\n" #: ../gnokii/gnokii-todo.c:234 #, c-format msgid "Successfully deleted all ToDo notes!\n" msgstr "Kaikki tehtävälistan merkinnät poistettu!\n" #: ../gnokii/gnokii-todo.c:236 #, c-format msgid "Failed to delete ToDo note: %s\n" msgstr "Tehtävälistan merkinnän poisto epäonnistui: %s\n" #: ../gnokii/gnokii-utils.c:145 #, c-format msgid "Couldn't read from stdin!\n" msgstr "Luku stdin:istä epäonnistui!\n" #: ../gnokii/gnokii-utils.c:151 #, c-format msgid "Input too long! (%d, maximum is %d)\n" msgstr "Syöte on liian pitkä! (%d, maksimi on %d)\n" #: ../gnokii/gnokii-utils.c:166 #, c-format msgid "Could not null bitmap: %s\n" msgstr "Tyhjän kuvan luku epäonnistui: %s\n" #: ../gnokii/gnokii-utils.c:171 #, c-format msgid "Could not load bitmap from %s: %s\n" msgstr "Kuvaa ei voitu ladata %s: %s\n" #: ../gnokii/gnokii-utils.c:210 #, c-format msgid "" "Warning: end value (%d) is less than start value (%d). Setting it to the " "start value (%d)\n" msgstr "" "Varoitus: lopetusarvo (%d) on pienempi kuin aloitusarvo (%d). Asetetaan " "samaksi kuin aloitusarvo (%d)\n" #: ../gnokii/gnokii-wap.c:55 #, c-format msgid "" "WAP options:\n" " --getwapbookmark number\n" " --writewapbookmark name URL\n" " --deletewapbookmark number\n" " --getwapsetting number [-r|--raw]\n" " --writewapsetting\n" " --activatewapsetting number\n" msgstr "" #: ../gnokii/gnokii-wap.c:67 #, c-format msgid " usage: --getwapbookmark number\n" msgstr "" #: ../gnokii/gnokii-wap.c:88 ../gnokii/gnokii-wap.c:219 #, c-format msgid "WAP bookmark nr. %d:\n" msgstr "" #: ../gnokii/gnokii-wap.c:103 #, c-format msgid " usage: --writebookmark name URL\n" msgstr "" #: ../gnokii/gnokii-wap.c:126 #, c-format msgid "WAP bookmark nr. %d successfully written!\n" msgstr "" #: ../gnokii/gnokii-wap.c:138 #, c-format msgid " usage: --deletewapbookmark number\n" msgstr "" #: ../gnokii/gnokii-wap.c:159 #, c-format msgid "WAP bookmark nr. %d deleted!\n" msgstr "" #: ../gnokii/gnokii-wap.c:171 #, c-format msgid " usage: --getwapsetting number [-r|--raw]\n" msgstr "" #: ../gnokii/gnokii-wap.c:221 ../xgnokii/xgnokii_contacts.c:725 #: ../xgnokii/xgnokii_contacts.c:803 ../xgnokii/xgnokii_contacts.c:942 #: ../xgnokii/xgnokii_contacts.c:984 ../xgnokii/xgnokii_contacts.c:1202 msgid "Home" msgstr "Home" #: ../gnokii/gnokii-wap.c:222 msgid "Session mode" msgstr "" #: ../gnokii/gnokii-wap.c:223 msgid "Connection security" msgstr "" #: ../gnokii/gnokii-wap.c:224 msgid "Data bearer" msgstr "" #: ../gnokii/gnokii-wap.c:226 ../gnokii/gnokii-wap.c:236 msgid "Authentication type" msgstr "" #: ../gnokii/gnokii-wap.c:227 msgid "Data call type" msgstr "" #: ../gnokii/gnokii-wap.c:228 msgid "Data call speed" msgstr "" #: ../gnokii/gnokii-wap.c:229 ../gnokii/gnokii-wap.c:237 msgid "Login type" msgstr "" #: ../gnokii/gnokii-wap.c:230 ../gnokii/gnokii-wap.c:239 msgid "IP" msgstr "" #: ../gnokii/gnokii-wap.c:232 ../gnokii/gnokii-wap.c:240 msgid "Username" msgstr "Käyttäjätunnus" #: ../gnokii/gnokii-wap.c:233 ../gnokii/gnokii-wap.c:241 msgid "Password" msgstr "Salasana" #: ../gnokii/gnokii-wap.c:235 ../xgnokii/xgnokii.c:1615 msgid "Connection" msgstr "Yhteys" #: ../gnokii/gnokii-wap.c:238 msgid "Access point" msgstr "" #: ../gnokii/gnokii-wap.c:243 msgid "Service number" msgstr "Palvelun numero" #: ../gnokii/gnokii-wap.c:244 msgid "Server number" msgstr "Palvelimen numero" #: ../gnokii/gnokii-wap.c:292 #, c-format msgid "Cannot write WAP setting: %s\n" msgstr "WAP-asetuksen kirjoitus epäonnistui: %s\n" #: ../gnokii/gnokii-wap.c:299 #, c-format msgid " usage: --activatewapsetting number\n" msgstr "" #: ../gnokii/gnokii-wap.c:320 #, c-format msgid "WAP setting nr. %d activated!\n" msgstr "WAP asetus %d aktivoitu!\n" #: ../smsd/file.c:59 ../smsd/file.c:90 #, c-format msgid "Cannot stat file %s!\n" msgstr "Tiedoston %s tietoja ei saada!\n" #: ../smsd/file.c:68 #, c-format msgid "" "File %s is not regular file or\n" "you have not executable permission to this file!\n" msgstr "" "Tiedosto %s ei ole normaali tiedosto tai\n" "oikeutesi eivät riitä tiedoston suorittamiseen!\n" #: ../smsd/file.c:85 #, c-format msgid "You have not set spool directory, sms sending is disabled!\n" msgstr "" "Et ole asettanut spool-hakemistoa, SMSn lähetys ei ole käytettävissä!\n" #: ../smsd/file.c:99 #, c-format msgid "" "File %s is not directory or\n" "you have not read and write permissions to this directory,\n" "sms sending is disabled!\n" "!" msgstr "" "Tiedosto %s ei ole hakemisto tai\n" "sinulla ei ole luku- ja kirjoitusoikeusia antamaasi hakemistoon,\n" "SMSn lähetys ei ole käytettävissä!\n" "!" #: ../smsd/file.c:166 #, c-format msgid "Cannot open directory %s\n" msgstr "Hakemistoa %s ei voida avata\n" #: ../smsd/file.c:199 #, c-format msgid "Remote number is empty in %s!\n" msgstr "Vastaanottajan numero on tyhjä %s!\n" #: ../smsd/file.c:243 ../smsd/file.c:258 #, c-format msgid "Cannot unlink %s." msgstr "Tiedostoa %s ei voida poistaa." #: ../smsd/file.c:252 #, c-format msgid "Cannot send sms from file %s\n" msgstr "SMSn lähetys tiedostosta %s epäonnistui\n" #: ../smsd/file.c:255 #, c-format msgid "Cannot rename file %s to %s. Trying to unlink it.\n" msgstr "Tiedostoa %s ei voitu uudelleennimetä %s. Yritetään poistoa.\n" #: ../smsd/lowlevel.c:111 #, fuzzy, c-format msgid "" "Cannot load phone %s!\n" "Do you have proper section in the config file?\n" msgstr "" "Antamasi puhelimen %s profiilia ei voi ladata!\n" "Onko gnokiirc oikea osio?\n" #: ../smsd/lowlevel.c:400 ../xgnokii/xgnokii_lowlevel.c:1349 #, c-format msgid "Event %d failed with return code %d!\n" msgstr "Tapahtuma %d epäonnistui virhekoodilla %d!\n" #: ../smsd/lowlevel.c:449 #, c-format msgid "Timeout in file %s, line %d, restarting connection.\n" msgstr "Aikakatkaisu tiedostossa %s, rivillä %d, avataan yhteys uudestaan.\n" #: ../smsd/lowlevel.c:459 #, fuzzy, c-format msgid "Too many consecutive errors, restarting connection.\n" msgstr "Aikakatkaisu tiedostossa %s, rivillä %d, avataan yhteys uudestaan.\n" #: ../smsd/mysql.c:75 ../smsd/pq.c:66 #, c-format msgid "Connection to database '%s' on host '%s' failed.\n" msgstr "Yhteys tietokantaan '%s' serverillä '%s' epäonnistui.\n" #: ../smsd/mysql.c:132 #, fuzzy, c-format msgid "%d: SELECT FROM multipart command failed.\n" msgstr "%d: SELECT FROM lähtevien viestien laatikosta epäonnistui.\n" #: ../smsd/mysql.c:169 #, fuzzy, c-format msgid "%d: INSERT INTO multipartinbox command failed.\n" msgstr "%d: SELECT FROM lähtevien viestien laatikosta epäonnistui.\n" #: ../smsd/mysql.c:187 #, fuzzy, c-format msgid "%d: SELECT FROM multipartinbox command failed.\n" msgstr "%d: SELECT FROM lähtevien viestien laatikosta epäonnistui.\n" #: ../smsd/mysql.c:223 #, fuzzy, c-format msgid "%d: DELETE FROM multipartinbox command failed.\n" msgstr "%d: SELECT FROM lähtevien viestien laatikosta epäonnistui.\n" #: ../smsd/mysql.c:261 #, fuzzy, c-format msgid "%d: SELECT FROM inbox command failed.\n" msgstr "%d: SELECT FROM lähtevien viestien laatikosta epäonnistui.\n" #: ../smsd/mysql.c:294 #, fuzzy, c-format msgid "%d: INSERT INTO inbox command failed.\n" msgstr "%d: SELECT FROM lähtevien viestien laatikosta epäonnistui.\n" #: ../smsd/mysql.c:334 ../smsd/sqlite.c:239 #, c-format msgid "%d: SELECT FROM outbox command failed.\n" msgstr "%d: SELECT FROM lähtevien viestien laatikosta epäonnistui.\n" #: ../smsd/mysql.c:344 #, c-format msgid "%d: Store Mysql Result Failed.\n" msgstr "%d: Mysql epäonnistui.\n" #: ../smsd/mysql.c:397 ../smsd/pq.c:425 #, c-format msgid "%d: UPDATE command failed.\n" msgstr "" #: ../smsd/pq.c:75 #, fuzzy, c-format msgid "Setting client charset '%s' for database '%s' on host '%s' failed.\n" msgstr "Yhteys tietokantaan '%s' serverillä '%s' epäonnistui.\n" #: ../smsd/pq.c:120 ../smsd/pq.c:257 #, c-format msgid "%d: Escaping string failed.\n" msgstr "" #: ../smsd/pq.c:148 ../smsd/pq.c:210 #, fuzzy, c-format msgid "%d: SELECT FROM %s.multipart command failed.\n" msgstr "%d: SELECT FROM lähtevien viestien laatikosta epäonnistui.\n" #: ../smsd/pq.c:188 #, c-format msgid "%d: INSERT INTO %s.multipartinbox failed.\n" msgstr "" #: ../smsd/pq.c:239 #, fuzzy, c-format msgid "%d: DELETE FROM %s.multipartinbox command failed.\n" msgstr "%d: SELECT FROM lähtevien viestien laatikosta epäonnistui.\n" #: ../smsd/pq.c:294 #, fuzzy, c-format msgid "%d: SELECT FROM %s.inbox command failed.\n" msgstr "%d: SELECT FROM lähtevien viestien laatikosta epäonnistui.\n" #: ../smsd/pq.c:331 #, c-format msgid "%d: INSERT INTO %s.inbox failed.\n" msgstr "" #: ../smsd/pq.c:374 #, c-format msgid "%d: SELECT FROM %s.outbox command failed.\n" msgstr "" #: ../smsd/smsd.c:137 #, c-format msgid "smsd - version %s from gnokii %s\n" msgstr "" #: ../smsd/smsd.c:142 #, c-format msgid "" "smsd - version %s from gnokii %s\n" "Copyright Jan Derfinak 1999-2011\n" msgstr "" #: ../smsd/smsd.c:149 #, c-format msgid "" "\n" "Usage: %s [options]\n" " -u, --user db_username OR action if -m file\n" " -p, --password db_password\n" " -d, --db db_name\n" " -c, --host db_hostname OR spool directory if -m file\n" " -s, --schema db_schema\n" " -e, --encoding client_encoding\n" " -m, --module db_module (pq, mysql, sqlite, file)\n" " -l, --libdir path_to_db_module\n" " -f, --logfile file\n" " -t, --phone phone_number\n" " -i, --interval polling_interval_for_incoming_sms's_in_seconds\n" " -S, --maxsms number_of_sms's (only in dumb mode)\n" " -b, --inbox memoryType\n" " -0, --firstpos0\n" " -v, --version\n" " -h, --help\n" msgstr "" #: ../smsd/smsd.c:183 #, c-format msgid "WARNING: Cannot open file %s for appending.\n" msgstr "VAROITUS: Tiedoston %s avaus lisäämistä varten epäonnistui.\n" #: ../smsd/smsd.c:342 #, c-format msgid "Wrong number of arguments\n" msgstr "Argumenttien lukumäärä on väärä\n" #: ../smsd/smsd.c:349 #, c-format msgid "Cannot load database module %s in directory %s!\n" msgstr "Tietokantamodulin %s lataus epäonnistui hakemistosta %s!\n" #: ../smsd/smsd.c:423 #, fuzzy, c-format msgid "Sending to %s unsuccessful. Error: %s\n" msgstr "Lähettäminen vastaanottajalle %s epäonnistui. Virhe %s\n" #: ../smsd/smsd.c:429 #, c-format msgid "Sending to %s successful.\n" msgstr "Viestin lähetys %s onnistui.\n" #: ../smsd/smsd.c:455 #, c-format msgid "Inserting sms from %s successful.\n" msgstr "%s lähettämän SMSn lisäys onnistui.\n" #: ../smsd/smsd.c:465 #, c-format msgid "Duplicated sms from %s.\n" msgstr "%s lähettämä viesti on kopioitu.\n" #: ../smsd/smsd.c:475 #, c-format msgid "Multipart sms from %s. Waiting for the next parts.\n" msgstr "" "Moniosainen viesti lähettäjältä %s. Odottelee seuraavia viestin osia.\n" #: ../smsd/smsd.c:485 #, c-format msgid "" "Inserting sms from %s unsuccessful.\n" "Date: %02d-%02d-%02d %02d:%02d:%02d+%02d\n" "Text: %s\n" "\n" "Exiting.\n" msgstr "" "SMSn lisääminen lähettäjältä %s ei onnistunut.\n" "Päivämäärä: %02d-%02d-%02d %02d:%02d:%02d+%02d\n" "Viesti: %s\n" "\n" "Lopetetaan.\n" #: ../smsd/sqlite.c:57 ../smsd/sqlite.c:69 #, fuzzy, c-format msgid "Connection to database '%s' failed.\n" msgstr "Yhteys tietokantaan '%s' serverillä '%s' epäonnistui.\n" #: ../smsd/sqlite.c:116 ../smsd/sqlite.c:182 #, c-format msgid "%d: Parsing query %s failed!" msgstr "" #: ../smsd/sqlite.c:117 ../smsd/sqlite.c:183 #, fuzzy, c-format msgid "Error: %s" msgstr "Virhe: %s\n" #: ../smsd/sqlite.c:133 #, fuzzy, c-format msgid "%d: INSERT INTO inbox failed.\n" msgstr "%d: SELECT FROM lähtevien viestien laatikosta epäonnistui.\n" #: ../smsd/sqlite.c:134 #, fuzzy, c-format msgid "Error %d: %s\n" msgstr "Virhe: %s\n" #: ../smsd/sqlite.c:135 #, fuzzy, c-format msgid "Query: %s\n" msgstr "Akun varaus: %d\n" #: ../utils/mgnokiidev.c:179 #, c-format msgid "mgnokiidev takes one and only one argument!\n" msgstr "mgnokiidev ottaa ainoastaan yhden parametrin!\n" #: ../xgnokii/xgnokii.c:217 msgid "Reading caller groups names ..." msgstr "" #: ../xgnokii/xgnokii.c:226 msgid "No group" msgstr "" #: ../xgnokii/xgnokii.c:347 msgid "Short Message received" msgstr "" #: ../xgnokii/xgnokii.c:353 ../xgnokii/xgnokii_lowlevel.c:1346 msgid "Working..." msgstr "" #: ../xgnokii/xgnokii.c:370 msgid "Call in progress" msgstr "" #: ../xgnokii/xgnokii.c:383 msgid "Hide" msgstr "" #: ../xgnokii/xgnokii.c:457 msgid "anonymous" msgstr "" #: ../xgnokii/xgnokii.c:470 #, c-format msgid "" "Outgoing call in progress:\n" "Time: %s" msgstr "" #: ../xgnokii/xgnokii.c:472 #, c-format msgid "" "Incoming call from: %s\n" "Time: %s" msgstr "" #: ../xgnokii/xgnokii.c:584 ../xgnokii/xgnokii.c:1455 msgid "Max. Time" msgstr "" #: ../xgnokii/xgnokii.c:631 msgid "Reading SMS centers ..." msgstr "" #: ../xgnokii/xgnokii.c:896 msgid "SMS not supported!" msgstr "SMS ei ole tuettu!" #: ../xgnokii/xgnokii.c:901 msgid "Calendar not supported!" msgstr "Kalenteri ei ole tuettu!" #: ../xgnokii/xgnokii.c:1088 msgid "Error writing configuration file!" msgstr "Asetustiedoston kirjoittaminen epäonnistui!" #: ../xgnokii/xgnokii.c:1100 ../xgnokii/xgnokii_contacts.c:3126 msgid "Contacts" msgstr "" #: ../xgnokii/xgnokii.c:1111 ../xgnokii/xgnokii_calendar.c:1547 msgid "Calendar" msgstr "" #: ../xgnokii/xgnokii.c:1116 ../xgnokii/xgnokii_logos.c:1525 msgid "Logos" msgstr "" #: ../xgnokii/xgnokii.c:1122 msgid "DTMF" msgstr "" #: ../xgnokii/xgnokii.c:1127 ../xgnokii/xgnokii_speed.c:548 msgid "Speed Dial" msgstr "" #: ../xgnokii/xgnokii.c:1132 msgid "Keyboard" msgstr "" #: ../xgnokii/xgnokii.c:1137 ../xgnokii/xgnokii_netmon.c:294 msgid "Net Monitor" msgstr "" #: ../xgnokii/xgnokii.c:1147 msgid "Data calls" msgstr "" #: ../xgnokii/xgnokii.c:1156 ../xgnokii/xgnokii.c:1575 msgid "Options" msgstr "" #: ../xgnokii/xgnokii.c:1166 ../xgnokii/xgnokii.c:1183 msgid "About" msgstr "" #: ../xgnokii/xgnokii.c:1186 ../xgnokii/xgnokii.c:1358 #: ../xgnokii/xgnokii_calendar.c:688 ../xgnokii/xgnokii_calendar.c:734 #: ../xgnokii/xgnokii_calendar.c:881 ../xgnokii/xgnokii_calendar.c:1001 #: ../xgnokii/xgnokii_calendar.c:1141 ../xgnokii/xgnokii_calendar.c:1274 #: ../xgnokii/xgnokii_calendar.c:1435 ../xgnokii/xgnokii_contacts.c:875 #: ../xgnokii/xgnokii_contacts.c:1119 ../xgnokii/xgnokii_contacts.c:1255 #: ../xgnokii/xgnokii_contacts.c:1406 ../xgnokii/xgnokii_contacts.c:2949 #: ../xgnokii/xgnokii_sms.c:570 msgid "Ok" msgstr "" #: ../xgnokii/xgnokii.c:1197 #, c-format msgid "" "xgnokii version: %s\n" "gnokii version: %s\n" "\n" "Copyright (C) 1999-2004 Pavel Janik ml.,\n" "Hugh Blemings, Jan Derfinak,\n" "Pawel Kot and others\n" "xgnokii is free software, covered by the GNU General Public License,\n" "and you are welcome to change it and/or distribute copies of it under\n" "certain conditions. There is absolutely no warranty for xgnokii.\n" "See GPL for details.\n" msgstr "" #: ../xgnokii/xgnokii.c:1352 msgid "Edit SMS Setting" msgstr "" #: ../xgnokii/xgnokii.c:1366 ../xgnokii/xgnokii_calendar.c:697 #: ../xgnokii/xgnokii_calendar.c:743 ../xgnokii/xgnokii_calendar.c:890 #: ../xgnokii/xgnokii_calendar.c:1010 ../xgnokii/xgnokii_calendar.c:1150 #: ../xgnokii/xgnokii_calendar.c:1283 ../xgnokii/xgnokii_calendar.c:1443 #: ../xgnokii/xgnokii_common.c:80 ../xgnokii/xgnokii_common.c:162 #: ../xgnokii/xgnokii_contacts.c:886 ../xgnokii/xgnokii_contacts.c:1263 #: ../xgnokii/xgnokii_contacts.c:1414 ../xgnokii/xgnokii_contacts.c:1651 #: ../xgnokii/xgnokii_contacts.c:1698 ../xgnokii/xgnokii_contacts.c:1816 #: ../xgnokii/xgnokii_contacts.c:2212 ../xgnokii/xgnokii_contacts.c:2956 #: ../xgnokii/xgnokii_sms.c:578 msgid "Cancel" msgstr "" #: ../xgnokii/xgnokii.c:1379 msgid "Set's name:" msgstr "" #: ../xgnokii/xgnokii.c:1393 msgid "Center:" msgstr "" #: ../xgnokii/xgnokii.c:1407 msgid "Sending Format:" msgstr "" #: ../xgnokii/xgnokii.c:1447 msgid "Validity Period:" msgstr "" #: ../xgnokii/xgnokii.c:1572 msgid "Set's name" msgstr "" #: ../xgnokii/xgnokii.c:1572 msgid "Center number" msgstr "" #: ../xgnokii/xgnokii.c:1572 msgid "Format" msgstr "" #: ../xgnokii/xgnokii.c:1572 msgid "Validity" msgstr "" #: ../xgnokii/xgnokii.c:1580 msgid "Apply" msgstr "" #: ../xgnokii/xgnokii.c:1588 ../xgnokii/xgnokii_contacts.c:2198 #: ../xgnokii/xgnokii_dtmf.c:181 msgid "Save" msgstr "" #: ../xgnokii/xgnokii.c:1594 msgid "Close" msgstr "" #. ** Connection notebook ** #: ../xgnokii/xgnokii.c:1608 msgid "Phone and connection type" msgstr "" #: ../xgnokii/xgnokii.c:1622 msgid "Port:" msgstr "" #: ../xgnokii/xgnokii.c:1636 ../xgnokii/xgnokii.c:1716 msgid "Model:" msgstr "" #: ../xgnokii/xgnokii.c:1650 msgid "Bindir:" msgstr "" #: ../xgnokii/xgnokii.c:1664 msgid "Init length:" msgstr "" #: ../xgnokii/xgnokii.c:1679 msgid "Connection:" msgstr "" #: ../xgnokii/xgnokii.c:1683 msgid "infrared" msgstr "" #: ../xgnokii/xgnokii.c:1690 msgid "serial" msgstr "" #: ../xgnokii/xgnokii.c:1697 msgid "irda" msgstr "" #. ** Phone notebook ** #: ../xgnokii/xgnokii.c:1702 msgid "Phone information" msgstr "" #: ../xgnokii/xgnokii.c:1730 msgid "Version:" msgstr "" #: ../xgnokii/xgnokii.c:1744 msgid "Revision:" msgstr "" #: ../xgnokii/xgnokii.c:1758 msgid "IMEI:" msgstr "" #: ../xgnokii/xgnokii.c:1772 msgid "Names length:" msgstr "" #: ../xgnokii/xgnokii.c:1780 msgid "SIM:" msgstr "" #: ../xgnokii/xgnokii.c:1798 msgid "Phone:" msgstr "" #: ../xgnokii/xgnokii.c:1805 msgid "Alarm setting" msgstr "" #: ../xgnokii/xgnokii.c:1812 ../xgnokii/xgnokii.c:1819 #: ../xgnokii/xgnokii_calendar.c:957 ../xgnokii/xgnokii_calendar.c:1089 #: ../xgnokii/xgnokii_calendar.c:1218 ../xgnokii/xgnokii_calendar.c:1350 #: ../xgnokii/xgnokii_calendar.c:1542 msgid "Alarm" msgstr "" #. ** SMS notebook ** #: ../xgnokii/xgnokii.c:1842 ../xgnokii/xgnokii_sms.c:1672 msgid "Short Message Service" msgstr "" #: ../xgnokii/xgnokii.c:1875 msgid "Edit" msgstr "" #. ** Business notebook ** #: ../xgnokii/xgnokii.c:1887 ../xgnokii/xgnokii_sms.c:1541 #: ../xgnokii/xgnokii_sms.c:1716 msgid "Business Card" msgstr "" #: ../xgnokii/xgnokii.c:1893 msgid "User" msgstr "" #: ../xgnokii/xgnokii.c:1911 ../xgnokii/xgnokii_calendar.c:1206 #: ../xgnokii/xgnokii_calendar.c:1338 ../xgnokii/xgnokii_contacts.c:1276 msgid "Name:" msgstr "" #: ../xgnokii/xgnokii.c:1936 msgid "Title:" msgstr "" #: ../xgnokii/xgnokii.c:1961 msgid "Company:" msgstr "" #: ../xgnokii/xgnokii.c:1986 msgid "Telephone:" msgstr "" #: ../xgnokii/xgnokii.c:2012 msgid "Fax:" msgstr "" #: ../xgnokii/xgnokii.c:2037 msgid "Email:" msgstr "" #: ../xgnokii/xgnokii.c:2062 msgid "Address:" msgstr "" #. ** Groups notebook ** #: ../xgnokii/xgnokii.c:2085 msgid "Caller groups names" msgstr "" #: ../xgnokii/xgnokii.c:2092 msgid "Groups" msgstr "" #: ../xgnokii/xgnokii.c:2100 #, c-format msgid "Group %d:" msgstr "" #. Mail #: ../xgnokii/xgnokii.c:2113 msgid "Mailbox" msgstr "" #: ../xgnokii/xgnokii.c:2120 msgid "Mail" msgstr "" #: ../xgnokii/xgnokii.c:2127 msgid "Path to mailbox:" msgstr "" #: ../xgnokii/xgnokii_calendar.c:131 msgid "Function not implemented!" msgstr "Toimintoa ei ole toteutettu!" #: ../xgnokii/xgnokii_calendar.c:194 #, c-format msgid "%04d/%02d/%02d" msgstr "%04d/%02d/%02d" #: ../xgnokii/xgnokii_calendar.c:197 ../xgnokii/xgnokii_calendar.c:203 #, c-format msgid "%04d/%02d/%02d %02d:%02d" msgstr "" #: ../xgnokii/xgnokii_calendar.c:211 #, c-format msgid "%02d/%02d %02d:%02d tone %s" msgstr "" #: ../xgnokii/xgnokii_calendar.c:216 #, c-format msgid "%04d/%02d/%02d %02d:%02d tone %s" msgstr "" #: ../xgnokii/xgnokii_calendar.c:229 msgid "never" msgstr "" #: ../xgnokii/xgnokii_calendar.c:232 msgid "daily" msgstr "" #: ../xgnokii/xgnokii_calendar.c:235 msgid "weekly" msgstr "" #: ../xgnokii/xgnokii_calendar.c:238 msgid "every two weeks" msgstr "" #: ../xgnokii/xgnokii_calendar.c:241 msgid "monthly" msgstr "" #: ../xgnokii/xgnokii_calendar.c:244 msgid "yearly" msgstr "" #: ../xgnokii/xgnokii_calendar.c:247 #, c-format msgid "every %d minutes" msgstr "" #: ../xgnokii/xgnokii_calendar.c:282 msgid "Type: " msgstr "" #: ../xgnokii/xgnokii_calendar.c:292 msgid "Start date: " msgstr "" #: ../xgnokii/xgnokii_calendar.c:322 msgid "End date: " msgstr "" #: ../xgnokii/xgnokii_calendar.c:333 msgid "Alarm: " msgstr "" #: ../xgnokii/xgnokii_calendar.c:344 msgid "Number: " msgstr "" #: ../xgnokii/xgnokii_calendar.c:355 msgid "Location: " msgstr "Paikka: " #: ../xgnokii/xgnokii_calendar.c:366 msgid "Recurrence: " msgstr "" #: ../xgnokii/xgnokii_calendar.c:374 msgid "Text: " msgstr "" #: ../xgnokii/xgnokii_calendar.c:504 #, c-format msgid "" "Error saving calendar note\n" "%s" msgstr "" "Virhe kalenterimerkinnän tallentamisessa\n" "%s" #: ../xgnokii/xgnokii_calendar.c:632 #, c-format msgid "%d-%02d-%02d" msgstr "%d-%02d-%02d" #: ../xgnokii/xgnokii_calendar.c:641 #, c-format msgid "%d-%02d-%02d %02d:%02d" msgstr "" #: ../xgnokii/xgnokii_calendar.c:681 ../xgnokii/xgnokii_calendar.c:727 msgid "Choose date" msgstr "" #: ../xgnokii/xgnokii_calendar.c:767 msgid "Alarm time:" msgstr "" #: ../xgnokii/xgnokii_calendar.c:837 msgid "Every Day" msgstr "" #: ../xgnokii/xgnokii_calendar.c:843 msgid "Every Week" msgstr "" #: ../xgnokii/xgnokii_calendar.c:849 msgid "Every 2 Weeks" msgstr "" #: ../xgnokii/xgnokii_calendar.c:855 msgid "Every Year" msgstr "" #. #. gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL, _("Edit note"), NULL, #. NewPixmap(Edit_xpm, GUI_CalendarWindow->window, #. &GUI_CalendarWindow->style->bg[GTK_STATE_NORMAL]), #. (GtkSignalFunc) NULL, NULL); #. #: ../xgnokii/xgnokii_calendar.c:874 ../xgnokii/xgnokii_calendar.c:1610 msgid "Add reminder" msgstr "" #: ../xgnokii/xgnokii_calendar.c:910 ../xgnokii/xgnokii_calendar.c:1029 #: ../xgnokii/xgnokii_calendar.c:1170 ../xgnokii/xgnokii_calendar.c:1303 msgid "Date:" msgstr "" #: ../xgnokii/xgnokii_calendar.c:945 msgid "Subject:" msgstr "" #: ../xgnokii/xgnokii_calendar.c:994 msgid "Add Call" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1064 ../xgnokii/xgnokii_contacts.c:1289 #: ../xgnokii/xgnokii_contacts.c:1827 msgid "Number:" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1077 msgid "Text:" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1109 ../xgnokii/xgnokii_calendar.c:1241 msgid "Repeat:" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1134 ../xgnokii/xgnokii_calendar.c:1618 msgid "Add meeting" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1267 ../xgnokii/xgnokii_calendar.c:1622 msgid "Add birthday" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1428 msgid "Delete calendar note" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1460 msgid "Do you want to delete selected note(s)?" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1496 ../xgnokii/xgnokii_contacts.c:3081 #: ../xgnokii/xgnokii_dtmf.c:219 ../xgnokii/xgnokii_logos.c:1474 #: ../xgnokii/xgnokii_netmon.c:258 ../xgnokii/xgnokii_sms.c:1245 #: ../xgnokii/xgnokii_sms.c:1633 ../xgnokii/xgnokii_speed.c:516 #: ../xgnokii/xgnokii_xkeyb.c:235 ../xgnokii/xgnokii_xring.c:826 msgid "/_File" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1497 ../xgnokii/xgnokii_contacts.c:3082 #: ../xgnokii/xgnokii_speed.c:517 msgid "/File/_Read from phone" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1498 ../xgnokii/xgnokii_contacts.c:3083 #: ../xgnokii/xgnokii_speed.c:518 msgid "/File/_Save to phone" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1499 ../xgnokii/xgnokii_contacts.c:3084 #: ../xgnokii/xgnokii_dtmf.c:222 ../xgnokii/xgnokii_logos.c:1478 #: ../xgnokii/xgnokii_sms.c:1248 ../xgnokii/xgnokii_sms.c:1637 #: ../xgnokii/xgnokii_speed.c:519 msgid "/File/Sep1" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1500 msgid "/File/Send via S_MS" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1501 ../xgnokii/xgnokii_contacts.c:3087 #: ../xgnokii/xgnokii_logos.c:1482 ../xgnokii/xgnokii_sms.c:1251 #: ../xgnokii/xgnokii_speed.c:522 msgid "/File/Sep2" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1502 ../xgnokii/xgnokii_contacts.c:3085 #: ../xgnokii/xgnokii_speed.c:520 msgid "/File/_Import from file" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1503 ../xgnokii/xgnokii_contacts.c:3086 #: ../xgnokii/xgnokii_speed.c:521 msgid "/File/_Export to file" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1504 msgid "/File/Sep3" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1505 ../xgnokii/xgnokii_contacts.c:3088 #: ../xgnokii/xgnokii_dtmf.c:223 ../xgnokii/xgnokii_logos.c:1483 #: ../xgnokii/xgnokii_netmon.c:259 ../xgnokii/xgnokii_sms.c:1252 #: ../xgnokii/xgnokii_sms.c:1638 ../xgnokii/xgnokii_speed.c:523 #: ../xgnokii/xgnokii_xkeyb.c:236 ../xgnokii/xgnokii_xring.c:836 msgid "/File/_Close" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1506 ../xgnokii/xgnokii_contacts.c:3089 #: ../xgnokii/xgnokii_logos.c:1484 ../xgnokii/xgnokii_speed.c:524 #: ../xgnokii/xgnokii_xring.c:837 msgid "/_Edit" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1507 msgid "/Edit/Add _reminder" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1508 msgid "/Edit/Add _call" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1509 msgid "/Edit/Add _meeting" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1510 msgid "/Edit/Add _birthday" msgstr "" #. #. menu_items[15].path = _("/Edit/_Edit"); #. #: ../xgnokii/xgnokii_calendar.c:1514 ../xgnokii/xgnokii_contacts.c:3093 msgid "/Edit/_Delete" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1515 ../xgnokii/xgnokii_contacts.c:3096 #: ../xgnokii/xgnokii_logos.c:1492 msgid "/Edit/Sep4" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1516 ../xgnokii/xgnokii_contacts.c:3100 msgid "/Edit/Select _all" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1517 ../xgnokii/xgnokii_contacts.c:3103 #: ../xgnokii/xgnokii_dtmf.c:224 ../xgnokii/xgnokii_netmon.c:263 #: ../xgnokii/xgnokii_sms.c:1253 ../xgnokii/xgnokii_sms.c:1647 #: ../xgnokii/xgnokii_speed.c:526 ../xgnokii/xgnokii_xkeyb.c:237 msgid "/_Help" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1518 ../xgnokii/xgnokii_contacts.c:3104 #: ../xgnokii/xgnokii_dtmf.c:225 ../xgnokii/xgnokii_netmon.c:264 #: ../xgnokii/xgnokii_sms.c:1254 ../xgnokii/xgnokii_sms.c:1648 #: ../xgnokii/xgnokii_speed.c:527 ../xgnokii/xgnokii_xkeyb.c:238 msgid "/Help/_About" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1535 msgid "#" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1537 msgid "Start date" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1538 msgid "End date" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1543 msgid "Recurrence" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1576 ../xgnokii/xgnokii_contacts.c:3157 #: ../xgnokii/xgnokii_speed.c:579 msgid "Read from phone" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1580 ../xgnokii/xgnokii_contacts.c:3161 #: ../xgnokii/xgnokii_speed.c:583 msgid "Save to phone" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1587 msgid "Send via SMS" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1594 ../xgnokii/xgnokii_contacts.c:2753 #: ../xgnokii/xgnokii_contacts.c:3168 ../xgnokii/xgnokii_logos.c:1572 #: ../xgnokii/xgnokii_speed.c:395 ../xgnokii/xgnokii_speed.c:590 #: ../xgnokii/xgnokii_xring.c:894 msgid "Import from file" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1598 ../xgnokii/xgnokii_contacts.c:2671 #: ../xgnokii/xgnokii_contacts.c:3172 ../xgnokii/xgnokii_logos.c:1576 #: ../xgnokii/xgnokii_speed.c:474 ../xgnokii/xgnokii_speed.c:594 #: ../xgnokii/xgnokii_xring.c:898 msgid "Export to file" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1614 msgid "Add call" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1626 msgid "Delete note" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1691 ../xgnokii/xgnokii_contacts.c:2290 #: ../xgnokii/xgnokii_contacts.c:2316 ../xgnokii/xgnokii_contacts.c:2979 #: ../xgnokii/xgnokii_contacts.c:3225 ../xgnokii/xgnokii_sms.c:1799 #: ../xgnokii/xgnokii_speed.c:190 ../xgnokii/xgnokii_speed.c:196 #: ../xgnokii/xgnokii_speed.c:256 ../xgnokii/xgnokii_speed.c:340 #: ../xgnokii/xgnokii_speed.c:624 #, c-format msgid "Error: %s: line %d: Can't allocate memory!\n" msgstr "Virhe: %s: rivillä %d: Muistia ei voida varata!\n" #: ../xgnokii/xgnokii_calendar.c:1720 ../xgnokii/xgnokii_sms.c:1833 msgid "couldn't allocate colour" msgstr "Väriä ei voitu varata" #: ../xgnokii/xgnokii_cfg.c:117 #, c-format msgid "WARNING: Can't allocate memory for config reading!\n" msgstr "VAROITUS: Muistia ei voitu varata asetusten lukemista varten!\n" #: ../xgnokii/xgnokii_cfg.c:211 #, c-format msgid "ERROR: Can't open file %s for writing!\n" msgstr "VIRHE: Tiedostoa %s ei voida avata kirjoittamista varten!\n" #: ../xgnokii/xgnokii_cfg.c:221 #, c-format msgid "ERROR: Can't allocate memory for config writing!\n" msgstr "" "VIRHE: Muistia ei voida varata asetustiedoston kirjoittamista varten!\n" #: ../xgnokii/xgnokii_cfg.c:226 #, c-format msgid "ERROR: Can't write config file!\n" msgstr "VIRHE: Asetustiedostoa ei voida kirjoittaa!\n" #: ../xgnokii/xgnokii_common.c:73 msgid "Error" msgstr "Virhe" #: ../xgnokii/xgnokii_common.c:110 msgid "Info" msgstr "Info" #: ../xgnokii/xgnokii_common.c:146 msgid "Yes" msgstr "" #: ../xgnokii/xgnokii_common.c:155 msgid "No" msgstr "" #: ../xgnokii/xgnokii_common.c:236 #, c-format msgid "Can't exec %s\n" msgstr "Ohjelmaa %s ei voitu suorittaa\n" #: ../xgnokii/xgnokii_contacts.c:143 #, c-format msgid "SIM: %d/%d%c Phone: %d/%d%c" msgstr "" #: ../xgnokii/xgnokii_contacts.c:317 ../xgnokii/xgnokii_contacts.c:337 msgid "Can't change memory type!" msgstr "Muistityyppiä ei voi vaihtaa!" #: ../xgnokii/xgnokii_contacts.c:383 #, c-format msgid "" "Phonebook name will be truncated to\n" "%.*s" msgstr "" "Puhelinluettelon nimi lyhennetään\n" "%.*s" #: ../xgnokii/xgnokii_contacts.c:611 msgid "Can't find pattern!" msgstr "Hakusanaa ei löydy!" #: ../xgnokii/xgnokii_contacts.c:707 ../xgnokii/xgnokii_contacts.c:794 #: ../xgnokii/xgnokii_contacts.c:939 ../xgnokii/xgnokii_contacts.c:981 #: ../xgnokii/xgnokii_contacts.c:1190 msgid "Mobile" msgstr "" #: ../xgnokii/xgnokii_contacts.c:737 ../xgnokii/xgnokii_contacts.c:809 #: ../xgnokii/xgnokii_contacts.c:944 ../xgnokii/xgnokii_contacts.c:986 #: ../xgnokii/xgnokii_contacts.c:1216 msgid "Postal" msgstr "" #: ../xgnokii/xgnokii_contacts.c:869 msgid "Edit subentries" msgstr "" #: ../xgnokii/xgnokii_contacts.c:894 msgid "Delete" msgstr "Poista" #: ../xgnokii/xgnokii_contacts.c:913 msgid "Number/Text:" msgstr "Numero/Teksti:" #: ../xgnokii/xgnokii_contacts.c:925 msgid "Type:" msgstr "" #: ../xgnokii/xgnokii_contacts.c:960 ../xgnokii/xgnokii_contacts.c:1356 #: ../xgnokii/xgnokii_contacts.c:3187 ../xgnokii/xgnokii_speed.c:601 msgid "Edit entry" msgstr "" #: ../xgnokii/xgnokii_contacts.c:1111 msgid "Numbers" msgstr "Numerot" #: ../xgnokii/xgnokii_contacts.c:1131 msgid "New" msgstr "" #: ../xgnokii/xgnokii_contacts.c:1315 msgid "Memory:" msgstr "" #: ../xgnokii/xgnokii_contacts.c:1319 msgid "phone" msgstr "" #: ../xgnokii/xgnokii_contacts.c:1336 msgid "Caller group:" msgstr "" #: ../xgnokii/xgnokii_contacts.c:1399 msgid "Delete entries" msgstr "" #: ../xgnokii/xgnokii_contacts.c:1431 msgid "Do you want to delete selected entries?" msgstr "" #: ../xgnokii/xgnokii_contacts.c:1449 ../xgnokii/xgnokii_contacts.c:3179 msgid "New entry" msgstr "" #: ../xgnokii/xgnokii_contacts.c:1493 ../xgnokii/xgnokii_contacts.c:3183 msgid "Duplicate entry" msgstr "" #: ../xgnokii/xgnokii_contacts.c:1562 ../xgnokii/xgnokii_contacts.c:1570 #: ../xgnokii/xgnokii_contacts.c:1598 msgid "Can't find free memory." msgstr "Vapaata muistia ei löydy." #: ../xgnokii/xgnokii_contacts.c:1635 msgid "Changing memory type" msgstr "" #: ../xgnokii/xgnokii_contacts.c:1642 msgid "Continue" msgstr "" #: ../xgnokii/xgnokii_contacts.c:1664 msgid "" "If you change from phone memory to SIM memory\n" "some entries may be truncated." msgstr "" #: ../xgnokii/xgnokii_contacts.c:1682 ../xgnokii/xgnokii_contacts.c:1688 msgid "Find" msgstr "" #: ../xgnokii/xgnokii_contacts.c:1714 msgid "Pattern:" msgstr "" #: ../xgnokii/xgnokii_contacts.c:1800 msgid "Dial pad" msgstr "" #: ../xgnokii/xgnokii_contacts.c:1806 msgid "Dial" msgstr "" #: ../xgnokii/xgnokii_contacts.c:2059 msgid "Phone memory..." msgstr "" #: ../xgnokii/xgnokii_contacts.c:2070 msgid "SIM memory..." msgstr "" #: ../xgnokii/xgnokii_contacts.c:2135 msgid "Saving entries" msgstr "" #: ../xgnokii/xgnokii_contacts.c:2150 ../xgnokii/xgnokii_contacts.c:2170 #, c-format msgid "%s: line %d: Can't write %s memory entry number %d! Error: %s\n" msgstr "" "%s: rivillä %d: %s kirjoittaminen muistipaikkaan %d epäonnistui! Virhe: %s\n" #: ../xgnokii/xgnokii_contacts.c:2192 msgid "Save changes?" msgstr "" #: ../xgnokii/xgnokii_contacts.c:2206 msgid "Don't save" msgstr "" #: ../xgnokii/xgnokii_contacts.c:2228 msgid "" "You have made changes in your\n" "contacts directory.\n" "\n" "\n" "Do you want to save these changes into your phone?\n" msgstr "" #: ../xgnokii/xgnokii_contacts.c:2420 msgid "Getting entries" msgstr "" #: ../xgnokii/xgnokii_contacts.c:2654 ../xgnokii/xgnokii_dtmf.c:166 #: ../xgnokii/xgnokii_logos.c:1350 ../xgnokii/xgnokii_speed.c:457 msgid "Overwrite file?" msgstr "" #: ../xgnokii/xgnokii_contacts.c:2655 ../xgnokii/xgnokii_dtmf.c:167 #: ../xgnokii/xgnokii_logos.c:1351 ../xgnokii/xgnokii_speed.c:458 #, c-format msgid "" "File %s already exists.\n" "Overwrite?" msgstr "" "Tiedosto %s on jo olemassa.\n" "Ylikirjoitetaanko?" #: ../xgnokii/xgnokii_contacts.c:2936 ../xgnokii/xgnokii_contacts.c:3120 msgid "Memory" msgstr "" #: ../xgnokii/xgnokii_contacts.c:2946 ../xgnokii/xgnokii_sms.c:1358 msgid "Select contacts" msgstr "" #: ../xgnokii/xgnokii_contacts.c:3090 msgid "/Edit/_New" msgstr "" #: ../xgnokii/xgnokii_contacts.c:3091 msgid "/Edit/D_uplicate" msgstr "" #: ../xgnokii/xgnokii_contacts.c:3092 ../xgnokii/xgnokii_speed.c:525 msgid "/Edit/_Edit" msgstr "" #: ../xgnokii/xgnokii_contacts.c:3094 ../xgnokii/xgnokii_logos.c:1487 msgid "/Edit/Sep3" msgstr "" #: ../xgnokii/xgnokii_contacts.c:3095 msgid "/Edit/_Change memory type" msgstr "" #: ../xgnokii/xgnokii_contacts.c:3097 msgid "/Edit/_Find" msgstr "" #: ../xgnokii/xgnokii_contacts.c:3098 msgid "/Edit/Find ne_xt" msgstr "" #: ../xgnokii/xgnokii_contacts.c:3099 msgid "/Edit/Sep5" msgstr "" #: ../xgnokii/xgnokii_contacts.c:3101 msgid "/_Dial" msgstr "" #: ../xgnokii/xgnokii_contacts.c:3102 msgid "/Dial/Dial _voice" msgstr "" #: ../xgnokii/xgnokii_contacts.c:3191 msgid "Delete entry" msgstr "" #: ../xgnokii/xgnokii_contacts.c:3198 msgid "Dial voice" msgstr "" #: ../xgnokii/xgnokii_data.c:52 #, c-format msgid "" "Data calls are currently\n" "Disabled\n" " " msgstr "" #: ../xgnokii/xgnokii_data.c:54 #, c-format msgid "" "Data calls are currently\n" "Enabled\n" " " msgstr "" #: ../xgnokii/xgnokii_data.c:102 msgid "Virtual Modem" msgstr "" #: ../xgnokii/xgnokii.desktop.in.h:1 msgid "Manage your mobile phone" msgstr "" #: ../xgnokii/xgnokii.desktop.in.h:2 msgid "Mobile Phone Suite" msgstr "Kännykkäohjelmisto" #: ../xgnokii/xgnokii.desktop.in.h:3 msgid "Xgnokii" msgstr "" #: ../xgnokii/xgnokii_dtmf.c:100 ../xgnokii/xgnokii_speed.c:351 #: ../xgnokii/xgnokii_speed.c:376 #, c-format msgid "Error reading file!" msgstr "Virhe luettaessa tiedostoa!" #: ../xgnokii/xgnokii_dtmf.c:116 msgid "Load" msgstr "" #: ../xgnokii/xgnokii_dtmf.c:220 ../xgnokii/xgnokii_logos.c:1475 #: ../xgnokii/xgnokii_xring.c:827 msgid "/File/_Open" msgstr "" #: ../xgnokii/xgnokii_dtmf.c:221 ../xgnokii/xgnokii_logos.c:1476 #: ../xgnokii/xgnokii_sms.c:1247 ../xgnokii/xgnokii_sms.c:1634 #: ../xgnokii/xgnokii_xring.c:828 msgid "/File/_Save" msgstr "" #: ../xgnokii/xgnokii_dtmf.c:247 msgid "Dial Tone" msgstr "" #: ../xgnokii/xgnokii_dtmf.c:312 msgid "Pause" msgstr "" #: ../xgnokii/xgnokii_dtmf.c:317 msgid "Wait" msgstr "" #: ../xgnokii/xgnokii_logos.c:972 #, c-format msgid "" "Error getting network info\n" "%s" msgstr "" "Virhe noudettaessa verkon tietoja\n" "%s" #: ../xgnokii/xgnokii_logos.c:1018 #, c-format msgid "" "Error getting bitmap\n" "%s" msgstr "" "Virhe kuvatiedoston noutamisessa\n" "%s" #: ../xgnokii/xgnokii_logos.c:1068 #, c-format msgid "" "Error setting bitmap\n" "%s" msgstr "" "Virhe kuvatiedoston tallettamisessa\n" "%s" #: ../xgnokii/xgnokii_logos.c:1323 ../xgnokii/xgnokii_xring.c:650 #: ../xgnokii/xgnokii_xring.c:693 #, c-format msgid "" "Error writing file\n" "%s" msgstr "" "Virhe tiedoston kirjoittamisessa\n" "%s" #: ../xgnokii/xgnokii_logos.c:1382 ../xgnokii/xgnokii_xring.c:613 #, c-format msgid "" "Error reading file\n" "%s" msgstr "" "Virhe tiedoston lukemisessa\n" "%s" #: ../xgnokii/xgnokii_logos.c:1409 msgid "Save logo as ..." msgstr "" #: ../xgnokii/xgnokii_logos.c:1434 msgid "Open logo..." msgstr "" #: ../xgnokii/xgnokii_logos.c:1477 ../xgnokii/xgnokii_xring.c:829 msgid "/File/Save _as ..." msgstr "" #: ../xgnokii/xgnokii_logos.c:1479 msgid "/File/_Get operator" msgstr "" #: ../xgnokii/xgnokii_logos.c:1480 msgid "/File/Get _logo" msgstr "" #: ../xgnokii/xgnokii_logos.c:1481 msgid "/File/Se_t logo" msgstr "" #: ../xgnokii/xgnokii_logos.c:1485 ../xgnokii/xgnokii_xring.c:838 msgid "/Edit/_Clear" msgstr "" #: ../xgnokii/xgnokii_logos.c:1486 msgid "/Edit/_Invert" msgstr "" #: ../xgnokii/xgnokii_logos.c:1488 msgid "/Edit/_Up logo" msgstr "" #: ../xgnokii/xgnokii_logos.c:1489 msgid "/Edit/_Down logo" msgstr "" #: ../xgnokii/xgnokii_logos.c:1490 msgid "/Edit/_Left logo" msgstr "" #: ../xgnokii/xgnokii_logos.c:1491 msgid "/Edit/_Right logo" msgstr "" #: ../xgnokii/xgnokii_logos.c:1493 msgid "/Edit/Flip _horizontal" msgstr "" #: ../xgnokii/xgnokii_logos.c:1494 msgid "/Edit/Flip _vertical" msgstr "" #: ../xgnokii/xgnokii_logos.c:1553 msgid "Clear logo" msgstr "" #: ../xgnokii/xgnokii_logos.c:1560 msgid "Get logo" msgstr "" #: ../xgnokii/xgnokii_logos.c:1565 msgid "Set logo" msgstr "" #: ../xgnokii/xgnokii_logos.c:1585 msgid "Startup logo" msgstr "" #: ../xgnokii/xgnokii_logos.c:1594 msgid "Operator logo" msgstr "" #: ../xgnokii/xgnokii_logos.c:1604 msgid "Caller logo" msgstr "" #: ../xgnokii/xgnokii_logos.c:1731 msgid "Brush tool" msgstr "" #: ../xgnokii/xgnokii_logos.c:1742 msgid "Line tool" msgstr "" #: ../xgnokii/xgnokii_logos.c:1752 msgid "Rectangle tool" msgstr "" #: ../xgnokii/xgnokii_logos.c:1762 msgid "Filled rectangle tool" msgstr "" #: ../xgnokii/xgnokii_logos.c:1771 msgid "Invert logo" msgstr "" #: ../xgnokii/xgnokii_logos.c:1776 msgid "Horizontal flip" msgstr "" #: ../xgnokii/xgnokii_logos.c:1781 msgid "Vertical flip" msgstr "" #: ../xgnokii/xgnokii_logos.c:1836 msgid "Load preview pixmap error, feature disabled." msgstr "" "Esikatselutiedoston lataaminen epäonnistui, toiminto ei ole käytettävissä." #: ../xgnokii/xgnokii_lowlevel.c:210 #, c-format msgid "Failed to open the phone. Quitting.\n" msgstr "Puhelimen avaus epäonnistui. Lopetetaan.\n" #. We have some misconfiguration: phone doesn't handle #. neither folders nor SIM #: ../xgnokii/xgnokii_lowlevel.c:403 #, c-format msgid "" "Misconfiguration detected: phone handles neither folders nor sim.\n" "Contact gnokii developers to fix the issue.\n" msgstr "" "Väärä konfigurointi havaittu: puhelin ei osaa käsitellä hakemistoja eikä SIM-" "korttia.\n" "Ota yhteyttä Gnokiin kehittäjiin asian korjaamiseksi.\n" #: ../xgnokii/xgnokii_lowlevel.c:481 #, c-format msgid "%s: line %d: Can't get memory entry number %d from memory %d! %d\n" msgstr "" "%s: rivillä %d: Muistipaikan numero %d haku muistista epäonnistui %d! %d\n" #: ../xgnokii/xgnokii_lowlevel.c:1249 msgid "Connecting..." msgstr "" #: ../xgnokii/xgnokii_lowlevel.c:1260 msgid "" "It has been reported that your phone is known to be broken by xgnokii.\n" "Exiting application to avoid breakage. If you want to take a risk and\n" "run xgnokii anyway, set:\n" "\n" "\tallow_breakage = 1\n" "\n" "in xgnokii section in your config file.\n" "See http://thread.gmane.org/gmane.linux.drivers.gnokii/3195 for details.\n" msgstr "" "xgnokiin on todettu joidenkin raporttien mukaan rikkovan puhelimesi.\n" "Poistitaan sovelluksesta rikkoutumisen välttämiseksi. Jos haluat riskeerata " "puhelimesi ja\n" "ajaa xgnokiita, aseta:\n" "\n" "\tallow_breakage = 1\n" "\n" "xgnokii-osioon konfigurointitiedostossa.\n" "Lue osoitteesta http://thread.gmane.org/gmane.linux.drivers.gnokii/3195 " "lisätietoja.\n" #: ../xgnokii/xgnokii_lowlevel.c:1397 msgid "Refreshing SMSes..." msgstr "" #: ../xgnokii/xgnokii_netmon.c:260 msgid "/_Tools" msgstr "" #: ../xgnokii/xgnokii_netmon.c:261 msgid "/Tools/Net monitor o_n" msgstr "" #: ../xgnokii/xgnokii_netmon.c:262 msgid "/Tools/Net monitor o_ff" msgstr "" #: ../xgnokii/xgnokii_netmon.c:354 ../xgnokii/xgnokii_netmon.c:357 msgid "Active cell" msgstr "" #: ../xgnokii/xgnokii_netmon.c:360 msgid "NCELL list I" msgstr "" #: ../xgnokii/xgnokii_netmon.c:363 msgid "NCELL list II" msgstr "" #: ../xgnokii/xgnokii_netmon.c:366 msgid "NCELL list III" msgstr "" #: ../xgnokii/xgnokii_netmon.c:369 msgid "Preferred/Denied networks" msgstr "" #: ../xgnokii/xgnokii_netmon.c:372 msgid "System information bits" msgstr "" #: ../xgnokii/xgnokii_netmon.c:375 msgid "TMSI, Paging, PLU" msgstr "" #: ../xgnokii/xgnokii_netmon.c:378 msgid "Cells info" msgstr "" #: ../xgnokii/xgnokii_netmon.c:381 msgid "DTX, Cipher, Hopping" msgstr "" #: ../xgnokii/xgnokii_netmon.c:392 msgid "Uplink DTX" msgstr "" #: ../xgnokii/xgnokii_netmon.c:395 msgid "BTS TEST" msgstr "" #: ../xgnokii/xgnokii_netmon.c:398 msgid "CELL BARR-Flag" msgstr "" #: ../xgnokii/xgnokii_netmon.c:401 msgid "Accumulator, Charge status" msgstr "" #: ../xgnokii/xgnokii_netmon.c:404 msgid "?Constant voltage charging display" msgstr "" #: ../xgnokii/xgnokii_netmon.c:407 msgid "?Battery full detection" msgstr "" #: ../xgnokii/xgnokii_netmon.c:410 msgid "Accumulator" msgstr "" #: ../xgnokii/xgnokii_netmon.c:413 msgid "SW-Resets" msgstr "" #: ../xgnokii/xgnokii_netmon.c:416 msgid "Reset-Counter" msgstr "" #: ../xgnokii/xgnokii_netmon.c:420 msgid "Cause codes for last connection abortion" msgstr "" #: ../xgnokii/xgnokii_netmon.c:431 msgid "Reset handover counters" msgstr "" #: ../xgnokii/xgnokii_netmon.c:434 msgid "Handover Counter" msgstr "" #: ../xgnokii/xgnokii_netmon.c:437 msgid "Handover Counter (Dual)" msgstr "" #: ../xgnokii/xgnokii_netmon.c:440 msgid "L2-Timeouts" msgstr "" #: ../xgnokii/xgnokii_netmon.c:443 msgid "SIM" msgstr "" #: ../xgnokii/xgnokii_netmon.c:446 msgid "?Block display 1" msgstr "" #: ../xgnokii/xgnokii_netmon.c:452 msgid "Memory status before reset" msgstr "" #: ../xgnokii/xgnokii_netmon.c:455 msgid "Reset Counters" msgstr "" #: ../xgnokii/xgnokii_netmon.c:459 msgid "Counter for PLMN Search and Cell reselection (Singleband)" msgstr "" #: ../xgnokii/xgnokii_netmon.c:470 msgid "Neighbourhood measurement" msgstr "" #: ../xgnokii/xgnokii_netmon.c:473 msgid "Calls" msgstr "" #: ../xgnokii/xgnokii_netmon.c:476 msgid "Temporary counters of DSP" msgstr "" #: ../xgnokii/xgnokii_netmon.c:480 msgid "Control of task information displays" msgstr "" #: ../xgnokii/xgnokii_netmon.c:483 msgid "Information about task numbers 0-7" msgstr "" #: ../xgnokii/xgnokii_netmon.c:487 msgid "Information about task numbers 8-15" msgstr "" #: ../xgnokii/xgnokii_netmon.c:491 msgid "Information about task numbers 16-23" msgstr "" #: ../xgnokii/xgnokii_netmon.c:494 msgid "Information about OS_SYSTEM_STACK" msgstr "" #: ../xgnokii/xgnokii_netmon.c:498 msgid "Information about current MCU and DSP software versions" msgstr "" #: ../xgnokii/xgnokii_netmon.c:501 msgid "Hardware version" msgstr "" #: ../xgnokii/xgnokii_netmon.c:520 msgid "Chan" msgstr "" #: ../xgnokii/xgnokii_netmon.c:521 msgid "RxLv" msgstr "" #: ../xgnokii/xgnokii_netmon.c:522 msgid "C1" msgstr "" #: ../xgnokii/xgnokii_netmon.c:523 msgid "C2" msgstr "" #: ../xgnokii/xgnokii_netmon.c:524 msgid "ACT" msgstr "" #: ../xgnokii/xgnokii_netmon.c:525 msgid "NC2" msgstr "" #: ../xgnokii/xgnokii_netmon.c:526 msgid "NC3" msgstr "" #: ../xgnokii/xgnokii_netmon.c:527 msgid "NC4" msgstr "" #: ../xgnokii/xgnokii_netmon.c:528 msgid "NC5" msgstr "" #: ../xgnokii/xgnokii_netmon.c:529 msgid "NC6" msgstr "" #: ../xgnokii/xgnokii_netmon.c:530 msgid "NC7" msgstr "" #: ../xgnokii/xgnokii_netmon.c:560 msgid "Page:" msgstr "" #: ../xgnokii/xgnokii_sms.c:250 ../xgnokii/xgnokii_sms.c:330 #: ../xgnokii/xgnokii_sms.c:444 msgid "read" msgstr "" #: ../xgnokii/xgnokii_sms.c:253 ../xgnokii/xgnokii_sms.c:333 #: ../xgnokii/xgnokii_sms.c:430 msgid "unread" msgstr "" #: ../xgnokii/xgnokii_sms.c:256 ../xgnokii/xgnokii_sms.c:336 msgid "sent" msgstr "" #: ../xgnokii/xgnokii_sms.c:259 ../xgnokii/xgnokii_sms.c:339 msgid "not sent" msgstr "" #: ../xgnokii/xgnokii_sms.c:302 msgid "read report" msgstr "" #: ../xgnokii/xgnokii_sms.c:305 msgid "unread report" msgstr "" #: ../xgnokii/xgnokii_sms.c:312 msgid "seen picture" msgstr "" #: ../xgnokii/xgnokii_sms.c:315 msgid "unseen picture" msgstr "" #: ../xgnokii/xgnokii_sms.c:318 msgid "sent picture" msgstr "" #: ../xgnokii/xgnokii_sms.c:321 msgid "not sent picture" msgstr "" #: ../xgnokii/xgnokii_sms.c:324 msgid "unknown picture" msgstr "" #: ../xgnokii/xgnokii_sms.c:349 #, c-format msgid "%02d/%02d/%04d %02d:%02d:%02d %c%02d00" msgstr "" #: ../xgnokii/xgnokii_sms.c:355 ../xgnokii/xgnokii_sms.c:360 #, c-format msgid "%02d/%02d/%04d %02d:%02d:%02d" msgstr "" #: ../xgnokii/xgnokii_sms.c:368 #, c-format msgid "Picture Message: %s" msgstr "" #: ../xgnokii/xgnokii_sms.c:461 msgid "From: " msgstr "Lähettäjä: " #: ../xgnokii/xgnokii_sms.c:466 msgid "Date: " msgstr "Päivämäärä: " #: ../xgnokii/xgnokii_sms.c:563 msgid "Delete SMS" msgstr "Poista SMS" #: ../xgnokii/xgnokii_sms.c:595 msgid "Do you want to delete selected SMS?" msgstr "Haluatko poistaa valitun SMSn?" #: ../xgnokii/xgnokii_sms.c:617 #, c-format msgid "Cannot open mailbox %s for appending!" msgstr "Laatikkoa %s ei voida avata lisäämistä varten!" #: ../xgnokii/xgnokii_sms.c:631 #, c-format msgid "" "Cannot save to mailbox %s.\n" "\\%s is locked for process %d!" msgstr "" "Laatikkoon %s ei voida tallentaa.\n" "\\%s laatikon on lukinnut prosessi %d!" #: ../xgnokii/xgnokii_sms.c:644 #, c-format msgid "Cannot lock mailbox %s!" msgstr "Laatikkoa %s ei voida lukita!" #: ../xgnokii/xgnokii_sms.c:699 #, c-format msgid "Cannot unlock mailbox %s!" msgstr "Laatikon %s lukitusta ei voida purkaa!" #: ../xgnokii/xgnokii_sms.c:747 msgid "Choose Mailbox File" msgstr "" #: ../xgnokii/xgnokii_sms.c:857 #, c-format msgid "" "Name: %s\n" "Number: %s\n" "Used: %d\n" msgstr "" #: ../xgnokii/xgnokii_sms.c:956 ../xgnokii/xgnokii_sms.c:1089 msgid "Address line contains illegal address!" msgstr "Osoiterivillä on epäkelpo osoite!" #: ../xgnokii/xgnokii_sms.c:1060 #, c-format msgid "" "Error sending SMS to %s\n" "%s" msgstr "" "Virhe SMSn lähttämisessä vastaanottajalle %s\n" "%s" #: ../xgnokii/xgnokii_sms.c:1066 #, c-format msgid "Message sent to: %s\n" msgstr "" #: ../xgnokii/xgnokii_sms.c:1153 ../xgnokii/xgnokii_sms.c:1185 #: ../xgnokii/xgnokii_sms.c:1211 #, c-format msgid "Sending SMS to %s (%d/%d) ...\n" msgstr "" #: ../xgnokii/xgnokii_sms.c:1246 msgid "/File/Sen_d" msgstr "" #: ../xgnokii/xgnokii_sms.c:1249 msgid "/File/Check _Names" msgstr "" #: ../xgnokii/xgnokii_sms.c:1250 msgid "/File/C_ontacts" msgstr "" #: ../xgnokii/xgnokii_sms.c:1310 msgid "Send message" msgstr "" #: ../xgnokii/xgnokii_sms.c:1314 msgid "Save message to outbox" msgstr "" #: ../xgnokii/xgnokii_sms.c:1321 msgid "Check names" msgstr "" #: ../xgnokii/xgnokii_sms.c:1334 msgid "To:" msgstr "" #: ../xgnokii/xgnokii_sms.c:1402 msgid "Delivery report" msgstr "" #: ../xgnokii/xgnokii_sms.c:1406 msgid "Send as Long SMS" msgstr "" #: ../xgnokii/xgnokii_sms.c:1410 msgid "SMS Center:" msgstr "" #: ../xgnokii/xgnokii_sms.c:1431 msgid "New Message" msgstr "" #: ../xgnokii/xgnokii_sms.c:1457 msgid "Forward Message" msgstr "" #: ../xgnokii/xgnokii_sms.c:1498 msgid "Reply Message" msgstr "" #: ../xgnokii/xgnokii_sms.c:1635 msgid "/File/Save to mailbo_x" msgstr "" #: ../xgnokii/xgnokii_sms.c:1636 msgid "/File/Save to _file" msgstr "" #: ../xgnokii/xgnokii_sms.c:1639 msgid "/_Messages" msgstr "" #: ../xgnokii/xgnokii_sms.c:1640 msgid "/_Messages/_Activate SMS reading" msgstr "" #: ../xgnokii/xgnokii_sms.c:1641 msgid "/_Messages/_New" msgstr "" #: ../xgnokii/xgnokii_sms.c:1642 msgid "/_Messages/_Forward" msgstr "" #: ../xgnokii/xgnokii_sms.c:1643 msgid "/_Messages/_Reply" msgstr "" #: ../xgnokii/xgnokii_sms.c:1644 msgid "/_Messages/_Delete" msgstr "" #: ../xgnokii/xgnokii_sms.c:1645 msgid "/Messages/Sep3" msgstr "" #: ../xgnokii/xgnokii_sms.c:1646 msgid "/_Messages/_Business card" msgstr "" #: ../xgnokii/xgnokii_sms.c:1666 msgid "Status" msgstr "" #: ../xgnokii/xgnokii_sms.c:1666 msgid "Date / Time" msgstr "" #: ../xgnokii/xgnokii_sms.c:1666 msgid "Sender" msgstr "" #: ../xgnokii/xgnokii_sms.c:1666 msgid "Message" msgstr "" #: ../xgnokii/xgnokii_sms.c:1703 msgid "New message" msgstr "" #: ../xgnokii/xgnokii_sms.c:1707 msgid "Forward message" msgstr "" #: ../xgnokii/xgnokii_sms.c:1711 msgid "Reply message" msgstr "" #: ../xgnokii/xgnokii_sms.c:1723 msgid "Delete message" msgstr "" #: ../xgnokii/xgnokii_sms.c:1748 msgid "SMS's" msgstr "" #: ../xgnokii/xgnokii_speed.c:181 msgid "Reading data ..." msgstr "" #: ../xgnokii/xgnokii_speed.c:207 #, c-format msgid "Cannot read speed dial key %d!\n" msgstr "Pikavalinnan %d asetusta ei voida lukea!\n" #: ../xgnokii/xgnokii_speed.c:268 #, c-format msgid "Error writing speed dial for key %d!\n" msgstr "Virhe pikavalinnan asettamisessa näppäimelle %d!\n" #: ../xgnokii/xgnokii_speed.c:542 msgid "Key" msgstr "" #: ../xgnokii/xgnokii_xkeyb.c:180 msgid "Cannot load background pixmap!" msgstr "Taustakuvan lataus epäonnistui!" #: ../xgnokii/xgnokii_xkeyb.c:253 msgid "XGnokii Keyboard" msgstr "" #: ../xgnokii/xgnokii_xring.c:404 #, c-format msgid "User #%d (%s)" msgstr "" #: ../xgnokii/xgnokii_xring.c:423 #, c-format msgid "User #%d (*EMPTY*)" msgstr "" #: ../xgnokii/xgnokii_xring.c:628 msgid "Open ringtone..." msgstr "" #: ../xgnokii/xgnokii_xring.c:670 msgid "Save ringtone as..." msgstr "" #: ../xgnokii/xgnokii_xring.c:736 #, c-format msgid "Empty ringtone list" msgstr "" #: ../xgnokii/xgnokii_xring.c:746 #, c-format msgid "" "Error getting ringtone\n" "%s" msgstr "" "Virhe noudettaessa soittoääntä\n" "%s" #: ../xgnokii/xgnokii_xring.c:763 #, c-format msgid "" "Error setting ringtone\n" "%s" msgstr "" "Virhe soittoäänen tallettamisessa\n" "%s" #: ../xgnokii/xgnokii_xring.c:782 #, c-format msgid "" "Error deleting ringtone\n" "%s" msgstr "" "Virhe soittoäänen poistamisessa\n" "%s" #: ../xgnokii/xgnokii_xring.c:830 msgid "/File/S1" msgstr "" #: ../xgnokii/xgnokii_xring.c:831 msgid "/File/_Get ringtone" msgstr "" #: ../xgnokii/xgnokii_xring.c:832 msgid "/File/Se_t ringtone" msgstr "" #: ../xgnokii/xgnokii_xring.c:833 msgid "/File/Delete ringtone" msgstr "" #: ../xgnokii/xgnokii_xring.c:834 msgid "/File/_Play" msgstr "" #: ../xgnokii/xgnokii_xring.c:835 msgid "/File/S2" msgstr "" #: ../xgnokii/xgnokii_xring.c:874 msgid "Clear ringtone" msgstr "" #: ../xgnokii/xgnokii_xring.c:880 msgid "Get ringtone" msgstr "" #: ../xgnokii/xgnokii_xring.c:884 msgid "Set ringtone" msgstr "" #: ../xgnokii/xgnokii_xring.c:888 msgid "Delete ringtone" msgstr "" #: ../xgnokii/xgnokii_xring.c:904 msgid "Play" msgstr "" #: ../xgnokii/xgnokii_xring.c:913 msgid "Select ringtone" msgstr "" #: ../xgnokii/xgnokii_xring.c:918 #, fuzzy msgid "Ringtone name" msgstr " Vastapuolen numero: %s\n" #: ../xgnokii/xgnokii_xring.c:930 msgid "Set tempo" msgstr "" #~ msgid "ERROR: Can't find HOME environment variable!\n" #~ msgstr "VIRHE: Ympäristömuuttujaa HOME ei löydy!\n" #~ msgid "WARNING: Can't find HOME environment variable!\n" #~ msgstr "VIRHE: Ympäristömuuttujaa HOME ei löydy!\n" #, fuzzy #~ msgid "GetMMS %s %d failed! (%s)\n" #~ msgstr "GetSMS %s %d epäonnistui! (%s)\n" #, fuzzy #~ msgid "Deleted MMS %s %d\n" #~ msgstr "SMS poistettu %s %d\n" #, fuzzy #~ msgid "" #~ "DeleteMMS %s %d failed!(%s)\n" #~ "\n" #~ msgstr "" #~ "DeleteSMS %s %d epäonnistui!(%s)\n" #~ "\n" #~ msgid "Deleted SMS %s %d\n" #~ msgstr "SMS poistettu %s %d\n" #, fuzzy #~ msgid "" #~ "Deleting SMS %s %d failed!(%s)\n" #~ "\n" #~ msgstr "" #~ "DeleteSMS %s %d epäonnistui!(%s)\n" #~ "\n" #~ msgid "Couldn't read config.\n" #~ msgstr "Konfigurointitiedostoa ei voitu lukea.\n" #~ msgid "Write error!\n" #~ msgstr "Kirjoittaminen epäonnistui!\n" #~ msgid "Read ack error!\n" #~ msgstr "Lukemisen kuittaus epäonnistui!\n" #~ msgid "%s\n" #~ msgstr "%s\n" #~ msgid "Orphaned line: %s\n" #~ msgstr "Orpo rivi: %s\n" #~ msgid "Cannot lock NULL device.\n" #~ msgstr "NULL-laitetta ei voi lukita.\n" gnokii-0.6.31/po/de.po0000644000175000017500000052774211666163120012572 0ustar leoleo# This is the German locale definition for Gnokii. # Copyright (C) Daniel Egger , 1999, 2000. # # Markus Plail , 2002. # Carsten Grohmann , 2009, 2011. msgid "" msgstr "" "Project-Id-Version: gnokii 0.6.28\n" "Report-Msgid-Bugs-To: feedback@gnokii.org\n" "POT-Creation-Date: 2011-12-01 21:36+0100\n" "PO-Revision-Date: 2011-07-24 18:20+0200\n" "Last-Translator: Carsten Grohmann \n" "Language-Team: German \n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Lokalize 1.2\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" #. Line not part of any heading #: ../common/cfgreader.c:458 #, c-format msgid "" "Orphaned line: %s\n" "If in doubt place this line into [global] section.\n" msgstr "" "Verwaiste Zeile: %s\n" "Diese Zeile im Zweifel im Abschnitt [global] plazieren.\n" #: ../common/cfgreader.c:732 ../common/cfgreader.c:962 #, c-format msgid "No %s section in the config file.\n" msgstr "Kein Abschnitt %s in der Konfigurationsdatei.\n" #: ../common/cfgreader.c:738 ../common/cfgreader.c:744 #: ../common/cfgreader.c:750 #, c-format msgid "You need to define '%s' in the config file.\n" msgstr "Sie müssen '%s' in der Konfigurationsdatei definieren.\n" #: ../common/cfgreader.c:755 ../common/cfgreader.c:768 #: ../common/cfgreader.c:777 ../common/cfgreader.c:785 #: ../common/cfgreader.c:797 ../common/cfgreader.c:806 #: ../common/cfgreader.c:814 ../common/cfgreader.c:824 #: ../common/cfgreader.c:842 ../common/cfgreader.c:850 #: ../common/cfgreader.c:871 ../common/cfgreader.c:980 #, c-format msgid "Unsupported [%s] %s value \"%s\"\n" msgstr "Nicht unterstützter [%s] %s Wert \"%s\"\n" #: ../common/cfgreader.c:769 ../common/cfgreader.c:778 #: ../common/cfgreader.c:786 ../common/cfgreader.c:807 #: ../common/cfgreader.c:815 ../common/cfgreader.c:825 #: ../common/cfgreader.c:843 ../common/cfgreader.c:851 #, c-format msgid "Assuming: %d\n" msgstr "Angenommen: %d\n" #: ../common/cfgreader.c:798 ../common/cfgreader.c:872 #: ../common/cfgreader.c:981 #, c-format msgid "Use either \"%s\" or \"%s\".\n" msgstr "Nutze entweder \"%s\" oder \"%s\".\n" #: ../common/cfgreader.c:799 ../common/cfgreader.c:873 #: ../common/cfgreader.c:982 #, c-format msgid "Assuming: %s\n" msgstr "Angenommen: %s\n" #: ../common/cfgreader.c:1172 #, c-format msgid "Couldn't read %s config file.\n" msgstr "Konnte Konfigurationdatei %s nicht lesen\n" #: ../common/cfgreader.c:1187 #, c-format msgid "Failed to initialize libgnokii.\n" msgstr "Initialisierung von libgnokii fehlgeschlagen.\n" #: ../common/cfgreader.c:1192 #, c-format msgid "Couldn't open a config file or memory.\n" msgstr "Konnte Konfigurationsdatei oder -speicher nicht lesen.\n" #: ../common/cfgreader.c:1282 #, c-format msgid "Config error - no model specified.\n" msgstr "Konfigurationsfehler - kein Modell angegeben.\n" #: ../common/cfgreader.c:1286 #, c-format msgid "Config error - no port specified.\n" msgstr "Konfigurationsfehler - Keine Schnittstelle angegeben.\n" #: ../common/data/virtmodem.c:144 #, c-format msgid "gn_vm_initialise - VM_GSMInitialise failed!\n" msgstr "gn_vm_initialise - VM_GSMInitialise fehlgeschlagen!\n" #: ../common/data/virtmodem.c:151 #, c-format msgid "gn_vm_initialise - VM_PtySetup failed!\n" msgstr "gn_vm_initialise - VM_PtySetup fehlgeschlagen!\n" #: ../common/data/virtmodem.c:156 #, c-format msgid "gn_vm_initialise - gn_atem_initialise failed!\n" msgstr "gn_vm_initialise - gn_atem_initialise fehlgeschlagen!\n" #: ../common/data/virtmodem.c:161 #, c-format msgid "gn_vm_initialise - dp_Initialise failed!\n" msgstr "gn_vm_Initialise - dp_Initialise fehlgeschlagen!\n" #: ../common/data/virtmodem.c:365 #, c-format msgid "Cannot access %s, check the bindir in your config file!\n" msgstr "" "Kann nicht auf %s zugreifen, prüfen Sie \"bindir\" in Ihrer " "Konfigurationsdatei!\n" #: ../common/data/virtmodem.c:372 ../utils/mgnokiidev.c:186 #, c-format msgid "Couldn't open pty!\n" msgstr "Konnte pty nicht öffnen!\n" #: ../common/data/virtmodem.c:389 ../gnokii/gnokii-other.c:78 #: ../smsd/lowlevel.c:124 ../xgnokii/xgnokii_lowlevel.c:200 #, c-format msgid "GSM/FBUS init failed! (Unknown model?). Quitting.\n" msgstr "" "GSM/FBUS Initialisierung fehlgeschlagen! (Unbekanntes Modell?). Beende.\n" #: ../common/devices/tcp.c:80 msgid "Gnokii tcp_open: socket()" msgstr "Gnokii tcp_open: socket()" #: ../common/devices/tcp.c:89 #, c-format msgid "Gnokii tcp_open: colon (':') not found in connect strings \"%s\"!\n" msgstr "" "Gnokii tcp_open: Doppelpunkt (':') nicht in den Verbindungsparameters \"%s\" " "gefunden!\n" #: ../common/devices/tcp.c:97 #, c-format msgid "Gnokii tcp_open: Port string \"%s\" not valid for IPv4 connection!\n" msgstr "" "Gnokii tcp_open: Ungültige Angabe des Ports \"%s\" für IPv4-Verbindungen!\n" #: ../common/devices/tcp.c:101 #, c-format msgid "Gnokii tcp_open: Unknown host \"%s\"!\n" msgstr "Gnokii tcp_open: Unbekannter Rechner \"%s\"!\n" #: ../common/devices/tcp.c:105 #, c-format msgid "Gnokii tcp_open: Address resolve for host \"%s\" not compatible!\n" msgstr "" "Gnokii tcp_open: Aufgelöste Adresse des Hosts \"%s\" ist nicht kompatibel!\n" #: ../common/devices/tcp.c:115 msgid "Gnokii tcp_open: connect()" msgstr "Gnokii tcp_open: connect()" #: ../common/devices/tcp.c:127 #, c-format msgid "Gnokii tcp_close: disconnect_script\n" msgstr "Gnokii tcp_close: disconnect_script\n" #: ../common/devices/tcp.c:150 #, c-format msgid "Gnokii tcp_opendevice: connect_script\n" msgstr "Gnokii tcp_opendevice: connect_script\n" #: ../common/devices/tcp.c:160 msgid "Gnokii tcp_opendevice: fcntl(F_SETOWN)" msgstr "Gnokii tcp_opendevice: fcntl(F_SETOWN)" #: ../common/devices/tcp.c:183 msgid "Gnokii tcp_opendevice: fcntl(F_SETFL)" msgstr "Gnokii tcp_opendevice: fcntl(F_SETFL)" #: ../common/devices/unixbluetooth.c:497 #, c-format msgid "Invalid bluetooth address \"%s\"\n" msgstr "Ungültige Bluetooth-Adresse \"%s\"\n" #: ../common/devices/unixbluetooth.c:502 msgid "Can't create socket" msgstr "Kann keinen Socket erzeugen" #: ../common/devices/unixbluetooth.c:521 #, c-format msgid "" "Cannot find any appropriate rfcomm channel and none was specified in the " "config.\n" msgstr "" "Kann keinen passenden Rfcomm-Kanal finden und es war keiner in der " "Konfiguration angegeben.\n" #: ../common/devices/unixbluetooth.c:530 msgid "Can't connect" msgstr "Kann nicht verbinden" #: ../common/devices/unixirda.c:150 #, c-format msgid "Virtual IrCOMM device unsupported under Linux\n" msgstr "Das virtuelle IrCOMM-Gerätdevice wird unter Linux nicht unterstützt\n" #: ../common/devices/unixserial.c:117 #, c-format msgid "device_script(\"%s\"): fork() failure: %s!\n" msgstr "device_script(\"%s\"): fork() fehlgeschlagen: %s!\n" #: ../common/devices/unixserial.c:124 #, c-format msgid "device_script(\"%s\"): file descriptor preparation failure: %s\n" msgstr "" "device_script(\"%s\"): Vorbereiten eines \"File Descriptor\" fehlgeschlagen: " "%s\n" #: ../common/devices/unixserial.c:130 #, c-format msgid "device_script(\"%s\"): script execution failure: %s\n" msgstr "" "device_script(\"%s\"): Ausführung eines Skriptes ist fehlgeschlagen: %s\n" #: ../common/devices/unixserial.c:137 #, c-format msgid "" "device_script(\"%s\"): child script execution failure: %s, exit code=%d\n" msgstr "" "device_script(\"%s\"): child script execution failure: %s, Rückgabewert=%d\n" #: ../common/devices/unixserial.c:138 msgid "normal exit" msgstr "ohne Fehler beendet" #: ../common/devices/unixserial.c:138 msgid "abnormal exit" msgstr "mit Fehler beendet" #: ../common/devices/unixserial.c:394 #, c-format msgid "Serial port speed %d not supported!\n" msgstr "Geschwindigkeit %d der seriellen Schnittstelle nicht unterstützt!\n" #: ../common/devices/unixserial.c:434 #, c-format msgid "ERROR: Modem DCD is down and global/require_dcd parameter is set!\n" msgstr "" "FEHLER: DCD des Modems ist inaktiv, aber global/require_dcd Parameter ist " "gesetzt.\n" #: ../common/devices/winbluetooth.c:70 ../common/devices/winirda.c:113 #, c-format msgid "Failed to initialize socket subsystem: need WINSOCK2. Please upgrade.\n" msgstr "" "Initialisierung des Socket-Subsystems fehlgeschlagen: WINSOCK2 wird " "benötigt. Bitte aktualisieren.\n" #: ../common/gsm-common.c:148 msgid "Internal memory" msgstr "Interner Speicher" #: ../common/gsm-common.c:149 msgid "SIM card" msgstr "SIM-Karte" #: ../common/gsm-common.c:150 msgid "Fixed dial numbers" msgstr "Fest eingetragene Rufnummern" #: ../common/gsm-common.c:151 msgid "Own numbers" msgstr "Eigene Nummern" #: ../common/gsm-common.c:152 msgid "Emergency numbers" msgstr "Notrufnummern" #: ../common/gsm-common.c:153 msgid "Dialled numbers" msgstr "Angerufene Nummern" #: ../common/gsm-common.c:154 msgid "Received numbers" msgstr "Empfangene Nummern" #: ../common/gsm-common.c:155 msgid "Missed numbers" msgstr "Fehlende Nummern" #: ../common/gsm-common.c:156 msgid "Last dialled" msgstr "Zuletzt gewählt" #: ../common/gsm-common.c:157 msgid "Barred dialling numbers" msgstr "Gesperrte Nummern" #: ../common/gsm-common.c:158 msgid "Service dialling numbers" msgstr "Servicerufnummern" #: ../common/gsm-common.c:159 msgid "Combined ME and SIM phonebook" msgstr "Kombiniertes ME-und SIM-Telefonbuch" #: ../common/gsm-common.c:160 msgid "Computer memory" msgstr "Computerspeicher" #: ../common/gsm-common.c:161 msgid "Currently selected memory" msgstr "Aktuell ausgewählter Speicher" #: ../common/gsm-common.c:162 msgid "SMS Inbox" msgstr "SMS-Eingang" #: ../common/gsm-common.c:163 msgid "SMS Outbox, sent items" msgstr "SMS-Ausgang, gesendete Objekte" #: ../common/gsm-common.c:164 msgid "SMS Archive" msgstr "SMS-Archiv" #: ../common/gsm-common.c:165 msgid "SMS Templates" msgstr "SMS-Vorlagen" #: ../common/gsm-common.c:166 msgid "SMS Status Reports" msgstr "SMS-Statusreport" #: ../common/gsm-common.c:167 msgid "SMS Drafts" msgstr "SMS-Entwürfe" #: ../common/gsm-common.c:168 msgid "SMS Outbox, items to be sent" msgstr "SMS-Ausgang, noch nicht gesendete Objekte" #: ../common/gsm-common.c:169 msgid "SMS Folder 1" msgstr "SMS-Ordner 1" #: ../common/gsm-common.c:170 msgid "SMS Folder 2" msgstr "SMS-Ordner 2" #: ../common/gsm-common.c:171 msgid "SMS Folder 3" msgstr "SMS-Ordner 3" #: ../common/gsm-common.c:172 msgid "SMS Folder 4" msgstr "SMS-Ordner 4" #: ../common/gsm-common.c:173 msgid "SMS Folder 5" msgstr "SMS-Ordner 5" #: ../common/gsm-common.c:174 msgid "SMS Folder 6" msgstr "SMS-Ordner 6" #: ../common/gsm-common.c:175 msgid "SMS Folder 7" msgstr "SMS-Ordner 7" #: ../common/gsm-common.c:176 msgid "SMS Folder 8" msgstr "SMS-Ordner 8" #: ../common/gsm-common.c:177 msgid "SMS Folder 9" msgstr "SMS-Ordner 9" #: ../common/gsm-common.c:178 msgid "SMS Folder 10" msgstr "SMS-Ordner 10" #: ../common/gsm-common.c:179 msgid "SMS Folder 11" msgstr "SMS-Ordner 11" #: ../common/gsm-common.c:180 msgid "SMS Folder 12" msgstr "SMS-Ordner 12" #: ../common/gsm-common.c:181 msgid "SMS Folder 13" msgstr "SMS-Ordner 13" #: ../common/gsm-common.c:182 msgid "SMS Folder 14" msgstr "SMS-Ordner 14" #: ../common/gsm-common.c:183 msgid "SMS Folder 15" msgstr "SMS-Ordner 15" #: ../common/gsm-common.c:184 msgid "SMS Folder 16" msgstr "SMS-Ordner 16" #: ../common/gsm-common.c:185 msgid "SMS Folder 17" msgstr "SMS-Ordner 17" #: ../common/gsm-common.c:186 msgid "SMS Folder 18" msgstr "SMS-Ordner 18" #: ../common/gsm-common.c:187 msgid "SMS Folder 19" msgstr "SMS-Ordner 19" #: ../common/gsm-common.c:188 msgid "SMS Folder 20" msgstr "SMS-Ordner 20" #: ../common/gsm-common.c:189 msgid "Cell Broadcast" msgstr "" #: ../common/gsm-common.c:190 ../common/gsm-common.c:211 #: ../common/gsm-common.c:222 ../common/gsm-common.c:235 #: ../common/gsm-common.c:290 ../common/gsm-common.c:343 #: ../common/gsm-common.c:356 ../common/gsm-common.c:380 #: ../common/gsm-common.c:381 ../common/gsm-common.c:398 #: ../common/gsm-common.c:409 ../common/gsm-common.c:424 #: ../common/gsm-common.c:437 ../common/gsm-common.c:451 #: ../common/gsm-common.c:464 ../common/gsm-common.c:474 #: ../common/gsm-common.c:485 ../common/gsm-common.c:494 #: ../common/gsm-common.c:505 ../common/gsm-common.c:514 #: ../common/gsm-common.c:524 ../common/gsm-common.c:533 #: ../common/gsm-common.c:542 ../common/gsm-common.c:556 #: ../common/gsm-common.c:565 ../common/gsm-common.c:574 #: ../common/gsm-common.c:587 ../common/gsm-common.c:598 #: ../common/gsm-common.c:610 ../common/gsm-common.c:624 #: ../common/gsm-common.c:635 ../common/gsm-common.c:647 #: ../common/gsm-sms.c:409 ../common/libfunctions.c:219 #: ../common/phones/atgen.c:2695 ../common/phones/atgen.c:2702 #: ../common/phones/atgen.c:3183 ../common/phones/nk6100.c:4087 #: ../gnokii/gnokii-ringtone.c:90 ../xgnokii/xgnokii_calendar.c:187 #: ../xgnokii/xgnokii_contacts.c:765 ../xgnokii/xgnokii_contacts.c:821 #: ../xgnokii/xgnokii_contacts.c:948 ../xgnokii/xgnokii_contacts.c:990 #: ../xgnokii/xgnokii_contacts.c:1206 ../xgnokii/xgnokii_contacts.c:1230 #, c-format msgid "Unknown" msgstr "Unbekannt" #: ../common/gsm-common.c:197 ../common/gsm-common.c:234 #: ../common/gsm-common.c:355 msgid "None" msgstr "Nichts" #: ../common/gsm-common.c:198 msgid "Serial" msgstr "Seriell" #: ../common/gsm-common.c:199 msgid "Serial DAU9P" msgstr "Seriell DAU9P" #: ../common/gsm-common.c:200 msgid "Serial DLR3P" msgstr "Seriell DLR3P" #: ../common/gsm-common.c:201 msgid "Infrared (old Nokias)" msgstr "Infrarot (alte Nokias)" #: ../common/gsm-common.c:202 msgid "IrDA" msgstr "IrDA" #: ../common/gsm-common.c:203 msgid "Bluetooth" msgstr "Bluetooth" #: ../common/gsm-common.c:204 msgid "Tekram Ir-Dongle" msgstr "Tekram Ir-Dongle" #: ../common/gsm-common.c:205 msgid "TCP" msgstr "TCP" #: ../common/gsm-common.c:206 msgid "M2BUS" msgstr "M2BUS" #: ../common/gsm-common.c:207 msgid "DKU2 (kernel support)" msgstr "DKU2 (Unterstützung durch den Kernel)" #: ../common/gsm-common.c:208 msgid "DKU2 (libusb support)" msgstr "DKU2 (Unterstützung durch libusb)" #: ../common/gsm-common.c:209 #, fuzzy msgid "Smart Card reader (libpcsclite support)" msgstr "Kartenlesegerät (Unterstützung durch libpcsc)" #: ../common/gsm-common.c:210 msgid "Linux Phonet (kernel support)" msgstr "Linux Phonet (Unterstützung durch den Kernel)" #: ../common/gsm-common.c:218 msgid "AC-DC" msgstr "AC-DC" #: ../common/gsm-common.c:219 msgid "Battery" msgstr "Batterie" #: ../common/gsm-common.c:220 msgid "No battery" msgstr "Keine Batterie" #: ../common/gsm-common.c:221 msgid "Power fault" msgstr "Stromausfall" #: ../common/gsm-common.c:229 msgid "Security code" msgstr "Sicherheitscode" #: ../common/gsm-common.c:230 msgid "PIN" msgstr "PIN" #: ../common/gsm-common.c:231 msgid "PIN2" msgstr "PIN2" #: ../common/gsm-common.c:232 msgid "PUK" msgstr "PUK" #: ../common/gsm-common.c:233 msgid "PUK2" msgstr "PUK2" #: ../common/gsm-common.c:244 ../common/gsm-common.c:245 #: ../common/gsm-common.c:250 msgid "General number" msgstr "Allgemeine Nummer" #: ../common/gsm-common.c:246 msgid "Home number" msgstr "Privat" #: ../common/gsm-common.c:247 msgid "Mobile number" msgstr "Handy" #: ../common/gsm-common.c:248 msgid "Fax number" msgstr "Fax" #: ../common/gsm-common.c:249 msgid "Work number" msgstr "Dienstlich" #: ../common/gsm-common.c:251 ../common/gsm-common.c:340 msgid "Unknown number" msgstr "Unbekannte Nummer" #: ../common/gsm-common.c:258 ../gnokii/gnokii-phonebook.c:187 #: ../gnokii/gnokii-wap.c:89 ../gnokii/gnokii-wap.c:220 #: ../xgnokii/xgnokii_contacts.c:749 ../xgnokii/xgnokii_contacts.c:815 #: ../xgnokii/xgnokii_contacts.c:946 ../xgnokii/xgnokii_contacts.c:988 #: ../xgnokii/xgnokii_contacts.c:1224 ../xgnokii/xgnokii_contacts.c:1729 #: ../xgnokii/xgnokii_contacts.c:2936 ../xgnokii/xgnokii_contacts.c:3120 #: ../xgnokii/xgnokii_speed.c:542 msgid "Name" msgstr "Name" #: ../common/gsm-common.c:259 ../common/gsm-common.c:422 #: ../xgnokii/xgnokii.c:542 ../xgnokii/xgnokii.c:1433 #: ../xgnokii/xgnokii_contacts.c:743 ../xgnokii/xgnokii_contacts.c:812 #: ../xgnokii/xgnokii_contacts.c:945 ../xgnokii/xgnokii_contacts.c:987 #: ../xgnokii/xgnokii_contacts.c:1220 msgid "Email" msgstr "E-Mail" #: ../common/gsm-common.c:260 ../common/gsm-common.c:277 msgid "Postal address" msgstr "Postadresse" #: ../common/gsm-common.c:261 ../xgnokii/xgnokii_contacts.c:731 #: ../xgnokii/xgnokii_contacts.c:806 ../xgnokii/xgnokii_contacts.c:943 #: ../xgnokii/xgnokii_contacts.c:985 ../xgnokii/xgnokii_contacts.c:1026 #: ../xgnokii/xgnokii_contacts.c:1212 msgid "Note" msgstr "Notiz" #: ../common/gsm-common.c:262 ../gnokii/gnokii-dial.c:376 #: ../gnokii/gnokii-phonebook.c:203 ../gnokii/gnokii-wap.c:231 #: ../xgnokii/xgnokii_calendar.c:1540 ../xgnokii/xgnokii_contacts.c:1737 #: ../xgnokii/xgnokii_contacts.c:2936 ../xgnokii/xgnokii_contacts.c:3120 #: ../xgnokii/xgnokii_speed.c:542 msgid "Number" msgstr "Nummer" #: ../common/gsm-common.c:263 ../common/gsm-common.c:272 #: ../common/gsm-common.c:367 ../xgnokii/xgnokii.c:1142 #: ../xgnokii/xgnokii_xring.c:845 msgid "Ringtone" msgstr "Rufton" #: ../common/gsm-common.c:264 msgid "Date" msgstr "Datum" #: ../common/gsm-common.c:265 msgid "Pointer" msgstr "Zeiger" #: ../common/gsm-common.c:266 ../common/gsm-common.c:369 msgid "Logo" msgstr "Logo" #: ../common/gsm-common.c:267 msgid "Logo switch" msgstr "Logo wechseln" #: ../common/gsm-common.c:268 ../xgnokii/xgnokii_contacts.c:2936 #: ../xgnokii/xgnokii_contacts.c:3120 msgid "Group" msgstr "Gruppe" #: ../common/gsm-common.c:269 ../gnokii/gnokii-wap.c:90 #: ../xgnokii/xgnokii_contacts.c:758 ../xgnokii/xgnokii_contacts.c:818 #: ../xgnokii/xgnokii_contacts.c:947 ../xgnokii/xgnokii_contacts.c:989 #: ../xgnokii/xgnokii_contacts.c:1227 msgid "URL" msgstr "URL" #: ../common/gsm-common.c:270 ../gnokii/gnokii-calendar.c:206 #: ../xgnokii/xgnokii_calendar.c:1541 msgid "Location" msgstr "Standort" #: ../common/gsm-common.c:271 msgid "Image" msgstr "Bild" #: ../common/gsm-common.c:273 msgid "User ID" msgstr "Benutzer-ID" #: ../common/gsm-common.c:274 msgid "Push-To-Talk address" msgstr "Push-To-Talk-Adresse" #: ../common/gsm-common.c:275 msgid "First name" msgstr "Vorname" #: ../common/gsm-common.c:276 msgid "Last name" msgstr "Nachname" #: ../common/gsm-common.c:278 ../gnokii/gnokii-phonebook.c:212 msgid "Extended address" msgstr "Erweitere Adresse" #: ../common/gsm-common.c:279 ../gnokii/gnokii-phonebook.c:214 msgid "Street" msgstr "Straße" #: ../common/gsm-common.c:280 ../gnokii/gnokii-phonebook.c:216 msgid "City" msgstr "Stadt" #: ../common/gsm-common.c:281 ../gnokii/gnokii-phonebook.c:218 msgid "State or province" msgstr "Bundesland" #: ../common/gsm-common.c:282 ../gnokii/gnokii-phonebook.c:220 msgid "Zip code" msgstr "Postleitzahl" #: ../common/gsm-common.c:283 ../gnokii/gnokii-phonebook.c:222 msgid "Country" msgstr "Staat" #: ../common/gsm-common.c:284 msgid "Formal name" msgstr "Vollständiger Name" #: ../common/gsm-common.c:285 msgid "Job title" msgstr "Berufsbezeichnung" #: ../common/gsm-common.c:286 msgid "Company" msgstr "Firma" #: ../common/gsm-common.c:287 msgid "Nickname" msgstr "Spitzname" #: ../common/gsm-common.c:288 ../common/gsm-common.c:448 #: ../xgnokii/xgnokii_calendar.c:181 ../xgnokii/xgnokii_calendar.c:288 msgid "Birthday" msgstr "Geburtstag" #: ../common/gsm-common.c:289 msgid "Caller group id" msgstr "Anrufgruppen-ID" #: ../common/gsm-common.c:350 ../common/nokia-decoding.c:349 #: ../common/phones/nk6100.c:1007 ../xgnokii/xgnokii.c:221 #: ../xgnokii/xgnokii.c:1027 msgid "Family" msgstr "Familie" #: ../common/gsm-common.c:351 msgid "VIPs" msgstr "VIPs" #: ../common/gsm-common.c:352 ../common/nokia-decoding.c:355 #: ../common/phones/nk6100.c:1013 ../xgnokii/xgnokii.c:223 #: ../xgnokii/xgnokii.c:1051 msgid "Friends" msgstr "Freunde" #: ../common/gsm-common.c:353 ../xgnokii/xgnokii_contacts.c:713 #: ../xgnokii/xgnokii_contacts.c:797 ../xgnokii/xgnokii_contacts.c:940 #: ../xgnokii/xgnokii_contacts.c:982 ../xgnokii/xgnokii_contacts.c:1194 msgid "Work" msgstr "Arbeit" #: ../common/gsm-common.c:354 msgid "Others" msgstr "Andere" #: ../common/gsm-common.c:365 ../common/gsm-common.c:416 #: ../xgnokii/xgnokii.c:529 ../xgnokii/xgnokii.c:558 ../xgnokii/xgnokii.c:1415 #: ../xgnokii/xgnokii_calendar.c:1539 msgid "Text" msgstr "Text" #: ../common/gsm-common.c:366 msgid "Linked" msgstr "Verbunden" #: ../common/gsm-common.c:368 msgid "GSM Operator Logo" msgstr "GSM-Betreiberlogo" #: ../common/gsm-common.c:370 msgid "Multipart Message" msgstr "Mehrteilige Nachricht" #: ../common/gsm-common.c:371 msgid "WAP vCard" msgstr "WAP vCard" #: ../common/gsm-common.c:372 msgid "WAP vCalendar" msgstr "WAP vCalendar" #: ../common/gsm-common.c:373 msgid "WAP vCardSecure" msgstr "WAP vCardSecure" #: ../common/gsm-common.c:374 msgid "WAP vCalendarSecure" msgstr "WAP vCalendarSecure" #: ../common/gsm-common.c:375 msgid "Voice Message" msgstr "Sprachnachricht" #: ../common/gsm-common.c:376 msgid "Fax Message" msgstr "Fax" #: ../common/gsm-common.c:377 msgid "Email Message" msgstr "E-Mail" #: ../common/gsm-common.c:378 msgid "WAP Push" msgstr "WAP-Push" #: ../common/gsm-common.c:379 msgid "Other Message" msgstr "Andere Nachricht" #: ../common/gsm-common.c:388 msgid "Inbox Message" msgstr "Eingegangene Nachricht" #: ../common/gsm-common.c:389 msgid "Delivery Report" msgstr "Auslieferungsreport" #: ../common/gsm-common.c:390 ../common/gsm-common.c:397 msgid "MO Message" msgstr "MO-Nachricht" #: ../common/gsm-common.c:391 msgid "Submit Report" msgstr "Sendebericht" #: ../common/gsm-common.c:392 msgid "Command" msgstr "Kommando" #: ../common/gsm-common.c:393 msgid "Status Report" msgstr "Statusreport" #: ../common/gsm-common.c:394 msgid "Picture Message" msgstr "Bildnachricht" #: ../common/gsm-common.c:395 msgid "Template" msgstr "Vorlage" #: ../common/gsm-common.c:396 msgid "Picture Message Template" msgstr "Vorlage für eine Bildnachricht" #: ../common/gsm-common.c:405 msgid "Read" msgstr "Gelesen" #: ../common/gsm-common.c:406 msgid "Unread" msgstr "Ungelesen" #: ../common/gsm-common.c:407 msgid "Sent" msgstr "Gesendet" #: ../common/gsm-common.c:408 msgid "Unsent" msgstr "Nicht gesendet" #: ../common/gsm-common.c:417 ../common/gsm-common.c:632 #: ../xgnokii/xgnokii.c:537 ../xgnokii/xgnokii.c:1421 #: ../xgnokii/xgnokii_contacts.c:719 ../xgnokii/xgnokii_contacts.c:800 #: ../xgnokii/xgnokii_contacts.c:941 ../xgnokii/xgnokii_contacts.c:983 #: ../xgnokii/xgnokii_contacts.c:1198 msgid "Fax" msgstr "Fax" #: ../common/gsm-common.c:418 msgid "VoiceMail" msgstr "Anrufbeantworter" #: ../common/gsm-common.c:419 ../xgnokii/xgnokii.c:546 msgid "ERMES" msgstr "ERMES" #: ../common/gsm-common.c:420 ../xgnokii/xgnokii.c:533 #: ../xgnokii/xgnokii.c:1427 msgid "Paging" msgstr "Pagerruf" #: ../common/gsm-common.c:421 msgid "Email message in 8110i" msgstr "E-Mail in 8110i" #: ../common/gsm-common.c:423 ../xgnokii/xgnokii.c:550 msgid "X.400" msgstr "X.400" #: ../common/gsm-common.c:431 ../xgnokii/xgnokii.c:564 #: ../xgnokii/xgnokii.c:1461 msgid "1 hour" msgstr "1 Stunde" #: ../common/gsm-common.c:432 ../xgnokii/xgnokii.c:568 #: ../xgnokii/xgnokii.c:1467 msgid "6 hours" msgstr "6 Stunden" #: ../common/gsm-common.c:433 ../xgnokii/xgnokii.c:572 #: ../xgnokii/xgnokii.c:588 ../xgnokii/xgnokii.c:1473 msgid "24 hours" msgstr "24 Stunden" #: ../common/gsm-common.c:434 ../xgnokii/xgnokii.c:576 #: ../xgnokii/xgnokii.c:1479 msgid "72 hours" msgstr "72 Stunden" #: ../common/gsm-common.c:435 ../xgnokii/xgnokii.c:580 #: ../xgnokii/xgnokii.c:1485 msgid "1 week" msgstr "1 Woche" #: ../common/gsm-common.c:436 msgid "Maximum time" msgstr "Maximale Zeit" #: ../common/gsm-common.c:446 ../common/phones/nk6100.c:2113 #: ../xgnokii/xgnokii_calendar.c:175 #, c-format msgid "Meeting" msgstr "Besprechung" #: ../common/gsm-common.c:447 ../xgnokii/xgnokii_calendar.c:169 msgid "Call" msgstr "Anruf" #: ../common/gsm-common.c:449 ../xgnokii/xgnokii_calendar.c:163 msgid "Reminder" msgstr "Erinnerung" #: ../common/gsm-common.c:450 ../xgnokii/xgnokii_calendar.c:157 msgid "Memo" msgstr "Anmerkung" #: ../common/gsm-common.c:458 ../xgnokii/xgnokii_calendar.c:831 msgid "Never" msgstr "Niemals" #: ../common/gsm-common.c:459 msgid "Daily" msgstr "Täglich" #: ../common/gsm-common.c:460 msgid "Weekly" msgstr "Wöchentlich" #: ../common/gsm-common.c:461 msgid "Every 2 weeks" msgstr "Aller 2 Wochen" #: ../common/gsm-common.c:462 msgid "Monthly" msgstr "Monatlich" #: ../common/gsm-common.c:463 msgid "Yearly" msgstr "Jährlich" #: ../common/gsm-common.c:471 msgid "Low" msgstr "Niedrig" #: ../common/gsm-common.c:472 msgid "Medium" msgstr "Mittel" #: ../common/gsm-common.c:473 msgid "High" msgstr "Hoch" #: ../common/gsm-common.c:483 msgid "Temporary" msgstr "Temporär" #: ../common/gsm-common.c:484 msgid "Permanent" msgstr "Dauerhaft" #: ../common/gsm-common.c:492 msgid "Normal" msgstr "Normal" #: ../common/gsm-common.c:493 msgid "Secure" msgstr "Sicher" #: ../common/gsm-common.c:501 ../gnokii/gnokii-wap.c:225 msgid "GSM data" msgstr "GSM-Daten" #: ../common/gsm-common.c:502 ../gnokii/gnokii-wap.c:234 msgid "GPRS" msgstr "GPRS" #: ../common/gsm-common.c:503 ../gnokii/gnokii-wap.c:242 #: ../xgnokii/xgnokii.c:1106 ../xgnokii/xgnokii.c:1848 msgid "SMS" msgstr "SMS" #: ../common/gsm-common.c:504 msgid "USSD" msgstr "USSD" #: ../common/gsm-common.c:512 msgid "Analogue" msgstr "Analog" #: ../common/gsm-common.c:513 msgid "ISDN" msgstr "ISDN" #: ../common/gsm-common.c:521 ../common/gsm-common.c:532 #: ../gnokii/gnokii-profile.c:185 msgid "Automatic" msgstr "Automatisch" #: ../common/gsm-common.c:522 msgid "9600" msgstr "9600" #: ../common/gsm-common.c:523 msgid "14400" msgstr "14400" #: ../common/gsm-common.c:531 msgid "Manual" msgstr "Manuell" #: ../common/gsm-common.c:540 msgid "Always" msgstr "Immer" #: ../common/gsm-common.c:541 msgid "When needed" msgstr "Bei Bedarf" #: ../common/gsm-common.c:551 msgid "No tone" msgstr "Lautlos" #: ../common/gsm-common.c:552 msgid "Standard" msgstr "Standard" #: ../common/gsm-common.c:553 msgid "Special" msgstr "Spezial" #: ../common/gsm-common.c:554 ../common/gsm-common.c:582 msgid "Beep once" msgstr "Einmal piepsen" #: ../common/gsm-common.c:555 ../common/gsm-common.c:585 msgid "Ascending" msgstr "Aufsteigend" #: ../common/gsm-common.c:563 ../common/gsm-common.c:572 #: ../common/gsm-common.c:583 ../common/gsm-common.c:594 #: ../gnokii/gnokii-profile.c:192 msgid "Off" msgstr "Aus" #: ../common/gsm-common.c:564 ../common/gsm-common.c:573 #: ../gnokii/gnokii-profile.c:185 ../gnokii/gnokii-profile.c:192 msgid "On" msgstr "Ein" #: ../common/gsm-common.c:581 msgid "Ringing" msgstr "Klingelnd" #: ../common/gsm-common.c:584 msgid "Ring once" msgstr "Einmal klingeln" #: ../common/gsm-common.c:586 msgid "Caller groups" msgstr "Anrufgruppen" #: ../common/gsm-common.c:595 ../common/gsm-common.c:605 msgid "Level 1" msgstr "Empfangsstärke 1" #: ../common/gsm-common.c:596 ../common/gsm-common.c:606 msgid "Level 2" msgstr "Empfangsstärke 2" #: ../common/gsm-common.c:597 ../common/gsm-common.c:607 msgid "Level 3" msgstr "Empfangsstärke 3" #: ../common/gsm-common.c:608 msgid "Level 4" msgstr "Empfangsstärke 4" #: ../common/gsm-common.c:609 msgid "Level 5" msgstr "Empfangsstärke 5" #: ../common/gsm-common.c:619 msgid "Busy" msgstr "Besetzt" #: ../common/gsm-common.c:620 msgid "No answer" msgstr "Keine Antwort" #: ../common/gsm-common.c:621 msgid "Out of reach" msgstr "Außer Reichweite" #: ../common/gsm-common.c:622 msgid "Not available" msgstr "Nicht verfügbar" #: ../common/gsm-common.c:623 ../common/gsm-common.c:634 msgid "All" msgstr "Alle" #: ../common/gsm-common.c:631 ../xgnokii/xgnokii.c:554 msgid "Voice" msgstr "Sprache" #: ../common/gsm-common.c:633 msgid "Data" msgstr "Datum" #: ../common/gsm-common.c:642 ../xgnokii/xgnokii_data.c:124 msgid "Disable" msgstr "Deaktivieren" #: ../common/gsm-common.c:643 ../xgnokii/xgnokii_data.c:120 msgid "Enable" msgstr "Aktivieren" #: ../common/gsm-common.c:644 msgid "Query" msgstr "Abfragen" #: ../common/gsm-common.c:645 msgid "Register" msgstr "Registrieren" #: ../common/gsm-common.c:646 msgid "Erasure" msgstr "Löschen" #: ../common/gsm-error.c:42 msgid "No error." msgstr "Kein Fehler." #: ../common/gsm-error.c:43 msgid "Command failed." msgstr "Kommando fehlgeschlagen." #: ../common/gsm-error.c:44 msgid "Model specified isn't known/supported." msgstr "Angegebenes Modell ist unbekannt oder wird nicht unterstützt." #: ../common/gsm-error.c:45 msgid "Invalid Security code." msgstr "Ungültiger Sicherheitscode." #: ../common/gsm-error.c:46 msgid "Problem occurred internal to model specific code." msgstr "Es ist ein Problem innerhalb des Model-spezifischen Codes aufgetreten." #: ../common/gsm-error.c:47 msgid "Command called isn't implemented in model." msgstr "Das aufgerufene Kommando ist in diesem Modell nicht implementiert." #: ../common/gsm-error.c:48 msgid "" "Function or connection type not supported by the phone or by the phone " "driver." msgstr "" "Funktion oder Verbindungstyp wird durch das Telefon oder durch den " "Telefontreiber nicht unterstützt." #: ../common/gsm-error.c:49 msgid "User aborted the action." msgstr "Vom Nutzer abgebrochene Aktion." #: ../common/gsm-error.c:50 msgid "Unknown error - well better than nothing!!" msgstr "Unbekannter Fehler - naja besser als garnichts!!" #: ../common/gsm-error.c:51 msgid "The specified memory is full." msgstr "Ausgewählter Speicher ist voll." #: ../common/gsm-error.c:52 msgid "Couldn't establish link with phone." msgstr "Kann keine Verbindung zum Telefon einrichten." #: ../common/gsm-error.c:53 msgid "Command timed out." msgstr "Zeitüberschreitung des Kommandos." #: ../common/gsm-error.c:54 msgid "Try again." msgstr "Nochmal versuchen." #: ../common/gsm-error.c:55 msgid "Waiting for the next part of the message." msgstr "Warte auf den nächsten Teil der Nachricht." #: ../common/gsm-error.c:56 msgid "Device not ready." msgstr "Gerät nicht bereit." #: ../common/gsm-error.c:57 msgid "Command is still being executed." msgstr "Kommando wird noch ausgeführt." #: ../common/gsm-error.c:58 msgid "The given memory location is invalid." msgstr "Der gegebene Speicherplatz ist ungültig." #: ../common/gsm-error.c:59 msgid "Invalid type of memory." msgstr "Ungültiger Speicherbereich." #: ../common/gsm-error.c:60 msgid "The given location is empty." msgstr "Der gegebene Platz ist leer." #: ../common/gsm-error.c:61 msgid "The given entry is too long." msgstr "Der angegebene Eintrag ist zu lang." #: ../common/gsm-error.c:62 msgid "Data format is not valid." msgstr "Datenformat ist nicht gültig." #: ../common/gsm-error.c:63 msgid "Wrong size of the object." msgstr "Falsche Größe des Objektes." #: ../common/gsm-error.c:64 msgid "Outgoing call requested reported line busy." msgstr "" #: ../common/gsm-error.c:65 msgid "No Carrier error during data call setup?" msgstr "Kein Trägersignal während des Aufbaus eines Data-Calls?" #: ../common/gsm-error.c:66 msgid "The current frame isn't handled by the incoming function." msgstr "Der aktuelle Frame wird nicht von der Eingangsfunktion bearbeitet." #: ../common/gsm-error.c:67 msgid "Unsolicited message received." msgstr "Nicht angeforderte Nachricht erhalten." #: ../common/gsm-error.c:68 msgid "Attempt to read CB when no new CB received." msgstr "Versuch CB zu lesen, während kein neuer CB empfangen wurde." #: ../common/gsm-error.c:69 msgid "SIM card missing or damaged." msgstr "SIM-Karte vermisst oder beschädigt." #: ../common/gsm-error.c:70 msgid "PIN or PUK code required." msgstr "PIN- oder PUK-Code benötigt." #: ../common/gsm-error.c:71 msgid "The requested information is not available." msgstr "Die angeforderte Information ist nicht verfügbar." #: ../common/gsm-error.c:72 msgid "Config file cannot be read." msgstr "Konfigurationsdatei kann nicht gelesen werden." #: ../common/gsm-error.c:73 msgid "Either global or given phone section cannot be found." msgstr "" "Es wurde weder der globale noch angegebene telefonspezifische Abschnitt " "gefunden." #: ../common/gsm-error.c:74 msgid "Incorrect logging section configuration." msgstr "Fehlerhafter Abschnitt \"logging\" in der Konfiguration." #: ../common/gsm-error.c:75 msgid "No phone model specified in the config file." msgstr "Kein Telefonmodell in der Konfigurationsdatei angegeben." #: ../common/gsm-error.c:76 msgid "No port specified in the config file." msgstr "Kein Port in der Konfigurationsdatei angegeben." #: ../common/gsm-error.c:77 msgid "No connection type specified in the config file." msgstr "Kein Verbindungstyp in der Konfigurationsdatei angegeben." #: ../common/gsm-error.c:78 msgid "Device is locked and cannot be unlocked." msgstr "Gerät ist gesperrt und kann nicht entsperrt werden." #: ../common/gsm-error.c:79 msgid "The actual response will be sent asynchronously." msgstr "Die aktuelle Antwort wird asynchron gesendet." #: ../common/gsm-error.c:80 msgid "Unknown error." msgstr "Unbekannter Fehler." #: ../common/gsm-filetypes.c:599 #, c-format msgid "Sorry, gnokii was not compiled with XPM support.\n" msgstr "Entschuldigung, gnokki wurde ohne XPM-Unterstützung compiliert.\n" #: ../common/gsm-filetypes.c:642 #, c-format msgid "Bitmap too large\n" msgstr "Bitmap zu groß\n" #: ../common/gsm-filetypes.c:1519 #, c-format msgid "Formatting error: too many subentries\n" msgstr "Formatierungsfehler: zu viele Untereinträge\n" #: ../common/gsm-filetypes.c:1528 #, c-format msgid "Formatting error: unknown error while reading subentry type\n" msgstr "" "Formatierungsfehler: unbekannter Fehler während des Lesens des Typs des " "Untereintrages\n" #: ../common/gsm-filetypes.c:1532 #, c-format msgid "Formatting error: empty entry type\n" msgstr "Formatierungsfehler: leerer Eintragstyp\n" #: ../common/gsm-filetypes.c:1542 #, c-format msgid "Formatting error: subentry has only entry type field\n" msgstr "" "Formatierungsfehler: Untereintrag hat nur ein Typfeld für den Eintrag\n" #: ../common/gsm-filetypes.c:1551 #, c-format msgid "Formatting error: unknown error while reading subentry number type\n" msgstr "" "Formatierungsfehler: unbekannter Fehler während des Lesens des Nummerntyps " "des Untereintrags\n" #: ../common/gsm-filetypes.c:1555 #, c-format msgid "Formatting error: empty number type\n" msgstr "Formatierungsfehler: leerer Nummerntyp\n" #: ../common/gsm-filetypes.c:1570 ../common/gsm-filetypes.c:1593 #, c-format msgid "Formatting error: subentry has only entry and number type fields\n" msgstr "" "Formatierungsfehler: Untereintrag hat nur Eintrags- und Nummerntypfelder\n" #: ../common/gsm-filetypes.c:1579 #, c-format msgid "Formatting error: unknown error while reading subentry id\n" msgstr "" "Formatierungsfehler: unbekannter Fehler während des Lesens der Id des " "Untereintrags\n" #: ../common/gsm-filetypes.c:1583 #, c-format msgid "Formatting error: empty id\n" msgstr "Formatierungsfehler: leere Id\n" #: ../common/gsm-filetypes.c:1617 #, c-format msgid "Formatting error: unknown error while reading subentry contents\n" msgstr "" "Formatierungsfehler: unbekannter Fehler während des Lesens des Inhaltes des " "Untereintrags\n" #: ../common/gsm-filetypes.c:1621 #, c-format msgid "Formatting error: empty subentry contents\n" msgstr "Formatierungsfehler: leerer Untereintrag\n" #. for now be compacrapatible ;) #: ../common/gsm-networks.c:1294 ../common/gsm-networks.c:1341 #: ../gnokii/gnokii-logo.c:254 ../gnokii/gnokii-logo.c:266 #: ../gnokii/gnokii-logo.c:281 ../gnokii/gnokii-logo.c:362 #: ../smsd/lowlevel.c:141 ../smsd/lowlevel.c:142 ../smsd/lowlevel.c:143 #: ../xgnokii/xgnokii_lowlevel.c:220 ../xgnokii/xgnokii_lowlevel.c:221 #: ../xgnokii/xgnokii_lowlevel.c:222 ../xgnokii/xgnokii_lowlevel.c:223 #: ../xgnokii/xgnokii_sms.c:262 ../xgnokii/xgnokii_sms.c:342 msgid "unknown" msgstr "unbekannt" #: ../common/gsm-networks.c:1304 ../common/gsm-networks.c:1318 #: ../common/gsm-networks.c:1355 ../gnokii/gnokii-monitor.c:256 #: ../gnokii/gnokii-other.c:205 msgid "undefined" msgstr "unbestimmt" #: ../common/gsm-sms.c:299 msgid "Delivered" msgstr "Ausgeliefert" #: ../common/gsm-sms.c:312 msgid "Failed" msgstr "Fehlgeschlagen" #: ../common/gsm-sms.c:381 msgid "Pending" msgstr "Schwebend" #: ../common/gsm-statemachine.c:390 msgid "" "UNHANDLED FRAME RECEIVED\n" "request: " msgstr "" "UNHANDLED FRAME RECEIVED\n" "request: " #: ../common/gsm-statemachine.c:393 msgid "reply: " msgstr "antworten: " #: ../common/gsm-statemachine.c:396 ../common/phones/nokia.c:679 msgid "Please read Docs/Bugs and send a bug report!\n" msgstr "" "Bitte lesen Sie sich Docs/Bugs durch und senden Sie einen Fehlerbericht!\n" #: ../common/libfunctions.c:183 ../gnokiid/gnokiid.c:164 #, c-format msgid "Lock file error. Exiting.\n" msgstr "Fehler mit der Sperrdatei. Beende.\n" #: ../common/libfunctions.c:191 #, c-format msgid "" "Telephone interface init failed: %s\n" "Quitting.\n" msgstr "" "Initialisieren der Telefon-Schnittstelle fehlgeschlagen: %s\n" "Beenden.\n" #: ../common/links/atbus.c:69 msgid "gnokii I/O error" msgstr "gnokii I/O-Fehler" #: ../common/links/atbus.c:85 msgid "Couldn't open ATBUS device" msgstr "Konnte ATBUS-Gerät nicht öffnen" #: ../common/links/cbus.c:284 msgid "Couldn't open CBUS device" msgstr "Konnte CBUS-Gerät nicht öffnen" #: ../common/links/fbus-3110.c:77 ../common/links/fbus.c:85 #: ../common/links/fbus.c:141 ../common/links/fbus.c:184 msgid "Couldn't open FBUS device" msgstr "Konnte FBUS-Gerät nicht öffnen" #: ../common/links/fbus-3110.c:258 #, c-format msgid "fb3110_tx_frame_send - message too long!\n" msgstr "fb3110_tx_frame_send - Nachricht zu lang!\n" #: ../common/links/fbus-phonet.c:107 msgid "Couldn't open PHONET device" msgstr "Konnte PHONET-Gerät nicht öffnen" #: ../common/links/gnbus.c:305 msgid "Couldn't open GNBUS device" msgstr "Konnte GNBUS-Gerät nicht öffnen" #: ../common/links/m2bus.c:78 msgid "Couldn't open M2BUS device" msgstr "Konnte M2BUS-Gerät nicht öffnen" #: ../common/misc.c:466 #, c-format msgid "Cannot lock NULL device. Set port config parameter correctly.\n" msgstr "" "Kann das NULL-Gerät nicht sperren. Port-Konfiguration korrekt setzen. \n" #: ../common/misc.c:481 #, c-format msgid "Out of memory error while locking device.\n" msgstr "Kein Speicher mehr verfügbar beim Versuch das Gerät zu sperren.\n" #: ../common/misc.c:510 #, c-format msgid "Lockfile %s is stale. Overriding it...\n" msgstr "Sperrdatei %s ist veraltet. Überschreibe sie...\n" #: ../common/misc.c:513 #, c-format msgid "Overriding file %s failed, please check the permissions.\n" msgstr "Überschreiben der Datei %s schlug fehl, bitte Berechtigungen prüfen.\n" #: ../common/misc.c:514 ../common/misc.c:529 #, c-format msgid "Cannot lock device.\n" msgstr "Kann das Gerät nicht sperren.\n" #: ../common/misc.c:518 #, c-format msgid "Device already locked with %s.\n" msgstr "Gerät is bereits mit %s gesperrt.\n" #: ../common/misc.c:527 #, c-format msgid "Unable to read lockfile %s.\n" msgstr "Konnte Sperrdatei %s nicht lesen.\n" #: ../common/misc.c:528 #, c-format msgid "Please check for reason and remove the lockfile by hand.\n" msgstr "" "Bitte prüfen Sie die Ursache und löschen Sie die Sperrdatei von Hand.\n" #: ../common/misc.c:538 #, c-format msgid "Device seems to be locked by unknown process.\n" msgstr "Es scheint, daß das Gerät von einem unbekannten Prozeß gesperrt ist.\n" #: ../common/misc.c:540 #, c-format msgid "Please check permission on lock directory.\n" msgstr "Bitte prüfen Sie die Berechtigungen des Sperrverzeichnisses.\n" #: ../common/misc.c:542 #, c-format msgid "Cannot create lockfile %s. Please check for existence of the path.\n" msgstr "" "Kann keine Sperrdatei %s anlegen. Bitte prüfen Sie die Existenz des Pfades.\n" #: ../common/misc.c:547 #, c-format msgid "Failed to write to the lockfile %s.\n" msgstr "Fehler beim Schreiben der Sperrdatei %s.\n" #: ../common/misc.c:572 #, c-format msgid "Cannot unlock device: %s\n" msgstr "Kann das Gerät nicht entsperren: %s\n" #: ../common/nokia-decoding.c:352 ../common/phones/nk6100.c:1010 #: ../xgnokii/xgnokii.c:222 ../xgnokii/xgnokii.c:1039 msgid "VIP" msgstr "VIP" #: ../common/nokia-decoding.c:358 ../common/phones/nk6100.c:1016 #: ../xgnokii/xgnokii.c:224 ../xgnokii/xgnokii.c:1063 msgid "Colleagues" msgstr "Kollegen" #: ../common/nokia-decoding.c:361 ../common/phones/nk6100.c:1019 #: ../xgnokii/xgnokii.c:225 ../xgnokii/xgnokii.c:1075 msgid "Other" msgstr "Andere" #. Set a default SMSC name because +CSCA doesn't provide one #. Set a default name #: ../common/phones/atgen.c:2075 ../common/phones/nk6100.c:1552 #: ../common/phones/nk6510.c:1951 ../common/phones/nk7110.c:1479 #: ../common/phones/pcsc.c:692 ../xgnokii/xgnokii.c:521 #: ../xgnokii/xgnokii_sms.c:832 #, c-format msgid "Set %d" msgstr "Setze %d" #: ../common/phones/atgen.c:2692 #, c-format msgid "Withheld" msgstr "Zurückgehalten" #: ../common/phones/fake.c:95 #, c-format msgid "" "Apparently you didn't configure gnokii. Please do it prior to using it.\n" "You can get some clues from comments included in sample config file or give\n" "a try with gnokii-configure utility included in gnokii distribution.\n" msgstr "" #: ../common/phones/nk6100.c:2092 #, c-format msgid "Personal" msgstr "Persönlich" #: ../common/phones/nk6100.c:2095 ../common/phones/nk6100.c:2122 #, c-format msgid "Car" msgstr "Auto" #: ../common/phones/nk6100.c:2098 ../common/phones/nk6100.c:2125 #, c-format msgid "Headset" msgstr "Headset" #: ../common/phones/nk6100.c:2101 ../common/phones/nk6100.c:2128 #, c-format msgid "Unknown (%d)" msgstr "Unbekannt (%d)" #: ../common/phones/nk6100.c:2107 ../xgnokii/xgnokii_contacts.c:701 #: ../xgnokii/xgnokii_contacts.c:791 ../xgnokii/xgnokii_contacts.c:938 #: ../xgnokii/xgnokii_contacts.c:980 ../xgnokii/xgnokii_contacts.c:1021 #: ../xgnokii/xgnokii_contacts.c:1094 ../xgnokii/xgnokii_contacts.c:1186 #, c-format msgid "General" msgstr "Allgemein" #: ../common/phones/nk6100.c:2110 #, c-format msgid "Silent" msgstr "Stumm" #: ../common/phones/nk6100.c:2116 #, c-format msgid "Outdoor" msgstr "Draußen" #: ../common/phones/nk6100.c:2119 #, c-format msgid "Pager" msgstr "Pager" #: ../common/phones/nk6510.c:1811 #, c-format msgid "" "6510 series phones seem to be quite sensitive to malformed SMS messages\n" "It may have to be sent to Nokia Service if something fails!\n" "Do you really want to continue? " msgstr "" "Mobiltelefone der Serie 6510 von Nokia scheinen recht empfindlich auf\n" "fehlerhafte SMS-Mitteilungen zu reagieren. Möglicherweise müssen Sie\n" "Ihr Mobiltelefon reparieren lassen, wenn etwas fehlschlägt!\n" "Wollen Sie wirklich fortfahren?" #: ../common/phones/nk6510.c:1814 #, c-format msgid "(yes/no) " msgstr "(ja/nein)" #: ../common/phones/nk6510.c:1816 ../gnokii/gnokii-phonebook.c:421 #: ../gnokii/gnokii-sms.c:542 ../gnokii/gnokii-sms.c:833 #: ../gnokii/gnokii-utils.c:63 ../gnokii/gnokii-wap.c:223 msgid "yes" msgstr "ja" #: ../common/phones/nk6510.c:2361 ../common/phones/nk6510.c:2426 #, c-format msgid "Progress: %3d%% completed" msgstr "Fortschritt: %3d%% abgeschlossen" #: ../common/phones/nokia.c:338 msgid "Tried to activate CONTACT SERVICE\n" msgstr "Sie haben versucht CONTACT SERVICE zu aktivieren!\n" #: ../common/phones/nokia.c:667 msgid "" "NOKIA RAW RINGTONE DECODING FAILED\n" "ringtone:\n" msgstr "" "ÜBERSETZEN EINES UNBEARBEITETEN NOKIA-RUFTONES IST FEHLGESCHLAGEN\n" "Rufton:\n" #: ../common/phones/nokia.c:678 #, c-format msgid "offset: %04x\n" msgstr "Offset: %04x\n" #: ../common/phones/pcsc.c:593 #, c-format msgid "Phase %s SIM" msgstr "Phase %s SIM" #: ../common/vcal.lx:161 #, c-format msgid "Error: Invalid calendar note number!\n" msgstr "Fehler: Ungültige Nummer eines Kalendereintrags!\n" #. translators: %s are replaced by function names #: ../common/vcal.lx:282 ../common/vcal.lx:344 #, c-format msgid "Function %s() is deprecated. Use %s() instead.\n" msgstr "Die Funktion %s() ist veraltet. Nutze %s() stattdessen.\n" #: ../common/vcal.lx:285 ../common/vcal.lx:347 ../gnokii/gnokii-calendar.c:256 #: ../gnokii/gnokii-file.c:437 ../gnokii/gnokii-todo.c:162 ../smsd/file.c:185 #: ../xgnokii/xgnokii_contacts.c:2700 ../xgnokii/xgnokii_dtmf.c:93 #: ../xgnokii/xgnokii_logos.c:1372 ../xgnokii/xgnokii_speed.c:324 #, c-format msgid "Can't open file %s for reading!\n" msgstr "Konnte die Datei %s nicht zum Lesen öffnen!\n" #: ../common/vcal.lx:294 ../common/vcal.lx:356 #, c-format msgid "Error parsing vCalendar file!\n" msgstr "Fehler während der Analyse einer vCalendar Datei!\n" #: ../getopt/getopt.c:566 ../getopt/getopt.c:582 #, c-format msgid "%s: option '%s' is ambiguous\n" msgstr "%s: Option '%s' ist mehrdeutig\n" #: ../getopt/getopt.c:615 ../getopt/getopt.c:619 #, c-format msgid "%s: option '--%s' doesn't allow an argument\n" msgstr "%s: Option '--%s' erlaubt kein Argument\n" #: ../getopt/getopt.c:628 ../getopt/getopt.c:633 #, c-format msgid "%s: option '%c%s' doesn't allow an argument\n" msgstr "%s: Option '%c%s' erlaubt kein Argument\n" #: ../getopt/getopt.c:676 ../getopt/getopt.c:695 ../getopt/getopt.c:998 #: ../getopt/getopt.c:1017 #, c-format msgid "%s: option '%s' requires an argument\n" msgstr "%s: Option '%s' benötigt ein Argument\n" #: ../getopt/getopt.c:733 ../getopt/getopt.c:736 #, c-format msgid "%s: unrecognized option '--%s'\n" msgstr "%s: unbekannte Option '--%s'\n" #: ../getopt/getopt.c:744 ../getopt/getopt.c:747 #, c-format msgid "%s: unrecognized option '%c%s'\n" msgstr "%s: unbekannte Option '%c%s'\n" #: ../getopt/getopt.c:796 ../getopt/getopt.c:799 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s: ungültige Option -- '%c'\n" #: ../getopt/getopt.c:849 ../getopt/getopt.c:866 ../getopt/getopt.c:1069 #: ../getopt/getopt.c:1087 #, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: Option benötigt ein Argument -- '%c'\n" #: ../getopt/getopt.c:919 ../getopt/getopt.c:935 #, c-format msgid "%s: option '-W %s' is ambiguous\n" msgstr "%s: Option '-W %s' ist mehrdeutig\n" #: ../getopt/getopt.c:959 ../getopt/getopt.c:977 #, c-format msgid "%s: option '-W %s' doesn't allow an argument\n" msgstr "%s: Option '-W %s' erlaubt kein Argument\n" #: ../gnokiid/gnokiid.c:65 #, c-format msgid "GNOKIID Version %s\n" msgstr "GNOKIID Version %s\n" #: ../gnokiid/gnokiid.c:70 #, c-format msgid "" "Copyright (C) Hugh Blemings , 1999\n" "Copyright (C) Pavel Janik ml. , 1999\n" "Built %s %s\n" msgstr "" "Copyright (C) Hugh Blemings , 1999\n" "Copyright (C) Pavel Janik ml. , 1999\n" "Erstellt %s %s\n" #: ../gnokiid/gnokiid.c:81 #, c-format msgid "" " usage: gnokiid [--help|--version|--debug]\n" " --help display usage information\n" " --version displays version and copyright information\n" " --debug uses stdin/stdout for virtual modem comms\n" msgstr "" #: ../gnokiid/gnokiid.c:149 #, c-format msgid "" "gnokiid purpose is to work only with the phones that do not have AT Hayes\n" "commands interpreter.\n" msgstr "" "gnokiid arbeitet absichtlich nur mit Telefonen zusammen, die keinen\n" "AT-Hayes-Kommandointerpreter haben.\n" #: ../gnokii/gnokii.c:203 #, c-format msgid "GNOKII Version %s\n" msgstr "GNOKII Version %s\n" #: ../gnokii/gnokii.c:210 #, c-format msgid "" "Copyright (C) Hugh Blemings , 1999, 2000\n" "Copyright (C) Pavel Janik ml. , 1999, 2000\n" "Copyright (C) Pavel Machek , 2001\n" "Copyright (C) Pawel Kot , 2001-2011\n" "Copyright (C) BORBELY Zoltan , 2002\n" "Copyright (C) Daniele Forsi , 2004-2011\n" "gnokii is free software, covered by the GNU General Public License, and you " "are\n" "welcome to change it and/or distribute copies of it under certain " "conditions.\n" "There is absolutely no warranty for gnokii. See GPL for details.\n" "Built %s %s\n" msgstr "" "Copyright (C) Hugh Blemings , 1999, 2000\n" "Copyright (C) Pavel Janik ml. , 1999, 2000\n" "Copyright (C) Pavel Machek , 2001\n" "Copyright (C) Pawel Kot , 2001-2011\n" "Copyright (C) BORBELY Zoltan , 2002\n" "Copyright (C) Daniele Forsi , 2004-2011\n" "gnokii ist freie Software, unterliegt der GNU General Public License und Sie " "sind\n" "herzlich eingeladen gnokii zu verändern und/oder es unter Einhaltung\n" "bestehender Bedingungen zu verteilen.\n" "Es besteht absolut keine Garantie für gnokii. Details finden Sie in der " "GPL.\n" "Erstellt %s %s\n" #: ../gnokii/gnokii.c:238 #, c-format msgid "" "Usage:\n" "\tgnokii [CONFIG OPTIONS] OPTIONS\n" "\n" "CONFIG OPTIONS\n" "\t\t--config filename\n" "\t\t--phone phone_section\n" "\n" "OPTIONS\n" "Use just one option at a time.\n" "General options:\n" " --help [all] [monitor] [sms] [mms] [phonebook] [calendar] [todo]\n" " [dial] [profile] [settings] [wap] [logo] [ringtone]\n" " [security] [file] [other]\n" " --version\n" " --shell\n" msgstr "" #: ../gnokii/gnokii.c:359 #, c-format msgid "Cannot open logfile %s\n" msgstr "Kann die Logdatei %s nicht öffnen\n" #: ../gnokii/gnokii.c:392 #, c-format msgid "File: %s\n" msgstr "Datei: %s\n" #: ../gnokii/gnokii.c:394 #, c-format msgid "Phone section: [phone_%s]\n" msgstr "Abschnitt fürs Telefon: [phone_%s]\n" #: ../gnokii/gnokii.c:403 #, c-format msgid "WARNING: cannot open logfile, logs will be directed to stderr\n" msgstr "" "WARNUNG: Kann die Logdatei nicht öffnen, Logs werden auf den Stderr " "umgeleitet\n" #: ../gnokii/gnokii.c:819 #, c-format msgid "Use '%s --help' for usage information.\n" msgstr "Nutze '%s --help' zum Anzeigen des Syntax.\n" #: ../gnokii/gnokii.c:821 #, c-format msgid "Use '--help' for usage information.\n" msgstr "Nutze '--help' zum Anzeigen des Syntax.\n" #: ../gnokii/gnokii.c:1142 #, c-format msgid "Unknown option: %d\n" msgstr "Unbenannte Option: %d\n" #: ../gnokii/gnokii.c:1206 #, c-format msgid "" "gnokii needs to be compiled with readline support to enable this option.\n" msgstr "" "Gnokii muß mit readline-Unterstützung kompilieren sein um diese Option zu " "nutzen.\n" #: ../gnokii/gnokii-calendar.c:56 #, c-format msgid "" "Calendar options:\n" " --getcalendarnote start_number [end_number|end] [-v|--vCal]\n" " --writecalendarnote vcalendarfile start_number [end_number|end]\n" " --deletecalendarnote start [end_number|end]\n" msgstr "" "Kalenderoptionen:\n" " --getcalendarnote Startnummer [Endnummer|end] [-v|--vCal]\n" " --writecalendarnote vcalendarfile Startnummer [Endnummer|end]\n" " --deletecalendarnote start [Endnummer|end]\n" #: ../gnokii/gnokii-calendar.c:65 #, c-format msgid "" "usage: --getcalendarnote start_number [end_number | end] [-v|--vCal]\n" " start_number - entry number in the phone calendar " "(numeric)\n" " end_number - read to this entry in the phone " "calendar (numeric, optional)\n" " end - the string \"end\" indicates all " "entries from start to end\n" " -v - output in iCalendar format\n" " NOTE: if no end is given, only the start entry is read\n" msgstr "" #. Plain text output #. Translators: this is the header of a calendar note. Example: 1 (1). Type: Meeting #: ../gnokii/gnokii-calendar.c:130 #, c-format msgid "%d (%d). %s: %s\n" msgstr "%d (%d). %s: %s\n" #: ../gnokii/gnokii-calendar.c:130 ../xgnokii/xgnokii_calendar.c:1536 msgid "Type" msgstr "Typ" #: ../gnokii/gnokii-calendar.c:132 #, c-format msgid " Start date: %d-%02d-%02d\n" msgstr " Startdatum: %d-%02d-%02d\n" #: ../gnokii/gnokii-calendar.c:137 #, c-format msgid " Start time: %02d:%02d:%02d\n" msgstr " Startzeit: %02d:%02d:%02d\n" #: ../gnokii/gnokii-calendar.c:142 #, c-format msgid " End date: %d-%02d-%02d\n" msgstr " Enddatum: %d-%02d-%02d\n" #: ../gnokii/gnokii-calendar.c:146 #, c-format msgid " End time: %02d:%02d:%02d\n" msgstr " Endzeit: %02d:%02d:%02d\n" #: ../gnokii/gnokii-calendar.c:154 #, c-format msgid " Alarm date: %02d-%02d\n" msgstr " Weckdatum: %02d-%02d\n" #: ../gnokii/gnokii-calendar.c:158 #, c-format msgid " Alarm date: %d-%02d-%02d\n" msgstr " Weckzeit: %d-%02d-%02d\n" #: ../gnokii/gnokii-calendar.c:163 #, c-format msgid " Alarm time: %02d:%02d:%02d\n" msgstr " Weckzeit: %02d:%02d:%02d\n" #: ../gnokii/gnokii-calendar.c:167 #, c-format msgid " Alarm tone %s\n" msgstr " Weckruf %s\n" #: ../gnokii/gnokii-calendar.c:168 ../xgnokii/xgnokii_calendar.c:214 #: ../xgnokii/xgnokii_calendar.c:220 msgid "enabled" msgstr "aktiviert" #: ../gnokii/gnokii-calendar.c:168 ../xgnokii/xgnokii_calendar.c:214 #: ../xgnokii/xgnokii_calendar.c:220 msgid "disabled" msgstr "deaktivier" #: ../gnokii/gnokii-calendar.c:171 #, c-format msgid " %s: " msgstr " %s: " #: ../gnokii/gnokii-calendar.c:171 msgid "Repeat" msgstr "Wiederholen" #: ../gnokii/gnokii-calendar.c:182 #, c-format msgid "Every %d hours" msgstr "Aller %d stunden" #: ../gnokii/gnokii-calendar.c:187 #, c-format msgid " The event will be repeated " msgstr " Das Ereignis wird wiederholt " #: ../gnokii/gnokii-calendar.c:190 #, c-format msgid "forever." msgstr "für immer." #: ../gnokii/gnokii-calendar.c:193 #, c-format msgid "%d times." msgstr "%d mal." #: ../gnokii/gnokii-calendar.c:199 #, c-format msgid " Text: %s\n" msgstr " Text: %s\n" #: ../gnokii/gnokii-calendar.c:203 ../gnokii/gnokii-calendar.c:206 #: ../gnokii/gnokii-wap.c:226 ../gnokii/gnokii-wap.c:227 #: ../gnokii/gnokii-wap.c:228 ../gnokii/gnokii-wap.c:229 #: ../gnokii/gnokii-wap.c:230 ../gnokii/gnokii-wap.c:231 #: ../gnokii/gnokii-wap.c:232 ../gnokii/gnokii-wap.c:233 #: ../gnokii/gnokii-wap.c:235 ../gnokii/gnokii-wap.c:236 #: ../gnokii/gnokii-wap.c:237 ../gnokii/gnokii-wap.c:238 #: ../gnokii/gnokii-wap.c:239 ../gnokii/gnokii-wap.c:240 #: ../gnokii/gnokii-wap.c:241 ../gnokii/gnokii-wap.c:243 #: ../gnokii/gnokii-wap.c:244 #, c-format msgid " %s: %s\n" msgstr " %s: %s\n" #: ../gnokii/gnokii-calendar.c:203 ../xgnokii/xgnokii.c:1709 msgid "Phone" msgstr "Telefon" #: ../gnokii/gnokii-calendar.c:226 #, c-format msgid "The calendar note can not be read: %s\n" msgstr "Der Kalendereintrag kann nicht gelesen werden: %s\n" #: ../gnokii/gnokii-calendar.c:236 #, c-format msgid "" "usage: --writecalendarnote vcalendarfile start_number [end_number|end]\n" " vcalendarfile - file containing calendar notes in " "vCal format\n" " start_number - first calendar note from " "vcalendarfile to read\n" " end_number - last calendar note from " "vcalendarfile to read\n" " end - read all notes from vcalendarfile " "from start_number\n" " NOTE: it stores the note at the first empty location.\n" msgstr "" #: ../gnokii/gnokii-calendar.c:300 ../gnokii/gnokii-todo.c:206 #, c-format msgid "Failed to load vCalendar file: %s\n" msgstr "Konnte die vCalendar Datei: %s nicht laden.\n" #: ../gnokii/gnokii-calendar.c:309 ../gnokii/gnokii-dial.c:143 #: ../gnokii/gnokii-todo.c:215 #, c-format msgid "Successfully written!\n" msgstr "Erfolgreich geschrieben!\n" #: ../gnokii/gnokii-calendar.c:311 #, c-format msgid "Failed to write calendar note: %s\n" msgstr "Konnte die Kalendernotiz nicht schreiben: %s\n" #: ../gnokii/gnokii-calendar.c:320 #, c-format msgid "" "usage: --deletecalendarnote start_number [end_number | end]\n" " start_number - first number in the phone calendar " "(numeric)\n" " end_number - until this entry in the phone " "calendar (numeric, optional)\n" " end - the string \"end\" indicates all " "entries from start to end\n" " NOTE: if no end is given, only the start entry is deleted\n" msgstr "" #: ../gnokii/gnokii-calendar.c:355 #, c-format msgid "Calendar note deleted.\n" msgstr "Kalendereintrag gelöscht.\n" #: ../gnokii/gnokii-calendar.c:357 #, c-format msgid "The calendar note cannot be deleted: %s\n" msgstr "Der Kalendereintrag kann nicht gelöscht werden: %s\n" #: ../gnokii/gnokii-dial.c:52 #, c-format msgid "" "Dialling and call options:\n" " --getspeeddial location\n" " --setspeeddial number memory_type location\n" " --dialvoice number\n" " --senddtmf string\n" " --answercall callid\n" " --hangup callid\n" " --divert {--op|-o} {register|enable|query|disable|erasure}\n" " {--type|-t} {all|busy|noans|outofreach|notavail}\n" " {--call|-c} {all|voice|fax|data}\n" " [{--timeout|-m} time_in_seconds]\n" " [{--number|-n} number]\n" "All number, location and callid options need to be numeric.\n" msgstr "" #: ../gnokii/gnokii-dial.c:70 #, c-format msgid "" "usage: --getspeeddial location\n" " location - location in the speed dial memory\n" msgstr "" "Syntax: --getspeeddial Position\n" " Position - Position im Kurzwahlspeicher\n" #: ../gnokii/gnokii-dial.c:93 #, fuzzy, c-format msgid "SpeedDial nr. %d %s %d\n" msgstr "SpeedDial nr. %d: %d:%d\n" #: ../gnokii/gnokii-dial.c:96 ../gnokii/gnokii-dial.c:146 #: ../gnokii/gnokii-dial.c:186 ../gnokii/gnokii-dial.c:217 #: ../gnokii/gnokii-dial.c:248 ../gnokii/gnokii-dial.c:381 #: ../gnokii/gnokii-logo.c:298 ../gnokii/gnokii-logo.c:469 #: ../gnokii/gnokii-monitor.c:454 ../gnokii/gnokii-monitor.c:457 #: ../gnokii/gnokii-monitor.c:480 ../gnokii/gnokii-other.c:190 #: ../gnokii/gnokii-phonebook.c:256 ../gnokii/gnokii-profile.c:112 #: ../gnokii/gnokii-profile.c:162 ../gnokii/gnokii-security.c:95 #: ../gnokii/gnokii-security.c:127 ../gnokii/gnokii-security.c:205 #: ../gnokii/gnokii-security.c:247 ../gnokii/gnokii-security.c:298 #: ../gnokii/gnokii-settings.c:122 ../gnokii/gnokii-settings.c:146 #: ../gnokii/gnokii-settings.c:180 ../gnokii/gnokii-settings.c:204 #: ../gnokii/gnokii-sms.c:552 ../gnokii/gnokii-sms.c:1048 #: ../gnokii/gnokii-sms.c:1126 ../gnokii/gnokii-sms.c:1156 #: ../gnokii/gnokii-sms.c:1189 ../gnokii/gnokii-sms.c:1329 #: ../gnokii/gnokii-sms.c:1331 ../gnokii/gnokii-wap.c:94 #: ../gnokii/gnokii-wap.c:129 ../gnokii/gnokii-wap.c:162 #: ../gnokii/gnokii-wap.c:248 ../gnokii/gnokii-wap.c:323 #: ../smsd/lowlevel.c:112 ../smsd/lowlevel.c:125 ../smsd/mysql.c:77 #: ../smsd/mysql.c:134 ../smsd/mysql.c:171 ../smsd/mysql.c:189 #: ../smsd/mysql.c:199 ../smsd/mysql.c:225 ../smsd/mysql.c:263 #: ../smsd/mysql.c:296 ../smsd/mysql.c:336 ../smsd/mysql.c:345 #: ../smsd/mysql.c:399 ../smsd/pq.c:68 ../smsd/pq.c:77 ../smsd/pq.c:121 #: ../smsd/pq.c:150 ../smsd/pq.c:190 ../smsd/pq.c:212 ../smsd/pq.c:241 #: ../smsd/pq.c:258 ../smsd/pq.c:296 ../smsd/pq.c:333 ../smsd/pq.c:376 #: ../smsd/pq.c:427 ../smsd/sqlite.c:58 ../smsd/sqlite.c:70 #: ../smsd/sqlite.c:240 #, c-format msgid "Error: %s\n" msgstr "Fehler: %s\n" #: ../gnokii/gnokii-dial.c:105 #, c-format msgid "" "usage: --setspeeddial number memory_type location\n" " number - phone number to be stored\n" " memory_type - memory type for the speed dial\n" " location - location in the speed dial memory\n" msgstr "" "Syntax: --setspeeddial Nummer Speichertyp Position\n" " Nummer - Zu speichernde Telefonnummer\n" " Speichertyp - Speichertyp für die Kurzwahl\n" " Position - Position im Kurzwahlspeicher\n" #: ../gnokii/gnokii-dial.c:128 ../gnokii/gnokii-phonebook.c:111 #: ../gnokii/gnokii-phonebook.c:487 #, c-format msgid "Unknown memory type %s (use ME, SM, ...)!\n" msgstr "Unbekannter Speicherbereich %s (nutze ME, SM, ...)!\n" #: ../gnokii/gnokii-dial.c:169 #, c-format msgid "Dialing failed: %s\n" msgstr "Wählen fehlgeschlagen: %s\n" #: ../gnokii/gnokii-dial.c:171 #, c-format msgid "Dialled call, id: %d (lowlevel id: %d)\n" msgstr "Ruf gewählt, Id: %d (systemnahe Id: %d)\n" #: ../gnokii/gnokii-dial.c:194 #, c-format msgid "" "usage: --answercall callid\n" " callid - call identifier\n" msgstr "" #: ../gnokii/gnokii-dial.c:225 #, c-format msgid "" "usage: --hangup callid\n" " callid - call identifier\n" msgstr "" #: ../gnokii/gnokii-dial.c:256 #, c-format msgid "" " usage: --divert\n" " -o operation\n" " --op operation operation to be executed, needs to be one\n" " of the following: register, enable, query,\n" " disable, erasure; this is required option\n" " -t type\n" " --type type type of the operation, needs to be one of\n" " the following: all, busy, noans, outofreach,\n" " notavail, unconditional; this is required " "option\n" " -c calltype\n" " --call calltype type of call for the operation, needs to be\n" " one of the following: all, voice, fax, data;\n" " this is optional\n" " -m sec\n" " --timeout sec timeout to be set; the value is in seconds\n" " -n msisdn\n" " --number msisdn number for redirection\n" "\n" msgstr "" #: ../gnokii/gnokii-dial.c:373 ../gnokii/gnokii-dial.c:374 #: ../gnokii/gnokii-dial.c:376 ../gnokii/gnokii-phonebook.c:199 #: ../gnokii/gnokii-phonebook.c:203 ../gnokii/gnokii-todo.c:119 #: ../gnokii/gnokii-todo.c:120 ../gnokii/gnokii-wap.c:89 #: ../gnokii/gnokii-wap.c:90 ../gnokii/gnokii-wap.c:220 #: ../gnokii/gnokii-wap.c:221 ../gnokii/gnokii-wap.c:222 #: ../gnokii/gnokii-wap.c:223 ../gnokii/gnokii-wap.c:224 #, c-format msgid "%s: %s\n" msgstr "%s: %s\n" #: ../gnokii/gnokii-dial.c:373 msgid "Divert type" msgstr "Umleitungstyp" #: ../gnokii/gnokii-dial.c:374 msgid "Call type" msgstr "Anruftyp" #: ../gnokii/gnokii-dial.c:377 #, c-format msgid "%s: %d\n" msgstr "%s: %d\n" #: ../gnokii/gnokii-dial.c:377 msgid "Timeout" msgstr "Zeitüberschreitung" #: ../gnokii/gnokii-dial.c:379 #, c-format msgid "Divert isn't active.\n" msgstr "Umleitung ist nicht aktiv.\n" #: ../gnokii/gnokii-file.c:53 #, c-format msgid "" "File options:\n" " --getfilelist remote_path\n" " --getfiledetailsbyid [id]\n" " --getfileid remote_filename\n" " --getfile remote_filename [local_filename]\n" " --getfilebyid id [local_filename]\n" " --getallfiles remote_path\n" " --putfile local_filename remote_filename\n" " --deletefile remote_filename\n" " --deletefilebyid id\n" msgstr "" #: ../gnokii/gnokii-file.c:98 ../gnokii/gnokii-file.c:192 #: ../gnokii/gnokii-file.c:377 #, c-format msgid "Failed to get info for %s: %s\n" msgstr "Holen der Info für %s fehlgeschlagen: %s\n" #: ../gnokii/gnokii-file.c:100 #, c-format msgid "Filelist for path %s:\n" msgstr "Dateiliste des Verzeichnis %s:\n" #: ../gnokii/gnokii-file.c:102 #, c-format msgid " %s\n" msgstr " %s\n" #: ../gnokii/gnokii-file.c:135 ../gnokii/gnokii-file.c:170 #, c-format msgid "Failed to get filename: %s\n" msgstr "Ermittlung des Dateinamens fehlgeschlagen: %s\n" #: ../gnokii/gnokii-file.c:142 #, c-format msgid "| %s (%d)\n" msgstr "| %s (%d)\n" #: ../gnokii/gnokii-file.c:167 #, c-format msgid " - %s (%d)\n" msgstr " - %s (%d)\n" #: ../gnokii/gnokii-file.c:194 #, c-format msgid "Fileid for file %s is %02x %02x %02x %02x %02x %02x\n" msgstr "Datei-ID der Datei %s ist %02x %02x %02x %02x %02x %02x\n" #: ../gnokii/gnokii-file.c:212 ../gnokii/gnokii-file.c:232 #, c-format msgid "Failed to delete %s: %s\n" msgstr "Löschen von %s fehlgeschlagen: %s\n" #: ../gnokii/gnokii-file.c:214 ../gnokii/gnokii-file.c:234 #, c-format msgid "Deleted: %s\n" msgstr "Gelöscht: %s\n" #: ../gnokii/gnokii-file.c:241 #, c-format msgid " usage: --getfile remote_filename [localfilename]\n" msgstr " Syntax: --getfile entfernt_liegende Datei [lokaler Name]\n" #: ../gnokii/gnokii-file.c:266 ../gnokii/gnokii-file.c:391 #, c-format msgid "Failed to get file %s: %s\n" msgstr "Zugriff auf die Datei %s fehlgeschlagen: %s\n" #: ../gnokii/gnokii-file.c:275 #, c-format msgid "Got file %s. Save to [%s]: " msgstr "Bekam Datei %s. Gespeichert unter [%s]: " #: ../gnokii/gnokii-file.c:290 ../gnokii/gnokii-file.c:345 #: ../gnokii/gnokii-file.c:396 ../gnokii/gnokii-logo.c:198 #: ../gnokii/gnokii-utils.c:93 ../gnokii/gnokii-utils.c:118 #: ../xgnokii/xgnokii_contacts.c:2620 ../xgnokii/xgnokii_dtmf.c:135 #: ../xgnokii/xgnokii_speed.c:417 #, c-format msgid "Can't open file %s for writing!\n" msgstr "Fehler beim Öffnen der Datei %s zum Schreiben!\n" #: ../gnokii/gnokii-file.c:294 ../gnokii/gnokii-file.c:349 #: ../gnokii/gnokii-file.c:400 #, c-format msgid "Failed to write to file %s.\n" msgstr "Fehler beim Schreiben von Datei %s.\n" #: ../gnokii/gnokii-file.c:305 #, c-format msgid " usage: --getfilebyid id [localfilename]\n" msgstr " Syntax: --getfilebyid id [lokale Datei]\n" #: ../gnokii/gnokii-file.c:332 #, c-format msgid "Failed to get file: %s\n" msgstr "Holen der Datei ist fehlgeschlagen: %s\n" #: ../gnokii/gnokii-file.c:393 #, c-format msgid "Got file %s.\n" msgstr "Datei %s erhalten.\n" #: ../gnokii/gnokii-file.c:415 #, c-format msgid " usage: --putfile local_filename remote_filename\n" msgstr " Syntax: --putfile lokale_Datei entfernt_liegende_Datei\n" #: ../gnokii/gnokii-file.c:444 #, c-format msgid "File %s corrupted!\n" msgstr "Datei %s ist beschädigt!\n" #: ../gnokii/gnokii-file.c:449 #, c-format msgid "Failed to put file to %s: %s\n" msgstr "Speichern einer Datei unter %s ist fehlgeschlagen: %s\n" #: ../gnokii/gnokii-logo.c:56 #, c-format msgid "" "Logo options:\n" " --sendlogo {caller|op|picture} destination logofile\n" " [network_code]\n" " --setlogo op [logofile [network_code]]\n" " --setlogo startup [logofile]\n" " --setlogo caller [logofile [caller_group_number [group_name]]]\n" " --setlogo {dealer|text} [text]\n" " --getlogo op [logofile [network_code]]\n" " --getlogo startup [logofile [network_code]]\n" " --getlogo caller [caller_group_number [logofile\n" " [network_code]]]\n" " --getlogo {dealer|text}\n" " --viewlogo logofile\n" msgstr "" #: ../gnokii/gnokii-logo.c:97 #, c-format msgid "Sending operator logo.\n" msgstr "Betreiberlogo wird gesendet.\n" #: ../gnokii/gnokii-logo.c:98 #, c-format msgid "Sending caller line identification logo.\n" msgstr "" #: ../gnokii/gnokii-logo.c:99 #, c-format msgid "Sending Multipart Message: Picture Message.\n" msgstr "Versende mehrteilige Nachricht: Bildnachricht.\n" #: ../gnokii/gnokii-logo.c:100 #, c-format msgid "Sending EMS-compliant Picture Message.\n" msgstr "Versende EMS gemäße Bildnachricht.\n" #: ../gnokii/gnokii-logo.c:101 #, c-format msgid "Sending EMS-compliant Animation.\n" msgstr "Versende EMS gemäße Animation.\n" #: ../gnokii/gnokii-logo.c:102 #, c-format msgid "You should specify what kind of logo to send!\n" msgstr "Sie müssen den zu sendenden Bildtyp angeben!\n" #: ../gnokii/gnokii-logo.c:118 #, c-format msgid "Cannot send logo: specified and loaded bitmap type differ!\n" msgstr "" "Logo kann nicht gesendet werden: Angegebener und tatsächlicher Bildtyp sind " "unterschiedlich!\n" #: ../gnokii/gnokii-logo.c:156 ../gnokii/gnokii-ringtone.c:148 #: ../gnokii/gnokii-sms.c:352 #, c-format msgid "Message sent in %d parts with reference numbers:" msgstr "Nachricht in %d Teilen gesendet, Referenznummern:" #: ../gnokii/gnokii-logo.c:161 ../gnokii/gnokii-ringtone.c:153 #: ../gnokii/gnokii-sms.c:357 #, c-format msgid "Send succeeded with reference %d!\n" msgstr "Senden mit Referenz %d erfolgreich!\n" #: ../gnokii/gnokii-logo.c:163 ../gnokii/gnokii-ringtone.c:155 #: ../gnokii/gnokii-sms.c:359 #, c-format msgid "SMS Send failed (%s)\n" msgstr "SMS senden fehlgeschlagen (%s)\n" #: ../gnokii/gnokii-logo.c:180 #, c-format msgid "Saving logo. File \"%s\" exists. (O)verwrite, create (n)ew or (s)kip ? " msgstr "" "Logo speichern. Datei \"%s\" existiert bereits. (E)rsetzen, (N)eue erstellen " "oder Ü(b)erspringen? " #: ../gnokii/gnokii-logo.c:182 msgid "O" msgstr "O" #: ../gnokii/gnokii-logo.c:182 msgid "o" msgstr "o" #: ../gnokii/gnokii-logo.c:183 msgid "N" msgstr "N" #: ../gnokii/gnokii-logo.c:183 msgid "n" msgstr "n" #: ../gnokii/gnokii-logo.c:184 msgid "S" msgstr "S" #: ../gnokii/gnokii-logo.c:184 msgid "s" msgstr "s" #: ../gnokii/gnokii-logo.c:188 #, c-format msgid "Enter name of new file: " msgstr "Geben Sie den neuen Dateinamen an: " #: ../gnokii/gnokii-logo.c:233 #, c-format msgid "Dealer welcome note " msgstr "Begrüßungstext des Händlers" #: ../gnokii/gnokii-logo.c:235 ../gnokii/gnokii-logo.c:242 #, c-format msgid "currently set to \"%s\"\n" msgstr "derzeit gesetzt auf: \"%s\"\n" #: ../gnokii/gnokii-logo.c:237 ../gnokii/gnokii-logo.c:244 #, c-format msgid "currently empty\n" msgstr "derzeit leer\n" #: ../gnokii/gnokii-logo.c:240 #, c-format msgid "Welcome note " msgstr "Begrüßungstext " #: ../gnokii/gnokii-logo.c:250 #, c-format msgid "Operator logo for %s (%s) network got successfully\n" msgstr "Betreiberlogo für %s (%s) Netzwerk erfolgreich erhalten\n" #: ../gnokii/gnokii-logo.c:255 ../gnokii/gnokii-logo.c:267 #: ../gnokii/gnokii-logo.c:282 ../gnokii/gnokii-logo.c:363 #, c-format msgid "Sorry, gnokii doesn't know %s network !\n" msgstr "Gnokii kennt das %s Netzwerk leider nicht!\n" #: ../gnokii/gnokii-logo.c:263 #, c-format msgid "Startup logo got successfully\n" msgstr "Startlogo erfolgreich erhalten\n" #: ../gnokii/gnokii-logo.c:274 ../gnokii/gnokii-logo.c:291 #, c-format msgid "Your phone doesn't have logo uploaded !\n" msgstr "Ihr Telefon hat kein Bild gespeichert!\n" #: ../gnokii/gnokii-logo.c:276 #, c-format msgid "Caller logo got successfully\n" msgstr "Kontaktbild erfolgreich erhalten\n" #: ../gnokii/gnokii-logo.c:277 #, c-format msgid "Caller group name: %s, ringing tone: %s (%d)\n" msgstr "Namen der Anrufgruppe: %s, Ruftone: %s (%d)\n" #: ../gnokii/gnokii-logo.c:288 #, c-format msgid "Unknown bitmap type.\n" msgstr "Unbekannter Bitmap-Typ.\n" #: ../gnokii/gnokii-logo.c:302 #, c-format msgid "What kind of logo do you want to get ?\n" msgstr "Welchen Bildtyp möchten sie haben?\n" #: ../gnokii/gnokii-logo.c:320 #, c-format msgid "Error while reading file \"%s\": %s\n" msgstr "Fehler beim Lesen der Datei \"%s\": %s\n" #: ../gnokii/gnokii-logo.c:398 #, c-format msgid "What kind of logo do you want to set ?\n" msgstr "Welchen Bildtyp möchten Sie setzen?\n" #: ../gnokii/gnokii-logo.c:434 #, c-format msgid "Error setting dealer welcome note - " msgstr "Fehler beim Setzen des Begrüßungstextes des Händlers - " #: ../gnokii/gnokii-logo.c:436 #, c-format msgid "Error setting welcome note - " msgstr "Fehler beim Setzen des Begrüßungstexts - " #: ../gnokii/gnokii-logo.c:440 #, c-format msgid "SIM card and PIN is required\n" msgstr "SIM Karte und PIN sind erforderlich\n" #: ../gnokii/gnokii-logo.c:447 #, c-format msgid "too long, truncated to \"%s\" (length %zi)\n" msgstr "zu lang, gekürzt zu \"%s\" (Länge: %zi)\n" #: ../gnokii/gnokii-logo.c:455 #, c-format msgid "Error setting startup logo - SIM card and PIN is required\n" msgstr "Fehler beim Setzen des Startlogos - SIM Karte und PIN benötigt\n" #: ../gnokii/gnokii-logo.c:456 #, c-format msgid "i: %i, %2x %2x\n" msgstr "i: %i, %2x %2x\n" #: ../gnokii/gnokii-logo.c:466 #, c-format msgid "Done.\n" msgstr "Fertig.\n" #: ../gnokii/gnokii-logo.c:481 #, c-format msgid "Could not load bitmap: %s\n" msgstr "Konnte Bild: %s nicht laden.\n" #: ../gnokii/gnokii-mms.c:46 #, c-format msgid "" "MMS options:\n" " --getmms memory_type start [end] [{--mime|--pdu|--raw} file]\n" " [-d|--delete] [-o|--overwrite]\n" " --deletemms memory_type start [end]\n" msgstr "" #: ../gnokii/gnokii-mms.c:56 #, c-format msgid "" " usage: --getmms memory start [end] retrieves messages from memory type " "(SM, ME,\n" " IN, OU, ...) starting from\n" " location start and ending with end;\n" " if end option is omitted, just one " "entry\n" " is read;\n" " start must be a number, end may be a " "number\n" " or 'end' string;\n" " if 'end' is used entries are being read\n" " until empty location\n" " --mime filename convert MMS in MIME format and save it " "to\n" " the given file;\n" " --pdu filename extract MMS from raw format and save it " "to\n" " the given file;\n" " --raw filename get MMS from phone and save it unchanged " "to\n" " the given file;\n" " --delete\n" " -d delete MMS after reading\n" " --overwrite\n" " -o overwrite destination file without " "asking\n" "\n" msgstr "" #: ../gnokii/gnokii-mms.c:82 ../gnokii/gnokii-sms.c:749 #, c-format msgid "%d. %s (%s)\n" msgstr "%d. %s (%s)\n" #: ../gnokii/gnokii-mms.c:82 msgid "MMS" msgstr "MMS" #: ../gnokii/gnokii-mms.c:113 ../gnokii/gnokii-mms.c:201 #: ../gnokii/gnokii-mms.c:243 ../gnokii/gnokii-sms.c:486 #: ../gnokii/gnokii-sms.c:658 ../gnokii/gnokii-sms.c:884 #: ../gnokii/gnokii-sms.c:936 #, c-format msgid "Unknown memory type %s (use ME, SM, IN, OU, ...)!\n" msgstr "Unbekannter Speicherbereich %s (nutze ME, SM, IN, OU, ...)!\n" #: ../gnokii/gnokii-mms.c:114 ../gnokii/gnokii-mms.c:202 #: ../gnokii/gnokii-mms.c:244 ../gnokii/gnokii-sms.c:487 #: ../gnokii/gnokii-sms.c:659 ../gnokii/gnokii-sms.c:885 #: ../gnokii/gnokii-sms.c:937 #, c-format msgid "" "Run gnokii --showsmsfolderstatus for a list of supported memory types.\n" msgstr "" "Rufen Sie gnokii --showsmsfolderstatus auf, um eine Liste aller " "unterstützter Speicherbereiche zu erhalten.\n" #: ../gnokii/gnokii-mms.c:150 ../gnokii/gnokii-sms.c:715 #, c-format msgid "Saving into %s\n" msgstr "Gespeichert in %s\n" #: ../gnokii/gnokii-mms.c:187 ../gnokii/gnokii-sms.c:876 #, c-format msgid "(delete failed)\n" msgstr "(löschen fehlgeschlagen)\n" #: ../gnokii/gnokii-mms.c:189 ../gnokii/gnokii-sms.c:878 #, c-format msgid "(message deleted)\n" msgstr "(Nachricht gelöscht)\n" #: ../gnokii/gnokii-mms.c:199 #, c-format msgid "Getting MMS failed (location %d from memory %s)! (%s)\n" msgstr "Abholen einer MMS schlug fehl (Position %d im Speicher %s)! (%s)\n" #: ../gnokii/gnokii-mms.c:219 #, c-format msgid "" " usage: --deletemms memory start [end] deletes messages from memory type\n" " (SM, ME, IN, OU, ...) starting\n" " from location start and ending with " "end;\n" " if end option is omitted, just one " "entry\n" " is removed;\n" " if 'end' is used entries are being " "removed\n" " until empty location\n" "\n" msgstr "" #: ../gnokii/gnokii-mms.c:262 #, c-format msgid "Deleted MMS (location %d from memory %s)\n" msgstr "Gelöschte MMS (Position %d im Speicher %s)\n" #: ../gnokii/gnokii-mms.c:266 #, c-format msgid "Deleting MMS failed (location %d from memory %s)! (%s)\n" msgstr "Löschen einer MMS schlug fehl (Position %d im Speicher %s)! (%s)\n" #: ../gnokii/gnokii-monitor.c:67 #, c-format msgid "" "Monitoring options:\n" " --monitor [delay|once]\n" " --getdisplaystatus\n" " --displayoutput\n" " --netmonitor {reset|off|field|devel|next|nr}\n" msgstr "" "Überwachungsoptionen:\n" " --monitor [Verzögerung|once]\n" " --getdisplaystatus\n" " --displayoutput\n" " --netmonitor {reset|off|field|devel|next|nr}\n" #: ../gnokii/gnokii-monitor.c:79 #, c-format msgid "INCOMING CALL: ID: %d, Number: %s, Name: \"%s\"\n" msgstr "EINGEHENDER ANRUF: ID: %d, Nummer: %s, Name: \"%s\"\n" #: ../gnokii/gnokii-monitor.c:82 #, c-format msgid "CALL %d TERMINATED (LOCAL)\n" msgstr "Anruf %d von Ihnen beendet.\n" #: ../gnokii/gnokii-monitor.c:85 #, c-format msgid "CALL %d TERMINATED (REMOTE)\n" msgstr "Anruf %d von der Gegenstelle beendet.\n" #: ../gnokii/gnokii-monitor.c:88 #, c-format msgid "CALL %d ACCEPTED BY THE REMOTE SIDE\n" msgstr "ANRUF %d WURDE VON DER GEGENSTELLE ANGENOMMEN\n" #: ../gnokii/gnokii-monitor.c:91 #, c-format msgid "CALL %d PLACED ON HOLD\n" msgstr "ANRUF %d WIRD GEHALTEN\n" #: ../gnokii/gnokii-monitor.c:94 #, c-format msgid "CALL %d RETRIEVED FROM HOLD\n" msgstr "ANRUF %d WURDE FORTGESETZT\n" #: ../gnokii/gnokii-monitor.c:135 #, c-format msgid "CALL%d: IDLE\n" msgstr "ANRUF %d: INAKTIV\n" #: ../gnokii/gnokii-monitor.c:143 msgid "RINGING" msgstr "LÄUTEND" #: ../gnokii/gnokii-monitor.c:147 msgid "DIALING" msgstr "WÄHLEND" #: ../gnokii/gnokii-monitor.c:151 msgid "ESTABLISHED" msgstr "ETABLIERT" #: ../gnokii/gnokii-monitor.c:155 msgid "ON HOLD" msgstr "GEHALTEN" #: ../gnokii/gnokii-monitor.c:159 msgid "UNKNOWN STATE" msgstr "UNBEKANNTER STATUS" #: ../gnokii/gnokii-monitor.c:164 #, c-format msgid "CALL%d: %s %s (%s) (callid: %d, duration: %d sec)\n" msgstr "ANRUF%d: %s %s (%s) (Anruf-Id: %d, Dauer: %d sec)\n" #: ../gnokii/gnokii-monitor.c:182 #, c-format msgid "LAC: %04x (%d), CellID: %08x (%d)\n" msgstr "LAC: %04x (%d), CellID: %08x (%d)\n" #: ../gnokii/gnokii-monitor.c:212 #, c-format msgid "Argument to --monitor delay needs to be positive number\n" msgstr "" #: ../gnokii/gnokii-monitor.c:226 #, c-format msgid "Entering monitor mode...\n" msgstr "Wechsle in den Monitormodus...\n" #: ../gnokii/gnokii-monitor.c:254 #, c-format msgid "Network: %s, %s (%s)\n" msgstr "Netzwerk: %s, %s (%s)\n" #: ../gnokii/gnokii-monitor.c:262 #, c-format msgid "RFLevel: %d\n" msgstr "Empfangsstärke: %d\n" #: ../gnokii/gnokii-monitor.c:265 #, c-format msgid "Battery: %d\n" msgstr "Batterie: %d\n" #: ../gnokii/gnokii-monitor.c:268 #, c-format msgid "Power Source: %s\n" msgstr "Stromquelle: %s\n" #: ../gnokii/gnokii-monitor.c:272 #, c-format msgid "SIM: Used %d, Free %d\n" msgstr "SIM: Benutzt %d, Frei %d\n" #: ../gnokii/gnokii-monitor.c:276 #, c-format msgid "Phone: Used %d, Free %d\n" msgstr "Telefon: Benutzt %d, Frei %d\n" #: ../gnokii/gnokii-monitor.c:280 #, c-format msgid "DC: Used %d, Free %d\n" msgstr "DC: Benutzt %d, Frei %d\n" #: ../gnokii/gnokii-monitor.c:284 #, c-format msgid "EN: Used %d, Free %d\n" msgstr "EN: Benutzt %d, Frei %d\n" #: ../gnokii/gnokii-monitor.c:288 #, c-format msgid "FD: Used %d, Free %d\n" msgstr "FD: Benutzt %d, Frei %d\n" #: ../gnokii/gnokii-monitor.c:292 #, c-format msgid "LD: Used %d, Free %d\n" msgstr "LD: Benutzt %d, Frei %d\n" #: ../gnokii/gnokii-monitor.c:296 #, c-format msgid "MC: Used %d, Free %d\n" msgstr "MC: Benutzt %d, Frei %d\n" #: ../gnokii/gnokii-monitor.c:300 #, c-format msgid "ON: Used %d, Free %d\n" msgstr "ON: Benutzt %d, Frei %d\n" #: ../gnokii/gnokii-monitor.c:304 #, c-format msgid "RC: Used %d, Free %d\n" msgstr "RC: Benutzt %d, Frei %d\n" #: ../gnokii/gnokii-monitor.c:307 #, c-format msgid "SMS Messages: Unread %d, Number %d\n" msgstr "SMS Nachrichten: Ungelesen %d, Anzahl %d\n" #: ../gnokii/gnokii-monitor.c:313 #, c-format msgid "Cell broadcast received on channel %d: %s\n" msgstr "Broadcast der Zelle auf Kanel %d empfangen: %s\n" #: ../gnokii/gnokii-monitor.c:323 #, c-format msgid "Leaving monitor mode...\n" msgstr "Verlasse Monitormodus...\n" #: ../gnokii/gnokii-monitor.c:330 #, c-format msgid "Call in progress: %-3s\n" msgstr "Anruf in Arbeit: %-3s\n" #: ../gnokii/gnokii-monitor.c:331 ../gnokii/gnokii-monitor.c:333 #: ../gnokii/gnokii-monitor.c:335 ../gnokii/gnokii-monitor.c:337 #: ../gnokii/gnokii-monitor.c:339 ../gnokii/gnokii-monitor.c:341 #: ../gnokii/gnokii-monitor.c:343 ../gnokii/gnokii-monitor.c:345 #: ../gnokii/gnokii-settings.c:200 msgid "on" msgstr "an" #: ../gnokii/gnokii-monitor.c:331 ../gnokii/gnokii-monitor.c:333 #: ../gnokii/gnokii-monitor.c:335 ../gnokii/gnokii-monitor.c:337 #: ../gnokii/gnokii-monitor.c:339 ../gnokii/gnokii-monitor.c:341 #: ../gnokii/gnokii-monitor.c:343 ../gnokii/gnokii-monitor.c:345 #: ../gnokii/gnokii-settings.c:200 msgid "off" msgstr "out" #: ../gnokii/gnokii-monitor.c:332 #, c-format msgid "Unknown: %-3s\n" msgstr "Unbekannt: %-3s\n" #: ../gnokii/gnokii-monitor.c:334 #, c-format msgid "Unread SMS: %-3s\n" msgstr "Ungelesene SMS: %-3s\n" #: ../gnokii/gnokii-monitor.c:336 #, c-format msgid "Voice call: %-3s\n" msgstr "Sprachanruf: %-3s\n" #: ../gnokii/gnokii-monitor.c:338 #, c-format msgid "Fax call active: %-3s\n" msgstr "Aktiver Faxanruf: %-3s\n" #: ../gnokii/gnokii-monitor.c:340 #, c-format msgid "Data call active: %-3s\n" msgstr "Aktiver Data-Call: %-3s\n" #: ../gnokii/gnokii-monitor.c:342 #, c-format msgid "Keyboard lock: %-3s\n" msgstr "Tastatursperre: %-3s\n" #: ../gnokii/gnokii-monitor.c:344 #, c-format msgid "SMS storage full: %-3s\n" msgstr "SMS Speicher voll: %-3s\n" #: ../gnokii/gnokii-monitor.c:430 #, c-format msgid "Entered display monitoring mode...\n" msgstr "Wechsle in den Display-Monitor-Modus...\n" #: ../gnokii/gnokii-monitor.c:447 ../gnokii/gnokii-sms.c:1322 #, c-format msgid "Shutting down\n" msgstr "Abschalten\n" #: ../gnokii/gnokii-monitor.c:449 #, c-format msgid "Leaving display monitor mode...\n" msgstr "Verlasse den Display-Monitor-Modus...\n" #: ../gnokii/gnokii-monitor.c:490 #, c-format msgid " usage: --netmonitor {reset|off|field|devel|next|nr}\n" msgstr " Syntax: --netmonitor {reset|off|field|devel|next|nr}\n" #: ../gnokii/gnokii-other.c:59 #, c-format msgid "" "Misc options:\n" " --keysequence\n" " --enterchar\n" " --listnetworks\n" " --getnetworkinfo\n" msgstr "" "Verschiedene Optionen:\n" " --keysequence\n" " --enterchar\n" " --listnetworks\n" " --getnetworkinfo\n" #: ../gnokii/gnokii-other.c:96 #, c-format msgid "Failed to press key: %s\n" msgstr "Tastendruck fehlgeschlagen: %s\n" #: ../gnokii/gnokii-other.c:155 #, c-format msgid "Error entering char: %s\n" msgstr "Fehler bei der Eingabe eines Zeichens: %s\n" #: ../gnokii/gnokii-other.c:169 #, c-format msgid "Network Name\n" msgstr "Netzwerkname\n" #: ../gnokii/gnokii-other.c:170 #, c-format msgid "-----------------------------------------\n" msgstr "-----------------------------------------\n" #: ../gnokii/gnokii-other.c:172 #, c-format msgid "%-7s %s (%s)\n" msgstr "%-7s %s (%s)\n" #: ../gnokii/gnokii-other.c:202 #, c-format msgid "Network : %s (%s)\n" msgstr "Netzwerk : %s (%s)\n" #: ../gnokii/gnokii-other.c:205 #, c-format msgid "Network code : %s\n" msgstr "Netzwerkcode : %s\n" #: ../gnokii/gnokii-other.c:206 #, c-format msgid "LAC : %04x (%d)\n" msgstr "LAC : %04x (%d)\n" #: ../gnokii/gnokii-other.c:207 #, c-format msgid "Cell id : %08x (%d)\n" msgstr "Zellen-ID : %08x (%d)\n" #: ../gnokii/gnokii-phonebook.c:55 #, c-format msgid "" "Phonebook options:\n" " --getphonebook memory_type start_number [end_number|end]\n" " [[-r|--raw]|[-v|--vcard]|[-l|--ldif]]\n" " --writephonebook [[-o|--overwrite]|[-f|--find-free]]\n" " [-m|--memory-type|--memory memory_type]\n" " [-n|--memory-location|--location number]\n" " [[-v|--vcard]|[-l|--ldif]]\n" " --deletephonebook memory_type start_number [end_number|end]\n" msgstr "" #: ../gnokii/gnokii-phonebook.c:68 #, c-format msgid "" " usage: --getphonebook memory start [end] reads phonebook entries from " "memory type\n" " (SM, ME, IN, OU, ...) messages " "starting\n" " from location start and ending with " "end;\n" " if end option is omitted, just one " "entry\n" " is read;\n" " if 'end' is used all entries are " "read\n" " -r\n" " --raw output in raw form (comma " "separated)\n" " -v\n" " --vcard output in vcard format\n" " -l\n" " --ldif output in ldif format\n" "\n" msgstr "" #: ../gnokii/gnokii-phonebook.c:187 #, c-format msgid "%d. %s: %s\n" msgstr "%d. %s: %s\n" #: ../gnokii/gnokii-phonebook.c:199 msgid "Caller group" msgstr "Anrufgruppe" #: ../gnokii/gnokii-phonebook.c:208 #, c-format msgid "Address information:\n" msgstr "Adressinformationen:\n" #: ../gnokii/gnokii-phonebook.c:210 ../gnokii/gnokii-phonebook.c:212 #: ../gnokii/gnokii-phonebook.c:214 ../gnokii/gnokii-phonebook.c:216 #: ../gnokii/gnokii-phonebook.c:218 ../gnokii/gnokii-phonebook.c:220 #: ../gnokii/gnokii-phonebook.c:222 #, c-format msgid " %s: %s\n" msgstr " %s: %s\n" #: ../gnokii/gnokii-phonebook.c:210 msgid "Post office address" msgstr "Postadresse" #: ../gnokii/gnokii-phonebook.c:233 #, c-format msgid "%04u.%02u.%02u %02u:%02u:%02u" msgstr "%04u.%02u.%02u %02u:%02u:%02u" #: ../gnokii/gnokii-phonebook.c:247 #, c-format msgid "Date: %04u.%02u.%02u %02u:%02u:%02u\n" msgstr "Datum: %04u.%02u.%02u %02u:%02u:%02u\n" #: ../gnokii/gnokii-phonebook.c:252 #, c-format msgid "Empty memory location. Skipping.\n" msgstr "Leerer Speicherplatz. Überspringe.\n" #: ../gnokii/gnokii-phonebook.c:255 #, c-format msgid "Error reading from the location %d in memory %s\n" msgstr "Fehler beim Lesen von Position %d im Speicher %s\n" #: ../gnokii/gnokii-phonebook.c:272 #, c-format msgid "" " usage: --writephonebook [[-o|--overwrite]|[-f|--find-free]]\n" " [-m|--memory-type|--memory memory_type]\n" " [-n|--memory-location|--location number]\n" " [[-v|--vcard]|[-l|--ldif]]\n" "\n" msgstr "" #: ../gnokii/gnokii-phonebook.c:416 #, c-format msgid "Location busy. " msgstr "Position besetzt. " #: ../gnokii/gnokii-phonebook.c:419 ../gnokii/gnokii-sms.c:540 #: ../gnokii/gnokii-sms.c:831 ../gnokii/gnokii-utils.c:61 #, c-format msgid "Overwrite? (yes/no) " msgstr "Überschreiben? (ja/nein) " #: ../gnokii/gnokii-phonebook.c:423 ../gnokii/gnokii-sms.c:543 #: ../gnokii/gnokii-utils.c:65 ../gnokii/gnokii-wap.c:223 msgid "no" msgstr "nein" #: ../gnokii/gnokii-phonebook.c:426 #, c-format msgid "" "\n" "Incorrect answer [%s]. Assuming 'no'.\n" msgstr "" "\n" "Fehlerhafte Antwort (%s). Nehme 'nein' an.\n" #: ../gnokii/gnokii-phonebook.c:446 #, c-format msgid "Write Succeeded: memory type: %s, loc: %d, name: %s, number: %s\n" msgstr "" "Schreiben erfolgreich: Speicherbereich: %s, Position: %d, Name: %s, Nummer: " "%s\n" #: ../gnokii/gnokii-phonebook.c:453 ../gnokii/gnokii-phonebook.c:458 #, c-format msgid "Write failed (%s): memory type: %s, loc: %d, name: %s, number: %s\n" msgstr "" "Schreiben fehlgeschlagen(%s): Speicherbereich: %s, Position: %d, Name: %s, " "Nummer: %s\n" #: ../gnokii/gnokii-phonebook.c:466 #, c-format msgid "" " usage: --deletephonebook memory_type start_number [end_number|end]\n" "\n" msgstr "" " Syntax: --deletephonebook Speichertyp Startnummer [Endnummer|end]\n" "\n" #: ../gnokii/gnokii-phonebook.c:505 #, c-format msgid "Phonebook entry removed: memory type: %s, loc: %d\n" msgstr "Eintrag aus dem Telefonbuch gelöscht: Speichertyp: %s, Position: %d\n" #: ../gnokii/gnokii-phonebook.c:512 #, c-format msgid "Phonebook entry removal FAILED (%s): memory type: %s, loc: %d\n" msgstr "" "Entfernen eines Eintrags aus dem Telefonbuch schlug fehl (%s): Speichertyp: " "%s, Position: %d\n" #: ../gnokii/gnokii-profile.c:55 #, c-format msgid "" "Profile options:\n" " --getprofile [start_number [end_number]] [-r|--raw]\n" " --setprofile\n" " --getactiveprofile\n" " --setactiveprofile profile_number\n" msgstr "" "Profiloptionen:\n" " --getprofile [Startnummer [Endnummer]] [-r|--raw]\n" " --setprofile\n" " --getactiveprofile\n" " --setactiveprofile Profilnummer\n" #: ../gnokii/gnokii-profile.c:65 #, c-format msgid " usage: --getprofile [start_number [end_number]] [-r|--raw]\n" msgstr " Syntax: --getprofile [Startnummer [Endnummer]] [-r|--raw]\n" #: ../gnokii/gnokii-profile.c:133 #, c-format msgid "Starting profile number is greater than stop\n" msgstr "" #: ../gnokii/gnokii-profile.c:138 #, c-format msgid "Profile number must be value from 0 to %d!\n" msgstr "Nummer des Profiles muß ein Wert zwischen 0 und %d sein!\n" #: ../gnokii/gnokii-profile.c:143 #, c-format msgid "This phone supports only %d profiles!\n" msgstr "Dieses Telefon unterstützt nur %d Profile!\n" #: ../gnokii/gnokii-profile.c:161 ../gnokii/gnokii-profile.c:254 #, c-format msgid "Cannot get profile %d\n" msgstr "Kann Profil %d nicht holen\n" #. Translators: %d is the profile number, %s is the profile name. Example: 1. "Outdoors" #: ../gnokii/gnokii-profile.c:175 #, c-format msgid "%d. \"%s\"\n" msgstr "%d. \"%s\"\n" #: ../gnokii/gnokii-profile.c:176 #, c-format msgid " (name defined)\n" msgstr " (Name definiert)\n" #: ../gnokii/gnokii-profile.c:177 #, c-format msgid "Incoming call alert: %s\n" msgstr "Signalton für ankommende Nachrichten: %s\n" #: ../gnokii/gnokii-profile.c:178 #, c-format msgid "Ringing tone: %s (%d)\n" msgstr "Rufton: %s (%d)\n" #: ../gnokii/gnokii-profile.c:179 #, c-format msgid "Ringing volume: %s\n" msgstr "Lautstärke des Ruftones: %s\n" #: ../gnokii/gnokii-profile.c:180 #, c-format msgid "Message alert tone: %s\n" msgstr "Signalton für Nachrichten: %s\n" #: ../gnokii/gnokii-profile.c:181 #, c-format msgid "Keypad tones: %s\n" msgstr "Tastentöne: %s\n" #: ../gnokii/gnokii-profile.c:182 #, c-format msgid "Warning and game tones: %s\n" msgstr "Warn- und Spieltöne: %s\n" #. FIXME: Light settings is only used for Car #: ../gnokii/gnokii-profile.c:185 #, c-format msgid "Lights: %s\n" msgstr "Beleutung: %s\n" #: ../gnokii/gnokii-profile.c:186 #, c-format msgid "Vibration: %s\n" msgstr "Vibration: %s\n" #. FIXME: it will be nice to add here reading caller group name. #: ../gnokii/gnokii-profile.c:189 #, c-format msgid "Caller groups: 0x%02x\n" msgstr "Anrufgruppen: 0x%02x\n" #. FIXME: Automatic answer is only used for Car and Headset. #: ../gnokii/gnokii-profile.c:192 #, c-format msgid "Automatic answer: %s\n" msgstr "Automatische Antwort: %s\n" #: ../gnokii/gnokii-profile.c:223 ../gnokii/gnokii-sms.c:1120 #: ../gnokii/gnokii-wap.c:285 #, c-format msgid "Input line format isn't valid\n" msgstr "Das Format der Eingabezeile ist ungültig\n" #: ../gnokii/gnokii-profile.c:229 #, c-format msgid "Cannot set profile: %s\n" msgstr "Kann das Profil nicht wechseln: %s\n" #: ../gnokii/gnokii-profile.c:248 #, c-format msgid "Cannot get active profile: %s\n" msgstr "Kann das aktive Profil nicht ermitteln: %s\n" #: ../gnokii/gnokii-profile.c:256 #, c-format msgid "Active profile: %d (%s)\n" msgstr "Aktives Profil: %d (%s)\n" #: ../gnokii/gnokii-profile.c:263 #, c-format msgid " usage: --setactiveprofile profile_number\n" msgstr " Syntax: --setactiveprofile Profilnummer\n" #: ../gnokii/gnokii-profile.c:281 #, c-format msgid "Cannot set active profile to %d: %s\n" msgstr "Kann das aktive Profil nicht zu %d wechseln: %s\n" #: ../gnokii/gnokii-ringtone.c:96 #, c-format msgid "" "Ringtone options:\n" " --sendringtone rtttlfile destination\n" " --getringtone rtttlfile [location] [-r|--raw]\n" " --setringtone rtttlfile [location] [-r|--raw] [--name name]\n" " --playringtone rtttlfile [--volume vol]\n" " --ringtoneconvert source destination\n" " --getringtonelist\n" " --deleteringtone start [end]\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:117 ../gnokii/gnokii-ringtone.c:392 #: ../gnokii/gnokii-ringtone.c:447 #, c-format msgid "Failed to load ringtone: %s\n" msgstr "Laden des Ruftones schlug fehl: %s\n" #: ../gnokii/gnokii-ringtone.c:162 #, c-format msgid " usage: --getringtone rtttlfile [location] [-r|--raw]\n" msgstr " Syntax: --getringtone rtttl-Datei [Position] [-r|--raw]\n" #: ../gnokii/gnokii-ringtone.c:216 #, c-format msgid "Getting ringtone %d failed: %s\n" msgstr "Holen des Ruftones %d schlug fehl: %s\n" #: ../gnokii/gnokii-ringtone.c:219 #, c-format msgid "Getting ringtone %d (\"%s\") succeeded!\n" msgstr "Holen des Ruftones %d (\"%s\") erfolgreich!\n" #: ../gnokii/gnokii-ringtone.c:222 ../gnokii/gnokii-ringtone.c:303 #: ../gnokii/gnokii-ringtone.c:387 #, c-format msgid "Internal gnokii error: null filename\n" msgstr "Interner Fehler in gnokii: leerer Dateiname\n" #: ../gnokii/gnokii-ringtone.c:231 #, c-format msgid "Failed to save ringtone.\n" msgstr "Speichern des Ruftones fehlgeschlagen.\n" #: ../gnokii/gnokii-ringtone.c:236 #, c-format msgid "Failed to write ringtone.\n" msgstr "Schreiben des Ruftones fehlgeschlagen.\n" #: ../gnokii/gnokii-ringtone.c:242 ../gnokii/gnokii-ringtone.c:451 #, c-format msgid "Failed to save ringtone: %s\n" msgstr "Speichern des Ruftones schlug fehl: %s\n" #: ../gnokii/gnokii-ringtone.c:252 #, c-format msgid " usage: --setringtone rtttlfile [location] [-r|--raw] [--name name]\n" msgstr "" " Syntax: --setringtone rtttl-Datei [Position] [-r|--raw] [--name Name]\n" #: ../gnokii/gnokii-ringtone.c:311 ../gnokii/gnokii-ringtone.c:324 #, c-format msgid "Failed to load ringtone.\n" msgstr "Laden des Ruftones schlug fehl.\n" #: ../gnokii/gnokii-ringtone.c:333 #, c-format msgid "Send succeeded!\n" msgstr "Senden erfolgreich!\n" #: ../gnokii/gnokii-ringtone.c:335 #, c-format msgid "Send failed: %s\n" msgstr "Senden fehlgeschlagen: %s\n" #: ../gnokii/gnokii-ringtone.c:342 #, c-format msgid " usage: --playringtone rtttlfile [-v|--volume vol]\n" msgstr " Syntax: --playringtone rtttl-Datei [-v|--volume Lautstärke]\n" #: ../gnokii/gnokii-ringtone.c:424 #, c-format msgid "Play succeeded!\n" msgstr "Abspielen erfolgreich!\n" #: ../gnokii/gnokii-ringtone.c:426 #, c-format msgid "Play failed: %s\n" msgstr "Abspiehlen fehlgeschlagen: %s\n" #: ../gnokii/gnokii-ringtone.c:433 #, c-format msgid " usage: --ringtoneconvert source destination\n" msgstr " Syntax: --ringtoneconvert Quelle Ziel\n" #: ../gnokii/gnokii-ringtone.c:455 #, c-format msgid "%d note(s) converted.\n" msgstr "%d Notiz(en) konvertiert.\n" #: ../gnokii/gnokii-ringtone.c:467 #, c-format msgid "Failed to get the list of ringtones\n" msgstr "Ermitteln aller Ruftöne fehlgeschlagen\n" #: ../gnokii/gnokii-ringtone.c:471 #, c-format msgid "First user defined ringtone location: %3d\n" msgstr "Position des ersten Nutzerruftones: %3d\n" #: ../gnokii/gnokii-ringtone.c:472 #, c-format msgid "" "Number of user defined ringtones: %d\n" "\n" msgstr "" "Anzahl der Ruftöne des Nutzers: %d\n" "\n" #: ../gnokii/gnokii-ringtone.c:473 #, c-format msgid "loc rwu name\n" msgstr "Position RWU Name\n" #: ../gnokii/gnokii-ringtone.c:474 #, c-format msgid "===============================\n" msgstr "===============================\n" #: ../gnokii/gnokii-ringtone.c:476 #, c-format msgid "%3d %d%d%d %-20s\n" msgstr "%3d %d%d%d %-20s\n" #: ../gnokii/gnokii-ringtone.c:488 #, c-format msgid " usage: --deleteringtone start [end]\n" msgstr " Syntax: --deleteringtone Start [Ende]\n" #: ../gnokii/gnokii-ringtone.c:512 #, c-format msgid "Ringtone %d deleted\n" msgstr "Rufton %d gelöscht\n" #: ../gnokii/gnokii-ringtone.c:514 #, c-format msgid "Failed to delete ringtone %d: %s\n" msgstr "Löschen des Ruftones %d fehlgeschlagen: %s\n" #: ../gnokii/gnokii-security.c:59 #, c-format msgid "" "Security options:\n" " --identify\n" " --getlocksinfo\n" msgstr "" "Sicherheitsoptionen:\n" " --identify\n" " --getlocksinfo\n" #: ../gnokii/gnokii-security.c:65 #, c-format msgid "" " --entersecuritycode PIN|PIN2|PUK|PUK2|SEC [COMMAND]\n" " --getsecuritycodestatus\n" " --getsecuritycode\n" " --changesecuritycode PIN|PIN2|PUK|PUK2\n" msgstr "" " --entersecuritycode PIN|PIN2|PUK|PUK2|SEC [Kommando]\n" " --getsecuritycodestatus\n" " --getsecuritycode\n" " --changesecuritycode PIN|PIN2|PUK|PUK2\n" #: ../gnokii/gnokii-security.c:75 #, c-format msgid "IMEI : %s\n" msgstr "IMEI : %s\n" #: ../gnokii/gnokii-security.c:76 #, c-format msgid "Manufacturer : %s\n" msgstr "Hersteller : %s\n" #: ../gnokii/gnokii-security.c:77 #, c-format msgid "Model : %s\n" msgstr "Modell : %s\n" #: ../gnokii/gnokii-security.c:78 #, c-format msgid "Product name : %s\n" msgstr "Produktname: %s\n" #: ../gnokii/gnokii-security.c:79 #, c-format msgid "Revision : %s\n" msgstr "Revision : %s\n" #: ../gnokii/gnokii-security.c:100 #, c-format msgid "%7s : %10s, %7s, %6s, counter %d\n" msgstr "%7s : %10s, %7s, %6s, Zähler %d\n" #: ../gnokii/gnokii-security.c:120 #, c-format msgid "Getting security code... \n" msgstr "Hole Sicherheitscode... \n" #: ../gnokii/gnokii-security.c:124 #, c-format msgid "Security code is: %s\n" msgstr "Sicherheitscode ist: %s\n" #: ../gnokii/gnokii-security.c:168 #, c-format msgid " usage: --entersecuritycode PIN|PIN2|PUK|PUK2|SEC\n" msgstr " Syntax: --entersecuritycode PIN|PIN2|PUK|PUK2|SEC\n" #: ../gnokii/gnokii-security.c:193 ../gnokii/gnokii-security.c:281 msgid "Enter your code: " msgstr "Bitte geben Sie Ihren Code ein: " #: ../gnokii/gnokii-security.c:202 #, c-format msgid "Code ok.\n" msgstr "Code ok.\n" #: ../gnokii/gnokii-security.c:221 #, c-format msgid "Security code status: " msgstr "Status des Sicherheitscodes: " #: ../gnokii/gnokii-security.c:225 #, c-format msgid "waiting for Security Code.\n" msgstr "warte auf Sicherheitscode.\n" #: ../gnokii/gnokii-security.c:228 #, c-format msgid "waiting for PIN.\n" msgstr "warte auf PIN.\n" #: ../gnokii/gnokii-security.c:231 #, c-format msgid "waiting for PIN2.\n" msgstr "warte auf PIN2.\n" #: ../gnokii/gnokii-security.c:234 #, c-format msgid "waiting for PUK.\n" msgstr "warte auf PUK.\n" #: ../gnokii/gnokii-security.c:237 #, c-format msgid "waiting for PUK2.\n" msgstr "warte auf PUK2.\n" #: ../gnokii/gnokii-security.c:240 #, c-format msgid "nothing to enter.\n" msgstr "keine Eingabe.\n" #: ../gnokii/gnokii-security.c:243 #, c-format msgid "unknown\n" msgstr "unbekannt\n" #: ../gnokii/gnokii-security.c:254 #, c-format msgid " usage: --changesecuritycode PIN|PIN2|PUK|PUK2\n" msgstr " Syntax: --changesecuritycode PIN|PIN2|PUK|PUK2\n" #: ../gnokii/gnokii-security.c:282 msgid "Enter new code: " msgstr "Geben Sie den neuen Code ein: " #: ../gnokii/gnokii-security.c:283 msgid "Retype new code: " msgstr "Geben Sie den neuen Code erneut ein: " #: ../gnokii/gnokii-security.c:285 #, c-format msgid "Error: new code differs\n" msgstr "Fehler: neuer Codes sind unterscheidet sich\n" #: ../gnokii/gnokii-security.c:295 #, c-format msgid "Code changed.\n" msgstr "Code wurde geändert.\n" #: ../gnokii/gnokii-settings.c:56 #, c-format msgid "" "Phone settings:\n" " --reset [soft|hard]\n" " --setdatetime [YYYY [MM [DD [HH [MM]]]]]\n" " --getdatetime\n" " --setalarm [HH MM]\n" " --getalarm\n" msgstr "" #: ../gnokii/gnokii-settings.c:142 #, c-format msgid "Date: %4d/%02d/%02d\n" msgstr "Datum: %4d/%02d/%02d\n" #: ../gnokii/gnokii-settings.c:143 #, c-format msgid "Time: %02d:%02d:%02d\n" msgstr "Zeit: %02d:%02d:%02d\n" #: ../gnokii/gnokii-settings.c:200 #, c-format msgid "Alarm: %s\n" msgstr "Weckzeit: %s\n" #: ../gnokii/gnokii-settings.c:201 #, c-format msgid "Time: %02d:%02d\n" msgstr "Zeit: %02d:%02d\n" #: ../gnokii/gnokii-settings.c:223 #, c-format msgid "What kind of reset do you want??\n" msgstr "Welche Art Reset wünschen sie??\n" #: ../gnokii/gnokii-sms.c:63 #, c-format msgid "" "SMS options:\n" " --sendsms destination [--smsc message_center_number |\n" " --smscno message_center_index] [-r|--report] [-8|--8bit]\n" " [-C|--class n] [-v|--validity n]\n" " [-i|--imelody] [-a|--animation file;file;file;file]\n" " [-o|--concat this;total;serial] [-w|--wappush url]\n" " --savesms [--sender from] [--smsc message_center_number |\n" " --smscno message_center_index] [-f|--folder folder_id]\n" " [-l|--location number] [-s|--sent|-r|--read] [-d|--" "deliver]\n" " [-t|--datetime YYMMDDHHMMSS]\n" " --getsms memory_type start [end] [-f|--file file]\n" " [-F|--force-file file] [-a|--append-file file]\n" " [-d|--delete]\n" " --deletesms memory_type start [end]\n" " --getsmsc [start_number [end_number]] [-r|--raw]\n" " --setsmsc\n" " --createsmsfolder name\n" " --deletesmsfolder folderid\n" " --showsmsfolderstatus\n" " --smsreader\n" msgstr "" #: ../gnokii/gnokii-sms.c:88 #, c-format msgid "" " usage: --sendsms destination recipient number (msisdn)\n" " --smsc message_center_number number (msisdn) of the message\n" " center\n" " --smscno message_center_index index of the message center " "stored\n" " in the phone memory\n" " -r\n" " --report request delivery report\n" " -v n\n" " --validity n set message validity\n" " -C n\n" " --class n set message class; possible " "values\n" " are 0, 1, 2, or 3\n" " -8\n" " --8bit set 8bit coding\n" " -i\n" " --imelody send imelody message, text is " "read\n" " from stdin\n" " -a file;file;file;file\n" " --animation file;file;file;file send animation message\n" " -o this;total;serial\n" " --concat this;total;serial send 'this' part of all 'total' " "parts\n" " identified by 'serial'\n" " -w url\n" " --wappush url send wappush to the given url\n" "Message text is read from standard input.\n" "\n" msgstr "" #: ../gnokii/gnokii-sms.c:220 #, c-format msgid "Incorrect --concat option\n" msgstr "Ungültige --concat Option\n" #: ../gnokii/gnokii-sms.c:267 ../gnokii/gnokii-sms.c:574 #, c-format msgid "Empty message. Quitting.\n" msgstr "Leere Nachricht: Programm wird beendet.\n" #: ../gnokii/gnokii-sms.c:278 #, c-format msgid "URL is too long (max 255 chars). Quitting.\n" msgstr "URL ist zu lang (max 255 Zeichen). Programm wird beendet.\n" #: ../gnokii/gnokii-sms.c:287 ../gnokii/gnokii-utils.c:139 #, c-format msgid "Please enter SMS text. End your input with :\n" msgstr "" "Bitte geben Sie den Nachrichtentext ein. Beendes Sie die Eingabe mit: " ":\n" #: ../gnokii/gnokii-sms.c:294 #, c-format msgid "WAP Push encoding failed!\n" msgstr "Kodierung des WAP-Push fehlgeschlagen!\n" #: ../gnokii/gnokii-sms.c:329 #, c-format msgid "" "Cannot read the SMSC number from your phone. If the sms send will fail, " "please use --smsc option explicitely giving the number.\n" msgstr "" #: ../gnokii/gnokii-sms.c:368 #, c-format msgid "" " usage: --savesms\n" " --smsc message_center_number number (msisdn) of the message\n" " center\n" " --smscno message_center_index index of the message center stored\n" " in the phone memory\n" " --sender msisdn set sender number\n" " -l n\n" " --location n save message at location n\n" " -r\n" " --read mark message as read\n" " -s\n" " --sent mark message as sent\n" " -f ID\n" " --folder ID save message to the folder ID where\n" " is of type IN, OU...\n" " -d\n" " --deliver set message type as sms deliver\n" " (to be sent)\n" " -t YYMMDDHHMISS\n" " --datetime YYMMDDHHMISS set date and time of message " "delivery\n" "Message text is read from standard input.\n" "\n" msgstr "" #: ../gnokii/gnokii-sms.c:496 ../gnokii/gnokii-sms.c:501 #, c-format msgid "Invalid datetime format: %s (should be YYMMDDHHMISS, all digits)!\n" msgstr "" "Ungültiges Datum- und Zeitformat: %s (sollte JJMMDDHHMMSS sein, alles " "Zahlen)!\n" #: ../gnokii/gnokii-sms.c:517 #, c-format msgid "Invalid datetime: %s.\n" msgstr "Ungültiges Datum- und Uhrzeit: %s.\n" #: ../gnokii/gnokii-sms.c:538 #, c-format msgid "Message at specified location exists. " msgstr "Es existiert eine Nachricht an der angegebenen Stelle. " #: ../gnokii/gnokii-sms.c:585 #, c-format msgid "Storing SMS... " msgstr "Speichere SMS... " #: ../gnokii/gnokii-sms.c:591 #, c-format msgid "Saved to %d!\n" msgstr "Gespeichert nach %d!\n" #: ../gnokii/gnokii-sms.c:593 #, c-format msgid "Saving failed (%s)\n" msgstr "Speichern fehlgeschlagen (%s)\n" #: ../gnokii/gnokii-sms.c:601 #, c-format msgid "" " usage: --getsms memory start [end] retrieves messages from memory type " "(SM, ME,\n" " IN, OU, ...) starting from\n" " location start and ending with end;\n" " if end option is omitted, just one " "entry\n" " is read;\n" " start must be a number, end may be a " "number\n" " or 'end' string;\n" " if 'end' is used entries are being read\n" " until empty location\n" " --force-file filename\n" " -F filename save sms to the file overwriting it if\n" " the file already exists;\n" " file is in mbox format\n" " --file filename\n" " -f filename as above but user is prompted before\n" " overwriting the file\n" " --append-file filename\n" " -a filename as above but append to the existing " "file\n" " --delete\n" " -d delete message after reading\n" "\n" msgstr "" #: ../gnokii/gnokii-sms.c:752 #, c-format msgid "Sending date/time: %02d/%02d/%04d %02d:%02d:%02d " msgstr "Sendedatum/-zeit: %02d.%02d.%04d %02d:%02d:%02d 1" #. Translators: this format is for printing a timezone with a leading +/- #: ../gnokii/gnokii-sms.c:757 ../gnokii/gnokii-sms.c:765 #: ../gnokii/gnokii-sms.c:779 ../gnokii/gnokii-sms.c:794 #, c-format msgid "%+03d00" msgstr "" #: ../gnokii/gnokii-sms.c:760 #, c-format msgid "Delivery date/time: %02d/%02d/%04d %02d:%02d:%02d " msgstr "Auslieferungszeit: %02d.%02d.%04d %02d:%02d:%02d " #: ../gnokii/gnokii-sms.c:768 ../gnokii/gnokii-sms.c:800 #, c-format msgid "Recipient: %s Msg Center: %s\n" msgstr "Empfänger: %s Nachrichtenzentrale: %s\n" #: ../gnokii/gnokii-sms.c:769 ../gnokii/gnokii-sms.c:785 #, c-format msgid "Text:\n" msgstr "Text:\n" #: ../gnokii/gnokii-sms.c:774 ../gnokii/gnokii-sms.c:789 #, c-format msgid "Date/time: %02d/%02d/%04d %02d:%02d:%02d " msgstr "Datum/Zeit: %02d.%02d.%04d %02d:%02d:%02d " #: ../gnokii/gnokii-sms.c:782 ../gnokii/gnokii-sms.c:803 #, c-format msgid "Sender: %s Msg Center: %s\n" msgstr "Absender: %s Nachrichtenzentrale: %s\n" #: ../gnokii/gnokii-sms.c:783 #, c-format msgid "Bitmap:\n" msgstr "Bild:\n" #: ../gnokii/gnokii-sms.c:809 #, c-format msgid "%s:\n" msgstr "%s:\n" #: ../gnokii/gnokii-sms.c:814 #, c-format msgid "GSM operator logo for %s (%s) network.\n" msgstr "GSM-Betreiberlogo für das Netz %s (%s).\n" #: ../gnokii/gnokii-sms.c:816 #, c-format msgid "Saved by Logo Express\n" msgstr "Gespeichert von \"Logo Express\"\n" #: ../gnokii/gnokii-sms.c:818 #, c-format msgid "Saved by Operator Logo Uploader by Thomas Kessler\n" msgstr "Gespeichert durch \"Operator Logo Uploader\" von Thomas Kessler\n" #: ../gnokii/gnokii-sms.c:830 ../gnokii/gnokii-utils.c:59 #, c-format msgid "File %s exists.\n" msgstr "Datei %s existiert bereits.\n" #: ../gnokii/gnokii-sms.c:839 #, c-format msgid "Couldn't save logofile %s!\n" msgstr "Konnte Bilddatei %s nicht speichern!\n" #: ../gnokii/gnokii-sms.c:847 #, c-format msgid "Linked (%d/%d):\n" msgstr "Verbunden (%d/%d):\n" #: ../gnokii/gnokii-sms.c:882 #, c-format msgid "Getting SMS failed (location %d from %s memory)! (%s)\n" msgstr "Abholen einer SMS schlug fehl (Position %d im Speicher %s)! (%s)\n" #: ../gnokii/gnokii-sms.c:910 #, c-format msgid "" " usage: --deletesms memory start [end] deletes messages from memory type\n" " (SM, ME, IN, OU, ...) starting\n" " from location start and ending with " "end;\n" " if end option is omitted, just one " "entry\n" " is removed;\n" " if 'end' is used entries are being " "removed\n" " until empty location\n" "\n" msgstr "" #: ../gnokii/gnokii-sms.c:957 #, c-format msgid "Deleted SMS (location %d from memory %s)\n" msgstr "Gelöschte SMS (Position %d im Speicher %s)\n" #: ../gnokii/gnokii-sms.c:961 #, c-format msgid "Deleting SMS failed (location %d from %s memory)! (%s)\n" msgstr "Löschen einer SMS schlug fehl (Position %d im Speicher %s)! (%s)\n" #: ../gnokii/gnokii-sms.c:974 #, c-format msgid "" " usage: --getsmsc [start [end]] reads message center details from\n" " the phone starting with start location\n" " and ending with end location;\n" " no end parameter means to read every\n" " location to the end;\n" " no start parameter means to start with\n" " the first location;\n" "-r\n" "--raw output in raw format (comma separated)\n" " default is human readable form\n" "\n" msgstr "" #: ../gnokii/gnokii-sms.c:1025 #, c-format msgid "SMS center: location number must be greater than 0\n" msgstr "SMS-Zentrale: Positionsnummer muß größer als 0 sein\n" #: ../gnokii/gnokii-sms.c:1061 #, c-format msgid "No. %d: \"%s\" (defined name)\n" msgstr "Nr: %d: \"%s\" (vergebener Name)\n" #: ../gnokii/gnokii-sms.c:1063 #, c-format msgid "No. %d: \"%s\" (default name)\n" msgstr "Nr. %d: \"%s\" (vorgegebener Name)\n" #: ../gnokii/gnokii-sms.c:1064 #, c-format msgid "SMS center number is %s\n" msgstr "Nummer der SMS-Zentrale ist %s\n" #: ../gnokii/gnokii-sms.c:1066 #, c-format msgid "Default recipient number is %s\n" msgstr "Nummer des Standardempfängers ist %s\n" #: ../gnokii/gnokii-sms.c:1068 #, c-format msgid "No default recipient number is defined\n" msgstr "Kein Standardempfänger definiert\n" #: ../gnokii/gnokii-sms.c:1069 #, c-format msgid "Messages sent as %s\n" msgstr "Nachricht gesendet als %s\n" #: ../gnokii/gnokii-sms.c:1070 #, c-format msgid "Message validity is %s\n" msgstr "Nachrichtgültigkeit ist %s\n" #: ../gnokii/gnokii-sms.c:1080 #, c-format msgid "" " usage: --setsmsc\n" "SMSC details are read from standard input.\n" "\n" msgstr "" #: ../gnokii/gnokii-sms.c:1137 #, c-format msgid "" " usage: --createsmsfolder name creates SMS folder with given name\n" "\n" msgstr "" #: ../gnokii/gnokii-sms.c:1158 #, c-format msgid "Folder with name: %s successfully created!\n" msgstr "Order mit dem Namen: %s erfolgreich angelegt!\n" #: ../gnokii/gnokii-sms.c:1165 #, c-format msgid "" " usage: --deletesmsfolder folderid removes SMS folder with given id\n" "\n" msgstr "" #: ../gnokii/gnokii-sms.c:1183 #, c-format msgid "Error: Number must be between 1 and %i!\n" msgstr "Fehler: Nummer muß zwischen 1 und %i sein!\n" #: ../gnokii/gnokii-sms.c:1191 #, c-format msgid "Number %i of 'My Folders' successfully deleted!\n" msgstr "Nummer %i aus 'Meine Ordner' wurde erfolgreich gelöscht!\n" #: ../gnokii/gnokii-sms.c:1198 #, c-format msgid "" " usage: --showsmsfolderstatus shows summary of SMS folders\n" "\n" msgstr "" #: ../gnokii/gnokii-sms.c:1215 #, c-format msgid "Cannot list available folders: %s\n" msgstr "Kann verfügbaren Ordner nicht auflisten: %s\n" #: ../gnokii/gnokii-sms.c:1219 #, c-format msgid "No. Name Id #Msg\n" msgstr "Nr. Name Id #Nachrichten\n" #: ../gnokii/gnokii-sms.c:1220 #, c-format msgid "========================================================\n" msgstr "================================================================\n" #: ../gnokii/gnokii-sms.c:1224 #, c-format msgid "Cannot get status of folder \"%s\": %s\n" msgstr "Cannot get status of folder \"%s\": %s\n" #: ../gnokii/gnokii-sms.c:1227 #, c-format msgid "%3d %-42s %4s %4u\n" msgstr "%3d %-42s %4s %4u\n" #: ../gnokii/gnokii-sms.c:1250 #, c-format msgid "SMS received from number: %s\n" msgstr "SMS erhalten von Nummer: %s\n" #: ../gnokii/gnokii-sms.c:1259 #, c-format msgid "Got message %d: %s\n" msgstr "Erhielt Nachricht %d: %s\n" #: ../gnokii/gnokii-sms.c:1267 #, c-format msgid "### Exists?!\n" msgstr "### Existiert?!\n" #: ../gnokii/gnokii-sms.c:1273 #, c-format msgid "### Cannot create file %s\n" msgstr "### Kann Datei %s nicht anlegen\n" #: ../gnokii/gnokii-sms.c:1297 #, c-format msgid "" " usage: --smsreader periodically check sms on the phone and stores them\n" " in mbox format\n" "\n" msgstr "" #: ../gnokii/gnokii-sms.c:1314 #, c-format msgid "Entered sms reader mode...\n" msgstr "Wechsle in den SMS-Lesemodus...\n" #: ../gnokii/gnokii-sms.c:1324 #, c-format msgid "Exiting sms reader mode...\n" msgstr "Verlasse den SMS-Lesemodus...\n" #: ../gnokii/gnokii-todo.c:56 #, c-format msgid "" "ToDo options:\n" " --gettodo start_number [end_number|end] [-v|--vCal]\n" " --writetodo vcalendarfile start_number [end_number|end]\n" " --deletealltodos\n" msgstr "" #: ../gnokii/gnokii-todo.c:65 #, c-format msgid "" "usage: --gettodo start_number [end_number | end] [-v|--vCal]\n" " start_number - entry number in the phone todo (numeric)\n" " end_number - until this entry in the phone todo (numeric, " "optional)\n" " end - the string \"end\" indicates all entries from start to " "end\n" " -v - output in iCalendar format\n" " NOTE: if no end is given, only the start entry is written\n" msgstr "" #: ../gnokii/gnokii-todo.c:119 msgid "Todo" msgstr "Aufgabe" #: ../gnokii/gnokii-todo.c:120 msgid "Priority" msgstr "Priorität" #: ../gnokii/gnokii-todo.c:133 #, c-format msgid "The ToDo note could not be read: %s\n" msgstr "Die Aufgabe konnte nicht gelesen werden: %s\n" #: ../gnokii/gnokii-todo.c:142 #, c-format msgid "" "usage: --writetodo vcalendarfile start_number [end_number|end]\n" " vcalendarfile - file containing todo notes in vCal format\n" " start_number - first note to read from file\n" " end_number - last note to read from file\n" " end - read all notes from file from start_number\n" " NOTE: it stores the note at the first empty location.\n" msgstr "" #: ../gnokii/gnokii-todo.c:216 #, c-format msgid "Priority %d. %s\n" msgstr "Priorität %d. %s\n" #: ../gnokii/gnokii-todo.c:218 #, c-format msgid "Failed to write ToDo note: %s\n" msgstr "Schreiben der Aufgabe fehlgeschlagen: %s\n" #: ../gnokii/gnokii-todo.c:234 #, c-format msgid "Successfully deleted all ToDo notes!\n" msgstr "Alle Aufgaben erfolgreich gelöscht!\n" #: ../gnokii/gnokii-todo.c:236 #, c-format msgid "Failed to delete ToDo note: %s\n" msgstr "Löschen der Aufgabe ist fehlgeschlagen: %s\n" #: ../gnokii/gnokii-utils.c:145 #, c-format msgid "Couldn't read from stdin!\n" msgstr "Konnte nicht von stdin lesen!\n" #: ../gnokii/gnokii-utils.c:151 #, c-format msgid "Input too long! (%d, maximum is %d)\n" msgstr "Eingabe zu lang! (%d, Maximum ist %d)\n" #: ../gnokii/gnokii-utils.c:166 #, c-format msgid "Could not null bitmap: %s\n" msgstr "Konnte Bild: %s nicht auf NULL setzen.\n" #: ../gnokii/gnokii-utils.c:171 #, c-format msgid "Could not load bitmap from %s: %s\n" msgstr "Konnte das Bild von %s nicht laden: %s\n" #: ../gnokii/gnokii-utils.c:210 #, c-format msgid "" "Warning: end value (%d) is less than start value (%d). Setting it to the " "start value (%d)\n" msgstr "" "Warnung: Der Endwert (%d) ist kleiner als der Startwert (%d). Setze ihn auf " "den Startwert (%d)\n" #: ../gnokii/gnokii-wap.c:55 #, c-format msgid "" "WAP options:\n" " --getwapbookmark number\n" " --writewapbookmark name URL\n" " --deletewapbookmark number\n" " --getwapsetting number [-r|--raw]\n" " --writewapsetting\n" " --activatewapsetting number\n" msgstr "" #: ../gnokii/gnokii-wap.c:67 #, c-format msgid " usage: --getwapbookmark number\n" msgstr " Syntax: --getwapbookmark Nummer\n" #: ../gnokii/gnokii-wap.c:88 ../gnokii/gnokii-wap.c:219 #, c-format msgid "WAP bookmark nr. %d:\n" msgstr "WAP-Lesezeichen Nr. %d:\n" #: ../gnokii/gnokii-wap.c:103 #, c-format msgid " usage: --writebookmark name URL\n" msgstr " Syntax: --writebookmark Name URL\n" #: ../gnokii/gnokii-wap.c:126 #, c-format msgid "WAP bookmark nr. %d successfully written!\n" msgstr "WAP-Lesezeichen Nr. %d erfolgreich geschrieben!\n" #: ../gnokii/gnokii-wap.c:138 #, c-format msgid " usage: --deletewapbookmark number\n" msgstr " Syntax: --deletewapbookmark Nummer\n" #: ../gnokii/gnokii-wap.c:159 #, c-format msgid "WAP bookmark nr. %d deleted!\n" msgstr "WAP-Lesezeichen Nr. %d gelöscht!\n" #: ../gnokii/gnokii-wap.c:171 #, c-format msgid " usage: --getwapsetting number [-r|--raw]\n" msgstr " Syntax: --getwapsetting Number [-r|--raw]\n" #: ../gnokii/gnokii-wap.c:221 ../xgnokii/xgnokii_contacts.c:725 #: ../xgnokii/xgnokii_contacts.c:803 ../xgnokii/xgnokii_contacts.c:942 #: ../xgnokii/xgnokii_contacts.c:984 ../xgnokii/xgnokii_contacts.c:1202 msgid "Home" msgstr "Zuhause" #: ../gnokii/gnokii-wap.c:222 msgid "Session mode" msgstr "Sitzungsmodus" #: ../gnokii/gnokii-wap.c:223 msgid "Connection security" msgstr "Verbindungssicherheit" #: ../gnokii/gnokii-wap.c:224 msgid "Data bearer" msgstr "Data bearer" #: ../gnokii/gnokii-wap.c:226 ../gnokii/gnokii-wap.c:236 msgid "Authentication type" msgstr "Authentifizierungstyp" #: ../gnokii/gnokii-wap.c:227 msgid "Data call type" msgstr "Typ des Data-Calls" #: ../gnokii/gnokii-wap.c:228 msgid "Data call speed" msgstr "Geschwindigkeit des Data-Calls" #: ../gnokii/gnokii-wap.c:229 ../gnokii/gnokii-wap.c:237 msgid "Login type" msgstr "Login-Typ" #: ../gnokii/gnokii-wap.c:230 ../gnokii/gnokii-wap.c:239 msgid "IP" msgstr "IP" #: ../gnokii/gnokii-wap.c:232 ../gnokii/gnokii-wap.c:240 msgid "Username" msgstr "Nutzername" #: ../gnokii/gnokii-wap.c:233 ../gnokii/gnokii-wap.c:241 msgid "Password" msgstr "Passwort" #: ../gnokii/gnokii-wap.c:235 ../xgnokii/xgnokii.c:1615 msgid "Connection" msgstr "Verbindung" #: ../gnokii/gnokii-wap.c:238 msgid "Access point" msgstr "Access Point" #: ../gnokii/gnokii-wap.c:243 msgid "Service number" msgstr "Servicenummer" #: ../gnokii/gnokii-wap.c:244 msgid "Server number" msgstr "Servernummer" #: ../gnokii/gnokii-wap.c:292 #, c-format msgid "Cannot write WAP setting: %s\n" msgstr "Kann WAP-Einstellungen nicht schreiben: %s\n" #: ../gnokii/gnokii-wap.c:299 #, c-format msgid " usage: --activatewapsetting number\n" msgstr " Syntax: --activatewapsetting Nummer\n" #: ../gnokii/gnokii-wap.c:320 #, c-format msgid "WAP setting nr. %d activated!\n" msgstr "WAP-Einstellungen Nr. %d aktiviert!\n" #: ../smsd/file.c:59 ../smsd/file.c:90 #, c-format msgid "Cannot stat file %s!\n" msgstr "Kann den Status der Datei %s nicht ermitteln!\n" #: ../smsd/file.c:68 #, c-format msgid "" "File %s is not regular file or\n" "you have not executable permission to this file!\n" msgstr "" "Die Datei %s ist keine normale Datei oder Sie \n" "haben nicht die Berechtigungen dieses Datei auszuführen!\n" #: ../smsd/file.c:85 #, c-format msgid "You have not set spool directory, sms sending is disabled!\n" msgstr "" "Sie haben kein Spool-Verzeichnis angegeben, senden von SMS ist deaktiviert!\n" #: ../smsd/file.c:99 #, c-format msgid "" "File %s is not directory or\n" "you have not read and write permissions to this directory,\n" "sms sending is disabled!\n" "!" msgstr "" "%s ist kein Verzeichnis oder Sie haben keine Lese- und\n" "Schreibberechtigungen für dieses Verzeichnis,\n" "senden von SMS ist deaktiviert!\n" "!" #: ../smsd/file.c:166 #, c-format msgid "Cannot open directory %s\n" msgstr "Kann das Verzeichnis %s nicht öffnen\n" #: ../smsd/file.c:199 #, c-format msgid "Remote number is empty in %s!\n" msgstr "" #: ../smsd/file.c:243 ../smsd/file.c:258 #, c-format msgid "Cannot unlink %s." msgstr "Kann %s nicht löschen." #: ../smsd/file.c:252 #, c-format msgid "Cannot send sms from file %s\n" msgstr "Kann SMS aus der Datei %s nicht senden\n" #: ../smsd/file.c:255 #, c-format msgid "Cannot rename file %s to %s. Trying to unlink it.\n" msgstr "Kann die Datei %s nicht in %s umbenennen. Versuche sie zu löschen.\n" #: ../smsd/lowlevel.c:111 #, c-format msgid "" "Cannot load phone %s!\n" "Do you have proper section in the config file?\n" msgstr "" #: ../smsd/lowlevel.c:400 ../xgnokii/xgnokii_lowlevel.c:1349 #, c-format msgid "Event %d failed with return code %d!\n" msgstr "Ereignis %d schlug mit dem Rückgabewert %d fehl!\n" #: ../smsd/lowlevel.c:449 #, c-format msgid "Timeout in file %s, line %d, restarting connection.\n" msgstr "" #: ../smsd/lowlevel.c:459 #, c-format msgid "Too many consecutive errors, restarting connection.\n" msgstr "Zuviele aufeinanderfolgende Fehler, Verbindungsneustart.\n" #: ../smsd/mysql.c:75 ../smsd/pq.c:66 #, c-format msgid "Connection to database '%s' on host '%s' failed.\n" msgstr "Verbindung zur Datenbank '%s' auf dem Host '%s' schlug fehl.\n" #: ../smsd/mysql.c:132 #, c-format msgid "%d: SELECT FROM multipart command failed.\n" msgstr "%d: Kommando \"SELECT FROM multipart\" schlug fehl.\n" #: ../smsd/mysql.c:169 #, c-format msgid "%d: INSERT INTO multipartinbox command failed.\n" msgstr "%d: Kommando \"INSERT INTO multipartinbox\" schlug fehl.\n" #: ../smsd/mysql.c:187 #, c-format msgid "%d: SELECT FROM multipartinbox command failed.\n" msgstr "%d: Kommando \"SELECT FROM multipartinbox\" schlug fehl.\n" #: ../smsd/mysql.c:223 #, c-format msgid "%d: DELETE FROM multipartinbox command failed.\n" msgstr "%d: Kommando \"DELETE FROM multipartinbox\" schlug fehl.\n" #: ../smsd/mysql.c:261 #, c-format msgid "%d: SELECT FROM inbox command failed.\n" msgstr "%d: Kommando \"SELECT FROM inbox\" schlug fehl.\n" #: ../smsd/mysql.c:294 #, c-format msgid "%d: INSERT INTO inbox command failed.\n" msgstr "%d: Kommando \"INSERT INTO inbox\" schlug fehl.\n" #: ../smsd/mysql.c:334 ../smsd/sqlite.c:239 #, c-format msgid "%d: SELECT FROM outbox command failed.\n" msgstr "%d: Kommando \"SELECT FROM outbox\" schlug fehl.\n" #: ../smsd/mysql.c:344 #, c-format msgid "%d: Store Mysql Result Failed.\n" msgstr "%d: Speichern der Mysql-Ergebnisse schlug fehl.\n" #: ../smsd/mysql.c:397 ../smsd/pq.c:425 #, c-format msgid "%d: UPDATE command failed.\n" msgstr "%d: Kommando \"UPDATE\" schlug fehl.\n" #: ../smsd/pq.c:75 #, c-format msgid "Setting client charset '%s' for database '%s' on host '%s' failed.\n" msgstr "" "Das Setzen des Client Charsets '%s' für die Datenbank '%s' auf dem Host '%s' " "schlug fehl.\n" #: ../smsd/pq.c:120 ../smsd/pq.c:257 #, c-format msgid "%d: Escaping string failed.\n" msgstr "%d: Entwerten der Zeichenkette schlug fehl.\n" #: ../smsd/pq.c:148 ../smsd/pq.c:210 #, c-format msgid "%d: SELECT FROM %s.multipart command failed.\n" msgstr "%d: Kommando \"SELECT FROM %s.multipart\" schlug fehl.\n" #: ../smsd/pq.c:188 #, c-format msgid "%d: INSERT INTO %s.multipartinbox failed.\n" msgstr "%d: Kommando \"INSERT INTO %s.multipartinbox\" schlug fehl.\n" #: ../smsd/pq.c:239 #, c-format msgid "%d: DELETE FROM %s.multipartinbox command failed.\n" msgstr "%d: Kommando \"DELETE FROM %s.multipartinbox\" schlug fehl.\n" #: ../smsd/pq.c:294 #, c-format msgid "%d: SELECT FROM %s.inbox command failed.\n" msgstr "%d: Kommando \"SELECT FROM %s.inbox\" schlug fehl.\n" #: ../smsd/pq.c:331 #, c-format msgid "%d: INSERT INTO %s.inbox failed.\n" msgstr "%d: Kommando \"INSERT INTO %s.inbox\" schlug fehl.\n" #: ../smsd/pq.c:374 #, c-format msgid "%d: SELECT FROM %s.outbox command failed.\n" msgstr "%d: Kommando \"SELECT FROM %s.outbox\" schlug fehl.\n" #: ../smsd/smsd.c:137 #, c-format msgid "smsd - version %s from gnokii %s\n" msgstr "smsd - Version %s aus gnokii %s\n" #: ../smsd/smsd.c:142 #, c-format msgid "" "smsd - version %s from gnokii %s\n" "Copyright Jan Derfinak 1999-2011\n" msgstr "" "smsd - Version %s aus gnokii %s\n" "Copyright Jan Derfinak 1999-2011\n" #: ../smsd/smsd.c:149 #, c-format msgid "" "\n" "Usage: %s [options]\n" " -u, --user db_username OR action if -m file\n" " -p, --password db_password\n" " -d, --db db_name\n" " -c, --host db_hostname OR spool directory if -m file\n" " -s, --schema db_schema\n" " -e, --encoding client_encoding\n" " -m, --module db_module (pq, mysql, sqlite, file)\n" " -l, --libdir path_to_db_module\n" " -f, --logfile file\n" " -t, --phone phone_number\n" " -i, --interval polling_interval_for_incoming_sms's_in_seconds\n" " -S, --maxsms number_of_sms's (only in dumb mode)\n" " -b, --inbox memoryType\n" " -0, --firstpos0\n" " -v, --version\n" " -h, --help\n" msgstr "" #: ../smsd/smsd.c:183 #, c-format msgid "WARNING: Cannot open file %s for appending.\n" msgstr "WARNUNG: Kann die Datei %s nicht Anhängen öffnen.\n" #: ../smsd/smsd.c:342 #, c-format msgid "Wrong number of arguments\n" msgstr "Falsche Anzahl von Argumenten\n" #: ../smsd/smsd.c:349 #, c-format msgid "Cannot load database module %s in directory %s!\n" msgstr "Kann das Datenbankmodul %s aus den Verzeichnis %s nicht laden!\n" #: ../smsd/smsd.c:423 #, c-format msgid "Sending to %s unsuccessful. Error: %s\n" msgstr "Senden an %s nicht erfolgreich. Fehler: %s\n" #: ../smsd/smsd.c:429 #, c-format msgid "Sending to %s successful.\n" msgstr "Senden an %s erfolgreich.\n" #: ../smsd/smsd.c:455 #, c-format msgid "Inserting sms from %s successful.\n" msgstr "SMS aus %s erfolgreich eingefügt.\n" #: ../smsd/smsd.c:465 #, c-format msgid "Duplicated sms from %s.\n" msgstr "Dupliziere SMS von %s.\n" #: ../smsd/smsd.c:475 #, c-format msgid "Multipart sms from %s. Waiting for the next parts.\n" msgstr "Mehrteilige SMS von %s. Warte auf die nächsten Teile.\n" #: ../smsd/smsd.c:485 #, c-format msgid "" "Inserting sms from %s unsuccessful.\n" "Date: %02d-%02d-%02d %02d:%02d:%02d+%02d\n" "Text: %s\n" "\n" "Exiting.\n" msgstr "" "SMS aus %s erfolgreich eingefügt.\n" "Datum: %02d-%02d-%02d %02d:%02d:%02d+%02d\n" "Text: %s\n" "\n" "Beende das Programm.\n" #: ../smsd/sqlite.c:57 ../smsd/sqlite.c:69 #, fuzzy, c-format msgid "Connection to database '%s' failed.\n" msgstr "Verbindung zur Datenbank '%s' schlug fehl.\n" #: ../smsd/sqlite.c:116 ../smsd/sqlite.c:182 #, c-format msgid "%d: Parsing query %s failed!" msgstr "%d: Syntaxanalyse der Abfrage %s schlug fehl!" #: ../smsd/sqlite.c:117 ../smsd/sqlite.c:183 #, c-format msgid "Error: %s" msgstr "Fehler: %s" #: ../smsd/sqlite.c:133 #, c-format msgid "%d: INSERT INTO inbox failed.\n" msgstr "%d: Kommando \"INSERT INTO inbox\" schlug fehl.\n" #: ../smsd/sqlite.c:134 #, c-format msgid "Error %d: %s\n" msgstr "Fehler %d: %s\n" #: ../smsd/sqlite.c:135 #, c-format msgid "Query: %s\n" msgstr "Abfrage: %s\n" #: ../utils/mgnokiidev.c:179 #, c-format msgid "mgnokiidev takes one and only one argument!\n" msgstr "mgnokiidev hat nur ein Argument!\n" #: ../xgnokii/xgnokii.c:217 msgid "Reading caller groups names ..." msgstr "Lese Namen der Anrufgruppen ..." #: ../xgnokii/xgnokii.c:226 msgid "No group" msgstr "Keine Gruppe" #: ../xgnokii/xgnokii.c:347 msgid "Short Message received" msgstr "Kurznachricht erhalten" #: ../xgnokii/xgnokii.c:353 ../xgnokii/xgnokii_lowlevel.c:1346 msgid "Working..." msgstr "Arbeite..." #: ../xgnokii/xgnokii.c:370 msgid "Call in progress" msgstr "Anruf in Bearbeitung" #: ../xgnokii/xgnokii.c:383 msgid "Hide" msgstr "Verstecken" #: ../xgnokii/xgnokii.c:457 msgid "anonymous" msgstr "anonym" #: ../xgnokii/xgnokii.c:470 #, c-format msgid "" "Outgoing call in progress:\n" "Time: %s" msgstr "" "Anruf in Arbeit:\n" "Zeit: %s" #: ../xgnokii/xgnokii.c:472 #, c-format msgid "" "Incoming call from: %s\n" "Time: %s" msgstr "" "Ankommender Anruf von: %s\n" "Zeit: %s" #: ../xgnokii/xgnokii.c:584 ../xgnokii/xgnokii.c:1455 msgid "Max. Time" msgstr "Maximale Zeit" #: ../xgnokii/xgnokii.c:631 msgid "Reading SMS centers ..." msgstr "Lese SMS-Zentralen ..." #: ../xgnokii/xgnokii.c:896 msgid "SMS not supported!" msgstr "SMS nicht unterstützt!" #: ../xgnokii/xgnokii.c:901 msgid "Calendar not supported!" msgstr "Kalender nicht unterstützt!" #: ../xgnokii/xgnokii.c:1088 msgid "Error writing configuration file!" msgstr "Fehler beim Schreiben der Konfigurationsdatei!" #: ../xgnokii/xgnokii.c:1100 ../xgnokii/xgnokii_contacts.c:3126 msgid "Contacts" msgstr "Kontakte" #: ../xgnokii/xgnokii.c:1111 ../xgnokii/xgnokii_calendar.c:1547 msgid "Calendar" msgstr "Kalender" #: ../xgnokii/xgnokii.c:1116 ../xgnokii/xgnokii_logos.c:1525 msgid "Logos" msgstr "Logos" #: ../xgnokii/xgnokii.c:1122 msgid "DTMF" msgstr "Tonwahl" #: ../xgnokii/xgnokii.c:1127 ../xgnokii/xgnokii_speed.c:548 msgid "Speed Dial" msgstr "Kurzwahl" #: ../xgnokii/xgnokii.c:1132 msgid "Keyboard" msgstr "Tastatur" #: ../xgnokii/xgnokii.c:1137 ../xgnokii/xgnokii_netmon.c:294 msgid "Net Monitor" msgstr "Netzmonitor" #: ../xgnokii/xgnokii.c:1147 msgid "Data calls" msgstr "Data-Calls" #: ../xgnokii/xgnokii.c:1156 ../xgnokii/xgnokii.c:1575 msgid "Options" msgstr "Optionen" #: ../xgnokii/xgnokii.c:1166 ../xgnokii/xgnokii.c:1183 msgid "About" msgstr "Über" #: ../xgnokii/xgnokii.c:1186 ../xgnokii/xgnokii.c:1358 #: ../xgnokii/xgnokii_calendar.c:688 ../xgnokii/xgnokii_calendar.c:734 #: ../xgnokii/xgnokii_calendar.c:881 ../xgnokii/xgnokii_calendar.c:1001 #: ../xgnokii/xgnokii_calendar.c:1141 ../xgnokii/xgnokii_calendar.c:1274 #: ../xgnokii/xgnokii_calendar.c:1435 ../xgnokii/xgnokii_contacts.c:875 #: ../xgnokii/xgnokii_contacts.c:1119 ../xgnokii/xgnokii_contacts.c:1255 #: ../xgnokii/xgnokii_contacts.c:1406 ../xgnokii/xgnokii_contacts.c:2949 #: ../xgnokii/xgnokii_sms.c:570 msgid "Ok" msgstr "Ok" #: ../xgnokii/xgnokii.c:1197 #, c-format msgid "" "xgnokii version: %s\n" "gnokii version: %s\n" "\n" "Copyright (C) 1999-2004 Pavel Janik ml.,\n" "Hugh Blemings, Jan Derfinak,\n" "Pawel Kot and others\n" "xgnokii is free software, covered by the GNU General Public License,\n" "and you are welcome to change it and/or distribute copies of it under\n" "certain conditions. There is absolutely no warranty for xgnokii.\n" "See GPL for details.\n" msgstr "" "xgnokii version: %s\n" "gnokii version: %s\n" "\n" "Copyright (C) 1999-2004 Pavel Janik ml.,\n" "Hugh Blemings, Jan Derfinak,\n" "Pawel Kot und andere\n" "gnokii ist freie Software, unterliegt der GNU General Public License und " "Sie\n" "sind herzlich eingeladen gnokii zu verändern und/oder es unter Einhaltung\n" "bestehender Bedingungen zu verteilen. Es besteht absolut keine Garantie\n" "für gnokii. Details finden Sie in der GPL.\n" #: ../xgnokii/xgnokii.c:1352 msgid "Edit SMS Setting" msgstr "Bearbeite SMS Einstellungen" #: ../xgnokii/xgnokii.c:1366 ../xgnokii/xgnokii_calendar.c:697 #: ../xgnokii/xgnokii_calendar.c:743 ../xgnokii/xgnokii_calendar.c:890 #: ../xgnokii/xgnokii_calendar.c:1010 ../xgnokii/xgnokii_calendar.c:1150 #: ../xgnokii/xgnokii_calendar.c:1283 ../xgnokii/xgnokii_calendar.c:1443 #: ../xgnokii/xgnokii_common.c:80 ../xgnokii/xgnokii_common.c:162 #: ../xgnokii/xgnokii_contacts.c:886 ../xgnokii/xgnokii_contacts.c:1263 #: ../xgnokii/xgnokii_contacts.c:1414 ../xgnokii/xgnokii_contacts.c:1651 #: ../xgnokii/xgnokii_contacts.c:1698 ../xgnokii/xgnokii_contacts.c:1816 #: ../xgnokii/xgnokii_contacts.c:2212 ../xgnokii/xgnokii_contacts.c:2956 #: ../xgnokii/xgnokii_sms.c:578 msgid "Cancel" msgstr "Abrechen" #: ../xgnokii/xgnokii.c:1379 msgid "Set's name:" msgstr "Name des Sets:" #: ../xgnokii/xgnokii.c:1393 msgid "Center:" msgstr "Center:" #: ../xgnokii/xgnokii.c:1407 msgid "Sending Format:" msgstr "Sendeformat:" #: ../xgnokii/xgnokii.c:1447 msgid "Validity Period:" msgstr "Gültigkeitsperiode:" #: ../xgnokii/xgnokii.c:1572 msgid "Set's name" msgstr "Name des Sets" #: ../xgnokii/xgnokii.c:1572 msgid "Center number" msgstr "Centernummer" #: ../xgnokii/xgnokii.c:1572 msgid "Format" msgstr "Format" #: ../xgnokii/xgnokii.c:1572 msgid "Validity" msgstr "Gültigkeit" #: ../xgnokii/xgnokii.c:1580 msgid "Apply" msgstr "Anwenden" #: ../xgnokii/xgnokii.c:1588 ../xgnokii/xgnokii_contacts.c:2198 #: ../xgnokii/xgnokii_dtmf.c:181 msgid "Save" msgstr "Sichern" #: ../xgnokii/xgnokii.c:1594 msgid "Close" msgstr "Schließen" #. ** Connection notebook ** #: ../xgnokii/xgnokii.c:1608 msgid "Phone and connection type" msgstr "Telefon und Verbindungsart" #: ../xgnokii/xgnokii.c:1622 msgid "Port:" msgstr "Anschluß:" #: ../xgnokii/xgnokii.c:1636 ../xgnokii/xgnokii.c:1716 msgid "Model:" msgstr "Model:" #: ../xgnokii/xgnokii.c:1650 msgid "Bindir:" msgstr "Bindir:" #: ../xgnokii/xgnokii.c:1664 msgid "Init length:" msgstr "Anfangslänge:" #: ../xgnokii/xgnokii.c:1679 msgid "Connection:" msgstr "Verbindung:" #: ../xgnokii/xgnokii.c:1683 msgid "infrared" msgstr "infrarot" #: ../xgnokii/xgnokii.c:1690 msgid "serial" msgstr "seriell" #: ../xgnokii/xgnokii.c:1697 msgid "irda" msgstr "irda" #. ** Phone notebook ** #: ../xgnokii/xgnokii.c:1702 msgid "Phone information" msgstr "Telefoninformationen" #: ../xgnokii/xgnokii.c:1730 msgid "Version:" msgstr "Version:" #: ../xgnokii/xgnokii.c:1744 msgid "Revision:" msgstr "Revision:" #: ../xgnokii/xgnokii.c:1758 msgid "IMEI:" msgstr "IMEI:" #: ../xgnokii/xgnokii.c:1772 msgid "Names length:" msgstr "Länge der Namen:" #: ../xgnokii/xgnokii.c:1780 msgid "SIM:" msgstr "SIM:" #: ../xgnokii/xgnokii.c:1798 msgid "Phone:" msgstr "Telefon:" #: ../xgnokii/xgnokii.c:1805 msgid "Alarm setting" msgstr "Weckereinstellungen" #: ../xgnokii/xgnokii.c:1812 ../xgnokii/xgnokii.c:1819 #: ../xgnokii/xgnokii_calendar.c:957 ../xgnokii/xgnokii_calendar.c:1089 #: ../xgnokii/xgnokii_calendar.c:1218 ../xgnokii/xgnokii_calendar.c:1350 #: ../xgnokii/xgnokii_calendar.c:1542 msgid "Alarm" msgstr "Wecker" #. ** SMS notebook ** #: ../xgnokii/xgnokii.c:1842 ../xgnokii/xgnokii_sms.c:1672 msgid "Short Message Service" msgstr "Kurznachrichtendienst" #: ../xgnokii/xgnokii.c:1875 msgid "Edit" msgstr "Bearbeiten" #. ** Business notebook ** #: ../xgnokii/xgnokii.c:1887 ../xgnokii/xgnokii_sms.c:1541 #: ../xgnokii/xgnokii_sms.c:1716 msgid "Business Card" msgstr "Visitenkarte" #: ../xgnokii/xgnokii.c:1893 msgid "User" msgstr "Benutzer" #: ../xgnokii/xgnokii.c:1911 ../xgnokii/xgnokii_calendar.c:1206 #: ../xgnokii/xgnokii_calendar.c:1338 ../xgnokii/xgnokii_contacts.c:1276 msgid "Name:" msgstr "Name:" #: ../xgnokii/xgnokii.c:1936 msgid "Title:" msgstr "Titel:" #: ../xgnokii/xgnokii.c:1961 msgid "Company:" msgstr "Firma:" #: ../xgnokii/xgnokii.c:1986 msgid "Telephone:" msgstr "Telefon:" #: ../xgnokii/xgnokii.c:2012 msgid "Fax:" msgstr "Fax:" #: ../xgnokii/xgnokii.c:2037 msgid "Email:" msgstr "E-Mail:" #: ../xgnokii/xgnokii.c:2062 msgid "Address:" msgstr "Adresse:" #. ** Groups notebook ** #: ../xgnokii/xgnokii.c:2085 msgid "Caller groups names" msgstr "Namen der Anrufgruppen" #: ../xgnokii/xgnokii.c:2092 msgid "Groups" msgstr "Gruppen" #: ../xgnokii/xgnokii.c:2100 #, c-format msgid "Group %d:" msgstr "Gruppe %d:" #. Mail #: ../xgnokii/xgnokii.c:2113 msgid "Mailbox" msgstr "Briefkasten" #: ../xgnokii/xgnokii.c:2120 msgid "Mail" msgstr "Post" #: ../xgnokii/xgnokii.c:2127 msgid "Path to mailbox:" msgstr "Pfad zum Briefkasten:" #: ../xgnokii/xgnokii_calendar.c:131 msgid "Function not implemented!" msgstr "Funktion nicht implementiert!" #: ../xgnokii/xgnokii_calendar.c:194 #, c-format msgid "%04d/%02d/%02d" msgstr "%04d/%02d/%02d" #: ../xgnokii/xgnokii_calendar.c:197 ../xgnokii/xgnokii_calendar.c:203 #, c-format msgid "%04d/%02d/%02d %02d:%02d" msgstr "%04d/%02d/%02d %02d:%02d" #: ../xgnokii/xgnokii_calendar.c:211 #, c-format msgid "%02d/%02d %02d:%02d tone %s" msgstr "%02d/%02d %02d:%02d Ton %s" #: ../xgnokii/xgnokii_calendar.c:216 #, c-format msgid "%04d/%02d/%02d %02d:%02d tone %s" msgstr "%04d/%02d/%02d %02d:%02d Ton %s" #: ../xgnokii/xgnokii_calendar.c:229 msgid "never" msgstr "niemals" #: ../xgnokii/xgnokii_calendar.c:232 msgid "daily" msgstr "täglich" #: ../xgnokii/xgnokii_calendar.c:235 msgid "weekly" msgstr "wöchentlich" #: ../xgnokii/xgnokii_calendar.c:238 msgid "every two weeks" msgstr "aller zwei Wochen" #: ../xgnokii/xgnokii_calendar.c:241 msgid "monthly" msgstr "monatlich" #: ../xgnokii/xgnokii_calendar.c:244 msgid "yearly" msgstr "jährlich" #: ../xgnokii/xgnokii_calendar.c:247 #, c-format msgid "every %d minutes" msgstr "alle %d Minuten" #: ../xgnokii/xgnokii_calendar.c:282 msgid "Type: " msgstr "Typ: " #: ../xgnokii/xgnokii_calendar.c:292 msgid "Start date: " msgstr "Anfangsdatum: " #: ../xgnokii/xgnokii_calendar.c:322 msgid "End date: " msgstr "Enddatum: " #: ../xgnokii/xgnokii_calendar.c:333 msgid "Alarm: " msgstr "Wecker: " #: ../xgnokii/xgnokii_calendar.c:344 msgid "Number: " msgstr "Nummer: " #: ../xgnokii/xgnokii_calendar.c:355 msgid "Location: " msgstr "Ort: " #: ../xgnokii/xgnokii_calendar.c:366 msgid "Recurrence: " msgstr "Wiederholung: " #: ../xgnokii/xgnokii_calendar.c:374 msgid "Text: " msgstr "Text: " #: ../xgnokii/xgnokii_calendar.c:504 #, c-format msgid "" "Error saving calendar note\n" "%s" msgstr "" "Fehler beim Speichern eines Kalendereintrags\n" "%s" #: ../xgnokii/xgnokii_calendar.c:632 #, c-format msgid "%d-%02d-%02d" msgstr "%d-%02d-%02d" #: ../xgnokii/xgnokii_calendar.c:641 #, c-format msgid "%d-%02d-%02d %02d:%02d" msgstr "%d-%02d-%02d %02d:%02d" #: ../xgnokii/xgnokii_calendar.c:681 ../xgnokii/xgnokii_calendar.c:727 msgid "Choose date" msgstr "Datum auswählen" #: ../xgnokii/xgnokii_calendar.c:767 msgid "Alarm time:" msgstr "Weckzeit:" #: ../xgnokii/xgnokii_calendar.c:837 msgid "Every Day" msgstr "Jeden Tag" #: ../xgnokii/xgnokii_calendar.c:843 msgid "Every Week" msgstr "Jede Woche" #: ../xgnokii/xgnokii_calendar.c:849 msgid "Every 2 Weeks" msgstr "Aller 2 Wochen" #: ../xgnokii/xgnokii_calendar.c:855 msgid "Every Year" msgstr "Jedes Jahr" #. #. gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL, _("Edit note"), NULL, #. NewPixmap(Edit_xpm, GUI_CalendarWindow->window, #. &GUI_CalendarWindow->style->bg[GTK_STATE_NORMAL]), #. (GtkSignalFunc) NULL, NULL); #. #: ../xgnokii/xgnokii_calendar.c:874 ../xgnokii/xgnokii_calendar.c:1610 msgid "Add reminder" msgstr "Erinnerung hinzufügen" #: ../xgnokii/xgnokii_calendar.c:910 ../xgnokii/xgnokii_calendar.c:1029 #: ../xgnokii/xgnokii_calendar.c:1170 ../xgnokii/xgnokii_calendar.c:1303 msgid "Date:" msgstr "Datum:" #: ../xgnokii/xgnokii_calendar.c:945 msgid "Subject:" msgstr "Betreff:" #: ../xgnokii/xgnokii_calendar.c:994 msgid "Add Call" msgstr "Anruf hinzufügen" #: ../xgnokii/xgnokii_calendar.c:1064 ../xgnokii/xgnokii_contacts.c:1289 #: ../xgnokii/xgnokii_contacts.c:1827 msgid "Number:" msgstr "Nummer:" #: ../xgnokii/xgnokii_calendar.c:1077 msgid "Text:" msgstr "Text:" #: ../xgnokii/xgnokii_calendar.c:1109 ../xgnokii/xgnokii_calendar.c:1241 msgid "Repeat:" msgstr "Wiederhole:" #: ../xgnokii/xgnokii_calendar.c:1134 ../xgnokii/xgnokii_calendar.c:1618 msgid "Add meeting" msgstr "Besprechung hinzufügen" #: ../xgnokii/xgnokii_calendar.c:1267 ../xgnokii/xgnokii_calendar.c:1622 msgid "Add birthday" msgstr "Geburtstag hinzufügen" #: ../xgnokii/xgnokii_calendar.c:1428 msgid "Delete calendar note" msgstr "Lösche Kalendereintrag" #: ../xgnokii/xgnokii_calendar.c:1460 msgid "Do you want to delete selected note(s)?" msgstr "Wollen sie die gewählten Notiz(en) löschen?" #: ../xgnokii/xgnokii_calendar.c:1496 ../xgnokii/xgnokii_contacts.c:3081 #: ../xgnokii/xgnokii_dtmf.c:219 ../xgnokii/xgnokii_logos.c:1474 #: ../xgnokii/xgnokii_netmon.c:258 ../xgnokii/xgnokii_sms.c:1245 #: ../xgnokii/xgnokii_sms.c:1633 ../xgnokii/xgnokii_speed.c:516 #: ../xgnokii/xgnokii_xkeyb.c:235 ../xgnokii/xgnokii_xring.c:826 msgid "/_File" msgstr "/_Datei" #: ../xgnokii/xgnokii_calendar.c:1497 ../xgnokii/xgnokii_contacts.c:3082 #: ../xgnokii/xgnokii_speed.c:517 msgid "/File/_Read from phone" msgstr "/Datei/Aus Telefon aus_lesen" #: ../xgnokii/xgnokii_calendar.c:1498 ../xgnokii/xgnokii_contacts.c:3083 #: ../xgnokii/xgnokii_speed.c:518 msgid "/File/_Save to phone" msgstr "/Datei/Ins Telefon _schreiben" #: ../xgnokii/xgnokii_calendar.c:1499 ../xgnokii/xgnokii_contacts.c:3084 #: ../xgnokii/xgnokii_dtmf.c:222 ../xgnokii/xgnokii_logos.c:1478 #: ../xgnokii/xgnokii_sms.c:1248 ../xgnokii/xgnokii_sms.c:1637 #: ../xgnokii/xgnokii_speed.c:519 msgid "/File/Sep1" msgstr "/Datei/Sep1" #: ../xgnokii/xgnokii_calendar.c:1500 msgid "/File/Send via S_MS" msgstr "/Datei/Als _SMS senden" #: ../xgnokii/xgnokii_calendar.c:1501 ../xgnokii/xgnokii_contacts.c:3087 #: ../xgnokii/xgnokii_logos.c:1482 ../xgnokii/xgnokii_sms.c:1251 #: ../xgnokii/xgnokii_speed.c:522 msgid "/File/Sep2" msgstr "/Datei/Sep2" #: ../xgnokii/xgnokii_calendar.c:1502 ../xgnokii/xgnokii_contacts.c:3085 #: ../xgnokii/xgnokii_speed.c:520 msgid "/File/_Import from file" msgstr "/Datei/Aus Datei _importieren" #: ../xgnokii/xgnokii_calendar.c:1503 ../xgnokii/xgnokii_contacts.c:3086 #: ../xgnokii/xgnokii_speed.c:521 msgid "/File/_Export to file" msgstr "/Datei/In Datei _exportieren" #: ../xgnokii/xgnokii_calendar.c:1504 msgid "/File/Sep3" msgstr "/Datei/Sep3" #: ../xgnokii/xgnokii_calendar.c:1505 ../xgnokii/xgnokii_contacts.c:3088 #: ../xgnokii/xgnokii_dtmf.c:223 ../xgnokii/xgnokii_logos.c:1483 #: ../xgnokii/xgnokii_netmon.c:259 ../xgnokii/xgnokii_sms.c:1252 #: ../xgnokii/xgnokii_sms.c:1638 ../xgnokii/xgnokii_speed.c:523 #: ../xgnokii/xgnokii_xkeyb.c:236 ../xgnokii/xgnokii_xring.c:836 msgid "/File/_Close" msgstr "/Datei/_Schließen" #: ../xgnokii/xgnokii_calendar.c:1506 ../xgnokii/xgnokii_contacts.c:3089 #: ../xgnokii/xgnokii_logos.c:1484 ../xgnokii/xgnokii_speed.c:524 #: ../xgnokii/xgnokii_xring.c:837 msgid "/_Edit" msgstr "/_Bearbeiten" #: ../xgnokii/xgnokii_calendar.c:1507 msgid "/Edit/Add _reminder" msgstr "/Bearbeiten/_Erinnerung hinzufügen" #: ../xgnokii/xgnokii_calendar.c:1508 msgid "/Edit/Add _call" msgstr "/Bearbeiten/_Anruf hinzufügen" #: ../xgnokii/xgnokii_calendar.c:1509 msgid "/Edit/Add _meeting" msgstr "/Bearbeiten/Be_sprechung hinzufügen" #: ../xgnokii/xgnokii_calendar.c:1510 msgid "/Edit/Add _birthday" msgstr "/Bearbeiten/_Geburtstag hinzufügen" #. #. menu_items[15].path = _("/Edit/_Edit"); #. #: ../xgnokii/xgnokii_calendar.c:1514 ../xgnokii/xgnokii_contacts.c:3093 msgid "/Edit/_Delete" msgstr "/Bearbeiten/_Löschen" #: ../xgnokii/xgnokii_calendar.c:1515 ../xgnokii/xgnokii_contacts.c:3096 #: ../xgnokii/xgnokii_logos.c:1492 msgid "/Edit/Sep4" msgstr "/Bearbeiten/Sep4" #: ../xgnokii/xgnokii_calendar.c:1516 ../xgnokii/xgnokii_contacts.c:3100 msgid "/Edit/Select _all" msgstr "/Bearbeiten/_Alle auswählen" #: ../xgnokii/xgnokii_calendar.c:1517 ../xgnokii/xgnokii_contacts.c:3103 #: ../xgnokii/xgnokii_dtmf.c:224 ../xgnokii/xgnokii_netmon.c:263 #: ../xgnokii/xgnokii_sms.c:1253 ../xgnokii/xgnokii_sms.c:1647 #: ../xgnokii/xgnokii_speed.c:526 ../xgnokii/xgnokii_xkeyb.c:237 msgid "/_Help" msgstr "/_Hilfe" #: ../xgnokii/xgnokii_calendar.c:1518 ../xgnokii/xgnokii_contacts.c:3104 #: ../xgnokii/xgnokii_dtmf.c:225 ../xgnokii/xgnokii_netmon.c:264 #: ../xgnokii/xgnokii_sms.c:1254 ../xgnokii/xgnokii_sms.c:1648 #: ../xgnokii/xgnokii_speed.c:527 ../xgnokii/xgnokii_xkeyb.c:238 msgid "/Help/_About" msgstr "/Hilfe/_Über" #: ../xgnokii/xgnokii_calendar.c:1535 msgid "#" msgstr "#" #: ../xgnokii/xgnokii_calendar.c:1537 msgid "Start date" msgstr "Startdatum" #: ../xgnokii/xgnokii_calendar.c:1538 msgid "End date" msgstr "Enddatum" #: ../xgnokii/xgnokii_calendar.c:1543 msgid "Recurrence" msgstr "Wiederholung" #: ../xgnokii/xgnokii_calendar.c:1576 ../xgnokii/xgnokii_contacts.c:3157 #: ../xgnokii/xgnokii_speed.c:579 msgid "Read from phone" msgstr "Aus Telefon auslesen" #: ../xgnokii/xgnokii_calendar.c:1580 ../xgnokii/xgnokii_contacts.c:3161 #: ../xgnokii/xgnokii_speed.c:583 msgid "Save to phone" msgstr "In Telefon schreiben" #: ../xgnokii/xgnokii_calendar.c:1587 msgid "Send via SMS" msgstr "Schicke als SMS" #: ../xgnokii/xgnokii_calendar.c:1594 ../xgnokii/xgnokii_contacts.c:2753 #: ../xgnokii/xgnokii_contacts.c:3168 ../xgnokii/xgnokii_logos.c:1572 #: ../xgnokii/xgnokii_speed.c:395 ../xgnokii/xgnokii_speed.c:590 #: ../xgnokii/xgnokii_xring.c:894 msgid "Import from file" msgstr "Aus Datei importieren" #: ../xgnokii/xgnokii_calendar.c:1598 ../xgnokii/xgnokii_contacts.c:2671 #: ../xgnokii/xgnokii_contacts.c:3172 ../xgnokii/xgnokii_logos.c:1576 #: ../xgnokii/xgnokii_speed.c:474 ../xgnokii/xgnokii_speed.c:594 #: ../xgnokii/xgnokii_xring.c:898 msgid "Export to file" msgstr "In Datei exportieren" #: ../xgnokii/xgnokii_calendar.c:1614 msgid "Add call" msgstr "Anruf hinzufügen" #: ../xgnokii/xgnokii_calendar.c:1626 msgid "Delete note" msgstr "Notiz löschen" #: ../xgnokii/xgnokii_calendar.c:1691 ../xgnokii/xgnokii_contacts.c:2290 #: ../xgnokii/xgnokii_contacts.c:2316 ../xgnokii/xgnokii_contacts.c:2979 #: ../xgnokii/xgnokii_contacts.c:3225 ../xgnokii/xgnokii_sms.c:1799 #: ../xgnokii/xgnokii_speed.c:190 ../xgnokii/xgnokii_speed.c:196 #: ../xgnokii/xgnokii_speed.c:256 ../xgnokii/xgnokii_speed.c:340 #: ../xgnokii/xgnokii_speed.c:624 #, c-format msgid "Error: %s: line %d: Can't allocate memory!\n" msgstr "Fehler: %s: Zeile %d: Keine Speicherreservierung möglich!\n" #: ../xgnokii/xgnokii_calendar.c:1720 ../xgnokii/xgnokii_sms.c:1833 msgid "couldn't allocate colour" msgstr "Farbe konnte nicht zugeordnet werden" #: ../xgnokii/xgnokii_cfg.c:117 #, c-format msgid "WARNING: Can't allocate memory for config reading!\n" msgstr "" "WARNUNG: Kann keinen Speicher für das Lesen der Konfiguration reservieren!\n" #: ../xgnokii/xgnokii_cfg.c:211 #, c-format msgid "ERROR: Can't open file %s for writing!\n" msgstr "FEHLER: Kann Datei %s nicht zum Schreiben öffnen!\n" #: ../xgnokii/xgnokii_cfg.c:221 #, c-format msgid "ERROR: Can't allocate memory for config writing!\n" msgstr "" "FEHLER: Kann keinen Speicher für das Schreiben der Konfiguration " "reservieren!\n" #: ../xgnokii/xgnokii_cfg.c:226 #, c-format msgid "ERROR: Can't write config file!\n" msgstr "FEHLER: Kann Konfigurationsdatei nicht schreiben!\n" #: ../xgnokii/xgnokii_common.c:73 msgid "Error" msgstr "Fehler" #: ../xgnokii/xgnokii_common.c:110 msgid "Info" msgstr "Info" #: ../xgnokii/xgnokii_common.c:146 msgid "Yes" msgstr "Ja" #: ../xgnokii/xgnokii_common.c:155 msgid "No" msgstr "Nein" #: ../xgnokii/xgnokii_common.c:236 #, c-format msgid "Can't exec %s\n" msgstr "Kann %s nicht ausführen\n" #: ../xgnokii/xgnokii_contacts.c:143 #, c-format msgid "SIM: %d/%d%c Phone: %d/%d%c" msgstr "SIM: %d/%d%c Telefon: %d/%d%c" #: ../xgnokii/xgnokii_contacts.c:317 ../xgnokii/xgnokii_contacts.c:337 msgid "Can't change memory type!" msgstr "Kann Speicherbereich nicht ändern!" #: ../xgnokii/xgnokii_contacts.c:383 #, c-format msgid "" "Phonebook name will be truncated to\n" "%.*s" msgstr "" "Der Name des Telefonbuches wird gekürzt auf\n" "%.*s" #: ../xgnokii/xgnokii_contacts.c:611 msgid "Can't find pattern!" msgstr "Kann Muster nicht finden!" #: ../xgnokii/xgnokii_contacts.c:707 ../xgnokii/xgnokii_contacts.c:794 #: ../xgnokii/xgnokii_contacts.c:939 ../xgnokii/xgnokii_contacts.c:981 #: ../xgnokii/xgnokii_contacts.c:1190 msgid "Mobile" msgstr "Handy" #: ../xgnokii/xgnokii_contacts.c:737 ../xgnokii/xgnokii_contacts.c:809 #: ../xgnokii/xgnokii_contacts.c:944 ../xgnokii/xgnokii_contacts.c:986 #: ../xgnokii/xgnokii_contacts.c:1216 msgid "Postal" msgstr "Postalisch" #: ../xgnokii/xgnokii_contacts.c:869 msgid "Edit subentries" msgstr "Bearbeite Untereinträge" #: ../xgnokii/xgnokii_contacts.c:894 msgid "Delete" msgstr "Löschen" #: ../xgnokii/xgnokii_contacts.c:913 msgid "Number/Text:" msgstr "Nummer/Text:" #: ../xgnokii/xgnokii_contacts.c:925 msgid "Type:" msgstr "Typ:" #: ../xgnokii/xgnokii_contacts.c:960 ../xgnokii/xgnokii_contacts.c:1356 #: ../xgnokii/xgnokii_contacts.c:3187 ../xgnokii/xgnokii_speed.c:601 msgid "Edit entry" msgstr "Eintrag bearbeiten" #: ../xgnokii/xgnokii_contacts.c:1111 msgid "Numbers" msgstr "Nummern" #: ../xgnokii/xgnokii_contacts.c:1131 msgid "New" msgstr "Neu" #: ../xgnokii/xgnokii_contacts.c:1315 msgid "Memory:" msgstr "Speicher:" #: ../xgnokii/xgnokii_contacts.c:1319 msgid "phone" msgstr "Telefon" #: ../xgnokii/xgnokii_contacts.c:1336 msgid "Caller group:" msgstr "Anrufgruppe:" #: ../xgnokii/xgnokii_contacts.c:1399 msgid "Delete entries" msgstr "Einträge löschen" #: ../xgnokii/xgnokii_contacts.c:1431 msgid "Do you want to delete selected entries?" msgstr "Wollen sie die gewählten Einträge löschen?" #: ../xgnokii/xgnokii_contacts.c:1449 ../xgnokii/xgnokii_contacts.c:3179 msgid "New entry" msgstr "Neuer Eintrag" #: ../xgnokii/xgnokii_contacts.c:1493 ../xgnokii/xgnokii_contacts.c:3183 msgid "Duplicate entry" msgstr "Eintrag duplizieren" #: ../xgnokii/xgnokii_contacts.c:1562 ../xgnokii/xgnokii_contacts.c:1570 #: ../xgnokii/xgnokii_contacts.c:1598 msgid "Can't find free memory." msgstr "Kann keinen freien Speicher finden." #: ../xgnokii/xgnokii_contacts.c:1635 msgid "Changing memory type" msgstr "Wechsle Speicherart" #: ../xgnokii/xgnokii_contacts.c:1642 msgid "Continue" msgstr "Fortfahren" #: ../xgnokii/xgnokii_contacts.c:1664 msgid "" "If you change from phone memory to SIM memory\n" "some entries may be truncated." msgstr "" #: ../xgnokii/xgnokii_contacts.c:1682 ../xgnokii/xgnokii_contacts.c:1688 msgid "Find" msgstr "Suchen" #: ../xgnokii/xgnokii_contacts.c:1714 msgid "Pattern:" msgstr "Muster:" #: ../xgnokii/xgnokii_contacts.c:1800 msgid "Dial pad" msgstr "Dial-Pad" #: ../xgnokii/xgnokii_contacts.c:1806 msgid "Dial" msgstr "Wählen" #: ../xgnokii/xgnokii_contacts.c:2059 msgid "Phone memory..." msgstr "Telefonspeicher..." #: ../xgnokii/xgnokii_contacts.c:2070 msgid "SIM memory..." msgstr "Kartenspeicher..." #: ../xgnokii/xgnokii_contacts.c:2135 msgid "Saving entries" msgstr "Sichere Einträge" #: ../xgnokii/xgnokii_contacts.c:2150 ../xgnokii/xgnokii_contacts.c:2170 #, c-format msgid "%s: line %d: Can't write %s memory entry number %d! Error: %s\n" msgstr "" #: ../xgnokii/xgnokii_contacts.c:2192 msgid "Save changes?" msgstr "Änderungen sichern?" #: ../xgnokii/xgnokii_contacts.c:2206 msgid "Don't save" msgstr "Nicht sichern" #: ../xgnokii/xgnokii_contacts.c:2228 msgid "" "You have made changes in your\n" "contacts directory.\n" "\n" "\n" "Do you want to save these changes into your phone?\n" msgstr "" "Sie haben Änderungen in Ihren\n" "Kontakten vorgenommen.\n" "\n" "\n" "Möchten Sie diese Änderungen in Ihrem Handy speichern?\n" #: ../xgnokii/xgnokii_contacts.c:2420 msgid "Getting entries" msgstr "Hole Einträge" #: ../xgnokii/xgnokii_contacts.c:2654 ../xgnokii/xgnokii_dtmf.c:166 #: ../xgnokii/xgnokii_logos.c:1350 ../xgnokii/xgnokii_speed.c:457 msgid "Overwrite file?" msgstr "Datei überschreiben?" #: ../xgnokii/xgnokii_contacts.c:2655 ../xgnokii/xgnokii_dtmf.c:167 #: ../xgnokii/xgnokii_logos.c:1351 ../xgnokii/xgnokii_speed.c:458 #, c-format msgid "" "File %s already exists.\n" "Overwrite?" msgstr "" "Datei %s existiert bereits.\n" "Überschreiben?" #: ../xgnokii/xgnokii_contacts.c:2936 ../xgnokii/xgnokii_contacts.c:3120 msgid "Memory" msgstr "Speicher" #: ../xgnokii/xgnokii_contacts.c:2946 ../xgnokii/xgnokii_sms.c:1358 msgid "Select contacts" msgstr "Kontakte auswählen" #: ../xgnokii/xgnokii_contacts.c:3090 msgid "/Edit/_New" msgstr "/Bearbeiten/_Neu" #: ../xgnokii/xgnokii_contacts.c:3091 msgid "/Edit/D_uplicate" msgstr "/Bearbeiten/_Duplizieren" #: ../xgnokii/xgnokii_contacts.c:3092 ../xgnokii/xgnokii_speed.c:525 msgid "/Edit/_Edit" msgstr "/Bearbeiten/_Bearbeiten" #: ../xgnokii/xgnokii_contacts.c:3094 ../xgnokii/xgnokii_logos.c:1487 msgid "/Edit/Sep3" msgstr "/Bearbeiten/Sep3" #: ../xgnokii/xgnokii_contacts.c:3095 msgid "/Edit/_Change memory type" msgstr "/Bearbeiten/_Wechsle Speicherart" #: ../xgnokii/xgnokii_contacts.c:3097 msgid "/Edit/_Find" msgstr "/Bearbeiten/_Suchen" #: ../xgnokii/xgnokii_contacts.c:3098 msgid "/Edit/Find ne_xt" msgstr "/Bearbeiten/_Weitersuchen" #: ../xgnokii/xgnokii_contacts.c:3099 msgid "/Edit/Sep5" msgstr "/Bearbeiten/Sep5" #: ../xgnokii/xgnokii_contacts.c:3101 msgid "/_Dial" msgstr "/_Wählen" #: ../xgnokii/xgnokii_contacts.c:3102 msgid "/Dial/Dial _voice" msgstr "/_Wählen/Sprachanruf" #: ../xgnokii/xgnokii_contacts.c:3191 msgid "Delete entry" msgstr "Eintrag löschen" #: ../xgnokii/xgnokii_contacts.c:3198 msgid "Dial voice" msgstr "Sprachanruf" #: ../xgnokii/xgnokii_data.c:52 #, c-format msgid "" "Data calls are currently\n" "Disabled\n" " " msgstr "" "Data-Calls sind zur Zeit\n" "Deaktiviert\n" " " #: ../xgnokii/xgnokii_data.c:54 #, c-format msgid "" "Data calls are currently\n" "Enabled\n" " " msgstr "" "Data-Calls sind zur Zeit\n" "Aktiviert\n" " " #: ../xgnokii/xgnokii_data.c:102 msgid "Virtual Modem" msgstr "Virtuelles Modem" #: ../xgnokii/xgnokii.desktop.in.h:1 msgid "Manage your mobile phone" msgstr "Verwalten Sie Ihr Mobiltelefon" #: ../xgnokii/xgnokii.desktop.in.h:2 msgid "Mobile Phone Suite" msgstr "Suite für Mobiltelefone" #: ../xgnokii/xgnokii.desktop.in.h:3 msgid "Xgnokii" msgstr "Xgnokii" #: ../xgnokii/xgnokii_dtmf.c:100 ../xgnokii/xgnokii_speed.c:351 #: ../xgnokii/xgnokii_speed.c:376 #, c-format msgid "Error reading file!" msgstr "Fehler beim Lesen einer Datei!" #: ../xgnokii/xgnokii_dtmf.c:116 msgid "Load" msgstr "Öffnen" #: ../xgnokii/xgnokii_dtmf.c:220 ../xgnokii/xgnokii_logos.c:1475 #: ../xgnokii/xgnokii_xring.c:827 msgid "/File/_Open" msgstr "/Datei/Ö_ffnen" #: ../xgnokii/xgnokii_dtmf.c:221 ../xgnokii/xgnokii_logos.c:1476 #: ../xgnokii/xgnokii_sms.c:1247 ../xgnokii/xgnokii_sms.c:1634 #: ../xgnokii/xgnokii_xring.c:828 msgid "/File/_Save" msgstr "/Datei/S_peichern" #: ../xgnokii/xgnokii_dtmf.c:247 msgid "Dial Tone" msgstr "Wählton" #: ../xgnokii/xgnokii_dtmf.c:312 msgid "Pause" msgstr "Pause" #: ../xgnokii/xgnokii_dtmf.c:317 msgid "Wait" msgstr "Warten" #: ../xgnokii/xgnokii_logos.c:972 #, c-format msgid "" "Error getting network info\n" "%s" msgstr "" "Fehler beim Ermitteln von Netzwerkinformationen\n" "%s" #: ../xgnokii/xgnokii_logos.c:1018 #, c-format msgid "" "Error getting bitmap\n" "%s" msgstr "" "Fehler beim Holen eines Bildes\n" "%s" #: ../xgnokii/xgnokii_logos.c:1068 #, c-format msgid "" "Error setting bitmap\n" "%s" msgstr "" "Fehler beim Setzen eines Bildes\n" "%s" #: ../xgnokii/xgnokii_logos.c:1323 ../xgnokii/xgnokii_xring.c:650 #: ../xgnokii/xgnokii_xring.c:693 #, c-format msgid "" "Error writing file\n" "%s" msgstr "" "Fehler beim Schreiben der Datei\n" "%s" #: ../xgnokii/xgnokii_logos.c:1382 ../xgnokii/xgnokii_xring.c:613 #, c-format msgid "" "Error reading file\n" "%s" msgstr "" "Fehler beim Lesen der Datei\n" "%s" #: ../xgnokii/xgnokii_logos.c:1409 msgid "Save logo as ..." msgstr "Speichere Logo unter ..." #: ../xgnokii/xgnokii_logos.c:1434 msgid "Open logo..." msgstr "Öffene Logo..." #: ../xgnokii/xgnokii_logos.c:1477 ../xgnokii/xgnokii_xring.c:829 msgid "/File/Save _as ..." msgstr "/Datei/Speichern _unter ..." #: ../xgnokii/xgnokii_logos.c:1479 msgid "/File/_Get operator" msgstr "" #: ../xgnokii/xgnokii_logos.c:1480 msgid "/File/Get _logo" msgstr "/Datei/Logo _auslesen" #: ../xgnokii/xgnokii_logos.c:1481 msgid "/File/Se_t logo" msgstr "/Datei/Logo festlegen" #: ../xgnokii/xgnokii_logos.c:1485 ../xgnokii/xgnokii_xring.c:838 msgid "/Edit/_Clear" msgstr "/Bearbeiten/_Löschen" #: ../xgnokii/xgnokii_logos.c:1486 msgid "/Edit/_Invert" msgstr "/Bearbeiten/_Invertieren" #: ../xgnokii/xgnokii_logos.c:1488 msgid "/Edit/_Up logo" msgstr "" #: ../xgnokii/xgnokii_logos.c:1489 msgid "/Edit/_Down logo" msgstr "" #: ../xgnokii/xgnokii_logos.c:1490 msgid "/Edit/_Left logo" msgstr "" #: ../xgnokii/xgnokii_logos.c:1491 msgid "/Edit/_Right logo" msgstr "" #: ../xgnokii/xgnokii_logos.c:1493 msgid "/Edit/Flip _horizontal" msgstr "/Bearbeiten/_Horizontal spiegeln" #: ../xgnokii/xgnokii_logos.c:1494 msgid "/Edit/Flip _vertical" msgstr "/Bearbeiten/_Vertikal spiegeln" #: ../xgnokii/xgnokii_logos.c:1553 msgid "Clear logo" msgstr "Logo löschen" #: ../xgnokii/xgnokii_logos.c:1560 msgid "Get logo" msgstr "Logo auslesen" #: ../xgnokii/xgnokii_logos.c:1565 msgid "Set logo" msgstr "Logo festlegen" #: ../xgnokii/xgnokii_logos.c:1585 msgid "Startup logo" msgstr "Startlogo" #: ../xgnokii/xgnokii_logos.c:1594 msgid "Operator logo" msgstr "Betreiberlogo" #: ../xgnokii/xgnokii_logos.c:1604 msgid "Caller logo" msgstr "Kontaktbild" #: ../xgnokii/xgnokii_logos.c:1731 msgid "Brush tool" msgstr "Sprühpistole" #: ../xgnokii/xgnokii_logos.c:1742 msgid "Line tool" msgstr "Linie zeichnen" #: ../xgnokii/xgnokii_logos.c:1752 msgid "Rectangle tool" msgstr "Rechteck zeichnen" #: ../xgnokii/xgnokii_logos.c:1762 msgid "Filled rectangle tool" msgstr "Gefülltes Rechteck zeichnen" #: ../xgnokii/xgnokii_logos.c:1771 msgid "Invert logo" msgstr "Logo invertieren" #: ../xgnokii/xgnokii_logos.c:1776 msgid "Horizontal flip" msgstr "Horizontale Spiegeln" #: ../xgnokii/xgnokii_logos.c:1781 msgid "Vertical flip" msgstr "Vertikale Spiegeln" #: ../xgnokii/xgnokii_logos.c:1836 msgid "Load preview pixmap error, feature disabled." msgstr "Fehler beim Laden der Vorschau, Funktion deaktiviert." #: ../xgnokii/xgnokii_lowlevel.c:210 #, c-format msgid "Failed to open the phone. Quitting.\n" msgstr "Kontaktieren des Telefons ist fehlgeschlagen. Beende das Programm.\n" #. We have some misconfiguration: phone doesn't handle #. neither folders nor SIM #: ../xgnokii/xgnokii_lowlevel.c:403 #, c-format msgid "" "Misconfiguration detected: phone handles neither folders nor sim.\n" "Contact gnokii developers to fix the issue.\n" msgstr "" "Fehlkonfiguration entdeckt: das Telefon bedient weder Ordner noch SIM.\n" "Bitte kontaktiere die Gnokii-Entwickler um dieses Problem zu lösen.\n" #: ../xgnokii/xgnokii_lowlevel.c:481 #, c-format msgid "%s: line %d: Can't get memory entry number %d from memory %d! %d\n" msgstr "" #: ../xgnokii/xgnokii_lowlevel.c:1249 msgid "Connecting..." msgstr "Verbinde..." #: ../xgnokii/xgnokii_lowlevel.c:1260 msgid "" "It has been reported that your phone is known to be broken by xgnokii.\n" "Exiting application to avoid breakage. If you want to take a risk and\n" "run xgnokii anyway, set:\n" "\n" "\tallow_breakage = 1\n" "\n" "in xgnokii section in your config file.\n" "See http://thread.gmane.org/gmane.linux.drivers.gnokii/3195 for details.\n" msgstr "" "Es wurde berichtet, daß Ihr Telefonmodell nicht problemlos mit xgnokii " "funktioniert.\n" "Die Anwendung wird beendet um einen Schaden zu vermeiden. Wenn Sie das " "Risiko\n" "tragen und xgnokii nutzen möchten, dann setzen Sie:\n" "\n" "\tallow_breakage = 1\n" "\n" "im Abschnitt \"[xgnokii]\" Ihrer Konfigurationsdatei.\n" "Mehr Details finden Sie unter http://thread.gmane.org/gmane.linux.drivers." "gnokii/3195.\n" #: ../xgnokii/xgnokii_lowlevel.c:1397 msgid "Refreshing SMSes..." msgstr "Auffrischen der SMS" #: ../xgnokii/xgnokii_netmon.c:260 msgid "/_Tools" msgstr "/_Werkzeuge" #: ../xgnokii/xgnokii_netmon.c:261 msgid "/Tools/Net monitor o_n" msgstr "/Werkzeuge/Netzmonitor _ein" #: ../xgnokii/xgnokii_netmon.c:262 msgid "/Tools/Net monitor o_ff" msgstr "/Werkzeuge/Netzwerkmonitor _aus" #: ../xgnokii/xgnokii_netmon.c:354 ../xgnokii/xgnokii_netmon.c:357 msgid "Active cell" msgstr "Aktive Zelle" #: ../xgnokii/xgnokii_netmon.c:360 msgid "NCELL list I" msgstr "NCELL-Liste I" #: ../xgnokii/xgnokii_netmon.c:363 msgid "NCELL list II" msgstr "NCELL-Liste II" #: ../xgnokii/xgnokii_netmon.c:366 msgid "NCELL list III" msgstr "NCELL-Liste III" #: ../xgnokii/xgnokii_netmon.c:369 msgid "Preferred/Denied networks" msgstr "Bevorzugte/Verbotene Netze" #: ../xgnokii/xgnokii_netmon.c:372 msgid "System information bits" msgstr "Systeminformationsbits" #: ../xgnokii/xgnokii_netmon.c:375 msgid "TMSI, Paging, PLU" msgstr "TMSI, Paging, PLU" #: ../xgnokii/xgnokii_netmon.c:378 msgid "Cells info" msgstr "Zelleninformation" #: ../xgnokii/xgnokii_netmon.c:381 msgid "DTX, Cipher, Hopping" msgstr "DTX, Cipher, Hopping" #: ../xgnokii/xgnokii_netmon.c:392 msgid "Uplink DTX" msgstr "Uplink DTX" #: ../xgnokii/xgnokii_netmon.c:395 msgid "BTS TEST" msgstr "BTS-Test" #: ../xgnokii/xgnokii_netmon.c:398 msgid "CELL BARR-Flag" msgstr "CELL BARR-Flag" #: ../xgnokii/xgnokii_netmon.c:401 msgid "Accumulator, Charge status" msgstr "Akku, Ladestatus" #: ../xgnokii/xgnokii_netmon.c:404 msgid "?Constant voltage charging display" msgstr "Anzeige der Ladespannung" #: ../xgnokii/xgnokii_netmon.c:407 msgid "?Battery full detection" msgstr "?Erkennung der vollen Batterie" #: ../xgnokii/xgnokii_netmon.c:410 msgid "Accumulator" msgstr "Akku" #: ../xgnokii/xgnokii_netmon.c:413 msgid "SW-Resets" msgstr "SW-Resets" #: ../xgnokii/xgnokii_netmon.c:416 msgid "Reset-Counter" msgstr "Reset-Zähler" #: ../xgnokii/xgnokii_netmon.c:420 msgid "Cause codes for last connection abortion" msgstr "Ursachen-Code für den letzten Verbindungsabbruch" #: ../xgnokii/xgnokii_netmon.c:431 msgid "Reset handover counters" msgstr "Handover-Zähler zurücksetzen" #: ../xgnokii/xgnokii_netmon.c:434 msgid "Handover Counter" msgstr "Handover-Zähler" #: ../xgnokii/xgnokii_netmon.c:437 msgid "Handover Counter (Dual)" msgstr "Handover-Zähler (Dual)" #: ../xgnokii/xgnokii_netmon.c:440 msgid "L2-Timeouts" msgstr "L2-Zeitüberschreitungen" #: ../xgnokii/xgnokii_netmon.c:443 msgid "SIM" msgstr "SIM" #: ../xgnokii/xgnokii_netmon.c:446 msgid "?Block display 1" msgstr "" #: ../xgnokii/xgnokii_netmon.c:452 msgid "Memory status before reset" msgstr "Speicherstatus vor dem Reset" #: ../xgnokii/xgnokii_netmon.c:455 msgid "Reset Counters" msgstr "Zähler zurücksetzen" #: ../xgnokii/xgnokii_netmon.c:459 msgid "Counter for PLMN Search and Cell reselection (Singleband)" msgstr "" #: ../xgnokii/xgnokii_netmon.c:470 msgid "Neighbourhood measurement" msgstr "" #: ../xgnokii/xgnokii_netmon.c:473 msgid "Calls" msgstr "Anrufe" #: ../xgnokii/xgnokii_netmon.c:476 msgid "Temporary counters of DSP" msgstr "Temporäre Zähler des DSP" #: ../xgnokii/xgnokii_netmon.c:480 msgid "Control of task information displays" msgstr "" #: ../xgnokii/xgnokii_netmon.c:483 msgid "Information about task numbers 0-7" msgstr "Informationen über Aufgaben mit den Nummern 0-7" #: ../xgnokii/xgnokii_netmon.c:487 msgid "Information about task numbers 8-15" msgstr "Informationen über Aufgaben mit den Nummern 8-15" #: ../xgnokii/xgnokii_netmon.c:491 msgid "Information about task numbers 16-23" msgstr "Informationen über Aufgaben mit den Nummern 16-23" #: ../xgnokii/xgnokii_netmon.c:494 msgid "Information about OS_SYSTEM_STACK" msgstr "Informationen über den OS_SYSTEM_STACK" #: ../xgnokii/xgnokii_netmon.c:498 msgid "Information about current MCU and DSP software versions" msgstr "Informationen über die aktuelle MCU- und DSP-Softwareversionen" #: ../xgnokii/xgnokii_netmon.c:501 msgid "Hardware version" msgstr "Hardware-Version" #: ../xgnokii/xgnokii_netmon.c:520 msgid "Chan" msgstr "Chan" #: ../xgnokii/xgnokii_netmon.c:521 msgid "RxLv" msgstr "RxLv" #: ../xgnokii/xgnokii_netmon.c:522 msgid "C1" msgstr "C1" #: ../xgnokii/xgnokii_netmon.c:523 msgid "C2" msgstr "C2" #: ../xgnokii/xgnokii_netmon.c:524 msgid "ACT" msgstr "ACT" #: ../xgnokii/xgnokii_netmon.c:525 msgid "NC2" msgstr "NC2" #: ../xgnokii/xgnokii_netmon.c:526 msgid "NC3" msgstr "NC3" #: ../xgnokii/xgnokii_netmon.c:527 msgid "NC4" msgstr "NC4" #: ../xgnokii/xgnokii_netmon.c:528 msgid "NC5" msgstr "NC5" #: ../xgnokii/xgnokii_netmon.c:529 msgid "NC6" msgstr "NC6" #: ../xgnokii/xgnokii_netmon.c:530 msgid "NC7" msgstr "NC7" #: ../xgnokii/xgnokii_netmon.c:560 msgid "Page:" msgstr "Seite:" #: ../xgnokii/xgnokii_sms.c:250 ../xgnokii/xgnokii_sms.c:330 #: ../xgnokii/xgnokii_sms.c:444 msgid "read" msgstr "gelesen" #: ../xgnokii/xgnokii_sms.c:253 ../xgnokii/xgnokii_sms.c:333 #: ../xgnokii/xgnokii_sms.c:430 msgid "unread" msgstr "ungelesen" #: ../xgnokii/xgnokii_sms.c:256 ../xgnokii/xgnokii_sms.c:336 msgid "sent" msgstr "gesendet" #: ../xgnokii/xgnokii_sms.c:259 ../xgnokii/xgnokii_sms.c:339 msgid "not sent" msgstr "nicht gesendet" #: ../xgnokii/xgnokii_sms.c:302 msgid "read report" msgstr "gelesener Report" #: ../xgnokii/xgnokii_sms.c:305 msgid "unread report" msgstr "ungelesener Report" #: ../xgnokii/xgnokii_sms.c:312 msgid "seen picture" msgstr "betrachtete Bilder" #: ../xgnokii/xgnokii_sms.c:315 msgid "unseen picture" msgstr "nicht betrachtetes Bild" #: ../xgnokii/xgnokii_sms.c:318 msgid "sent picture" msgstr "gesendetes Bild" #: ../xgnokii/xgnokii_sms.c:321 msgid "not sent picture" msgstr "nicht gesendetes Bild" #: ../xgnokii/xgnokii_sms.c:324 msgid "unknown picture" msgstr "unbekannted Bild" #: ../xgnokii/xgnokii_sms.c:349 #, c-format msgid "%02d/%02d/%04d %02d:%02d:%02d %c%02d00" msgstr "%02d/%02d/%04d %02d:%02d:%02d %c%02d00" #: ../xgnokii/xgnokii_sms.c:355 ../xgnokii/xgnokii_sms.c:360 #, c-format msgid "%02d/%02d/%04d %02d:%02d:%02d" msgstr "%02d/%02d/%04d %02d:%02d:%02d" #: ../xgnokii/xgnokii_sms.c:368 #, c-format msgid "Picture Message: %s" msgstr "Bildnachricht: %s" #: ../xgnokii/xgnokii_sms.c:461 msgid "From: " msgstr "Von: " #: ../xgnokii/xgnokii_sms.c:466 msgid "Date: " msgstr "Datum: " #: ../xgnokii/xgnokii_sms.c:563 msgid "Delete SMS" msgstr "SMS löschen" #: ../xgnokii/xgnokii_sms.c:595 msgid "Do you want to delete selected SMS?" msgstr "Wollen sie die ausgewählte SMS löschen?" #: ../xgnokii/xgnokii_sms.c:617 #, c-format msgid "Cannot open mailbox %s for appending!" msgstr "Kann die Mailbox %s nicht zum Anhängen öffnen!" #: ../xgnokii/xgnokii_sms.c:631 #, c-format msgid "" "Cannot save to mailbox %s.\n" "\\%s is locked for process %d!" msgstr "" "Kann nicht in die Mailbox %s speichern.\n" "\\%s ist durch den Prozess %d gesperrt!" #: ../xgnokii/xgnokii_sms.c:644 #, c-format msgid "Cannot lock mailbox %s!" msgstr "Kann die Mailbox nicht sperren %s!" #: ../xgnokii/xgnokii_sms.c:699 #, c-format msgid "Cannot unlock mailbox %s!" msgstr "Kann die Mailbox nicht entsperren %s!" #: ../xgnokii/xgnokii_sms.c:747 msgid "Choose Mailbox File" msgstr "Wähle Mailbox-Datei" #: ../xgnokii/xgnokii_sms.c:857 #, c-format msgid "" "Name: %s\n" "Number: %s\n" "Used: %d\n" msgstr "" "Name: %s\n" "Nummer: %s\n" "Genutzt: %d\n" #: ../xgnokii/xgnokii_sms.c:956 ../xgnokii/xgnokii_sms.c:1089 msgid "Address line contains illegal address!" msgstr "Adresszeile enthält eine falsche Adresse!" #: ../xgnokii/xgnokii_sms.c:1060 #, c-format msgid "" "Error sending SMS to %s\n" "%s" msgstr "" "Fehler beim Senden einer SMS an %s\n" "%s" #: ../xgnokii/xgnokii_sms.c:1066 #, c-format msgid "Message sent to: %s\n" msgstr "Nachrichten geschickt an: %s\n" #: ../xgnokii/xgnokii_sms.c:1153 ../xgnokii/xgnokii_sms.c:1185 #: ../xgnokii/xgnokii_sms.c:1211 #, c-format msgid "Sending SMS to %s (%d/%d) ...\n" msgstr "Sende SMS an %s (%d/%d) ...\n" #: ../xgnokii/xgnokii_sms.c:1246 msgid "/File/Sen_d" msgstr "/Datei/Senden" #: ../xgnokii/xgnokii_sms.c:1249 msgid "/File/Check _Names" msgstr "/Datei/Überprüfe _sNamen" #: ../xgnokii/xgnokii_sms.c:1250 msgid "/File/C_ontacts" msgstr "/Datei/K_ontakte" #: ../xgnokii/xgnokii_sms.c:1310 msgid "Send message" msgstr "Schicke Nachricht" #: ../xgnokii/xgnokii_sms.c:1314 msgid "Save message to outbox" msgstr "Speichere Nachricht im Ausgang" #: ../xgnokii/xgnokii_sms.c:1321 msgid "Check names" msgstr "Überprüfe Namen" #: ../xgnokii/xgnokii_sms.c:1334 msgid "To:" msgstr "An:" #: ../xgnokii/xgnokii_sms.c:1402 msgid "Delivery report" msgstr "Auslieferreport" #: ../xgnokii/xgnokii_sms.c:1406 msgid "Send as Long SMS" msgstr "Als lange SMS schicken" #: ../xgnokii/xgnokii_sms.c:1410 msgid "SMS Center:" msgstr "SMS Center:" #: ../xgnokii/xgnokii_sms.c:1431 msgid "New Message" msgstr "Neue Nachricht" #: ../xgnokii/xgnokii_sms.c:1457 msgid "Forward Message" msgstr "Nachricht weiterleiten" #: ../xgnokii/xgnokii_sms.c:1498 msgid "Reply Message" msgstr "Nachricht beantworten" #: ../xgnokii/xgnokii_sms.c:1635 msgid "/File/Save to mailbo_x" msgstr "/Datei/In _Postfach speichern" #: ../xgnokii/xgnokii_sms.c:1636 msgid "/File/Save to _file" msgstr "/Datei/In _Datei speichern" #: ../xgnokii/xgnokii_sms.c:1639 msgid "/_Messages" msgstr "/_Nachrichten" #: ../xgnokii/xgnokii_sms.c:1640 msgid "/_Messages/_Activate SMS reading" msgstr "/_Nachrichten/_Aktiviere SMS-Lesen" #: ../xgnokii/xgnokii_sms.c:1641 msgid "/_Messages/_New" msgstr "/_Nachrichten/_Neu" #: ../xgnokii/xgnokii_sms.c:1642 msgid "/_Messages/_Forward" msgstr "/_Nachrichten/_Weiterleiten" #: ../xgnokii/xgnokii_sms.c:1643 msgid "/_Messages/_Reply" msgstr "/_Nachrichten/_Antworten" #: ../xgnokii/xgnokii_sms.c:1644 msgid "/_Messages/_Delete" msgstr "/_Nachrichten/_Löschen" #: ../xgnokii/xgnokii_sms.c:1645 msgid "/Messages/Sep3" msgstr "/Nachrichten/Sep3" #: ../xgnokii/xgnokii_sms.c:1646 msgid "/_Messages/_Business card" msgstr "/_Nachrichten/_Visitenkarte" #: ../xgnokii/xgnokii_sms.c:1666 msgid "Status" msgstr "Status" #: ../xgnokii/xgnokii_sms.c:1666 msgid "Date / Time" msgstr "Datum / Uhrzeit" #: ../xgnokii/xgnokii_sms.c:1666 msgid "Sender" msgstr "Sender" #: ../xgnokii/xgnokii_sms.c:1666 msgid "Message" msgstr "Nachricht" #: ../xgnokii/xgnokii_sms.c:1703 msgid "New message" msgstr "Neue Nachricht" #: ../xgnokii/xgnokii_sms.c:1707 msgid "Forward message" msgstr "Nachricht weiterleiten" #: ../xgnokii/xgnokii_sms.c:1711 msgid "Reply message" msgstr "Nachricht beantworten" #: ../xgnokii/xgnokii_sms.c:1723 msgid "Delete message" msgstr "Nachricht löschen" #: ../xgnokii/xgnokii_sms.c:1748 msgid "SMS's" msgstr "SMS's" #: ../xgnokii/xgnokii_speed.c:181 msgid "Reading data ..." msgstr "Lese Daten ..." #: ../xgnokii/xgnokii_speed.c:207 #, c-format msgid "Cannot read speed dial key %d!\n" msgstr "Kurzwahl für die Taste %d konnte nicht gelesen werden!\n" #: ../xgnokii/xgnokii_speed.c:268 #, c-format msgid "Error writing speed dial for key %d!\n" msgstr "Fehler beim Schreiben der Kurzwahl für Taste %d!\n" #: ../xgnokii/xgnokii_speed.c:542 msgid "Key" msgstr "Schlüssel" #: ../xgnokii/xgnokii_xkeyb.c:180 msgid "Cannot load background pixmap!" msgstr "Kann Hintergrundbild nicht öffnen!" #: ../xgnokii/xgnokii_xkeyb.c:253 msgid "XGnokii Keyboard" msgstr "XGnokii Tastatur" #: ../xgnokii/xgnokii_xring.c:404 #, c-format msgid "User #%d (%s)" msgstr "Nutzer #%d (%s)" #: ../xgnokii/xgnokii_xring.c:423 #, c-format msgid "User #%d (*EMPTY*)" msgstr "Nutzer #%d (*LEER*)" #: ../xgnokii/xgnokii_xring.c:628 msgid "Open ringtone..." msgstr "Öffene Rufton..." #: ../xgnokii/xgnokii_xring.c:670 msgid "Save ringtone as..." msgstr "Speichere Rufton unter..." #: ../xgnokii/xgnokii_xring.c:736 #, c-format msgid "Empty ringtone list" msgstr "Leere Ruftonliste" #: ../xgnokii/xgnokii_xring.c:746 #, c-format msgid "" "Error getting ringtone\n" "%s" msgstr "" "Fehler beim Bekommen des Ruftones\n" "%s" #: ../xgnokii/xgnokii_xring.c:763 #, c-format msgid "" "Error setting ringtone\n" "%s" msgstr "" "Fehler beim Setzen des Ruftones\n" "%s" #: ../xgnokii/xgnokii_xring.c:782 #, c-format msgid "" "Error deleting ringtone\n" "%s" msgstr "" "Fehler beim Löschen des Ruftones\n" "s%s" #: ../xgnokii/xgnokii_xring.c:830 msgid "/File/S1" msgstr "/Datei/S1 " #: ../xgnokii/xgnokii_xring.c:831 msgid "/File/_Get ringtone" msgstr "/Datei/Rufton _bekommen" #: ../xgnokii/xgnokii_xring.c:832 msgid "/File/Se_t ringtone" msgstr "/Datei/Rufton _setzen" #: ../xgnokii/xgnokii_xring.c:833 msgid "/File/Delete ringtone" msgstr "/Datei/Rufton löschen" #: ../xgnokii/xgnokii_xring.c:834 msgid "/File/_Play" msgstr "/Datei/_Abspielen" #: ../xgnokii/xgnokii_xring.c:835 msgid "/File/S2" msgstr "/Datei/S2" #: ../xgnokii/xgnokii_xring.c:874 msgid "Clear ringtone" msgstr "Rufton löschen" #: ../xgnokii/xgnokii_xring.c:880 msgid "Get ringtone" msgstr "Rufton bekommen" #: ../xgnokii/xgnokii_xring.c:884 msgid "Set ringtone" msgstr "Rufton setzen" #: ../xgnokii/xgnokii_xring.c:888 msgid "Delete ringtone" msgstr "Rufton löschen" #: ../xgnokii/xgnokii_xring.c:904 msgid "Play" msgstr "Abspielen" #: ../xgnokii/xgnokii_xring.c:913 msgid "Select ringtone" msgstr "Rufton auswählen" #: ../xgnokii/xgnokii_xring.c:918 msgid "Ringtone name" msgstr "Name des Ruftons" #: ../xgnokii/xgnokii_xring.c:930 msgid "Set tempo" msgstr "Geschwindigkeit setzen" #~ msgid "+%02d00" #~ msgstr "+%02d00" #~ msgid "%02d00" #~ msgstr "%02d00" #~ msgid "ERROR: Can't find HOME environment variable!\n" #~ msgstr "FEHLER: Kann die HOME-Umgebungsvariable nicht finden!\n" #~ msgid "Response date/time: %02d/%02d/%04d %02d:%02d:%02d " #~ msgstr "Antwortdatum/-zeit: %02d/%02d/%04d %02d:%02d:%02d " #~ msgid "WARNING: Can't find HOME environment variable!\n" #~ msgstr "WARNUNG: Kann die Umgebungsvariable HOME nicht finden!\n" #~ msgid "Couldn't read config.\n" #~ msgstr "Konnte die Konfiguration nicht lesen.\n" #~ msgid "Progress: %3d%% completed\r" #~ msgstr "Fortschritt: %3d%% angeschlossen\r" #~ msgid "GetMMS %s %d failed! (%s)\n" #~ msgstr "GetMMS %s %d fehlgeschlagen! (%s)\n" #~ msgid "Deleted MMS %s %d\n" #~ msgstr "Gelöschte MMS %s %d\n" #~ msgid "" #~ "DeleteMMS %s %d failed!(%s)\n" #~ "\n" #~ msgstr "" #~ "MMS löschen %s %d fehlgeschlagen!(%s)\n" #~ "\n" #~ msgid "GetSMS %s %d failed! (%s)\n" #~ msgstr "GetSMS %s %d fehlgeschlagen! (%s)\n" #~ msgid "Deleted SMS %s %d\n" #~ msgstr "SMS %s %d gelöscht\n" #, fuzzy #~ msgid "" #~ "Deleting SMS %s %d failed!(%s)\n" #~ "\n" #~ msgstr "" #~ "SMS löschen %s %d fehlgeschlagen!(%s)\n" #~ "\n" #~ msgid "Write error!\n" #~ msgstr "Schreibfehler!\n" #~ msgid "Write FAILED (%s): memory type: %s, loc: %d, name: %s, number: %s\n" #~ msgstr "" #~ "Schreiben fehlgeschlagen(%s): Speicherbereich: %s, Position: %d, Name: " #~ "%s, Nummer: %s\n" #~ msgid "%s\n" #~ msgstr "%s\n" gnokii-0.6.31/po/sv.po0000644000175000017500000064051311666163120012622 0ustar leoleo# Swedish translation of gnokii. # Copyright (C) 1999-2007 Hugh Blemings, Pavel Janik, Pawel Kot # This file is distributed under the same license as the gnokii package. # Daniel Nylander , 2006, 2007. # msgid "" msgstr "" "Project-Id-Version: gnokii cvs\n" "Report-Msgid-Bugs-To: feedback@gnokii.org\n" "POT-Creation-Date: 2011-12-01 21:36+0100\n" "PO-Revision-Date: 2007-04-30 15:30+0100\n" "Last-Translator: Daniel Nylander \n" "Language-Team: Swedish \n" "Language: sv\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" #. Line not part of any heading #: ../common/cfgreader.c:458 #, c-format msgid "" "Orphaned line: %s\n" "If in doubt place this line into [global] section.\n" msgstr "" #: ../common/cfgreader.c:732 ../common/cfgreader.c:962 #, fuzzy, c-format msgid "No %s section in the config file.\n" msgstr "Ingen [global]-sektion i konfigurationsfil %s.\n" #: ../common/cfgreader.c:738 ../common/cfgreader.c:744 #: ../common/cfgreader.c:750 #, fuzzy, c-format msgid "You need to define '%s' in the config file.\n" msgstr "Ingen telefonmodell angiven i konfigurationsfilen." #: ../common/cfgreader.c:755 ../common/cfgreader.c:768 #: ../common/cfgreader.c:777 ../common/cfgreader.c:785 #: ../common/cfgreader.c:797 ../common/cfgreader.c:806 #: ../common/cfgreader.c:814 ../common/cfgreader.c:824 #: ../common/cfgreader.c:842 ../common/cfgreader.c:850 #: ../common/cfgreader.c:871 ../common/cfgreader.c:980 #, c-format msgid "Unsupported [%s] %s value \"%s\"\n" msgstr "Inget stöd för [%s] %s värde \"%s\"\n" #: ../common/cfgreader.c:769 ../common/cfgreader.c:778 #: ../common/cfgreader.c:786 ../common/cfgreader.c:807 #: ../common/cfgreader.c:815 ../common/cfgreader.c:825 #: ../common/cfgreader.c:843 ../common/cfgreader.c:851 #, c-format msgid "Assuming: %d\n" msgstr "" #: ../common/cfgreader.c:798 ../common/cfgreader.c:872 #: ../common/cfgreader.c:981 #, c-format msgid "Use either \"%s\" or \"%s\".\n" msgstr "" #: ../common/cfgreader.c:799 ../common/cfgreader.c:873 #: ../common/cfgreader.c:982 #, fuzzy, c-format msgid "Assuming: %s\n" msgstr "Alarm: %s\n" #: ../common/cfgreader.c:1172 #, fuzzy, c-format msgid "Couldn't read %s config file.\n" msgstr "Kunde inte öppna %s eller %s.\n" #: ../common/cfgreader.c:1187 #, fuzzy, c-format msgid "Failed to initialize libgnokii.\n" msgstr "Misslyckades med att spara ringsignal.\n" #: ../common/cfgreader.c:1192 #, fuzzy, c-format msgid "Couldn't open a config file or memory.\n" msgstr "Kunde inte öppna %s eller %s.\n" #: ../common/cfgreader.c:1282 #, c-format msgid "Config error - no model specified.\n" msgstr "Konfigurationsfel - ingen modell angiven.\n" #: ../common/cfgreader.c:1286 #, c-format msgid "Config error - no port specified.\n" msgstr "Konfigurationsfel - ingen port angiven.\n" #: ../common/data/virtmodem.c:144 #, c-format msgid "gn_vm_initialise - VM_GSMInitialise failed!\n" msgstr "gn_vm_initialise - VM_GSMInitialise misslyckades!\n" #: ../common/data/virtmodem.c:151 #, c-format msgid "gn_vm_initialise - VM_PtySetup failed!\n" msgstr "gn_vm_initialise - VM_PtySetup misslyckades!\n" #: ../common/data/virtmodem.c:156 #, c-format msgid "gn_vm_initialise - gn_atem_initialise failed!\n" msgstr "gn_vm_initialise - gn_atem_initialise misslyckades!\n" #: ../common/data/virtmodem.c:161 #, fuzzy, c-format msgid "gn_vm_initialise - dp_Initialise failed!\n" msgstr "gn_vm_Initialise - dp_Initialise misslyckades!\n" #: ../common/data/virtmodem.c:365 #, fuzzy, c-format msgid "Cannot access %s, check the bindir in your config file!\n" msgstr "Kan inte tillgÃ¥ %s, kontrollera bindir i din gnokiirc!\n" #: ../common/data/virtmodem.c:372 ../utils/mgnokiidev.c:186 #, c-format msgid "Couldn't open pty!\n" msgstr "Kunde inte öppna pty!\n" #: ../common/data/virtmodem.c:389 ../gnokii/gnokii-other.c:78 #: ../smsd/lowlevel.c:124 ../xgnokii/xgnokii_lowlevel.c:200 #, c-format msgid "GSM/FBUS init failed! (Unknown model?). Quitting.\n" msgstr "Initiering av GSM/FBUS misslyckades! (Okänd modell?). Avslutar.\n" #: ../common/devices/tcp.c:80 msgid "Gnokii tcp_open: socket()" msgstr "Gnokii tcp_open: socket()" #: ../common/devices/tcp.c:89 #, c-format msgid "Gnokii tcp_open: colon (':') not found in connect strings \"%s\"!\n" msgstr "" "Gnokii tcp_open: kolon (\":\") hittades inte i anslutningssträngarna \"%s" "\"!\n" #: ../common/devices/tcp.c:97 #, c-format msgid "Gnokii tcp_open: Port string \"%s\" not valid for IPv4 connection!\n" msgstr "Gnokii tcp_open: Portsträng \"%s\" ogiltig för IPv4-anslutning!\n" #: ../common/devices/tcp.c:101 #, c-format msgid "Gnokii tcp_open: Unknown host \"%s\"!\n" msgstr "Gnokii tcp_open: Okänd värd \"%s\"!\n" #: ../common/devices/tcp.c:105 #, c-format msgid "Gnokii tcp_open: Address resolve for host \"%s\" not compatible!\n" msgstr "Gnokii tcp_open: Adressuppslag för värd \"%s\" ej kompatibel!\n" #: ../common/devices/tcp.c:115 msgid "Gnokii tcp_open: connect()" msgstr "Gnokii tcp_open: connect()" #: ../common/devices/tcp.c:127 #, c-format msgid "Gnokii tcp_close: disconnect_script\n" msgstr "Gnokii tcp_close: disconnect_script\n" #: ../common/devices/tcp.c:150 #, c-format msgid "Gnokii tcp_opendevice: connect_script\n" msgstr "Gnokii tcp_opendevice: connect_script\n" #: ../common/devices/tcp.c:160 #, fuzzy msgid "Gnokii tcp_opendevice: fcntl(F_SETOWN)" msgstr "Gnokii tcp_opendevice: fnctl(F_SETOWN)" #: ../common/devices/tcp.c:183 #, fuzzy msgid "Gnokii tcp_opendevice: fcntl(F_SETFL)" msgstr "Gnokii tcp_opendevice: fnctl(F_SETFL)" #: ../common/devices/unixbluetooth.c:497 #, c-format msgid "Invalid bluetooth address \"%s\"\n" msgstr "Ogiltig bluetooth-adress \"%s\"\n" #: ../common/devices/unixbluetooth.c:502 msgid "Can't create socket" msgstr "Kan inte skapa uttag" #: ../common/devices/unixbluetooth.c:521 #, c-format msgid "" "Cannot find any appropriate rfcomm channel and none was specified in the " "config.\n" msgstr "" #: ../common/devices/unixbluetooth.c:530 msgid "Can't connect" msgstr "Kan inte ansluta" #: ../common/devices/unixirda.c:150 #, c-format msgid "Virtual IrCOMM device unsupported under Linux\n" msgstr "Virtuell IrCOMM-enhet stöds inte under Linux\n" #: ../common/devices/unixserial.c:117 #, c-format msgid "device_script(\"%s\"): fork() failure: %s!\n" msgstr "device_script(\"%s\"): fork() misslyckades: %s!\n" #: ../common/devices/unixserial.c:124 #, c-format msgid "device_script(\"%s\"): file descriptor preparation failure: %s\n" msgstr "device_script(\"%s\"): fel vid förberedning av file descriptor: %s\n" #: ../common/devices/unixserial.c:130 #, c-format msgid "device_script(\"%s\"): script execution failure: %s\n" msgstr "device_script(\"%s\"): fel vid start av skript: %s\n" #: ../common/devices/unixserial.c:137 #, c-format msgid "" "device_script(\"%s\"): child script execution failure: %s, exit code=%d\n" msgstr "device_script(\"%s\"): fel vid start av barnskript: %s, felkod=%d\n" #: ../common/devices/unixserial.c:138 msgid "normal exit" msgstr "normalt avslut" #: ../common/devices/unixserial.c:138 msgid "abnormal exit" msgstr "onormalt avslut" #: ../common/devices/unixserial.c:394 #, c-format msgid "Serial port speed %d not supported!\n" msgstr "Seriellportshastigheten %d stöds inte!\n" #: ../common/devices/unixserial.c:434 #, c-format msgid "ERROR: Modem DCD is down and global/require_dcd parameter is set!\n" msgstr "FEL: Modem DCD är nere och global/require_dcd-parametern är satt!\n" #: ../common/devices/winbluetooth.c:70 ../common/devices/winirda.c:113 #, c-format msgid "Failed to initialize socket subsystem: need WINSOCK2. Please upgrade.\n" msgstr "" "Misslyckades med att initiera undersystem för uttag: behöver WINSOCK2. " "Vänligen uppgradera.\n" #: ../common/gsm-common.c:148 msgid "Internal memory" msgstr "Internminne" #: ../common/gsm-common.c:149 msgid "SIM card" msgstr "SIM-kort" #: ../common/gsm-common.c:150 msgid "Fixed dial numbers" msgstr "Fixerade ringnummer" #: ../common/gsm-common.c:151 msgid "Own numbers" msgstr "Egna nummer" #: ../common/gsm-common.c:152 msgid "Emergency numbers" msgstr "Larmnummer" #: ../common/gsm-common.c:153 #, fuzzy msgid "Dialled numbers" msgstr "Ringda nummer" #: ../common/gsm-common.c:154 msgid "Received numbers" msgstr "Mottagna nummer" #: ../common/gsm-common.c:155 msgid "Missed numbers" msgstr "Missade nummer" #: ../common/gsm-common.c:156 #, fuzzy msgid "Last dialled" msgstr "Senaste uppringda" #: ../common/gsm-common.c:157 #, fuzzy msgid "Barred dialling numbers" msgstr "Fixerade ringnummer" #: ../common/gsm-common.c:158 #, fuzzy msgid "Service dialling numbers" msgstr "Fixerade ringnummer" #: ../common/gsm-common.c:159 msgid "Combined ME and SIM phonebook" msgstr "Kombinerade ME- och SIM-kontakter" #: ../common/gsm-common.c:160 msgid "Computer memory" msgstr "Datorminne" #: ../common/gsm-common.c:161 msgid "Currently selected memory" msgstr "Aktuellt minne" #: ../common/gsm-common.c:162 msgid "SMS Inbox" msgstr "SMS-inkorg" #: ../common/gsm-common.c:163 #, fuzzy msgid "SMS Outbox, sent items" msgstr "SMS-utkorg" #: ../common/gsm-common.c:164 msgid "SMS Archive" msgstr "SMS-arkiv" #: ../common/gsm-common.c:165 msgid "SMS Templates" msgstr "SMS-mallar" #: ../common/gsm-common.c:166 #, fuzzy msgid "SMS Status Reports" msgstr "Status" #: ../common/gsm-common.c:167 #, fuzzy msgid "SMS Drafts" msgstr "SMS-mallar" #: ../common/gsm-common.c:168 msgid "SMS Outbox, items to be sent" msgstr "" #: ../common/gsm-common.c:169 msgid "SMS Folder 1" msgstr "SMS-mapp 1" #: ../common/gsm-common.c:170 msgid "SMS Folder 2" msgstr "SMS-mapp 2" #: ../common/gsm-common.c:171 msgid "SMS Folder 3" msgstr "SMS-mapp 3" #: ../common/gsm-common.c:172 msgid "SMS Folder 4" msgstr "SMS-mapp 4" #: ../common/gsm-common.c:173 msgid "SMS Folder 5" msgstr "SMS-mapp 5" #: ../common/gsm-common.c:174 msgid "SMS Folder 6" msgstr "SMS-mapp 6" #: ../common/gsm-common.c:175 msgid "SMS Folder 7" msgstr "SMS-mapp 7" #: ../common/gsm-common.c:176 msgid "SMS Folder 8" msgstr "SMS-mapp 8" #: ../common/gsm-common.c:177 msgid "SMS Folder 9" msgstr "SMS-mapp 9" #: ../common/gsm-common.c:178 msgid "SMS Folder 10" msgstr "SMS-mapp 10" #: ../common/gsm-common.c:179 msgid "SMS Folder 11" msgstr "SMS-mapp 11" #: ../common/gsm-common.c:180 msgid "SMS Folder 12" msgstr "SMS-mapp 12" #: ../common/gsm-common.c:181 msgid "SMS Folder 13" msgstr "SMS-mapp 13" #: ../common/gsm-common.c:182 msgid "SMS Folder 14" msgstr "SMS-mapp 14" #: ../common/gsm-common.c:183 msgid "SMS Folder 15" msgstr "SMS-mapp 15" #: ../common/gsm-common.c:184 msgid "SMS Folder 16" msgstr "SMS-mapp 16" #: ../common/gsm-common.c:185 msgid "SMS Folder 17" msgstr "SMS-mapp 17" #: ../common/gsm-common.c:186 msgid "SMS Folder 18" msgstr "SMS-mapp 18" #: ../common/gsm-common.c:187 msgid "SMS Folder 19" msgstr "SMS-mapp 19" #: ../common/gsm-common.c:188 msgid "SMS Folder 20" msgstr "SMS-mapp 20" #: ../common/gsm-common.c:189 msgid "Cell Broadcast" msgstr "" #: ../common/gsm-common.c:190 ../common/gsm-common.c:211 #: ../common/gsm-common.c:222 ../common/gsm-common.c:235 #: ../common/gsm-common.c:290 ../common/gsm-common.c:343 #: ../common/gsm-common.c:356 ../common/gsm-common.c:380 #: ../common/gsm-common.c:381 ../common/gsm-common.c:398 #: ../common/gsm-common.c:409 ../common/gsm-common.c:424 #: ../common/gsm-common.c:437 ../common/gsm-common.c:451 #: ../common/gsm-common.c:464 ../common/gsm-common.c:474 #: ../common/gsm-common.c:485 ../common/gsm-common.c:494 #: ../common/gsm-common.c:505 ../common/gsm-common.c:514 #: ../common/gsm-common.c:524 ../common/gsm-common.c:533 #: ../common/gsm-common.c:542 ../common/gsm-common.c:556 #: ../common/gsm-common.c:565 ../common/gsm-common.c:574 #: ../common/gsm-common.c:587 ../common/gsm-common.c:598 #: ../common/gsm-common.c:610 ../common/gsm-common.c:624 #: ../common/gsm-common.c:635 ../common/gsm-common.c:647 #: ../common/gsm-sms.c:409 ../common/libfunctions.c:219 #: ../common/phones/atgen.c:2695 ../common/phones/atgen.c:2702 #: ../common/phones/atgen.c:3183 ../common/phones/nk6100.c:4087 #: ../gnokii/gnokii-ringtone.c:90 ../xgnokii/xgnokii_calendar.c:187 #: ../xgnokii/xgnokii_contacts.c:765 ../xgnokii/xgnokii_contacts.c:821 #: ../xgnokii/xgnokii_contacts.c:948 ../xgnokii/xgnokii_contacts.c:990 #: ../xgnokii/xgnokii_contacts.c:1206 ../xgnokii/xgnokii_contacts.c:1230 #, c-format msgid "Unknown" msgstr "Okänd" #: ../common/gsm-common.c:197 ../common/gsm-common.c:234 #: ../common/gsm-common.c:355 msgid "None" msgstr "Ingen" #: ../common/gsm-common.c:198 #, fuzzy msgid "Serial" msgstr "seriell" #: ../common/gsm-common.c:199 msgid "Serial DAU9P" msgstr "" #: ../common/gsm-common.c:200 msgid "Serial DLR3P" msgstr "" #: ../common/gsm-common.c:201 msgid "Infrared (old Nokias)" msgstr "" #: ../common/gsm-common.c:202 msgid "IrDA" msgstr "" #: ../common/gsm-common.c:203 msgid "Bluetooth" msgstr "" #: ../common/gsm-common.c:204 msgid "Tekram Ir-Dongle" msgstr "" #: ../common/gsm-common.c:205 msgid "TCP" msgstr "" #: ../common/gsm-common.c:206 msgid "M2BUS" msgstr "" #: ../common/gsm-common.c:207 msgid "DKU2 (kernel support)" msgstr "" #: ../common/gsm-common.c:208 msgid "DKU2 (libusb support)" msgstr "" #: ../common/gsm-common.c:209 msgid "Smart Card reader (libpcsclite support)" msgstr "" #: ../common/gsm-common.c:210 msgid "Linux Phonet (kernel support)" msgstr "" #: ../common/gsm-common.c:218 #, fuzzy msgid "AC-DC" msgstr "AC/DC" #: ../common/gsm-common.c:219 #, fuzzy msgid "Battery" msgstr "batteri" #: ../common/gsm-common.c:220 #, fuzzy msgid "No battery" msgstr "batteri" #: ../common/gsm-common.c:221 msgid "Power fault" msgstr "" #: ../common/gsm-common.c:229 #, fuzzy msgid "Security code" msgstr "Säkerhetskod är: %s\n" #: ../common/gsm-common.c:230 msgid "PIN" msgstr "" #: ../common/gsm-common.c:231 msgid "PIN2" msgstr "" #: ../common/gsm-common.c:232 msgid "PUK" msgstr "" #: ../common/gsm-common.c:233 msgid "PUK2" msgstr "" #: ../common/gsm-common.c:244 ../common/gsm-common.c:245 #: ../common/gsm-common.c:250 msgid "General number" msgstr "Allmänt nummer" #: ../common/gsm-common.c:246 msgid "Home number" msgstr "Hemnummer" #: ../common/gsm-common.c:247 msgid "Mobile number" msgstr "Mobilnummer" #: ../common/gsm-common.c:248 msgid "Fax number" msgstr "Faxnummer" #: ../common/gsm-common.c:249 #, fuzzy msgid "Work number" msgstr "Hemnummer" #: ../common/gsm-common.c:251 ../common/gsm-common.c:340 msgid "Unknown number" msgstr "Okänt nummer" #: ../common/gsm-common.c:258 ../gnokii/gnokii-phonebook.c:187 #: ../gnokii/gnokii-wap.c:89 ../gnokii/gnokii-wap.c:220 #: ../xgnokii/xgnokii_contacts.c:749 ../xgnokii/xgnokii_contacts.c:815 #: ../xgnokii/xgnokii_contacts.c:946 ../xgnokii/xgnokii_contacts.c:988 #: ../xgnokii/xgnokii_contacts.c:1224 ../xgnokii/xgnokii_contacts.c:1729 #: ../xgnokii/xgnokii_contacts.c:2936 ../xgnokii/xgnokii_contacts.c:3120 #: ../xgnokii/xgnokii_speed.c:542 msgid "Name" msgstr "Namn" #: ../common/gsm-common.c:259 ../common/gsm-common.c:422 #: ../xgnokii/xgnokii.c:542 ../xgnokii/xgnokii.c:1433 #: ../xgnokii/xgnokii_contacts.c:743 ../xgnokii/xgnokii_contacts.c:812 #: ../xgnokii/xgnokii_contacts.c:945 ../xgnokii/xgnokii_contacts.c:987 #: ../xgnokii/xgnokii_contacts.c:1220 msgid "Email" msgstr "E-post" #: ../common/gsm-common.c:260 ../common/gsm-common.c:277 msgid "Postal address" msgstr "Postadress" #: ../common/gsm-common.c:261 ../xgnokii/xgnokii_contacts.c:731 #: ../xgnokii/xgnokii_contacts.c:806 ../xgnokii/xgnokii_contacts.c:943 #: ../xgnokii/xgnokii_contacts.c:985 ../xgnokii/xgnokii_contacts.c:1026 #: ../xgnokii/xgnokii_contacts.c:1212 msgid "Note" msgstr "Anteckning" #: ../common/gsm-common.c:262 ../gnokii/gnokii-dial.c:376 #: ../gnokii/gnokii-phonebook.c:203 ../gnokii/gnokii-wap.c:231 #: ../xgnokii/xgnokii_calendar.c:1540 ../xgnokii/xgnokii_contacts.c:1737 #: ../xgnokii/xgnokii_contacts.c:2936 ../xgnokii/xgnokii_contacts.c:3120 #: ../xgnokii/xgnokii_speed.c:542 msgid "Number" msgstr "Nummer" #: ../common/gsm-common.c:263 ../common/gsm-common.c:272 #: ../common/gsm-common.c:367 ../xgnokii/xgnokii.c:1142 #: ../xgnokii/xgnokii_xring.c:845 msgid "Ringtone" msgstr "Ringsignal" #: ../common/gsm-common.c:264 msgid "Date" msgstr "Datum" #: ../common/gsm-common.c:265 msgid "Pointer" msgstr "Pekare" #: ../common/gsm-common.c:266 ../common/gsm-common.c:369 msgid "Logo" msgstr "Logotyp" #: ../common/gsm-common.c:267 msgid "Logo switch" msgstr "Byte av logotyp" #: ../common/gsm-common.c:268 ../xgnokii/xgnokii_contacts.c:2936 #: ../xgnokii/xgnokii_contacts.c:3120 msgid "Group" msgstr "Grupp" #: ../common/gsm-common.c:269 ../gnokii/gnokii-wap.c:90 #: ../xgnokii/xgnokii_contacts.c:758 ../xgnokii/xgnokii_contacts.c:818 #: ../xgnokii/xgnokii_contacts.c:947 ../xgnokii/xgnokii_contacts.c:989 #: ../xgnokii/xgnokii_contacts.c:1227 msgid "URL" msgstr "URL" #: ../common/gsm-common.c:270 ../gnokii/gnokii-calendar.c:206 #: ../xgnokii/xgnokii_calendar.c:1541 msgid "Location" msgstr "Plats" #: ../common/gsm-common.c:271 msgid "Image" msgstr "Bild" #: ../common/gsm-common.c:273 msgid "User ID" msgstr "Användar-id" #: ../common/gsm-common.c:274 #, fuzzy msgid "Push-To-Talk address" msgstr "Push-to-talk-adress" #: ../common/gsm-common.c:275 msgid "First name" msgstr "Förnamn" #: ../common/gsm-common.c:276 msgid "Last name" msgstr "Efternamn" #: ../common/gsm-common.c:278 ../gnokii/gnokii-phonebook.c:212 msgid "Extended address" msgstr "Ytterligare adressinformation" #: ../common/gsm-common.c:279 ../gnokii/gnokii-phonebook.c:214 msgid "Street" msgstr "Gata" #: ../common/gsm-common.c:280 ../gnokii/gnokii-phonebook.c:216 msgid "City" msgstr "Stad" #: ../common/gsm-common.c:281 ../gnokii/gnokii-phonebook.c:218 msgid "State or province" msgstr "Län eller region" #: ../common/gsm-common.c:282 ../gnokii/gnokii-phonebook.c:220 msgid "Zip code" msgstr "Postnummer" #: ../common/gsm-common.c:283 ../gnokii/gnokii-phonebook.c:222 msgid "Country" msgstr "Land" #: ../common/gsm-common.c:284 msgid "Formal name" msgstr "Formellt namn" #: ../common/gsm-common.c:285 msgid "Job title" msgstr "Jobbtitel" #: ../common/gsm-common.c:286 msgid "Company" msgstr "Företag" #: ../common/gsm-common.c:287 msgid "Nickname" msgstr "Smeknamn" #: ../common/gsm-common.c:288 ../common/gsm-common.c:448 #: ../xgnokii/xgnokii_calendar.c:181 ../xgnokii/xgnokii_calendar.c:288 msgid "Birthday" msgstr "Födelsedag" #: ../common/gsm-common.c:289 #, fuzzy msgid "Caller group id" msgstr "Samtalsgrupper" #: ../common/gsm-common.c:350 ../common/nokia-decoding.c:349 #: ../common/phones/nk6100.c:1007 ../xgnokii/xgnokii.c:221 #: ../xgnokii/xgnokii.c:1027 msgid "Family" msgstr "Familj" #: ../common/gsm-common.c:351 msgid "VIPs" msgstr "VIP" #: ../common/gsm-common.c:352 ../common/nokia-decoding.c:355 #: ../common/phones/nk6100.c:1013 ../xgnokii/xgnokii.c:223 #: ../xgnokii/xgnokii.c:1051 msgid "Friends" msgstr "Vänner" #: ../common/gsm-common.c:353 ../xgnokii/xgnokii_contacts.c:713 #: ../xgnokii/xgnokii_contacts.c:797 ../xgnokii/xgnokii_contacts.c:940 #: ../xgnokii/xgnokii_contacts.c:982 ../xgnokii/xgnokii_contacts.c:1194 msgid "Work" msgstr "Arbete" #: ../common/gsm-common.c:354 msgid "Others" msgstr "Övriga" #: ../common/gsm-common.c:365 ../common/gsm-common.c:416 #: ../xgnokii/xgnokii.c:529 ../xgnokii/xgnokii.c:558 ../xgnokii/xgnokii.c:1415 #: ../xgnokii/xgnokii_calendar.c:1539 msgid "Text" msgstr "Text" #: ../common/gsm-common.c:366 #, fuzzy msgid "Linked" msgstr "Sök" #: ../common/gsm-common.c:368 #, fuzzy msgid "GSM Operator Logo" msgstr "Operatörslogotyp" #: ../common/gsm-common.c:370 #, fuzzy msgid "Multipart Message" msgstr "Vidarebefodra meddelande" #: ../common/gsm-common.c:371 #, fuzzy msgid "WAP vCard" msgstr "WAP vCard:\n" #: ../common/gsm-common.c:372 #, fuzzy msgid "WAP vCalendar" msgstr "WAP vCalendar:\n" #: ../common/gsm-common.c:373 #, fuzzy msgid "WAP vCardSecure" msgstr "WAP vCardSecure:\n" #: ../common/gsm-common.c:374 #, fuzzy msgid "WAP vCalendarSecure" msgstr "WAP vCalendarSecure:\n" #: ../common/gsm-common.c:375 #, fuzzy msgid "Voice Message" msgstr "Nytt meddelande" #: ../common/gsm-common.c:376 #, fuzzy msgid "Fax Message" msgstr "Meddelande" #: ../common/gsm-common.c:377 #, fuzzy msgid "Email Message" msgstr "Meddelande" #: ../common/gsm-common.c:378 msgid "WAP Push" msgstr "" #: ../common/gsm-common.c:379 #, fuzzy msgid "Other Message" msgstr "Nytt meddelande" #: ../common/gsm-common.c:388 #, fuzzy msgid "Inbox Message" msgstr "%d. Inkorg meddelande " #: ../common/gsm-common.c:389 #, fuzzy msgid "Delivery Report" msgstr "Leveransrapport" #: ../common/gsm-common.c:390 ../common/gsm-common.c:397 #, fuzzy msgid "MO Message" msgstr "Meddelande" #: ../common/gsm-common.c:391 msgid "Submit Report" msgstr "" #: ../common/gsm-common.c:392 #, fuzzy msgid "Command" msgstr "Företag" #: ../common/gsm-common.c:393 #, fuzzy msgid "Status Report" msgstr "Status" #: ../common/gsm-common.c:394 #, fuzzy msgid "Picture Message" msgstr "Bildmeddelande: %s" #: ../common/gsm-common.c:395 #, fuzzy msgid "Template" msgstr "SMS-mallar" #: ../common/gsm-common.c:396 #, fuzzy msgid "Picture Message Template" msgstr "%d. Bildmeddelandemall " #: ../common/gsm-common.c:405 #, fuzzy msgid "Read" msgstr "läst" #: ../common/gsm-common.c:406 #, fuzzy msgid "Unread" msgstr "oläst" #: ../common/gsm-common.c:407 #, fuzzy msgid "Sent" msgstr "Tyst" #: ../common/gsm-common.c:408 #, fuzzy msgid "Unsent" msgstr "skickat" #: ../common/gsm-common.c:417 ../common/gsm-common.c:632 #: ../xgnokii/xgnokii.c:537 ../xgnokii/xgnokii.c:1421 #: ../xgnokii/xgnokii_contacts.c:719 ../xgnokii/xgnokii_contacts.c:800 #: ../xgnokii/xgnokii_contacts.c:941 ../xgnokii/xgnokii_contacts.c:983 #: ../xgnokii/xgnokii_contacts.c:1198 msgid "Fax" msgstr "Fax" #: ../common/gsm-common.c:418 msgid "VoiceMail" msgstr "Telefonsvarare" #: ../common/gsm-common.c:419 ../xgnokii/xgnokii.c:546 msgid "ERMES" msgstr "ERMES" #: ../common/gsm-common.c:420 ../xgnokii/xgnokii.c:533 #: ../xgnokii/xgnokii.c:1427 msgid "Paging" msgstr "Söker" #: ../common/gsm-common.c:421 msgid "Email message in 8110i" msgstr "" #: ../common/gsm-common.c:423 ../xgnokii/xgnokii.c:550 msgid "X.400" msgstr "X.400" #: ../common/gsm-common.c:431 ../xgnokii/xgnokii.c:564 #: ../xgnokii/xgnokii.c:1461 msgid "1 hour" msgstr "1 timme" #: ../common/gsm-common.c:432 ../xgnokii/xgnokii.c:568 #: ../xgnokii/xgnokii.c:1467 msgid "6 hours" msgstr "6 timmar" #: ../common/gsm-common.c:433 ../xgnokii/xgnokii.c:572 #: ../xgnokii/xgnokii.c:588 ../xgnokii/xgnokii.c:1473 msgid "24 hours" msgstr "24 timmr" #: ../common/gsm-common.c:434 ../xgnokii/xgnokii.c:576 #: ../xgnokii/xgnokii.c:1479 msgid "72 hours" msgstr "72 timmar" #: ../common/gsm-common.c:435 ../xgnokii/xgnokii.c:580 #: ../xgnokii/xgnokii.c:1485 msgid "1 week" msgstr "1 vecka" #: ../common/gsm-common.c:436 msgid "Maximum time" msgstr "Max tid" #: ../common/gsm-common.c:446 ../common/phones/nk6100.c:2113 #: ../xgnokii/xgnokii_calendar.c:175 #, c-format msgid "Meeting" msgstr "Möte" #: ../common/gsm-common.c:447 ../xgnokii/xgnokii_calendar.c:169 msgid "Call" msgstr "Samtal" #: ../common/gsm-common.c:449 ../xgnokii/xgnokii_calendar.c:163 msgid "Reminder" msgstr "PÃ¥minnelse" #: ../common/gsm-common.c:450 ../xgnokii/xgnokii_calendar.c:157 msgid "Memo" msgstr "Memo" #: ../common/gsm-common.c:458 ../xgnokii/xgnokii_calendar.c:831 msgid "Never" msgstr "Aldrig" #: ../common/gsm-common.c:459 #, fuzzy msgid "Daily" msgstr "dagligen" #: ../common/gsm-common.c:460 #, fuzzy msgid "Weekly" msgstr "per vecka" #: ../common/gsm-common.c:461 #, fuzzy msgid "Every 2 weeks" msgstr "Varannan vecka" #: ../common/gsm-common.c:462 #, fuzzy msgid "Monthly" msgstr "mensile" #: ../common/gsm-common.c:463 #, fuzzy msgid "Yearly" msgstr "per Ã¥r" #: ../common/gsm-common.c:471 msgid "Low" msgstr "" #: ../common/gsm-common.c:472 #, fuzzy msgid "Medium" msgstr "medium\n" #: ../common/gsm-common.c:473 #, fuzzy msgid "High" msgstr "hög\n" #: ../common/gsm-common.c:483 #, fuzzy msgid "Temporary" msgstr "temporär\n" #: ../common/gsm-common.c:484 #, fuzzy msgid "Permanent" msgstr "permanent\n" #: ../common/gsm-common.c:492 #, fuzzy msgid "Normal" msgstr "normal\n" #: ../common/gsm-common.c:493 #, fuzzy msgid "Secure" msgstr "säker\n" #: ../common/gsm-common.c:501 ../gnokii/gnokii-wap.c:225 #, fuzzy msgid "GSM data" msgstr "GSM-data\n" #: ../common/gsm-common.c:502 ../gnokii/gnokii-wap.c:234 #, fuzzy msgid "GPRS" msgstr "GPRS\n" #: ../common/gsm-common.c:503 ../gnokii/gnokii-wap.c:242 #: ../xgnokii/xgnokii.c:1106 ../xgnokii/xgnokii.c:1848 msgid "SMS" msgstr "SMS" #: ../common/gsm-common.c:504 #, fuzzy msgid "USSD" msgstr "USSD\n" #: ../common/gsm-common.c:512 #, fuzzy msgid "Analogue" msgstr "analog\n" #: ../common/gsm-common.c:513 #, fuzzy msgid "ISDN" msgstr "ISDN\n" #: ../common/gsm-common.c:521 ../common/gsm-common.c:532 #: ../gnokii/gnokii-profile.c:185 msgid "Automatic" msgstr "Automatisk" #: ../common/gsm-common.c:522 #, fuzzy msgid "9600" msgstr "9600\n" #: ../common/gsm-common.c:523 #, fuzzy msgid "14400" msgstr "14400\n" #: ../common/gsm-common.c:531 #, fuzzy msgid "Manual" msgstr "manuell\n" #: ../common/gsm-common.c:540 #, fuzzy msgid "Always" msgstr "alltid\n" #: ../common/gsm-common.c:541 #, fuzzy msgid "When needed" msgstr "vid behov\n" #: ../common/gsm-common.c:551 msgid "No tone" msgstr "Ingen signal" #: ../common/gsm-common.c:552 msgid "Standard" msgstr "Standard" #: ../common/gsm-common.c:553 msgid "Special" msgstr "Special" #: ../common/gsm-common.c:554 ../common/gsm-common.c:582 msgid "Beep once" msgstr "Tuta en gÃ¥ng" #: ../common/gsm-common.c:555 ../common/gsm-common.c:585 msgid "Ascending" msgstr "Stigande" #: ../common/gsm-common.c:563 ../common/gsm-common.c:572 #: ../common/gsm-common.c:583 ../common/gsm-common.c:594 #: ../gnokii/gnokii-profile.c:192 msgid "Off" msgstr "Av" #: ../common/gsm-common.c:564 ../common/gsm-common.c:573 #: ../gnokii/gnokii-profile.c:185 ../gnokii/gnokii-profile.c:192 msgid "On" msgstr "PÃ¥" #: ../common/gsm-common.c:581 msgid "Ringing" msgstr "Ringer" #: ../common/gsm-common.c:584 msgid "Ring once" msgstr "Ring en gÃ¥ng" #: ../common/gsm-common.c:586 msgid "Caller groups" msgstr "Samtalsgrupper" #: ../common/gsm-common.c:595 ../common/gsm-common.c:605 msgid "Level 1" msgstr "NivÃ¥ 1" #: ../common/gsm-common.c:596 ../common/gsm-common.c:606 msgid "Level 2" msgstr "NivÃ¥ 2" #: ../common/gsm-common.c:597 ../common/gsm-common.c:607 msgid "Level 3" msgstr "NivÃ¥ 3" #: ../common/gsm-common.c:608 msgid "Level 4" msgstr "NivÃ¥ 4" #: ../common/gsm-common.c:609 msgid "Level 5" msgstr "NivÃ¥ 5" #: ../common/gsm-common.c:619 #, fuzzy msgid "Busy" msgstr "upptagen\n" #: ../common/gsm-common.c:620 #, fuzzy msgid "No answer" msgstr "Ingen signal" #: ../common/gsm-common.c:621 #, fuzzy msgid "Out of reach" msgstr "inte nÃ¥bar\n" #: ../common/gsm-common.c:622 #, fuzzy msgid "Not available" msgstr "inte tillgänglig\n" #: ../common/gsm-common.c:623 ../common/gsm-common.c:634 msgid "All" msgstr "" #: ../common/gsm-common.c:631 ../xgnokii/xgnokii.c:554 msgid "Voice" msgstr "Röst" #: ../common/gsm-common.c:633 #, fuzzy msgid "Data" msgstr "Datum" #: ../common/gsm-common.c:642 ../xgnokii/xgnokii_data.c:124 msgid "Disable" msgstr "Inaktivera" #: ../common/gsm-common.c:643 ../xgnokii/xgnokii_data.c:120 msgid "Enable" msgstr "Aktivera" #: ../common/gsm-common.c:644 msgid "Query" msgstr "" #: ../common/gsm-common.c:645 #, fuzzy msgid "Register" msgstr "PÃ¥minnelse" #: ../common/gsm-common.c:646 msgid "Erasure" msgstr "" #: ../common/gsm-error.c:42 msgid "No error." msgstr "Inga fel." #: ../common/gsm-error.c:43 msgid "Command failed." msgstr "Kommando misslyckades." #: ../common/gsm-error.c:44 msgid "Model specified isn't known/supported." msgstr "Angiven modell är inte känd eller finns stöd för." #: ../common/gsm-error.c:45 msgid "Invalid Security code." msgstr "Ogiltig säkerhetskod." #: ../common/gsm-error.c:46 msgid "Problem occurred internal to model specific code." msgstr "Internt problem inträffade i modellspecifik kod." #: ../common/gsm-error.c:47 msgid "Command called isn't implemented in model." msgstr "Anropat kommando är inte implementerat i den här modellen." #: ../common/gsm-error.c:48 #, fuzzy msgid "" "Function or connection type not supported by the phone or by the phone " "driver." msgstr "Funktion eller anslutningstyp stöds inte av telefonen." #: ../common/gsm-error.c:49 msgid "User aborted the action." msgstr "Användaren avbröt Ã¥tgärden." #: ../common/gsm-error.c:50 msgid "Unknown error - well better than nothing!!" msgstr "Okänt fel - bättre än inget!!" #: ../common/gsm-error.c:51 msgid "The specified memory is full." msgstr "Det angivna minnet är fullt." #: ../common/gsm-error.c:52 msgid "Couldn't establish link with phone." msgstr "Kunde inte etablera länk med telefon." #: ../common/gsm-error.c:53 msgid "Command timed out." msgstr "Kommando överskred tidsgräns." #: ../common/gsm-error.c:54 msgid "Try again." msgstr "Försök igen." #: ../common/gsm-error.c:55 msgid "Waiting for the next part of the message." msgstr "Väntar pÃ¥ nästa del av meddelandet." #: ../common/gsm-error.c:56 msgid "Device not ready." msgstr "Enhet inte klar." #: ../common/gsm-error.c:57 msgid "Command is still being executed." msgstr "Kommandot körs fortfarande." #: ../common/gsm-error.c:58 msgid "The given memory location is invalid." msgstr "Angiven minnesplats är ogiltig." #: ../common/gsm-error.c:59 msgid "Invalid type of memory." msgstr "Ogiltig minnestyp." #: ../common/gsm-error.c:60 msgid "The given location is empty." msgstr "Den angivna platsen är tom." #: ../common/gsm-error.c:61 msgid "The given entry is too long." msgstr "Den angivna posten är för lÃ¥ng." #: ../common/gsm-error.c:62 msgid "Data format is not valid." msgstr "Dataformat är ogiltigt." #: ../common/gsm-error.c:63 msgid "Wrong size of the object." msgstr "Fel objektstorlek." #: ../common/gsm-error.c:64 msgid "Outgoing call requested reported line busy." msgstr "UtgÃ¥ende samtal begärdes pÃ¥ upptagen linje." #: ../common/gsm-error.c:65 msgid "No Carrier error during data call setup?" msgstr "Ingen bärare vid inställning av datasamtal?" #: ../common/gsm-error.c:66 msgid "The current frame isn't handled by the incoming function." msgstr "Aktuellt paket hanteras inte av inkommande funktion." #: ../common/gsm-error.c:67 msgid "Unsolicited message received." msgstr "Ej önskvärt meddelande mottaget." #: ../common/gsm-error.c:68 msgid "Attempt to read CB when no new CB received." msgstr "Försök att läsa CB när ingen ny CB mottogs." #: ../common/gsm-error.c:69 msgid "SIM card missing or damaged." msgstr "SIM-kort saknas eller är skadat." #: ../common/gsm-error.c:70 msgid "PIN or PUK code required." msgstr "PIN- eller PUK-kod krävs." #: ../common/gsm-error.c:71 msgid "The requested information is not available." msgstr "Den begärda informationen är inte tillgänglig." #: ../common/gsm-error.c:72 msgid "Config file cannot be read." msgstr "Konfigurationsfilen kan inte läsas." #: ../common/gsm-error.c:73 msgid "Either global or given phone section cannot be found." msgstr "Antingen kunde global eller angiven telefonsektion inte hittas." #: ../common/gsm-error.c:74 msgid "Incorrect logging section configuration." msgstr "Felaktig konfiguration av loggningssektion." #: ../common/gsm-error.c:75 msgid "No phone model specified in the config file." msgstr "Ingen telefonmodell angiven i konfigurationsfilen." #: ../common/gsm-error.c:76 msgid "No port specified in the config file." msgstr "Ingen port angiven i konfigurationsfilen." #: ../common/gsm-error.c:77 #, fuzzy msgid "No connection type specified in the config file." msgstr "Ingen telefonmodell angiven i konfigurationsfilen." #: ../common/gsm-error.c:78 #, fuzzy msgid "Device is locked and cannot be unlocked." msgstr "Enhet redan lÃ¥st.\n" #: ../common/gsm-error.c:79 msgid "The actual response will be sent asynchronously." msgstr "" #: ../common/gsm-error.c:80 msgid "Unknown error." msgstr "Okänt fel." #: ../common/gsm-filetypes.c:599 #, c-format msgid "Sorry, gnokii was not compiled with XPM support.\n" msgstr "Tyvärr, gnokii byggdes inte med stöd för XPM.\n" #: ../common/gsm-filetypes.c:642 #, c-format msgid "Bitmap too large\n" msgstr "" #: ../common/gsm-filetypes.c:1519 #, fuzzy, c-format msgid "Formatting error: too many subentries\n" msgstr "Formatfel: tomt innehÃ¥ll i underpost\n" #: ../common/gsm-filetypes.c:1528 #, c-format msgid "Formatting error: unknown error while reading subentry type\n" msgstr "Formatfel: okänt fel vid läsning av underposttyp\n" #: ../common/gsm-filetypes.c:1532 #, c-format msgid "Formatting error: empty entry type\n" msgstr "Formatfel: tom posttyp\n" #: ../common/gsm-filetypes.c:1542 #, c-format msgid "Formatting error: subentry has only entry type field\n" msgstr "Formatfel: underpost har endast fält för posttyp\n" #: ../common/gsm-filetypes.c:1551 #, c-format msgid "Formatting error: unknown error while reading subentry number type\n" msgstr "Formatfel: okänt fel vid läsning av typ av underpostnummer\n" #: ../common/gsm-filetypes.c:1555 #, c-format msgid "Formatting error: empty number type\n" msgstr "Formatfel: tom nummertyp\n" #: ../common/gsm-filetypes.c:1570 ../common/gsm-filetypes.c:1593 #, c-format msgid "Formatting error: subentry has only entry and number type fields\n" msgstr "Formatfel: underpost har endast fält för post och nummertyp\n" #: ../common/gsm-filetypes.c:1579 #, c-format msgid "Formatting error: unknown error while reading subentry id\n" msgstr "Formatfel: okänt fel vid läsning av underpost-id\n" #: ../common/gsm-filetypes.c:1583 #, c-format msgid "Formatting error: empty id\n" msgstr "Formatfel: tomt id\n" #: ../common/gsm-filetypes.c:1617 #, c-format msgid "Formatting error: unknown error while reading subentry contents\n" msgstr "Formatfel: okänt fel vid läsning av underpostens innehÃ¥ll\n" #: ../common/gsm-filetypes.c:1621 #, c-format msgid "Formatting error: empty subentry contents\n" msgstr "Formatfel: tomt innehÃ¥ll i underpost\n" #. for now be compacrapatible ;) #: ../common/gsm-networks.c:1294 ../common/gsm-networks.c:1341 #: ../gnokii/gnokii-logo.c:254 ../gnokii/gnokii-logo.c:266 #: ../gnokii/gnokii-logo.c:281 ../gnokii/gnokii-logo.c:362 #: ../smsd/lowlevel.c:141 ../smsd/lowlevel.c:142 ../smsd/lowlevel.c:143 #: ../xgnokii/xgnokii_lowlevel.c:220 ../xgnokii/xgnokii_lowlevel.c:221 #: ../xgnokii/xgnokii_lowlevel.c:222 ../xgnokii/xgnokii_lowlevel.c:223 #: ../xgnokii/xgnokii_sms.c:262 ../xgnokii/xgnokii_sms.c:342 msgid "unknown" msgstr "okänd" #: ../common/gsm-networks.c:1304 ../common/gsm-networks.c:1318 #: ../common/gsm-networks.c:1355 ../gnokii/gnokii-monitor.c:256 #: ../gnokii/gnokii-other.c:205 msgid "undefined" msgstr "odefinierad" #: ../common/gsm-sms.c:299 msgid "Delivered" msgstr "Levererad" #: ../common/gsm-sms.c:312 msgid "Failed" msgstr "Misslyckades" #: ../common/gsm-sms.c:381 msgid "Pending" msgstr "Avvaktar" #: ../common/gsm-statemachine.c:390 msgid "" "UNHANDLED FRAME RECEIVED\n" "request: " msgstr "" "EJ HANTERAT PAKET MOTTAGET\n" "begäran: " #: ../common/gsm-statemachine.c:393 msgid "reply: " msgstr "svar: " #: ../common/gsm-statemachine.c:396 ../common/phones/nokia.c:679 msgid "Please read Docs/Bugs and send a bug report!\n" msgstr "Vänligen läs Docs/Bugs och skicka in en felrapport!\n" #: ../common/libfunctions.c:183 ../gnokiid/gnokiid.c:164 #, c-format msgid "Lock file error. Exiting.\n" msgstr "Fel vid fillÃ¥sning. Avslutar.\n" #: ../common/libfunctions.c:191 #, c-format msgid "" "Telephone interface init failed: %s\n" "Quitting.\n" msgstr "" "Initiering av telefongränssnitt misslyckades: %s\n" "Avslutar.\n" #: ../common/links/atbus.c:69 msgid "gnokii I/O error" msgstr "gnokii in/ut-fel" #: ../common/links/atbus.c:85 msgid "Couldn't open ATBUS device" msgstr "Kunde inte öppna ATBUS-enhet" #: ../common/links/cbus.c:284 msgid "Couldn't open CBUS device" msgstr "Kunde inte öppna CBUS-enhet" #: ../common/links/fbus-3110.c:77 ../common/links/fbus.c:85 #: ../common/links/fbus.c:141 ../common/links/fbus.c:184 msgid "Couldn't open FBUS device" msgstr "Kunde inte öppna FBUS-enhet" #: ../common/links/fbus-3110.c:258 #, c-format msgid "fb3110_tx_frame_send - message too long!\n" msgstr "fb3110_tx_frame_send - meddelande för lÃ¥ngt!\n" #: ../common/links/fbus-phonet.c:107 msgid "Couldn't open PHONET device" msgstr "Kunde inte öppna PHONET-enhet" #: ../common/links/gnbus.c:305 msgid "Couldn't open GNBUS device" msgstr "Kunde inte öppna GNBUS-enhet" #: ../common/links/m2bus.c:78 msgid "Couldn't open M2BUS device" msgstr "Kunde inte öppna M2BUS-enhet" #: ../common/misc.c:466 #, c-format msgid "Cannot lock NULL device. Set port config parameter correctly.\n" msgstr "" #: ../common/misc.c:481 #, c-format msgid "Out of memory error while locking device.\n" msgstr "Slut pÃ¥ minne vid lÃ¥sning av enhet.\n" #: ../common/misc.c:510 #, fuzzy, c-format msgid "Lockfile %s is stale. Overriding it...\n" msgstr "LÃ¥sfilen %s är gammal. Bortser frÃ¥n den..\n" #: ../common/misc.c:513 #, fuzzy, c-format msgid "Overriding file %s failed, please check the permissions.\n" msgstr "Ã…sidosättning misslyckades, kontrollera rättigheterna.\n" #: ../common/misc.c:514 ../common/misc.c:529 #, c-format msgid "Cannot lock device.\n" msgstr "Kan inte lÃ¥sa enhet.\n" #: ../common/misc.c:518 #, fuzzy, c-format msgid "Device already locked with %s.\n" msgstr "Enhet redan lÃ¥st.\n" #: ../common/misc.c:527 #, c-format msgid "Unable to read lockfile %s.\n" msgstr "Kunde inte läsa lÃ¥sfilen %s.\n" #: ../common/misc.c:528 #, c-format msgid "Please check for reason and remove the lockfile by hand.\n" msgstr "Undersök anledningen och ta bort lÃ¥sfilen för hand.\n" #: ../common/misc.c:538 #, c-format msgid "Device seems to be locked by unknown process.\n" msgstr "Enhet verkar vara lÃ¥st av okänd process.\n" #: ../common/misc.c:540 #, c-format msgid "Please check permission on lock directory.\n" msgstr "Kontrollera rättigheterna pÃ¥ lÃ¥skatalogen.\n" #: ../common/misc.c:542 #, fuzzy, c-format msgid "Cannot create lockfile %s. Please check for existence of the path.\n" msgstr "Kan inte skapa lÃ¥sfilen %s. Kontrollera att sökvägen existerar." #: ../common/misc.c:547 #, fuzzy, c-format msgid "Failed to write to the lockfile %s.\n" msgstr "Misslyckades med att skriva AttGöra-anteckning: %s\n" #: ../common/misc.c:572 #, fuzzy, c-format msgid "Cannot unlock device: %s\n" msgstr "Kan inte lÃ¥sa upp enhet.\n" #: ../common/nokia-decoding.c:352 ../common/phones/nk6100.c:1010 #: ../xgnokii/xgnokii.c:222 ../xgnokii/xgnokii.c:1039 msgid "VIP" msgstr "VIP" #: ../common/nokia-decoding.c:358 ../common/phones/nk6100.c:1016 #: ../xgnokii/xgnokii.c:224 ../xgnokii/xgnokii.c:1063 msgid "Colleagues" msgstr "Kollegor" #: ../common/nokia-decoding.c:361 ../common/phones/nk6100.c:1019 #: ../xgnokii/xgnokii.c:225 ../xgnokii/xgnokii.c:1075 msgid "Other" msgstr "Övrigt" #. Set a default SMSC name because +CSCA doesn't provide one #. Set a default name #: ../common/phones/atgen.c:2075 ../common/phones/nk6100.c:1552 #: ../common/phones/nk6510.c:1951 ../common/phones/nk7110.c:1479 #: ../common/phones/pcsc.c:692 ../xgnokii/xgnokii.c:521 #: ../xgnokii/xgnokii_sms.c:832 #, c-format msgid "Set %d" msgstr "Ställ in %d" #: ../common/phones/atgen.c:2692 #, c-format msgid "Withheld" msgstr "" #: ../common/phones/fake.c:95 #, c-format msgid "" "Apparently you didn't configure gnokii. Please do it prior to using it.\n" "You can get some clues from comments included in sample config file or give\n" "a try with gnokii-configure utility included in gnokii distribution.\n" msgstr "" #: ../common/phones/nk6100.c:2092 #, c-format msgid "Personal" msgstr "Personlig" #: ../common/phones/nk6100.c:2095 ../common/phones/nk6100.c:2122 #, c-format msgid "Car" msgstr "Bil" #: ../common/phones/nk6100.c:2098 ../common/phones/nk6100.c:2125 #, c-format msgid "Headset" msgstr "Headset" #: ../common/phones/nk6100.c:2101 ../common/phones/nk6100.c:2128 #, c-format msgid "Unknown (%d)" msgstr "Okänd (%d)" #: ../common/phones/nk6100.c:2107 ../xgnokii/xgnokii_contacts.c:701 #: ../xgnokii/xgnokii_contacts.c:791 ../xgnokii/xgnokii_contacts.c:938 #: ../xgnokii/xgnokii_contacts.c:980 ../xgnokii/xgnokii_contacts.c:1021 #: ../xgnokii/xgnokii_contacts.c:1094 ../xgnokii/xgnokii_contacts.c:1186 #, c-format msgid "General" msgstr "Allmän" #: ../common/phones/nk6100.c:2110 #, c-format msgid "Silent" msgstr "Tyst" #: ../common/phones/nk6100.c:2116 #, c-format msgid "Outdoor" msgstr "Utomhus" #: ../common/phones/nk6100.c:2119 #, c-format msgid "Pager" msgstr "Pager" #: ../common/phones/nk6510.c:1811 #, c-format msgid "" "6510 series phones seem to be quite sensitive to malformed SMS messages\n" "It may have to be sent to Nokia Service if something fails!\n" "Do you really want to continue? " msgstr "" "Telefoner ur 6510-serien verkar vara känsliga mot felaktiga SMS-meddelanden\n" "Den kan behöva skickas in i Nokia för service om nÃ¥got gÃ¥r fel!\n" "Vill du verkligen fortsätta?" #: ../common/phones/nk6510.c:1814 #, c-format msgid "(yes/no) " msgstr "(ja/nej) " #: ../common/phones/nk6510.c:1816 ../gnokii/gnokii-phonebook.c:421 #: ../gnokii/gnokii-sms.c:542 ../gnokii/gnokii-sms.c:833 #: ../gnokii/gnokii-utils.c:63 ../gnokii/gnokii-wap.c:223 msgid "yes" msgstr "ja" #: ../common/phones/nk6510.c:2361 ../common/phones/nk6510.c:2426 #, fuzzy, c-format msgid "Progress: %3d%% completed" msgstr "Förlopp: %d%% klar\n" #: ../common/phones/nokia.c:338 msgid "Tried to activate CONTACT SERVICE\n" msgstr "Försökte aktivera KONTAKTTJÄNST\n" #: ../common/phones/nokia.c:667 msgid "" "NOKIA RAW RINGTONE DECODING FAILED\n" "ringtone:\n" msgstr "" "AVKODNING AV RÃ…NOKIA-RINGSIGNAL MISSLYCKADES\n" "ringsignal: \n" #: ../common/phones/nokia.c:678 #, c-format msgid "offset: %04x\n" msgstr "offset: %04x\n" #: ../common/phones/pcsc.c:593 #, c-format msgid "Phase %s SIM" msgstr "" #: ../common/vcal.lx:161 #, c-format msgid "Error: Invalid calendar note number!\n" msgstr "Fel: Ogiltigt nummer för kalenderanteckning!\n" #. translators: %s are replaced by function names #: ../common/vcal.lx:282 ../common/vcal.lx:344 #, fuzzy, c-format msgid "Function %s() is deprecated. Use %s() instead.\n" msgstr "" "Funktionen gn_vcal_file_event_read() används inte längre. Använd " "gn_ical2calnote() istället.\n" #: ../common/vcal.lx:285 ../common/vcal.lx:347 ../gnokii/gnokii-calendar.c:256 #: ../gnokii/gnokii-file.c:437 ../gnokii/gnokii-todo.c:162 ../smsd/file.c:185 #: ../xgnokii/xgnokii_contacts.c:2700 ../xgnokii/xgnokii_dtmf.c:93 #: ../xgnokii/xgnokii_logos.c:1372 ../xgnokii/xgnokii_speed.c:324 #, c-format msgid "Can't open file %s for reading!\n" msgstr "Kan inte öppna filen %s för läsning!\n" #: ../common/vcal.lx:294 ../common/vcal.lx:356 #, c-format msgid "Error parsing vCalendar file!\n" msgstr "Fel vid tolkning av vCalendar-fil!\n" #: ../getopt/getopt.c:566 ../getopt/getopt.c:582 #, c-format msgid "%s: option '%s' is ambiguous\n" msgstr "" #: ../getopt/getopt.c:615 ../getopt/getopt.c:619 #, c-format msgid "%s: option '--%s' doesn't allow an argument\n" msgstr "" #: ../getopt/getopt.c:628 ../getopt/getopt.c:633 #, c-format msgid "%s: option '%c%s' doesn't allow an argument\n" msgstr "" #: ../getopt/getopt.c:676 ../getopt/getopt.c:695 ../getopt/getopt.c:998 #: ../getopt/getopt.c:1017 #, c-format msgid "%s: option '%s' requires an argument\n" msgstr "" #: ../getopt/getopt.c:733 ../getopt/getopt.c:736 #, c-format msgid "%s: unrecognized option '--%s'\n" msgstr "" #: ../getopt/getopt.c:744 ../getopt/getopt.c:747 #, c-format msgid "%s: unrecognized option '%c%s'\n" msgstr "" #: ../getopt/getopt.c:796 ../getopt/getopt.c:799 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "" #: ../getopt/getopt.c:849 ../getopt/getopt.c:866 ../getopt/getopt.c:1069 #: ../getopt/getopt.c:1087 #, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "" #: ../getopt/getopt.c:919 ../getopt/getopt.c:935 #, c-format msgid "%s: option '-W %s' is ambiguous\n" msgstr "" #: ../getopt/getopt.c:959 ../getopt/getopt.c:977 #, c-format msgid "%s: option '-W %s' doesn't allow an argument\n" msgstr "" #: ../gnokiid/gnokiid.c:65 #, c-format msgid "GNOKIID Version %s\n" msgstr "GNOKIID version %s\n" #: ../gnokiid/gnokiid.c:70 #, c-format msgid "" "Copyright (C) Hugh Blemings , 1999\n" "Copyright (C) Pavel Janik ml. , 1999\n" "Built %s %s\n" msgstr "" "Copyright © Hugh Blemings , 1999\n" "Copyright © Pavel Janik ml. , 1999\n" "Byggd %s %s\n" #: ../gnokiid/gnokiid.c:81 #, c-format msgid "" " usage: gnokiid [--help|--version|--debug]\n" " --help display usage information\n" " --version displays version and copyright information\n" " --debug uses stdin/stdout for virtual modem comms\n" msgstr "" " användning: gnokiid [--help|--version|--debug]\n" " --help visa användningsinformation\n" " --version visar information om version och copyright\n" " --debug använder standard in/ut för virtuell " "modemkommunikation\n" #: ../gnokiid/gnokiid.c:149 #, c-format msgid "" "gnokiid purpose is to work only with the phones that do not have AT Hayes\n" "commands interpreter.\n" msgstr "" "Syftet med gnokiid är att endast fungera med telefoner som inte har en tolk\n" "för AT Hayes-kommandon.\n" #: ../gnokii/gnokii.c:203 #, c-format msgid "GNOKII Version %s\n" msgstr "GNOKII Version %s\n" #: ../gnokii/gnokii.c:210 #, fuzzy, c-format msgid "" "Copyright (C) Hugh Blemings , 1999, 2000\n" "Copyright (C) Pavel Janik ml. , 1999, 2000\n" "Copyright (C) Pavel Machek , 2001\n" "Copyright (C) Pawel Kot , 2001-2011\n" "Copyright (C) BORBELY Zoltan , 2002\n" "Copyright (C) Daniele Forsi , 2004-2011\n" "gnokii is free software, covered by the GNU General Public License, and you " "are\n" "welcome to change it and/or distribute copies of it under certain " "conditions.\n" "There is absolutely no warranty for gnokii. See GPL for details.\n" "Built %s %s\n" msgstr "" "Copyright © Hugh Blemings , 1999, 2000\n" "Copyright © Pavel Janik ml. , 1999, 2000\n" "Copyright © Pavel Machek , 2001\n" "Copyright © Pawel Kot , 2001-2006\n" "Copyright © BORBELY Zoltan , 2002\n" "gnokii är fri programvara som täcks av GNU General Public License och du är\n" "välkommen att ändra den och/eller distribuera kopior av den under vissa " "villkor.\n" "Det finns absolut ingen garanti för gnokii. Se GPL för detaljer.\n" "Byggd %s %s\n" #: ../gnokii/gnokii.c:238 #, fuzzy, c-format msgid "" "Usage:\n" "\tgnokii [CONFIG OPTIONS] OPTIONS\n" "\n" "CONFIG OPTIONS\n" "\t\t--config filename\n" "\t\t--phone phone_section\n" "\n" "OPTIONS\n" "Use just one option at a time.\n" "General options:\n" " --help [all] [monitor] [sms] [mms] [phonebook] [calendar] [todo]\n" " [dial] [profile] [settings] [wap] [logo] [ringtone]\n" " [security] [file] [other]\n" " --version\n" " --shell\n" msgstr "" "Användning:\n" "\tgnokii [KONFIGURATIONSFLAGGOR] FLAGGOR\n" "\n" "KONFIGURATIONSFLAGGOR\n" "\t\t--config filnamn\n" "\t\t--phone telefonsektion\n" "\n" "FLAGGOR\n" "Använd endast en flagga samtidigt.\n" "Allmänna flaggor:\n" " --help\n" " --version\n" #: ../gnokii/gnokii.c:359 #, c-format msgid "Cannot open logfile %s\n" msgstr "Kan inte öppna loggfilen %s\n" #: ../gnokii/gnokii.c:392 #, c-format msgid "File: %s\n" msgstr "Fil: %s\n" #: ../gnokii/gnokii.c:394 #, c-format msgid "Phone section: [phone_%s]\n" msgstr "Telefonsektion: [phone_%s]\n" #: ../gnokii/gnokii.c:403 #, c-format msgid "WARNING: cannot open logfile, logs will be directed to stderr\n" msgstr "" "VARNING: kan inte öppna loggfilen, loggar kommer att skickas till stderr\n" #: ../gnokii/gnokii.c:819 #, c-format msgid "Use '%s --help' for usage information.\n" msgstr "Använd \"%s --help\" för information om användning.\n" #: ../gnokii/gnokii.c:821 #, fuzzy, c-format msgid "Use '--help' for usage information.\n" msgstr "Använd \"%s --help\" för information om användning.\n" #: ../gnokii/gnokii.c:1142 #, c-format msgid "Unknown option: %d\n" msgstr "Okänd flagga: %d\n" #: ../gnokii/gnokii.c:1206 #, c-format msgid "" "gnokii needs to be compiled with readline support to enable this option.\n" msgstr "" #: ../gnokii/gnokii-calendar.c:56 #, c-format msgid "" "Calendar options:\n" " --getcalendarnote start_number [end_number|end] [-v|--vCal]\n" " --writecalendarnote vcalendarfile start_number [end_number|end]\n" " --deletecalendarnote start [end_number|end]\n" msgstr "" "Kalenderflaggor:\n" " --getcalendarnote startnummer [slutnummer|end] [-v|--vCal]\n" " --writecalendarnote vcalendarfil startnummer [slutnummer|end]\n" " --deletecalendarnote start [slutnummer|end]\n" #: ../gnokii/gnokii-calendar.c:65 #, c-format msgid "" "usage: --getcalendarnote start_number [end_number | end] [-v|--vCal]\n" " start_number - entry number in the phone calendar " "(numeric)\n" " end_number - read to this entry in the phone " "calendar (numeric, optional)\n" " end - the string \"end\" indicates all " "entries from start to end\n" " -v - output in iCalendar format\n" " NOTE: if no end is given, only the start entry is read\n" msgstr "" "användning: --getcalendarnote startnummer [slutnummer | end] [-v|--vCal]\n" " startnummer - postens nummer i telefonkalendern " "(numerisk)\n" " slutnummer - läs fram till den här posten i " "telefonkalendern (numerisk, valfri)\n" " end - strängen \"end\" indikerar alla " "poster frÃ¥n start till slut\n" " -v - skriv ut i iCalendar-format\n" " OBSERVERA: om inget slut anges kommer endast startposten att läsas\n" #. Plain text output #. Translators: this is the header of a calendar note. Example: 1 (1). Type: Meeting #: ../gnokii/gnokii-calendar.c:130 #, fuzzy, c-format msgid "%d (%d). %s: %s\n" msgstr "%d (%d). Tipo: " #: ../gnokii/gnokii-calendar.c:130 ../xgnokii/xgnokii_calendar.c:1536 msgid "Type" msgstr "Typ" #: ../gnokii/gnokii-calendar.c:132 #, c-format msgid " Start date: %d-%02d-%02d\n" msgstr " Startdatum: %d-%02d-%02d\n" #: ../gnokii/gnokii-calendar.c:137 #, c-format msgid " Start time: %02d:%02d:%02d\n" msgstr " Starttid: %02d:%02d:%02d\n" #: ../gnokii/gnokii-calendar.c:142 #, c-format msgid " End date: %d-%02d-%02d\n" msgstr " Slutdatum: %d-%02d-%02d\n" #: ../gnokii/gnokii-calendar.c:146 #, c-format msgid " End time: %02d:%02d:%02d\n" msgstr " Sluttid: %02d:%02d:%02d\n" #: ../gnokii/gnokii-calendar.c:154 #, c-format msgid " Alarm date: %02d-%02d\n" msgstr " Alarmdatum: %02d-%02d\n" #: ../gnokii/gnokii-calendar.c:158 #, c-format msgid " Alarm date: %d-%02d-%02d\n" msgstr " Alarmdatum: %d-%02d-%02d\n" #: ../gnokii/gnokii-calendar.c:163 #, c-format msgid " Alarm time: %02d:%02d:%02d\n" msgstr " Alarmtid: %02d:%02d:%02d\n" #: ../gnokii/gnokii-calendar.c:167 #, c-format msgid " Alarm tone %s\n" msgstr " Alarmton %s\n" #: ../gnokii/gnokii-calendar.c:168 ../xgnokii/xgnokii_calendar.c:214 #: ../xgnokii/xgnokii_calendar.c:220 msgid "enabled" msgstr "aktiverad" #: ../gnokii/gnokii-calendar.c:168 ../xgnokii/xgnokii_calendar.c:214 #: ../xgnokii/xgnokii_calendar.c:220 msgid "disabled" msgstr "inaktiverad" #: ../gnokii/gnokii-calendar.c:171 #, fuzzy, c-format msgid " %s: " msgstr " %s\n" #: ../gnokii/gnokii-calendar.c:171 #, fuzzy msgid "Repeat" msgstr "Upprepa:" #: ../gnokii/gnokii-calendar.c:182 #, fuzzy, c-format msgid "Every %d hours" msgstr "var %d minut" #: ../gnokii/gnokii-calendar.c:187 #, c-format msgid " The event will be repeated " msgstr "" #: ../gnokii/gnokii-calendar.c:190 #, fuzzy, c-format msgid "forever." msgstr "aldrig" #: ../gnokii/gnokii-calendar.c:193 #, c-format msgid "%d times." msgstr "" #: ../gnokii/gnokii-calendar.c:199 #, c-format msgid " Text: %s\n" msgstr " Text: %s\n" #: ../gnokii/gnokii-calendar.c:203 ../gnokii/gnokii-calendar.c:206 #: ../gnokii/gnokii-wap.c:226 ../gnokii/gnokii-wap.c:227 #: ../gnokii/gnokii-wap.c:228 ../gnokii/gnokii-wap.c:229 #: ../gnokii/gnokii-wap.c:230 ../gnokii/gnokii-wap.c:231 #: ../gnokii/gnokii-wap.c:232 ../gnokii/gnokii-wap.c:233 #: ../gnokii/gnokii-wap.c:235 ../gnokii/gnokii-wap.c:236 #: ../gnokii/gnokii-wap.c:237 ../gnokii/gnokii-wap.c:238 #: ../gnokii/gnokii-wap.c:239 ../gnokii/gnokii-wap.c:240 #: ../gnokii/gnokii-wap.c:241 ../gnokii/gnokii-wap.c:243 #: ../gnokii/gnokii-wap.c:244 #, fuzzy, c-format msgid " %s: %s\n" msgstr " IP: %s\n" #: ../gnokii/gnokii-calendar.c:203 ../xgnokii/xgnokii.c:1709 msgid "Phone" msgstr "Telefon" #: ../gnokii/gnokii-calendar.c:226 #, c-format msgid "The calendar note can not be read: %s\n" msgstr "Kalenderanteckning kan inte läsas: %s\n" #: ../gnokii/gnokii-calendar.c:236 #, c-format msgid "" "usage: --writecalendarnote vcalendarfile start_number [end_number|end]\n" " vcalendarfile - file containing calendar notes in " "vCal format\n" " start_number - first calendar note from " "vcalendarfile to read\n" " end_number - last calendar note from " "vcalendarfile to read\n" " end - read all notes from vcalendarfile " "from start_number\n" " NOTE: it stores the note at the first empty location.\n" msgstr "" "användning: --writecalendarnote vcalendarfil startnummer [slutnummer|end]\n" " vcalendarfile - fil som innehÃ¥ller " "kalenderanteckningar i vCal-format\n" " startnummer - första kalenderanteckning frÃ¥n " "vcalendarfil att läsa\n" " slutnummer - sista kalenderanteckning frÃ¥n " "vcalendarfil att läsa\n" " end - läs alla anteckningar frÃ¥n " "vcalendarfil frÃ¥n startnummer\n" " OBSERVERA: den lagrar anteckningen pÃ¥ första lediga plats.\n" #: ../gnokii/gnokii-calendar.c:300 ../gnokii/gnokii-todo.c:206 #, c-format msgid "Failed to load vCalendar file: %s\n" msgstr "Misslyckades med att läsa in vCalendar-fil: %s\n" #: ../gnokii/gnokii-calendar.c:309 ../gnokii/gnokii-dial.c:143 #: ../gnokii/gnokii-todo.c:215 #, c-format msgid "Successfully written!\n" msgstr "Skrivning lyckades!\n" #: ../gnokii/gnokii-calendar.c:311 #, c-format msgid "Failed to write calendar note: %s\n" msgstr "Misslyckades med att skriva kalenderanteckning: %s\n" #: ../gnokii/gnokii-calendar.c:320 #, c-format msgid "" "usage: --deletecalendarnote start_number [end_number | end]\n" " start_number - first number in the phone calendar " "(numeric)\n" " end_number - until this entry in the phone " "calendar (numeric, optional)\n" " end - the string \"end\" indicates all " "entries from start to end\n" " NOTE: if no end is given, only the start entry is deleted\n" msgstr "" "användning: --deletecalendarnote startnummer [slutnummer | end]\n" " startnummer - första numret i telefonkalendern " "(numerisk)\n" " slutnummer - fram tills den här posten i " "telefonkalendern (numerisk, valfri)\n" " end - strängen \"end\" indikerar alla " "poster frÃ¥n start till slut\n" " OBSERVERA: om inget slut anges kommer endast startposten att tas bort\n" #: ../gnokii/gnokii-calendar.c:355 #, c-format msgid "Calendar note deleted.\n" msgstr "Kalenderanteckning borttagen.\n" #: ../gnokii/gnokii-calendar.c:357 #, c-format msgid "The calendar note cannot be deleted: %s\n" msgstr "Kalenderanteckning kan inte tas bort: %s\n" #: ../gnokii/gnokii-dial.c:52 #, c-format msgid "" "Dialling and call options:\n" " --getspeeddial location\n" " --setspeeddial number memory_type location\n" " --dialvoice number\n" " --senddtmf string\n" " --answercall callid\n" " --hangup callid\n" " --divert {--op|-o} {register|enable|query|disable|erasure}\n" " {--type|-t} {all|busy|noans|outofreach|notavail}\n" " {--call|-c} {all|voice|fax|data}\n" " [{--timeout|-m} time_in_seconds]\n" " [{--number|-n} number]\n" "All number, location and callid options need to be numeric.\n" msgstr "" "Flaggor för uppringning och samtal:\n" " --getspeeddial plats\n" " --setspeeddial nummer minnestyp plats\n" " --dialvoice nummer\n" " --senddtmf sträng\n" " --answercall samtals-id\n" " --hangup samtals-id\n" " --divert {--op|-o} {register|enable|query|disable|erasure}\n" " {--type|-t} {all|busy|noans|outofreach|notavail}\n" " {--call|-c} {all|voice|fax|data}\n" " [{--timeout|-m} tid_i_sekunder]\n" " [{--number|-n} nummer]\n" "Alla flaggvärden för nummer, platser och samtals-id mÃ¥ste vara numeriska.\n" #: ../gnokii/gnokii-dial.c:70 #, c-format msgid "" "usage: --getspeeddial location\n" " location - location in the speed dial memory\n" msgstr "" "användning: --getspeeddial plats\n" " plats - plats i kortnummerminnet\n" #: ../gnokii/gnokii-dial.c:93 #, fuzzy, c-format msgid "SpeedDial nr. %d %s %d\n" msgstr "Kortnummer %d: %d:%d\n" #: ../gnokii/gnokii-dial.c:96 ../gnokii/gnokii-dial.c:146 #: ../gnokii/gnokii-dial.c:186 ../gnokii/gnokii-dial.c:217 #: ../gnokii/gnokii-dial.c:248 ../gnokii/gnokii-dial.c:381 #: ../gnokii/gnokii-logo.c:298 ../gnokii/gnokii-logo.c:469 #: ../gnokii/gnokii-monitor.c:454 ../gnokii/gnokii-monitor.c:457 #: ../gnokii/gnokii-monitor.c:480 ../gnokii/gnokii-other.c:190 #: ../gnokii/gnokii-phonebook.c:256 ../gnokii/gnokii-profile.c:112 #: ../gnokii/gnokii-profile.c:162 ../gnokii/gnokii-security.c:95 #: ../gnokii/gnokii-security.c:127 ../gnokii/gnokii-security.c:205 #: ../gnokii/gnokii-security.c:247 ../gnokii/gnokii-security.c:298 #: ../gnokii/gnokii-settings.c:122 ../gnokii/gnokii-settings.c:146 #: ../gnokii/gnokii-settings.c:180 ../gnokii/gnokii-settings.c:204 #: ../gnokii/gnokii-sms.c:552 ../gnokii/gnokii-sms.c:1048 #: ../gnokii/gnokii-sms.c:1126 ../gnokii/gnokii-sms.c:1156 #: ../gnokii/gnokii-sms.c:1189 ../gnokii/gnokii-sms.c:1329 #: ../gnokii/gnokii-sms.c:1331 ../gnokii/gnokii-wap.c:94 #: ../gnokii/gnokii-wap.c:129 ../gnokii/gnokii-wap.c:162 #: ../gnokii/gnokii-wap.c:248 ../gnokii/gnokii-wap.c:323 #: ../smsd/lowlevel.c:112 ../smsd/lowlevel.c:125 ../smsd/mysql.c:77 #: ../smsd/mysql.c:134 ../smsd/mysql.c:171 ../smsd/mysql.c:189 #: ../smsd/mysql.c:199 ../smsd/mysql.c:225 ../smsd/mysql.c:263 #: ../smsd/mysql.c:296 ../smsd/mysql.c:336 ../smsd/mysql.c:345 #: ../smsd/mysql.c:399 ../smsd/pq.c:68 ../smsd/pq.c:77 ../smsd/pq.c:121 #: ../smsd/pq.c:150 ../smsd/pq.c:190 ../smsd/pq.c:212 ../smsd/pq.c:241 #: ../smsd/pq.c:258 ../smsd/pq.c:296 ../smsd/pq.c:333 ../smsd/pq.c:376 #: ../smsd/pq.c:427 ../smsd/sqlite.c:58 ../smsd/sqlite.c:70 #: ../smsd/sqlite.c:240 #, c-format msgid "Error: %s\n" msgstr "Fel: %s\n" #: ../gnokii/gnokii-dial.c:105 #, c-format msgid "" "usage: --setspeeddial number memory_type location\n" " number - phone number to be stored\n" " memory_type - memory type for the speed dial\n" " location - location in the speed dial memory\n" msgstr "" "användning: --setspeeddial nummer minnestyp plats\n" " nummer - telefonnummer att lagra\n" " minnestyp - minnestyp för kortnummer\n" " plats - plats i kortnummerminnet\n" #: ../gnokii/gnokii-dial.c:128 ../gnokii/gnokii-phonebook.c:111 #: ../gnokii/gnokii-phonebook.c:487 #, c-format msgid "Unknown memory type %s (use ME, SM, ...)!\n" msgstr "Okänd minnestyp %s (använd ME, SM, ...)!\n" #: ../gnokii/gnokii-dial.c:169 #, c-format msgid "Dialing failed: %s\n" msgstr "Uppringning misslyckades: %s\n" #: ../gnokii/gnokii-dial.c:171 #, c-format msgid "Dialled call, id: %d (lowlevel id: %d)\n" msgstr "Ringde samtal, id: %d (lÃ¥gnivÃ¥ id: %d)\n" #: ../gnokii/gnokii-dial.c:194 #, c-format msgid "" "usage: --answercall callid\n" " callid - call identifier\n" msgstr "" "användning: --answercall samtalsid\n" " callid - samtalsid\n" #: ../gnokii/gnokii-dial.c:225 #, c-format msgid "" "usage: --hangup callid\n" " callid - call identifier\n" msgstr "" "användning: --hangup samtalsid\n" " callid - samtalsid\n" #: ../gnokii/gnokii-dial.c:256 #, fuzzy, c-format msgid "" " usage: --divert\n" " -o operation\n" " --op operation operation to be executed, needs to be one\n" " of the following: register, enable, query,\n" " disable, erasure; this is required option\n" " -t type\n" " --type type type of the operation, needs to be one of\n" " the following: all, busy, noans, outofreach,\n" " notavail, unconditional; this is required " "option\n" " -c calltype\n" " --call calltype type of call for the operation, needs to be\n" " one of the following: all, voice, fax, data;\n" " this is optional\n" " -m sec\n" " --timeout sec timeout to be set; the value is in seconds\n" " -n msisdn\n" " --number msisdn number for redirection\n" "\n" msgstr "" " användning: --divert\n" " -o operation\n" " --op operation operation att köra, behöver vara en av\n" " följande: register, enable, query,\n" " disable, erasure; det här är en nödvändig " "flagga\n" " -t typ \n" " --type typ typ av operation, behöver vara en av\n" " följande: all, busy, noans, outofreach,\n" " notavail; det här är en nödvändig flagga\n" " -c samtalstyp\n" " --call samtalstyp typ av samtal för operationen, behöver vara\n" " en av följande: all, voice, fax, data;\n" " det här är en nödvändig flagga\n" " -m s\n" " --timeout s tidsgräns att ställa in; värdet är i sekunder\n" " -n msisdn\n" " --number msisdn nummer för vidarekoppling\n" "\n" #: ../gnokii/gnokii-dial.c:373 ../gnokii/gnokii-dial.c:374 #: ../gnokii/gnokii-dial.c:376 ../gnokii/gnokii-phonebook.c:199 #: ../gnokii/gnokii-phonebook.c:203 ../gnokii/gnokii-todo.c:119 #: ../gnokii/gnokii-todo.c:120 ../gnokii/gnokii-wap.c:89 #: ../gnokii/gnokii-wap.c:90 ../gnokii/gnokii-wap.c:220 #: ../gnokii/gnokii-wap.c:221 ../gnokii/gnokii-wap.c:222 #: ../gnokii/gnokii-wap.c:223 ../gnokii/gnokii-wap.c:224 #, fuzzy, c-format msgid "%s: %s\n" msgstr "%-7s %s\n" #: ../gnokii/gnokii-dial.c:373 #, fuzzy msgid "Divert type" msgstr "Vidarekopplingstyp: " #: ../gnokii/gnokii-dial.c:374 #, fuzzy msgid "Call type" msgstr "Samtalstyp: " #: ../gnokii/gnokii-dial.c:377 #, fuzzy, c-format msgid "%s: %d\n" msgstr "| %s (%d)\n" #: ../gnokii/gnokii-dial.c:377 #, fuzzy msgid "Timeout" msgstr "L2-Timeouter" #: ../gnokii/gnokii-dial.c:379 #, c-format msgid "Divert isn't active.\n" msgstr "Vidarekoppling inte aktiv.\n" #: ../gnokii/gnokii-file.c:53 #, c-format msgid "" "File options:\n" " --getfilelist remote_path\n" " --getfiledetailsbyid [id]\n" " --getfileid remote_filename\n" " --getfile remote_filename [local_filename]\n" " --getfilebyid id [local_filename]\n" " --getallfiles remote_path\n" " --putfile local_filename remote_filename\n" " --deletefile remote_filename\n" " --deletefilebyid id\n" msgstr "" "Filflaggor:\n" " --getfilelist fjärrsökväg\n" " --getfiledetailsbyid [id]\n" " --getfileid fjärrfilnamn\n" " --getfile fjärrfilnamn [lokalt_filnamn]\n" " --getfilebyid id [lokalt_filnamn]\n" " --getallfiles fjärrsökväg\n" " --putfile lokalt_filnamn fjärrfilnamn\n" " --deletefile fjärrfilnamn\n" " --deletefilebyid id\n" #: ../gnokii/gnokii-file.c:98 ../gnokii/gnokii-file.c:192 #: ../gnokii/gnokii-file.c:377 #, c-format msgid "Failed to get info for %s: %s\n" msgstr "Misslyckades med att hämta information för %s: %s\n" #: ../gnokii/gnokii-file.c:100 #, c-format msgid "Filelist for path %s:\n" msgstr "Fillista för sökväg %s:\n" #: ../gnokii/gnokii-file.c:102 #, c-format msgid " %s\n" msgstr " %s\n" #: ../gnokii/gnokii-file.c:135 ../gnokii/gnokii-file.c:170 #, c-format msgid "Failed to get filename: %s\n" msgstr "Misslyckades med att fÃ¥ filnamn: %s\n" #: ../gnokii/gnokii-file.c:142 #, c-format msgid "| %s (%d)\n" msgstr "| %s (%d)\n" #: ../gnokii/gnokii-file.c:167 #, c-format msgid " - %s (%d)\n" msgstr " - %s (%d)\n" #: ../gnokii/gnokii-file.c:194 #, c-format msgid "Fileid for file %s is %02x %02x %02x %02x %02x %02x\n" msgstr "Fil-id för fil %s är %02x %02x %02x %02x %02x %02x\n" #: ../gnokii/gnokii-file.c:212 ../gnokii/gnokii-file.c:232 #, c-format msgid "Failed to delete %s: %s\n" msgstr "Misslyckades med att ta bort %s: %s\n" #: ../gnokii/gnokii-file.c:214 ../gnokii/gnokii-file.c:234 #, c-format msgid "Deleted: %s\n" msgstr "Borttagen: %s\n" #: ../gnokii/gnokii-file.c:241 #, c-format msgid " usage: --getfile remote_filename [localfilename]\n" msgstr " användning: --getfile fjärrfilnamn [lokalt_filnamn]\n" #: ../gnokii/gnokii-file.c:266 ../gnokii/gnokii-file.c:391 #, c-format msgid "Failed to get file %s: %s\n" msgstr "Misslyckades med att hämta filen %s: %s\n" #: ../gnokii/gnokii-file.c:275 #, c-format msgid "Got file %s. Save to [%s]: " msgstr "Hämtade fil %s. Spara till [%s]: " #: ../gnokii/gnokii-file.c:290 ../gnokii/gnokii-file.c:345 #: ../gnokii/gnokii-file.c:396 ../gnokii/gnokii-logo.c:198 #: ../gnokii/gnokii-utils.c:93 ../gnokii/gnokii-utils.c:118 #: ../xgnokii/xgnokii_contacts.c:2620 ../xgnokii/xgnokii_dtmf.c:135 #: ../xgnokii/xgnokii_speed.c:417 #, c-format msgid "Can't open file %s for writing!\n" msgstr "Kan inte öppna filen %s för skrivning!\n" #: ../gnokii/gnokii-file.c:294 ../gnokii/gnokii-file.c:349 #: ../gnokii/gnokii-file.c:400 #, fuzzy, c-format msgid "Failed to write to file %s.\n" msgstr "Misslyckades med att hämta fil: %s\n" #: ../gnokii/gnokii-file.c:305 #, c-format msgid " usage: --getfilebyid id [localfilename]\n" msgstr " användning: --getfilebyid id [lokalt_filnamn]\n" #: ../gnokii/gnokii-file.c:332 #, c-format msgid "Failed to get file: %s\n" msgstr "Misslyckades med att hämta fil: %s\n" #: ../gnokii/gnokii-file.c:393 #, c-format msgid "Got file %s.\n" msgstr "Hämtade fil %s.\n" #: ../gnokii/gnokii-file.c:415 #, c-format msgid " usage: --putfile local_filename remote_filename\n" msgstr " användning: --putfile lokalt_filnamn fjärrfilnamn\n" #: ../gnokii/gnokii-file.c:444 #, c-format msgid "File %s corrupted!\n" msgstr "" #: ../gnokii/gnokii-file.c:449 #, c-format msgid "Failed to put file to %s: %s\n" msgstr "Misslyckades med att spara filen till %s: %s\n" #: ../gnokii/gnokii-logo.c:56 #, fuzzy, c-format msgid "" "Logo options:\n" " --sendlogo {caller|op|picture} destination logofile\n" " [network_code]\n" " --setlogo op [logofile [network_code]]\n" " --setlogo startup [logofile]\n" " --setlogo caller [logofile [caller_group_number [group_name]]]\n" " --setlogo {dealer|text} [text]\n" " --getlogo op [logofile [network_code]]\n" " --getlogo startup [logofile [network_code]]\n" " --getlogo caller [caller_group_number [logofile\n" " [network_code]]]\n" " --getlogo {dealer|text}\n" " --viewlogo logofile\n" msgstr "" "Flaggor för logotyp:\n" " --sendlogo {caller|op|picture} destination logotypfil\n" " [nätverkskod]\n" " --setlogo op [logotypfil [nätverkskod]]\n" " --setlogo startup [logotypfil]\n" " --setlogo caller [logotypfil [samtalsgruppnummer [gruppnamn]]]\n" " --setlogo {dealer|text} [text]\n" " --getlogo op [logotypfil [nätverkskod]]\n" " --getlogo startup [logotypfil [nätverkskod]]\n" " --getlogo caller [samtalsgruppnummer [logotypfil\n" " [nätverskod]]]\n" " --getlogo {dealer|text}\n" " --viewlogo logotypfil\n" #: ../gnokii/gnokii-logo.c:97 #, c-format msgid "Sending operator logo.\n" msgstr "Skickar operatörslogotyp.\n" #: ../gnokii/gnokii-logo.c:98 #, c-format msgid "Sending caller line identification logo.\n" msgstr "Skickar linjeidentifieringslogotyp.\n" #: ../gnokii/gnokii-logo.c:99 #, c-format msgid "Sending Multipart Message: Picture Message.\n" msgstr "Sänder flerdelat meddelande: MMS.\n" #: ../gnokii/gnokii-logo.c:100 #, c-format msgid "Sending EMS-compliant Picture Message.\n" msgstr "Sänder EMS-giltigt MMS.\n" #: ../gnokii/gnokii-logo.c:101 #, c-format msgid "Sending EMS-compliant Animation.\n" msgstr "Sänder EMS-giltig animation.\n" #: ../gnokii/gnokii-logo.c:102 #, c-format msgid "You should specify what kind of logo to send!\n" msgstr "Du bör ange vilken sorts logotyp som ska sändas!\n" #: ../gnokii/gnokii-logo.c:118 #, c-format msgid "Cannot send logo: specified and loaded bitmap type differ!\n" msgstr "Kan inte skicka logotyp: angiven och inläst bildtyp skiljer sig!\n" #: ../gnokii/gnokii-logo.c:156 ../gnokii/gnokii-ringtone.c:148 #: ../gnokii/gnokii-sms.c:352 #, c-format msgid "Message sent in %d parts with reference numbers:" msgstr "" #: ../gnokii/gnokii-logo.c:161 ../gnokii/gnokii-ringtone.c:153 #: ../gnokii/gnokii-sms.c:357 #, fuzzy, c-format msgid "Send succeeded with reference %d!\n" msgstr "Händelsen %d misslyckades med svarskoden %d!\n" #: ../gnokii/gnokii-logo.c:163 ../gnokii/gnokii-ringtone.c:155 #: ../gnokii/gnokii-sms.c:359 #, c-format msgid "SMS Send failed (%s)\n" msgstr "SMS-sändning misslyckades (%s)\n" #: ../gnokii/gnokii-logo.c:180 #, c-format msgid "Saving logo. File \"%s\" exists. (O)verwrite, create (n)ew or (s)kip ? " msgstr "" "Sparar logotyp. Filen \"%s\" finns redan. (S)kriv över, skapa (n)y eller (h)" "oppa över? " #: ../gnokii/gnokii-logo.c:182 msgid "O" msgstr "S" #: ../gnokii/gnokii-logo.c:182 msgid "o" msgstr "s" #: ../gnokii/gnokii-logo.c:183 msgid "N" msgstr "N" #: ../gnokii/gnokii-logo.c:183 msgid "n" msgstr "n" #: ../gnokii/gnokii-logo.c:184 msgid "S" msgstr "H" #: ../gnokii/gnokii-logo.c:184 msgid "s" msgstr "h" #: ../gnokii/gnokii-logo.c:188 #, c-format msgid "Enter name of new file: " msgstr "Ange namn pÃ¥ ny fil: " #: ../gnokii/gnokii-logo.c:233 #, c-format msgid "Dealer welcome note " msgstr "Förhandlarens välkomstanteckning " #: ../gnokii/gnokii-logo.c:235 ../gnokii/gnokii-logo.c:242 #, c-format msgid "currently set to \"%s\"\n" msgstr "för närvarande satt till \"%s\"\n" #: ../gnokii/gnokii-logo.c:237 ../gnokii/gnokii-logo.c:244 #, c-format msgid "currently empty\n" msgstr "för närvarande tom\n" #: ../gnokii/gnokii-logo.c:240 #, c-format msgid "Welcome note " msgstr "Välkomstanteckning " #: ../gnokii/gnokii-logo.c:250 #, c-format msgid "Operator logo for %s (%s) network got successfully\n" msgstr "Operatörslogotyp för nätverket %s (%s) hämtades korrekt\n" #: ../gnokii/gnokii-logo.c:255 ../gnokii/gnokii-logo.c:267 #: ../gnokii/gnokii-logo.c:282 ../gnokii/gnokii-logo.c:363 #, c-format msgid "Sorry, gnokii doesn't know %s network !\n" msgstr "Ledsen, gnokii känner inte till nätverket %s!\n" #: ../gnokii/gnokii-logo.c:263 #, c-format msgid "Startup logo got successfully\n" msgstr "Hämtning av uppstartslogotyp lyckades\n" #: ../gnokii/gnokii-logo.c:274 ../gnokii/gnokii-logo.c:291 #, c-format msgid "Your phone doesn't have logo uploaded !\n" msgstr "Din telefon har ingen logotyp uppladdad!\n" #: ../gnokii/gnokii-logo.c:276 #, c-format msgid "Caller logo got successfully\n" msgstr "Hämtning av logotyp lyckades\n" #: ../gnokii/gnokii-logo.c:277 #, c-format msgid "Caller group name: %s, ringing tone: %s (%d)\n" msgstr "Namn pÃ¥ samtalsgrupp: %s, ringsignal: %s (%d)\n" #: ../gnokii/gnokii-logo.c:288 #, c-format msgid "Unknown bitmap type.\n" msgstr "Okänd bildtyp.\n" #: ../gnokii/gnokii-logo.c:302 #, c-format msgid "What kind of logo do you want to get ?\n" msgstr "Vilken sorts logotyp vill du hämta?\n" #: ../gnokii/gnokii-logo.c:320 #, c-format msgid "Error while reading file \"%s\": %s\n" msgstr "Fel vid läsning av filen \"%s\": %s\n" #: ../gnokii/gnokii-logo.c:398 #, c-format msgid "What kind of logo do you want to set ?\n" msgstr "Vilken sorts logotyp vill du spara?\n" #: ../gnokii/gnokii-logo.c:434 #, c-format msgid "Error setting dealer welcome note - " msgstr "Fel vid inställning av förhandlarens välkomstmeddelande - " #: ../gnokii/gnokii-logo.c:436 #, c-format msgid "Error setting welcome note - " msgstr "Fel vid inställning av välkomstmeddelande - " #: ../gnokii/gnokii-logo.c:440 #, c-format msgid "SIM card and PIN is required\n" msgstr "SIM-kort och PIN-kod krävs\n" #: ../gnokii/gnokii-logo.c:447 #, fuzzy, c-format msgid "too long, truncated to \"%s\" (length %zi)\n" msgstr "för lÃ¥ng, nedklippt till \"%s\" (längd %i)\n" #: ../gnokii/gnokii-logo.c:455 #, c-format msgid "Error setting startup logo - SIM card and PIN is required\n" msgstr "Fel vid inställning av uppstartslogotyp - SIM-kort och PIN-kod krävs\n" #: ../gnokii/gnokii-logo.c:456 #, c-format msgid "i: %i, %2x %2x\n" msgstr "i: %i, %2x %2x\n" #: ../gnokii/gnokii-logo.c:466 #, c-format msgid "Done.\n" msgstr "Klar.\n" #: ../gnokii/gnokii-logo.c:481 #, c-format msgid "Could not load bitmap: %s\n" msgstr "Kunde inte läsa in bildfil: %s\n" #: ../gnokii/gnokii-mms.c:46 #, c-format msgid "" "MMS options:\n" " --getmms memory_type start [end] [{--mime|--pdu|--raw} file]\n" " [-d|--delete] [-o|--overwrite]\n" " --deletemms memory_type start [end]\n" msgstr "" #: ../gnokii/gnokii-mms.c:56 #, fuzzy, c-format msgid "" " usage: --getmms memory start [end] retrieves messages from memory type " "(SM, ME,\n" " IN, OU, ...) starting from\n" " location start and ending with end;\n" " if end option is omitted, just one " "entry\n" " is read;\n" " start must be a number, end may be a " "number\n" " or 'end' string;\n" " if 'end' is used entries are being read\n" " until empty location\n" " --mime filename convert MMS in MIME format and save it " "to\n" " the given file;\n" " --pdu filename extract MMS from raw format and save it " "to\n" " the given file;\n" " --raw filename get MMS from phone and save it unchanged " "to\n" " the given file;\n" " --delete\n" " -d delete MMS after reading\n" " --overwrite\n" " -o overwrite destination file without " "asking\n" "\n" msgstr "" " användning: --getsms minne start [end] hämtar meddelanden frÃ¥n minnestyp " "(SM, ME,\n" " IN, OU, ...) startar frÃ¥n\n" " platsen start och slutar med slut;\n" " om flaggan end utesluts kommer endast en " "post\n" " att läsas;\n" " start mÃ¥ste vara ett tal, slut kan vara " "ett tal eller\n" " strängen \"end\";\n" " om \"end\" används kommer poster att " "läsas in\n" " tills första lediga platsen\n" " --force-file filnamn\n" " -F filnamn spara sms till filen och skriv över den " "om\n" " den redan finns;\n" " om flera sms läses in kommer en " "meddelande-\n" " identifierare att läggas till i " "filnamnet\n" " --file filnamn\n" " -f filnamn som ovan men användaren frÃ¥gas innan\n" " filen skrivs över\n" " --delete\n" " -d ta bort meddelande efter läsning\n" "\n" #: ../gnokii/gnokii-mms.c:82 ../gnokii/gnokii-sms.c:749 #, fuzzy, c-format msgid "%d. %s (%s)\n" msgstr "| %s (%d)\n" #: ../gnokii/gnokii-mms.c:82 #, fuzzy msgid "MMS" msgstr "SMS" #: ../gnokii/gnokii-mms.c:113 ../gnokii/gnokii-mms.c:201 #: ../gnokii/gnokii-mms.c:243 ../gnokii/gnokii-sms.c:486 #: ../gnokii/gnokii-sms.c:658 ../gnokii/gnokii-sms.c:884 #: ../gnokii/gnokii-sms.c:936 #, c-format msgid "Unknown memory type %s (use ME, SM, IN, OU, ...)!\n" msgstr "Okänd minnestyp %s (använd ME, SM, IN, OU, ...)!\n" #: ../gnokii/gnokii-mms.c:114 ../gnokii/gnokii-mms.c:202 #: ../gnokii/gnokii-mms.c:244 ../gnokii/gnokii-sms.c:487 #: ../gnokii/gnokii-sms.c:659 ../gnokii/gnokii-sms.c:885 #: ../gnokii/gnokii-sms.c:937 #, c-format msgid "" "Run gnokii --showsmsfolderstatus for a list of supported memory types.\n" msgstr "" #: ../gnokii/gnokii-mms.c:150 ../gnokii/gnokii-sms.c:715 #, c-format msgid "Saving into %s\n" msgstr "Sparar till %s\n" #: ../gnokii/gnokii-mms.c:187 ../gnokii/gnokii-sms.c:876 #, c-format msgid "(delete failed)\n" msgstr "(borttagning misslyckad)\n" #: ../gnokii/gnokii-mms.c:189 ../gnokii/gnokii-sms.c:878 #, c-format msgid "(message deleted)\n" msgstr "(meddelande borttaget)\n" #: ../gnokii/gnokii-mms.c:199 #, fuzzy, c-format msgid "Getting MMS failed (location %d from memory %s)! (%s)\n" msgstr "Fel vid läsning frÃ¥n platsen %d i minnet %s\n" #: ../gnokii/gnokii-mms.c:219 #, fuzzy, c-format msgid "" " usage: --deletemms memory start [end] deletes messages from memory type\n" " (SM, ME, IN, OU, ...) starting\n" " from location start and ending with " "end;\n" " if end option is omitted, just one " "entry\n" " is removed;\n" " if 'end' is used entries are being " "removed\n" " until empty location\n" "\n" msgstr "" " användning: --deletesms minne start [end] tar bort meddelanden frÃ¥n " "minnestyp\n" " (SM, ME, IN, OU, ...) startar\n" " frÃ¥n platsen start och slutar med " "slut;\n" " om slutet inte anges kommer endast en " "post\n" " att tas bort;\n" " om \"end\" används kommer poster fram " "till första lediga\n" " plats att tas bort\n" "\n" #: ../gnokii/gnokii-mms.c:262 #, fuzzy, c-format msgid "Deleted MMS (location %d from memory %s)\n" msgstr "Fel vid läsning frÃ¥n platsen %d i minnet %s\n" #: ../gnokii/gnokii-mms.c:266 #, fuzzy, c-format msgid "Deleting MMS failed (location %d from memory %s)! (%s)\n" msgstr "Fel vid läsning frÃ¥n platsen %d i minnet %s\n" #: ../gnokii/gnokii-monitor.c:67 #, c-format msgid "" "Monitoring options:\n" " --monitor [delay|once]\n" " --getdisplaystatus\n" " --displayoutput\n" " --netmonitor {reset|off|field|devel|next|nr}\n" msgstr "" "Övervakningsflaggor:\n" " --monitor [delay|once]\n" " --getdisplaystatus\n" " --displayoutput\n" " --netmonitor {reset|off|field|devel|next|nr}\n" #: ../gnokii/gnokii-monitor.c:79 #, c-format msgid "INCOMING CALL: ID: %d, Number: %s, Name: \"%s\"\n" msgstr "INKOMMANDE SAMTAL: ID: %d, Nummer: %s, Namn: \"%s\"\n" #: ../gnokii/gnokii-monitor.c:82 #, c-format msgid "CALL %d TERMINATED (LOCAL)\n" msgstr "SAMTAL %d AVSLUTAT (LOKAL)\n" #: ../gnokii/gnokii-monitor.c:85 #, c-format msgid "CALL %d TERMINATED (REMOTE)\n" msgstr "SAMTAL %d AVSLUTAT (FJÄRR)\n" #: ../gnokii/gnokii-monitor.c:88 #, c-format msgid "CALL %d ACCEPTED BY THE REMOTE SIDE\n" msgstr "SAMTAL %d ACCEPTERAD AV FJÄRRSIDAN\n" #: ../gnokii/gnokii-monitor.c:91 #, c-format msgid "CALL %d PLACED ON HOLD\n" msgstr "SAMTAL %d PLACERAD PÃ… VÄNT\n" #: ../gnokii/gnokii-monitor.c:94 #, c-format msgid "CALL %d RETRIEVED FROM HOLD\n" msgstr "SAMTAL %d UPPHÄMTAD FRÃ…N VÄNT\n" #: ../gnokii/gnokii-monitor.c:135 #, c-format msgid "CALL%d: IDLE\n" msgstr "SAMTAL%d: IDLE\n" #: ../gnokii/gnokii-monitor.c:143 msgid "RINGING" msgstr "RINGER" #: ../gnokii/gnokii-monitor.c:147 msgid "DIALING" msgstr "RINGER" #: ../gnokii/gnokii-monitor.c:151 msgid "ESTABLISHED" msgstr "ETABLERAD" #: ../gnokii/gnokii-monitor.c:155 msgid "ON HOLD" msgstr "PÃ… VÄNT" #: ../gnokii/gnokii-monitor.c:159 msgid "UNKNOWN STATE" msgstr "OKÄND STATUS" #: ../gnokii/gnokii-monitor.c:164 #, fuzzy, c-format msgid "CALL%d: %s %s (%s) (callid: %d, duration: %d sec)\n" msgstr "SAMTAL%d: %s %s(%s) (samtalsid: %d, längd: %d sek)\n" #: ../gnokii/gnokii-monitor.c:182 #, c-format msgid "LAC: %04x (%d), CellID: %08x (%d)\n" msgstr "" #: ../gnokii/gnokii-monitor.c:212 #, fuzzy, c-format msgid "Argument to --monitor delay needs to be positive number\n" msgstr "Argument till --monitor once behöver vara ett positivt tal\n" #: ../gnokii/gnokii-monitor.c:226 #, c-format msgid "Entering monitor mode...\n" msgstr "GÃ¥r in i monitoreringsläget...\n" #: ../gnokii/gnokii-monitor.c:254 #, fuzzy, c-format msgid "Network: %s, %s (%s)\n" msgstr "Nätverk : %s (%s)\n" #: ../gnokii/gnokii-monitor.c:262 #, c-format msgid "RFLevel: %d\n" msgstr "Mottagning: %d\n" #: ../gnokii/gnokii-monitor.c:265 #, c-format msgid "Battery: %d\n" msgstr "Batteri: %d\n" #: ../gnokii/gnokii-monitor.c:268 #, c-format msgid "Power Source: %s\n" msgstr "Strömkälla: %s\n" #: ../gnokii/gnokii-monitor.c:272 #, c-format msgid "SIM: Used %d, Free %d\n" msgstr "SIM: Använt %d, Ledigt %d\n" #: ../gnokii/gnokii-monitor.c:276 #, c-format msgid "Phone: Used %d, Free %d\n" msgstr "Telefon: Använt %d, Ledigt %d\n" #: ../gnokii/gnokii-monitor.c:280 #, c-format msgid "DC: Used %d, Free %d\n" msgstr "DC: Använt %d, Ledigt %d\n" #: ../gnokii/gnokii-monitor.c:284 #, c-format msgid "EN: Used %d, Free %d\n" msgstr "EN: Använt %d, Ledigt %d\n" #: ../gnokii/gnokii-monitor.c:288 #, c-format msgid "FD: Used %d, Free %d\n" msgstr "FD: Använt %d, Ledigt %d\n" #: ../gnokii/gnokii-monitor.c:292 #, c-format msgid "LD: Used %d, Free %d\n" msgstr "LD: Använt %d, Ledigt %d\n" #: ../gnokii/gnokii-monitor.c:296 #, c-format msgid "MC: Used %d, Free %d\n" msgstr "MC: Använt %d, Ledigt %d\n" #: ../gnokii/gnokii-monitor.c:300 #, c-format msgid "ON: Used %d, Free %d\n" msgstr "ON: Använt %d, Ledigt %d\n" #: ../gnokii/gnokii-monitor.c:304 #, c-format msgid "RC: Used %d, Free %d\n" msgstr "RC: Använt %d, Ledigt %d\n" #: ../gnokii/gnokii-monitor.c:307 #, c-format msgid "SMS Messages: Unread %d, Number %d\n" msgstr "SMS-meddelanden: Olästa %d, Nummer %d\n" #: ../gnokii/gnokii-monitor.c:313 #, c-format msgid "Cell broadcast received on channel %d: %s\n" msgstr "Cell-broadcast mottogs pÃ¥ kanal %d: %s\n" #: ../gnokii/gnokii-monitor.c:323 #, c-format msgid "Leaving monitor mode...\n" msgstr "Lämnar monitoreringsläget...\n" #: ../gnokii/gnokii-monitor.c:330 #, c-format msgid "Call in progress: %-3s\n" msgstr "Samtal pÃ¥gÃ¥r: %-3s\n" #: ../gnokii/gnokii-monitor.c:331 ../gnokii/gnokii-monitor.c:333 #: ../gnokii/gnokii-monitor.c:335 ../gnokii/gnokii-monitor.c:337 #: ../gnokii/gnokii-monitor.c:339 ../gnokii/gnokii-monitor.c:341 #: ../gnokii/gnokii-monitor.c:343 ../gnokii/gnokii-monitor.c:345 #: ../gnokii/gnokii-settings.c:200 msgid "on" msgstr "pÃ¥" #: ../gnokii/gnokii-monitor.c:331 ../gnokii/gnokii-monitor.c:333 #: ../gnokii/gnokii-monitor.c:335 ../gnokii/gnokii-monitor.c:337 #: ../gnokii/gnokii-monitor.c:339 ../gnokii/gnokii-monitor.c:341 #: ../gnokii/gnokii-monitor.c:343 ../gnokii/gnokii-monitor.c:345 #: ../gnokii/gnokii-settings.c:200 msgid "off" msgstr "av" #: ../gnokii/gnokii-monitor.c:332 #, c-format msgid "Unknown: %-3s\n" msgstr "Okänd: %-3s\n" #: ../gnokii/gnokii-monitor.c:334 #, c-format msgid "Unread SMS: %-3s\n" msgstr "Olästa SMS: %-3s\n" #: ../gnokii/gnokii-monitor.c:336 #, c-format msgid "Voice call: %-3s\n" msgstr "Röstsamtal: %-3s\n" #: ../gnokii/gnokii-monitor.c:338 #, c-format msgid "Fax call active: %-3s\n" msgstr "Faxsamtal aktivt: %-3s\n" #: ../gnokii/gnokii-monitor.c:340 #, c-format msgid "Data call active: %-3s\n" msgstr "Datasamtal aktivt: %-3s\n" #: ../gnokii/gnokii-monitor.c:342 #, c-format msgid "Keyboard lock: %-3s\n" msgstr "TangentlÃ¥s: %-3s\n" #: ../gnokii/gnokii-monitor.c:344 #, c-format msgid "SMS storage full: %-3s\n" msgstr "SMS-lagringsplats full: %-3s\n" #: ../gnokii/gnokii-monitor.c:430 #, c-format msgid "Entered display monitoring mode...\n" msgstr "GÃ¥r in i skärmmonitoreringsläget...\n" #: ../gnokii/gnokii-monitor.c:447 ../gnokii/gnokii-sms.c:1322 #, c-format msgid "Shutting down\n" msgstr "Stänger av\n" #: ../gnokii/gnokii-monitor.c:449 #, c-format msgid "Leaving display monitor mode...\n" msgstr "GÃ¥r ur skärmmonitoreringsläget...\n" #: ../gnokii/gnokii-monitor.c:490 #, c-format msgid " usage: --netmonitor {reset|off|field|devel|next|nr}\n" msgstr "" #: ../gnokii/gnokii-other.c:59 #, c-format msgid "" "Misc options:\n" " --keysequence\n" " --enterchar\n" " --listnetworks\n" " --getnetworkinfo\n" msgstr "" "Diverse flaggor:\n" " --keysequence\n" " --enterchar\n" " --listnetworks\n" " --getnetworkinfo\n" #: ../gnokii/gnokii-other.c:96 #, c-format msgid "Failed to press key: %s\n" msgstr "Misslyckades med att trycka knapp: %s\n" #: ../gnokii/gnokii-other.c:155 #, c-format msgid "Error entering char: %s\n" msgstr "Fel vid inmatning av tecken: %s\n" #: ../gnokii/gnokii-other.c:169 #, c-format msgid "Network Name\n" msgstr "Nätverksnamn\n" #: ../gnokii/gnokii-other.c:170 #, c-format msgid "-----------------------------------------\n" msgstr "-----------------------------------------\n" #: ../gnokii/gnokii-other.c:172 #, fuzzy, c-format msgid "%-7s %s (%s)\n" msgstr "%-7s %s\n" #: ../gnokii/gnokii-other.c:202 #, c-format msgid "Network : %s (%s)\n" msgstr "Nätverk : %s (%s)\n" #: ../gnokii/gnokii-other.c:205 #, c-format msgid "Network code : %s\n" msgstr "Nätverkskod : %s\n" #: ../gnokii/gnokii-other.c:206 #, fuzzy, c-format msgid "LAC : %04x (%d)\n" msgstr "LAC : %04x\n" #: ../gnokii/gnokii-other.c:207 #, fuzzy, c-format msgid "Cell id : %08x (%d)\n" msgstr "Cell-id : %04x\n" #: ../gnokii/gnokii-phonebook.c:55 #, c-format msgid "" "Phonebook options:\n" " --getphonebook memory_type start_number [end_number|end]\n" " [[-r|--raw]|[-v|--vcard]|[-l|--ldif]]\n" " --writephonebook [[-o|--overwrite]|[-f|--find-free]]\n" " [-m|--memory-type|--memory memory_type]\n" " [-n|--memory-location|--location number]\n" " [[-v|--vcard]|[-l|--ldif]]\n" " --deletephonebook memory_type start_number [end_number|end]\n" msgstr "" "Flaggor för telefonbok:\n" " --getphonebook minnestyp startnummer [slutnummer|end]\n" " [[-r|--raw]|[-v|--vcard]|[-l|--ldif]]\n" " --writephonebook [[-o|--overwrite]|[-f|--find-free]]\n" " [-m|--memory-type|--memory minnestyp]\n" " [-n|--memory-location|--location nummer]\n" " [[-v|--vcard]|[-l|--ldif]]\n" " --deletephonebook minnestyp startnummer [slutnummer|end]\n" #: ../gnokii/gnokii-phonebook.c:68 #, c-format msgid "" " usage: --getphonebook memory start [end] reads phonebook entries from " "memory type\n" " (SM, ME, IN, OU, ...) messages " "starting\n" " from location start and ending with " "end;\n" " if end option is omitted, just one " "entry\n" " is read;\n" " if 'end' is used all entries are " "read\n" " -r\n" " --raw output in raw form (comma " "separated)\n" " -v\n" " --vcard output in vcard format\n" " -l\n" " --ldif output in ldif format\n" "\n" msgstr "" " användning: --getphonebook minne start [end] läser telefonboksposter frÃ¥n " "minnestyp\n" " (SM, ME, IN, OU, ...) meddelanden " "som börjar\n" " med startnummer och slutar med " "end;\n" " om flaggan end utelämnas kommer " "endast en post\n" " att läsas;\n" " om \"end\" används kommer alla " "poster att läsas\n" " -r\n" " --raw skriv ut i rÃ¥tt format " "(kommateckenseparerat)\n" " -v\n" " --vcard skriv ut i vcard-format\n" " -l\n" " --ldif skriv ut i ldif-format\n" "\n" #: ../gnokii/gnokii-phonebook.c:187 #, fuzzy, c-format msgid "%d. %s: %s\n" msgstr "%d. Namn: %s\n" #: ../gnokii/gnokii-phonebook.c:199 #, fuzzy msgid "Caller group" msgstr "Samtalsgrupper" #: ../gnokii/gnokii-phonebook.c:208 #, fuzzy, c-format msgid "Address information:\n" msgstr "Telefoninformation" #: ../gnokii/gnokii-phonebook.c:210 ../gnokii/gnokii-phonebook.c:212 #: ../gnokii/gnokii-phonebook.c:214 ../gnokii/gnokii-phonebook.c:216 #: ../gnokii/gnokii-phonebook.c:218 ../gnokii/gnokii-phonebook.c:220 #: ../gnokii/gnokii-phonebook.c:222 #, fuzzy, c-format msgid " %s: %s\n" msgstr " IP: %s\n" #: ../gnokii/gnokii-phonebook.c:210 #, fuzzy msgid "Post office address" msgstr "Postadress" #: ../gnokii/gnokii-phonebook.c:233 #, c-format msgid "%04u.%02u.%02u %02u:%02u:%02u" msgstr "%04u.%02u.%02u %02u:%02u:%02u" #: ../gnokii/gnokii-phonebook.c:247 #, c-format msgid "Date: %04u.%02u.%02u %02u:%02u:%02u\n" msgstr "Datum: %04u.%02u.%02u %02u:%02u:%02u\n" #: ../gnokii/gnokii-phonebook.c:252 #, c-format msgid "Empty memory location. Skipping.\n" msgstr "Tom minnesplats. Hoppar över.\n" #: ../gnokii/gnokii-phonebook.c:255 #, c-format msgid "Error reading from the location %d in memory %s\n" msgstr "Fel vid läsning frÃ¥n platsen %d i minnet %s\n" #: ../gnokii/gnokii-phonebook.c:272 #, c-format msgid "" " usage: --writephonebook [[-o|--overwrite]|[-f|--find-free]]\n" " [-m|--memory-type|--memory memory_type]\n" " [-n|--memory-location|--location number]\n" " [[-v|--vcard]|[-l|--ldif]]\n" "\n" msgstr "" " användning: --writephonebook [[-o|--overwrite]|[-f|--find-free]]\n" " [-m|--memory-type|--memory minnestyp]\n" " [-n|--memory-location|--location nummer]\n" " [[-v|--vcard]|[-l|--ldif]]\n" "\n" #: ../gnokii/gnokii-phonebook.c:416 #, c-format msgid "Location busy. " msgstr "Mottagaren upptagen. " #: ../gnokii/gnokii-phonebook.c:419 ../gnokii/gnokii-sms.c:540 #: ../gnokii/gnokii-sms.c:831 ../gnokii/gnokii-utils.c:61 #, c-format msgid "Overwrite? (yes/no) " msgstr "Skriva över? (ja/nej) " #: ../gnokii/gnokii-phonebook.c:423 ../gnokii/gnokii-sms.c:543 #: ../gnokii/gnokii-utils.c:65 ../gnokii/gnokii-wap.c:223 msgid "no" msgstr "nej" #: ../gnokii/gnokii-phonebook.c:426 #, c-format msgid "" "\n" "Incorrect answer [%s]. Assuming 'no'.\n" msgstr "" "\n" "Felaktigt svar [%s]. Antar \"nej\".\n" #: ../gnokii/gnokii-phonebook.c:446 #, c-format msgid "Write Succeeded: memory type: %s, loc: %d, name: %s, number: %s\n" msgstr "Skrivning lyckades: minnestyp: %s, plats: %d, namn: %s, nummer: %s\n" #: ../gnokii/gnokii-phonebook.c:453 ../gnokii/gnokii-phonebook.c:458 #, fuzzy, c-format msgid "Write failed (%s): memory type: %s, loc: %d, name: %s, number: %s\n" msgstr "" "Skrivning MISSLYCKADES (%s): minnestyp: %s, plats: %d, namn: %s, nummer: %s\n" #: ../gnokii/gnokii-phonebook.c:466 #, c-format msgid "" " usage: --deletephonebook memory_type start_number [end_number|end]\n" "\n" msgstr "" " användning: --deletephonebook minnestyp startnummer [slutnummer|end]\n" "\n" #: ../gnokii/gnokii-phonebook.c:505 #, c-format msgid "Phonebook entry removed: memory type: %s, loc: %d\n" msgstr "Kontaktpost borttagen: minnestyp: %s, plats: %d\n" #: ../gnokii/gnokii-phonebook.c:512 #, c-format msgid "Phonebook entry removal FAILED (%s): memory type: %s, loc: %d\n" msgstr "" "Borttagning av post i Kontakter MISSLYCKADES (%s): minnestyp: %s, plats: %d\n" #: ../gnokii/gnokii-profile.c:55 #, c-format msgid "" "Profile options:\n" " --getprofile [start_number [end_number]] [-r|--raw]\n" " --setprofile\n" " --getactiveprofile\n" " --setactiveprofile profile_number\n" msgstr "" "Profilflaggor:\n" " --getprofile [startnummer [slutnummer]] [-r|--raw]\n" " --setprofile\n" " --getactiveprofile\n" " --setactiveprofile profilnummer\n" #: ../gnokii/gnokii-profile.c:65 #, fuzzy, c-format msgid " usage: --getprofile [start_number [end_number]] [-r|--raw]\n" msgstr "användning: --getprofile [startnummer [slutnummer]] [-r|--raw]\n" #: ../gnokii/gnokii-profile.c:133 #, c-format msgid "Starting profile number is greater than stop\n" msgstr "Startnummer för profil är större än slutnumret\n" #: ../gnokii/gnokii-profile.c:138 #, c-format msgid "Profile number must be value from 0 to %d!\n" msgstr "Profilnumret mÃ¥ste vara ett värde frÃ¥n 0 till %d!\n" #: ../gnokii/gnokii-profile.c:143 #, c-format msgid "This phone supports only %d profiles!\n" msgstr "Denna telefon stöder bara %d profiler!\n" #: ../gnokii/gnokii-profile.c:161 ../gnokii/gnokii-profile.c:254 #, c-format msgid "Cannot get profile %d\n" msgstr "Kan inte hämta profilen %d\n" #. Translators: %d is the profile number, %s is the profile name. Example: 1. "Outdoors" #: ../gnokii/gnokii-profile.c:175 #, fuzzy, c-format msgid "%d. \"%s\"\n" msgstr "%d. Namn: %s\n" #: ../gnokii/gnokii-profile.c:176 #, c-format msgid " (name defined)\n" msgstr " (namn definierat)\n" #: ../gnokii/gnokii-profile.c:177 #, c-format msgid "Incoming call alert: %s\n" msgstr "Inkommande samtalslarm: %s\n" #: ../gnokii/gnokii-profile.c:178 #, c-format msgid "Ringing tone: %s (%d)\n" msgstr "Ringsignal: %s (%d)\n" #: ../gnokii/gnokii-profile.c:179 #, c-format msgid "Ringing volume: %s\n" msgstr "Ringvolym: %s\n" #: ../gnokii/gnokii-profile.c:180 #, c-format msgid "Message alert tone: %s\n" msgstr "Larmsignal för meddelande: %s\n" #: ../gnokii/gnokii-profile.c:181 #, c-format msgid "Keypad tones: %s\n" msgstr "Knappsignaler: %s\n" #: ../gnokii/gnokii-profile.c:182 #, c-format msgid "Warning and game tones: %s\n" msgstr "Varnings- och spelsignaler: %s\n" #. FIXME: Light settings is only used for Car #: ../gnokii/gnokii-profile.c:185 #, c-format msgid "Lights: %s\n" msgstr "Ljus: %s\n" #: ../gnokii/gnokii-profile.c:186 #, c-format msgid "Vibration: %s\n" msgstr "Vibration: %s\n" #. FIXME: it will be nice to add here reading caller group name. #: ../gnokii/gnokii-profile.c:189 #, c-format msgid "Caller groups: 0x%02x\n" msgstr "Ringgrupper: 0x%02x\n" #. FIXME: Automatic answer is only used for Car and Headset. #: ../gnokii/gnokii-profile.c:192 #, c-format msgid "Automatic answer: %s\n" msgstr "Automatiskt svar: %s\n" #: ../gnokii/gnokii-profile.c:223 ../gnokii/gnokii-sms.c:1120 #: ../gnokii/gnokii-wap.c:285 #, c-format msgid "Input line format isn't valid\n" msgstr "Format pÃ¥ inmatningsraden är ogiltig\n" #: ../gnokii/gnokii-profile.c:229 #, c-format msgid "Cannot set profile: %s\n" msgstr "Kan inte ställa in profil: %s\n" #: ../gnokii/gnokii-profile.c:248 #, c-format msgid "Cannot get active profile: %s\n" msgstr "Kan inte hämta aktiv profil: %s\n" #: ../gnokii/gnokii-profile.c:256 #, c-format msgid "Active profile: %d (%s)\n" msgstr "Aktiv profil: %d (%s)\n" #: ../gnokii/gnokii-profile.c:263 #, fuzzy, c-format msgid " usage: --setactiveprofile profile_number\n" msgstr "användning: --setactiveprofile profilnummer\n" #: ../gnokii/gnokii-profile.c:281 #, c-format msgid "Cannot set active profile to %d: %s\n" msgstr "Kan inte ställa in aktiv profil till %d: %s\n" #: ../gnokii/gnokii-ringtone.c:96 #, c-format msgid "" "Ringtone options:\n" " --sendringtone rtttlfile destination\n" " --getringtone rtttlfile [location] [-r|--raw]\n" " --setringtone rtttlfile [location] [-r|--raw] [--name name]\n" " --playringtone rtttlfile [--volume vol]\n" " --ringtoneconvert source destination\n" " --getringtonelist\n" " --deleteringtone start [end]\n" msgstr "" "Ringsignalsflaggor:\n" " --sendringtone rtttlfile destination\n" " --getringtone rtttlfile [plats] [-r|--raw]\n" " --setringtone rtttlfile [plats] [-r|--raw] [--name namn]\n" " --playringtone rtttlfile [--volume vol]\n" " --ringtoneconvert källa destination\n" " --getringtonelist\n" " --deleteringtone start [slut]\n" #: ../gnokii/gnokii-ringtone.c:117 ../gnokii/gnokii-ringtone.c:392 #: ../gnokii/gnokii-ringtone.c:447 #, c-format msgid "Failed to load ringtone: %s\n" msgstr "Misslyckades med att läsa in ringsignal: %s\n" #: ../gnokii/gnokii-ringtone.c:162 #, c-format msgid " usage: --getringtone rtttlfile [location] [-r|--raw]\n" msgstr " användning: --getringtone rtttlfile [plats] [-r|--raw]\n" #: ../gnokii/gnokii-ringtone.c:216 #, c-format msgid "Getting ringtone %d failed: %s\n" msgstr "Hämtning av ringsignalen %d misslyckades: %s\n" #: ../gnokii/gnokii-ringtone.c:219 #, c-format msgid "Getting ringtone %d (\"%s\") succeeded!\n" msgstr "Hämtning av ringsignalen %d (\"%s\") lyckades!\n" #: ../gnokii/gnokii-ringtone.c:222 ../gnokii/gnokii-ringtone.c:303 #: ../gnokii/gnokii-ringtone.c:387 #, c-format msgid "Internal gnokii error: null filename\n" msgstr "Internt fel i gnokii: filnamn saknas\n" #: ../gnokii/gnokii-ringtone.c:231 #, c-format msgid "Failed to save ringtone.\n" msgstr "Misslyckades med att spara ringsignal.\n" #: ../gnokii/gnokii-ringtone.c:236 #, fuzzy, c-format msgid "Failed to write ringtone.\n" msgstr "Misslyckades med att spara ringsignal.\n" #: ../gnokii/gnokii-ringtone.c:242 ../gnokii/gnokii-ringtone.c:451 #, c-format msgid "Failed to save ringtone: %s\n" msgstr "Misslyckades med att spara ringsignal: %s\n" #: ../gnokii/gnokii-ringtone.c:252 #, c-format msgid " usage: --setringtone rtttlfile [location] [-r|--raw] [--name name]\n" msgstr "" " användning: --setringtone rtttlfile [plats] [-r|--raw] [--name namn]\n" #: ../gnokii/gnokii-ringtone.c:311 ../gnokii/gnokii-ringtone.c:324 #, c-format msgid "Failed to load ringtone.\n" msgstr "Misslyckades med att läsa in ringsignal.\n" #: ../gnokii/gnokii-ringtone.c:333 #, c-format msgid "Send succeeded!\n" msgstr "Sändning lyckades!\n" #: ../gnokii/gnokii-ringtone.c:335 #, c-format msgid "Send failed: %s\n" msgstr "Sändning misslyckades: %s\n" #: ../gnokii/gnokii-ringtone.c:342 #, fuzzy, c-format msgid " usage: --playringtone rtttlfile [-v|--volume vol]\n" msgstr " användning: --playringtone rtttlfile [--volume volym]\n" #: ../gnokii/gnokii-ringtone.c:424 #, c-format msgid "Play succeeded!\n" msgstr "Uppspelnings lyckades!\n" #: ../gnokii/gnokii-ringtone.c:426 #, c-format msgid "Play failed: %s\n" msgstr "Uppspelnings misslyckades: %s\n" #: ../gnokii/gnokii-ringtone.c:433 #, c-format msgid " usage: --ringtoneconvert source destination\n" msgstr " användning: --ringtoneconvert källa mÃ¥l\n" #: ../gnokii/gnokii-ringtone.c:455 #, c-format msgid "%d note(s) converted.\n" msgstr "%d anteckning(ar) konverterade.\n" #: ../gnokii/gnokii-ringtone.c:467 #, c-format msgid "Failed to get the list of ringtones\n" msgstr "Misslyckades med att hämta lista över ringsignaler\n" #: ../gnokii/gnokii-ringtone.c:471 #, c-format msgid "First user defined ringtone location: %3d\n" msgstr "Plats för första användardefinierade ringsignalen: %3d\n" #: ../gnokii/gnokii-ringtone.c:472 #, c-format msgid "" "Number of user defined ringtones: %d\n" "\n" msgstr "" "Antal användardefinierade ringsignaler: %d\n" "\n" #: ../gnokii/gnokii-ringtone.c:473 #, c-format msgid "loc rwu name\n" msgstr "plat rwu namn\n" #: ../gnokii/gnokii-ringtone.c:474 #, c-format msgid "===============================\n" msgstr "===============================\n" #: ../gnokii/gnokii-ringtone.c:476 #, c-format msgid "%3d %d%d%d %-20s\n" msgstr "%3d %d%d%d %-20s\n" #: ../gnokii/gnokii-ringtone.c:488 #, c-format msgid " usage: --deleteringtone start [end]\n" msgstr " användning: --deleteringtone start [slut]\n" #: ../gnokii/gnokii-ringtone.c:512 #, c-format msgid "Ringtone %d deleted\n" msgstr "Ringsignalen %d borttagen\n" #: ../gnokii/gnokii-ringtone.c:514 #, c-format msgid "Failed to delete ringtone %d: %s\n" msgstr "Misslyckades med att ta bort ringsignal %d: %s\n" #: ../gnokii/gnokii-security.c:59 #, c-format msgid "" "Security options:\n" " --identify\n" " --getlocksinfo\n" msgstr "" "Säkerhetsflaggor:\n" " --identify\n" " --getlocksinfo\n" #: ../gnokii/gnokii-security.c:65 #, fuzzy, c-format msgid "" " --entersecuritycode PIN|PIN2|PUK|PUK2|SEC [COMMAND]\n" " --getsecuritycodestatus\n" " --getsecuritycode\n" " --changesecuritycode PIN|PIN2|PUK|PUK2\n" msgstr "" " --entersecuritycode PIN|PIN2|PUK|PUK2\n" " --getsecuritycodestatus\n" " --getsecuritycode\n" " --changesecuritycode PIN|PIN2|PUK|PUK2\n" #: ../gnokii/gnokii-security.c:75 #, c-format msgid "IMEI : %s\n" msgstr "IMEI : %s\n" #: ../gnokii/gnokii-security.c:76 #, c-format msgid "Manufacturer : %s\n" msgstr "Tillverkare : %s\n" #: ../gnokii/gnokii-security.c:77 #, c-format msgid "Model : %s\n" msgstr "Modell : %s\n" #: ../gnokii/gnokii-security.c:78 #, c-format msgid "Product name : %s\n" msgstr "Produktnamn : %s\n" #: ../gnokii/gnokii-security.c:79 #, c-format msgid "Revision : %s\n" msgstr "Revision : %s\n" #: ../gnokii/gnokii-security.c:100 #, c-format msgid "%7s : %10s, %7s, %6s, counter %d\n" msgstr "%7s : %10s, %7s, %6s, räknare %d\n" #: ../gnokii/gnokii-security.c:120 #, c-format msgid "Getting security code... \n" msgstr "Hämtar säkerhetskod... \n" #: ../gnokii/gnokii-security.c:124 #, c-format msgid "Security code is: %s\n" msgstr "Säkerhetskod är: %s\n" #: ../gnokii/gnokii-security.c:168 #, fuzzy, c-format msgid " usage: --entersecuritycode PIN|PIN2|PUK|PUK2|SEC\n" msgstr " användning: --entersecuritycode PIN|PIN2|PUK|PUK2\n" #: ../gnokii/gnokii-security.c:193 ../gnokii/gnokii-security.c:281 msgid "Enter your code: " msgstr "Ange din kod: " #: ../gnokii/gnokii-security.c:202 #, c-format msgid "Code ok.\n" msgstr "Kod ok.\n" #: ../gnokii/gnokii-security.c:221 #, c-format msgid "Security code status: " msgstr "Status för säkerhetskod: " #: ../gnokii/gnokii-security.c:225 #, c-format msgid "waiting for Security Code.\n" msgstr "väntar pÃ¥ säkerhetskod.\n" #: ../gnokii/gnokii-security.c:228 #, c-format msgid "waiting for PIN.\n" msgstr "väntar pÃ¥ PIN.\n" #: ../gnokii/gnokii-security.c:231 #, c-format msgid "waiting for PIN2.\n" msgstr "väntar pÃ¥ PIN2.\n" #: ../gnokii/gnokii-security.c:234 #, c-format msgid "waiting for PUK.\n" msgstr "väntar pÃ¥ PUK.\n" #: ../gnokii/gnokii-security.c:237 #, c-format msgid "waiting for PUK2.\n" msgstr "väntar pÃ¥ PUK2.\n" #: ../gnokii/gnokii-security.c:240 #, c-format msgid "nothing to enter.\n" msgstr "inget att ange.\n" #: ../gnokii/gnokii-security.c:243 #, c-format msgid "unknown\n" msgstr "okänd\n" #: ../gnokii/gnokii-security.c:254 #, c-format msgid " usage: --changesecuritycode PIN|PIN2|PUK|PUK2\n" msgstr " användning: --changesecuritycode PIN|PIN2|PUK|PUK2\n" #: ../gnokii/gnokii-security.c:282 msgid "Enter new code: " msgstr "Ange ny kod: " #: ../gnokii/gnokii-security.c:283 msgid "Retype new code: " msgstr "Ange koden igen: " #: ../gnokii/gnokii-security.c:285 #, fuzzy, c-format msgid "Error: new code differs\n" msgstr "Fel: ny kod stämmer inte\n" #: ../gnokii/gnokii-security.c:295 #, c-format msgid "Code changed.\n" msgstr "Kod ändrad.\n" #: ../gnokii/gnokii-settings.c:56 #, c-format msgid "" "Phone settings:\n" " --reset [soft|hard]\n" " --setdatetime [YYYY [MM [DD [HH [MM]]]]]\n" " --getdatetime\n" " --setalarm [HH MM]\n" " --getalarm\n" msgstr "" "Telefoninställningar:\n" " --reset [soft|hard]\n" " --setdatetime [YYYY [MM [DD [HH [MM]]]]]\n" " --getdatetime\n" " --setalarm [HH MM]\n" " --getalarm\n" #: ../gnokii/gnokii-settings.c:142 #, c-format msgid "Date: %4d/%02d/%02d\n" msgstr "Datum: %4d/%02d/%02d\n" #: ../gnokii/gnokii-settings.c:143 #, c-format msgid "Time: %02d:%02d:%02d\n" msgstr "Tid: %02d:%02d:%02d\n" #: ../gnokii/gnokii-settings.c:200 #, c-format msgid "Alarm: %s\n" msgstr "Alarm: %s\n" #: ../gnokii/gnokii-settings.c:201 #, c-format msgid "Time: %02d:%02d\n" msgstr "Tid: %02d:%02d\n" #: ../gnokii/gnokii-settings.c:223 #, c-format msgid "What kind of reset do you want??\n" msgstr "Vilken typ av Ã¥terställning vill du göra??\n" #: ../gnokii/gnokii-sms.c:63 #, fuzzy, c-format msgid "" "SMS options:\n" " --sendsms destination [--smsc message_center_number |\n" " --smscno message_center_index] [-r|--report] [-8|--8bit]\n" " [-C|--class n] [-v|--validity n]\n" " [-i|--imelody] [-a|--animation file;file;file;file]\n" " [-o|--concat this;total;serial] [-w|--wappush url]\n" " --savesms [--sender from] [--smsc message_center_number |\n" " --smscno message_center_index] [-f|--folder folder_id]\n" " [-l|--location number] [-s|--sent|-r|--read] [-d|--" "deliver]\n" " [-t|--datetime YYMMDDHHMMSS]\n" " --getsms memory_type start [end] [-f|--file file]\n" " [-F|--force-file file] [-a|--append-file file]\n" " [-d|--delete]\n" " --deletesms memory_type start [end]\n" " --getsmsc [start_number [end_number]] [-r|--raw]\n" " --setsmsc\n" " --createsmsfolder name\n" " --deletesmsfolder folderid\n" " --showsmsfolderstatus\n" " --smsreader\n" msgstr "" "SMS-flaggor:\n" " --sendsms destination [--smsc nummer_till_meddelandecenter |\n" " --smscno meddelandecenterindex] [-r|--report] [-8|--8bit]\n" " [-C|--class n] [-v|--validity n] [-l|--long n]\n" " [-i|--imelody] [-a|--animation fil;fil;fil;fil]\n" " [-o|--concat this;total;serial] [-w|--wappush url]\n" " --savesms [--sender frÃ¥n] [--smsc nummer_till_meddelandecenter |\n" " --smscno meddelandecenterindex] [-f|--folder mapp-id]\n" " [-l|--location nummer] [-s|--sent|-r|--read] [-d|--" "deliver]\n" " [-t|--datetime YYMMDDHHMMSS]\n" " --getsms minnestyp start [end] [-f|--file fil]\n" " [-F|--force-file fil] [-d|--delete]\n" " --deletesms minnestyp start [end]\n" " --getsmsc [startnummer [slutnummer]] [-r|--raw]\n" " --setsmsc\n" " --createsmsfolder namn\n" " --deletesmsfolder mapp-id\n" " --showsmsfolderstatus\n" " --smsreader\n" #: ../gnokii/gnokii-sms.c:88 #, fuzzy, c-format msgid "" " usage: --sendsms destination recipient number (msisdn)\n" " --smsc message_center_number number (msisdn) of the message\n" " center\n" " --smscno message_center_index index of the message center " "stored\n" " in the phone memory\n" " -r\n" " --report request delivery report\n" " -v n\n" " --validity n set message validity\n" " -C n\n" " --class n set message class; possible " "values\n" " are 0, 1, 2, or 3\n" " -8\n" " --8bit set 8bit coding\n" " -i\n" " --imelody send imelody message, text is " "read\n" " from stdin\n" " -a file;file;file;file\n" " --animation file;file;file;file send animation message\n" " -o this;total;serial\n" " --concat this;total;serial send 'this' part of all 'total' " "parts\n" " identified by 'serial'\n" " -w url\n" " --wappush url send wappush to the given url\n" "Message text is read from standard input.\n" "\n" msgstr "" " användning: --sendsms destination mottagarnummer (msisdn)\n" " --smsc nummer_till_meddelandecenter nummer (msisdn) till " "meddelande-\n" " centret\n" " --smscno meddelandecenterindex index för lagrat " "meddelandecenter\n" " i telefonminnet\n" " -l n\n" " --long n skicka meddelanden längre än " "standarden pÃ¥\n" " 160 tecken\n" " -r\n" " --report begär leveransrapport\n" " -v n\n" " --validity n ställ in meddelandets giltighet\n" " -C n\n" " --class n ställ in meddelandeklass; " "möjliga värden\n" " är 0, 1, 2, eller 3\n" " -8\n" " --8bit ställ in teckenkodning till 8 " "bitar\n" " -i\n" " --imelody skicka imelody-meddelande, texten " "läses\n" " in frÃ¥n standard in\n" " -a fil;fil;fil;fil\n" " --animation fil;fil;fil;fil skicka animerat meddelande\n" " -o this;total;serial\n" " --concat this;total;serial skicka 'this'-delen av alla " "'total'-delar\n" " identifierad av 'serial'\n" " -w url\n" " --wappush url skicka wappush till angiven url\n" "Meddelandetexten läses in frÃ¥n standard in.\n" "\n" #: ../gnokii/gnokii-sms.c:220 #, c-format msgid "Incorrect --concat option\n" msgstr "Felaktig flagga --concat\n" #: ../gnokii/gnokii-sms.c:267 ../gnokii/gnokii-sms.c:574 #, c-format msgid "Empty message. Quitting.\n" msgstr "Tomt meddelande. Avslutar.\n" #: ../gnokii/gnokii-sms.c:278 #, c-format msgid "URL is too long (max 255 chars). Quitting.\n" msgstr "URL är för lÃ¥ng (max 255 tecken). Avslutar.\n" #: ../gnokii/gnokii-sms.c:287 ../gnokii/gnokii-utils.c:139 #, fuzzy, c-format msgid "Please enter SMS text. End your input with :\n" msgstr "Ange SMS-text. Avsluta inmatning med :" #: ../gnokii/gnokii-sms.c:294 #, c-format msgid "WAP Push encoding failed!\n" msgstr "Kodning av WAP Push misslyckades!\n" #: ../gnokii/gnokii-sms.c:329 #, c-format msgid "" "Cannot read the SMSC number from your phone. If the sms send will fail, " "please use --smsc option explicitely giving the number.\n" msgstr "" "Kunde inte läsa av SMSC-numret frÃ¥n din telefon. Om sändning av SMS " "misslyckas, vänligen använd flaggan --smsc och ange numret.\n" #: ../gnokii/gnokii-sms.c:368 #, c-format msgid "" " usage: --savesms\n" " --smsc message_center_number number (msisdn) of the message\n" " center\n" " --smscno message_center_index index of the message center stored\n" " in the phone memory\n" " --sender msisdn set sender number\n" " -l n\n" " --location n save message at location n\n" " -r\n" " --read mark message as read\n" " -s\n" " --sent mark message as sent\n" " -f ID\n" " --folder ID save message to the folder ID where\n" " is of type IN, OU...\n" " -d\n" " --deliver set message type as sms deliver\n" " (to be sent)\n" " -t YYMMDDHHMISS\n" " --datetime YYMMDDHHMISS set date and time of message " "delivery\n" "Message text is read from standard input.\n" "\n" msgstr "" " användning: --savesms\n" " --smsc nummer_till_meddelandecenter nummer (msisdn) för " "meddelande-\n" " centret\n" " --smscno meddelandecenterindex index för lagrat meddelandecenter\n" " i telefonminnet\n" " --sender msisdn ställ in avsändande nummer\n" " -l n\n" " --location n spara meddelandet pÃ¥ plats n\n" " -r\n" " --read markera meddelandet som läst\n" " -s\n" " --sent markera meddelandet som skickat\n" " -f ID\n" " --folder ID spara meddelandet till mapp-id som\n" " är av typen IN, OU...\n" " -d\n" " --deliver ställ in meddelandetyp som sms " "deliver\n" " (kommer att skickas)\n" " -t YYMMDDHHMISS\n" " --datetime YYMMDDHHMISS ställ in datum och tid för " "meddelande-\n" " leverans.\n" "Meddelandetexten läses in frÃ¥n standard in.\n" "\n" #: ../gnokii/gnokii-sms.c:496 ../gnokii/gnokii-sms.c:501 #, c-format msgid "Invalid datetime format: %s (should be YYMMDDHHMISS, all digits)!\n" msgstr "" "Ogiltigt format för datum/tid: %s (ska vara YYMMDDHHMISS, bara siffror)!\n" #: ../gnokii/gnokii-sms.c:517 #, c-format msgid "Invalid datetime: %s.\n" msgstr "Ogiltigt datum/tid: %s.\n" #: ../gnokii/gnokii-sms.c:538 #, c-format msgid "Message at specified location exists. " msgstr "Meddelande pÃ¥ angiven plats existerar. " #: ../gnokii/gnokii-sms.c:585 #, c-format msgid "Storing SMS... " msgstr "Lagrar SMS... " #: ../gnokii/gnokii-sms.c:591 #, c-format msgid "Saved to %d!\n" msgstr "Sparad till %d!\n" #: ../gnokii/gnokii-sms.c:593 #, c-format msgid "Saving failed (%s)\n" msgstr "Lagring misslyckades (%s)\n" #: ../gnokii/gnokii-sms.c:601 #, fuzzy, c-format msgid "" " usage: --getsms memory start [end] retrieves messages from memory type " "(SM, ME,\n" " IN, OU, ...) starting from\n" " location start and ending with end;\n" " if end option is omitted, just one " "entry\n" " is read;\n" " start must be a number, end may be a " "number\n" " or 'end' string;\n" " if 'end' is used entries are being read\n" " until empty location\n" " --force-file filename\n" " -F filename save sms to the file overwriting it if\n" " the file already exists;\n" " file is in mbox format\n" " --file filename\n" " -f filename as above but user is prompted before\n" " overwriting the file\n" " --append-file filename\n" " -a filename as above but append to the existing " "file\n" " --delete\n" " -d delete message after reading\n" "\n" msgstr "" " användning: --getsms minne start [end] hämtar meddelanden frÃ¥n minnestyp " "(SM, ME,\n" " IN, OU, ...) startar frÃ¥n\n" " platsen start och slutar med slut;\n" " om flaggan end utesluts kommer endast en " "post\n" " att läsas;\n" " start mÃ¥ste vara ett tal, slut kan vara " "ett tal eller\n" " strängen \"end\";\n" " om \"end\" används kommer poster att " "läsas in\n" " tills första lediga platsen\n" " --force-file filnamn\n" " -F filnamn spara sms till filen och skriv över den " "om\n" " den redan finns;\n" " om flera sms läses in kommer en " "meddelande-\n" " identifierare att läggas till i " "filnamnet\n" " --file filnamn\n" " -f filnamn som ovan men användaren frÃ¥gas innan\n" " filen skrivs över\n" " --delete\n" " -d ta bort meddelande efter läsning\n" "\n" #: ../gnokii/gnokii-sms.c:752 #, c-format msgid "Sending date/time: %02d/%02d/%04d %02d:%02d:%02d " msgstr "Sänding datum/tid: %02d/%02d/%04d %02d:%02d:%02d " #. Translators: this format is for printing a timezone with a leading +/- #: ../gnokii/gnokii-sms.c:757 ../gnokii/gnokii-sms.c:765 #: ../gnokii/gnokii-sms.c:779 ../gnokii/gnokii-sms.c:794 #, c-format msgid "%+03d00" msgstr "" #: ../gnokii/gnokii-sms.c:760 #, fuzzy, c-format msgid "Delivery date/time: %02d/%02d/%04d %02d:%02d:%02d " msgstr "Datum/tid: %02d/%02d/%04d %02d:%02d:%02d " #: ../gnokii/gnokii-sms.c:768 ../gnokii/gnokii-sms.c:800 #, fuzzy, c-format msgid "Recipient: %s Msg Center: %s\n" msgstr "Mottagare: %s SMS-center: %s\n" #: ../gnokii/gnokii-sms.c:769 ../gnokii/gnokii-sms.c:785 #, c-format msgid "Text:\n" msgstr "Text:\n" #: ../gnokii/gnokii-sms.c:774 ../gnokii/gnokii-sms.c:789 #, c-format msgid "Date/time: %02d/%02d/%04d %02d:%02d:%02d " msgstr "Datum/tid: %02d/%02d/%04d %02d:%02d:%02d " #: ../gnokii/gnokii-sms.c:782 ../gnokii/gnokii-sms.c:803 #, c-format msgid "Sender: %s Msg Center: %s\n" msgstr "Avsändare: %s SMS-center: %s\n" #: ../gnokii/gnokii-sms.c:783 #, c-format msgid "Bitmap:\n" msgstr "Bild:\n" #: ../gnokii/gnokii-sms.c:809 #, fuzzy, c-format msgid "%s:\n" msgstr "%s\n" #: ../gnokii/gnokii-sms.c:814 #, c-format msgid "GSM operator logo for %s (%s) network.\n" msgstr "GSM-operatörslogotyp för %s (%s) nätverket.\n" #: ../gnokii/gnokii-sms.c:816 #, c-format msgid "Saved by Logo Express\n" msgstr "Sparad av Logo Express\n" #: ../gnokii/gnokii-sms.c:818 #, c-format msgid "Saved by Operator Logo Uploader by Thomas Kessler\n" msgstr "Sparad av Operator Logo Uploader av Thomas Kessler\n" #: ../gnokii/gnokii-sms.c:830 ../gnokii/gnokii-utils.c:59 #, c-format msgid "File %s exists.\n" msgstr "Filen %s existerar.\n" #: ../gnokii/gnokii-sms.c:839 #, c-format msgid "Couldn't save logofile %s!\n" msgstr "Kunde inte spara logotypfil %s!\n" #: ../gnokii/gnokii-sms.c:847 #, c-format msgid "Linked (%d/%d):\n" msgstr "Länkad (%d/%d):\n" #: ../gnokii/gnokii-sms.c:882 #, fuzzy, c-format msgid "Getting SMS failed (location %d from %s memory)! (%s)\n" msgstr "Fel vid läsning frÃ¥n platsen %d i minnet %s\n" #: ../gnokii/gnokii-sms.c:910 #, c-format msgid "" " usage: --deletesms memory start [end] deletes messages from memory type\n" " (SM, ME, IN, OU, ...) starting\n" " from location start and ending with " "end;\n" " if end option is omitted, just one " "entry\n" " is removed;\n" " if 'end' is used entries are being " "removed\n" " until empty location\n" "\n" msgstr "" " användning: --deletesms minne start [end] tar bort meddelanden frÃ¥n " "minnestyp\n" " (SM, ME, IN, OU, ...) startar\n" " frÃ¥n platsen start och slutar med " "slut;\n" " om slutet inte anges kommer endast en " "post\n" " att tas bort;\n" " om \"end\" används kommer poster fram " "till första lediga\n" " plats att tas bort\n" "\n" #: ../gnokii/gnokii-sms.c:957 #, fuzzy, c-format msgid "Deleted SMS (location %d from memory %s)\n" msgstr "Fel vid läsning frÃ¥n platsen %d i minnet %s\n" #: ../gnokii/gnokii-sms.c:961 #, fuzzy, c-format msgid "Deleting SMS failed (location %d from %s memory)! (%s)\n" msgstr "Fel vid läsning frÃ¥n platsen %d i minnet %s\n" #: ../gnokii/gnokii-sms.c:974 #, c-format msgid "" " usage: --getsmsc [start [end]] reads message center details from\n" " the phone starting with start location\n" " and ending with end location;\n" " no end parameter means to read every\n" " location to the end;\n" " no start parameter means to start with\n" " the first location;\n" "-r\n" "--raw output in raw format (comma separated)\n" " default is human readable form\n" "\n" msgstr "" " användning: --getsmsc [start [end]] läser detaljer om " "meddelandecentret frÃ¥n\n" " telfonen med start frÃ¥n startplatsen\n" " och slutar med slutplatsen;\n" " ingen slutparameter betyder att alla " "platser\n" " läses fram tills slutet;\n" " ingen startparameter betyder att " "inläsning sker\n" " frÃ¥n första platsen;\n" "-r\n" "--raw skriv ut i rÃ¥tt format " "(kommaseparerat)\n" " standard är i mänskligt läsbart format\n" "\n" #: ../gnokii/gnokii-sms.c:1025 #, fuzzy, c-format msgid "SMS center: location number must be greater than 0\n" msgstr "SMS-centrets nummer mÃ¥ste vara större än 1\n" #: ../gnokii/gnokii-sms.c:1061 #, c-format msgid "No. %d: \"%s\" (defined name)\n" msgstr "Nr. %d: \"%s\" (definerat namn)\n" #: ../gnokii/gnokii-sms.c:1063 #, c-format msgid "No. %d: \"%s\" (default name)\n" msgstr "Nr. %d: \"%s\" (förvalt namn)\n" #: ../gnokii/gnokii-sms.c:1064 #, c-format msgid "SMS center number is %s\n" msgstr "SMS-centernummer är %s\n" #: ../gnokii/gnokii-sms.c:1066 #, c-format msgid "Default recipient number is %s\n" msgstr "Standard mottagarnummer är %s\n" #: ../gnokii/gnokii-sms.c:1068 #, fuzzy, c-format msgid "No default recipient number is defined\n" msgstr "Standard mottagarnummer är %s\n" #: ../gnokii/gnokii-sms.c:1069 #, fuzzy, c-format msgid "Messages sent as %s\n" msgstr "Meddelandet skickades som " #: ../gnokii/gnokii-sms.c:1070 #, fuzzy, c-format msgid "Message validity is %s\n" msgstr "Meddelandets giltighet är " #: ../gnokii/gnokii-sms.c:1080 #, c-format msgid "" " usage: --setsmsc\n" "SMSC details are read from standard input.\n" "\n" msgstr "" " användning: --setsmsc\n" "SMSC-detaljer läses in frÃ¥n standard in.\n" "\n" #: ../gnokii/gnokii-sms.c:1137 #, c-format msgid "" " usage: --createsmsfolder name creates SMS folder with given name\n" "\n" msgstr "" " användning: --createsmsfolder namn skapar sms-mapp med angivet namn\n" "\n" #: ../gnokii/gnokii-sms.c:1158 #, c-format msgid "Folder with name: %s successfully created!\n" msgstr "Mapp med namn: %s skapades!\n" #: ../gnokii/gnokii-sms.c:1165 #, c-format msgid "" " usage: --deletesmsfolder folderid removes SMS folder with given id\n" "\n" msgstr "" " användning: --deletesmsfolder mappid tar bort SMS-mapp med angivet id\n" "\n" #: ../gnokii/gnokii-sms.c:1183 #, c-format msgid "Error: Number must be between 1 and %i!\n" msgstr "Fel: Numret mÃ¥ste vara mellan 1 och %i!\n" #: ../gnokii/gnokii-sms.c:1191 #, c-format msgid "Number %i of 'My Folders' successfully deleted!\n" msgstr "Nummer %i i 'Mina mappar' togs bort!\n" #: ../gnokii/gnokii-sms.c:1198 #, c-format msgid "" " usage: --showsmsfolderstatus shows summary of SMS folders\n" "\n" msgstr "" " användning: --showsmsfolderstatus visar sammandrag för SMS-mappar\n" "\n" #: ../gnokii/gnokii-sms.c:1215 #, c-format msgid "Cannot list available folders: %s\n" msgstr "Kan inte lista tillgängliga mappar: %s\n" #: ../gnokii/gnokii-sms.c:1219 #, fuzzy, c-format msgid "No. Name Id #Msg\n" msgstr "Nr. Namn Id #Med\n" #: ../gnokii/gnokii-sms.c:1220 #, fuzzy, c-format msgid "========================================================\n" msgstr "============================================\n" #: ../gnokii/gnokii-sms.c:1224 #, fuzzy, c-format msgid "Cannot get status of folder \"%s\": %s\n" msgstr "Kan inte fÃ¥ status pÃ¥ mapp \"%s\": %s\n" #: ../gnokii/gnokii-sms.c:1227 #, fuzzy, c-format msgid "%3d %-42s %4s %4u\n" msgstr "%3d %-32s %2u %4u\n" #: ../gnokii/gnokii-sms.c:1250 #, c-format msgid "SMS received from number: %s\n" msgstr "SMS mottaget frÃ¥n nummer: %s\n" #: ../gnokii/gnokii-sms.c:1259 #, c-format msgid "Got message %d: %s\n" msgstr "Fick meddelandet %d: %s\n" #: ../gnokii/gnokii-sms.c:1267 #, c-format msgid "### Exists?!\n" msgstr "### Existerar?!\n" #: ../gnokii/gnokii-sms.c:1273 #, c-format msgid "### Cannot create file %s\n" msgstr "### Kan inte skapa fil %s\n" #: ../gnokii/gnokii-sms.c:1297 #, c-format msgid "" " usage: --smsreader periodically check sms on the phone and stores them\n" " in mbox format\n" "\n" msgstr "" " användning: --smsreader kontrollera periodiskt efter sms pÃ¥ telefonen " "och\n" " lagra dem i mbox-format\n" "\n" #: ../gnokii/gnokii-sms.c:1314 #, c-format msgid "Entered sms reader mode...\n" msgstr "Gick in i läget för sms-läsning...\n" #: ../gnokii/gnokii-sms.c:1324 #, c-format msgid "Exiting sms reader mode...\n" msgstr "Gick ur läget för sms-läsning...\n" #: ../gnokii/gnokii-todo.c:56 #, c-format msgid "" "ToDo options:\n" " --gettodo start_number [end_number|end] [-v|--vCal]\n" " --writetodo vcalendarfile start_number [end_number|end]\n" " --deletealltodos\n" msgstr "" "Flaggor för AttGöra:\n" " --gettodo startnummer [slutnummer|end] [-v|--vCal]\n" " --writetodo vcalendarfil startnummer [slutnummer|end]\n" " --deletealltodos\n" #: ../gnokii/gnokii-todo.c:65 #, c-format msgid "" "usage: --gettodo start_number [end_number | end] [-v|--vCal]\n" " start_number - entry number in the phone todo (numeric)\n" " end_number - until this entry in the phone todo (numeric, " "optional)\n" " end - the string \"end\" indicates all entries from start to " "end\n" " -v - output in iCalendar format\n" " NOTE: if no end is given, only the start entry is written\n" msgstr "" "användning: --gettodo startnummer [slutnummer | end] [-v|--vCal]\n" " startnummer - postens nummer i telefonens attgöra-lista (numerisk)\n" " slutnummer - fram tills den här posten i telefonens attgöra-lista " "(numerisk, valfri)\n" " end - strängen \"end\" indikerar alla poster frÃ¥n start till " "slut\n" " -v - skriv ut i iCalendar-format\n" " OBSERVERA: om inget slut anges kommer endast startposten att skrivas\n" #: ../gnokii/gnokii-todo.c:119 #, fuzzy msgid "Todo" msgstr "Att göra: %s\n" #: ../gnokii/gnokii-todo.c:120 #, fuzzy msgid "Priority" msgstr "Prioritet: " #: ../gnokii/gnokii-todo.c:133 #, c-format msgid "The ToDo note could not be read: %s\n" msgstr "Att Göra-anteckningen kunde inte läsas: %s\n" #: ../gnokii/gnokii-todo.c:142 #, c-format msgid "" "usage: --writetodo vcalendarfile start_number [end_number|end]\n" " vcalendarfile - file containing todo notes in vCal format\n" " start_number - first note to read from file\n" " end_number - last note to read from file\n" " end - read all notes from file from start_number\n" " NOTE: it stores the note at the first empty location.\n" msgstr "" "användning: --writetodo vcalendarfil startnummer [slutnummer|end]\n" " vcalendarfil - fil som innehÃ¥ller attgöra-anteckningar i " "vCal-format\n" " startnummer - första anteckningen att läsa frÃ¥n filen\n" " slutnummer - sista anteckningen att läsa frÃ¥n filen\n" " end - läs alla anteckningar frÃ¥n filen frÃ¥n " "startnummer\n" " OBSERVERA: den lagrar anteckningen pÃ¥ första lediga plats.\n" #: ../gnokii/gnokii-todo.c:216 #, c-format msgid "Priority %d. %s\n" msgstr "Prioritet %d. %s\n" #: ../gnokii/gnokii-todo.c:218 #, c-format msgid "Failed to write ToDo note: %s\n" msgstr "Misslyckades med att skriva AttGöra-anteckning: %s\n" #: ../gnokii/gnokii-todo.c:234 #, c-format msgid "Successfully deleted all ToDo notes!\n" msgstr "Borttagning av alla AttGöra-anteckningar lyckades!\n" #: ../gnokii/gnokii-todo.c:236 #, c-format msgid "Failed to delete ToDo note: %s\n" msgstr "Misslyckades med att ta bort AttGöra-anteckning: %s\n" #: ../gnokii/gnokii-utils.c:145 #, c-format msgid "Couldn't read from stdin!\n" msgstr "Kunde inte läsa frÃ¥n standard in!\n" #: ../gnokii/gnokii-utils.c:151 #, c-format msgid "Input too long! (%d, maximum is %d)\n" msgstr "Inmatning för lÃ¥ng! (%d, max är %d)\n" #: ../gnokii/gnokii-utils.c:166 #, c-format msgid "Could not null bitmap: %s\n" msgstr "Kunde inte nolla bild: %s\n" #: ../gnokii/gnokii-utils.c:171 #, c-format msgid "Could not load bitmap from %s: %s\n" msgstr "Kunde inte läsa in bildfil frÃ¥n %s: %s\n" #: ../gnokii/gnokii-utils.c:210 #, c-format msgid "" "Warning: end value (%d) is less than start value (%d). Setting it to the " "start value (%d)\n" msgstr "" "Varning: slutvärdet (%d) är mindre än startvärdet (%d). Ställer in det till " "startvärdet (%d)\n" #: ../gnokii/gnokii-wap.c:55 #, c-format msgid "" "WAP options:\n" " --getwapbookmark number\n" " --writewapbookmark name URL\n" " --deletewapbookmark number\n" " --getwapsetting number [-r|--raw]\n" " --writewapsetting\n" " --activatewapsetting number\n" msgstr "" "WAP-flaggor:\n" " --getwapbookmark nummer\n" " --writewapbookmark namn URL\n" " --deletewapbookmark nummer\n" " --getwapsetting nummer [-r|--raw]\n" " --writewapsetting\n" " --activatewapsetting nummer\n" #: ../gnokii/gnokii-wap.c:67 #, c-format msgid " usage: --getwapbookmark number\n" msgstr " användning: --getwapbookmark nummer\n" #: ../gnokii/gnokii-wap.c:88 ../gnokii/gnokii-wap.c:219 #, c-format msgid "WAP bookmark nr. %d:\n" msgstr "WAP-bokmärke nr. %d:\n" #: ../gnokii/gnokii-wap.c:103 #, fuzzy, c-format msgid " usage: --writebookmark name URL\n" msgstr "användning: --writebookmark namn url\n" #: ../gnokii/gnokii-wap.c:126 #, c-format msgid "WAP bookmark nr. %d successfully written!\n" msgstr "WAP-bokmärke nr. %d skrevs korrekt!\n" #: ../gnokii/gnokii-wap.c:138 #, c-format msgid " usage: --deletewapbookmark number\n" msgstr " användning: --deletewapbookmark nummer\n" #: ../gnokii/gnokii-wap.c:159 #, c-format msgid "WAP bookmark nr. %d deleted!\n" msgstr "WAP-bokmärke nr. %d borttagen!\n" #: ../gnokii/gnokii-wap.c:171 #, c-format msgid " usage: --getwapsetting number [-r|--raw]\n" msgstr " användning: --getwapsetting nummer [-r|--raw]\n" #: ../gnokii/gnokii-wap.c:221 ../xgnokii/xgnokii_contacts.c:725 #: ../xgnokii/xgnokii_contacts.c:803 ../xgnokii/xgnokii_contacts.c:942 #: ../xgnokii/xgnokii_contacts.c:984 ../xgnokii/xgnokii_contacts.c:1202 msgid "Home" msgstr "Hem" #: ../gnokii/gnokii-wap.c:222 #, fuzzy msgid "Session mode" msgstr "Sessionsläge: " #: ../gnokii/gnokii-wap.c:223 #, fuzzy msgid "Connection security" msgstr "Säkerhet för anslutning: " #: ../gnokii/gnokii-wap.c:224 #, fuzzy msgid "Data bearer" msgstr "Databärare: " #: ../gnokii/gnokii-wap.c:226 ../gnokii/gnokii-wap.c:236 #, fuzzy msgid "Authentication type" msgstr " Autentiseringstyp: " #: ../gnokii/gnokii-wap.c:227 #, fuzzy msgid "Data call type" msgstr " Typ av datasamtal: " #: ../gnokii/gnokii-wap.c:228 #, fuzzy msgid "Data call speed" msgstr " Typ av samtalshastighet: " #: ../gnokii/gnokii-wap.c:229 ../gnokii/gnokii-wap.c:237 #, fuzzy msgid "Login type" msgstr " Inloggningstyp: " #: ../gnokii/gnokii-wap.c:230 ../gnokii/gnokii-wap.c:239 #, fuzzy msgid "IP" msgstr "VIP" #: ../gnokii/gnokii-wap.c:232 ../gnokii/gnokii-wap.c:240 #, fuzzy msgid "Username" msgstr " Användarnamn: %s\n" #: ../gnokii/gnokii-wap.c:233 ../gnokii/gnokii-wap.c:241 #, fuzzy msgid "Password" msgstr " Lösenord: %s\n" #: ../gnokii/gnokii-wap.c:235 ../xgnokii/xgnokii.c:1615 msgid "Connection" msgstr "Anslutning" #: ../gnokii/gnokii-wap.c:238 #, fuzzy msgid "Access point" msgstr " TillgÃ¥ngspunkt: %s\n" #: ../gnokii/gnokii-wap.c:243 #, fuzzy msgid "Service number" msgstr " Servicenummer: %s\n" #: ../gnokii/gnokii-wap.c:244 #, fuzzy msgid "Server number" msgstr "Centernummer" #: ../gnokii/gnokii-wap.c:292 #, c-format msgid "Cannot write WAP setting: %s\n" msgstr "Kan inte skriva inställning för WAP: %s\n" #: ../gnokii/gnokii-wap.c:299 #, c-format msgid " usage: --activatewapsetting number\n" msgstr " användning: --activatewapsetting nummer\n" #: ../gnokii/gnokii-wap.c:320 #, c-format msgid "WAP setting nr. %d activated!\n" msgstr "WAP-inställning nr. %d aktiverad!\n" #: ../smsd/file.c:59 ../smsd/file.c:90 #, c-format msgid "Cannot stat file %s!\n" msgstr "Kan inte läsa status pÃ¥ fil %s!\n" #: ../smsd/file.c:68 #, c-format msgid "" "File %s is not regular file or\n" "you have not executable permission to this file!\n" msgstr "" "Fil %s är inte en vanlig fil eller\n" "du har inte rättighet att starta denna fil!\n" #: ../smsd/file.c:85 #, c-format msgid "You have not set spool directory, sms sending is disabled!\n" msgstr "Du har inte ställt in kökatalog, sändning av sms inaktiverat!\n" #: ../smsd/file.c:99 #, c-format msgid "" "File %s is not directory or\n" "you have not read and write permissions to this directory,\n" "sms sending is disabled!\n" "!" msgstr "" "Filen %s är ingen katalog eller sÃ¥\n" "har du inte läs- eller skrivrättigheter pÃ¥ denna katalog,\n" "sändning av sms inaktiverat!\n" "!" #: ../smsd/file.c:166 #, c-format msgid "Cannot open directory %s\n" msgstr "Kan inte öppna katalog %s\n" #: ../smsd/file.c:199 #, fuzzy, c-format msgid "Remote number is empty in %s!\n" msgstr "SMS-centernummer är %s\n" #: ../smsd/file.c:243 ../smsd/file.c:258 #, c-format msgid "Cannot unlink %s." msgstr "Kan inte avlänka %s." #: ../smsd/file.c:252 #, c-format msgid "Cannot send sms from file %s\n" msgstr "Kan inte skicka sms frÃ¥n fil %s\n" #: ../smsd/file.c:255 #, c-format msgid "Cannot rename file %s to %s. Trying to unlink it.\n" msgstr "Kan inte byta namn pÃ¥ fil %s till %s. Försöker att avlänka den.\n" #: ../smsd/lowlevel.c:111 #, fuzzy, c-format msgid "" "Cannot load phone %s!\n" "Do you have proper section in the config file?\n" msgstr "" "Kan inte läsa telefonen %s!\n" "Har du en korrekt sektion i gnokiirc?\n" #: ../smsd/lowlevel.c:400 ../xgnokii/xgnokii_lowlevel.c:1349 #, c-format msgid "Event %d failed with return code %d!\n" msgstr "Händelsen %d misslyckades med svarskoden %d!\n" #: ../smsd/lowlevel.c:449 #, c-format msgid "Timeout in file %s, line %d, restarting connection.\n" msgstr "Timeout i filen %s, rad %d, startar om anslutningen.\n" #: ../smsd/lowlevel.c:459 #, fuzzy, c-format msgid "Too many consecutive errors, restarting connection.\n" msgstr "Timeout i filen %s, rad %d, startar om anslutningen.\n" #: ../smsd/mysql.c:75 ../smsd/pq.c:66 #, c-format msgid "Connection to database '%s' on host '%s' failed.\n" msgstr "Anslutning till databas \"%s\" pÃ¥ värd \"%s\" misslyckades.\n" #: ../smsd/mysql.c:132 #, fuzzy, c-format msgid "%d: SELECT FROM multipart command failed.\n" msgstr "%d: SELECT FROM outbox - kommando misslyckades.\n" #: ../smsd/mysql.c:169 #, fuzzy, c-format msgid "%d: INSERT INTO multipartinbox command failed.\n" msgstr "%d: INSERT INTO inbox misslyckades.\n" #: ../smsd/mysql.c:187 #, fuzzy, c-format msgid "%d: SELECT FROM multipartinbox command failed.\n" msgstr "%d: SELECT FROM outbox - kommando misslyckades.\n" #: ../smsd/mysql.c:223 #, fuzzy, c-format msgid "%d: DELETE FROM multipartinbox command failed.\n" msgstr "%d: SELECT FROM outbox - kommando misslyckades.\n" #: ../smsd/mysql.c:261 #, fuzzy, c-format msgid "%d: SELECT FROM inbox command failed.\n" msgstr "%d: SELECT FROM outbox - kommando misslyckades.\n" #: ../smsd/mysql.c:294 #, fuzzy, c-format msgid "%d: INSERT INTO inbox command failed.\n" msgstr "%d: INSERT INTO inbox misslyckades.\n" #: ../smsd/mysql.c:334 ../smsd/sqlite.c:239 #, c-format msgid "%d: SELECT FROM outbox command failed.\n" msgstr "%d: SELECT FROM outbox - kommando misslyckades.\n" #: ../smsd/mysql.c:344 #, c-format msgid "%d: Store Mysql Result Failed.\n" msgstr "%d: Lagring av MySQL-resultat misslyckades.\n" #: ../smsd/mysql.c:397 ../smsd/pq.c:425 #, c-format msgid "%d: UPDATE command failed.\n" msgstr "%d: UPDATE-kommandot misslyckades.\n" #: ../smsd/pq.c:75 #, fuzzy, c-format msgid "Setting client charset '%s' for database '%s' on host '%s' failed.\n" msgstr "Anslutning till databas \"%s\" pÃ¥ värd \"%s\" misslyckades.\n" #: ../smsd/pq.c:120 ../smsd/pq.c:257 #, fuzzy, c-format msgid "%d: Escaping string failed.\n" msgstr "%d: UPDATE-kommandot misslyckades.\n" #: ../smsd/pq.c:148 ../smsd/pq.c:210 #, fuzzy, c-format msgid "%d: SELECT FROM %s.multipart command failed.\n" msgstr "%d: kommandot SELECT FROM %s.outbox misslyckades.\n" #: ../smsd/pq.c:188 #, fuzzy, c-format msgid "%d: INSERT INTO %s.multipartinbox failed.\n" msgstr "%d: INSERT INTO %s.inbox misslyckades.\n" #: ../smsd/pq.c:239 #, fuzzy, c-format msgid "%d: DELETE FROM %s.multipartinbox command failed.\n" msgstr "%d: kommandot SELECT FROM %s.outbox misslyckades.\n" #: ../smsd/pq.c:294 #, fuzzy, c-format msgid "%d: SELECT FROM %s.inbox command failed.\n" msgstr "%d: kommandot SELECT FROM %s.outbox misslyckades.\n" #: ../smsd/pq.c:331 #, c-format msgid "%d: INSERT INTO %s.inbox failed.\n" msgstr "%d: INSERT INTO %s.inbox misslyckades.\n" #: ../smsd/pq.c:374 #, c-format msgid "%d: SELECT FROM %s.outbox command failed.\n" msgstr "%d: kommandot SELECT FROM %s.outbox misslyckades.\n" #: ../smsd/smsd.c:137 #, c-format msgid "smsd - version %s from gnokii %s\n" msgstr "" #: ../smsd/smsd.c:142 #, c-format msgid "" "smsd - version %s from gnokii %s\n" "Copyright Jan Derfinak 1999-2011\n" msgstr "" #: ../smsd/smsd.c:149 #, fuzzy, c-format msgid "" "\n" "Usage: %s [options]\n" " -u, --user db_username OR action if -m file\n" " -p, --password db_password\n" " -d, --db db_name\n" " -c, --host db_hostname OR spool directory if -m file\n" " -s, --schema db_schema\n" " -e, --encoding client_encoding\n" " -m, --module db_module (pq, mysql, sqlite, file)\n" " -l, --libdir path_to_db_module\n" " -f, --logfile file\n" " -t, --phone phone_number\n" " -i, --interval polling_interval_for_incoming_sms's_in_seconds\n" " -S, --maxsms number_of_sms's (only in dumb mode)\n" " -b, --inbox memoryType\n" " -0, --firstpos0\n" " -v, --version\n" " -h, --help\n" msgstr "" "\n" "Användning: %s [flaggor]\n" " -u, --user db_användarnamn ELLER Ã¥tgärd om -m fil\n" " -p, --password db_lösenord\n" " -d, --db db_namn\n" " -c, --host db_värdnamn ELLER kökatalog om -m fil\n" " -s, --schema db_schema\n" " -m, --module db_modul (pq, mysql, file)\n" " -l, --libdir sökväg_till_db_modul\n" " -f, --logfile fil\n" " -t, --phone telefonnummer\n" " -i, --interval kontrollintervall_för_inkommande_sms_i_sekunder\n" " -S, --maxsms antal_sms (endast i dumt läge)\n" " -v, --version\n" " -h, --help\n" #: ../smsd/smsd.c:183 #, c-format msgid "WARNING: Cannot open file %s for appending.\n" msgstr "VARNING: Kan inte öppna fil %s för att lägga till data.\n" #: ../smsd/smsd.c:342 #, c-format msgid "Wrong number of arguments\n" msgstr "Fel antal argument\n" #: ../smsd/smsd.c:349 #, c-format msgid "Cannot load database module %s in directory %s!\n" msgstr "Kan inte läsa in databasmodul %s i katalog %s!\n" #: ../smsd/smsd.c:423 #, fuzzy, c-format msgid "Sending to %s unsuccessful. Error: %s\n" msgstr "Sändning till %s misslyckades. Fel %d\n" #: ../smsd/smsd.c:429 #, c-format msgid "Sending to %s successful.\n" msgstr "Sändning till %s lyckades.\n" #: ../smsd/smsd.c:455 #, c-format msgid "Inserting sms from %s successful.\n" msgstr "Inmatning av sms frÃ¥n %s lyckades.\n" #: ../smsd/smsd.c:465 #, fuzzy, c-format msgid "Duplicated sms from %s.\n" msgstr "Kan inte skicka sms frÃ¥n fil %s\n" #: ../smsd/smsd.c:475 #, c-format msgid "Multipart sms from %s. Waiting for the next parts.\n" msgstr "" #: ../smsd/smsd.c:485 #, fuzzy, c-format msgid "" "Inserting sms from %s unsuccessful.\n" "Date: %02d-%02d-%02d %02d:%02d:%02d+%02d\n" "Text: %s\n" "\n" "Exiting.\n" msgstr "" "Infogning av sms frÃ¥n %s misslyckades.\n" "Datum: %02d-%02d-%02d %02d:%02d:%02d+%02d\n" "Text: %s\n" "\n" "Avslutar." #: ../smsd/sqlite.c:57 ../smsd/sqlite.c:69 #, fuzzy, c-format msgid "Connection to database '%s' failed.\n" msgstr "Anslutning till databas \"%s\" pÃ¥ värd \"%s\" misslyckades.\n" #: ../smsd/sqlite.c:116 ../smsd/sqlite.c:182 #, c-format msgid "%d: Parsing query %s failed!" msgstr "" #: ../smsd/sqlite.c:117 ../smsd/sqlite.c:183 #, fuzzy, c-format msgid "Error: %s" msgstr "Fel: %s\n" #: ../smsd/sqlite.c:133 #, c-format msgid "%d: INSERT INTO inbox failed.\n" msgstr "%d: INSERT INTO inbox misslyckades.\n" #: ../smsd/sqlite.c:134 #, fuzzy, c-format msgid "Error %d: %s\n" msgstr "Fel: %s\n" #: ../smsd/sqlite.c:135 #, fuzzy, c-format msgid "Query: %s\n" msgstr "Nummer: %s\n" #: ../utils/mgnokiidev.c:179 #, c-format msgid "mgnokiidev takes one and only one argument!\n" msgstr "mgnokiidev tar endast ett argument!\n" #: ../xgnokii/xgnokii.c:217 msgid "Reading caller groups names ..." msgstr "Läser namn för samtalsgrupper ..." #: ../xgnokii/xgnokii.c:226 msgid "No group" msgstr "Ingen grupp" #: ../xgnokii/xgnokii.c:347 msgid "Short Message received" msgstr "SMS mottaget" #: ../xgnokii/xgnokii.c:353 ../xgnokii/xgnokii_lowlevel.c:1346 msgid "Working..." msgstr "Arbetar..." #: ../xgnokii/xgnokii.c:370 msgid "Call in progress" msgstr "Samtal pÃ¥gÃ¥r" #: ../xgnokii/xgnokii.c:383 msgid "Hide" msgstr "Göm" #: ../xgnokii/xgnokii.c:457 msgid "anonymous" msgstr "anonym" #: ../xgnokii/xgnokii.c:470 #, c-format msgid "" "Outgoing call in progress:\n" "Time: %s" msgstr "" "UtgÃ¥ende samtal pÃ¥gÃ¥r:\n" "Tid: %s" #: ../xgnokii/xgnokii.c:472 #, c-format msgid "" "Incoming call from: %s\n" "Time: %s" msgstr "" "Inkommande samtal frÃ¥n: %s\n" "Tid: %s" #: ../xgnokii/xgnokii.c:584 ../xgnokii/xgnokii.c:1455 msgid "Max. Time" msgstr "Max tid" #: ../xgnokii/xgnokii.c:631 msgid "Reading SMS centers ..." msgstr "Läser SMS-center ..." #: ../xgnokii/xgnokii.c:896 msgid "SMS not supported!" msgstr "SMS stöds inte!" #: ../xgnokii/xgnokii.c:901 msgid "Calendar not supported!" msgstr "Kalender stöds inte!" #: ../xgnokii/xgnokii.c:1088 msgid "Error writing configuration file!" msgstr "Fel vid skrivning av konfigurationsfil!" #: ../xgnokii/xgnokii.c:1100 ../xgnokii/xgnokii_contacts.c:3126 msgid "Contacts" msgstr "Kontakter" #: ../xgnokii/xgnokii.c:1111 ../xgnokii/xgnokii_calendar.c:1547 msgid "Calendar" msgstr "Kalender" #: ../xgnokii/xgnokii.c:1116 ../xgnokii/xgnokii_logos.c:1525 msgid "Logos" msgstr "Logotyper" #: ../xgnokii/xgnokii.c:1122 msgid "DTMF" msgstr "DTMF" #: ../xgnokii/xgnokii.c:1127 ../xgnokii/xgnokii_speed.c:548 msgid "Speed Dial" msgstr "Kortnummer" #: ../xgnokii/xgnokii.c:1132 msgid "Keyboard" msgstr "Tangentbord" #: ../xgnokii/xgnokii.c:1137 ../xgnokii/xgnokii_netmon.c:294 msgid "Net Monitor" msgstr "Nätmonitor" #: ../xgnokii/xgnokii.c:1147 msgid "Data calls" msgstr "Datasamtal" #: ../xgnokii/xgnokii.c:1156 ../xgnokii/xgnokii.c:1575 msgid "Options" msgstr "Alternativ" #: ../xgnokii/xgnokii.c:1166 ../xgnokii/xgnokii.c:1183 msgid "About" msgstr "Om" #: ../xgnokii/xgnokii.c:1186 ../xgnokii/xgnokii.c:1358 #: ../xgnokii/xgnokii_calendar.c:688 ../xgnokii/xgnokii_calendar.c:734 #: ../xgnokii/xgnokii_calendar.c:881 ../xgnokii/xgnokii_calendar.c:1001 #: ../xgnokii/xgnokii_calendar.c:1141 ../xgnokii/xgnokii_calendar.c:1274 #: ../xgnokii/xgnokii_calendar.c:1435 ../xgnokii/xgnokii_contacts.c:875 #: ../xgnokii/xgnokii_contacts.c:1119 ../xgnokii/xgnokii_contacts.c:1255 #: ../xgnokii/xgnokii_contacts.c:1406 ../xgnokii/xgnokii_contacts.c:2949 #: ../xgnokii/xgnokii_sms.c:570 msgid "Ok" msgstr "Ok" #: ../xgnokii/xgnokii.c:1197 #, c-format msgid "" "xgnokii version: %s\n" "gnokii version: %s\n" "\n" "Copyright (C) 1999-2004 Pavel Janik ml.,\n" "Hugh Blemings, Jan Derfinak,\n" "Pawel Kot and others\n" "xgnokii is free software, covered by the GNU General Public License,\n" "and you are welcome to change it and/or distribute copies of it under\n" "certain conditions. There is absolutely no warranty for xgnokii.\n" "See GPL for details.\n" msgstr "" "xgnokii version: %s\n" "gnokii version: %s\n" "\n" "Copyright © 1999-2004 Pavel Janik ml.,\n" "Hugh Blemings, Jan Derfinak,\n" "Pawel Kot och andra\n" "xgnokii är fri programvara som täcks av GNU General Public License\n" "och du är välkommen att ändra den och/eller distribuera kopior av den\n" "under vissa villkor. Det finns absolut ingen garanti för xgnokii.\n" "Se GPL för detaljer.\n" #: ../xgnokii/xgnokii.c:1352 msgid "Edit SMS Setting" msgstr "Redigera SMS-inställning" #: ../xgnokii/xgnokii.c:1366 ../xgnokii/xgnokii_calendar.c:697 #: ../xgnokii/xgnokii_calendar.c:743 ../xgnokii/xgnokii_calendar.c:890 #: ../xgnokii/xgnokii_calendar.c:1010 ../xgnokii/xgnokii_calendar.c:1150 #: ../xgnokii/xgnokii_calendar.c:1283 ../xgnokii/xgnokii_calendar.c:1443 #: ../xgnokii/xgnokii_common.c:80 ../xgnokii/xgnokii_common.c:162 #: ../xgnokii/xgnokii_contacts.c:886 ../xgnokii/xgnokii_contacts.c:1263 #: ../xgnokii/xgnokii_contacts.c:1414 ../xgnokii/xgnokii_contacts.c:1651 #: ../xgnokii/xgnokii_contacts.c:1698 ../xgnokii/xgnokii_contacts.c:1816 #: ../xgnokii/xgnokii_contacts.c:2212 ../xgnokii/xgnokii_contacts.c:2956 #: ../xgnokii/xgnokii_sms.c:578 msgid "Cancel" msgstr "Avbryt" #: ../xgnokii/xgnokii.c:1379 msgid "Set's name:" msgstr "Telefonens namn:" #: ../xgnokii/xgnokii.c:1393 msgid "Center:" msgstr "Center:" #: ../xgnokii/xgnokii.c:1407 msgid "Sending Format:" msgstr "Sändformat:" #: ../xgnokii/xgnokii.c:1447 msgid "Validity Period:" msgstr "Giltighetsperiod:" #: ../xgnokii/xgnokii.c:1572 msgid "Set's name" msgstr "Telefonens namn" #: ../xgnokii/xgnokii.c:1572 msgid "Center number" msgstr "Centernummer" #: ../xgnokii/xgnokii.c:1572 msgid "Format" msgstr "Format" #: ../xgnokii/xgnokii.c:1572 msgid "Validity" msgstr "Giltighet" #: ../xgnokii/xgnokii.c:1580 msgid "Apply" msgstr "Verkställ" #: ../xgnokii/xgnokii.c:1588 ../xgnokii/xgnokii_contacts.c:2198 #: ../xgnokii/xgnokii_dtmf.c:181 msgid "Save" msgstr "Spara" #: ../xgnokii/xgnokii.c:1594 msgid "Close" msgstr "Stäng" #. ** Connection notebook ** #: ../xgnokii/xgnokii.c:1608 msgid "Phone and connection type" msgstr "Telefon och anslutningstyp" #: ../xgnokii/xgnokii.c:1622 msgid "Port:" msgstr "Port:" #: ../xgnokii/xgnokii.c:1636 ../xgnokii/xgnokii.c:1716 msgid "Model:" msgstr "Modell:" #: ../xgnokii/xgnokii.c:1650 msgid "Bindir:" msgstr "Bindir:" #: ../xgnokii/xgnokii.c:1664 msgid "Init length:" msgstr "Init-längd:" #: ../xgnokii/xgnokii.c:1679 msgid "Connection:" msgstr "Anslutning:" #: ../xgnokii/xgnokii.c:1683 msgid "infrared" msgstr "infraröd" #: ../xgnokii/xgnokii.c:1690 msgid "serial" msgstr "seriell" #: ../xgnokii/xgnokii.c:1697 msgid "irda" msgstr "irda" #. ** Phone notebook ** #: ../xgnokii/xgnokii.c:1702 msgid "Phone information" msgstr "Telefoninformation" #: ../xgnokii/xgnokii.c:1730 msgid "Version:" msgstr "Version:" #: ../xgnokii/xgnokii.c:1744 msgid "Revision:" msgstr "Revision:" #: ../xgnokii/xgnokii.c:1758 msgid "IMEI:" msgstr "IMEI:" #: ../xgnokii/xgnokii.c:1772 msgid "Names length:" msgstr "Namnlängd:" #: ../xgnokii/xgnokii.c:1780 msgid "SIM:" msgstr "SIM:" #: ../xgnokii/xgnokii.c:1798 msgid "Phone:" msgstr "Telefon:" #: ../xgnokii/xgnokii.c:1805 msgid "Alarm setting" msgstr "Alarminställning" #: ../xgnokii/xgnokii.c:1812 ../xgnokii/xgnokii.c:1819 #: ../xgnokii/xgnokii_calendar.c:957 ../xgnokii/xgnokii_calendar.c:1089 #: ../xgnokii/xgnokii_calendar.c:1218 ../xgnokii/xgnokii_calendar.c:1350 #: ../xgnokii/xgnokii_calendar.c:1542 msgid "Alarm" msgstr "Alarm" #. ** SMS notebook ** #: ../xgnokii/xgnokii.c:1842 ../xgnokii/xgnokii_sms.c:1672 msgid "Short Message Service" msgstr "SMS" #: ../xgnokii/xgnokii.c:1875 msgid "Edit" msgstr "Redigera" #. ** Business notebook ** #: ../xgnokii/xgnokii.c:1887 ../xgnokii/xgnokii_sms.c:1541 #: ../xgnokii/xgnokii_sms.c:1716 msgid "Business Card" msgstr "Visitkort" #: ../xgnokii/xgnokii.c:1893 msgid "User" msgstr "Användare" #: ../xgnokii/xgnokii.c:1911 ../xgnokii/xgnokii_calendar.c:1206 #: ../xgnokii/xgnokii_calendar.c:1338 ../xgnokii/xgnokii_contacts.c:1276 msgid "Name:" msgstr "Namn:" #: ../xgnokii/xgnokii.c:1936 msgid "Title:" msgstr "Titel:" #: ../xgnokii/xgnokii.c:1961 msgid "Company:" msgstr "Företag:" #: ../xgnokii/xgnokii.c:1986 msgid "Telephone:" msgstr "Telefon:" #: ../xgnokii/xgnokii.c:2012 msgid "Fax:" msgstr "Fax:" #: ../xgnokii/xgnokii.c:2037 msgid "Email:" msgstr "E-post:" #: ../xgnokii/xgnokii.c:2062 msgid "Address:" msgstr "Address:" #. ** Groups notebook ** #: ../xgnokii/xgnokii.c:2085 msgid "Caller groups names" msgstr "Samtalsgruppnamn" #: ../xgnokii/xgnokii.c:2092 msgid "Groups" msgstr "Grupper" #: ../xgnokii/xgnokii.c:2100 #, c-format msgid "Group %d:" msgstr "Grupp %d:" #. Mail #: ../xgnokii/xgnokii.c:2113 msgid "Mailbox" msgstr "PostlÃ¥da" #: ../xgnokii/xgnokii.c:2120 msgid "Mail" msgstr "Post" #: ../xgnokii/xgnokii.c:2127 msgid "Path to mailbox:" msgstr "Sökväg till postlÃ¥da:" #: ../xgnokii/xgnokii_calendar.c:131 #, fuzzy msgid "Function not implemented!" msgstr "" #: ../xgnokii/xgnokii_calendar.c:194 #, c-format msgid "%04d/%02d/%02d" msgstr "%04d/%02d/%02d" #: ../xgnokii/xgnokii_calendar.c:197 ../xgnokii/xgnokii_calendar.c:203 #, c-format msgid "%04d/%02d/%02d %02d:%02d" msgstr "%04d/%02d/%02d %02d:%02d" #: ../xgnokii/xgnokii_calendar.c:211 #, c-format msgid "%02d/%02d %02d:%02d tone %s" msgstr "%02d/%02d %02d:%02d ton %s" #: ../xgnokii/xgnokii_calendar.c:216 #, c-format msgid "%04d/%02d/%02d %02d:%02d tone %s" msgstr "%04d/%02d/%02d %02d:%02d ton %s" #: ../xgnokii/xgnokii_calendar.c:229 msgid "never" msgstr "aldrig" #: ../xgnokii/xgnokii_calendar.c:232 msgid "daily" msgstr "dagligen" #: ../xgnokii/xgnokii_calendar.c:235 msgid "weekly" msgstr "per vecka" #: ../xgnokii/xgnokii_calendar.c:238 msgid "every two weeks" msgstr "varannan vecka" #: ../xgnokii/xgnokii_calendar.c:241 msgid "monthly" msgstr "mensile" #: ../xgnokii/xgnokii_calendar.c:244 msgid "yearly" msgstr "per Ã¥r" #: ../xgnokii/xgnokii_calendar.c:247 #, c-format msgid "every %d minutes" msgstr "var %d minut" #: ../xgnokii/xgnokii_calendar.c:282 msgid "Type: " msgstr "Typ: " #: ../xgnokii/xgnokii_calendar.c:292 msgid "Start date: " msgstr "Data inizio: " #: ../xgnokii/xgnokii_calendar.c:322 msgid "End date: " msgstr "Slutdatum: " #: ../xgnokii/xgnokii_calendar.c:333 msgid "Alarm: " msgstr "Alarm: " #: ../xgnokii/xgnokii_calendar.c:344 msgid "Number: " msgstr "Nummer: " #: ../xgnokii/xgnokii_calendar.c:355 msgid "Location: " msgstr "Plats: " #: ../xgnokii/xgnokii_calendar.c:366 msgid "Recurrence: " msgstr "Ã…terkommande: " #: ../xgnokii/xgnokii_calendar.c:374 msgid "Text: " msgstr "Text: " #: ../xgnokii/xgnokii_calendar.c:504 #, c-format msgid "" "Error saving calendar note\n" "%s" msgstr "" "Fel vid lagring av kalenderanteckning\n" "%s" #: ../xgnokii/xgnokii_calendar.c:632 #, c-format msgid "%d-%02d-%02d" msgstr "%d-%02d-%02d" #: ../xgnokii/xgnokii_calendar.c:641 #, c-format msgid "%d-%02d-%02d %02d:%02d" msgstr "%d-%02d-%02d %02d:%02d" #: ../xgnokii/xgnokii_calendar.c:681 ../xgnokii/xgnokii_calendar.c:727 msgid "Choose date" msgstr "Välj datum" #: ../xgnokii/xgnokii_calendar.c:767 msgid "Alarm time:" msgstr "Alarmtid:" #: ../xgnokii/xgnokii_calendar.c:837 msgid "Every Day" msgstr "Varje dag" #: ../xgnokii/xgnokii_calendar.c:843 msgid "Every Week" msgstr "Varje vecka" #: ../xgnokii/xgnokii_calendar.c:849 msgid "Every 2 Weeks" msgstr "Varannan vecka" #: ../xgnokii/xgnokii_calendar.c:855 msgid "Every Year" msgstr "Varje Ã¥r" #. #. gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL, _("Edit note"), NULL, #. NewPixmap(Edit_xpm, GUI_CalendarWindow->window, #. &GUI_CalendarWindow->style->bg[GTK_STATE_NORMAL]), #. (GtkSignalFunc) NULL, NULL); #. #: ../xgnokii/xgnokii_calendar.c:874 ../xgnokii/xgnokii_calendar.c:1610 msgid "Add reminder" msgstr "Lägg till pÃ¥minnelse" #: ../xgnokii/xgnokii_calendar.c:910 ../xgnokii/xgnokii_calendar.c:1029 #: ../xgnokii/xgnokii_calendar.c:1170 ../xgnokii/xgnokii_calendar.c:1303 msgid "Date:" msgstr "Datum:" #: ../xgnokii/xgnokii_calendar.c:945 msgid "Subject:" msgstr "Ämne:" #: ../xgnokii/xgnokii_calendar.c:994 msgid "Add Call" msgstr "Lägg till samtal" #: ../xgnokii/xgnokii_calendar.c:1064 ../xgnokii/xgnokii_contacts.c:1289 #: ../xgnokii/xgnokii_contacts.c:1827 msgid "Number:" msgstr "Nummer:" #: ../xgnokii/xgnokii_calendar.c:1077 msgid "Text:" msgstr "Text:" #: ../xgnokii/xgnokii_calendar.c:1109 ../xgnokii/xgnokii_calendar.c:1241 msgid "Repeat:" msgstr "Upprepa:" #: ../xgnokii/xgnokii_calendar.c:1134 ../xgnokii/xgnokii_calendar.c:1618 msgid "Add meeting" msgstr "Lägg till möte" #: ../xgnokii/xgnokii_calendar.c:1267 ../xgnokii/xgnokii_calendar.c:1622 msgid "Add birthday" msgstr "Lägg till födelsedag" #: ../xgnokii/xgnokii_calendar.c:1428 msgid "Delete calendar note" msgstr "Ta bort kalenderanteckning" #: ../xgnokii/xgnokii_calendar.c:1460 msgid "Do you want to delete selected note(s)?" msgstr "Vill du ta bort valda anteckning(ar)?" #: ../xgnokii/xgnokii_calendar.c:1496 ../xgnokii/xgnokii_contacts.c:3081 #: ../xgnokii/xgnokii_dtmf.c:219 ../xgnokii/xgnokii_logos.c:1474 #: ../xgnokii/xgnokii_netmon.c:258 ../xgnokii/xgnokii_sms.c:1245 #: ../xgnokii/xgnokii_sms.c:1633 ../xgnokii/xgnokii_speed.c:516 #: ../xgnokii/xgnokii_xkeyb.c:235 ../xgnokii/xgnokii_xring.c:826 msgid "/_File" msgstr "/_Arkiv" #: ../xgnokii/xgnokii_calendar.c:1497 ../xgnokii/xgnokii_contacts.c:3082 #: ../xgnokii/xgnokii_speed.c:517 msgid "/File/_Read from phone" msgstr "/Arkiv/Läs f_rÃ¥n telefon" #: ../xgnokii/xgnokii_calendar.c:1498 ../xgnokii/xgnokii_contacts.c:3083 #: ../xgnokii/xgnokii_speed.c:518 msgid "/File/_Save to phone" msgstr "/Arkiv/_Spara till telefon" #: ../xgnokii/xgnokii_calendar.c:1499 ../xgnokii/xgnokii_contacts.c:3084 #: ../xgnokii/xgnokii_dtmf.c:222 ../xgnokii/xgnokii_logos.c:1478 #: ../xgnokii/xgnokii_sms.c:1248 ../xgnokii/xgnokii_sms.c:1637 #: ../xgnokii/xgnokii_speed.c:519 msgid "/File/Sep1" msgstr "/Arkiv/Sep1" #: ../xgnokii/xgnokii_calendar.c:1500 msgid "/File/Send via S_MS" msgstr "/Arkiv/Skicka via S_MS" #: ../xgnokii/xgnokii_calendar.c:1501 ../xgnokii/xgnokii_contacts.c:3087 #: ../xgnokii/xgnokii_logos.c:1482 ../xgnokii/xgnokii_sms.c:1251 #: ../xgnokii/xgnokii_speed.c:522 msgid "/File/Sep2" msgstr "/Arkiv/Sep2" #: ../xgnokii/xgnokii_calendar.c:1502 ../xgnokii/xgnokii_contacts.c:3085 #: ../xgnokii/xgnokii_speed.c:520 msgid "/File/_Import from file" msgstr "/Arkiv/_Importera frÃ¥n fil" #: ../xgnokii/xgnokii_calendar.c:1503 ../xgnokii/xgnokii_contacts.c:3086 #: ../xgnokii/xgnokii_speed.c:521 msgid "/File/_Export to file" msgstr "/Arkiv/_Exportera till fil" #: ../xgnokii/xgnokii_calendar.c:1504 msgid "/File/Sep3" msgstr "/Arkiv/Sep3" #: ../xgnokii/xgnokii_calendar.c:1505 ../xgnokii/xgnokii_contacts.c:3088 #: ../xgnokii/xgnokii_dtmf.c:223 ../xgnokii/xgnokii_logos.c:1483 #: ../xgnokii/xgnokii_netmon.c:259 ../xgnokii/xgnokii_sms.c:1252 #: ../xgnokii/xgnokii_sms.c:1638 ../xgnokii/xgnokii_speed.c:523 #: ../xgnokii/xgnokii_xkeyb.c:236 ../xgnokii/xgnokii_xring.c:836 msgid "/File/_Close" msgstr "/Arkiv/_Stäng" #: ../xgnokii/xgnokii_calendar.c:1506 ../xgnokii/xgnokii_contacts.c:3089 #: ../xgnokii/xgnokii_logos.c:1484 ../xgnokii/xgnokii_speed.c:524 #: ../xgnokii/xgnokii_xring.c:837 msgid "/_Edit" msgstr "/R_edigera" #: ../xgnokii/xgnokii_calendar.c:1507 msgid "/Edit/Add _reminder" msgstr "/Redigera/Lägg till pÃ¥minnelse" #: ../xgnokii/xgnokii_calendar.c:1508 msgid "/Edit/Add _call" msgstr "/Redigera/Lägg till samtal" #: ../xgnokii/xgnokii_calendar.c:1509 msgid "/Edit/Add _meeting" msgstr "/Redigera/Lägg till _möte" #: ../xgnokii/xgnokii_calendar.c:1510 msgid "/Edit/Add _birthday" msgstr "/Redigera/Lägg till födelsedag" #. #. menu_items[15].path = _("/Edit/_Edit"); #. #: ../xgnokii/xgnokii_calendar.c:1514 ../xgnokii/xgnokii_contacts.c:3093 msgid "/Edit/_Delete" msgstr "/Redigera/Ta bort" #: ../xgnokii/xgnokii_calendar.c:1515 ../xgnokii/xgnokii_contacts.c:3096 #: ../xgnokii/xgnokii_logos.c:1492 msgid "/Edit/Sep4" msgstr "/Redigera/Sep4" #: ../xgnokii/xgnokii_calendar.c:1516 ../xgnokii/xgnokii_contacts.c:3100 msgid "/Edit/Select _all" msgstr "/Redigera/Välj _alla" #: ../xgnokii/xgnokii_calendar.c:1517 ../xgnokii/xgnokii_contacts.c:3103 #: ../xgnokii/xgnokii_dtmf.c:224 ../xgnokii/xgnokii_netmon.c:263 #: ../xgnokii/xgnokii_sms.c:1253 ../xgnokii/xgnokii_sms.c:1647 #: ../xgnokii/xgnokii_speed.c:526 ../xgnokii/xgnokii_xkeyb.c:237 msgid "/_Help" msgstr "/_Hjälp" #: ../xgnokii/xgnokii_calendar.c:1518 ../xgnokii/xgnokii_contacts.c:3104 #: ../xgnokii/xgnokii_dtmf.c:225 ../xgnokii/xgnokii_netmon.c:264 #: ../xgnokii/xgnokii_sms.c:1254 ../xgnokii/xgnokii_sms.c:1648 #: ../xgnokii/xgnokii_speed.c:527 ../xgnokii/xgnokii_xkeyb.c:238 msgid "/Help/_About" msgstr "/Hjälp/Om" #: ../xgnokii/xgnokii_calendar.c:1535 msgid "#" msgstr "#" #: ../xgnokii/xgnokii_calendar.c:1537 msgid "Start date" msgstr "Startdatum" #: ../xgnokii/xgnokii_calendar.c:1538 msgid "End date" msgstr "Slutdatum" #: ../xgnokii/xgnokii_calendar.c:1543 msgid "Recurrence" msgstr "Ã…terkommande" #: ../xgnokii/xgnokii_calendar.c:1576 ../xgnokii/xgnokii_contacts.c:3157 #: ../xgnokii/xgnokii_speed.c:579 msgid "Read from phone" msgstr "Läs frÃ¥n telefon" #: ../xgnokii/xgnokii_calendar.c:1580 ../xgnokii/xgnokii_contacts.c:3161 #: ../xgnokii/xgnokii_speed.c:583 msgid "Save to phone" msgstr "Spara till telefon" #: ../xgnokii/xgnokii_calendar.c:1587 msgid "Send via SMS" msgstr "Skicka via SMS" #: ../xgnokii/xgnokii_calendar.c:1594 ../xgnokii/xgnokii_contacts.c:2753 #: ../xgnokii/xgnokii_contacts.c:3168 ../xgnokii/xgnokii_logos.c:1572 #: ../xgnokii/xgnokii_speed.c:395 ../xgnokii/xgnokii_speed.c:590 #: ../xgnokii/xgnokii_xring.c:894 msgid "Import from file" msgstr "Importera frÃ¥n fil" #: ../xgnokii/xgnokii_calendar.c:1598 ../xgnokii/xgnokii_contacts.c:2671 #: ../xgnokii/xgnokii_contacts.c:3172 ../xgnokii/xgnokii_logos.c:1576 #: ../xgnokii/xgnokii_speed.c:474 ../xgnokii/xgnokii_speed.c:594 #: ../xgnokii/xgnokii_xring.c:898 msgid "Export to file" msgstr "Exportera till fil" #: ../xgnokii/xgnokii_calendar.c:1614 msgid "Add call" msgstr "Lägg till samtal" #: ../xgnokii/xgnokii_calendar.c:1626 msgid "Delete note" msgstr "Ta bort anteckning" #: ../xgnokii/xgnokii_calendar.c:1691 ../xgnokii/xgnokii_contacts.c:2290 #: ../xgnokii/xgnokii_contacts.c:2316 ../xgnokii/xgnokii_contacts.c:2979 #: ../xgnokii/xgnokii_contacts.c:3225 ../xgnokii/xgnokii_sms.c:1799 #: ../xgnokii/xgnokii_speed.c:190 ../xgnokii/xgnokii_speed.c:196 #: ../xgnokii/xgnokii_speed.c:256 ../xgnokii/xgnokii_speed.c:340 #: ../xgnokii/xgnokii_speed.c:624 #, c-format msgid "Error: %s: line %d: Can't allocate memory!\n" msgstr "Fel: %s: rad %d: Kan inte allokera minne!\n" #: ../xgnokii/xgnokii_calendar.c:1720 ../xgnokii/xgnokii_sms.c:1833 msgid "couldn't allocate colour" msgstr "kunde inte allokera färg" #: ../xgnokii/xgnokii_cfg.c:117 #, c-format msgid "WARNING: Can't allocate memory for config reading!\n" msgstr "VARNING: Kan inte allokera minne för läsning av konfiguration!\n" #: ../xgnokii/xgnokii_cfg.c:211 #, c-format msgid "ERROR: Can't open file %s for writing!\n" msgstr "FEL: Kan inte öppna filen %s för skrivning!\n" #: ../xgnokii/xgnokii_cfg.c:221 #, c-format msgid "ERROR: Can't allocate memory for config writing!\n" msgstr "FEL: Kan inte allokera minne för att skriva konfiguration!\n" #: ../xgnokii/xgnokii_cfg.c:226 #, c-format msgid "ERROR: Can't write config file!\n" msgstr "FEL: Kan inte skriva konfigurationsfil!\n" #: ../xgnokii/xgnokii_common.c:73 msgid "Error" msgstr "Fel" #: ../xgnokii/xgnokii_common.c:110 msgid "Info" msgstr "Info" #: ../xgnokii/xgnokii_common.c:146 msgid "Yes" msgstr "Ja" #: ../xgnokii/xgnokii_common.c:155 msgid "No" msgstr "Nej" #: ../xgnokii/xgnokii_common.c:236 #, c-format msgid "Can't exec %s\n" msgstr "Kan inte starta %s\n" #: ../xgnokii/xgnokii_contacts.c:143 #, c-format msgid "SIM: %d/%d%c Phone: %d/%d%c" msgstr "SIM: %d/%d%c Telefon: %d/%d%c" #: ../xgnokii/xgnokii_contacts.c:317 ../xgnokii/xgnokii_contacts.c:337 msgid "Can't change memory type!" msgstr "Kan inte ändra minnestyp!" #: ../xgnokii/xgnokii_contacts.c:383 #, c-format msgid "" "Phonebook name will be truncated to\n" "%.*s" msgstr "" #: ../xgnokii/xgnokii_contacts.c:611 msgid "Can't find pattern!" msgstr "Kan inte hitta mönster!" #: ../xgnokii/xgnokii_contacts.c:707 ../xgnokii/xgnokii_contacts.c:794 #: ../xgnokii/xgnokii_contacts.c:939 ../xgnokii/xgnokii_contacts.c:981 #: ../xgnokii/xgnokii_contacts.c:1190 msgid "Mobile" msgstr "Mobil" #: ../xgnokii/xgnokii_contacts.c:737 ../xgnokii/xgnokii_contacts.c:809 #: ../xgnokii/xgnokii_contacts.c:944 ../xgnokii/xgnokii_contacts.c:986 #: ../xgnokii/xgnokii_contacts.c:1216 msgid "Postal" msgstr "Post" #: ../xgnokii/xgnokii_contacts.c:869 msgid "Edit subentries" msgstr "Redigera underposter" #: ../xgnokii/xgnokii_contacts.c:894 msgid "Delete" msgstr "Ta bort" #: ../xgnokii/xgnokii_contacts.c:913 msgid "Number/Text:" msgstr "Nummer/Text:" #: ../xgnokii/xgnokii_contacts.c:925 msgid "Type:" msgstr "Typ:" #: ../xgnokii/xgnokii_contacts.c:960 ../xgnokii/xgnokii_contacts.c:1356 #: ../xgnokii/xgnokii_contacts.c:3187 ../xgnokii/xgnokii_speed.c:601 msgid "Edit entry" msgstr "Redigera post" #: ../xgnokii/xgnokii_contacts.c:1111 msgid "Numbers" msgstr "Nummer" #: ../xgnokii/xgnokii_contacts.c:1131 msgid "New" msgstr "Ny" #: ../xgnokii/xgnokii_contacts.c:1315 msgid "Memory:" msgstr "Minne:" #: ../xgnokii/xgnokii_contacts.c:1319 msgid "phone" msgstr "telefon" #: ../xgnokii/xgnokii_contacts.c:1336 msgid "Caller group:" msgstr "Samtalsgrupp:" #: ../xgnokii/xgnokii_contacts.c:1399 msgid "Delete entries" msgstr "Ta bort poster" #: ../xgnokii/xgnokii_contacts.c:1431 msgid "Do you want to delete selected entries?" msgstr "Vill du ta bort valda poster?" #: ../xgnokii/xgnokii_contacts.c:1449 ../xgnokii/xgnokii_contacts.c:3179 msgid "New entry" msgstr "Ny post" #: ../xgnokii/xgnokii_contacts.c:1493 ../xgnokii/xgnokii_contacts.c:3183 msgid "Duplicate entry" msgstr "Duplicera post" #: ../xgnokii/xgnokii_contacts.c:1562 ../xgnokii/xgnokii_contacts.c:1570 #: ../xgnokii/xgnokii_contacts.c:1598 msgid "Can't find free memory." msgstr "Kan inte hitta ledigt minne." #: ../xgnokii/xgnokii_contacts.c:1635 msgid "Changing memory type" msgstr "Byter minnestyp" #: ../xgnokii/xgnokii_contacts.c:1642 msgid "Continue" msgstr "Fortsätt" #: ../xgnokii/xgnokii_contacts.c:1664 msgid "" "If you change from phone memory to SIM memory\n" "some entries may be truncated." msgstr "" "Om du ändrar frÃ¥n telefonminnet till SIM-minnet\n" "kommer vissa poster att kortas ned." #: ../xgnokii/xgnokii_contacts.c:1682 ../xgnokii/xgnokii_contacts.c:1688 msgid "Find" msgstr "Sök" #: ../xgnokii/xgnokii_contacts.c:1714 msgid "Pattern:" msgstr "Mönster:" #: ../xgnokii/xgnokii_contacts.c:1800 msgid "Dial pad" msgstr "Tastiera" #: ../xgnokii/xgnokii_contacts.c:1806 msgid "Dial" msgstr "Ring" #: ../xgnokii/xgnokii_contacts.c:2059 msgid "Phone memory..." msgstr "Telefonminne..." #: ../xgnokii/xgnokii_contacts.c:2070 msgid "SIM memory..." msgstr "SIM-minne..." #: ../xgnokii/xgnokii_contacts.c:2135 msgid "Saving entries" msgstr "Sparar poster" #: ../xgnokii/xgnokii_contacts.c:2150 ../xgnokii/xgnokii_contacts.c:2170 #, fuzzy, c-format msgid "%s: line %d: Can't write %s memory entry number %d! Error: %s\n" msgstr "%s: rad: %d: Kan inte skriva ME-minnespost nummer %d! Fel: %d\n" #: ../xgnokii/xgnokii_contacts.c:2192 msgid "Save changes?" msgstr "Spara ändringar?" #: ../xgnokii/xgnokii_contacts.c:2206 msgid "Don't save" msgstr "Spara inte" #: ../xgnokii/xgnokii_contacts.c:2228 #, fuzzy msgid "" "You have made changes in your\n" "contacts directory.\n" "\n" "\n" "Do you want to save these changes into your phone?\n" msgstr "" "Du har gjort ändringar i dina\n" "kontakter.\n" "\n" "\n" "Vill du spara dessa ändringar i telefonen?\n" #: ../xgnokii/xgnokii_contacts.c:2420 msgid "Getting entries" msgstr "Hämtar poster" #: ../xgnokii/xgnokii_contacts.c:2654 ../xgnokii/xgnokii_dtmf.c:166 #: ../xgnokii/xgnokii_logos.c:1350 ../xgnokii/xgnokii_speed.c:457 msgid "Overwrite file?" msgstr "Skriv över fil?" #: ../xgnokii/xgnokii_contacts.c:2655 ../xgnokii/xgnokii_dtmf.c:167 #: ../xgnokii/xgnokii_logos.c:1351 ../xgnokii/xgnokii_speed.c:458 #, c-format msgid "" "File %s already exists.\n" "Overwrite?" msgstr "" "Filen %s finns redan.\n" "Skriva över?" #: ../xgnokii/xgnokii_contacts.c:2936 ../xgnokii/xgnokii_contacts.c:3120 msgid "Memory" msgstr "Minne" #: ../xgnokii/xgnokii_contacts.c:2946 ../xgnokii/xgnokii_sms.c:1358 msgid "Select contacts" msgstr "Välj kontakter" #: ../xgnokii/xgnokii_contacts.c:3090 msgid "/Edit/_New" msgstr "/Redigera/_Ny" #: ../xgnokii/xgnokii_contacts.c:3091 msgid "/Edit/D_uplicate" msgstr "/Redigera/Kopiera" #: ../xgnokii/xgnokii_contacts.c:3092 ../xgnokii/xgnokii_speed.c:525 msgid "/Edit/_Edit" msgstr "/Redigera/R_edigera" #: ../xgnokii/xgnokii_contacts.c:3094 ../xgnokii/xgnokii_logos.c:1487 msgid "/Edit/Sep3" msgstr "/Redigera/Sep3" #: ../xgnokii/xgnokii_contacts.c:3095 msgid "/Edit/_Change memory type" msgstr "/Redigera/Ändra minnestyp" #: ../xgnokii/xgnokii_contacts.c:3097 msgid "/Edit/_Find" msgstr "/Redigera/Sök" #: ../xgnokii/xgnokii_contacts.c:3098 msgid "/Edit/Find ne_xt" msgstr "/Redigera/Sök nästa" #: ../xgnokii/xgnokii_contacts.c:3099 msgid "/Edit/Sep5" msgstr "/Redigera/Sep5" #: ../xgnokii/xgnokii_contacts.c:3101 msgid "/_Dial" msgstr "/_Ring" #: ../xgnokii/xgnokii_contacts.c:3102 msgid "/Dial/Dial _voice" msgstr "/Ring/Ring _röstsamtal" #: ../xgnokii/xgnokii_contacts.c:3191 msgid "Delete entry" msgstr "Ta bort post" #: ../xgnokii/xgnokii_contacts.c:3198 msgid "Dial voice" msgstr "Ring röstsamtal" #: ../xgnokii/xgnokii_data.c:52 #, c-format msgid "" "Data calls are currently\n" "Disabled\n" " " msgstr "" "Datasamtal är för närvarande\n" "Inaktiverat\n" " " #: ../xgnokii/xgnokii_data.c:54 #, c-format msgid "" "Data calls are currently\n" "Enabled\n" " " msgstr "" "Datasamtal är för närvarande\n" "Aktiverade\n" " " #: ../xgnokii/xgnokii_data.c:102 msgid "Virtual Modem" msgstr "Virtuellt modem" #: ../xgnokii/xgnokii.desktop.in.h:1 msgid "Manage your mobile phone" msgstr "" #: ../xgnokii/xgnokii.desktop.in.h:2 #, fuzzy msgid "Mobile Phone Suite" msgstr "Mobilnummer" #: ../xgnokii/xgnokii.desktop.in.h:3 msgid "Xgnokii" msgstr "" #: ../xgnokii/xgnokii_dtmf.c:100 ../xgnokii/xgnokii_speed.c:351 #: ../xgnokii/xgnokii_speed.c:376 #, c-format msgid "Error reading file!" msgstr "Fel vid läsning av fil!" #: ../xgnokii/xgnokii_dtmf.c:116 msgid "Load" msgstr "Läs in" #: ../xgnokii/xgnokii_dtmf.c:220 ../xgnokii/xgnokii_logos.c:1475 #: ../xgnokii/xgnokii_xring.c:827 msgid "/File/_Open" msgstr "/Arkiv/_Öppna" #: ../xgnokii/xgnokii_dtmf.c:221 ../xgnokii/xgnokii_logos.c:1476 #: ../xgnokii/xgnokii_sms.c:1247 ../xgnokii/xgnokii_sms.c:1634 #: ../xgnokii/xgnokii_xring.c:828 msgid "/File/_Save" msgstr "/Arkiv/_Spara" #: ../xgnokii/xgnokii_dtmf.c:247 msgid "Dial Tone" msgstr "Ringsignal" #: ../xgnokii/xgnokii_dtmf.c:312 msgid "Pause" msgstr "Paus" #: ../xgnokii/xgnokii_dtmf.c:317 msgid "Wait" msgstr "Vänta" #: ../xgnokii/xgnokii_logos.c:972 #, c-format msgid "" "Error getting network info\n" "%s" msgstr "" "Fel vid hämtning av nätverksinfo\n" "%s" #: ../xgnokii/xgnokii_logos.c:1018 #, c-format msgid "" "Error getting bitmap\n" "%s" msgstr "" "Fel vid hämtning av bild\n" "%s" #: ../xgnokii/xgnokii_logos.c:1068 #, c-format msgid "" "Error setting bitmap\n" "%s" msgstr "" "Fel vid skrivning av bild\n" "%s" #: ../xgnokii/xgnokii_logos.c:1323 ../xgnokii/xgnokii_xring.c:650 #: ../xgnokii/xgnokii_xring.c:693 #, c-format msgid "" "Error writing file\n" "%s" msgstr "" "Fel vid skrivning av fil\n" "%s" #: ../xgnokii/xgnokii_logos.c:1382 ../xgnokii/xgnokii_xring.c:613 #, c-format msgid "" "Error reading file\n" "%s" msgstr "" "Fel vid läsning av fil\n" "%s" #: ../xgnokii/xgnokii_logos.c:1409 msgid "Save logo as ..." msgstr "Spara logotyp som ..." #: ../xgnokii/xgnokii_logos.c:1434 msgid "Open logo..." msgstr "Öppna logotyp..." #: ../xgnokii/xgnokii_logos.c:1477 ../xgnokii/xgnokii_xring.c:829 msgid "/File/Save _as ..." msgstr "/Arkiv/Spar_a som ..." #: ../xgnokii/xgnokii_logos.c:1479 msgid "/File/_Get operator" msgstr "/Arkiv/Hämta _operatör" #: ../xgnokii/xgnokii_logos.c:1480 msgid "/File/Get _logo" msgstr "/Arkiv/Hämta _logotyp" #: ../xgnokii/xgnokii_logos.c:1481 msgid "/File/Se_t logo" msgstr "/Arkiv/Ställ in logo_typ" #: ../xgnokii/xgnokii_logos.c:1485 ../xgnokii/xgnokii_xring.c:838 msgid "/Edit/_Clear" msgstr "/Redigera/_Töm" #: ../xgnokii/xgnokii_logos.c:1486 msgid "/Edit/_Invert" msgstr "/Redigera/_Invertera" #: ../xgnokii/xgnokii_logos.c:1488 msgid "/Edit/_Up logo" msgstr "/Redigera/Logotyp _upp" #: ../xgnokii/xgnokii_logos.c:1489 msgid "/Edit/_Down logo" msgstr "/Redigera/Logotyp _ner" #: ../xgnokii/xgnokii_logos.c:1490 msgid "/Edit/_Left logo" msgstr "/Redigera/Logotyp _vänster" #: ../xgnokii/xgnokii_logos.c:1491 msgid "/Edit/_Right logo" msgstr "/Redigera/Logotyp _höger" #: ../xgnokii/xgnokii_logos.c:1493 msgid "/Edit/Flip _horizontal" msgstr "/Redigera/Vänd _horisontellt" #: ../xgnokii/xgnokii_logos.c:1494 msgid "/Edit/Flip _vertical" msgstr "/Redigera/Vänd _vertikalt" #: ../xgnokii/xgnokii_logos.c:1553 msgid "Clear logo" msgstr "Rensa logotyp" #: ../xgnokii/xgnokii_logos.c:1560 msgid "Get logo" msgstr "Hämta logotyp" #: ../xgnokii/xgnokii_logos.c:1565 msgid "Set logo" msgstr "Ställ in logotyp" #: ../xgnokii/xgnokii_logos.c:1585 msgid "Startup logo" msgstr "Uppstartslogotyp" #: ../xgnokii/xgnokii_logos.c:1594 msgid "Operator logo" msgstr "Operatörslogotyp" #: ../xgnokii/xgnokii_logos.c:1604 msgid "Caller logo" msgstr "Samtalslogotyp" #: ../xgnokii/xgnokii_logos.c:1731 msgid "Brush tool" msgstr "Verktyg för pensel" #: ../xgnokii/xgnokii_logos.c:1742 msgid "Line tool" msgstr "Verktyg för linje" #: ../xgnokii/xgnokii_logos.c:1752 msgid "Rectangle tool" msgstr "Verktyg för rektangel" #: ../xgnokii/xgnokii_logos.c:1762 msgid "Filled rectangle tool" msgstr "Verktyg för fylld rektangel" #: ../xgnokii/xgnokii_logos.c:1771 msgid "Invert logo" msgstr "Invertera logotyp" #: ../xgnokii/xgnokii_logos.c:1776 msgid "Horizontal flip" msgstr "Vrid horisontellt" #: ../xgnokii/xgnokii_logos.c:1781 msgid "Vertical flip" msgstr "Vrid vertikalt" #: ../xgnokii/xgnokii_logos.c:1836 msgid "Load preview pixmap error, feature disabled." msgstr "Fel vid inläsning av förhandsvisning av bild, funktionen inaktiverad." #: ../xgnokii/xgnokii_lowlevel.c:210 #, c-format msgid "Failed to open the phone. Quitting.\n" msgstr "Misslyckades med att öppna telefonen. Avslutar.\n" #. We have some misconfiguration: phone doesn't handle #. neither folders nor SIM #: ../xgnokii/xgnokii_lowlevel.c:403 #, c-format msgid "" "Misconfiguration detected: phone handles neither folders nor sim.\n" "Contact gnokii developers to fix the issue.\n" msgstr "" "Felkonfiguration upptäcktes: telefon hanterar varken mappen eller SIM.\n" "Kontakta gnokii-utvecklarna för att rätta till problemet.\n" #: ../xgnokii/xgnokii_lowlevel.c:481 #, c-format msgid "%s: line %d: Can't get memory entry number %d from memory %d! %d\n" msgstr "%s: rad %d: Kan inte fÃ¥ minnespost nummer %d frÃ¥n minnet %d! %d\n" #: ../xgnokii/xgnokii_lowlevel.c:1249 msgid "Connecting..." msgstr "Ansluter..." #: ../xgnokii/xgnokii_lowlevel.c:1260 msgid "" "It has been reported that your phone is known to be broken by xgnokii.\n" "Exiting application to avoid breakage. If you want to take a risk and\n" "run xgnokii anyway, set:\n" "\n" "\tallow_breakage = 1\n" "\n" "in xgnokii section in your config file.\n" "See http://thread.gmane.org/gmane.linux.drivers.gnokii/3195 for details.\n" msgstr "" "Det har rapporterats att din telefon är känd att xgnokii kan göra sönder " "den.\n" "Avsluta programmet för att undvika att den blir trasig. Om du vill ta risken " "och\n" "köra xgnokii ändÃ¥, ställ in:\n" "\n" "\tallow_breakage = 1\n" "\n" "i xgnokii-sektionen i din konfigurationsfil.\n" "Se http://thread.gmane.org/gmane.linux.drivers.gnokii/3195 för detaljer.\n" #: ../xgnokii/xgnokii_lowlevel.c:1397 msgid "Refreshing SMSes..." msgstr "Uppdaterar SMS..." #: ../xgnokii/xgnokii_netmon.c:260 msgid "/_Tools" msgstr "/Verk_tyg" #: ../xgnokii/xgnokii_netmon.c:261 msgid "/Tools/Net monitor o_n" msgstr "/Verktyg/Nätmo_nitor pÃ¥" #: ../xgnokii/xgnokii_netmon.c:262 msgid "/Tools/Net monitor o_ff" msgstr "/Verktyg/Nätmonitor av" #: ../xgnokii/xgnokii_netmon.c:354 ../xgnokii/xgnokii_netmon.c:357 msgid "Active cell" msgstr "Aktiv cell" #: ../xgnokii/xgnokii_netmon.c:360 msgid "NCELL list I" msgstr "NCELL lista I" #: ../xgnokii/xgnokii_netmon.c:363 msgid "NCELL list II" msgstr "NCELL lista II" #: ../xgnokii/xgnokii_netmon.c:366 msgid "NCELL list III" msgstr "NCELL lista III" #: ../xgnokii/xgnokii_netmon.c:369 msgid "Preferred/Denied networks" msgstr "Föredragna/Nekade nätverk" #: ../xgnokii/xgnokii_netmon.c:372 msgid "System information bits" msgstr "Systeminformationbitar" #: ../xgnokii/xgnokii_netmon.c:375 msgid "TMSI, Paging, PLU" msgstr "TMSI, Paging, PLU" #: ../xgnokii/xgnokii_netmon.c:378 msgid "Cells info" msgstr "Cell-info" #: ../xgnokii/xgnokii_netmon.c:381 msgid "DTX, Cipher, Hopping" msgstr "DTX, Cipher, Hopping" #: ../xgnokii/xgnokii_netmon.c:392 msgid "Uplink DTX" msgstr "Upplänk DTX" #: ../xgnokii/xgnokii_netmon.c:395 msgid "BTS TEST" msgstr "BTS TEST" #: ../xgnokii/xgnokii_netmon.c:398 msgid "CELL BARR-Flag" msgstr "CELL BARR-flagga" #: ../xgnokii/xgnokii_netmon.c:401 msgid "Accumulator, Charge status" msgstr "Batteri, laddningsstatus" #: ../xgnokii/xgnokii_netmon.c:404 msgid "?Constant voltage charging display" msgstr "?Konstant visning av strömladdning" #: ../xgnokii/xgnokii_netmon.c:407 msgid "?Battery full detection" msgstr "?Detektering av fullt batteri" #: ../xgnokii/xgnokii_netmon.c:410 msgid "Accumulator" msgstr "Batteri" #: ../xgnokii/xgnokii_netmon.c:413 msgid "SW-Resets" msgstr "SW-Ã…terställ" #: ../xgnokii/xgnokii_netmon.c:416 msgid "Reset-Counter" msgstr "Ã…terställ räknare" #: ../xgnokii/xgnokii_netmon.c:420 msgid "Cause codes for last connection abortion" msgstr "Orsakskoder för senaste anslutningsbrytning" #: ../xgnokii/xgnokii_netmon.c:431 msgid "Reset handover counters" msgstr "Nollställ överlämnningsräknare" #: ../xgnokii/xgnokii_netmon.c:434 msgid "Handover Counter" msgstr "Överlämnningsräkare" #: ../xgnokii/xgnokii_netmon.c:437 msgid "Handover Counter (Dual)" msgstr "Överlämnningsräkare (dubbel)" #: ../xgnokii/xgnokii_netmon.c:440 msgid "L2-Timeouts" msgstr "L2-Timeouter" #: ../xgnokii/xgnokii_netmon.c:443 msgid "SIM" msgstr "SIM" #: ../xgnokii/xgnokii_netmon.c:446 msgid "?Block display 1" msgstr "?Blockera display 1" #: ../xgnokii/xgnokii_netmon.c:452 msgid "Memory status before reset" msgstr "Minnesstatus före Ã¥terställning" #: ../xgnokii/xgnokii_netmon.c:455 msgid "Reset Counters" msgstr "Ã…terställ räknare" #: ../xgnokii/xgnokii_netmon.c:459 msgid "Counter for PLMN Search and Cell reselection (Singleband)" msgstr "Räknare för PLMN-sök och Cell-Ã¥terval (Enkelband)" #: ../xgnokii/xgnokii_netmon.c:470 msgid "Neighbourhood measurement" msgstr "Mätning av omgivning" #: ../xgnokii/xgnokii_netmon.c:473 msgid "Calls" msgstr "Samtal" #: ../xgnokii/xgnokii_netmon.c:476 msgid "Temporary counters of DSP" msgstr "Temporära räknare för DSP" #: ../xgnokii/xgnokii_netmon.c:480 msgid "Control of task information displays" msgstr "Kontrollera visning av uppgiftsinformation" #: ../xgnokii/xgnokii_netmon.c:483 msgid "Information about task numbers 0-7" msgstr "Information om uppgiftsnumren 0-7" #: ../xgnokii/xgnokii_netmon.c:487 msgid "Information about task numbers 8-15" msgstr "Information om uppgiftsnumren 8-15" #: ../xgnokii/xgnokii_netmon.c:491 msgid "Information about task numbers 16-23" msgstr "Information om uppgiftsnumren 16-23" #: ../xgnokii/xgnokii_netmon.c:494 msgid "Information about OS_SYSTEM_STACK" msgstr "Information om OS_SYSTEM_STACK" #: ../xgnokii/xgnokii_netmon.c:498 msgid "Information about current MCU and DSP software versions" msgstr "Information om nuvarande MCU och DSP-programvaruversioner" #: ../xgnokii/xgnokii_netmon.c:501 msgid "Hardware version" msgstr "HÃ¥rdvaruversion" #: ../xgnokii/xgnokii_netmon.c:520 msgid "Chan" msgstr "Chan" #: ../xgnokii/xgnokii_netmon.c:521 msgid "RxLv" msgstr "RxLv" #: ../xgnokii/xgnokii_netmon.c:522 msgid "C1" msgstr "C1" #: ../xgnokii/xgnokii_netmon.c:523 msgid "C2" msgstr "C2" #: ../xgnokii/xgnokii_netmon.c:524 msgid "ACT" msgstr "ACT" #: ../xgnokii/xgnokii_netmon.c:525 msgid "NC2" msgstr "NC2" #: ../xgnokii/xgnokii_netmon.c:526 msgid "NC3" msgstr "NC3" #: ../xgnokii/xgnokii_netmon.c:527 msgid "NC4" msgstr "NC4" #: ../xgnokii/xgnokii_netmon.c:528 msgid "NC5" msgstr "NC5" #: ../xgnokii/xgnokii_netmon.c:529 msgid "NC6" msgstr "NC6" #: ../xgnokii/xgnokii_netmon.c:530 msgid "NC7" msgstr "NC7" #: ../xgnokii/xgnokii_netmon.c:560 msgid "Page:" msgstr "Sida:" #: ../xgnokii/xgnokii_sms.c:250 ../xgnokii/xgnokii_sms.c:330 #: ../xgnokii/xgnokii_sms.c:444 msgid "read" msgstr "läst" #: ../xgnokii/xgnokii_sms.c:253 ../xgnokii/xgnokii_sms.c:333 #: ../xgnokii/xgnokii_sms.c:430 msgid "unread" msgstr "oläst" #: ../xgnokii/xgnokii_sms.c:256 ../xgnokii/xgnokii_sms.c:336 msgid "sent" msgstr "skickat" #: ../xgnokii/xgnokii_sms.c:259 ../xgnokii/xgnokii_sms.c:339 msgid "not sent" msgstr "inte skickat" #: ../xgnokii/xgnokii_sms.c:302 msgid "read report" msgstr "läst rapport" #: ../xgnokii/xgnokii_sms.c:305 msgid "unread report" msgstr "oläst rapport" #: ../xgnokii/xgnokii_sms.c:312 msgid "seen picture" msgstr "sedd bild" #: ../xgnokii/xgnokii_sms.c:315 msgid "unseen picture" msgstr "ej sedd bild" #: ../xgnokii/xgnokii_sms.c:318 msgid "sent picture" msgstr "skickad bild" #: ../xgnokii/xgnokii_sms.c:321 msgid "not sent picture" msgstr "ej skickad bild" #: ../xgnokii/xgnokii_sms.c:324 msgid "unknown picture" msgstr "okänd bild" #: ../xgnokii/xgnokii_sms.c:349 #, c-format msgid "%02d/%02d/%04d %02d:%02d:%02d %c%02d00" msgstr "%02d/%02d/%04d %02d:%02d:%02d %c%02d00" #: ../xgnokii/xgnokii_sms.c:355 ../xgnokii/xgnokii_sms.c:360 #, c-format msgid "%02d/%02d/%04d %02d:%02d:%02d" msgstr "%02d/%02d/%04d %02d:%02d:%02d" #: ../xgnokii/xgnokii_sms.c:368 #, c-format msgid "Picture Message: %s" msgstr "Bildmeddelande: %s" #: ../xgnokii/xgnokii_sms.c:461 msgid "From: " msgstr "FrÃ¥n: " #: ../xgnokii/xgnokii_sms.c:466 msgid "Date: " msgstr "Datum: " #: ../xgnokii/xgnokii_sms.c:563 msgid "Delete SMS" msgstr "Ta bort SMS" #: ../xgnokii/xgnokii_sms.c:595 msgid "Do you want to delete selected SMS?" msgstr "Vill du ta bort valt SMS?" #: ../xgnokii/xgnokii_sms.c:617 #, c-format msgid "Cannot open mailbox %s for appending!" msgstr "Kan inte öppna postlÃ¥dan %s för inläggning av data!" #: ../xgnokii/xgnokii_sms.c:631 #, c-format msgid "" "Cannot save to mailbox %s.\n" "\\%s is locked for process %d!" msgstr "" "Kan inte spara till postlÃ¥dan %s.\n" "\\%s är lÃ¥st för processen %d!" #: ../xgnokii/xgnokii_sms.c:644 #, c-format msgid "Cannot lock mailbox %s!" msgstr "Kan inte lÃ¥sa postlÃ¥da %s!" #: ../xgnokii/xgnokii_sms.c:699 #, c-format msgid "Cannot unlock mailbox %s!" msgstr "Kan inte lÃ¥sa upp postlÃ¥da %s!" #: ../xgnokii/xgnokii_sms.c:747 msgid "Choose Mailbox File" msgstr "Välj postlÃ¥defil" #: ../xgnokii/xgnokii_sms.c:857 #, c-format msgid "" "Name: %s\n" "Number: %s\n" "Used: %d\n" msgstr "" "Namn: %s\n" "Nummer: %s\n" "Använde: %d\n" #: ../xgnokii/xgnokii_sms.c:956 ../xgnokii/xgnokii_sms.c:1089 msgid "Address line contains illegal address!" msgstr "Addressraden innehÃ¥ller en felaktig address!" #: ../xgnokii/xgnokii_sms.c:1060 #, c-format msgid "" "Error sending SMS to %s\n" "%s" msgstr "" "Fel vid sändning av SMS till %s\n" "%s" #: ../xgnokii/xgnokii_sms.c:1066 #, c-format msgid "Message sent to: %s\n" msgstr "Meddelande skickades till: %s\n" #: ../xgnokii/xgnokii_sms.c:1153 ../xgnokii/xgnokii_sms.c:1185 #: ../xgnokii/xgnokii_sms.c:1211 #, c-format msgid "Sending SMS to %s (%d/%d) ...\n" msgstr "Skickar SMS till %s (%d/%d) ...\n" #: ../xgnokii/xgnokii_sms.c:1246 msgid "/File/Sen_d" msgstr "/Arkiv/Skicka" #: ../xgnokii/xgnokii_sms.c:1249 msgid "/File/Check _Names" msgstr "/Arkiv/Kontrollera namn" #: ../xgnokii/xgnokii_sms.c:1250 msgid "/File/C_ontacts" msgstr "/Arkiv/Kontakter" #: ../xgnokii/xgnokii_sms.c:1310 msgid "Send message" msgstr "Skicka meddelande" #: ../xgnokii/xgnokii_sms.c:1314 msgid "Save message to outbox" msgstr "Spara meddelande i utlÃ¥da" #: ../xgnokii/xgnokii_sms.c:1321 msgid "Check names" msgstr "Kontrollera namn" #: ../xgnokii/xgnokii_sms.c:1334 msgid "To:" msgstr "Till:" #: ../xgnokii/xgnokii_sms.c:1402 msgid "Delivery report" msgstr "Leveransrapport" #: ../xgnokii/xgnokii_sms.c:1406 msgid "Send as Long SMS" msgstr "Skicka som lÃ¥ngt SMS" #: ../xgnokii/xgnokii_sms.c:1410 msgid "SMS Center:" msgstr "SMS Center:" #: ../xgnokii/xgnokii_sms.c:1431 msgid "New Message" msgstr "Nytt meddelande" #: ../xgnokii/xgnokii_sms.c:1457 msgid "Forward Message" msgstr "Vidarebefodra meddelande" #: ../xgnokii/xgnokii_sms.c:1498 msgid "Reply Message" msgstr "Svara pÃ¥ meddelande" #: ../xgnokii/xgnokii_sms.c:1635 msgid "/File/Save to mailbo_x" msgstr "/Arkiv/Spara till postlÃ¥da" #: ../xgnokii/xgnokii_sms.c:1636 msgid "/File/Save to _file" msgstr "/Arkiv/Spara till _fil" #: ../xgnokii/xgnokii_sms.c:1639 msgid "/_Messages" msgstr "/_Meddelanden" #: ../xgnokii/xgnokii_sms.c:1640 msgid "/_Messages/_Activate SMS reading" msgstr "/_Meddelanden/_Aktivera SMS-läsning" #: ../xgnokii/xgnokii_sms.c:1641 msgid "/_Messages/_New" msgstr "/_Meddelanden/_Ny" #: ../xgnokii/xgnokii_sms.c:1642 msgid "/_Messages/_Forward" msgstr "/_Meddelanden/_Vidarebefodra" #: ../xgnokii/xgnokii_sms.c:1643 msgid "/_Messages/_Reply" msgstr "/_Meddelanden/_Svara" #: ../xgnokii/xgnokii_sms.c:1644 msgid "/_Messages/_Delete" msgstr "/_Meddelanden/_Ta bort" #: ../xgnokii/xgnokii_sms.c:1645 msgid "/Messages/Sep3" msgstr "/Meddelanden/Sep3" #: ../xgnokii/xgnokii_sms.c:1646 msgid "/_Messages/_Business card" msgstr "/_Meddelanden/_Visitkort" #: ../xgnokii/xgnokii_sms.c:1666 msgid "Status" msgstr "Status" #: ../xgnokii/xgnokii_sms.c:1666 msgid "Date / Time" msgstr "Datum / Tid" #: ../xgnokii/xgnokii_sms.c:1666 msgid "Sender" msgstr "Avsändare" #: ../xgnokii/xgnokii_sms.c:1666 msgid "Message" msgstr "Meddelande" #: ../xgnokii/xgnokii_sms.c:1703 msgid "New message" msgstr "Nytt meddelande" #: ../xgnokii/xgnokii_sms.c:1707 msgid "Forward message" msgstr "Vidarebefodra meddelande" #: ../xgnokii/xgnokii_sms.c:1711 msgid "Reply message" msgstr "Svara pÃ¥ meddelande" #: ../xgnokii/xgnokii_sms.c:1723 msgid "Delete message" msgstr "Ta bort meddelande" #: ../xgnokii/xgnokii_sms.c:1748 msgid "SMS's" msgstr "SMS" #: ../xgnokii/xgnokii_speed.c:181 msgid "Reading data ..." msgstr "Läser data ..." #: ../xgnokii/xgnokii_speed.c:207 #, c-format msgid "Cannot read speed dial key %d!\n" msgstr "Kan inte läsa av snabbknapp %d!\n" #: ../xgnokii/xgnokii_speed.c:268 #, c-format msgid "Error writing speed dial for key %d!\n" msgstr "Fel vid skrivning av kortnummer för knapp %d!\n" #: ../xgnokii/xgnokii_speed.c:542 msgid "Key" msgstr "Nyckel" #: ../xgnokii/xgnokii_xkeyb.c:180 msgid "Cannot load background pixmap!" msgstr "Kunde inte läsa in bakgrundsbild!" #: ../xgnokii/xgnokii_xkeyb.c:253 msgid "XGnokii Keyboard" msgstr "XGnokii-tangentbord" #: ../xgnokii/xgnokii_xring.c:404 #, c-format msgid "User #%d (%s)" msgstr "Användare #%d (%s)" #: ../xgnokii/xgnokii_xring.c:423 #, c-format msgid "User #%d (*EMPTY*)" msgstr "Användare #%d (*TOM*)" #: ../xgnokii/xgnokii_xring.c:628 msgid "Open ringtone..." msgstr "Öppnar ringsignal..." #: ../xgnokii/xgnokii_xring.c:670 msgid "Save ringtone as..." msgstr "Spara ringsignal som..." #: ../xgnokii/xgnokii_xring.c:736 #, c-format msgid "Empty ringtone list" msgstr "Tom ringsignalslista" #: ../xgnokii/xgnokii_xring.c:746 #, c-format msgid "" "Error getting ringtone\n" "%s" msgstr "" "Fel vid hämtning av ringsignal\n" "%s" #: ../xgnokii/xgnokii_xring.c:763 #, c-format msgid "" "Error setting ringtone\n" "%s" msgstr "" "Fel vid skrivning av ringsignal\n" "%s" #: ../xgnokii/xgnokii_xring.c:782 #, c-format msgid "" "Error deleting ringtone\n" "%s" msgstr "" "Fel vid borttagning av ringsignal\n" "%s" #: ../xgnokii/xgnokii_xring.c:830 msgid "/File/S1" msgstr "/Arkiv/S1" #: ../xgnokii/xgnokii_xring.c:831 msgid "/File/_Get ringtone" msgstr "/Arkiv/Hämta rin_gsignal" #: ../xgnokii/xgnokii_xring.c:832 msgid "/File/Se_t ringtone" msgstr "/Arkiv/Sät_t ringsignal" #: ../xgnokii/xgnokii_xring.c:833 msgid "/File/Delete ringtone" msgstr "/Arkiv/Ta bort ringsignal" #: ../xgnokii/xgnokii_xring.c:834 msgid "/File/_Play" msgstr "/Arkiv/S_pela upp" #: ../xgnokii/xgnokii_xring.c:835 msgid "/File/S2" msgstr "/Arkiv/S2" #: ../xgnokii/xgnokii_xring.c:874 msgid "Clear ringtone" msgstr "Töm ringsignal" #: ../xgnokii/xgnokii_xring.c:880 msgid "Get ringtone" msgstr "Hämta ringsignal" #: ../xgnokii/xgnokii_xring.c:884 msgid "Set ringtone" msgstr "Ställ in ringsignal" #: ../xgnokii/xgnokii_xring.c:888 msgid "Delete ringtone" msgstr "Ta bort ringsignal" #: ../xgnokii/xgnokii_xring.c:904 msgid "Play" msgstr "Spela upp" #: ../xgnokii/xgnokii_xring.c:913 msgid "Select ringtone" msgstr "Välj ringsignal" #: ../xgnokii/xgnokii_xring.c:918 msgid "Ringtone name" msgstr "Ringsignalsnamn" #: ../xgnokii/xgnokii_xring.c:930 msgid "Set tempo" msgstr "Ställ in tempo" #~ msgid "ERROR: Can't find HOME environment variable!\n" #~ msgstr "FEL: Kan inte hitta miljövariabeln HOME!\n" #~ msgid "+%02d00" #~ msgstr "+%02d00" #~ msgid "%02d00" #~ msgstr "%02d00" #~ msgid "Response date/time: %02d/%02d/%04d %02d:%02d:%02d " #~ msgstr "Svar datum/tid: %02d/%02d/%04d %02d:%02d:%02d " #~ msgid "WARNING: Can't find HOME environment variable!\n" #~ msgstr "VARNING: Kan inte hitta miljövariabeln HOME!\n" #, fuzzy #~ msgid "Progress: %3d%% completed\r" #~ msgstr "Förlopp: %d%% klar\n" #, fuzzy #~ msgid "GetMMS %s %d failed! (%s)\n" #~ msgstr "GetSMS %s %d misslyckades! (%s)\n" #, fuzzy #~ msgid "Deleted MMS %s %d\n" #~ msgstr "Tog bort SMS %s %d\n" #, fuzzy #~ msgid "" #~ "DeleteMMS %s %d failed!(%s)\n" #~ "\n" #~ msgstr "" #~ "DeleteSMS %s %d misslyckades!(%s)\n" #~ "\n" #~ msgid "Deleted SMS %s %d\n" #~ msgstr "Tog bort SMS %s %d\n" #, fuzzy #~ msgid "" #~ "Deleting SMS %s %d failed!(%s)\n" #~ "\n" #~ msgstr "" #~ "DeleteSMS %s %d misslyckades!(%s)\n" #~ "\n" #, fuzzy #~ msgid "Couldn't read config.\n" #~ msgstr "Kunde inte läsa frÃ¥n standard in!\n" #~ msgid "Write error!\n" #~ msgstr "Skrivfel!\n" #~ msgid "Read ack error!\n" #~ msgstr "Fel vid avläsning av batteri!\n" #~ msgid "Write FAILED (%s): memory type: %s, loc: %d, name: %s, number: %s\n" #~ msgstr "" #~ "Skrivning MISSLYCKADES (%s): minnestyp: %s, plats: %d, namn: %s, nummer: " #~ "%s\n" #~ msgid "" #~ "See the gnokii manual page for the supported memory types with the phone\n" #~ "you use.\n" #~ msgstr "" #~ "Se manualsidan för gnokii för de minnestyper som stöds av telefonen\n" #~ "du använder.\n" #~ msgid "Starting SMS center number is greater than stop\n" #~ msgstr "Startnumret för SMS-center är större än slutnumret\n" #~ msgid "%s\n" #~ msgstr "%s\n" #~ msgid "Orphaned line: %s\n" #~ msgstr "Föräldralös rad: %s\n" #~ msgid "Cannot lock NULL device.\n" #~ msgstr "Kan inte lÃ¥sa NULL-enhet.\n" #~ msgid "Help" #~ msgstr "Hjälp" #~ msgid "Help viewer" #~ msgstr "Hjälpvisaren" #~ msgid "Viewer:" #~ msgstr "Visare:" #~ msgid "/Help/_Help" #~ msgstr "/Hjälp/_Hjälp" #~ msgid "Vcard began but not ended?" #~ msgstr "Vcard började men slutade inte?" #~ msgid "Please enter SMS text. End your input with :" #~ msgstr "Ange SMS-text. Avsluta inmatning med :" #~ msgid "Business number" #~ msgstr "Arbetsnummer" #~ msgid "Birthday date" #~ msgstr "Födelsedag" #~ msgid " Repeat: every day\n" #~ msgstr " Upprepa: varje dag\n" #~ msgid " Repeat: every week\n" #~ msgstr " Upprepa: varje vecka\n" #~ msgid " Repeat: every 2 weeks\n" #~ msgstr " Upprepa: varannan vecka\n" #~ msgid " Repeat: every month\n" #~ msgstr " Upprepa: varje mÃ¥nad\n" #~ msgid " Repeat: every year\n" #~ msgstr " Upprepa: varje Ã¥r\n" #~ msgid " Repeat: %d hours\n" #~ msgstr " Upprepa: %d timmar\n" #~ msgid " Phone: %s\n" #~ msgstr " Telefon: %s\n" #~ msgid " Location: %s\n" #~ msgstr " Plats: %s\n" #~ msgid "all\n" #~ msgstr "alla\n" #~ msgid "noans\n" #~ msgstr "inget svar\n" #~ msgid "unknown(0x%02x)\n" #~ msgstr "okänd(0x%02x)\n" #~ msgid "voice\n" #~ msgstr "röst\n" #~ msgid "fax\n" #~ msgstr "fax\n" #~ msgid "data\n" #~ msgstr "data\n" #~ msgid "Timeout: %d\n" #~ msgstr "Timeout: %d\n" #~ msgid "Network: %s, %s (%s), LAC: %02x%02x, CellID: %02x%02x\n" #~ msgstr "Nätverk: %s, %s (%s), LAC: %02x%02x, CellID: %02x%02x\n" #~ msgid "Group: " #~ msgstr "Grupp: " #, fuzzy #~ msgid " Extended address: %s\n" #~ msgstr "Ytterligare adressinformation" #, fuzzy #~ msgid " Street: %s\n" #~ msgstr " Text: %s\n" #, fuzzy #~ msgid " City: %s\n" #~ msgstr " Text: %s\n" #, fuzzy #~ msgid " State or province: %s\n" #~ msgstr "Län eller region" #, fuzzy #~ msgid " Zipcode: %s\n" #~ msgstr " Telefon: %s\n" #, fuzzy #~ msgid " Country: %s\n" #~ msgstr "Land" #~ msgid "Filename too long - will be truncated to 63 characters.\n" #~ msgstr "Filnamn för lÃ¥ngt - kommer att klippas ned till 63 tecken.\n" #~ msgid "%d. Delivery Report " #~ msgstr "%d. Leveransrapport " #~ msgid "(read)\n" #~ msgstr "(läst)\n" #~ msgid "(unread)\n" #~ msgstr "(oläst)\n" #~ msgid "(sent)\n" #~ msgstr "(skickade)\n" #~ msgid "(unsent)\n" #~ msgstr "(oskickade)\n" #~ msgid "%d. Picture Message " #~ msgstr "%d. Bildmeddelande " #~ msgid "%d. MO Message " #~ msgstr "%d. MO meddelande " #~ msgid "Logo:\n" #~ msgstr "Logotyp:\n" #~ msgid "Ringtone\n" #~ msgstr "Ringsignal\n" #~ msgid "Unknown\n" #~ msgstr "Okänd\n" #~ msgid "low\n" #~ msgstr "lÃ¥g\n" #~ msgid "Name: %s\n" #~ msgstr "Namn: %s\n" #~ msgid "URL: %s\n" #~ msgstr "URL: %s\n" #~ msgid "Home: %s\n" #~ msgstr "Hem: %s\n" #~ msgid "yes\n" #~ msgstr "ja\n" #~ msgid "no\n" #~ msgstr "nej\n" #~ msgid "SMS\n" #~ msgstr "SMS\n" #~ msgid "automatic\n" #~ msgstr "automatisk\n" #~ msgid " Number: %s\n" #~ msgstr " Nummer: %s\n" #~ msgid " connection: " #~ msgstr " anslutning: " #~ msgid " Server number: %s\n" #~ msgstr " Servernummer: %s\n" #~ msgid "" #~ "Sorry, phonebook name will be truncated,\n" #~ "because you save it into SIM memory!" #~ msgstr "" #~ "Ledsen, telefonbokens namn kommer att kortas,\n" #~ "ned för att du sparade den till SIM-minnet!" #~ msgid "%s: line %d: Can't write SM memory entry number %d! Error: %d\n" #~ msgstr "%s: rad %d: Kan inte skriva SM-minnespost nummer %d! Fel: %d\n" #~ msgid "Unrecognized [%s] option \"%s\", use \"%s\" or \"%s\" value\n" #~ msgstr "Okänd [%s] flagga \"%s\", använd värdet \"%s\" eller \"%s\"\n" #~ msgid "Unrecognized [logging] option \"%s\", use \"off\" or \"on\" value\n" #~ msgstr "" #~ "Okänd [logging] flagga \"%s\", använd \"off\" eller \"on\" som värden\n" #~ msgid "Cannot allocate memory!\n" #~ msgstr "Kunde inte allokera minne!\n" #~ msgid "Cannot write to read-only memory (Dialed Numbers)\n" #~ msgstr "Kan inte skriva till skrivskyddat minne (Ringda nummer)\n" #~ msgid "" #~ "\n" #~ "Date/time: %d/%d/%d %d:%02d:%02d Sender: %s Msg Center: %s\n" #~ "Text: %s\n" #~ msgstr "" #~ "r\n" #~ "Datum/tid: %d/%d/%d %d:%02d:%02d Avsändare: %s SMS-center: %s\n" #~ "Text: %s\n" #~ msgid "" #~ "\"%s\",\"%s\",,\"%02d/%02d/%02d,%02d:%02d:%02d+%02d\"\n" #~ "%s" #~ msgstr "" #~ "\"%s\",\"%s\",,\"%02d/%02d/%02d,%02d:%02d:%02d+%02d\"\n" #~ "%s" #~ msgid "REC READ" #~ msgstr "REC READ" #~ msgid "REC UNREAD" #~ msgstr "REC UNREAD" #~ msgid "0," #~ msgstr "0," #~ msgid "" #~ msgstr "" #~ msgid "" #~ "\n" #~ "No message under number %d\n" #~ msgstr "" #~ "\n" #~ "Inget meddelande under nummer %d\n" #~ msgid "" #~ "\n" #~ "The following commands work...\n" #~ msgstr "" #~ "\n" #~ "Följande kommandon fungerar...\n" #~ msgid "Nokia Mobile Phones\n" #~ msgstr "Nokia-mobiltelefoner\n" #~ msgid "Hugh Blemings, Pavel Janik ml. and others...\n" #~ msgstr "Hugh Blemings, Pavel Janik ml. och andra...\n" #~ msgid "gnokii configured on %s for models %s\n" #~ msgstr "gnokii konfigurerad den %s för modellerna %s\n" #~ msgid "none built in, choose your own\n" #~ msgstr "ingen inbyggd, välj din egna\n" #~ msgid "" #~ "\n" #~ "Unknown Result Code!\n" #~ msgstr "" #~ "\n" #~ "Okänd resultatkod!\n" #~ msgid "" #~ "waitcall 0.5 by Daniele Forsi\n" #~ "Usage: %s {without arguments}\n" #~ "Purpose: wait for a call, print caller number to stdout, hang up, then " #~ "exit\n" #~ msgstr "" #~ "waitcall 0.5 av Daniele Forsi\n" #~ "Användning: %s {utan argument}\n" #~ "Syfte: vänta pÃ¥ ett samtal, skriv ut inringande nummer till standard ut, " #~ "lägg pÃ¥ och avsluta\n" #~ msgid "Initializing...\n" #~ msgstr "Initierar...\n" #~ msgid "Waiting for a call.\n" #~ msgstr "Väntar pÃ¥ ett samtal.\n" #~ msgid "Hang up failed: %s\n" #~ msgstr "Lägg pÃ¥ misslyckades: %s\n" #~ msgid "Hang up ok\n" #~ msgstr "Lägg pÃ¥ ok\n" #~ msgid "ERROR\n" #~ msgstr "FEL\n" #~ msgid "No component found.\n" #~ msgstr "Ingen komponent hittades.\n" #~ msgid "" #~ "Component found\n" #~ "%s\n" #~ msgstr "" #~ "Komponent hittades\n" #~ "%s\n" #~ msgid "" #~ "usage: --writetodo vcalfile number\n" #~ " vcalfile - file name in vCal format\n" #~ " number - vCal entry from the file to be saved\n" #~ " NOTE: entry is written to the first empty location\n" #~ msgstr "" #~ "användning: --writetodo vcal-fil nummer\n" #~ " vcal-fil - filnamn i vCal-format\n" #~ " nummer - vCal-post frÃ¥n filen som ska sparas\n" #~ " OBSERVERA: posten skrivs till första tomma platsen\n" #~ msgid "Can't bind socket" #~ msgstr "Kan inte binda uttag" #~ msgid "Not WINSOCK2 :( - Get an upgrade dude!" #~ msgstr "Ingen WINSOCK2 :( - Uppgradera!" #~ msgid "Format problem on line [%s]\n" #~ msgstr "Formatproblem pÃ¥ rad [%s]\n" #~ msgid "" #~ "Sorry, this function is known to break your phone (Nokia phones series 40 " #~ "v1).\n" #~ "Refusing to do it. You may try to use AT driver. If you are brave enough " #~ "to\n" #~ "test the driver anyway, please contact developers at gnokii-users@nongnu." #~ "org.\n" #~ "See also http://thread.gmane.org/gmane.linux.drivers.gnokii/3195\n" #~ msgstr "" #~ "Tyvärr, denna funktion är känd att trasa sönder din telefon (Nokia-" #~ "telefoner serie 40 v1).\n" #~ "Vägrar göra det här. Du kan försöka att använda AT-drivaren. Om du är " #~ "tillräckligt modig\n" #~ "att testa drivaren, kontakta utvecklarna pÃ¥ adressen gnokii-users@nongnu." #~ "org.\n" #~ "Se ocksÃ¥ http://thread.gmane.org/gmane.linux.drivers.gnokii/3195\n" #~ msgid "" #~ "Usage:\n" #~ "General options:\n" #~ " gnokii --help\n" #~ " gnokii --monitor [delay|once]\n" #~ " gnokii --version\n" #~ "SMS options:\n" #~ " gnokii --getsms memory_type start [end] [-f file] [-F file] [-" #~ "d]\n" #~ " gnokii --deletesms memory_type start [end]\n" #~ " gnokii --sendsms destination [--smsc message_center_number |\n" #~ " --smscno message_center_index] [-r] [-C n] [-v n]\n" #~ " [--long n] [-i]\n" #~ " gnokii --savesms [--sender from] [--smsc message_center_number " #~ "|\n" #~ " --smscno message_center_index] [--folder folder_id]\n" #~ " [--location number] [--sent | --read] [--deliver] \n" #~ " [--datetime YYMMDDHHMMSS] \n" #~ " gnokii --getsmsc [start_number [end_number]] [-r|--raw]\n" #~ " gnokii --setsmsc\n" #~ " gnokii --createsmsfolder name\n" #~ " gnokii --deletesmsfolder number\n" #~ " gnokii --showsmsfolderstatus\n" #~ " gnokii --smsreader\n" #~ "Phonebook options:\n" #~ " gnokii --getphonebook memory_type start_number [end_number|" #~ "end]\n" #~ " [[-r|--raw]|[-v|--vcard]|[-l|--ldif]]\n" #~ " gnokii --writephonebook [[-o|--overwrite]|[-f|--find-free]]\n" #~ " [-m|--memory-type|--memory] [-n|--memory-location|--" #~ "memory]\n" #~ " [[-v|--vcard]|[-l|--ldif]]\n" #~ " gnokii --deletephonebook memory_type start_number [end_number|" #~ "end]\n" #~ "Calendar options:\n" #~ " gnokii --getcalendarnote start_number [end_number|end] [-v]\n" #~ " gnokii --writecalendarnote vcalendarfile number\n" #~ " gnokii --deletecalendarnote start [end_number|end]\n" #~ "ToDo options:\n" #~ " gnokii --gettodo start_number [end_number|end] [-v]\n" #~ " gnokii --writetodo vcalendarfile number\n" #~ " gnokii --deletealltodos\n" #~ "Dialling and call options:\n" #~ " gnokii --getspeeddial number\n" #~ " gnokii --setspeeddial number memory_type location\n" #~ " gnokii --dialvoice number\n" #~ " gnokii --senddtmf string\n" #~ " gnokii --answercall callid\n" #~ " gnokii --hangup callid\n" #~ " gnokii --divert {--op|-o} {register|enable|query|disable|" #~ "erasure}\n" #~ " {--type|-t} {all|busy|noans|outofreach|notavail}\n" #~ " {--call|-c} {all|voice|fax|data}\n" #~ " [{--timeout|-m} time_in_seconds]\n" #~ " [{--number|-n} number]\n" #~ "Phone settings:\n" #~ " gnokii --getdisplaystatus\n" #~ " gnokii --displayoutput\n" #~ " gnokii --getprofile [start_number [end_number]] [-r|--raw]\n" #~ " gnokii --setprofile\n" #~ " gnokii --getactiveprofile\n" #~ " gnokii --setactiveprofile profile_number\n" #~ " gnokii --netmonitor {reset|off|field|devel|next|nr}\n" #~ " gnokii --reset [soft|hard]\n" #~ " gnokii --setdatetime [YYYY [MM [DD [HH [MM]]]]]\n" #~ " gnokii --getdatetime\n" #~ " gnokii --setalarm [HH MM]\n" #~ " gnokii --getalarm\n" #~ "WAP options:\n" #~ " gnokii --getwapbookmark number\n" #~ " gnokii --writewapbookmark name URL\n" #~ " gnokii --deletewapbookmark number\n" #~ " gnokii --getwapsetting number [-r]\n" #~ " gnokii --writewapsetting\n" #~ " gnokii --activatewapsetting number\n" #~ "Logo options:\n" #~ " gnokii --sendlogo {caller|op|picture} destination logofile\n" #~ " [network code]\n" #~ " gnokii --setlogo op [logofile] [network code]\n" #~ " gnokii --setlogo startup [logofile]\n" #~ " gnokii --setlogo caller [logofile] [caller group number] [group " #~ "name]\n" #~ " gnokii --setlogo {dealer|text} [text]\n" #~ " gnokii --getlogo op [logofile] [network code]\n" #~ " gnokii --getlogo startup [logofile] [network code]\n" #~ " gnokii --getlogo caller [caller group number] [logofile]\n" #~ " [network code]\n" #~ " gnokii --getlogo {dealer|text}\n" #~ " gnokii --viewlogo logofile\n" #~ "Ringtone options:\n" #~ " gnokii --sendringtone rtttlfile destination\n" #~ " gnokii --getringtone rtttlfile [location] [-r|--raw]\n" #~ " gnokii --setringtone rtttlfile [location] [-r|--raw] [--name " #~ "name]\n" #~ " gnokii --playringtone rtttlfile [--volume vol]\n" #~ " gnokii --ringtoneconvert source destination\n" #~ " gnokii --getringtonelist\n" #~ " gnokii --deleteringtone start [end]\n" #~ "Security options:\n" #~ " gnokii --identify\n" #~ " gnokii --getlocksinfo\n" #~ msgstr "" #~ "Användning:\n" #~ "Allmänna flaggor:\n" #~ " gnokii --help\n" #~ " gnokii --monitor [delay|once]\n" #~ " gnokii --version\n" #~ "SMS-flaggor:\n" #~ " gnokii --getsms minnestyp start [slut] [-f fil] [-F fil] [-d]\n" #~ " gnokii --deletesms minnestyp start [slut]\n" #~ " gnokii --sendsms destination [--smsc meddelande_center_nummer " #~ "|\n" #~ " --smscno meddelande_center_index] [-r] [-C n] [-v n]\n" #~ " [--long n] [-i]\n" #~ " gnokii --savesms [--sender frÃ¥n] [--smsc " #~ "meddelande_center_nummer |\n" #~ " --smscno meddelande_center_index] [--folder mapp_id]\n" #~ " [--location nummer] [--sent | --read] [--deliver] \n" #~ " [--datetime Ã…Ã…MMDDHHMMSS] \n" #~ " gnokii --getsmsc [start_nummer [slut_number]] [-r|--raw]\n" #~ " gnokii --setsmsc\n" #~ " gnokii --createsmsfolder namn\n" #~ " gnokii --deletesmsfolder nummer\n" #~ " gnokii --showsmsfolderstatus\n" #~ " gnokii --smsreader\n" #~ "Flaggor för Kontakter:\n" #~ " gnokii --getphonebook minnestyp start_nummer [slut_nummer|" #~ "slut]\n" #~ " [[-r|--raw]|[-v|--vcard]|[-l|--ldif]]\n" #~ " gnokii --writephonebook [[-o|--overwrite]|[-f|--find-free]]\n" #~ " [-m|--memory-type|--memory] [-n|--memory-location|--" #~ "memory]\n" #~ " [[-v|--vcard]|[-l|--ldif]]\n" #~ " gnokii --deletephonebook minnestyp start_nummer [slut_nummer|" #~ "slut]\n" #~ "Flaggor för Kalender:\n" #~ " gnokii --getcalendarnote start_nummer [slut_nummer|slut] [-v]\n" #~ " gnokii --writecalendarnote vcalendarfil nummer\n" #~ " gnokii --deletecalendarnote start [slut_nummer|slut]\n" #~ "Flaggor för Att Göra:\n" #~ " gnokii --gettodo start_nummer [slut_number|slut] [-v]\n" #~ " gnokii --writetodo vcalendarfil nummer\n" #~ " gnokii --deletealltodos\n" #~ "Flaggor för samtal och ringa:\n" #~ " gnokii --getspeeddial nummer\n" #~ " gnokii --setspeeddial nummer minnestyp plats\n" #~ " gnokii --dialvoice nummer\n" #~ " gnokii --senddtmf sträng\n" #~ " gnokii --answercall samtals-id\n" #~ " gnokii --hangup samtals-id\n" #~ " gnokii --divert {--op|-o} {register|enable|query|disable|" #~ "erasure}\n" #~ " {--type|-t} {all|busy|noans|outofreach|notavail}\n" #~ " {--call|-c} {all|voice|fax|data}\n" #~ " [{--timeout|-m} tid_i_sekunder]\n" #~ " [{--number|-n} nummer]\n" #~ "Telefonflaggor:\n" #~ " gnokii --getdisplaystatus\n" #~ " gnokii --displayoutput\n" #~ " gnokii --getprofile [start_nummer [slut_nummer]] [-r|--raw]\n" #~ " gnokii --setprofile\n" #~ " gnokii --getactiveprofile\n" #~ " gnokii --setactiveprofile profil_nummer\n" #~ " gnokii --netmonitor {reset|off|field|devel|next|nr}\n" #~ " gnokii --reset [soft|hard]\n" #~ " gnokii --setdatetime [Ã…Ã…Ã…Ã… [MM [DD [HH [MM]]]]]\n" #~ " gnokii --getdatetime\n" #~ " gnokii --setalarm [HH MM]\n" #~ " gnokii --getalarm\n" #~ "WAP-flaggor:\n" #~ " gnokii --getwapbookmark nummer\n" #~ " gnokii --writewapbookmark namn URL\n" #~ " gnokii --deletewapbookmark nummer\n" #~ " gnokii --getwapsetting nummer [-r]\n" #~ " gnokii --writewapsetting\n" #~ " gnokii --activatewapsetting nummer\n" #~ "Logoflaggor:\n" #~ " gnokii --sendlogo {caller|op|picture} destination logofil\n" #~ " [nätverkskod]\n" #~ " gnokii --setlogo op [logofil] [nätverkskod]\n" #~ " gnokii --setlogo startup [logofil]\n" #~ " gnokii --setlogo caller [logofil] [samtalsgruppnummer] " #~ "[gruppnamn]\n" #~ " gnokii --setlogo {dealer|text} [text]\n" #~ " gnokii --getlogo op [logofil] [nätverkskod]\n" #~ " gnokii --getlogo startup [logofil] [nätverkskod]\n" #~ " gnokii --getlogo caller [samtalsgruppnummer] [logofil]\n" #~ " [nätverkskod]\n" #~ " gnokii --getlogo {dealer|text}\n" #~ " gnokii --viewlogo logofil\n" #~ "Ringsignalsflaggor:\n" #~ " gnokii --sendringtone rtttlfile destination\n" #~ " gnokii --getringtone rtttlfile [plats] [-r|--raw]\n" #~ " gnokii --setringtone rtttlfile [plats] [-r|--raw] [--name " #~ "namn]\n" #~ " gnokii --playringtone rtttlfile [--volume vol]\n" #~ " gnokii --ringtoneconvert källa destination\n" #~ " gnokii --getringtonelist\n" #~ " gnokii --deleteringtone start [slut]\n" #~ "Säkerhetsflaggor:\n" #~ " gnokii --identify\n" #~ " gnokii --getlocksinfo\n" #~ msgid "" #~ " usage: gnokii --sendsms destination\n" #~ " [--smsc message_center_number | --smscno " #~ "message_center_index]\n" #~ " [-r] [-C n] [-v n] [--long n] [--animation file;file;file;" #~ "file]\n" #~ " [--concat this;total;serial]\n" #~ " Give the text of the message to the standard input.\n" #~ " destination - phone number where to send SMS\n" #~ " --smsc - phone number of the SMSC\n" #~ " --smscno - index of the SMSC set stored in the phone\n" #~ " -r - require delivery report\n" #~ " -C n - message Class; values [0, 3]\n" #~ " -v n - set validity period to n minutes\n" #~ " --long n - read n bytes from the input; default is 160\n" #~ "\n" #~ msgstr "" #~ " användning: gnokii --sendsms destination\n" #~ " [--smsc meddelande_center_nummer | --smscno " #~ "meddelande_center_index]\n" #~ " [-r] [-C n] [-v n] [--long n] [--animation fil;fil;fil;" #~ "fil]\n" #~ " [--concat this;total;serial]\n" #~ " Ange texten för meddelandet till standard in.\n" #~ " destination - telefonnumret dit SMS:et ska skickas\n" #~ " --smsc - telefonnummer till SMS-centret\n" #~ " --smscno - index för SMSC som lagrats i telefonen\n" #~ " -r - kräv leveransrapport\n" #~ " -C n - meddelandeklass; värden [0, 3]\n" #~ " -v n - sätt giltighetsperiod till n minuter\n" #~ " --long n - läs n bytes frÃ¥n inmatning; standard är 160\n" #~ "\n" #~ msgid "storing sms" #~ msgstr "lagrar sms" #~ msgid "Input too long!\n" #~ msgstr "Inmatning för lÃ¥ng!\n" #~ msgid "" #~ "Text: %s\n" #~ "\n" #~ msgstr "" #~ "Text: %s\n" #~ "\n" #~ msgid "(not read)\n" #~ msgstr "(inte läst)\n" #~ msgid "Error setting" #~ msgstr "Fel vid inställning" #~ msgid " dealer" #~ msgstr " handlare" #~ msgid "Reminder\n" #~ msgstr "PÃ¥minnelse\n" #~ msgid "Call\n" #~ msgstr "Samtal\n" #~ msgid "Meeting\n" #~ msgstr "Möte\n" #~ msgid "Birthday\n" #~ msgstr "Födelsedag\n" #~ msgid "Memo\n" #~ msgstr "Memo\n" #~ msgid "" #~ "%d. Name: %s\n" #~ "Number: %s\n" #~ "Group id: %d\n" #~ msgstr "" #~ "%d. Namn: %s\n" #~ "Nummer: %s\n" #~ "Grupp ID: %d\n" #~ msgid "Address: " #~ msgstr "Address: " #~ msgid "Notes: " #~ msgstr "Noteringar: " #~ msgid "Cellular number: " #~ msgstr "Mobilnummer: " #~ msgid "Preferred number: " #~ msgstr "Föredraget nummer: " #~ msgid "Unknown (%d): " #~ msgstr "Okänd (%d): " #~ msgid "WWW address: " #~ msgstr "Webbplats: " #~ msgid "(unknown)" #~ msgstr "(okänd)" #~ msgid "" #~ "GN_OP_GetSMSFolderStatus at line %d in file %s returns error %d\n" #~ "Entering dumb mode." #~ msgstr "" #~ "GN_OP_GetSMSFolderStatus pÃ¥ rad %d i filen %s svarade med fel %d\n" #~ "GÃ¥r in i dumläget." #~ msgid "" #~ "GN_OP_GetSMSStatus at line %d in file %s returns error %d\n" #~ "Entering dumb mode." #~ msgstr "" #~ "GN_OP_GetSMSStatus pÃ¥ rad %d i filen %s svarade med fel %d\n" #~ "GÃ¥r in i dumläget." #~ msgid "Inserting sms from %s unsuccessful.\n" #~ msgstr "Inmatning av sms frÃ¥n %s misslyckades.\n" #~ msgid "width: %i, height: %i\n" #~ msgstr "bredd: %i, höjd: %i\n" #~ msgid "LogoTypeEvent called!\n" #~ msgstr "LogoTypeEvent anropades!\n" #~ msgid "1" #~ msgstr "1" #~ msgid "2" #~ msgstr "2" #~ msgid "3" #~ msgstr "3" #~ msgid "4" #~ msgstr "4" #~ msgid "5" #~ msgstr "5" #~ msgid "6" #~ msgstr "6" #~ msgid "7" #~ msgstr "7" #~ msgid "8" #~ msgstr "8" #~ msgid "9" #~ msgstr "9" #~ msgid "+" #~ msgstr "+" #~ msgid "0" #~ msgstr "0" #~ msgid "*" #~ msgstr "*" #~ msgid "p" #~ msgstr "p" #~ msgid "w" #~ msgstr "w" #~ msgid " Type of the note: " #~ msgstr " Typ av notering: " #~ msgid " Date: %d-%02d-%02d\n" #~ msgstr " Datum: %d-%02d-%02d\n" #~ msgid " Time: %02d:%02d:%02d\n" #~ msgstr " Tid: %02d:%02d:%02d\n" gnokii-0.6.31/po/POTFILES.in0000644000175000017500000000326511666163120013404 0ustar leoleocommon/cfgreader.c common/data/rlp-common.c common/data/virtmodem.c common/devices/tcp.c common/devices/unixbluetooth.c common/devices/unixirda.c common/devices/unixserial.c common/devices/winbluetooth.c common/devices/winirda.c common/gsm-bitmaps.c common/gsm-common.c common/gsm-error.c common/gsm-filetypes.c common/gsm-networks.c common/gsm-ringtones.c common/gsm-sms.c common/gsm-statemachine.c common/libfunctions.c common/links/atbus.c common/links/cbus.c common/links/fbus-3110.c common/links/fbus.c common/links/fbus-phonet.c common/links/gnbus.c common/links/m2bus.c common/misc.c common/nokia-decoding.c common/phones/atgen.c common/phones/fake.c common/phones/generic.c common/phones/nk3110.c common/phones/nk6100.c common/phones/nk6510.c common/phones/nk7110.c common/phones/nokia.c common/phones/pcsc.c common/vcal.lx common/vcard.c getopt/getopt.c gnokiid/gnokiid.c gnokii/gnokii.c gnokii/gnokii-calendar.c gnokii/gnokii-dial.c gnokii/gnokii-file.c gnokii/gnokii-logo.c gnokii/gnokii-mms.c gnokii/gnokii-monitor.c gnokii/gnokii-other.c gnokii/gnokii-phonebook.c gnokii/gnokii-profile.c gnokii/gnokii-ringtone.c gnokii/gnokii-security.c gnokii/gnokii-settings.c gnokii/gnokii-sms.c gnokii/gnokii-todo.c gnokii/gnokii-utils.c gnokii/gnokii-wap.c smsd/file.c smsd/lowlevel.c smsd/mysql.c smsd/pq.c smsd/smsd.c smsd/sqlite.c utils/mgnokiidev.c xgnokii/xgnokii.c xgnokii/xgnokii_calendar.c xgnokii/xgnokii_cfg.c xgnokii/xgnokii_common.c xgnokii/xgnokii_contacts.c xgnokii/xgnokii_data.c xgnokii/xgnokii.desktop.in xgnokii/xgnokii_dtmf.c xgnokii/xgnokii_logos.c xgnokii/xgnokii_lowlevel.c xgnokii/xgnokii_netmon.c xgnokii/xgnokii_sms.c xgnokii/xgnokii_speed.c xgnokii/xgnokii_xkeyb.c xgnokii/xgnokii_xring.c gnokii-0.6.31/po/fr.po0000644000175000017500000057347511666163120012615 0ustar leoleo# This is the French locale definition for Gnokii. # Copyright (C) Daniel Egger , 1999, 2000. # Markus Plail , 2002 # Olivier Kaloudoff , 2006 # msgid "" msgstr "" "Project-Id-Version: gnokii 0.6.28\n" "Report-Msgid-Bugs-To: feedback@gnokii.org\n" "POT-Creation-Date: 2011-12-01 21:36+0100\n" "PO-Revision-Date: 2009-03-27 16:51+0100\n" "Last-Translator: ploc feedback@gnokii.org>\n" "Language-Team: French\n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-Language: French\n" "X-Poedit-Country: FRANCE\n" #. Line not part of any heading #: ../common/cfgreader.c:458 #, c-format msgid "" "Orphaned line: %s\n" "If in doubt place this line into [global] section.\n" msgstr "" "Ligne orpheline : %s\n" "Dans le doute, placez cette ligne dans la section [global].\n" #: ../common/cfgreader.c:732 ../common/cfgreader.c:962 #, c-format msgid "No %s section in the config file.\n" msgstr "Aucune section %s dans le fichier de configuration.\n" #: ../common/cfgreader.c:738 ../common/cfgreader.c:744 #: ../common/cfgreader.c:750 #, c-format msgid "You need to define '%s' in the config file.\n" msgstr "Vous devez définir '%s' dans le fichier de configuration.\n" #: ../common/cfgreader.c:755 ../common/cfgreader.c:768 #: ../common/cfgreader.c:777 ../common/cfgreader.c:785 #: ../common/cfgreader.c:797 ../common/cfgreader.c:806 #: ../common/cfgreader.c:814 ../common/cfgreader.c:824 #: ../common/cfgreader.c:842 ../common/cfgreader.c:850 #: ../common/cfgreader.c:871 ../common/cfgreader.c:980 #, c-format msgid "Unsupported [%s] %s value \"%s\"\n" msgstr "Valeur [%s] %s non supportée \"%s\"\n" #: ../common/cfgreader.c:769 ../common/cfgreader.c:778 #: ../common/cfgreader.c:786 ../common/cfgreader.c:807 #: ../common/cfgreader.c:815 ../common/cfgreader.c:825 #: ../common/cfgreader.c:843 ../common/cfgreader.c:851 #, c-format msgid "Assuming: %d\n" msgstr "Valeur supposée : %d\n" #: ../common/cfgreader.c:798 ../common/cfgreader.c:872 #: ../common/cfgreader.c:981 #, c-format msgid "Use either \"%s\" or \"%s\".\n" msgstr "Utilisez soit \"%s\" soit \"%s\".\n" #: ../common/cfgreader.c:799 ../common/cfgreader.c:873 #: ../common/cfgreader.c:982 #, c-format msgid "Assuming: %s\n" msgstr "Valeur supposée : %s\n" #: ../common/cfgreader.c:1172 #, c-format msgid "Couldn't read %s config file.\n" msgstr "Impossible de lire le fichier de configuration %s.\n" #: ../common/cfgreader.c:1187 #, c-format msgid "Failed to initialize libgnokii.\n" msgstr "Echec de l'initialisation de libgnokii.\n" #: ../common/cfgreader.c:1192 #, c-format msgid "Couldn't open a config file or memory.\n" msgstr "Impossible d'ouvrir un fichier de configuration ou une mémoire.\n" #: ../common/cfgreader.c:1282 #, c-format msgid "Config error - no model specified.\n" msgstr "Erreur de configuration - aucun modele de téléphone spécifié.\n" #: ../common/cfgreader.c:1286 #, c-format msgid "Config error - no port specified.\n" msgstr "Erreur de configuration - pas de port spécifié.\n" #: ../common/data/virtmodem.c:144 #, c-format msgid "gn_vm_initialise - VM_GSMInitialise failed!\n" msgstr "gn_vm_initialise - VM_GSMInitialise : échec !\n" #: ../common/data/virtmodem.c:151 #, c-format msgid "gn_vm_initialise - VM_PtySetup failed!\n" msgstr "gn_vm_initialise - VM_PtySetup : échec !\n" #: ../common/data/virtmodem.c:156 #, c-format msgid "gn_vm_initialise - gn_atem_initialise failed!\n" msgstr "gn_vm_initialise - gn_atem_initialise : échec !\n" #: ../common/data/virtmodem.c:161 #, fuzzy, c-format msgid "gn_vm_initialise - dp_Initialise failed!\n" msgstr "gn_vm_Initialise - dp_Initialise : échec !\n" #: ../common/data/virtmodem.c:365 #, fuzzy, c-format msgid "Cannot access %s, check the bindir in your config file!\n" msgstr "" "Accès à %s impossible, vérifier le paramètre bindir dans votre fichier de " "configuration gnokiirc !\n" #: ../common/data/virtmodem.c:372 ../utils/mgnokiidev.c:186 #, c-format msgid "Couldn't open pty!\n" msgstr "Impossible d'ouvrir un pty.\n" #: ../common/data/virtmodem.c:389 ../gnokii/gnokii-other.c:78 #: ../smsd/lowlevel.c:124 ../xgnokii/xgnokii_lowlevel.c:200 #, c-format msgid "GSM/FBUS init failed! (Unknown model?). Quitting.\n" msgstr "Initialisation GSM/FBUS : échec (modèle inconnu ?).\n" #: ../common/devices/tcp.c:80 msgid "Gnokii tcp_open: socket()" msgstr "Gnokii tcp_open : socket()" #: ../common/devices/tcp.c:89 #, c-format msgid "Gnokii tcp_open: colon (':') not found in connect strings \"%s\"!\n" msgstr "" "Gnokii tcp_open : caractère \":\" non trouvé dans la chaine de connection " "\"%s\" !\n" #: ../common/devices/tcp.c:97 #, c-format msgid "Gnokii tcp_open: Port string \"%s\" not valid for IPv4 connection!\n" msgstr "Gnokii tcp_open: Chaine \"%s\" invalide pour une connexion IPv4 \n" #: ../common/devices/tcp.c:101 #, c-format msgid "Gnokii tcp_open: Unknown host \"%s\"!\n" msgstr "Gnokii tcp_open : hôte inconnu \"%s\" !\n" #: ../common/devices/tcp.c:105 #, c-format msgid "Gnokii tcp_open: Address resolve for host \"%s\" not compatible!\n" msgstr "" "Gnokii tcp_open : résolution d'adresse pour l'hôte \"%s\" non compatible !\n" #: ../common/devices/tcp.c:115 msgid "Gnokii tcp_open: connect()" msgstr "Gnokii tcp_open : connect()" #: ../common/devices/tcp.c:127 #, c-format msgid "Gnokii tcp_close: disconnect_script\n" msgstr "Gnokii tcp_close : disconnect_script\n" #: ../common/devices/tcp.c:150 #, c-format msgid "Gnokii tcp_opendevice: connect_script\n" msgstr "Gnokii tcp_opendevice : connect_script\n" #: ../common/devices/tcp.c:160 msgid "Gnokii tcp_opendevice: fcntl(F_SETOWN)" msgstr "Gnokii tcp_opendevice : fnctl(F_SETOWN)" #: ../common/devices/tcp.c:183 msgid "Gnokii tcp_opendevice: fcntl(F_SETFL)" msgstr "Gnokii tcp_opendevice : fnctl(F_SETFL)" #: ../common/devices/unixbluetooth.c:497 #, c-format msgid "Invalid bluetooth address \"%s\"\n" msgstr "Adresse bluetooth invalide \"%s\"\n" #: ../common/devices/unixbluetooth.c:502 msgid "Can't create socket" msgstr "Impossible de creer une socket" #: ../common/devices/unixbluetooth.c:521 #, c-format msgid "" "Cannot find any appropriate rfcomm channel and none was specified in the " "config.\n" msgstr "" "Impossible de déterminer le canal rfcomm approprié et aucun n'était spécifié " "dans le fichier de configuration.\n" #: ../common/devices/unixbluetooth.c:530 msgid "Can't connect" msgstr "Connection impossible" #: ../common/devices/unixirda.c:150 #, c-format msgid "Virtual IrCOMM device unsupported under Linux\n" msgstr "Péripherique virtuel IrCOMM non supporte sous Linux\n" #: ../common/devices/unixserial.c:117 #, c-format msgid "device_script(\"%s\"): fork() failure: %s!\n" msgstr "device_script(\"%s\") : fork() échec : %s !\n" #: ../common/devices/unixserial.c:124 #, c-format msgid "device_script(\"%s\"): file descriptor preparation failure: %s\n" msgstr "" "device_script(\"%s\") : échec de la préparation du descripteur de fichier : " "%s\n" #: ../common/devices/unixserial.c:130 #, c-format msgid "device_script(\"%s\"): script execution failure: %s\n" msgstr "device_script(\"%s\"): échec de l'exécution du script : %s\n" #: ../common/devices/unixserial.c:137 #, c-format msgid "" "device_script(\"%s\"): child script execution failure: %s, exit code=%d\n" msgstr "" "device_script(\"%s\") : erreur dans le script fils : %s, code de retour = " "%d\n" #: ../common/devices/unixserial.c:138 msgid "normal exit" msgstr "sortie normale du programme" #: ../common/devices/unixserial.c:138 msgid "abnormal exit" msgstr "sortie anormale du programme" #: ../common/devices/unixserial.c:394 #, c-format msgid "Serial port speed %d not supported!\n" msgstr "Vitesse %d non supportee pour le port série.\n" #: ../common/devices/unixserial.c:434 #, c-format msgid "ERROR: Modem DCD is down and global/require_dcd parameter is set!\n" msgstr "" "ERROR: le modem DCD est éteint et le paramètre global/require_dcd est " "actif !\n" #: ../common/devices/winbluetooth.c:70 ../common/devices/winirda.c:113 #, c-format msgid "Failed to initialize socket subsystem: need WINSOCK2. Please upgrade.\n" msgstr "" "Echec de l'initialisation du sous-système de socket : nécessite WINSOCK2. " "Mettez à jour votre configuration.\n" #: ../common/gsm-common.c:148 msgid "Internal memory" msgstr "Memoire interne" #: ../common/gsm-common.c:149 msgid "SIM card" msgstr "carte SIM" #: ../common/gsm-common.c:150 msgid "Fixed dial numbers" msgstr "Numéros d'appel fixes" #: ../common/gsm-common.c:151 msgid "Own numbers" msgstr "Numéros propres" #: ../common/gsm-common.c:152 msgid "Emergency numbers" msgstr "Numeros d'urgence" #: ../common/gsm-common.c:153 #, fuzzy msgid "Dialled numbers" msgstr "Numeros d'appels émis" #: ../common/gsm-common.c:154 msgid "Received numbers" msgstr "Numéros d'appels reçus" #: ../common/gsm-common.c:155 msgid "Missed numbers" msgstr "Numéros d'appels manqués" #: ../common/gsm-common.c:156 #, fuzzy msgid "Last dialled" msgstr "Numéro compose récemment" #: ../common/gsm-common.c:157 #, fuzzy msgid "Barred dialling numbers" msgstr "Numeros d'appel interdits" #: ../common/gsm-common.c:158 #, fuzzy msgid "Service dialling numbers" msgstr "Numeros d'appel de service" #: ../common/gsm-common.c:159 msgid "Combined ME and SIM phonebook" msgstr "carnet d'adresse combiné téléphone/carte SIM" #: ../common/gsm-common.c:160 msgid "Computer memory" msgstr "Mémoire ordinateur" #: ../common/gsm-common.c:161 msgid "Currently selected memory" msgstr "Mémoire sélectionnée" #: ../common/gsm-common.c:162 msgid "SMS Inbox" msgstr "SMS reçus" #: ../common/gsm-common.c:163 msgid "SMS Outbox, sent items" msgstr "SMS envoyés" #: ../common/gsm-common.c:164 msgid "SMS Archive" msgstr "SMS archivés" #: ../common/gsm-common.c:165 msgid "SMS Templates" msgstr "Modèles de SMS" #: ../common/gsm-common.c:166 msgid "SMS Status Reports" msgstr "Rapports d'état des SMS" #: ../common/gsm-common.c:167 msgid "SMS Drafts" msgstr "Brouillons de SMS" #: ../common/gsm-common.c:168 msgid "SMS Outbox, items to be sent" msgstr "SMS à envoyer" #: ../common/gsm-common.c:169 msgid "SMS Folder 1" msgstr "Répertoire SMS 1" #: ../common/gsm-common.c:170 msgid "SMS Folder 2" msgstr "Répertoire SMS 2" #: ../common/gsm-common.c:171 msgid "SMS Folder 3" msgstr "Répertoire SMS 3" #: ../common/gsm-common.c:172 msgid "SMS Folder 4" msgstr "Répertoire SMS 4" #: ../common/gsm-common.c:173 msgid "SMS Folder 5" msgstr "Répertoire SMS 5" #: ../common/gsm-common.c:174 msgid "SMS Folder 6" msgstr "Répertoire SMS 6" #: ../common/gsm-common.c:175 msgid "SMS Folder 7" msgstr "Répertoire SMS 7" #: ../common/gsm-common.c:176 msgid "SMS Folder 8" msgstr "Répertoire SMS 8" #: ../common/gsm-common.c:177 msgid "SMS Folder 9" msgstr "Répertoire SMS 9" #: ../common/gsm-common.c:178 msgid "SMS Folder 10" msgstr "Répertoire SMS 10" #: ../common/gsm-common.c:179 msgid "SMS Folder 11" msgstr "Répertoire SMS 11" #: ../common/gsm-common.c:180 msgid "SMS Folder 12" msgstr "Répertoire SMS 12" #: ../common/gsm-common.c:181 msgid "SMS Folder 13" msgstr "Répertoire SMS 13" #: ../common/gsm-common.c:182 msgid "SMS Folder 14" msgstr "Répertoire SMS 14" #: ../common/gsm-common.c:183 msgid "SMS Folder 15" msgstr "Répertoire SMS 15" #: ../common/gsm-common.c:184 msgid "SMS Folder 16" msgstr "Répertoire SMS 16" #: ../common/gsm-common.c:185 msgid "SMS Folder 17" msgstr "Répertoire SMS 17" #: ../common/gsm-common.c:186 msgid "SMS Folder 18" msgstr "Répertoire SMS 18" #: ../common/gsm-common.c:187 msgid "SMS Folder 19" msgstr "Répertoire SMS 19" #: ../common/gsm-common.c:188 msgid "SMS Folder 20" msgstr "Répertoire SMS 20" #: ../common/gsm-common.c:189 msgid "Cell Broadcast" msgstr "" #: ../common/gsm-common.c:190 ../common/gsm-common.c:211 #: ../common/gsm-common.c:222 ../common/gsm-common.c:235 #: ../common/gsm-common.c:290 ../common/gsm-common.c:343 #: ../common/gsm-common.c:356 ../common/gsm-common.c:380 #: ../common/gsm-common.c:381 ../common/gsm-common.c:398 #: ../common/gsm-common.c:409 ../common/gsm-common.c:424 #: ../common/gsm-common.c:437 ../common/gsm-common.c:451 #: ../common/gsm-common.c:464 ../common/gsm-common.c:474 #: ../common/gsm-common.c:485 ../common/gsm-common.c:494 #: ../common/gsm-common.c:505 ../common/gsm-common.c:514 #: ../common/gsm-common.c:524 ../common/gsm-common.c:533 #: ../common/gsm-common.c:542 ../common/gsm-common.c:556 #: ../common/gsm-common.c:565 ../common/gsm-common.c:574 #: ../common/gsm-common.c:587 ../common/gsm-common.c:598 #: ../common/gsm-common.c:610 ../common/gsm-common.c:624 #: ../common/gsm-common.c:635 ../common/gsm-common.c:647 #: ../common/gsm-sms.c:409 ../common/libfunctions.c:219 #: ../common/phones/atgen.c:2695 ../common/phones/atgen.c:2702 #: ../common/phones/atgen.c:3183 ../common/phones/nk6100.c:4087 #: ../gnokii/gnokii-ringtone.c:90 ../xgnokii/xgnokii_calendar.c:187 #: ../xgnokii/xgnokii_contacts.c:765 ../xgnokii/xgnokii_contacts.c:821 #: ../xgnokii/xgnokii_contacts.c:948 ../xgnokii/xgnokii_contacts.c:990 #: ../xgnokii/xgnokii_contacts.c:1206 ../xgnokii/xgnokii_contacts.c:1230 #, c-format msgid "Unknown" msgstr "Inconnu" #: ../common/gsm-common.c:197 ../common/gsm-common.c:234 #: ../common/gsm-common.c:355 msgid "None" msgstr "Aucun" #: ../common/gsm-common.c:198 msgid "Serial" msgstr "série" #: ../common/gsm-common.c:199 msgid "Serial DAU9P" msgstr "Série DAU9P" #: ../common/gsm-common.c:200 msgid "Serial DLR3P" msgstr "Série DLR3P" #: ../common/gsm-common.c:201 msgid "Infrared (old Nokias)" msgstr "Infrarouge (vieux Nokia)" #: ../common/gsm-common.c:202 msgid "IrDA" msgstr "IrDA (infrarouge)" #: ../common/gsm-common.c:203 msgid "Bluetooth" msgstr "Bluetooth" #: ../common/gsm-common.c:204 msgid "Tekram Ir-Dongle" msgstr "Adaptateur dongle infrarouge Tekram" #: ../common/gsm-common.c:205 msgid "TCP" msgstr "TCP" #: ../common/gsm-common.c:206 msgid "M2BUS" msgstr "M2BUS" #: ../common/gsm-common.c:207 msgid "DKU2 (kernel support)" msgstr "DKU2 (support noyau)" #: ../common/gsm-common.c:208 msgid "DKU2 (libusb support)" msgstr "DKU2 (support libusb)" #: ../common/gsm-common.c:209 msgid "Smart Card reader (libpcsclite support)" msgstr "" #: ../common/gsm-common.c:210 #, fuzzy msgid "Linux Phonet (kernel support)" msgstr "DKU2 (support noyau)" #: ../common/gsm-common.c:218 msgid "AC-DC" msgstr "Courant Alternatif (AC) / Courant Continu (DC)" #: ../common/gsm-common.c:219 msgid "Battery" msgstr "Batterie" #: ../common/gsm-common.c:220 #, fuzzy msgid "No battery" msgstr "Batterie" #: ../common/gsm-common.c:221 msgid "Power fault" msgstr "" #: ../common/gsm-common.c:229 msgid "Security code" msgstr "Code de sécurité" #: ../common/gsm-common.c:230 msgid "PIN" msgstr "PIN" #: ../common/gsm-common.c:231 msgid "PIN2" msgstr "PIN2" #: ../common/gsm-common.c:232 msgid "PUK" msgstr "PUK" #: ../common/gsm-common.c:233 msgid "PUK2" msgstr "PUK2" #: ../common/gsm-common.c:244 ../common/gsm-common.c:245 #: ../common/gsm-common.c:250 msgid "General number" msgstr "Numéro général" #: ../common/gsm-common.c:246 msgid "Home number" msgstr "Numéro domicile" #: ../common/gsm-common.c:247 msgid "Mobile number" msgstr "Numéro mobile" #: ../common/gsm-common.c:248 msgid "Fax number" msgstr "Numéro de fax" #: ../common/gsm-common.c:249 msgid "Work number" msgstr "Numéro travail" #: ../common/gsm-common.c:251 ../common/gsm-common.c:340 msgid "Unknown number" msgstr "Numéro inconnu" #: ../common/gsm-common.c:258 ../gnokii/gnokii-phonebook.c:187 #: ../gnokii/gnokii-wap.c:89 ../gnokii/gnokii-wap.c:220 #: ../xgnokii/xgnokii_contacts.c:749 ../xgnokii/xgnokii_contacts.c:815 #: ../xgnokii/xgnokii_contacts.c:946 ../xgnokii/xgnokii_contacts.c:988 #: ../xgnokii/xgnokii_contacts.c:1224 ../xgnokii/xgnokii_contacts.c:1729 #: ../xgnokii/xgnokii_contacts.c:2936 ../xgnokii/xgnokii_contacts.c:3120 #: ../xgnokii/xgnokii_speed.c:542 msgid "Name" msgstr "Nom" #: ../common/gsm-common.c:259 ../common/gsm-common.c:422 #: ../xgnokii/xgnokii.c:542 ../xgnokii/xgnokii.c:1433 #: ../xgnokii/xgnokii_contacts.c:743 ../xgnokii/xgnokii_contacts.c:812 #: ../xgnokii/xgnokii_contacts.c:945 ../xgnokii/xgnokii_contacts.c:987 #: ../xgnokii/xgnokii_contacts.c:1220 msgid "Email" msgstr "Email" #: ../common/gsm-common.c:260 ../common/gsm-common.c:277 msgid "Postal address" msgstr "Adresse postale" #: ../common/gsm-common.c:261 ../xgnokii/xgnokii_contacts.c:731 #: ../xgnokii/xgnokii_contacts.c:806 ../xgnokii/xgnokii_contacts.c:943 #: ../xgnokii/xgnokii_contacts.c:985 ../xgnokii/xgnokii_contacts.c:1026 #: ../xgnokii/xgnokii_contacts.c:1212 msgid "Note" msgstr "Note" #: ../common/gsm-common.c:262 ../gnokii/gnokii-dial.c:376 #: ../gnokii/gnokii-phonebook.c:203 ../gnokii/gnokii-wap.c:231 #: ../xgnokii/xgnokii_calendar.c:1540 ../xgnokii/xgnokii_contacts.c:1737 #: ../xgnokii/xgnokii_contacts.c:2936 ../xgnokii/xgnokii_contacts.c:3120 #: ../xgnokii/xgnokii_speed.c:542 msgid "Number" msgstr "Numéro" #: ../common/gsm-common.c:263 ../common/gsm-common.c:272 #: ../common/gsm-common.c:367 ../xgnokii/xgnokii.c:1142 #: ../xgnokii/xgnokii_xring.c:845 msgid "Ringtone" msgstr "Sonnerie" #: ../common/gsm-common.c:264 msgid "Date" msgstr "Date" #: ../common/gsm-common.c:265 msgid "Pointer" msgstr "Pointeur" #: ../common/gsm-common.c:266 ../common/gsm-common.c:369 msgid "Logo" msgstr "Logo" #: ../common/gsm-common.c:267 msgid "Logo switch" msgstr "Changement de logo" #: ../common/gsm-common.c:268 ../xgnokii/xgnokii_contacts.c:2936 #: ../xgnokii/xgnokii_contacts.c:3120 msgid "Group" msgstr "Groupe" #: ../common/gsm-common.c:269 ../gnokii/gnokii-wap.c:90 #: ../xgnokii/xgnokii_contacts.c:758 ../xgnokii/xgnokii_contacts.c:818 #: ../xgnokii/xgnokii_contacts.c:947 ../xgnokii/xgnokii_contacts.c:989 #: ../xgnokii/xgnokii_contacts.c:1227 msgid "URL" msgstr "URL" #: ../common/gsm-common.c:270 ../gnokii/gnokii-calendar.c:206 #: ../xgnokii/xgnokii_calendar.c:1541 msgid "Location" msgstr "Lieu" #: ../common/gsm-common.c:271 msgid "Image" msgstr "Image" #: ../common/gsm-common.c:273 msgid "User ID" msgstr "Identifiant utilisateur" #: ../common/gsm-common.c:274 msgid "Push-To-Talk address" msgstr "Adresse PTT (push to talk)" #: ../common/gsm-common.c:275 msgid "First name" msgstr "Prénom" #: ../common/gsm-common.c:276 msgid "Last name" msgstr "Nom" #: ../common/gsm-common.c:278 ../gnokii/gnokii-phonebook.c:212 msgid "Extended address" msgstr "Complément d'adresse" #: ../common/gsm-common.c:279 ../gnokii/gnokii-phonebook.c:214 msgid "Street" msgstr "Rue" #: ../common/gsm-common.c:280 ../gnokii/gnokii-phonebook.c:216 msgid "City" msgstr "Ville" #: ../common/gsm-common.c:281 ../gnokii/gnokii-phonebook.c:218 msgid "State or province" msgstr "Etat ou région" #: ../common/gsm-common.c:282 ../gnokii/gnokii-phonebook.c:220 msgid "Zip code" msgstr "Code postal" #: ../common/gsm-common.c:283 ../gnokii/gnokii-phonebook.c:222 msgid "Country" msgstr "Pays" #: ../common/gsm-common.c:284 msgid "Formal name" msgstr "Nom formel" #: ../common/gsm-common.c:285 msgid "Job title" msgstr "Intitulé du travail" #: ../common/gsm-common.c:286 msgid "Company" msgstr "Entreprise" #: ../common/gsm-common.c:287 msgid "Nickname" msgstr "Surnom" #: ../common/gsm-common.c:288 ../common/gsm-common.c:448 #: ../xgnokii/xgnokii_calendar.c:181 ../xgnokii/xgnokii_calendar.c:288 msgid "Birthday" msgstr "Anniversaire" #: ../common/gsm-common.c:289 #, fuzzy msgid "Caller group id" msgstr "Groupe d'appelant" #: ../common/gsm-common.c:350 ../common/nokia-decoding.c:349 #: ../common/phones/nk6100.c:1007 ../xgnokii/xgnokii.c:221 #: ../xgnokii/xgnokii.c:1027 msgid "Family" msgstr "Famille" #: ../common/gsm-common.c:351 msgid "VIPs" msgstr "VIPs" #: ../common/gsm-common.c:352 ../common/nokia-decoding.c:355 #: ../common/phones/nk6100.c:1013 ../xgnokii/xgnokii.c:223 #: ../xgnokii/xgnokii.c:1051 msgid "Friends" msgstr "Amis" #: ../common/gsm-common.c:353 ../xgnokii/xgnokii_contacts.c:713 #: ../xgnokii/xgnokii_contacts.c:797 ../xgnokii/xgnokii_contacts.c:940 #: ../xgnokii/xgnokii_contacts.c:982 ../xgnokii/xgnokii_contacts.c:1194 msgid "Work" msgstr "Travail" #: ../common/gsm-common.c:354 msgid "Others" msgstr "Autres" #: ../common/gsm-common.c:365 ../common/gsm-common.c:416 #: ../xgnokii/xgnokii.c:529 ../xgnokii/xgnokii.c:558 ../xgnokii/xgnokii.c:1415 #: ../xgnokii/xgnokii_calendar.c:1539 msgid "Text" msgstr "Texte" #: ../common/gsm-common.c:366 msgid "Linked" msgstr "Liens" #: ../common/gsm-common.c:368 msgid "GSM Operator Logo" msgstr "Logo opérateur" #: ../common/gsm-common.c:370 msgid "Multipart Message" msgstr "Message en plusieurs parties" #: ../common/gsm-common.c:371 msgid "WAP vCard" msgstr "vCard WAP" #: ../common/gsm-common.c:372 msgid "WAP vCalendar" msgstr "vCalendar WAP" #: ../common/gsm-common.c:373 msgid "WAP vCardSecure" msgstr "vCardSecure WAP" #: ../common/gsm-common.c:374 msgid "WAP vCalendarSecure" msgstr "vCalendarSecure WAP" #: ../common/gsm-common.c:375 msgid "Voice Message" msgstr "Message vocal" #: ../common/gsm-common.c:376 msgid "Fax Message" msgstr "Message fax" #: ../common/gsm-common.c:377 msgid "Email Message" msgstr "Message email" #: ../common/gsm-common.c:378 msgid "WAP Push" msgstr "Push WAP" #: ../common/gsm-common.c:379 msgid "Other Message" msgstr "Autre message" #: ../common/gsm-common.c:388 msgid "Inbox Message" msgstr "Boite de réception" #: ../common/gsm-common.c:389 msgid "Delivery Report" msgstr "Rapport d'envoi" #: ../common/gsm-common.c:390 ../common/gsm-common.c:397 msgid "MO Message" msgstr "Message" #: ../common/gsm-common.c:391 msgid "Submit Report" msgstr "Rapport de soumission" #: ../common/gsm-common.c:392 msgid "Command" msgstr "Commande" #: ../common/gsm-common.c:393 msgid "Status Report" msgstr "Rapport d'état" #: ../common/gsm-common.c:394 msgid "Picture Message" msgstr "Message image" #: ../common/gsm-common.c:395 msgid "Template" msgstr "Modèle" #: ../common/gsm-common.c:396 msgid "Picture Message Template" msgstr "Modèle de message image" #: ../common/gsm-common.c:405 msgid "Read" msgstr "Lu" #: ../common/gsm-common.c:406 msgid "Unread" msgstr "Non lu" #: ../common/gsm-common.c:407 msgid "Sent" msgstr "Envoyé" #: ../common/gsm-common.c:408 msgid "Unsent" msgstr "Non envoyé" #: ../common/gsm-common.c:417 ../common/gsm-common.c:632 #: ../xgnokii/xgnokii.c:537 ../xgnokii/xgnokii.c:1421 #: ../xgnokii/xgnokii_contacts.c:719 ../xgnokii/xgnokii_contacts.c:800 #: ../xgnokii/xgnokii_contacts.c:941 ../xgnokii/xgnokii_contacts.c:983 #: ../xgnokii/xgnokii_contacts.c:1198 msgid "Fax" msgstr "Fax" #: ../common/gsm-common.c:418 msgid "VoiceMail" msgstr "Répondeur" #: ../common/gsm-common.c:419 ../xgnokii/xgnokii.c:546 msgid "ERMES" msgstr "ERMES" #: ../common/gsm-common.c:420 ../xgnokii/xgnokii.c:533 #: ../xgnokii/xgnokii.c:1427 msgid "Paging" msgstr "Paging" #: ../common/gsm-common.c:421 msgid "Email message in 8110i" msgstr "Message email dans 8110i" #: ../common/gsm-common.c:423 ../xgnokii/xgnokii.c:550 msgid "X.400" msgstr "X.400" #: ../common/gsm-common.c:431 ../xgnokii/xgnokii.c:564 #: ../xgnokii/xgnokii.c:1461 msgid "1 hour" msgstr "1 heure" #: ../common/gsm-common.c:432 ../xgnokii/xgnokii.c:568 #: ../xgnokii/xgnokii.c:1467 msgid "6 hours" msgstr "6 heures" #: ../common/gsm-common.c:433 ../xgnokii/xgnokii.c:572 #: ../xgnokii/xgnokii.c:588 ../xgnokii/xgnokii.c:1473 msgid "24 hours" msgstr "24 heures" #: ../common/gsm-common.c:434 ../xgnokii/xgnokii.c:576 #: ../xgnokii/xgnokii.c:1479 msgid "72 hours" msgstr "72 heures" #: ../common/gsm-common.c:435 ../xgnokii/xgnokii.c:580 #: ../xgnokii/xgnokii.c:1485 msgid "1 week" msgstr "1 Semaine" #: ../common/gsm-common.c:436 msgid "Maximum time" msgstr "Durée maximale" #: ../common/gsm-common.c:446 ../common/phones/nk6100.c:2113 #: ../xgnokii/xgnokii_calendar.c:175 #, c-format msgid "Meeting" msgstr "Rendez-vous" #: ../common/gsm-common.c:447 ../xgnokii/xgnokii_calendar.c:169 msgid "Call" msgstr "Appel" #: ../common/gsm-common.c:449 ../xgnokii/xgnokii_calendar.c:163 msgid "Reminder" msgstr "Rappel" #: ../common/gsm-common.c:450 ../xgnokii/xgnokii_calendar.c:157 msgid "Memo" msgstr "Mémo" #: ../common/gsm-common.c:458 ../xgnokii/xgnokii_calendar.c:831 msgid "Never" msgstr "Jamais" #: ../common/gsm-common.c:459 msgid "Daily" msgstr "Tous les jours" #: ../common/gsm-common.c:460 msgid "Weekly" msgstr "Toutes les semaines" #: ../common/gsm-common.c:461 msgid "Every 2 weeks" msgstr "Toutes les 2 semaines" #: ../common/gsm-common.c:462 msgid "Monthly" msgstr "Tous les mois" #: ../common/gsm-common.c:463 msgid "Yearly" msgstr "Tous les ans" #: ../common/gsm-common.c:471 msgid "Low" msgstr "Bas" #: ../common/gsm-common.c:472 msgid "Medium" msgstr "Moyen" #: ../common/gsm-common.c:473 msgid "High" msgstr "Haut" #: ../common/gsm-common.c:483 msgid "Temporary" msgstr "Temporaire" #: ../common/gsm-common.c:484 msgid "Permanent" msgstr "Permanent" #: ../common/gsm-common.c:492 msgid "Normal" msgstr "Normal" #: ../common/gsm-common.c:493 msgid "Secure" msgstr "Sécurisé" #: ../common/gsm-common.c:501 ../gnokii/gnokii-wap.c:225 msgid "GSM data" msgstr "Données GSM" #: ../common/gsm-common.c:502 ../gnokii/gnokii-wap.c:234 msgid "GPRS" msgstr "GPRS" #: ../common/gsm-common.c:503 ../gnokii/gnokii-wap.c:242 #: ../xgnokii/xgnokii.c:1106 ../xgnokii/xgnokii.c:1848 msgid "SMS" msgstr "SMS" #: ../common/gsm-common.c:504 msgid "USSD" msgstr "USSD" #: ../common/gsm-common.c:512 msgid "Analogue" msgstr "Analogique" #: ../common/gsm-common.c:513 msgid "ISDN" msgstr "ISDN" #: ../common/gsm-common.c:521 ../common/gsm-common.c:532 #: ../gnokii/gnokii-profile.c:185 msgid "Automatic" msgstr "Automatique" #: ../common/gsm-common.c:522 msgid "9600" msgstr "9600" #: ../common/gsm-common.c:523 msgid "14400" msgstr "14400" #: ../common/gsm-common.c:531 msgid "Manual" msgstr "manuel" #: ../common/gsm-common.c:540 msgid "Always" msgstr "Toujours" #: ../common/gsm-common.c:541 msgid "When needed" msgstr "Lorsque c'est nécessaire" #: ../common/gsm-common.c:551 msgid "No tone" msgstr "Pas de tonalité" #: ../common/gsm-common.c:552 msgid "Standard" msgstr "Standard" #: ../common/gsm-common.c:553 msgid "Special" msgstr "Spécial" #: ../common/gsm-common.c:554 ../common/gsm-common.c:582 msgid "Beep once" msgstr "Biper une fois" #: ../common/gsm-common.c:555 ../common/gsm-common.c:585 msgid "Ascending" msgstr "Croissant" #: ../common/gsm-common.c:563 ../common/gsm-common.c:572 #: ../common/gsm-common.c:583 ../common/gsm-common.c:594 #: ../gnokii/gnokii-profile.c:192 msgid "Off" msgstr "Arrêt" #: ../common/gsm-common.c:564 ../common/gsm-common.c:573 #: ../gnokii/gnokii-profile.c:185 ../gnokii/gnokii-profile.c:192 msgid "On" msgstr "Marche" #: ../common/gsm-common.c:581 msgid "Ringing" msgstr "Ca sonne" #: ../common/gsm-common.c:584 msgid "Ring once" msgstr "Sonner une seule fois" #: ../common/gsm-common.c:586 msgid "Caller groups" msgstr "Groupe d'appelant" #: ../common/gsm-common.c:595 ../common/gsm-common.c:605 msgid "Level 1" msgstr "Niveau 1" #: ../common/gsm-common.c:596 ../common/gsm-common.c:606 msgid "Level 2" msgstr "Niveau 2" #: ../common/gsm-common.c:597 ../common/gsm-common.c:607 msgid "Level 3" msgstr "Niveau 3" #: ../common/gsm-common.c:608 msgid "Level 4" msgstr "Niveau 4" #: ../common/gsm-common.c:609 msgid "Level 5" msgstr "Niveau 5" #: ../common/gsm-common.c:619 msgid "Busy" msgstr "Occupé" #: ../common/gsm-common.c:620 msgid "No answer" msgstr "Pas de réponse" #: ../common/gsm-common.c:621 msgid "Out of reach" msgstr "Hors de portée" #: ../common/gsm-common.c:622 msgid "Not available" msgstr "Non disponible" #: ../common/gsm-common.c:623 ../common/gsm-common.c:634 msgid "All" msgstr "Tous" #: ../common/gsm-common.c:631 ../xgnokii/xgnokii.c:554 msgid "Voice" msgstr "Vocal" #: ../common/gsm-common.c:633 msgid "Data" msgstr "Données" #: ../common/gsm-common.c:642 ../xgnokii/xgnokii_data.c:124 msgid "Disable" msgstr "Désactiver" #: ../common/gsm-common.c:643 ../xgnokii/xgnokii_data.c:120 msgid "Enable" msgstr "Activer" #: ../common/gsm-common.c:644 msgid "Query" msgstr "Requête" #: ../common/gsm-common.c:645 msgid "Register" msgstr "Enregistrer" #: ../common/gsm-common.c:646 msgid "Erasure" msgstr "Effacement" #: ../common/gsm-error.c:42 msgid "No error." msgstr "Pas d'erreur." #: ../common/gsm-error.c:43 msgid "Command failed." msgstr "La commande a échoué." #: ../common/gsm-error.c:44 msgid "Model specified isn't known/supported." msgstr "Le modèle spécifié n'est pas connu/supporté." #: ../common/gsm-error.c:45 msgid "Invalid Security code." msgstr "Code de sécurité invalide." #: ../common/gsm-error.c:46 msgid "Problem occurred internal to model specific code." msgstr "Un probleme interne au modèle de téléphone est survenu." #: ../common/gsm-error.c:47 msgid "Command called isn't implemented in model." msgstr "La commande demandée n'est pas implémentée pour ce modèle." #: ../common/gsm-error.c:48 msgid "" "Function or connection type not supported by the phone or by the phone " "driver." msgstr "" "Fonction ou type de connexion non supportée par le pilote du téléphone." #: ../common/gsm-error.c:49 msgid "User aborted the action." msgstr "L'utilisateur a annulé l'action." #: ../common/gsm-error.c:50 msgid "Unknown error - well better than nothing!!" msgstr "Erreur inconnue - c'est mieux que rien !" #: ../common/gsm-error.c:51 msgid "The specified memory is full." msgstr "La memoire spécifiée est pleine." #: ../common/gsm-error.c:52 msgid "Couldn't establish link with phone." msgstr "Impossible d'etablir un lien avec le téléphone." #: ../common/gsm-error.c:53 msgid "Command timed out." msgstr "Delai dépassé pour execution de la commande." #: ../common/gsm-error.c:54 msgid "Try again." msgstr "Merci de re-essayer." #: ../common/gsm-error.c:55 msgid "Waiting for the next part of the message." msgstr "En attente du prochain bout de message." #: ../common/gsm-error.c:56 msgid "Device not ready." msgstr "Péripherique non disponible." #: ../common/gsm-error.c:57 msgid "Command is still being executed." msgstr "La commande est toujours en cours d'exécution." #: ../common/gsm-error.c:58 msgid "The given memory location is invalid." msgstr "Emplacement memoire SMS non valide." #: ../common/gsm-error.c:59 msgid "Invalid type of memory." msgstr "Type de memoire invalide." #: ../common/gsm-error.c:60 msgid "The given location is empty." msgstr "L'emplacement spécifié est vide." #: ../common/gsm-error.c:61 msgid "The given entry is too long." msgstr "L'entree spécifiée est trop longue." #: ../common/gsm-error.c:62 msgid "Data format is not valid." msgstr "Le format de données n'est pas valide." #: ../common/gsm-error.c:63 msgid "Wrong size of the object." msgstr "Taille d'objet incorrecte." #: ../common/gsm-error.c:64 msgid "Outgoing call requested reported line busy." msgstr "Appel sortant impossible pour cause de ligne occupée." #: ../common/gsm-error.c:65 msgid "No Carrier error during data call setup?" msgstr "Erreur d'absence de tonalité pendant la préparation de l'appel ?" #: ../common/gsm-error.c:66 msgid "The current frame isn't handled by the incoming function." msgstr "" "La (frame) courant n'est pas prise en charge par la fonction (incoming)" #: ../common/gsm-error.c:67 msgid "Unsolicited message received." msgstr "Message non sollicité reçu" #: ../common/gsm-error.c:68 msgid "Attempt to read CB when no new CB received." msgstr "Tentative de lecture CB alors qu'aucun CB n'a été reçu." #: ../common/gsm-error.c:69 msgid "SIM card missing or damaged." msgstr "Carte SIM manquante ou endommagée." #: ../common/gsm-error.c:70 msgid "PIN or PUK code required." msgstr "Code PIN ou PUK requis." #: ../common/gsm-error.c:71 msgid "The requested information is not available." msgstr "L'information demandée n'est pas disponible." #: ../common/gsm-error.c:72 msgid "Config file cannot be read." msgstr "Impossible de lire le fichier de configuration." #: ../common/gsm-error.c:73 msgid "Either global or given phone section cannot be found." msgstr "" "Impossible de trouver la section globale ou la section spécifique au " "téléphone." #: ../common/gsm-error.c:74 msgid "Incorrect logging section configuration." msgstr "La section de configuration concernant le login n'est pas correcte." #: ../common/gsm-error.c:75 msgid "No phone model specified in the config file." msgstr "Aucun modèle de tléphone spécifié dans le fichier de configuration." #: ../common/gsm-error.c:76 msgid "No port specified in the config file." msgstr "Aucun port spécifié dans le fichier de configuration." #: ../common/gsm-error.c:77 msgid "No connection type specified in the config file." msgstr "Aucun type de connection spécifié dans le fichier de configuration." #: ../common/gsm-error.c:78 msgid "Device is locked and cannot be unlocked." msgstr "Péripherique verrouillé et indéverrouillable." #: ../common/gsm-error.c:79 msgid "The actual response will be sent asynchronously." msgstr "La réponse réelle va être envoyée de manière asynchrone." #: ../common/gsm-error.c:80 msgid "Unknown error." msgstr "Erreur inconnue." #: ../common/gsm-filetypes.c:599 #, c-format msgid "Sorry, gnokii was not compiled with XPM support.\n" msgstr "Désolé, gnokii a été compilé sans le support XPM.\n" #: ../common/gsm-filetypes.c:642 #, c-format msgid "Bitmap too large\n" msgstr "Bitmap trop grand\n" #: ../common/gsm-filetypes.c:1519 #, c-format msgid "Formatting error: too many subentries\n" msgstr "Erreur de format : trop de sous-entrées\n" #: ../common/gsm-filetypes.c:1528 #, c-format msgid "Formatting error: unknown error while reading subentry type\n" msgstr "" "Erreur de format : erreur inconnue à la lecture du type de sous-entrée\n" #: ../common/gsm-filetypes.c:1532 #, c-format msgid "Formatting error: empty entry type\n" msgstr "Erreur de format : type d'entree vide\n" #: ../common/gsm-filetypes.c:1542 #, c-format msgid "Formatting error: subentry has only entry type field\n" msgstr "Erreur de Format : la sous-entrée n'a qu'un champ de type\n" #: ../common/gsm-filetypes.c:1551 #, c-format msgid "Formatting error: unknown error while reading subentry number type\n" msgstr "" "Erreur de format : erreur inconnue à la lecture d'un type de nombre de sous-" "entrée\n" #: ../common/gsm-filetypes.c:1555 #, c-format msgid "Formatting error: empty number type\n" msgstr "Erreur de format : type de nombre vide\n" #: ../common/gsm-filetypes.c:1570 ../common/gsm-filetypes.c:1593 #, c-format msgid "Formatting error: subentry has only entry and number type fields\n" msgstr "" "Erreur de format : la sous-entrée à seulement les champs de type entrée et " "nombre\n" #: ../common/gsm-filetypes.c:1579 #, c-format msgid "Formatting error: unknown error while reading subentry id\n" msgstr "" "Erreur de format : erreur inconnue à la lecture d'un identifiant de sous-" "entrée\n" #: ../common/gsm-filetypes.c:1583 #, c-format msgid "Formatting error: empty id\n" msgstr "Erreur de format : id vide\n" #: ../common/gsm-filetypes.c:1617 #, c-format msgid "Formatting error: unknown error while reading subentry contents\n" msgstr "" "Erreur de format : erreur inconnue à la lecture du contenu d'une sous-" "entrée\n" #: ../common/gsm-filetypes.c:1621 #, c-format msgid "Formatting error: empty subentry contents\n" msgstr "Erreur de format : sous-entrée vide\n" #. for now be compacrapatible ;) #: ../common/gsm-networks.c:1294 ../common/gsm-networks.c:1341 #: ../gnokii/gnokii-logo.c:254 ../gnokii/gnokii-logo.c:266 #: ../gnokii/gnokii-logo.c:281 ../gnokii/gnokii-logo.c:362 #: ../smsd/lowlevel.c:141 ../smsd/lowlevel.c:142 ../smsd/lowlevel.c:143 #: ../xgnokii/xgnokii_lowlevel.c:220 ../xgnokii/xgnokii_lowlevel.c:221 #: ../xgnokii/xgnokii_lowlevel.c:222 ../xgnokii/xgnokii_lowlevel.c:223 #: ../xgnokii/xgnokii_sms.c:262 ../xgnokii/xgnokii_sms.c:342 msgid "unknown" msgstr "inconnu" #: ../common/gsm-networks.c:1304 ../common/gsm-networks.c:1318 #: ../common/gsm-networks.c:1355 ../gnokii/gnokii-monitor.c:256 #: ../gnokii/gnokii-other.c:205 msgid "undefined" msgstr "non défini" #: ../common/gsm-sms.c:299 msgid "Delivered" msgstr "Livraison effectuée" #: ../common/gsm-sms.c:312 msgid "Failed" msgstr "Echec" #: ../common/gsm-sms.c:381 msgid "Pending" msgstr "En cours" #: ../common/gsm-statemachine.c:390 msgid "" "UNHANDLED FRAME RECEIVED\n" "request: " msgstr "" "FRAME NON TRAITEE RECUE\n" "requête :" #: ../common/gsm-statemachine.c:393 msgid "reply: " msgstr "réponse :" #: ../common/gsm-statemachine.c:396 ../common/phones/nokia.c:679 msgid "Please read Docs/Bugs and send a bug report!\n" msgstr "" "Merci de lire la documentation et les bugs déjà référencés avant d'envoyer " "un rapport de bug !\n" #: ../common/libfunctions.c:183 ../gnokiid/gnokiid.c:164 #, c-format msgid "Lock file error. Exiting.\n" msgstr "Erreur avec le fichier verrou. Sortie.\n" #: ../common/libfunctions.c:191 #, c-format msgid "" "Telephone interface init failed: %s\n" "Quitting.\n" msgstr "" "Echec de l'initialisation de l'interface du téléphone : %s\n" "Sortie.\n" #: ../common/links/atbus.c:69 msgid "gnokii I/O error" msgstr "gnokii erreur d'entrée/sortie" #: ../common/links/atbus.c:85 msgid "Couldn't open ATBUS device" msgstr "Impossible d'ouvrir le péripherique ATBUS" #: ../common/links/cbus.c:284 msgid "Couldn't open CBUS device" msgstr "Impossible d'ouvrir le péripherique CBUS" #: ../common/links/fbus-3110.c:77 ../common/links/fbus.c:85 #: ../common/links/fbus.c:141 ../common/links/fbus.c:184 msgid "Couldn't open FBUS device" msgstr "Impossible d'ouvrir le péripherique FBUS" #: ../common/links/fbus-3110.c:258 #, c-format msgid "fb3110_tx_frame_send - message too long!\n" msgstr "fb3110_tx_frame_send - message trop long !\n" #: ../common/links/fbus-phonet.c:107 msgid "Couldn't open PHONET device" msgstr "Impossible d'ouvrir le péripheque PHONET" #: ../common/links/gnbus.c:305 msgid "Couldn't open GNBUS device" msgstr "Impossible d'ouvrir le péripherique GNBUS" #: ../common/links/m2bus.c:78 msgid "Couldn't open M2BUS device" msgstr "Impossible d'ouvrir le péripherique M2BUS" #: ../common/misc.c:466 #, c-format msgid "Cannot lock NULL device. Set port config parameter correctly.\n" msgstr "" "Impossible de verrouiller lé périphérique NULL. Merci de paramétrer " "correctement le paramètre de configuration port.\n" #: ../common/misc.c:481 #, c-format msgid "Out of memory error while locking device.\n" msgstr "Manque de mémoire pendant le verouillage du péripherique.\n" #: ../common/misc.c:510 #, c-format msgid "Lockfile %s is stale. Overriding it...\n" msgstr "Le verrou %s est inactif. Ecrasons-le...\n" #: ../common/misc.c:513 #, c-format msgid "Overriding file %s failed, please check the permissions.\n" msgstr "" "Ecrasement du fichier %s impossible, merci de vérifier les permissions.\n" #: ../common/misc.c:514 ../common/misc.c:529 #, c-format msgid "Cannot lock device.\n" msgstr "Impossible de verrouiller le péripherique.\n" #: ../common/misc.c:518 #, c-format msgid "Device already locked with %s.\n" msgstr "Péripherique deja verrouillé par %s.\n" #: ../common/misc.c:527 #, c-format msgid "Unable to read lockfile %s.\n" msgstr "Impossible de lire le fichier verrou %s.\n" #: ../common/misc.c:528 #, c-format msgid "Please check for reason and remove the lockfile by hand.\n" msgstr "Merci de chercher la cause et supprimez le fichier verrou à la main.\n" #: ../common/misc.c:538 #, c-format msgid "Device seems to be locked by unknown process.\n" msgstr "Le péripherique semble verrouillé par un programme inconnu.\n" #: ../common/misc.c:540 #, c-format msgid "Please check permission on lock directory.\n" msgstr "Merci de vérifier les permissions sur le répertoire verrou.\n" #: ../common/misc.c:542 #, c-format msgid "Cannot create lockfile %s. Please check for existence of the path.\n" msgstr "" "Impossible de créer le fichier de verrouillage %s. Merci de vérifier " "l'existence du chemin d'accès.\n" #: ../common/misc.c:547 #, c-format msgid "Failed to write to the lockfile %s.\n" msgstr "Echec de l'écriture du fichier de verrouillage %s.\n" #: ../common/misc.c:572 #, fuzzy, c-format msgid "Cannot unlock device: %s\n" msgstr "Impossible de de-verrouiller le péripherique.\n" #: ../common/nokia-decoding.c:352 ../common/phones/nk6100.c:1010 #: ../xgnokii/xgnokii.c:222 ../xgnokii/xgnokii.c:1039 msgid "VIP" msgstr "VIP" #: ../common/nokia-decoding.c:358 ../common/phones/nk6100.c:1016 #: ../xgnokii/xgnokii.c:224 ../xgnokii/xgnokii.c:1063 msgid "Colleagues" msgstr "Collègues" #: ../common/nokia-decoding.c:361 ../common/phones/nk6100.c:1019 #: ../xgnokii/xgnokii.c:225 ../xgnokii/xgnokii.c:1075 msgid "Other" msgstr "Autres" #. Set a default SMSC name because +CSCA doesn't provide one #. Set a default name #: ../common/phones/atgen.c:2075 ../common/phones/nk6100.c:1552 #: ../common/phones/nk6510.c:1951 ../common/phones/nk7110.c:1479 #: ../common/phones/pcsc.c:692 ../xgnokii/xgnokii.c:521 #: ../xgnokii/xgnokii_sms.c:832 #, c-format msgid "Set %d" msgstr "Attribuer %d" #: ../common/phones/atgen.c:2692 #, c-format msgid "Withheld" msgstr "Refusé" #: ../common/phones/fake.c:95 #, c-format msgid "" "Apparently you didn't configure gnokii. Please do it prior to using it.\n" "You can get some clues from comments included in sample config file or give\n" "a try with gnokii-configure utility included in gnokii distribution.\n" msgstr "" #: ../common/phones/nk6100.c:2092 #, c-format msgid "Personal" msgstr "Personnel" #: ../common/phones/nk6100.c:2095 ../common/phones/nk6100.c:2122 #, c-format msgid "Car" msgstr "Voiture" #: ../common/phones/nk6100.c:2098 ../common/phones/nk6100.c:2125 #, c-format msgid "Headset" msgstr "Ecouteur" #: ../common/phones/nk6100.c:2101 ../common/phones/nk6100.c:2128 #, c-format msgid "Unknown (%d)" msgstr "Inconnu (%d)" #: ../common/phones/nk6100.c:2107 ../xgnokii/xgnokii_contacts.c:701 #: ../xgnokii/xgnokii_contacts.c:791 ../xgnokii/xgnokii_contacts.c:938 #: ../xgnokii/xgnokii_contacts.c:980 ../xgnokii/xgnokii_contacts.c:1021 #: ../xgnokii/xgnokii_contacts.c:1094 ../xgnokii/xgnokii_contacts.c:1186 #, c-format msgid "General" msgstr "General" #: ../common/phones/nk6100.c:2110 #, c-format msgid "Silent" msgstr "Silencieux" #: ../common/phones/nk6100.c:2116 #, c-format msgid "Outdoor" msgstr "En extérieur" #: ../common/phones/nk6100.c:2119 #, c-format msgid "Pager" msgstr "Pager" #: ../common/phones/nk6510.c:1811 #, c-format msgid "" "6510 series phones seem to be quite sensitive to malformed SMS messages\n" "It may have to be sent to Nokia Service if something fails!\n" "Do you really want to continue? " msgstr "" "La série des téléphones 6510 est particulièrement sensible aux SMS mal " "formés\n" "Vous risquez de devoir envoyer votre téléphone en réparation chez Nokia si " "quelquechose se passe mal !\n" "Souhaitez-vous continuer ?" #: ../common/phones/nk6510.c:1814 #, c-format msgid "(yes/no) " msgstr "(oui/non) " #: ../common/phones/nk6510.c:1816 ../gnokii/gnokii-phonebook.c:421 #: ../gnokii/gnokii-sms.c:542 ../gnokii/gnokii-sms.c:833 #: ../gnokii/gnokii-utils.c:63 ../gnokii/gnokii-wap.c:223 msgid "yes" msgstr "oui" #: ../common/phones/nk6510.c:2361 ../common/phones/nk6510.c:2426 #, fuzzy, c-format msgid "Progress: %3d%% completed" msgstr "Progression : %3d%% effectués\r" #: ../common/phones/nokia.c:338 msgid "Tried to activate CONTACT SERVICE\n" msgstr "Activation de CONTACT SERVICE tentée\n" #: ../common/phones/nokia.c:667 msgid "" "NOKIA RAW RINGTONE DECODING FAILED\n" "ringtone:\n" msgstr "" "Echec de la décompression de la sonnerie Nokia au format brut (raw)" "sonnerie :\n" #: ../common/phones/nokia.c:678 #, c-format msgid "offset: %04x\n" msgstr "offset : %04x\n" #: ../common/phones/pcsc.c:593 #, c-format msgid "Phase %s SIM" msgstr "" #: ../common/vcal.lx:161 #, c-format msgid "Error: Invalid calendar note number!\n" msgstr "Erreur : numéro de note calendrier invalide !\n" #. translators: %s are replaced by function names #: ../common/vcal.lx:282 ../common/vcal.lx:344 #, fuzzy, c-format msgid "Function %s() is deprecated. Use %s() instead.\n" msgstr "" "La fonction gn_vcal_file_event_read() est obsolète. Merci d'utiliser " "gn_ical2calnote() à la place.\n" #: ../common/vcal.lx:285 ../common/vcal.lx:347 ../gnokii/gnokii-calendar.c:256 #: ../gnokii/gnokii-file.c:437 ../gnokii/gnokii-todo.c:162 ../smsd/file.c:185 #: ../xgnokii/xgnokii_contacts.c:2700 ../xgnokii/xgnokii_dtmf.c:93 #: ../xgnokii/xgnokii_logos.c:1372 ../xgnokii/xgnokii_speed.c:324 #, c-format msgid "Can't open file %s for reading!\n" msgstr "Echec de l'ouverture en lecture du fichier %s !\n" #: ../common/vcal.lx:294 ../common/vcal.lx:356 #, c-format msgid "Error parsing vCalendar file!\n" msgstr "Erreur lors de la vérification syntaxique du fichier vCalendar !\n" #: ../getopt/getopt.c:566 ../getopt/getopt.c:582 #, c-format msgid "%s: option '%s' is ambiguous\n" msgstr "" #: ../getopt/getopt.c:615 ../getopt/getopt.c:619 #, c-format msgid "%s: option '--%s' doesn't allow an argument\n" msgstr "" #: ../getopt/getopt.c:628 ../getopt/getopt.c:633 #, c-format msgid "%s: option '%c%s' doesn't allow an argument\n" msgstr "" #: ../getopt/getopt.c:676 ../getopt/getopt.c:695 ../getopt/getopt.c:998 #: ../getopt/getopt.c:1017 #, c-format msgid "%s: option '%s' requires an argument\n" msgstr "" #: ../getopt/getopt.c:733 ../getopt/getopt.c:736 #, c-format msgid "%s: unrecognized option '--%s'\n" msgstr "" #: ../getopt/getopt.c:744 ../getopt/getopt.c:747 #, c-format msgid "%s: unrecognized option '%c%s'\n" msgstr "" #: ../getopt/getopt.c:796 ../getopt/getopt.c:799 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "" #: ../getopt/getopt.c:849 ../getopt/getopt.c:866 ../getopt/getopt.c:1069 #: ../getopt/getopt.c:1087 #, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "" #: ../getopt/getopt.c:919 ../getopt/getopt.c:935 #, c-format msgid "%s: option '-W %s' is ambiguous\n" msgstr "" #: ../getopt/getopt.c:959 ../getopt/getopt.c:977 #, c-format msgid "%s: option '-W %s' doesn't allow an argument\n" msgstr "" #: ../gnokiid/gnokiid.c:65 #, c-format msgid "GNOKIID Version %s\n" msgstr "GNOKIID Version %s\n" #: ../gnokiid/gnokiid.c:70 #, c-format msgid "" "Copyright (C) Hugh Blemings , 1999\n" "Copyright (C) Pavel Janik ml. , 1999\n" "Built %s %s\n" msgstr "" "Copyright (C) Hugh Blemings , 1999\n" "Copyright (C) Pavel Janik ml. , 1999\n" "Compile %s %s\n" #: ../gnokiid/gnokiid.c:81 #, c-format msgid "" " usage: gnokiid [--help|--version|--debug]\n" " --help display usage information\n" " --version displays version and copyright information\n" " --debug uses stdin/stdout for virtual modem comms\n" msgstr "" " usage: gnokiid {--help|--version}\n" " --help afficher l'aide\n" " --version afficher la version et le copyright\n" " --debug utiliser stdin/stdout pour les comms virtuelles " "avec le modem\n" #: ../gnokiid/gnokiid.c:149 #, c-format msgid "" "gnokiid purpose is to work only with the phones that do not have AT Hayes\n" "commands interpreter.\n" msgstr "" #: ../gnokii/gnokii.c:203 #, c-format msgid "GNOKII Version %s\n" msgstr "gnokiid Version %s\n" #: ../gnokii/gnokii.c:210 #, fuzzy, c-format msgid "" "Copyright (C) Hugh Blemings , 1999, 2000\n" "Copyright (C) Pavel Janik ml. , 1999, 2000\n" "Copyright (C) Pavel Machek , 2001\n" "Copyright (C) Pawel Kot , 2001-2011\n" "Copyright (C) BORBELY Zoltan , 2002\n" "Copyright (C) Daniele Forsi , 2004-2011\n" "gnokii is free software, covered by the GNU General Public License, and you " "are\n" "welcome to change it and/or distribute copies of it under certain " "conditions.\n" "There is absolutely no warranty for gnokii. See GPL for details.\n" "Built %s %s\n" msgstr "" "xgnokii version: %s\n" "gnokii version: %s\n" "\n" "Copyright (C) 1999-2004 Pavel Janik ml.,\n" "Hugh Blemings, Jan Derfinak,\n" "Pawel Kot and others\n" "xgnokii is free software, covered by the GNU General Public License,\n" "and you are welcome to change it and/or distribute copies of it under\n" "certain conditions. There is absolutely no warranty for xgnokii.\n" "See GPL for details.\n" #: ../gnokii/gnokii.c:238 #, c-format msgid "" "Usage:\n" "\tgnokii [CONFIG OPTIONS] OPTIONS\n" "\n" "CONFIG OPTIONS\n" "\t\t--config filename\n" "\t\t--phone phone_section\n" "\n" "OPTIONS\n" "Use just one option at a time.\n" "General options:\n" " --help [all] [monitor] [sms] [mms] [phonebook] [calendar] [todo]\n" " [dial] [profile] [settings] [wap] [logo] [ringtone]\n" " [security] [file] [other]\n" " --version\n" " --shell\n" msgstr "" #: ../gnokii/gnokii.c:359 #, c-format msgid "Cannot open logfile %s\n" msgstr "Echec de l'ouverture du fichier journal %s\n" #: ../gnokii/gnokii.c:392 #, c-format msgid "File: %s\n" msgstr "Fichier : %s\n" #: ../gnokii/gnokii.c:394 #, c-format msgid "Phone section: [phone_%s]\n" msgstr "" #: ../gnokii/gnokii.c:403 #, c-format msgid "WARNING: cannot open logfile, logs will be directed to stderr\n" msgstr "" "WARNING: impossible d'ouvrir le fichier journal, les erreurs seront re-" "dirigees sur stderr.\n" #: ../gnokii/gnokii.c:819 #, c-format msgid "Use '%s --help' for usage information.\n" msgstr "" "Lancez gnokii avec l'option '%s --help' pour avoir les informations " "d'usage.\n" #: ../gnokii/gnokii.c:821 #, c-format msgid "Use '--help' for usage information.\n" msgstr "" "Lancez gnokii avec l'option '%s --help' pour avoir les informations " "d'usage.\n" #: ../gnokii/gnokii.c:1142 #, c-format msgid "Unknown option: %d\n" msgstr "Option inconnue: %d.\n" #: ../gnokii/gnokii.c:1206 #, c-format msgid "" "gnokii needs to be compiled with readline support to enable this option.\n" msgstr "" #: ../gnokii/gnokii-calendar.c:56 #, c-format msgid "" "Calendar options:\n" " --getcalendarnote start_number [end_number|end] [-v|--vCal]\n" " --writecalendarnote vcalendarfile start_number [end_number|end]\n" " --deletecalendarnote start [end_number|end]\n" msgstr "" "options du calendrier :\n" " --getcalendarnote numero_debut [numero_fin|end] [-v|--vCal]\n" " --writecalendarnote vcalendarfile numero_debut [numero_fin|end]\n" " --deletecalendarnote start [numero_fin|end]\n" #: ../gnokii/gnokii-calendar.c:65 #, c-format msgid "" "usage: --getcalendarnote start_number [end_number | end] [-v|--vCal]\n" " start_number - entry number in the phone calendar " "(numeric)\n" " end_number - read to this entry in the phone " "calendar (numeric, optional)\n" " end - the string \"end\" indicates all " "entries from start to end\n" " -v - output in iCalendar format\n" " NOTE: if no end is given, only the start entry is read\n" msgstr "" "usage: --getcalendarnote numero_debut [numero_fin | end] [-v|--vCal]\n" " numero_debut - numéro de l'entée dans le claendrier " "du téléphone (numerique)\n" " numero_fin - lire jusqu'à cette entrée dans le " "téléphone calendar (numeric, optional)\n" " end - la chaine \"end\" équivaut à tous les " "enregistrements entries from start to end\n" " -v - extrait au format iCalendar\n" " NOTE: si le paramètre de fin (end) n'est pas indiqué, seule la première " "entrée est lue\n" #. Plain text output #. Translators: this is the header of a calendar note. Example: 1 (1). Type: Meeting #: ../gnokii/gnokii-calendar.c:130 #, c-format msgid "%d (%d). %s: %s\n" msgstr "%d (%d). %s: %s\n" #: ../gnokii/gnokii-calendar.c:130 ../xgnokii/xgnokii_calendar.c:1536 msgid "Type" msgstr "Type" #: ../gnokii/gnokii-calendar.c:132 #, c-format msgid " Start date: %d-%02d-%02d\n" msgstr " Date de début : %d-%02d-%02d\n" #: ../gnokii/gnokii-calendar.c:137 #, c-format msgid " Start time: %02d:%02d:%02d\n" msgstr " Heure de début : %02d:%02d:%02d\n" #: ../gnokii/gnokii-calendar.c:142 #, c-format msgid " End date: %d-%02d-%02d\n" msgstr " Date de fin : %d-%02d-%02d\n" #: ../gnokii/gnokii-calendar.c:146 #, c-format msgid " End time: %02d:%02d:%02d\n" msgstr " Heure de fin : %02d:%02d:%02d\n" #: ../gnokii/gnokii-calendar.c:154 #, c-format msgid " Alarm date: %02d-%02d\n" msgstr " Date de l'alarme: %d-%02d-%02d\n" #: ../gnokii/gnokii-calendar.c:158 #, c-format msgid " Alarm date: %d-%02d-%02d\n" msgstr " Date de l'alarme: %d-%02d-%02d\n" #: ../gnokii/gnokii-calendar.c:163 #, c-format msgid " Alarm time: %02d:%02d:%02d\n" msgstr " Heure de l'alarme: %02d:%02d:%02d\n" #: ../gnokii/gnokii-calendar.c:167 #, c-format msgid " Alarm tone %s\n" msgstr " Sonnerie de l'alarme : %s\n" #: ../gnokii/gnokii-calendar.c:168 ../xgnokii/xgnokii_calendar.c:214 #: ../xgnokii/xgnokii_calendar.c:220 msgid "enabled" msgstr "Activé" #: ../gnokii/gnokii-calendar.c:168 ../xgnokii/xgnokii_calendar.c:214 #: ../xgnokii/xgnokii_calendar.c:220 msgid "disabled" msgstr "Désactivé" #: ../gnokii/gnokii-calendar.c:171 #, c-format msgid " %s: " msgstr " %s : " #: ../gnokii/gnokii-calendar.c:171 msgid "Repeat" msgstr "Répéter" #: ../gnokii/gnokii-calendar.c:182 #, c-format msgid "Every %d hours" msgstr "Toutes les %d minutes" #: ../gnokii/gnokii-calendar.c:187 #, c-format msgid " The event will be repeated " msgstr " L'évènement sera répété" #: ../gnokii/gnokii-calendar.c:190 #, c-format msgid "forever." msgstr "pour toujours." #: ../gnokii/gnokii-calendar.c:193 #, c-format msgid "%d times." msgstr "%d times." #: ../gnokii/gnokii-calendar.c:199 #, c-format msgid " Text: %s\n" msgstr " Texte : %s\n" #: ../gnokii/gnokii-calendar.c:203 ../gnokii/gnokii-calendar.c:206 #: ../gnokii/gnokii-wap.c:226 ../gnokii/gnokii-wap.c:227 #: ../gnokii/gnokii-wap.c:228 ../gnokii/gnokii-wap.c:229 #: ../gnokii/gnokii-wap.c:230 ../gnokii/gnokii-wap.c:231 #: ../gnokii/gnokii-wap.c:232 ../gnokii/gnokii-wap.c:233 #: ../gnokii/gnokii-wap.c:235 ../gnokii/gnokii-wap.c:236 #: ../gnokii/gnokii-wap.c:237 ../gnokii/gnokii-wap.c:238 #: ../gnokii/gnokii-wap.c:239 ../gnokii/gnokii-wap.c:240 #: ../gnokii/gnokii-wap.c:241 ../gnokii/gnokii-wap.c:243 #: ../gnokii/gnokii-wap.c:244 #, c-format msgid " %s: %s\n" msgstr " %s: %s\n" #: ../gnokii/gnokii-calendar.c:203 ../xgnokii/xgnokii.c:1709 msgid "Phone" msgstr "Téléphone" #: ../gnokii/gnokii-calendar.c:226 #, c-format msgid "The calendar note can not be read: %s\n" msgstr "Echec de lecture du calendrier : %s\n" #: ../gnokii/gnokii-calendar.c:236 #, c-format msgid "" "usage: --writecalendarnote vcalendarfile start_number [end_number|end]\n" " vcalendarfile - file containing calendar notes in " "vCal format\n" " start_number - first calendar note from " "vcalendarfile to read\n" " end_number - last calendar note from " "vcalendarfile to read\n" " end - read all notes from vcalendarfile " "from start_number\n" " NOTE: it stores the note at the first empty location.\n" msgstr "" "usage: --writecalendarnote vcalendarfile numero_debut [numero_fin|end]\n" " vcalendarfile - fichier contenant les notes du " "calendrier au format vCal\n" " numero_debut - première note du " "calendriervcalendarfile à lire\n" " numero_fin - dernière note du " "calendriervcalendarfile à lire\n" " end - lire toutes les notes du calendrier " "vcalendarfile depuis numer_debut jusqu'à la fin\n" " NOTE: cela enregistre les notes à partir du premier emplacement libre.\n" #: ../gnokii/gnokii-calendar.c:300 ../gnokii/gnokii-todo.c:206 #, c-format msgid "Failed to load vCalendar file: %s\n" msgstr "Echec du chargement du fichier vCalendar : %s\n" #: ../gnokii/gnokii-calendar.c:309 ../gnokii/gnokii-dial.c:143 #: ../gnokii/gnokii-todo.c:215 #, c-format msgid "Successfully written!\n" msgstr "Succès de l'écriture !\n" #: ../gnokii/gnokii-calendar.c:311 #, c-format msgid "Failed to write calendar note: %s\n" msgstr "Echec de l'écriture de la note du calendrier : %s\n" #: ../gnokii/gnokii-calendar.c:320 #, c-format msgid "" "usage: --deletecalendarnote start_number [end_number | end]\n" " start_number - first number in the phone calendar " "(numeric)\n" " end_number - until this entry in the phone " "calendar (numeric, optional)\n" " end - the string \"end\" indicates all " "entries from start to end\n" " NOTE: if no end is given, only the start entry is deleted\n" msgstr "" "usage: --deletecalendarnote numero_debut [numero_fin | end]\n" " numero_debut - premier numéro dans le calendrier du " "téléphone (numerique)\n" " numero_fin - jusqu'à cette entrée du calendrier du " "téléphone (numerique, facultatif)\n" " end - la chaine \"end\" équivaut à toutes " "les entrées de début à la fin\n" " NOTE: si le paramètre end est absent, seule la première entrée est " "effacée\n" #: ../gnokii/gnokii-calendar.c:355 #, c-format msgid "Calendar note deleted.\n" msgstr "Note du calendrier détruite.\n" #: ../gnokii/gnokii-calendar.c:357 #, c-format msgid "The calendar note cannot be deleted: %s\n" msgstr "Cette note du calendrier n'a pu être détruite : %s\n" #: ../gnokii/gnokii-dial.c:52 #, c-format msgid "" "Dialling and call options:\n" " --getspeeddial location\n" " --setspeeddial number memory_type location\n" " --dialvoice number\n" " --senddtmf string\n" " --answercall callid\n" " --hangup callid\n" " --divert {--op|-o} {register|enable|query|disable|erasure}\n" " {--type|-t} {all|busy|noans|outofreach|notavail}\n" " {--call|-c} {all|voice|fax|data}\n" " [{--timeout|-m} time_in_seconds]\n" " [{--number|-n} number]\n" "All number, location and callid options need to be numeric.\n" msgstr "" #: ../gnokii/gnokii-dial.c:70 #, c-format msgid "" "usage: --getspeeddial location\n" " location - location in the speed dial memory\n" msgstr "" #: ../gnokii/gnokii-dial.c:93 #, fuzzy, c-format msgid "SpeedDial nr. %d %s %d\n" msgstr "Raccourci d'appel no. %d: %d:%d\n" #: ../gnokii/gnokii-dial.c:96 ../gnokii/gnokii-dial.c:146 #: ../gnokii/gnokii-dial.c:186 ../gnokii/gnokii-dial.c:217 #: ../gnokii/gnokii-dial.c:248 ../gnokii/gnokii-dial.c:381 #: ../gnokii/gnokii-logo.c:298 ../gnokii/gnokii-logo.c:469 #: ../gnokii/gnokii-monitor.c:454 ../gnokii/gnokii-monitor.c:457 #: ../gnokii/gnokii-monitor.c:480 ../gnokii/gnokii-other.c:190 #: ../gnokii/gnokii-phonebook.c:256 ../gnokii/gnokii-profile.c:112 #: ../gnokii/gnokii-profile.c:162 ../gnokii/gnokii-security.c:95 #: ../gnokii/gnokii-security.c:127 ../gnokii/gnokii-security.c:205 #: ../gnokii/gnokii-security.c:247 ../gnokii/gnokii-security.c:298 #: ../gnokii/gnokii-settings.c:122 ../gnokii/gnokii-settings.c:146 #: ../gnokii/gnokii-settings.c:180 ../gnokii/gnokii-settings.c:204 #: ../gnokii/gnokii-sms.c:552 ../gnokii/gnokii-sms.c:1048 #: ../gnokii/gnokii-sms.c:1126 ../gnokii/gnokii-sms.c:1156 #: ../gnokii/gnokii-sms.c:1189 ../gnokii/gnokii-sms.c:1329 #: ../gnokii/gnokii-sms.c:1331 ../gnokii/gnokii-wap.c:94 #: ../gnokii/gnokii-wap.c:129 ../gnokii/gnokii-wap.c:162 #: ../gnokii/gnokii-wap.c:248 ../gnokii/gnokii-wap.c:323 #: ../smsd/lowlevel.c:112 ../smsd/lowlevel.c:125 ../smsd/mysql.c:77 #: ../smsd/mysql.c:134 ../smsd/mysql.c:171 ../smsd/mysql.c:189 #: ../smsd/mysql.c:199 ../smsd/mysql.c:225 ../smsd/mysql.c:263 #: ../smsd/mysql.c:296 ../smsd/mysql.c:336 ../smsd/mysql.c:345 #: ../smsd/mysql.c:399 ../smsd/pq.c:68 ../smsd/pq.c:77 ../smsd/pq.c:121 #: ../smsd/pq.c:150 ../smsd/pq.c:190 ../smsd/pq.c:212 ../smsd/pq.c:241 #: ../smsd/pq.c:258 ../smsd/pq.c:296 ../smsd/pq.c:333 ../smsd/pq.c:376 #: ../smsd/pq.c:427 ../smsd/sqlite.c:58 ../smsd/sqlite.c:70 #: ../smsd/sqlite.c:240 #, c-format msgid "Error: %s\n" msgstr "Erreur : %s\n" #: ../gnokii/gnokii-dial.c:105 #, c-format msgid "" "usage: --setspeeddial number memory_type location\n" " number - phone number to be stored\n" " memory_type - memory type for the speed dial\n" " location - location in the speed dial memory\n" msgstr "" #: ../gnokii/gnokii-dial.c:128 ../gnokii/gnokii-phonebook.c:111 #: ../gnokii/gnokii-phonebook.c:487 #, c-format msgid "Unknown memory type %s (use ME, SM, ...)!\n" msgstr "Type de mémoire inconnu %s (utilisez ME, SM, ...) !\n" #: ../gnokii/gnokii-dial.c:169 #, c-format msgid "Dialing failed: %s\n" msgstr "Echec de la composition du numéro : %s\n" #: ../gnokii/gnokii-dial.c:171 #, c-format msgid "Dialled call, id: %d (lowlevel id: %d)\n" msgstr "Appel engagé, id : %d (id bas niveau : %d)\n" #: ../gnokii/gnokii-dial.c:194 #, c-format msgid "" "usage: --answercall callid\n" " callid - call identifier\n" msgstr "" #: ../gnokii/gnokii-dial.c:225 #, c-format msgid "" "usage: --hangup callid\n" " callid - call identifier\n" msgstr "" #: ../gnokii/gnokii-dial.c:256 #, c-format msgid "" " usage: --divert\n" " -o operation\n" " --op operation operation to be executed, needs to be one\n" " of the following: register, enable, query,\n" " disable, erasure; this is required option\n" " -t type\n" " --type type type of the operation, needs to be one of\n" " the following: all, busy, noans, outofreach,\n" " notavail, unconditional; this is required " "option\n" " -c calltype\n" " --call calltype type of call for the operation, needs to be\n" " one of the following: all, voice, fax, data;\n" " this is optional\n" " -m sec\n" " --timeout sec timeout to be set; the value is in seconds\n" " -n msisdn\n" " --number msisdn number for redirection\n" "\n" msgstr "" #: ../gnokii/gnokii-dial.c:373 ../gnokii/gnokii-dial.c:374 #: ../gnokii/gnokii-dial.c:376 ../gnokii/gnokii-phonebook.c:199 #: ../gnokii/gnokii-phonebook.c:203 ../gnokii/gnokii-todo.c:119 #: ../gnokii/gnokii-todo.c:120 ../gnokii/gnokii-wap.c:89 #: ../gnokii/gnokii-wap.c:90 ../gnokii/gnokii-wap.c:220 #: ../gnokii/gnokii-wap.c:221 ../gnokii/gnokii-wap.c:222 #: ../gnokii/gnokii-wap.c:223 ../gnokii/gnokii-wap.c:224 #, c-format msgid "%s: %s\n" msgstr "%s: %s\n" #: ../gnokii/gnokii-dial.c:373 msgid "Divert type" msgstr "Type de renvoi d'appel" #: ../gnokii/gnokii-dial.c:374 msgid "Call type" msgstr "Type d'appel :" #: ../gnokii/gnokii-dial.c:377 #, c-format msgid "%s: %d\n" msgstr "%s: %d\n" #: ../gnokii/gnokii-dial.c:377 msgid "Timeout" msgstr "Durée dépassée" #: ../gnokii/gnokii-dial.c:379 #, c-format msgid "Divert isn't active.\n" msgstr "Renvoi d'appel inactif.\n" #: ../gnokii/gnokii-file.c:53 #, c-format msgid "" "File options:\n" " --getfilelist remote_path\n" " --getfiledetailsbyid [id]\n" " --getfileid remote_filename\n" " --getfile remote_filename [local_filename]\n" " --getfilebyid id [local_filename]\n" " --getallfiles remote_path\n" " --putfile local_filename remote_filename\n" " --deletefile remote_filename\n" " --deletefilebyid id\n" msgstr "" #: ../gnokii/gnokii-file.c:98 ../gnokii/gnokii-file.c:192 #: ../gnokii/gnokii-file.c:377 #, c-format msgid "Failed to get info for %s: %s\n" msgstr "Echec de lecture des informations pour %s : %s\n" #: ../gnokii/gnokii-file.c:100 #, c-format msgid "Filelist for path %s:\n" msgstr "Liste de fichiers pour le chemin %s :\n" #: ../gnokii/gnokii-file.c:102 #, c-format msgid " %s\n" msgstr " %s\n" #: ../gnokii/gnokii-file.c:135 ../gnokii/gnokii-file.c:170 #, c-format msgid "Failed to get filename: %s\n" msgstr "Impossible d'obtenir le fichier : %s\n" #: ../gnokii/gnokii-file.c:142 #, c-format msgid "| %s (%d)\n" msgstr "| %s (%d)\n" #: ../gnokii/gnokii-file.c:167 #, c-format msgid " - %s (%d)\n" msgstr " - %s (%d)\n" #: ../gnokii/gnokii-file.c:194 #, c-format msgid "Fileid for file %s is %02x %02x %02x %02x %02x %02x\n" msgstr "Le Fileid pour ce fichier %s est %02x %02x %02x %02x %02x %02x\n" #: ../gnokii/gnokii-file.c:212 ../gnokii/gnokii-file.c:232 #, c-format msgid "Failed to delete %s: %s\n" msgstr "Echec de la suppression de %s : %s\n" #: ../gnokii/gnokii-file.c:214 ../gnokii/gnokii-file.c:234 #, c-format msgid "Deleted: %s\n" msgstr "Supprimé : %s\n" #: ../gnokii/gnokii-file.c:241 #, c-format msgid " usage: --getfile remote_filename [localfilename]\n" msgstr "" #: ../gnokii/gnokii-file.c:266 ../gnokii/gnokii-file.c:391 #, c-format msgid "Failed to get file %s: %s\n" msgstr "Impossible d'obtenir le fichier %s : %s\n" #: ../gnokii/gnokii-file.c:275 #, c-format msgid "Got file %s. Save to [%s]: " msgstr "Fichier %s recu. Enregistrement vers [%s] :" #: ../gnokii/gnokii-file.c:290 ../gnokii/gnokii-file.c:345 #: ../gnokii/gnokii-file.c:396 ../gnokii/gnokii-logo.c:198 #: ../gnokii/gnokii-utils.c:93 ../gnokii/gnokii-utils.c:118 #: ../xgnokii/xgnokii_contacts.c:2620 ../xgnokii/xgnokii_dtmf.c:135 #: ../xgnokii/xgnokii_speed.c:417 #, c-format msgid "Can't open file %s for writing!\n" msgstr "Echec de l'ouverture du fichier %s en écriture !\n" #: ../gnokii/gnokii-file.c:294 ../gnokii/gnokii-file.c:349 #: ../gnokii/gnokii-file.c:400 #, c-format msgid "Failed to write to file %s.\n" msgstr "Impossible d'écrire dans le fichier %s.\n" #: ../gnokii/gnokii-file.c:305 #, c-format msgid " usage: --getfilebyid id [localfilename]\n" msgstr "" #: ../gnokii/gnokii-file.c:332 #, c-format msgid "Failed to get file: %s\n" msgstr "Impossible d'obtenir le fichier : %s\n" #: ../gnokii/gnokii-file.c:393 #, c-format msgid "Got file %s.\n" msgstr "Fichier %s reçu.\n" #: ../gnokii/gnokii-file.c:415 #, c-format msgid " usage: --putfile local_filename remote_filename\n" msgstr "" #: ../gnokii/gnokii-file.c:444 #, c-format msgid "File %s corrupted!\n" msgstr "" #: ../gnokii/gnokii-file.c:449 #, c-format msgid "Failed to put file to %s: %s\n" msgstr "Impossible de déposer un fichier vers %s : %s\n" #: ../gnokii/gnokii-logo.c:56 #, c-format msgid "" "Logo options:\n" " --sendlogo {caller|op|picture} destination logofile\n" " [network_code]\n" " --setlogo op [logofile [network_code]]\n" " --setlogo startup [logofile]\n" " --setlogo caller [logofile [caller_group_number [group_name]]]\n" " --setlogo {dealer|text} [text]\n" " --getlogo op [logofile [network_code]]\n" " --getlogo startup [logofile [network_code]]\n" " --getlogo caller [caller_group_number [logofile\n" " [network_code]]]\n" " --getlogo {dealer|text}\n" " --viewlogo logofile\n" msgstr "" #: ../gnokii/gnokii-logo.c:97 #, c-format msgid "Sending operator logo.\n" msgstr "Envoi du logo opérateur.\n" #: ../gnokii/gnokii-logo.c:98 #, c-format msgid "Sending caller line identification logo.\n" msgstr "Envoi du logo d'identification de la ligne de l'appelant.\n" #: ../gnokii/gnokii-logo.c:99 #, c-format msgid "Sending Multipart Message: Picture Message.\n" msgstr "Envoi de message SMS en plusieurs bouts : message image.\n" #: ../gnokii/gnokii-logo.c:100 #, c-format msgid "Sending EMS-compliant Picture Message.\n" msgstr "Envoi d'un message image compatible EMS.\n" #: ../gnokii/gnokii-logo.c:101 #, c-format msgid "Sending EMS-compliant Animation.\n" msgstr "Envoi d'une animation compatible EMS.\n" #: ../gnokii/gnokii-logo.c:102 #, c-format msgid "You should specify what kind of logo to send!\n" msgstr "Merci de préciser le type de logo que vous souhaitez envoyer.\n" #: ../gnokii/gnokii-logo.c:118 #, c-format msgid "Cannot send logo: specified and loaded bitmap type differ!\n" msgstr "Impossible d'envoyer le logo : image et type d'image différents\n" #: ../gnokii/gnokii-logo.c:156 ../gnokii/gnokii-ringtone.c:148 #: ../gnokii/gnokii-sms.c:352 #, c-format msgid "Message sent in %d parts with reference numbers:" msgstr "" #: ../gnokii/gnokii-logo.c:161 ../gnokii/gnokii-ringtone.c:153 #: ../gnokii/gnokii-sms.c:357 #, c-format msgid "Send succeeded with reference %d!\n" msgstr "Succès de l'envoi de la référence %d !\n" #: ../gnokii/gnokii-logo.c:163 ../gnokii/gnokii-ringtone.c:155 #: ../gnokii/gnokii-sms.c:359 #, c-format msgid "SMS Send failed (%s)\n" msgstr "Echec de l'envoi de SMS (%s)\n" #: ../gnokii/gnokii-logo.c:180 #, c-format msgid "Saving logo. File \"%s\" exists. (O)verwrite, create (n)ew or (s)kip ? " msgstr "" "Enregistrement du logo. Le fichier \"%s\" existe deja. (E)craser, creer (N)" "ouveau ou (S) ?" #: ../gnokii/gnokii-logo.c:182 msgid "O" msgstr "E" #: ../gnokii/gnokii-logo.c:182 msgid "o" msgstr "e" #: ../gnokii/gnokii-logo.c:183 msgid "N" msgstr "N" #: ../gnokii/gnokii-logo.c:183 msgid "n" msgstr "n" #: ../gnokii/gnokii-logo.c:184 msgid "S" msgstr "S" #: ../gnokii/gnokii-logo.c:184 msgid "s" msgstr "s" #: ../gnokii/gnokii-logo.c:188 #, c-format msgid "Enter name of new file: " msgstr "Saisissez le nom du nouveau fichier : " #: ../gnokii/gnokii-logo.c:233 #, c-format msgid "Dealer welcome note " msgstr "Message de bienvenue du revendeur " #: ../gnokii/gnokii-logo.c:235 ../gnokii/gnokii-logo.c:242 #, c-format msgid "currently set to \"%s\"\n" msgstr "Parametre actuel \"%s\"\n" #: ../gnokii/gnokii-logo.c:237 ../gnokii/gnokii-logo.c:244 #, c-format msgid "currently empty\n" msgstr "Actuellement vide\n" #: ../gnokii/gnokii-logo.c:240 #, c-format msgid "Welcome note " msgstr "Message de bienvenue " #: ../gnokii/gnokii-logo.c:250 #, c-format msgid "Operator logo for %s (%s) network got successfully\n" msgstr "Réception du logo operateur pour le reseau %s (%s) : ok.\n" #: ../gnokii/gnokii-logo.c:255 ../gnokii/gnokii-logo.c:267 #: ../gnokii/gnokii-logo.c:282 ../gnokii/gnokii-logo.c:363 #, c-format msgid "Sorry, gnokii doesn't know %s network !\n" msgstr "Désolé, gnokii ne connait pas le réseau %s !\n" #: ../gnokii/gnokii-logo.c:263 #, c-format msgid "Startup logo got successfully\n" msgstr "Réception du logo de démarrage : ok\n" #: ../gnokii/gnokii-logo.c:274 ../gnokii/gnokii-logo.c:291 #, c-format msgid "Your phone doesn't have logo uploaded !\n" msgstr "Votre téléphone n'a aucun logo télécharge !\n" #: ../gnokii/gnokii-logo.c:276 #, c-format msgid "Caller logo got successfully\n" msgstr "Réception du logo de l'appelant : ok\n" #: ../gnokii/gnokii-logo.c:277 #, c-format msgid "Caller group name: %s, ringing tone: %s (%d)\n" msgstr "Groupe appelant : %s, sonnerie: %s (%d)\n" #: ../gnokii/gnokii-logo.c:288 #, c-format msgid "Unknown bitmap type.\n" msgstr "Type d'image inconnu.\n" #: ../gnokii/gnokii-logo.c:302 #, c-format msgid "What kind of logo do you want to get ?\n" msgstr "Quel type de logo desirez-vous récupérer ?\n" #: ../gnokii/gnokii-logo.c:320 #, c-format msgid "Error while reading file \"%s\": %s\n" msgstr "Erreur à la lecture du fichier: \"%s\": %s\n" #: ../gnokii/gnokii-logo.c:398 #, c-format msgid "What kind of logo do you want to set ?\n" msgstr "Quel type de logo souhaitez-vous activer ?\n" #: ../gnokii/gnokii-logo.c:434 #, c-format msgid "Error setting dealer welcome note - " msgstr "Erreur lors du paramétrage du message de bienvenue du revendeur - " #: ../gnokii/gnokii-logo.c:436 #, c-format msgid "Error setting welcome note - " msgstr "Erreur lors du parmétrage du message de bienvenue - " #: ../gnokii/gnokii-logo.c:440 #, c-format msgid "SIM card and PIN is required\n" msgstr "La carte SIM et le code PIN sont requis\n" #: ../gnokii/gnokii-logo.c:447 #, c-format msgid "too long, truncated to \"%s\" (length %zi)\n" msgstr "Trop long, tronqué à \"%s\" (longueur %i)\n" #: ../gnokii/gnokii-logo.c:455 #, c-format msgid "Error setting startup logo - SIM card and PIN is required\n" msgstr "" "Erreur à l'activation du logo de démarrage - La carte SIM et le code PIN " "sont requis.\n" #: ../gnokii/gnokii-logo.c:456 #, c-format msgid "i: %i, %2x %2x\n" msgstr "i: %i, %2x %2x\n" #: ../gnokii/gnokii-logo.c:466 #, c-format msgid "Done.\n" msgstr "Effectué.\n" #: ../gnokii/gnokii-logo.c:481 #, c-format msgid "Could not load bitmap: %s\n" msgstr "Echec du chargement de l'image : %s\n" #: ../gnokii/gnokii-mms.c:46 #, c-format msgid "" "MMS options:\n" " --getmms memory_type start [end] [{--mime|--pdu|--raw} file]\n" " [-d|--delete] [-o|--overwrite]\n" " --deletemms memory_type start [end]\n" msgstr "" #: ../gnokii/gnokii-mms.c:56 #, c-format msgid "" " usage: --getmms memory start [end] retrieves messages from memory type " "(SM, ME,\n" " IN, OU, ...) starting from\n" " location start and ending with end;\n" " if end option is omitted, just one " "entry\n" " is read;\n" " start must be a number, end may be a " "number\n" " or 'end' string;\n" " if 'end' is used entries are being read\n" " until empty location\n" " --mime filename convert MMS in MIME format and save it " "to\n" " the given file;\n" " --pdu filename extract MMS from raw format and save it " "to\n" " the given file;\n" " --raw filename get MMS from phone and save it unchanged " "to\n" " the given file;\n" " --delete\n" " -d delete MMS after reading\n" " --overwrite\n" " -o overwrite destination file without " "asking\n" "\n" msgstr "" #: ../gnokii/gnokii-mms.c:82 ../gnokii/gnokii-sms.c:749 #, c-format msgid "%d. %s (%s)\n" msgstr "%d. %s (%s)\n" #: ../gnokii/gnokii-mms.c:82 #, fuzzy msgid "MMS" msgstr "SMS" #: ../gnokii/gnokii-mms.c:113 ../gnokii/gnokii-mms.c:201 #: ../gnokii/gnokii-mms.c:243 ../gnokii/gnokii-sms.c:486 #: ../gnokii/gnokii-sms.c:658 ../gnokii/gnokii-sms.c:884 #: ../gnokii/gnokii-sms.c:936 #, c-format msgid "Unknown memory type %s (use ME, SM, IN, OU, ...)!\n" msgstr "Type de mémoire inconnu %s (utilisez ME, SM, ...) !\n" #: ../gnokii/gnokii-mms.c:114 ../gnokii/gnokii-mms.c:202 #: ../gnokii/gnokii-mms.c:244 ../gnokii/gnokii-sms.c:487 #: ../gnokii/gnokii-sms.c:659 ../gnokii/gnokii-sms.c:885 #: ../gnokii/gnokii-sms.c:937 #, c-format msgid "" "Run gnokii --showsmsfolderstatus for a list of supported memory types.\n" msgstr "" #: ../gnokii/gnokii-mms.c:150 ../gnokii/gnokii-sms.c:715 #, c-format msgid "Saving into %s\n" msgstr "Enregistrement dans %s.\n" #: ../gnokii/gnokii-mms.c:187 ../gnokii/gnokii-sms.c:876 #, c-format msgid "(delete failed)\n" msgstr "(effacement: echec)\n" #: ../gnokii/gnokii-mms.c:189 ../gnokii/gnokii-sms.c:878 #, c-format msgid "(message deleted)\n" msgstr "(message efface)\n" #: ../gnokii/gnokii-mms.c:199 #, fuzzy, c-format msgid "Getting MMS failed (location %d from memory %s)! (%s)\n" msgstr "Echec de lecture à l'emplacement mémoire %d, mémoire %s\n" #: ../gnokii/gnokii-mms.c:219 #, c-format msgid "" " usage: --deletemms memory start [end] deletes messages from memory type\n" " (SM, ME, IN, OU, ...) starting\n" " from location start and ending with " "end;\n" " if end option is omitted, just one " "entry\n" " is removed;\n" " if 'end' is used entries are being " "removed\n" " until empty location\n" "\n" msgstr "" #: ../gnokii/gnokii-mms.c:262 #, fuzzy, c-format msgid "Deleted MMS (location %d from memory %s)\n" msgstr "Echec de lecture à l'emplacement mémoire %d, mémoire %s\n" #: ../gnokii/gnokii-mms.c:266 #, fuzzy, c-format msgid "Deleting MMS failed (location %d from memory %s)! (%s)\n" msgstr "Echec de lecture à l'emplacement mémoire %d, mémoire %s\n" #: ../gnokii/gnokii-monitor.c:67 #, c-format msgid "" "Monitoring options:\n" " --monitor [delay|once]\n" " --getdisplaystatus\n" " --displayoutput\n" " --netmonitor {reset|off|field|devel|next|nr}\n" msgstr "" #: ../gnokii/gnokii-monitor.c:79 #, c-format msgid "INCOMING CALL: ID: %d, Number: %s, Name: \"%s\"\n" msgstr "APPEL ENTRANT: ID: %d, numero: %s, nom: \"%s\"\n" #: ../gnokii/gnokii-monitor.c:82 #, c-format msgid "CALL %d TERMINATED (LOCAL)\n" msgstr "Appel %d terminé (LOCAL)\n" #: ../gnokii/gnokii-monitor.c:85 #, c-format msgid "CALL %d TERMINATED (REMOTE)\n" msgstr "Appel %d terminé (REMOTE)\n" #: ../gnokii/gnokii-monitor.c:88 #, c-format msgid "CALL %d ACCEPTED BY THE REMOTE SIDE\n" msgstr "Appel %d accepté par le correspondant.\n" #: ../gnokii/gnokii-monitor.c:91 #, c-format msgid "CALL %d PLACED ON HOLD\n" msgstr "Appel %d mis en attente.\n" #: ../gnokii/gnokii-monitor.c:94 #, c-format msgid "CALL %d RETRIEVED FROM HOLD\n" msgstr "Appel %d re-activé.\n" #: ../gnokii/gnokii-monitor.c:135 #, c-format msgid "CALL%d: IDLE\n" msgstr "Appel%d: inactif\n" #: ../gnokii/gnokii-monitor.c:143 msgid "RINGING" msgstr "SONNERIE" #: ../gnokii/gnokii-monitor.c:147 msgid "DIALING" msgstr "NUMEROTATION" #: ../gnokii/gnokii-monitor.c:151 msgid "ESTABLISHED" msgstr "COMMUNICATION ETABLIE" #: ../gnokii/gnokii-monitor.c:155 msgid "ON HOLD" msgstr "EN SUSPENS" #: ../gnokii/gnokii-monitor.c:159 msgid "UNKNOWN STATE" msgstr "ETAT INCONNU" #: ../gnokii/gnokii-monitor.c:164 #, c-format msgid "CALL%d: %s %s (%s) (callid: %d, duration: %d sec)\n" msgstr "Appel%d: %s %s(%s) (appel no.%d, durée: %d sec)\n" #: ../gnokii/gnokii-monitor.c:182 #, c-format msgid "LAC: %04x (%d), CellID: %08x (%d)\n" msgstr "" #: ../gnokii/gnokii-monitor.c:212 #, c-format msgid "Argument to --monitor delay needs to be positive number\n" msgstr "L'argument de --monitor est un délai, qui doit donc être positif\n" #: ../gnokii/gnokii-monitor.c:226 #, c-format msgid "Entering monitor mode...\n" msgstr "Entrée en mode surveillance...\n" #: ../gnokii/gnokii-monitor.c:254 #, c-format msgid "Network: %s, %s (%s)\n" msgstr "Réseau : %s, %s (%s)\n" #: ../gnokii/gnokii-monitor.c:262 #, c-format msgid "RFLevel: %d\n" msgstr "Niveau RF : %d\n" #: ../gnokii/gnokii-monitor.c:265 #, c-format msgid "Battery: %d\n" msgstr "Batterie : %d\n" #: ../gnokii/gnokii-monitor.c:268 #, c-format msgid "Power Source: %s\n" msgstr "Source d'énergie : %s\n" #: ../gnokii/gnokii-monitor.c:272 #, c-format msgid "SIM: Used %d, Free %d\n" msgstr "SIM : utilisée %d, disponible %d\n" #: ../gnokii/gnokii-monitor.c:276 #, c-format msgid "Phone: Used %d, Free %d\n" msgstr "Téléphone : utilisée %d, disponible %d\n" #: ../gnokii/gnokii-monitor.c:280 #, c-format msgid "DC: Used %d, Free %d\n" msgstr "DC : utilisée %d, disponible %d\n" #: ../gnokii/gnokii-monitor.c:284 #, c-format msgid "EN: Used %d, Free %d\n" msgstr "EN : utilisée %d, disponible %d\n" #: ../gnokii/gnokii-monitor.c:288 #, c-format msgid "FD: Used %d, Free %d\n" msgstr "FD : utilisée %d, disponible %d\n" #: ../gnokii/gnokii-monitor.c:292 #, c-format msgid "LD: Used %d, Free %d\n" msgstr "LD : utilisée %d, disponible %d\n" #: ../gnokii/gnokii-monitor.c:296 #, c-format msgid "MC: Used %d, Free %d\n" msgstr "MC : utilisée %d, disponible %d\n" #: ../gnokii/gnokii-monitor.c:300 #, c-format msgid "ON: Used %d, Free %d\n" msgstr "ON : utilisée %d, disponible %d\n" #: ../gnokii/gnokii-monitor.c:304 #, c-format msgid "RC: Used %d, Free %d\n" msgstr "RC : utilisée %d, disponible %d\n" #: ../gnokii/gnokii-monitor.c:307 #, c-format msgid "SMS Messages: Unread %d, Number %d\n" msgstr "Messages SMS : non lu(s) %d, numero %d\n" #: ../gnokii/gnokii-monitor.c:313 #, c-format msgid "Cell broadcast received on channel %d: %s\n" msgstr "Appel en diffusion générale reçu sur le canal %d : %s.\n" #: ../gnokii/gnokii-monitor.c:323 #, c-format msgid "Leaving monitor mode...\n" msgstr "Sortie du mode surveillance...\n" #: ../gnokii/gnokii-monitor.c:330 #, c-format msgid "Call in progress: %-3s\n" msgstr "Appel en cours : %-3s\n" #: ../gnokii/gnokii-monitor.c:331 ../gnokii/gnokii-monitor.c:333 #: ../gnokii/gnokii-monitor.c:335 ../gnokii/gnokii-monitor.c:337 #: ../gnokii/gnokii-monitor.c:339 ../gnokii/gnokii-monitor.c:341 #: ../gnokii/gnokii-monitor.c:343 ../gnokii/gnokii-monitor.c:345 #: ../gnokii/gnokii-settings.c:200 msgid "on" msgstr "marche" #: ../gnokii/gnokii-monitor.c:331 ../gnokii/gnokii-monitor.c:333 #: ../gnokii/gnokii-monitor.c:335 ../gnokii/gnokii-monitor.c:337 #: ../gnokii/gnokii-monitor.c:339 ../gnokii/gnokii-monitor.c:341 #: ../gnokii/gnokii-monitor.c:343 ../gnokii/gnokii-monitor.c:345 #: ../gnokii/gnokii-settings.c:200 msgid "off" msgstr "arrêt" #: ../gnokii/gnokii-monitor.c:332 #, c-format msgid "Unknown: %-3s\n" msgstr "Inconnu : %-3s\n" #: ../gnokii/gnokii-monitor.c:334 #, c-format msgid "Unread SMS: %-3s\n" msgstr "SMS non lus : %-3s\n" #: ../gnokii/gnokii-monitor.c:336 #, c-format msgid "Voice call: %-3s\n" msgstr "Activer appel vocal : %-3s\n" #: ../gnokii/gnokii-monitor.c:338 #, c-format msgid "Fax call active: %-3s\n" msgstr "Activer appel fax : %-3s\n" #: ../gnokii/gnokii-monitor.c:340 #, c-format msgid "Data call active: %-3s\n" msgstr "Activer appel données : %-3s\n" #: ../gnokii/gnokii-monitor.c:342 #, c-format msgid "Keyboard lock: %-3s\n" msgstr "Verrou clavier : %-3s\n" #: ../gnokii/gnokii-monitor.c:344 #, c-format msgid "SMS storage full: %-3s\n" msgstr "Stockage SMS saturé : %-3s\n" #: ../gnokii/gnokii-monitor.c:430 #, c-format msgid "Entered display monitoring mode...\n" msgstr "Mode surveillance activé...\n" #: ../gnokii/gnokii-monitor.c:447 ../gnokii/gnokii-sms.c:1322 #, c-format msgid "Shutting down\n" msgstr "Arrêt en cours.\n" #: ../gnokii/gnokii-monitor.c:449 #, c-format msgid "Leaving display monitor mode...\n" msgstr "Sortie du mode surveillance...\n" #: ../gnokii/gnokii-monitor.c:490 #, c-format msgid " usage: --netmonitor {reset|off|field|devel|next|nr}\n" msgstr "" #: ../gnokii/gnokii-other.c:59 #, c-format msgid "" "Misc options:\n" " --keysequence\n" " --enterchar\n" " --listnetworks\n" " --getnetworkinfo\n" msgstr "" "Options diverses: gnokii --keysequence\n" " gnokii --enterchar\n" " gnokii --listnetworks\n" " gnokii --getnetworkinfo\n" #: ../gnokii/gnokii-other.c:96 #, c-format msgid "Failed to press key: %s\n" msgstr "Echec de l'appui de la touche %s\n" #: ../gnokii/gnokii-other.c:155 #, c-format msgid "Error entering char: %s\n" msgstr "Entrée d'un caractere impossible : %s\n" #: ../gnokii/gnokii-other.c:169 #, c-format msgid "Network Name\n" msgstr "Nom du réseau\n" #: ../gnokii/gnokii-other.c:170 #, c-format msgid "-----------------------------------------\n" msgstr "-----------------------------------------\n" #: ../gnokii/gnokii-other.c:172 #, c-format msgid "%-7s %s (%s)\n" msgstr "%-7s %s (%s)\n" #: ../gnokii/gnokii-other.c:202 #, c-format msgid "Network : %s (%s)\n" msgstr "Reseau : %s (%s)\n" #: ../gnokii/gnokii-other.c:205 #, c-format msgid "Network code : %s\n" msgstr "Code Réseau: %s\n" #: ../gnokii/gnokii-other.c:206 #, c-format msgid "LAC : %04x (%d)\n" msgstr "IMEI : %04x\n" #: ../gnokii/gnokii-other.c:207 #, c-format msgid "Cell id : %08x (%d)\n" msgstr "Cell id : %04x\n" #: ../gnokii/gnokii-phonebook.c:55 #, c-format msgid "" "Phonebook options:\n" " --getphonebook memory_type start_number [end_number|end]\n" " [[-r|--raw]|[-v|--vcard]|[-l|--ldif]]\n" " --writephonebook [[-o|--overwrite]|[-f|--find-free]]\n" " [-m|--memory-type|--memory memory_type]\n" " [-n|--memory-location|--location number]\n" " [[-v|--vcard]|[-l|--ldif]]\n" " --deletephonebook memory_type start_number [end_number|end]\n" msgstr "" #: ../gnokii/gnokii-phonebook.c:68 #, c-format msgid "" " usage: --getphonebook memory start [end] reads phonebook entries from " "memory type\n" " (SM, ME, IN, OU, ...) messages " "starting\n" " from location start and ending with " "end;\n" " if end option is omitted, just one " "entry\n" " is read;\n" " if 'end' is used all entries are " "read\n" " -r\n" " --raw output in raw form (comma " "separated)\n" " -v\n" " --vcard output in vcard format\n" " -l\n" " --ldif output in ldif format\n" "\n" msgstr "" #: ../gnokii/gnokii-phonebook.c:187 #, c-format msgid "%d. %s: %s\n" msgstr "%d. %s: %s\n" #: ../gnokii/gnokii-phonebook.c:199 msgid "Caller group" msgstr "Groupe d'appelant" #: ../gnokii/gnokii-phonebook.c:208 #, c-format msgid "Address information:\n" msgstr "Information d'adresse:\n" #: ../gnokii/gnokii-phonebook.c:210 ../gnokii/gnokii-phonebook.c:212 #: ../gnokii/gnokii-phonebook.c:214 ../gnokii/gnokii-phonebook.c:216 #: ../gnokii/gnokii-phonebook.c:218 ../gnokii/gnokii-phonebook.c:220 #: ../gnokii/gnokii-phonebook.c:222 #, c-format msgid " %s: %s\n" msgstr " %s: %s\n" #: ../gnokii/gnokii-phonebook.c:210 msgid "Post office address" msgstr "Adresse postale" #: ../gnokii/gnokii-phonebook.c:233 #, c-format msgid "%04u.%02u.%02u %02u:%02u:%02u" msgstr "%04u.%02u.%02u %02u:%02u:%02u" #: ../gnokii/gnokii-phonebook.c:247 #, c-format msgid "Date: %04u.%02u.%02u %02u:%02u:%02u\n" msgstr "Date: %02u.%02u.%04u %02u:%02u:%02u\n" #: ../gnokii/gnokii-phonebook.c:252 #, c-format msgid "Empty memory location. Skipping.\n" msgstr "Emplacement mémoire SMS vide. Passage au suivant.\n" #: ../gnokii/gnokii-phonebook.c:255 #, c-format msgid "Error reading from the location %d in memory %s\n" msgstr "Echec de lecture à l'emplacement mémoire %d, mémoire %s\n" #: ../gnokii/gnokii-phonebook.c:272 #, c-format msgid "" " usage: --writephonebook [[-o|--overwrite]|[-f|--find-free]]\n" " [-m|--memory-type|--memory memory_type]\n" " [-n|--memory-location|--location number]\n" " [[-v|--vcard]|[-l|--ldif]]\n" "\n" msgstr "" #: ../gnokii/gnokii-phonebook.c:416 #, c-format msgid "Location busy. " msgstr "Occupe." #: ../gnokii/gnokii-phonebook.c:419 ../gnokii/gnokii-sms.c:540 #: ../gnokii/gnokii-sms.c:831 ../gnokii/gnokii-utils.c:61 #, c-format msgid "Overwrite? (yes/no) " msgstr "Ecraser ? (yes/no)" #: ../gnokii/gnokii-phonebook.c:423 ../gnokii/gnokii-sms.c:543 #: ../gnokii/gnokii-utils.c:65 ../gnokii/gnokii-wap.c:223 msgid "no" msgstr "non" #: ../gnokii/gnokii-phonebook.c:426 #, c-format msgid "" "\n" "Incorrect answer [%s]. Assuming 'no'.\n" msgstr "" #: ../gnokii/gnokii-phonebook.c:446 #, c-format msgid "Write Succeeded: memory type: %s, loc: %d, name: %s, number: %s\n" msgstr "Ecriture: Type de memoire: %s, Lieu: %d, Nom: %s, Numero: %s. ok.\n" #: ../gnokii/gnokii-phonebook.c:453 ../gnokii/gnokii-phonebook.c:458 #, c-format msgid "Write failed (%s): memory type: %s, loc: %d, name: %s, number: %s\n" msgstr "" "Ecriture(%s): Type de memoire: %s, Lieu: %d, Nom: %s, Numero: %s. echec.\n" #: ../gnokii/gnokii-phonebook.c:466 #, c-format msgid "" " usage: --deletephonebook memory_type start_number [end_number|end]\n" "\n" msgstr "" #: ../gnokii/gnokii-phonebook.c:505 #, c-format msgid "Phonebook entry removed: memory type: %s, loc: %d\n" msgstr "Entree supprimee: type de memoire: %s, emplacement: %d\n" #: ../gnokii/gnokii-phonebook.c:512 #, c-format msgid "Phonebook entry removal FAILED (%s): memory type: %s, loc: %d\n" msgstr "Suppression d'une enrtree (%s): echec.Type de memoire: %s, Lieu: %d.\n" #: ../gnokii/gnokii-profile.c:55 #, c-format msgid "" "Profile options:\n" " --getprofile [start_number [end_number]] [-r|--raw]\n" " --setprofile\n" " --getactiveprofile\n" " --setactiveprofile profile_number\n" msgstr "" #: ../gnokii/gnokii-profile.c:65 #, c-format msgid " usage: --getprofile [start_number [end_number]] [-r|--raw]\n" msgstr "" #: ../gnokii/gnokii-profile.c:133 #, c-format msgid "Starting profile number is greater than stop\n" msgstr "" "Le numero du profile de depart est plus grand que pour le dernier profile.\n" #: ../gnokii/gnokii-profile.c:138 #, c-format msgid "Profile number must be value from 0 to %d!\n" msgstr "Le numero du profile doit etre compris entre 0 et %d.\n" #: ../gnokii/gnokii-profile.c:143 #, c-format msgid "This phone supports only %d profiles!\n" msgstr "Ce telephone supporte seulement %d profiles.\n" #: ../gnokii/gnokii-profile.c:161 ../gnokii/gnokii-profile.c:254 #, c-format msgid "Cannot get profile %d\n" msgstr "Chargement du profile %d : echec\n" #. Translators: %d is the profile number, %s is the profile name. Example: 1. "Outdoors" #: ../gnokii/gnokii-profile.c:175 #, fuzzy, c-format msgid "%d. \"%s\"\n" msgstr "%d. %s: %s\n" #: ../gnokii/gnokii-profile.c:176 #, c-format msgid " (name defined)\n" msgstr " (nom defini)\n" #: ../gnokii/gnokii-profile.c:177 #, c-format msgid "Incoming call alert: %s\n" msgstr "Sonnerie pour appel entrant: %s\n" #: ../gnokii/gnokii-profile.c:178 #, c-format msgid "Ringing tone: %s (%d)\n" msgstr "Sonnerie: %s (%d)\n" #: ../gnokii/gnokii-profile.c:179 #, c-format msgid "Ringing volume: %s\n" msgstr "Volume de la sonnerie: %s\n" #: ../gnokii/gnokii-profile.c:180 #, c-format msgid "Message alert tone: %s\n" msgstr "Sonnerie pour message d'alerte: %s\n" #: ../gnokii/gnokii-profile.c:181 #, c-format msgid "Keypad tones: %s\n" msgstr "Son touches: %s\n" #: ../gnokii/gnokii-profile.c:182 #, c-format msgid "Warning and game tones: %s\n" msgstr "Avertissement et sonneries jeux: %s.\n" #. FIXME: Light settings is only used for Car #: ../gnokii/gnokii-profile.c:185 #, c-format msgid "Lights: %s\n" msgstr "Lumiere: %s.\n" #: ../gnokii/gnokii-profile.c:186 #, c-format msgid "Vibration: %s\n" msgstr "Vibreur: %s\n" #. FIXME: it will be nice to add here reading caller group name. #: ../gnokii/gnokii-profile.c:189 #, c-format msgid "Caller groups: 0x%02x\n" msgstr "Groupe appelant: 0x%02x\n" #. FIXME: Automatic answer is only used for Car and Headset. #: ../gnokii/gnokii-profile.c:192 #, c-format msgid "Automatic answer: %s\n" msgstr "Decrocher automatiquement: %s.\n" #: ../gnokii/gnokii-profile.c:223 ../gnokii/gnokii-sms.c:1120 #: ../gnokii/gnokii-wap.c:285 #, c-format msgid "Input line format isn't valid\n" msgstr "Le format de l'entree n'est pas valide.\n" #: ../gnokii/gnokii-profile.c:229 #, c-format msgid "Cannot set profile: %s\n" msgstr "Activation du profile %s: echec.\n" #: ../gnokii/gnokii-profile.c:248 #, c-format msgid "Cannot get active profile: %s\n" msgstr "Chargement du profil actif: %s: echec.\n" #: ../gnokii/gnokii-profile.c:256 #, c-format msgid "Active profile: %d (%s)\n" msgstr "Profil actif: \"%d\": (%s).\n" #: ../gnokii/gnokii-profile.c:263 #, c-format msgid " usage: --setactiveprofile profile_number\n" msgstr "" #: ../gnokii/gnokii-profile.c:281 #, c-format msgid "Cannot set active profile to %d: %s\n" msgstr "Activation du profile %d: echec (%s).\n" #: ../gnokii/gnokii-ringtone.c:96 #, c-format msgid "" "Ringtone options:\n" " --sendringtone rtttlfile destination\n" " --getringtone rtttlfile [location] [-r|--raw]\n" " --setringtone rtttlfile [location] [-r|--raw] [--name name]\n" " --playringtone rtttlfile [--volume vol]\n" " --ringtoneconvert source destination\n" " --getringtonelist\n" " --deleteringtone start [end]\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:117 ../gnokii/gnokii-ringtone.c:392 #: ../gnokii/gnokii-ringtone.c:447 #, c-format msgid "Failed to load ringtone: %s\n" msgstr "Impossible de charger la sonnerie: %s\n" #: ../gnokii/gnokii-ringtone.c:162 #, c-format msgid " usage: --getringtone rtttlfile [location] [-r|--raw]\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:216 #, c-format msgid "Getting ringtone %d failed: %s\n" msgstr "Chargement de la sonnerie %d: echec (erreur=%s)\n" #: ../gnokii/gnokii-ringtone.c:219 #, c-format msgid "Getting ringtone %d (\"%s\") succeeded!\n" msgstr "Chargement de la sonnerie %d (\"%s\"), ok.\n" #: ../gnokii/gnokii-ringtone.c:222 ../gnokii/gnokii-ringtone.c:303 #: ../gnokii/gnokii-ringtone.c:387 #, c-format msgid "Internal gnokii error: null filename\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:231 #, c-format msgid "Failed to save ringtone.\n" msgstr "Impossible d'enregistrer la sonnerie.\n" #: ../gnokii/gnokii-ringtone.c:236 #, c-format msgid "Failed to write ringtone.\n" msgstr "Impossible d'enregistrer la sonnerie.\n" #: ../gnokii/gnokii-ringtone.c:242 ../gnokii/gnokii-ringtone.c:451 #, c-format msgid "Failed to save ringtone: %s\n" msgstr "Enregistrement de la sonnerie impossible: %s\n" #: ../gnokii/gnokii-ringtone.c:252 #, c-format msgid " usage: --setringtone rtttlfile [location] [-r|--raw] [--name name]\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:311 ../gnokii/gnokii-ringtone.c:324 #, c-format msgid "Failed to load ringtone.\n" msgstr "Impossible de charger la sonnerie.\n" #: ../gnokii/gnokii-ringtone.c:333 #, c-format msgid "Send succeeded!\n" msgstr "Envoi ok !\n" #: ../gnokii/gnokii-ringtone.c:335 #, c-format msgid "Send failed: %s\n" msgstr "Envoi impossible: %s\n" #: ../gnokii/gnokii-ringtone.c:342 #, c-format msgid " usage: --playringtone rtttlfile [-v|--volume vol]\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:424 #, c-format msgid "Play succeeded!\n" msgstr "La lecture a reussi.\n" #: ../gnokii/gnokii-ringtone.c:426 #, c-format msgid "Play failed: %s\n" msgstr "La lecture echoue: %s\n" #: ../gnokii/gnokii-ringtone.c:433 #, c-format msgid " usage: --ringtoneconvert source destination\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:455 #, c-format msgid "%d note(s) converted.\n" msgstr "%d note(s) convertie(s).\n" #: ../gnokii/gnokii-ringtone.c:467 #, c-format msgid "Failed to get the list of ringtones\n" msgstr "Impossible de charger la liste des sonneries:\n" #: ../gnokii/gnokii-ringtone.c:471 #, c-format msgid "First user defined ringtone location: %3d\n" msgstr "Emplacement de la premiere sonnerie personnalisee: %3d\n" #: ../gnokii/gnokii-ringtone.c:472 #, c-format msgid "" "Number of user defined ringtones: %d\n" "\n" msgstr "" "Nombre de sonneries personnalisee definies: %d\n" "\n" #: ../gnokii/gnokii-ringtone.c:473 #, c-format msgid "loc rwu name\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:474 #, c-format msgid "===============================\n" msgstr "===============================\n" #: ../gnokii/gnokii-ringtone.c:476 #, c-format msgid "%3d %d%d%d %-20s\n" msgstr "%3d %d%d%d %-20s\n" #: ../gnokii/gnokii-ringtone.c:488 #, c-format msgid " usage: --deleteringtone start [end]\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:512 #, c-format msgid "Ringtone %d deleted\n" msgstr "Sonnerie %d detruite\n" #: ../gnokii/gnokii-ringtone.c:514 #, c-format msgid "Failed to delete ringtone %d: %s\n" msgstr "Destruction de la sonnerie %d impossible: %s\n" #: ../gnokii/gnokii-security.c:59 #, c-format msgid "" "Security options:\n" " --identify\n" " --getlocksinfo\n" msgstr "" #: ../gnokii/gnokii-security.c:65 #, c-format msgid "" " --entersecuritycode PIN|PIN2|PUK|PUK2|SEC [COMMAND]\n" " --getsecuritycodestatus\n" " --getsecuritycode\n" " --changesecuritycode PIN|PIN2|PUK|PUK2\n" msgstr "" #: ../gnokii/gnokii-security.c:75 #, c-format msgid "IMEI : %s\n" msgstr "IMEI : %s\n" #: ../gnokii/gnokii-security.c:76 #, c-format msgid "Manufacturer : %s\n" msgstr "Fabricant: %s\n" #: ../gnokii/gnokii-security.c:77 #, c-format msgid "Model : %s\n" msgstr "Modele : %s\n" #: ../gnokii/gnokii-security.c:78 #, c-format msgid "Product name : %s\n" msgstr "Nom du produit : %s\n" #: ../gnokii/gnokii-security.c:79 #, c-format msgid "Revision : %s\n" msgstr "Revision : %s\n" #: ../gnokii/gnokii-security.c:100 #, c-format msgid "%7s : %10s, %7s, %6s, counter %d\n" msgstr "%7s : %10s, %7s, %6s, compteur %d\n" #: ../gnokii/gnokii-security.c:120 #, c-format msgid "Getting security code... \n" msgstr "Chargement du code de securite\n" #: ../gnokii/gnokii-security.c:124 #, c-format msgid "Security code is: %s\n" msgstr "Réseaucode: %s\n" #: ../gnokii/gnokii-security.c:168 #, c-format msgid " usage: --entersecuritycode PIN|PIN2|PUK|PUK2|SEC\n" msgstr "" #: ../gnokii/gnokii-security.c:193 ../gnokii/gnokii-security.c:281 msgid "Enter your code: " msgstr "Entrez votre code:" #: ../gnokii/gnokii-security.c:202 #, c-format msgid "Code ok.\n" msgstr "Code ok.\n" #: ../gnokii/gnokii-security.c:221 #, c-format msgid "Security code status: " msgstr "Etat du code de securite: " #: ../gnokii/gnokii-security.c:225 #, c-format msgid "waiting for Security Code.\n" msgstr "en attente du code de securite.\n" #: ../gnokii/gnokii-security.c:228 #, c-format msgid "waiting for PIN.\n" msgstr "en attente du code PIN.\n" #: ../gnokii/gnokii-security.c:231 #, c-format msgid "waiting for PIN2.\n" msgstr "en attente du code PIN2.\n" #: ../gnokii/gnokii-security.c:234 #, c-format msgid "waiting for PUK.\n" msgstr "en attente du code PUK.\n" #: ../gnokii/gnokii-security.c:237 #, c-format msgid "waiting for PUK2.\n" msgstr "en attente du code PUK2.\n" #: ../gnokii/gnokii-security.c:240 #, c-format msgid "nothing to enter.\n" msgstr "rien a entrer.\n" #: ../gnokii/gnokii-security.c:243 #, c-format msgid "unknown\n" msgstr "inconnu\n" #: ../gnokii/gnokii-security.c:254 #, c-format msgid " usage: --changesecuritycode PIN|PIN2|PUK|PUK2\n" msgstr "" #: ../gnokii/gnokii-security.c:282 msgid "Enter new code: " msgstr "Entrez le nouveau code: " #: ../gnokii/gnokii-security.c:283 msgid "Retype new code: " msgstr "Re-tapez le code: " #: ../gnokii/gnokii-security.c:285 #, c-format msgid "Error: new code differs\n" msgstr "Erreur: les codes entrés sont différents l'un de l'autre.\n" #: ../gnokii/gnokii-security.c:295 #, c-format msgid "Code changed.\n" msgstr "Le code a ete change.\n" #: ../gnokii/gnokii-settings.c:56 #, c-format msgid "" "Phone settings:\n" " --reset [soft|hard]\n" " --setdatetime [YYYY [MM [DD [HH [MM]]]]]\n" " --getdatetime\n" " --setalarm [HH MM]\n" " --getalarm\n" msgstr "" #: ../gnokii/gnokii-settings.c:142 #, c-format msgid "Date: %4d/%02d/%02d\n" msgstr "Date: %4d/%02d/%02d\n" #: ../gnokii/gnokii-settings.c:143 #, c-format msgid "Time: %02d:%02d:%02d\n" msgstr "Heure: %02d:%02d:%02d\n" #: ../gnokii/gnokii-settings.c:200 #, c-format msgid "Alarm: %s\n" msgstr "Alarme: %s\n" #: ../gnokii/gnokii-settings.c:201 #, c-format msgid "Time: %02d:%02d\n" msgstr "Heure: %02d:%02d\n" #: ../gnokii/gnokii-settings.c:223 #, c-format msgid "What kind of reset do you want??\n" msgstr "Quel type de remise a zero voulez-vous activer ?\n" #: ../gnokii/gnokii-sms.c:63 #, c-format msgid "" "SMS options:\n" " --sendsms destination [--smsc message_center_number |\n" " --smscno message_center_index] [-r|--report] [-8|--8bit]\n" " [-C|--class n] [-v|--validity n]\n" " [-i|--imelody] [-a|--animation file;file;file;file]\n" " [-o|--concat this;total;serial] [-w|--wappush url]\n" " --savesms [--sender from] [--smsc message_center_number |\n" " --smscno message_center_index] [-f|--folder folder_id]\n" " [-l|--location number] [-s|--sent|-r|--read] [-d|--" "deliver]\n" " [-t|--datetime YYMMDDHHMMSS]\n" " --getsms memory_type start [end] [-f|--file file]\n" " [-F|--force-file file] [-a|--append-file file]\n" " [-d|--delete]\n" " --deletesms memory_type start [end]\n" " --getsmsc [start_number [end_number]] [-r|--raw]\n" " --setsmsc\n" " --createsmsfolder name\n" " --deletesmsfolder folderid\n" " --showsmsfolderstatus\n" " --smsreader\n" msgstr "" #: ../gnokii/gnokii-sms.c:88 #, c-format msgid "" " usage: --sendsms destination recipient number (msisdn)\n" " --smsc message_center_number number (msisdn) of the message\n" " center\n" " --smscno message_center_index index of the message center " "stored\n" " in the phone memory\n" " -r\n" " --report request delivery report\n" " -v n\n" " --validity n set message validity\n" " -C n\n" " --class n set message class; possible " "values\n" " are 0, 1, 2, or 3\n" " -8\n" " --8bit set 8bit coding\n" " -i\n" " --imelody send imelody message, text is " "read\n" " from stdin\n" " -a file;file;file;file\n" " --animation file;file;file;file send animation message\n" " -o this;total;serial\n" " --concat this;total;serial send 'this' part of all 'total' " "parts\n" " identified by 'serial'\n" " -w url\n" " --wappush url send wappush to the given url\n" "Message text is read from standard input.\n" "\n" msgstr "" #: ../gnokii/gnokii-sms.c:220 #, c-format msgid "Incorrect --concat option\n" msgstr "--concat: Option incorrecte.\n" #: ../gnokii/gnokii-sms.c:267 ../gnokii/gnokii-sms.c:574 #, c-format msgid "Empty message. Quitting.\n" msgstr "Message vide: fin du programme.\n" #: ../gnokii/gnokii-sms.c:278 #, c-format msgid "URL is too long (max 255 chars). Quitting.\n" msgstr "" #: ../gnokii/gnokii-sms.c:287 ../gnokii/gnokii-utils.c:139 #, c-format msgid "Please enter SMS text. End your input with :\n" msgstr "Merci d'entrer le texte du SMS. Terminez par :\n" #: ../gnokii/gnokii-sms.c:294 #, c-format msgid "WAP Push encoding failed!\n" msgstr "" #: ../gnokii/gnokii-sms.c:329 #, c-format msgid "" "Cannot read the SMSC number from your phone. If the sms send will fail, " "please use --smsc option explicitely giving the number.\n" msgstr "" #: ../gnokii/gnokii-sms.c:368 #, c-format msgid "" " usage: --savesms\n" " --smsc message_center_number number (msisdn) of the message\n" " center\n" " --smscno message_center_index index of the message center stored\n" " in the phone memory\n" " --sender msisdn set sender number\n" " -l n\n" " --location n save message at location n\n" " -r\n" " --read mark message as read\n" " -s\n" " --sent mark message as sent\n" " -f ID\n" " --folder ID save message to the folder ID where\n" " is of type IN, OU...\n" " -d\n" " --deliver set message type as sms deliver\n" " (to be sent)\n" " -t YYMMDDHHMISS\n" " --datetime YYMMDDHHMISS set date and time of message " "delivery\n" "Message text is read from standard input.\n" "\n" msgstr "" #: ../gnokii/gnokii-sms.c:496 ../gnokii/gnokii-sms.c:501 #, c-format msgid "Invalid datetime format: %s (should be YYMMDDHHMISS, all digits)!\n" msgstr "" "Format de date invalide: %s (devrait etre YYMMDDHHMMSS, tous chiffres " "requis)!\n" #: ../gnokii/gnokii-sms.c:517 #, c-format msgid "Invalid datetime: %s.\n" msgstr "Format de date invalide: %s.\n" #: ../gnokii/gnokii-sms.c:538 #, c-format msgid "Message at specified location exists. " msgstr "Le message indique a cet endroit existe deja." #: ../gnokii/gnokii-sms.c:585 #, c-format msgid "Storing SMS... " msgstr "Stockage des SMS..." #: ../gnokii/gnokii-sms.c:591 #, c-format msgid "Saved to %d!\n" msgstr "Enregistrement de %d.\n" #: ../gnokii/gnokii-sms.c:593 #, c-format msgid "Saving failed (%s)\n" msgstr "Enregistrement: echec (erreur=%s).\n" #: ../gnokii/gnokii-sms.c:601 #, c-format msgid "" " usage: --getsms memory start [end] retrieves messages from memory type " "(SM, ME,\n" " IN, OU, ...) starting from\n" " location start and ending with end;\n" " if end option is omitted, just one " "entry\n" " is read;\n" " start must be a number, end may be a " "number\n" " or 'end' string;\n" " if 'end' is used entries are being read\n" " until empty location\n" " --force-file filename\n" " -F filename save sms to the file overwriting it if\n" " the file already exists;\n" " file is in mbox format\n" " --file filename\n" " -f filename as above but user is prompted before\n" " overwriting the file\n" " --append-file filename\n" " -a filename as above but append to the existing " "file\n" " --delete\n" " -d delete message after reading\n" "\n" msgstr "" #: ../gnokii/gnokii-sms.c:752 #, c-format msgid "Sending date/time: %02d/%02d/%04d %02d:%02d:%02d " msgstr "Date d'envoi/heure: %02d.%02d.%04d %02d:%02d:%02d" #. Translators: this format is for printing a timezone with a leading +/- #: ../gnokii/gnokii-sms.c:757 ../gnokii/gnokii-sms.c:765 #: ../gnokii/gnokii-sms.c:779 ../gnokii/gnokii-sms.c:794 #, c-format msgid "%+03d00" msgstr "" #: ../gnokii/gnokii-sms.c:760 #, fuzzy, c-format msgid "Delivery date/time: %02d/%02d/%04d %02d:%02d:%02d " msgstr "Date/heure: %02d.%02d.%04d %02d:%02d:%02d " #: ../gnokii/gnokii-sms.c:768 ../gnokii/gnokii-sms.c:800 #, fuzzy, c-format msgid "Recipient: %s Msg Center: %s\n" msgstr "Recu par: %s Centre de messages: %s\n" #: ../gnokii/gnokii-sms.c:769 ../gnokii/gnokii-sms.c:785 #, c-format msgid "Text:\n" msgstr "Text:\n" #: ../gnokii/gnokii-sms.c:774 ../gnokii/gnokii-sms.c:789 #, c-format msgid "Date/time: %02d/%02d/%04d %02d:%02d:%02d " msgstr "Date/heure: %02d.%02d.%04d %02d:%02d:%02d " #: ../gnokii/gnokii-sms.c:782 ../gnokii/gnokii-sms.c:803 #, c-format msgid "Sender: %s Msg Center: %s\n" msgstr "Expediteur: %s Centre de messages SMS: %s\n" #: ../gnokii/gnokii-sms.c:783 #, c-format msgid "Bitmap:\n" msgstr "Image:\n" #: ../gnokii/gnokii-sms.c:809 #, c-format msgid "%s:\n" msgstr "" #: ../gnokii/gnokii-sms.c:814 #, c-format msgid "GSM operator logo for %s (%s) network.\n" msgstr "Logo operateur pour le reseau GSM %s (%s).\n" #: ../gnokii/gnokii-sms.c:816 #, c-format msgid "Saved by Logo Express\n" msgstr "Enregistre avec Logo Express.\n" #: ../gnokii/gnokii-sms.c:818 #, c-format msgid "Saved by Operator Logo Uploader by Thomas Kessler\n" msgstr "Enregistre avec Logo Uploader de Thomas Kessler.\n" #: ../gnokii/gnokii-sms.c:830 ../gnokii/gnokii-utils.c:59 #, c-format msgid "File %s exists.\n" msgstr "Le fichier %s existe deja.\n" #: ../gnokii/gnokii-sms.c:839 #, c-format msgid "Couldn't save logofile %s!\n" msgstr "Enregistrement du fichier logo %s: echec.\n" #: ../gnokii/gnokii-sms.c:847 #, c-format msgid "Linked (%d/%d):\n" msgstr "Lie (%d/%d):\n" #: ../gnokii/gnokii-sms.c:882 #, fuzzy, c-format msgid "Getting SMS failed (location %d from %s memory)! (%s)\n" msgstr "Echec de lecture à l'emplacement mémoire %d, mémoire %s\n" #: ../gnokii/gnokii-sms.c:910 #, c-format msgid "" " usage: --deletesms memory start [end] deletes messages from memory type\n" " (SM, ME, IN, OU, ...) starting\n" " from location start and ending with " "end;\n" " if end option is omitted, just one " "entry\n" " is removed;\n" " if 'end' is used entries are being " "removed\n" " until empty location\n" "\n" msgstr "" #: ../gnokii/gnokii-sms.c:957 #, fuzzy, c-format msgid "Deleted SMS (location %d from memory %s)\n" msgstr "Echec de lecture à l'emplacement mémoire %d, mémoire %s\n" #: ../gnokii/gnokii-sms.c:961 #, fuzzy, c-format msgid "Deleting SMS failed (location %d from %s memory)! (%s)\n" msgstr "Echec de lecture à l'emplacement mémoire %d, mémoire %s\n" #: ../gnokii/gnokii-sms.c:974 #, c-format msgid "" " usage: --getsmsc [start [end]] reads message center details from\n" " the phone starting with start location\n" " and ending with end location;\n" " no end parameter means to read every\n" " location to the end;\n" " no start parameter means to start with\n" " the first location;\n" "-r\n" "--raw output in raw format (comma separated)\n" " default is human readable form\n" "\n" msgstr "" #: ../gnokii/gnokii-sms.c:1025 #, fuzzy, c-format msgid "SMS center: location number must be greater than 0\n" msgstr "Le numéro de centre SMS doit être supérieur à 0\n" #: ../gnokii/gnokii-sms.c:1061 #, c-format msgid "No. %d: \"%s\" (defined name)\n" msgstr "No: %d: \"%s\" (nom defini).\n" #: ../gnokii/gnokii-sms.c:1063 #, c-format msgid "No. %d: \"%s\" (default name)\n" msgstr "No. %d: \"%s\" (nom par defaut).\n" #: ../gnokii/gnokii-sms.c:1064 #, c-format msgid "SMS center number is %s\n" msgstr "Le numero du centre SMS est %s.\n" #: ../gnokii/gnokii-sms.c:1066 #, c-format msgid "Default recipient number is %s\n" msgstr "Le destinataire par defaut est %s.\n" #: ../gnokii/gnokii-sms.c:1068 #, c-format msgid "No default recipient number is defined\n" msgstr "Le destinataire par défaut n'est pas défini\n" #: ../gnokii/gnokii-sms.c:1069 #, c-format msgid "Messages sent as %s\n" msgstr "Messages envoyés comme %s\n" #: ../gnokii/gnokii-sms.c:1070 #, c-format msgid "Message validity is %s\n" msgstr "La validité du message est %s\n" #: ../gnokii/gnokii-sms.c:1080 #, c-format msgid "" " usage: --setsmsc\n" "SMSC details are read from standard input.\n" "\n" msgstr "" #: ../gnokii/gnokii-sms.c:1137 #, c-format msgid "" " usage: --createsmsfolder name creates SMS folder with given name\n" "\n" msgstr "" #: ../gnokii/gnokii-sms.c:1158 #, c-format msgid "Folder with name: %s successfully created!\n" msgstr "Creation du repertoire %s: ok.\n" #: ../gnokii/gnokii-sms.c:1165 #, c-format msgid "" " usage: --deletesmsfolder folderid removes SMS folder with given id\n" "\n" msgstr "" #: ../gnokii/gnokii-sms.c:1183 #, c-format msgid "Error: Number must be between 1 and %i!\n" msgstr "Erreur: Le nombre doit etre compris entre 1 et %i.\n" #: ../gnokii/gnokii-sms.c:1191 #, c-format msgid "Number %i of 'My Folders' successfully deleted!\n" msgstr "Le repertoire %i a bien ete detruit.\n" #: ../gnokii/gnokii-sms.c:1198 #, c-format msgid "" " usage: --showsmsfolderstatus shows summary of SMS folders\n" "\n" msgstr "" #: ../gnokii/gnokii-sms.c:1215 #, c-format msgid "Cannot list available folders: %s\n" msgstr "Impossible d'obtenir la liste des repertoires disponibles: %s\n" #: ../gnokii/gnokii-sms.c:1219 #, c-format msgid "No. Name Id #Msg\n" msgstr "No. Nom Id #Msg\n" #: ../gnokii/gnokii-sms.c:1220 #, c-format msgid "========================================================\n" msgstr "========================================================\n" #: ../gnokii/gnokii-sms.c:1224 #, fuzzy, c-format msgid "Cannot get status of folder \"%s\": %s\n" msgstr "Impossible de lire les informations du repertoire \"%s\": %s\n" #: ../gnokii/gnokii-sms.c:1227 #, c-format msgid "%3d %-42s %4s %4u\n" msgstr "" #: ../gnokii/gnokii-sms.c:1250 #, c-format msgid "SMS received from number: %s\n" msgstr "SMS recu depuis le numero: %s\n" #: ../gnokii/gnokii-sms.c:1259 #, c-format msgid "Got message %d: %s\n" msgstr "Message recu %d: %s\n" #: ../gnokii/gnokii-sms.c:1267 #, c-format msgid "### Exists?!\n" msgstr "### Existe ?!\n" #: ../gnokii/gnokii-sms.c:1273 #, c-format msgid "### Cannot create file %s\n" msgstr "Erreur a la creation du fichier %s\n" #: ../gnokii/gnokii-sms.c:1297 #, c-format msgid "" " usage: --smsreader periodically check sms on the phone and stores them\n" " in mbox format\n" "\n" msgstr "" #: ../gnokii/gnokii-sms.c:1314 #, c-format msgid "Entered sms reader mode...\n" msgstr "Mode lecture de SMS active...\n" #: ../gnokii/gnokii-sms.c:1324 #, c-format msgid "Exiting sms reader mode...\n" msgstr "Mode lecture de SMS desactive...\n" #: ../gnokii/gnokii-todo.c:56 #, c-format msgid "" "ToDo options:\n" " --gettodo start_number [end_number|end] [-v|--vCal]\n" " --writetodo vcalendarfile start_number [end_number|end]\n" " --deletealltodos\n" msgstr "" #: ../gnokii/gnokii-todo.c:65 #, c-format msgid "" "usage: --gettodo start_number [end_number | end] [-v|--vCal]\n" " start_number - entry number in the phone todo (numeric)\n" " end_number - until this entry in the phone todo (numeric, " "optional)\n" " end - the string \"end\" indicates all entries from start to " "end\n" " -v - output in iCalendar format\n" " NOTE: if no end is given, only the start entry is written\n" msgstr "" #: ../gnokii/gnokii-todo.c:119 msgid "Todo" msgstr "A faire" #: ../gnokii/gnokii-todo.c:120 msgid "Priority" msgstr "Priorité" #: ../gnokii/gnokii-todo.c:133 #, c-format msgid "The ToDo note could not be read: %s\n" msgstr "La note n'a pas pu etre lue: %s.\n" #: ../gnokii/gnokii-todo.c:142 #, c-format msgid "" "usage: --writetodo vcalendarfile start_number [end_number|end]\n" " vcalendarfile - file containing todo notes in vCal format\n" " start_number - first note to read from file\n" " end_number - last note to read from file\n" " end - read all notes from file from start_number\n" " NOTE: it stores the note at the first empty location.\n" msgstr "" #: ../gnokii/gnokii-todo.c:216 #, c-format msgid "Priority %d. %s\n" msgstr "Priorite %d. %s\n" #: ../gnokii/gnokii-todo.c:218 #, c-format msgid "Failed to write ToDo note: %s\n" msgstr "Echec de l'écriture de la note ToDo : %s\n" #: ../gnokii/gnokii-todo.c:234 #, c-format msgid "Successfully deleted all ToDo notes!\n" msgstr "Suppression de toutes les notes todo: ok.\n" #: ../gnokii/gnokii-todo.c:236 #, c-format msgid "Failed to delete ToDo note: %s\n" msgstr "Impossible d'effacer la note ToDo : %s\n" #: ../gnokii/gnokii-utils.c:145 #, c-format msgid "Couldn't read from stdin!\n" msgstr "Impossible de lire depuis stdin.\n" #: ../gnokii/gnokii-utils.c:151 #, c-format msgid "Input too long! (%d, maximum is %d)\n" msgstr "Entree trop longue (%d, le maximum est %d)\n" #: ../gnokii/gnokii-utils.c:166 #, c-format msgid "Could not null bitmap: %s\n" msgstr "Impossible de mettre l'image bitmap %s a zero.\n" #: ../gnokii/gnokii-utils.c:171 #, c-format msgid "Could not load bitmap from %s: %s\n" msgstr "Chargement de l'image bitmap depuis le fichier %s: (erreur=%s).\n" #: ../gnokii/gnokii-utils.c:210 #, c-format msgid "" "Warning: end value (%d) is less than start value (%d). Setting it to the " "start value (%d)\n" msgstr "" #: ../gnokii/gnokii-wap.c:55 #, c-format msgid "" "WAP options:\n" " --getwapbookmark number\n" " --writewapbookmark name URL\n" " --deletewapbookmark number\n" " --getwapsetting number [-r|--raw]\n" " --writewapsetting\n" " --activatewapsetting number\n" msgstr "" #: ../gnokii/gnokii-wap.c:67 #, c-format msgid " usage: --getwapbookmark number\n" msgstr "" #: ../gnokii/gnokii-wap.c:88 ../gnokii/gnokii-wap.c:219 #, c-format msgid "WAP bookmark nr. %d:\n" msgstr "Lien WAP numero. %d:\n" #: ../gnokii/gnokii-wap.c:103 #, c-format msgid " usage: --writebookmark name URL\n" msgstr "" #: ../gnokii/gnokii-wap.c:126 #, c-format msgid "WAP bookmark nr. %d successfully written!\n" msgstr "Enregistrement du lien WAP numero. %d : ok.\n" #: ../gnokii/gnokii-wap.c:138 #, c-format msgid " usage: --deletewapbookmark number\n" msgstr "" #: ../gnokii/gnokii-wap.c:159 #, c-format msgid "WAP bookmark nr. %d deleted!\n" msgstr "Lien WAP numero. %d efface.\n" #: ../gnokii/gnokii-wap.c:171 #, c-format msgid " usage: --getwapsetting number [-r|--raw]\n" msgstr "" #: ../gnokii/gnokii-wap.c:221 ../xgnokii/xgnokii_contacts.c:725 #: ../xgnokii/xgnokii_contacts.c:803 ../xgnokii/xgnokii_contacts.c:942 #: ../xgnokii/xgnokii_contacts.c:984 ../xgnokii/xgnokii_contacts.c:1202 msgid "Home" msgstr "Domicile" #: ../gnokii/gnokii-wap.c:222 msgid "Session mode" msgstr "Mode de session :" #: ../gnokii/gnokii-wap.c:223 msgid "Connection security" msgstr "Sécurité de connexion" #: ../gnokii/gnokii-wap.c:224 msgid "Data bearer" msgstr "" #: ../gnokii/gnokii-wap.c:226 ../gnokii/gnokii-wap.c:236 msgid "Authentication type" msgstr "Type d'authentification" #: ../gnokii/gnokii-wap.c:227 msgid "Data call type" msgstr "Type d'appel de données" #: ../gnokii/gnokii-wap.c:228 msgid "Data call speed" msgstr "Débit de l'appel de données" #: ../gnokii/gnokii-wap.c:229 ../gnokii/gnokii-wap.c:237 msgid "Login type" msgstr "Type d'identifiant" #: ../gnokii/gnokii-wap.c:230 ../gnokii/gnokii-wap.c:239 msgid "IP" msgstr "IP" #: ../gnokii/gnokii-wap.c:232 ../gnokii/gnokii-wap.c:240 msgid "Username" msgstr "Nom d'utilisateur" #: ../gnokii/gnokii-wap.c:233 ../gnokii/gnokii-wap.c:241 msgid "Password" msgstr "Mot de passe" #: ../gnokii/gnokii-wap.c:235 ../xgnokii/xgnokii.c:1615 msgid "Connection" msgstr "Connection" #: ../gnokii/gnokii-wap.c:238 msgid "Access point" msgstr "Point d'acces" #: ../gnokii/gnokii-wap.c:243 msgid "Service number" msgstr "Numéro de service" #: ../gnokii/gnokii-wap.c:244 msgid "Server number" msgstr "Numéro du centre d'appel" #: ../gnokii/gnokii-wap.c:292 #, c-format msgid "Cannot write WAP setting: %s\n" msgstr "Ecriture des parametres WAP: echec (erreur=%s)\n" #: ../gnokii/gnokii-wap.c:299 #, c-format msgid " usage: --activatewapsetting number\n" msgstr "" #: ../gnokii/gnokii-wap.c:320 #, c-format msgid "WAP setting nr. %d activated!\n" msgstr "Parametre WAP no. %d active.\n" #: ../smsd/file.c:59 ../smsd/file.c:90 #, c-format msgid "Cannot stat file %s!\n" msgstr "Lecture du fichier %s impossible\n" #: ../smsd/file.c:68 #, c-format msgid "" "File %s is not regular file or\n" "you have not executable permission to this file!\n" msgstr "" "Le fichier %s est un fichier special ou\n" "vous n'avez pas les permissions d'execution sur celui-ci\n" #: ../smsd/file.c:85 #, c-format msgid "You have not set spool directory, sms sending is disabled!\n" msgstr "" "Vous n'avez pas de repertoire de spool, envoi de messages sms desactive\n" #: ../smsd/file.c:99 #, c-format msgid "" "File %s is not directory or\n" "you have not read and write permissions to this directory,\n" "sms sending is disabled!\n" "!" msgstr "" "Le fichier %s n'est pas un repertoire\n" "ou vous n'avez pas les droits d'ecriture sur celui-ci,\n" "envoi de sms desactive!\n" "!" #: ../smsd/file.c:166 #, c-format msgid "Cannot open directory %s\n" msgstr "Ouverture du repertoire %s impossible\n" #: ../smsd/file.c:199 #, c-format msgid "Remote number is empty in %s!\n" msgstr "Le numéro distant est vide dans %s !\n" #: ../smsd/file.c:243 ../smsd/file.c:258 #, c-format msgid "Cannot unlink %s." msgstr "Destruction de %s: echec." #: ../smsd/file.c:252 #, c-format msgid "Cannot send sms from file %s\n" msgstr "Envoi impossible du sms depuis fichier %s: .\n" #: ../smsd/file.c:255 #, c-format msgid "Cannot rename file %s to %s. Trying to unlink it.\n" msgstr "Impossible de renommer le fichier %s en %s. Tentative d'effacement.\n" #: ../smsd/lowlevel.c:111 #, fuzzy, c-format msgid "" "Cannot load phone %s!\n" "Do you have proper section in the config file?\n" msgstr "" "Impossible de charger le telephone %s!\n" "Avez-vous rempli la section correspondante dans votre gnokiirc ?\n" #: ../smsd/lowlevel.c:400 ../xgnokii/xgnokii_lowlevel.c:1349 #, c-format msgid "Event %d failed with return code %d!\n" msgstr "Evennement \"%d\": echec (code retour= %d).\n" #: ../smsd/lowlevel.c:449 #, c-format msgid "Timeout in file %s, line %d, restarting connection.\n" msgstr "" #: ../smsd/lowlevel.c:459 #, c-format msgid "Too many consecutive errors, restarting connection.\n" msgstr "" #: ../smsd/mysql.c:75 ../smsd/pq.c:66 #, c-format msgid "Connection to database '%s' on host '%s' failed.\n" msgstr "Connection a la base de donnees '%s' sur le serveur '%s' echec.\n" #: ../smsd/mysql.c:132 #, fuzzy, c-format msgid "%d: SELECT FROM multipart command failed.\n" msgstr "%d: SELECT FROM outbox: echec.\n" #: ../smsd/mysql.c:169 #, fuzzy, c-format msgid "%d: INSERT INTO multipartinbox command failed.\n" msgstr "%d: INSERT INTO inbox: echec.\n" #: ../smsd/mysql.c:187 #, fuzzy, c-format msgid "%d: SELECT FROM multipartinbox command failed.\n" msgstr "%d: SELECT FROM outbox: echec.\n" #: ../smsd/mysql.c:223 #, fuzzy, c-format msgid "%d: DELETE FROM multipartinbox command failed.\n" msgstr "%d: SELECT FROM outbox: echec.\n" #: ../smsd/mysql.c:261 #, fuzzy, c-format msgid "%d: SELECT FROM inbox command failed.\n" msgstr "%d: SELECT FROM outbox: echec.\n" #: ../smsd/mysql.c:294 #, fuzzy, c-format msgid "%d: INSERT INTO inbox command failed.\n" msgstr "%d: INSERT INTO inbox: echec.\n" #: ../smsd/mysql.c:334 ../smsd/sqlite.c:239 #, c-format msgid "%d: SELECT FROM outbox command failed.\n" msgstr "%d: SELECT FROM outbox: echec.\n" #: ../smsd/mysql.c:344 #, c-format msgid "%d: Store Mysql Result Failed.\n" msgstr "%d: Stocker Resultat Mysql: echec.\n" #: ../smsd/mysql.c:397 ../smsd/pq.c:425 #, c-format msgid "%d: UPDATE command failed.\n" msgstr "%d: commande UPDATE: echec.\n" #: ../smsd/pq.c:75 #, fuzzy, c-format msgid "Setting client charset '%s' for database '%s' on host '%s' failed.\n" msgstr "Connection a la base de donnees '%s' sur le serveur '%s' echec.\n" #: ../smsd/pq.c:120 ../smsd/pq.c:257 #, fuzzy, c-format msgid "%d: Escaping string failed.\n" msgstr "%d: commande UPDATE: echec.\n" #: ../smsd/pq.c:148 ../smsd/pq.c:210 #, fuzzy, c-format msgid "%d: SELECT FROM %s.multipart command failed.\n" msgstr "%d: SELECT FROM outbox : échec.\n" #: ../smsd/pq.c:188 #, fuzzy, c-format msgid "%d: INSERT INTO %s.multipartinbox failed.\n" msgstr "%d : INSERT INTO inbox: échec.\n" #: ../smsd/pq.c:239 #, fuzzy, c-format msgid "%d: DELETE FROM %s.multipartinbox command failed.\n" msgstr "%d: SELECT FROM outbox : échec.\n" #: ../smsd/pq.c:294 #, fuzzy, c-format msgid "%d: SELECT FROM %s.inbox command failed.\n" msgstr "%d: SELECT FROM outbox : échec.\n" #: ../smsd/pq.c:331 #, c-format msgid "%d: INSERT INTO %s.inbox failed.\n" msgstr "%d : INSERT INTO inbox: échec.\n" #: ../smsd/pq.c:374 #, c-format msgid "%d: SELECT FROM %s.outbox command failed.\n" msgstr "%d: SELECT FROM outbox : échec.\n" #: ../smsd/smsd.c:137 #, c-format msgid "smsd - version %s from gnokii %s\n" msgstr "" #: ../smsd/smsd.c:142 #, c-format msgid "" "smsd - version %s from gnokii %s\n" "Copyright Jan Derfinak 1999-2011\n" msgstr "" #: ../smsd/smsd.c:149 #, c-format msgid "" "\n" "Usage: %s [options]\n" " -u, --user db_username OR action if -m file\n" " -p, --password db_password\n" " -d, --db db_name\n" " -c, --host db_hostname OR spool directory if -m file\n" " -s, --schema db_schema\n" " -e, --encoding client_encoding\n" " -m, --module db_module (pq, mysql, sqlite, file)\n" " -l, --libdir path_to_db_module\n" " -f, --logfile file\n" " -t, --phone phone_number\n" " -i, --interval polling_interval_for_incoming_sms's_in_seconds\n" " -S, --maxsms number_of_sms's (only in dumb mode)\n" " -b, --inbox memoryType\n" " -0, --firstpos0\n" " -v, --version\n" " -h, --help\n" msgstr "" #: ../smsd/smsd.c:183 #, c-format msgid "WARNING: Cannot open file %s for appending.\n" msgstr "WARNING: Ouverture du fichierl %s pour ajout: echec.\n" #: ../smsd/smsd.c:342 #, c-format msgid "Wrong number of arguments\n" msgstr "Nombre d'arguments incorrects.\n" #: ../smsd/smsd.c:349 #, c-format msgid "Cannot load database module %s in directory %s!\n" msgstr "" "Chargement du module de base de donnees %s dans le repertoire %s " "impossible!\n" #: ../smsd/smsd.c:423 #, fuzzy, c-format msgid "Sending to %s unsuccessful. Error: %s\n" msgstr "Echec de l'envoi vers %s. Erreur %s\n" #: ../smsd/smsd.c:429 #, c-format msgid "Sending to %s successful.\n" msgstr "Envoi du SMS vers %s: ok\n" #: ../smsd/smsd.c:455 #, c-format msgid "Inserting sms from %s successful.\n" msgstr "Insertion du sms venant de %s: succes.\n" #: ../smsd/smsd.c:465 #, c-format msgid "Duplicated sms from %s.\n" msgstr "SMS en double depuis %s.\n" #: ../smsd/smsd.c:475 #, c-format msgid "Multipart sms from %s. Waiting for the next parts.\n" msgstr "" #: ../smsd/smsd.c:485 #, c-format msgid "" "Inserting sms from %s unsuccessful.\n" "Date: %02d-%02d-%02d %02d:%02d:%02d+%02d\n" "Text: %s\n" "\n" "Exiting.\n" msgstr "" #: ../smsd/sqlite.c:57 ../smsd/sqlite.c:69 #, fuzzy, c-format msgid "Connection to database '%s' failed.\n" msgstr "Connection a la base de donnees '%s' sur le serveur '%s' echec.\n" #: ../smsd/sqlite.c:116 ../smsd/sqlite.c:182 #, c-format msgid "%d: Parsing query %s failed!" msgstr "" #: ../smsd/sqlite.c:117 ../smsd/sqlite.c:183 #, fuzzy, c-format msgid "Error: %s" msgstr "Erreur : %s\n" #: ../smsd/sqlite.c:133 #, c-format msgid "%d: INSERT INTO inbox failed.\n" msgstr "%d: INSERT INTO inbox: echec.\n" #: ../smsd/sqlite.c:134 #, fuzzy, c-format msgid "Error %d: %s\n" msgstr "Erreur : %s\n" #: ../smsd/sqlite.c:135 #, fuzzy, c-format msgid "Query: %s\n" msgstr "Numero: %s\n" #: ../utils/mgnokiidev.c:179 #, c-format msgid "mgnokiidev takes one and only one argument!\n" msgstr "mgnokiidev requiert exactement un argument!\n" #: ../xgnokii/xgnokii.c:217 msgid "Reading caller groups names ..." msgstr "Lecture du groupe appelant ..." #: ../xgnokii/xgnokii.c:226 msgid "No group" msgstr "Aucun groupe" #: ../xgnokii/xgnokii.c:347 msgid "Short Message received" msgstr "Message(s) court(s) recu(s)" #: ../xgnokii/xgnokii.c:353 ../xgnokii/xgnokii_lowlevel.c:1346 msgid "Working..." msgstr "Occupe ..." #: ../xgnokii/xgnokii.c:370 msgid "Call in progress" msgstr "Appel en cours ..." #: ../xgnokii/xgnokii.c:383 msgid "Hide" msgstr "Cacher" #: ../xgnokii/xgnokii.c:457 msgid "anonymous" msgstr "anonyme" #: ../xgnokii/xgnokii.c:470 #, c-format msgid "" "Outgoing call in progress:\n" "Time: %s" msgstr "Appel en cours: (Time=%s)" #: ../xgnokii/xgnokii.c:472 #, c-format msgid "" "Incoming call from: %s\n" "Time: %s" msgstr "" "Appel entrant en provenance de: %s\n" "Heure: %s" #: ../xgnokii/xgnokii.c:584 ../xgnokii/xgnokii.c:1455 msgid "Max. Time" msgstr "Duree maximale." #: ../xgnokii/xgnokii.c:631 msgid "Reading SMS centers ..." msgstr "Lecture des numeros de centres SMS ..." #: ../xgnokii/xgnokii.c:896 msgid "SMS not supported!" msgstr "SMS non supporte" #: ../xgnokii/xgnokii.c:901 msgid "Calendar not supported!" msgstr "Calendrier non supporte." #: ../xgnokii/xgnokii.c:1088 msgid "Error writing configuration file!" msgstr "Ecriture du fichier de configuration: echec." #: ../xgnokii/xgnokii.c:1100 ../xgnokii/xgnokii_contacts.c:3126 msgid "Contacts" msgstr "Contacts" #: ../xgnokii/xgnokii.c:1111 ../xgnokii/xgnokii_calendar.c:1547 msgid "Calendar" msgstr "Calendrier" #: ../xgnokii/xgnokii.c:1116 ../xgnokii/xgnokii_logos.c:1525 msgid "Logos" msgstr "Logos" #: ../xgnokii/xgnokii.c:1122 msgid "DTMF" msgstr "Frequences Vocales (DTMF)" #: ../xgnokii/xgnokii.c:1127 ../xgnokii/xgnokii_speed.c:548 msgid "Speed Dial" msgstr "Appel rapide" #: ../xgnokii/xgnokii.c:1132 msgid "Keyboard" msgstr "Clavier" #: ../xgnokii/xgnokii.c:1137 ../xgnokii/xgnokii_netmon.c:294 msgid "Net Monitor" msgstr "Surveillance Reseau" #: ../xgnokii/xgnokii.c:1147 msgid "Data calls" msgstr "Appels donnees: %s" #: ../xgnokii/xgnokii.c:1156 ../xgnokii/xgnokii.c:1575 msgid "Options" msgstr "Options" #: ../xgnokii/xgnokii.c:1166 ../xgnokii/xgnokii.c:1183 msgid "About" msgstr "A Propos" #: ../xgnokii/xgnokii.c:1186 ../xgnokii/xgnokii.c:1358 #: ../xgnokii/xgnokii_calendar.c:688 ../xgnokii/xgnokii_calendar.c:734 #: ../xgnokii/xgnokii_calendar.c:881 ../xgnokii/xgnokii_calendar.c:1001 #: ../xgnokii/xgnokii_calendar.c:1141 ../xgnokii/xgnokii_calendar.c:1274 #: ../xgnokii/xgnokii_calendar.c:1435 ../xgnokii/xgnokii_contacts.c:875 #: ../xgnokii/xgnokii_contacts.c:1119 ../xgnokii/xgnokii_contacts.c:1255 #: ../xgnokii/xgnokii_contacts.c:1406 ../xgnokii/xgnokii_contacts.c:2949 #: ../xgnokii/xgnokii_sms.c:570 msgid "Ok" msgstr "Ok" #: ../xgnokii/xgnokii.c:1197 #, c-format msgid "" "xgnokii version: %s\n" "gnokii version: %s\n" "\n" "Copyright (C) 1999-2004 Pavel Janik ml.,\n" "Hugh Blemings, Jan Derfinak,\n" "Pawel Kot and others\n" "xgnokii is free software, covered by the GNU General Public License,\n" "and you are welcome to change it and/or distribute copies of it under\n" "certain conditions. There is absolutely no warranty for xgnokii.\n" "See GPL for details.\n" msgstr "" "xgnokii version: %s\n" "gnokii version: %s\n" "\n" "Copyright (C) 1999-2004 Pavel Janik ml.,\n" "Hugh Blemings, Jan Derfinak,\n" "Pawel Kot and others\n" "xgnokii is free software, covered by the GNU General Public License,\n" "and you are welcome to change it and/or distribute copies of it under\n" "certain conditions. There is absolutely no warranty for xgnokii.\n" "See GPL for details.\n" #: ../xgnokii/xgnokii.c:1352 msgid "Edit SMS Setting" msgstr "Modifier les parametres SMS" #: ../xgnokii/xgnokii.c:1366 ../xgnokii/xgnokii_calendar.c:697 #: ../xgnokii/xgnokii_calendar.c:743 ../xgnokii/xgnokii_calendar.c:890 #: ../xgnokii/xgnokii_calendar.c:1010 ../xgnokii/xgnokii_calendar.c:1150 #: ../xgnokii/xgnokii_calendar.c:1283 ../xgnokii/xgnokii_calendar.c:1443 #: ../xgnokii/xgnokii_common.c:80 ../xgnokii/xgnokii_common.c:162 #: ../xgnokii/xgnokii_contacts.c:886 ../xgnokii/xgnokii_contacts.c:1263 #: ../xgnokii/xgnokii_contacts.c:1414 ../xgnokii/xgnokii_contacts.c:1651 #: ../xgnokii/xgnokii_contacts.c:1698 ../xgnokii/xgnokii_contacts.c:1816 #: ../xgnokii/xgnokii_contacts.c:2212 ../xgnokii/xgnokii_contacts.c:2956 #: ../xgnokii/xgnokii_sms.c:578 msgid "Cancel" msgstr "Annuler" #: ../xgnokii/xgnokii.c:1379 msgid "Set's name:" msgstr "Nom de l'ensemble:" #: ../xgnokii/xgnokii.c:1393 msgid "Center:" msgstr "Centre:" #: ../xgnokii/xgnokii.c:1407 msgid "Sending Format:" msgstr "Format d'envoi:" #: ../xgnokii/xgnokii.c:1447 msgid "Validity Period:" msgstr "Periode de validite:" #: ../xgnokii/xgnokii.c:1572 msgid "Set's name" msgstr "Nom de l'ensemble:" #: ../xgnokii/xgnokii.c:1572 msgid "Center number" msgstr "Numero du centre d'appel" #: ../xgnokii/xgnokii.c:1572 msgid "Format" msgstr "Format" #: ../xgnokii/xgnokii.c:1572 msgid "Validity" msgstr "Validite" #: ../xgnokii/xgnokii.c:1580 msgid "Apply" msgstr "Appliquer" #: ../xgnokii/xgnokii.c:1588 ../xgnokii/xgnokii_contacts.c:2198 #: ../xgnokii/xgnokii_dtmf.c:181 msgid "Save" msgstr "Enregistrer" #: ../xgnokii/xgnokii.c:1594 msgid "Close" msgstr "Fermer" #. ** Connection notebook ** #: ../xgnokii/xgnokii.c:1608 msgid "Phone and connection type" msgstr "Telephone et type de connection" #: ../xgnokii/xgnokii.c:1622 msgid "Port:" msgstr "Port:" #: ../xgnokii/xgnokii.c:1636 ../xgnokii/xgnokii.c:1716 msgid "Model:" msgstr "Modele:" #: ../xgnokii/xgnokii.c:1650 msgid "Bindir:" msgstr "Bindir:" #: ../xgnokii/xgnokii.c:1664 msgid "Init length:" msgstr "Longueur initiale:" #: ../xgnokii/xgnokii.c:1679 msgid "Connection:" msgstr "Connection:" #: ../xgnokii/xgnokii.c:1683 msgid "infrared" msgstr "infrarouge" #: ../xgnokii/xgnokii.c:1690 msgid "serial" msgstr "serie" #: ../xgnokii/xgnokii.c:1697 msgid "irda" msgstr "irda" #. ** Phone notebook ** #: ../xgnokii/xgnokii.c:1702 msgid "Phone information" msgstr "Information telephone" #: ../xgnokii/xgnokii.c:1730 msgid "Version:" msgstr "Version:" #: ../xgnokii/xgnokii.c:1744 msgid "Revision:" msgstr "Revision:" #: ../xgnokii/xgnokii.c:1758 msgid "IMEI:" msgstr "IMEI:" #: ../xgnokii/xgnokii.c:1772 msgid "Names length:" msgstr "Longueur des noms:" #: ../xgnokii/xgnokii.c:1780 msgid "SIM:" msgstr "SIM:" #: ../xgnokii/xgnokii.c:1798 msgid "Phone:" msgstr "Telefone: " #: ../xgnokii/xgnokii.c:1805 msgid "Alarm setting" msgstr "Parametres de l'alarme" #: ../xgnokii/xgnokii.c:1812 ../xgnokii/xgnokii.c:1819 #: ../xgnokii/xgnokii_calendar.c:957 ../xgnokii/xgnokii_calendar.c:1089 #: ../xgnokii/xgnokii_calendar.c:1218 ../xgnokii/xgnokii_calendar.c:1350 #: ../xgnokii/xgnokii_calendar.c:1542 msgid "Alarm" msgstr "Alarme" #. ** SMS notebook ** #: ../xgnokii/xgnokii.c:1842 ../xgnokii/xgnokii_sms.c:1672 msgid "Short Message Service" msgstr "Service SMS" #: ../xgnokii/xgnokii.c:1875 msgid "Edit" msgstr "Modifier" #. ** Business notebook ** #: ../xgnokii/xgnokii.c:1887 ../xgnokii/xgnokii_sms.c:1541 #: ../xgnokii/xgnokii_sms.c:1716 msgid "Business Card" msgstr "Carte de visite" #: ../xgnokii/xgnokii.c:1893 msgid "User" msgstr "Utilisateur" #: ../xgnokii/xgnokii.c:1911 ../xgnokii/xgnokii_calendar.c:1206 #: ../xgnokii/xgnokii_calendar.c:1338 ../xgnokii/xgnokii_contacts.c:1276 msgid "Name:" msgstr "Nom:" #: ../xgnokii/xgnokii.c:1936 msgid "Title:" msgstr "Titre:" #: ../xgnokii/xgnokii.c:1961 msgid "Company:" msgstr "Entreprise:" #: ../xgnokii/xgnokii.c:1986 msgid "Telephone:" msgstr "Telephone:" #: ../xgnokii/xgnokii.c:2012 msgid "Fax:" msgstr "Fax:" #: ../xgnokii/xgnokii.c:2037 msgid "Email:" msgstr "Email:" #: ../xgnokii/xgnokii.c:2062 msgid "Address:" msgstr "Adresse:" #. ** Groups notebook ** #: ../xgnokii/xgnokii.c:2085 msgid "Caller groups names" msgstr "Nom du groupe appelant" #: ../xgnokii/xgnokii.c:2092 msgid "Groups" msgstr "Groupes" #: ../xgnokii/xgnokii.c:2100 #, c-format msgid "Group %d:" msgstr "Groupe %d:" #. Mail #: ../xgnokii/xgnokii.c:2113 msgid "Mailbox" msgstr "Boite Mail" #: ../xgnokii/xgnokii.c:2120 msgid "Mail" msgstr "E-Mail" #: ../xgnokii/xgnokii.c:2127 msgid "Path to mailbox:" msgstr "Chemin vers la boite mail:" #: ../xgnokii/xgnokii_calendar.c:131 msgid "Function not implemented!" msgstr "" #: ../xgnokii/xgnokii_calendar.c:194 #, c-format msgid "%04d/%02d/%02d" msgstr "%04d/%02d/%02d" #: ../xgnokii/xgnokii_calendar.c:197 ../xgnokii/xgnokii_calendar.c:203 #, c-format msgid "%04d/%02d/%02d %02d:%02d" msgstr "%04d/%02d/%02d %02d:%02d" #: ../xgnokii/xgnokii_calendar.c:211 #, c-format msgid "%02d/%02d %02d:%02d tone %s" msgstr "%02d/%02d %02d:%02d tone %s" #: ../xgnokii/xgnokii_calendar.c:216 #, c-format msgid "%04d/%02d/%02d %02d:%02d tone %s" msgstr "%04d/%02d/%02d %02d:%02d tone %s" #: ../xgnokii/xgnokii_calendar.c:229 msgid "never" msgstr "jamais" #: ../xgnokii/xgnokii_calendar.c:232 msgid "daily" msgstr "tous les jours" #: ../xgnokii/xgnokii_calendar.c:235 msgid "weekly" msgstr "toutes les semaines" #: ../xgnokii/xgnokii_calendar.c:238 msgid "every two weeks" msgstr "toutes les 2 semaines" #: ../xgnokii/xgnokii_calendar.c:241 msgid "monthly" msgstr "" #: ../xgnokii/xgnokii_calendar.c:244 msgid "yearly" msgstr "tous les ans" #: ../xgnokii/xgnokii_calendar.c:247 #, c-format msgid "every %d minutes" msgstr "toutes les %d minutes" #: ../xgnokii/xgnokii_calendar.c:282 msgid "Type: " msgstr "Type: %d" #: ../xgnokii/xgnokii_calendar.c:292 msgid "Start date: " msgstr "" #: ../xgnokii/xgnokii_calendar.c:322 msgid "End date: " msgstr "Date de fin : " #: ../xgnokii/xgnokii_calendar.c:333 msgid "Alarm: " msgstr "Alarme" #: ../xgnokii/xgnokii_calendar.c:344 msgid "Number: " msgstr "Numero: " #: ../xgnokii/xgnokii_calendar.c:355 msgid "Location: " msgstr "Emplacement : " #: ../xgnokii/xgnokii_calendar.c:366 msgid "Recurrence: " msgstr "Repetition" #: ../xgnokii/xgnokii_calendar.c:374 msgid "Text: " msgstr "Texte:" #: ../xgnokii/xgnokii_calendar.c:504 #, c-format msgid "" "Error saving calendar note\n" "%s" msgstr "" "Erreur a l'enregistrement de la note (calendrier).\n" "%s" #: ../xgnokii/xgnokii_calendar.c:632 #, c-format msgid "%d-%02d-%02d" msgstr "%d-%02d-%02d" #: ../xgnokii/xgnokii_calendar.c:641 #, c-format msgid "%d-%02d-%02d %02d:%02d" msgstr "%d-%02d-%02d %02d:%02d" #: ../xgnokii/xgnokii_calendar.c:681 ../xgnokii/xgnokii_calendar.c:727 msgid "Choose date" msgstr "Choisissez la date." #: ../xgnokii/xgnokii_calendar.c:767 msgid "Alarm time:" msgstr "Heure de reveil:" #: ../xgnokii/xgnokii_calendar.c:837 msgid "Every Day" msgstr "Tous les jours" #: ../xgnokii/xgnokii_calendar.c:843 msgid "Every Week" msgstr "Toutes les semaines" #: ../xgnokii/xgnokii_calendar.c:849 msgid "Every 2 Weeks" msgstr "Toutes les 2 semaines" #: ../xgnokii/xgnokii_calendar.c:855 msgid "Every Year" msgstr "Tous les ans" #. #. gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL, _("Edit note"), NULL, #. NewPixmap(Edit_xpm, GUI_CalendarWindow->window, #. &GUI_CalendarWindow->style->bg[GTK_STATE_NORMAL]), #. (GtkSignalFunc) NULL, NULL); #. #: ../xgnokii/xgnokii_calendar.c:874 ../xgnokii/xgnokii_calendar.c:1610 msgid "Add reminder" msgstr "Ajouter un rappel" #: ../xgnokii/xgnokii_calendar.c:910 ../xgnokii/xgnokii_calendar.c:1029 #: ../xgnokii/xgnokii_calendar.c:1170 ../xgnokii/xgnokii_calendar.c:1303 msgid "Date:" msgstr "Date: " #: ../xgnokii/xgnokii_calendar.c:945 msgid "Subject:" msgstr "Sujet:" #: ../xgnokii/xgnokii_calendar.c:994 msgid "Add Call" msgstr "Ajouter Appel" #: ../xgnokii/xgnokii_calendar.c:1064 ../xgnokii/xgnokii_contacts.c:1289 #: ../xgnokii/xgnokii_contacts.c:1827 msgid "Number:" msgstr "Numero:" #: ../xgnokii/xgnokii_calendar.c:1077 msgid "Text:" msgstr "Texte" #: ../xgnokii/xgnokii_calendar.c:1109 ../xgnokii/xgnokii_calendar.c:1241 msgid "Repeat:" msgstr "Répéter:" #: ../xgnokii/xgnokii_calendar.c:1134 ../xgnokii/xgnokii_calendar.c:1618 msgid "Add meeting" msgstr "Ajouter rendez-vous" #: ../xgnokii/xgnokii_calendar.c:1267 ../xgnokii/xgnokii_calendar.c:1622 msgid "Add birthday" msgstr "Ajouter un anniversaire" #: ../xgnokii/xgnokii_calendar.c:1428 msgid "Delete calendar note" msgstr "Supprimer une note" #: ../xgnokii/xgnokii_calendar.c:1460 msgid "Do you want to delete selected note(s)?" msgstr "Voulez-vous détruire la(les) note sélÃecttionnée ?" #: ../xgnokii/xgnokii_calendar.c:1496 ../xgnokii/xgnokii_contacts.c:3081 #: ../xgnokii/xgnokii_dtmf.c:219 ../xgnokii/xgnokii_logos.c:1474 #: ../xgnokii/xgnokii_netmon.c:258 ../xgnokii/xgnokii_sms.c:1245 #: ../xgnokii/xgnokii_sms.c:1633 ../xgnokii/xgnokii_speed.c:516 #: ../xgnokii/xgnokii_xkeyb.c:235 ../xgnokii/xgnokii_xring.c:826 msgid "/_File" msgstr "/_Fichier" #: ../xgnokii/xgnokii_calendar.c:1497 ../xgnokii/xgnokii_contacts.c:3082 #: ../xgnokii/xgnokii_speed.c:517 msgid "/File/_Read from phone" msgstr "/Fichier/Lire depuis téléphone" #: ../xgnokii/xgnokii_calendar.c:1498 ../xgnokii/xgnokii_contacts.c:3083 #: ../xgnokii/xgnokii_speed.c:518 msgid "/File/_Save to phone" msgstr "/Fichier/_Enregistrer dans téléphone" #: ../xgnokii/xgnokii_calendar.c:1499 ../xgnokii/xgnokii_contacts.c:3084 #: ../xgnokii/xgnokii_dtmf.c:222 ../xgnokii/xgnokii_logos.c:1478 #: ../xgnokii/xgnokii_sms.c:1248 ../xgnokii/xgnokii_sms.c:1637 #: ../xgnokii/xgnokii_speed.c:519 msgid "/File/Sep1" msgstr "/Fichier/Sep1" #: ../xgnokii/xgnokii_calendar.c:1500 msgid "/File/Send via S_MS" msgstr "/Fichier/Envoyer via SMS" #: ../xgnokii/xgnokii_calendar.c:1501 ../xgnokii/xgnokii_contacts.c:3087 #: ../xgnokii/xgnokii_logos.c:1482 ../xgnokii/xgnokii_sms.c:1251 #: ../xgnokii/xgnokii_speed.c:522 msgid "/File/Sep2" msgstr "/Fichier/Sep2" #: ../xgnokii/xgnokii_calendar.c:1502 ../xgnokii/xgnokii_contacts.c:3085 #: ../xgnokii/xgnokii_speed.c:520 msgid "/File/_Import from file" msgstr "/Fichier/_Importer depuis fichier" #: ../xgnokii/xgnokii_calendar.c:1503 ../xgnokii/xgnokii_contacts.c:3086 #: ../xgnokii/xgnokii_speed.c:521 msgid "/File/_Export to file" msgstr "/Fichier/_Exporter vers fichier" #: ../xgnokii/xgnokii_calendar.c:1504 msgid "/File/Sep3" msgstr "/Fichier/Sep3" #: ../xgnokii/xgnokii_calendar.c:1505 ../xgnokii/xgnokii_contacts.c:3088 #: ../xgnokii/xgnokii_dtmf.c:223 ../xgnokii/xgnokii_logos.c:1483 #: ../xgnokii/xgnokii_netmon.c:259 ../xgnokii/xgnokii_sms.c:1252 #: ../xgnokii/xgnokii_sms.c:1638 ../xgnokii/xgnokii_speed.c:523 #: ../xgnokii/xgnokii_xkeyb.c:236 ../xgnokii/xgnokii_xring.c:836 msgid "/File/_Close" msgstr "/Fichier/Fermer" #: ../xgnokii/xgnokii_calendar.c:1506 ../xgnokii/xgnokii_contacts.c:3089 #: ../xgnokii/xgnokii_logos.c:1484 ../xgnokii/xgnokii_speed.c:524 #: ../xgnokii/xgnokii_xring.c:837 msgid "/_Edit" msgstr "/_Modifier" #: ../xgnokii/xgnokii_calendar.c:1507 msgid "/Edit/Add _reminder" msgstr "/Modifier/Ajouter un _rappel" #: ../xgnokii/xgnokii_calendar.c:1508 msgid "/Edit/Add _call" msgstr "/Modifier/Ajouter un appel" #: ../xgnokii/xgnokii_calendar.c:1509 msgid "/Edit/Add _meeting" msgstr "/Modifier/Ajouter un rendez-vous" #: ../xgnokii/xgnokii_calendar.c:1510 msgid "/Edit/Add _birthday" msgstr "/Modifier/Ajouter un anniversaire" #. #. menu_items[15].path = _("/Edit/_Edit"); #. #: ../xgnokii/xgnokii_calendar.c:1514 ../xgnokii/xgnokii_contacts.c:3093 msgid "/Edit/_Delete" msgstr "/Modifier/Supprimer" #: ../xgnokii/xgnokii_calendar.c:1515 ../xgnokii/xgnokii_contacts.c:3096 #: ../xgnokii/xgnokii_logos.c:1492 msgid "/Edit/Sep4" msgstr "/Modifier/Sep4" #: ../xgnokii/xgnokii_calendar.c:1516 ../xgnokii/xgnokii_contacts.c:3100 msgid "/Edit/Select _all" msgstr "/Modifier/Selectionner tout" #: ../xgnokii/xgnokii_calendar.c:1517 ../xgnokii/xgnokii_contacts.c:3103 #: ../xgnokii/xgnokii_dtmf.c:224 ../xgnokii/xgnokii_netmon.c:263 #: ../xgnokii/xgnokii_sms.c:1253 ../xgnokii/xgnokii_sms.c:1647 #: ../xgnokii/xgnokii_speed.c:526 ../xgnokii/xgnokii_xkeyb.c:237 msgid "/_Help" msgstr "/Aide" #: ../xgnokii/xgnokii_calendar.c:1518 ../xgnokii/xgnokii_contacts.c:3104 #: ../xgnokii/xgnokii_dtmf.c:225 ../xgnokii/xgnokii_netmon.c:264 #: ../xgnokii/xgnokii_sms.c:1254 ../xgnokii/xgnokii_sms.c:1648 #: ../xgnokii/xgnokii_speed.c:527 ../xgnokii/xgnokii_xkeyb.c:238 msgid "/Help/_About" msgstr "/Aide/A Propos" #: ../xgnokii/xgnokii_calendar.c:1535 msgid "#" msgstr "#" #: ../xgnokii/xgnokii_calendar.c:1537 msgid "Start date" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1538 msgid "End date" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1543 msgid "Recurrence" msgstr "Recurrence" #: ../xgnokii/xgnokii_calendar.c:1576 ../xgnokii/xgnokii_contacts.c:3157 #: ../xgnokii/xgnokii_speed.c:579 msgid "Read from phone" msgstr "Lire depuis téléphone" #: ../xgnokii/xgnokii_calendar.c:1580 ../xgnokii/xgnokii_contacts.c:3161 #: ../xgnokii/xgnokii_speed.c:583 msgid "Save to phone" msgstr "Enregistrer dans téléphone" #: ../xgnokii/xgnokii_calendar.c:1587 msgid "Send via SMS" msgstr "Envoyer via SMS" #: ../xgnokii/xgnokii_calendar.c:1594 ../xgnokii/xgnokii_contacts.c:2753 #: ../xgnokii/xgnokii_contacts.c:3168 ../xgnokii/xgnokii_logos.c:1572 #: ../xgnokii/xgnokii_speed.c:395 ../xgnokii/xgnokii_speed.c:590 #: ../xgnokii/xgnokii_xring.c:894 msgid "Import from file" msgstr "Importer depuis fichier" #: ../xgnokii/xgnokii_calendar.c:1598 ../xgnokii/xgnokii_contacts.c:2671 #: ../xgnokii/xgnokii_contacts.c:3172 ../xgnokii/xgnokii_logos.c:1576 #: ../xgnokii/xgnokii_speed.c:474 ../xgnokii/xgnokii_speed.c:594 #: ../xgnokii/xgnokii_xring.c:898 msgid "Export to file" msgstr "Exporter vers fichier" #: ../xgnokii/xgnokii_calendar.c:1614 msgid "Add call" msgstr "Ajouter un appel" #: ../xgnokii/xgnokii_calendar.c:1626 msgid "Delete note" msgstr "Supprimer la note" #: ../xgnokii/xgnokii_calendar.c:1691 ../xgnokii/xgnokii_contacts.c:2290 #: ../xgnokii/xgnokii_contacts.c:2316 ../xgnokii/xgnokii_contacts.c:2979 #: ../xgnokii/xgnokii_contacts.c:3225 ../xgnokii/xgnokii_sms.c:1799 #: ../xgnokii/xgnokii_speed.c:190 ../xgnokii/xgnokii_speed.c:196 #: ../xgnokii/xgnokii_speed.c:256 ../xgnokii/xgnokii_speed.c:340 #: ../xgnokii/xgnokii_speed.c:624 #, c-format msgid "Error: %s: line %d: Can't allocate memory!\n" msgstr "Erreur: (%s): ligne %d: Impossible d'allouer de la mémoire. \n" #: ../xgnokii/xgnokii_calendar.c:1720 ../xgnokii/xgnokii_sms.c:1833 msgid "couldn't allocate colour" msgstr "Impossible d'allouer une couleur." #: ../xgnokii/xgnokii_cfg.c:117 #, c-format msgid "WARNING: Can't allocate memory for config reading!\n" msgstr "" "WARNING: Impossible d'allouer de la mémoire pour lire la configuration.\n" #: ../xgnokii/xgnokii_cfg.c:211 #, c-format msgid "ERROR: Can't open file %s for writing!\n" msgstr "ERREUR: Impossible d'ouvrir le fichier %s en ecriture!\n" #: ../xgnokii/xgnokii_cfg.c:221 #, c-format msgid "ERROR: Can't allocate memory for config writing!\n" msgstr "" "ERREUR: Impossible d'allouer de la mémoire pour enregistrer la " "configuration.\n" #: ../xgnokii/xgnokii_cfg.c:226 #, c-format msgid "ERROR: Can't write config file!\n" msgstr "ERREUR: Impossible d'ecrire le fichier de configuration!\n" #: ../xgnokii/xgnokii_common.c:73 msgid "Error" msgstr "Erreur" #: ../xgnokii/xgnokii_common.c:110 msgid "Info" msgstr "Info" #: ../xgnokii/xgnokii_common.c:146 msgid "Yes" msgstr "Ja" #: ../xgnokii/xgnokii_common.c:155 msgid "No" msgstr "Non" #: ../xgnokii/xgnokii_common.c:236 #, c-format msgid "Can't exec %s\n" msgstr "Impossible d'executer %s\n" #: ../xgnokii/xgnokii_contacts.c:143 #, c-format msgid "SIM: %d/%d%c Phone: %d/%d%c" msgstr "SIM: %d/%d%c Telephone: %d/%d%c" #: ../xgnokii/xgnokii_contacts.c:317 ../xgnokii/xgnokii_contacts.c:337 msgid "Can't change memory type!" msgstr "Kann Speichertyp nicht ändern!" #: ../xgnokii/xgnokii_contacts.c:383 #, c-format msgid "" "Phonebook name will be truncated to\n" "%.*s" msgstr "" #: ../xgnokii/xgnokii_contacts.c:611 msgid "Can't find pattern!" msgstr "Motif non trouve!" #: ../xgnokii/xgnokii_contacts.c:707 ../xgnokii/xgnokii_contacts.c:794 #: ../xgnokii/xgnokii_contacts.c:939 ../xgnokii/xgnokii_contacts.c:981 #: ../xgnokii/xgnokii_contacts.c:1190 msgid "Mobile" msgstr "Mobile" #: ../xgnokii/xgnokii_contacts.c:737 ../xgnokii/xgnokii_contacts.c:809 #: ../xgnokii/xgnokii_contacts.c:944 ../xgnokii/xgnokii_contacts.c:986 #: ../xgnokii/xgnokii_contacts.c:1216 msgid "Postal" msgstr "" #: ../xgnokii/xgnokii_contacts.c:869 msgid "Edit subentries" msgstr "Modifier sous-entree" #: ../xgnokii/xgnokii_contacts.c:894 msgid "Delete" msgstr "Supprimer" #: ../xgnokii/xgnokii_contacts.c:913 msgid "Number/Text:" msgstr "Numero/Texte:" #: ../xgnokii/xgnokii_contacts.c:925 msgid "Type:" msgstr "Type:" #: ../xgnokii/xgnokii_contacts.c:960 ../xgnokii/xgnokii_contacts.c:1356 #: ../xgnokii/xgnokii_contacts.c:3187 ../xgnokii/xgnokii_speed.c:601 msgid "Edit entry" msgstr "Modifier parametre" #: ../xgnokii/xgnokii_contacts.c:1111 msgid "Numbers" msgstr "Numero" #: ../xgnokii/xgnokii_contacts.c:1131 msgid "New" msgstr "Nouveau" #: ../xgnokii/xgnokii_contacts.c:1315 msgid "Memory:" msgstr "Memoire:" #: ../xgnokii/xgnokii_contacts.c:1319 msgid "phone" msgstr "Telephone" #: ../xgnokii/xgnokii_contacts.c:1336 msgid "Caller group:" msgstr "Groupe appelant:" #: ../xgnokii/xgnokii_contacts.c:1399 msgid "Delete entries" msgstr "Supprimer valeur" #: ../xgnokii/xgnokii_contacts.c:1431 msgid "Do you want to delete selected entries?" msgstr "Voulez-vous supprimer les elements selectionnes ?" #: ../xgnokii/xgnokii_contacts.c:1449 ../xgnokii/xgnokii_contacts.c:3179 msgid "New entry" msgstr "Nouveau contact" #: ../xgnokii/xgnokii_contacts.c:1493 ../xgnokii/xgnokii_contacts.c:3183 msgid "Duplicate entry" msgstr "Contact en double" #: ../xgnokii/xgnokii_contacts.c:1562 ../xgnokii/xgnokii_contacts.c:1570 #: ../xgnokii/xgnokii_contacts.c:1598 msgid "Can't find free memory." msgstr "Impossible d'allouer de la memoire." #: ../xgnokii/xgnokii_contacts.c:1635 msgid "Changing memory type" msgstr "Changer type de memoire" #: ../xgnokii/xgnokii_contacts.c:1642 msgid "Continue" msgstr "Continuer" #: ../xgnokii/xgnokii_contacts.c:1664 msgid "" "If you change from phone memory to SIM memory\n" "some entries may be truncated." msgstr "" "Si vous transferez de la memoire telephonevers la carte SIM, certaines " "entrees peuvent etretronquees." #: ../xgnokii/xgnokii_contacts.c:1682 ../xgnokii/xgnokii_contacts.c:1688 msgid "Find" msgstr "Rechercher" #: ../xgnokii/xgnokii_contacts.c:1714 msgid "Pattern:" msgstr "Motif:" #: ../xgnokii/xgnokii_contacts.c:1800 msgid "Dial pad" msgstr "" #: ../xgnokii/xgnokii_contacts.c:1806 msgid "Dial" msgstr "Composer" #: ../xgnokii/xgnokii_contacts.c:2059 msgid "Phone memory..." msgstr "Memoire telephone..." #: ../xgnokii/xgnokii_contacts.c:2070 msgid "SIM memory..." msgstr "Memoire carte SIM..." #: ../xgnokii/xgnokii_contacts.c:2135 msgid "Saving entries" msgstr "Enregistrement des contacts" #: ../xgnokii/xgnokii_contacts.c:2150 ../xgnokii/xgnokii_contacts.c:2170 #, c-format msgid "%s: line %d: Can't write %s memory entry number %d! Error: %s\n" msgstr "" "%s : ligne %d : impossible d'écrire le numéro %d dans la mémoire %s ! " "Erreur : %s\n" #: ../xgnokii/xgnokii_contacts.c:2192 msgid "Save changes?" msgstr "Enregistrer les changements ?" #: ../xgnokii/xgnokii_contacts.c:2206 msgid "Don't save" msgstr "Ne pas enregistrer" #: ../xgnokii/xgnokii_contacts.c:2228 msgid "" "You have made changes in your\n" "contacts directory.\n" "\n" "\n" "Do you want to save these changes into your phone?\n" msgstr "" "Vous avez modifié des contacts dans votre répertoire de contacts.\n" "\n" "Souhaitez vous enregistrer les changements dans votre téléphone ?\n" #: ../xgnokii/xgnokii_contacts.c:2420 msgid "Getting entries" msgstr "Chargement des contacts" #: ../xgnokii/xgnokii_contacts.c:2654 ../xgnokii/xgnokii_dtmf.c:166 #: ../xgnokii/xgnokii_logos.c:1350 ../xgnokii/xgnokii_speed.c:457 msgid "Overwrite file?" msgstr "Ecraser fichier ?" #: ../xgnokii/xgnokii_contacts.c:2655 ../xgnokii/xgnokii_dtmf.c:167 #: ../xgnokii/xgnokii_logos.c:1351 ../xgnokii/xgnokii_speed.c:458 #, c-format msgid "" "File %s already exists.\n" "Overwrite?" msgstr "" "Le fichier %s existe deja.\n" "Ecraser ?" #: ../xgnokii/xgnokii_contacts.c:2936 ../xgnokii/xgnokii_contacts.c:3120 msgid "Memory" msgstr "Memoire" #: ../xgnokii/xgnokii_contacts.c:2946 ../xgnokii/xgnokii_sms.c:1358 msgid "Select contacts" msgstr "Choisir contacts" #: ../xgnokii/xgnokii_contacts.c:3090 msgid "/Edit/_New" msgstr "/Modifier/_Nouveau" #: ../xgnokii/xgnokii_contacts.c:3091 msgid "/Edit/D_uplicate" msgstr "/Modifier/Dupliquer" #: ../xgnokii/xgnokii_contacts.c:3092 ../xgnokii/xgnokii_speed.c:525 msgid "/Edit/_Edit" msgstr "/Modifier/Modifier" #: ../xgnokii/xgnokii_contacts.c:3094 ../xgnokii/xgnokii_logos.c:1487 msgid "/Edit/Sep3" msgstr "/Modifier/Sep3" #: ../xgnokii/xgnokii_contacts.c:3095 msgid "/Edit/_Change memory type" msgstr "/Modifier/Choisir un autre type de memoire" #: ../xgnokii/xgnokii_contacts.c:3097 msgid "/Edit/_Find" msgstr "/Modifier/Rechercher" #: ../xgnokii/xgnokii_contacts.c:3098 msgid "/Edit/Find ne_xt" msgstr "/Modifier/Rechercher suivant" #: ../xgnokii/xgnokii_contacts.c:3099 msgid "/Edit/Sep5" msgstr "/Modifier/Sep5" #: ../xgnokii/xgnokii_contacts.c:3101 msgid "/_Dial" msgstr "/_Composer" #: ../xgnokii/xgnokii_contacts.c:3102 msgid "/Dial/Dial _voice" msgstr "/Composer/Composer a la voix" #: ../xgnokii/xgnokii_contacts.c:3191 msgid "Delete entry" msgstr "Supprimer contact" #: ../xgnokii/xgnokii_contacts.c:3198 msgid "Dial voice" msgstr "Voix" #: ../xgnokii/xgnokii_data.c:52 #, c-format msgid "" "Data calls are currently\n" "Disabled\n" " " msgstr "Les appels donnees sont actuellement desactives." #: ../xgnokii/xgnokii_data.c:54 #, c-format msgid "" "Data calls are currently\n" "Enabled\n" " " msgstr "Les appels donnees sont actuellement actives." #: ../xgnokii/xgnokii_data.c:102 msgid "Virtual Modem" msgstr "Modem Virtuel" #: ../xgnokii/xgnokii.desktop.in.h:1 msgid "Manage your mobile phone" msgstr "" #: ../xgnokii/xgnokii.desktop.in.h:2 msgid "Mobile Phone Suite" msgstr "Numéros composés" #: ../xgnokii/xgnokii.desktop.in.h:3 msgid "Xgnokii" msgstr "" #: ../xgnokii/xgnokii_dtmf.c:100 ../xgnokii/xgnokii_speed.c:351 #: ../xgnokii/xgnokii_speed.c:376 #, c-format msgid "Error reading file!" msgstr "Erreur a la lecture du fichier" #: ../xgnokii/xgnokii_dtmf.c:116 msgid "Load" msgstr "Charger" #: ../xgnokii/xgnokii_dtmf.c:220 ../xgnokii/xgnokii_logos.c:1475 #: ../xgnokii/xgnokii_xring.c:827 msgid "/File/_Open" msgstr "/Fichier/Ouvrir" #: ../xgnokii/xgnokii_dtmf.c:221 ../xgnokii/xgnokii_logos.c:1476 #: ../xgnokii/xgnokii_sms.c:1247 ../xgnokii/xgnokii_sms.c:1634 #: ../xgnokii/xgnokii_xring.c:828 msgid "/File/_Save" msgstr "/Fichier/Enregistrer" #: ../xgnokii/xgnokii_dtmf.c:247 msgid "Dial Tone" msgstr "Frequences vocales (DTMF)" #: ../xgnokii/xgnokii_dtmf.c:312 msgid "Pause" msgstr "Pause" #: ../xgnokii/xgnokii_dtmf.c:317 msgid "Wait" msgstr "Attente" #: ../xgnokii/xgnokii_logos.c:972 #, c-format msgid "" "Error getting network info\n" "%s" msgstr "" "Lecture des informations reseau: echec\n" "%s." #: ../xgnokii/xgnokii_logos.c:1018 #, c-format msgid "" "Error getting bitmap\n" "%s" msgstr "" "Lecture de l'image bitmap: echec\n" "%s." #: ../xgnokii/xgnokii_logos.c:1068 #, c-format msgid "" "Error setting bitmap\n" "%s" msgstr "" "Envoi de l'image bitmap: echec\n" "%s." #: ../xgnokii/xgnokii_logos.c:1323 ../xgnokii/xgnokii_xring.c:650 #: ../xgnokii/xgnokii_xring.c:693 #, c-format msgid "" "Error writing file\n" "%s" msgstr "" "Lecture du fichier: echec\n" "%s" #: ../xgnokii/xgnokii_logos.c:1382 ../xgnokii/xgnokii_xring.c:613 #, c-format msgid "" "Error reading file\n" "%s" msgstr "" "Erreur a la lecture du fichier\n" "%s" #: ../xgnokii/xgnokii_logos.c:1409 msgid "Save logo as ..." msgstr "Enregistrer logo sous ..." #: ../xgnokii/xgnokii_logos.c:1434 msgid "Open logo..." msgstr "Ouvrir logo ..." #: ../xgnokii/xgnokii_logos.c:1477 ../xgnokii/xgnokii_xring.c:829 msgid "/File/Save _as ..." msgstr "/Fichier/Enregistrer sous ..." #: ../xgnokii/xgnokii_logos.c:1479 msgid "/File/_Get operator" msgstr "/Fichier/Charger operateur" #: ../xgnokii/xgnokii_logos.c:1480 msgid "/File/Get _logo" msgstr "/Fichier/Charger logo" #: ../xgnokii/xgnokii_logos.c:1481 msgid "/File/Se_t logo" msgstr "/Fichier/Activer logo" #: ../xgnokii/xgnokii_logos.c:1485 ../xgnokii/xgnokii_xring.c:838 msgid "/Edit/_Clear" msgstr "/Modifier/Effacer" #: ../xgnokii/xgnokii_logos.c:1486 msgid "/Edit/_Invert" msgstr "/Modifier/Inverser" #: ../xgnokii/xgnokii_logos.c:1488 msgid "/Edit/_Up logo" msgstr "/Modifier/Deplacer logo vers le haut" #: ../xgnokii/xgnokii_logos.c:1489 msgid "/Edit/_Down logo" msgstr "/Modifier/Deplacer logo vers le bas" #: ../xgnokii/xgnokii_logos.c:1490 msgid "/Edit/_Left logo" msgstr "/Modifier/Deplacer logo vers la gauche" #: ../xgnokii/xgnokii_logos.c:1491 msgid "/Edit/_Right logo" msgstr "/Modifier/Deplacer logo vers la droite" #: ../xgnokii/xgnokii_logos.c:1493 msgid "/Edit/Flip _horizontal" msgstr "/Modifier/Faire pivoter horizontalement" #: ../xgnokii/xgnokii_logos.c:1494 msgid "/Edit/Flip _vertical" msgstr "/Modifier/Faire pivoter verticalement" #: ../xgnokii/xgnokii_logos.c:1553 msgid "Clear logo" msgstr "Effacer logo" #: ../xgnokii/xgnokii_logos.c:1560 msgid "Get logo" msgstr "Charger logo" #: ../xgnokii/xgnokii_logos.c:1565 msgid "Set logo" msgstr "Activer logo" #: ../xgnokii/xgnokii_logos.c:1585 msgid "Startup logo" msgstr "Logo de demarrage" #: ../xgnokii/xgnokii_logos.c:1594 msgid "Operator logo" msgstr "Logo Operateur" #: ../xgnokii/xgnokii_logos.c:1604 msgid "Caller logo" msgstr "Logo interlocuteur:" #: ../xgnokii/xgnokii_logos.c:1731 msgid "Brush tool" msgstr "Outil pinceau" #: ../xgnokii/xgnokii_logos.c:1742 msgid "Line tool" msgstr "Outil ligne" #: ../xgnokii/xgnokii_logos.c:1752 msgid "Rectangle tool" msgstr "Outil rectangle" #: ../xgnokii/xgnokii_logos.c:1762 msgid "Filled rectangle tool" msgstr "Outil rectangle plein" #: ../xgnokii/xgnokii_logos.c:1771 msgid "Invert logo" msgstr "Inverser logo" #: ../xgnokii/xgnokii_logos.c:1776 msgid "Horizontal flip" msgstr "Faire pivoter horizontalement" #: ../xgnokii/xgnokii_logos.c:1781 msgid "Vertical flip" msgstr "Faire pivoter verticalement" #: ../xgnokii/xgnokii_logos.c:1836 msgid "Load preview pixmap error, feature disabled." msgstr "Chargement de l'apercu image pixmap: echec, fonction desactivee." #: ../xgnokii/xgnokii_lowlevel.c:210 #, c-format msgid "Failed to open the phone. Quitting.\n" msgstr "Impossible de charger la liste des sonneries. Sortie.\n" #. We have some misconfiguration: phone doesn't handle #. neither folders nor SIM #: ../xgnokii/xgnokii_lowlevel.c:403 #, c-format msgid "" "Misconfiguration detected: phone handles neither folders nor sim.\n" "Contact gnokii developers to fix the issue.\n" msgstr "" "Erreur de configuration detectee: ce telephone ne gere ni les repertoires ni " "les SIM.\n" "Merci de contacter les develoopeurs de gnokii pour regler ce probleme.\n" #: ../xgnokii/xgnokii_lowlevel.c:481 #, c-format msgid "%s: line %d: Can't get memory entry number %d from memory %d! %d\n" msgstr "" "%s: line %d: Chargement de l'entree numero %d depuis la memoire %d: echec " "(erreur=%d).\n" #: ../xgnokii/xgnokii_lowlevel.c:1249 msgid "Connecting..." msgstr "Connection en cours ..." #: ../xgnokii/xgnokii_lowlevel.c:1260 msgid "" "It has been reported that your phone is known to be broken by xgnokii.\n" "Exiting application to avoid breakage. If you want to take a risk and\n" "run xgnokii anyway, set:\n" "\n" "\tallow_breakage = 1\n" "\n" "in xgnokii section in your config file.\n" "See http://thread.gmane.org/gmane.linux.drivers.gnokii/3195 for details.\n" msgstr "" #: ../xgnokii/xgnokii_lowlevel.c:1397 msgid "Refreshing SMSes..." msgstr "Raffraichissement des SMSs ..." #: ../xgnokii/xgnokii_netmon.c:260 msgid "/_Tools" msgstr "/Outils" #: ../xgnokii/xgnokii_netmon.c:261 msgid "/Tools/Net monitor o_n" msgstr "/Outils/Activer Surveillance reseau" #: ../xgnokii/xgnokii_netmon.c:262 msgid "/Tools/Net monitor o_ff" msgstr "/Outils/Desctiver Surveillance reseau" #: ../xgnokii/xgnokii_netmon.c:354 ../xgnokii/xgnokii_netmon.c:357 msgid "Active cell" msgstr "Cellule active" #: ../xgnokii/xgnokii_netmon.c:360 msgid "NCELL list I" msgstr "Liste NCELL I" #: ../xgnokii/xgnokii_netmon.c:363 msgid "NCELL list II" msgstr "Liste NCELL II" #: ../xgnokii/xgnokii_netmon.c:366 msgid "NCELL list III" msgstr "Liste NCELL III" #: ../xgnokii/xgnokii_netmon.c:369 msgid "Preferred/Denied networks" msgstr "Reseaux Preferes / Banis" #: ../xgnokii/xgnokii_netmon.c:372 msgid "System information bits" msgstr "Bits d'information systeme" #: ../xgnokii/xgnokii_netmon.c:375 msgid "TMSI, Paging, PLU" msgstr "" #: ../xgnokii/xgnokii_netmon.c:378 msgid "Cells info" msgstr "Information cellules" #: ../xgnokii/xgnokii_netmon.c:381 msgid "DTX, Cipher, Hopping" msgstr "" #: ../xgnokii/xgnokii_netmon.c:392 msgid "Uplink DTX" msgstr "Uplink DTX" #: ../xgnokii/xgnokii_netmon.c:395 msgid "BTS TEST" msgstr "BTS TEST" #: ../xgnokii/xgnokii_netmon.c:398 msgid "CELL BARR-Flag" msgstr "" #: ../xgnokii/xgnokii_netmon.c:401 msgid "Accumulator, Charge status" msgstr "Accumulateur, indicateur de charge" #: ../xgnokii/xgnokii_netmon.c:404 msgid "?Constant voltage charging display" msgstr "?Affichage de charge a tension constante" #: ../xgnokii/xgnokii_netmon.c:407 msgid "?Battery full detection" msgstr "?Detection de batterie pleine" #: ../xgnokii/xgnokii_netmon.c:410 msgid "Accumulator" msgstr "Batterie" #: ../xgnokii/xgnokii_netmon.c:413 msgid "SW-Resets" msgstr "Remise a zero" #: ../xgnokii/xgnokii_netmon.c:416 msgid "Reset-Counter" msgstr "Remise a zero du compteur" #: ../xgnokii/xgnokii_netmon.c:420 msgid "Cause codes for last connection abortion" msgstr "Codes de retour pour derniere deconnection." #: ../xgnokii/xgnokii_netmon.c:431 msgid "Reset handover counters" msgstr "" #: ../xgnokii/xgnokii_netmon.c:434 msgid "Handover Counter" msgstr "" #: ../xgnokii/xgnokii_netmon.c:437 msgid "Handover Counter (Dual)" msgstr "" #: ../xgnokii/xgnokii_netmon.c:440 msgid "L2-Timeouts" msgstr "" #: ../xgnokii/xgnokii_netmon.c:443 msgid "SIM" msgstr "SIM" #: ../xgnokii/xgnokii_netmon.c:446 msgid "?Block display 1" msgstr "" #: ../xgnokii/xgnokii_netmon.c:452 msgid "Memory status before reset" msgstr "Etat de la memoire avant remise a zero" #: ../xgnokii/xgnokii_netmon.c:455 msgid "Reset Counters" msgstr "Remise a zero des compteurs" #: ../xgnokii/xgnokii_netmon.c:459 msgid "Counter for PLMN Search and Cell reselection (Singleband)" msgstr "" #: ../xgnokii/xgnokii_netmon.c:470 msgid "Neighbourhood measurement" msgstr "Mesure du voisinage" #: ../xgnokii/xgnokii_netmon.c:473 msgid "Calls" msgstr "Appels" #: ../xgnokii/xgnokii_netmon.c:476 msgid "Temporary counters of DSP" msgstr "Compteurs temporaires de DSP" #: ../xgnokii/xgnokii_netmon.c:480 msgid "Control of task information displays" msgstr "Controle des taches d'affichage" #: ../xgnokii/xgnokii_netmon.c:483 msgid "Information about task numbers 0-7" msgstr "Information a propos des taches numero 0 a 7" #: ../xgnokii/xgnokii_netmon.c:487 msgid "Information about task numbers 8-15" msgstr "Information a propos des taches numero 8 a 15" #: ../xgnokii/xgnokii_netmon.c:491 msgid "Information about task numbers 16-23" msgstr "Information a propos des taches numero 16 a 23" #: ../xgnokii/xgnokii_netmon.c:494 msgid "Information about OS_SYSTEM_STACK" msgstr "Information a propos de OS_SYSTEM_STACK" #: ../xgnokii/xgnokii_netmon.c:498 msgid "Information about current MCU and DSP software versions" msgstr "Information a propos des versions courantes de MCU et DSP" #: ../xgnokii/xgnokii_netmon.c:501 msgid "Hardware version" msgstr "Version du materiel" #: ../xgnokii/xgnokii_netmon.c:520 msgid "Chan" msgstr "Cannal" #: ../xgnokii/xgnokii_netmon.c:521 msgid "RxLv" msgstr "RxLv" #: ../xgnokii/xgnokii_netmon.c:522 msgid "C1" msgstr "C1" #: ../xgnokii/xgnokii_netmon.c:523 msgid "C2" msgstr "C2" #: ../xgnokii/xgnokii_netmon.c:524 msgid "ACT" msgstr "ACT" #: ../xgnokii/xgnokii_netmon.c:525 msgid "NC2" msgstr "NC2" #: ../xgnokii/xgnokii_netmon.c:526 msgid "NC3" msgstr "NC3" #: ../xgnokii/xgnokii_netmon.c:527 msgid "NC4" msgstr "NC4" #: ../xgnokii/xgnokii_netmon.c:528 msgid "NC5" msgstr "NC5" #: ../xgnokii/xgnokii_netmon.c:529 msgid "NC6" msgstr "NC6" #: ../xgnokii/xgnokii_netmon.c:530 msgid "NC7" msgstr "NC7" #: ../xgnokii/xgnokii_netmon.c:560 msgid "Page:" msgstr "Page:" #: ../xgnokii/xgnokii_sms.c:250 ../xgnokii/xgnokii_sms.c:330 #: ../xgnokii/xgnokii_sms.c:444 msgid "read" msgstr "lu" #: ../xgnokii/xgnokii_sms.c:253 ../xgnokii/xgnokii_sms.c:333 #: ../xgnokii/xgnokii_sms.c:430 msgid "unread" msgstr "non lu" #: ../xgnokii/xgnokii_sms.c:256 ../xgnokii/xgnokii_sms.c:336 msgid "sent" msgstr "envoye" #: ../xgnokii/xgnokii_sms.c:259 ../xgnokii/xgnokii_sms.c:339 msgid "not sent" msgstr "non envoye" #: ../xgnokii/xgnokii_sms.c:302 msgid "read report" msgstr "lire rapport" #: ../xgnokii/xgnokii_sms.c:305 msgid "unread report" msgstr "rapport non lu" #: ../xgnokii/xgnokii_sms.c:312 msgid "seen picture" msgstr "image vue" #: ../xgnokii/xgnokii_sms.c:315 msgid "unseen picture" msgstr "image non vue" #: ../xgnokii/xgnokii_sms.c:318 msgid "sent picture" msgstr "image envoyee" #: ../xgnokii/xgnokii_sms.c:321 msgid "not sent picture" msgstr "image non envoyee" #: ../xgnokii/xgnokii_sms.c:324 msgid "unknown picture" msgstr "image inconnue" #: ../xgnokii/xgnokii_sms.c:349 #, c-format msgid "%02d/%02d/%04d %02d:%02d:%02d %c%02d00" msgstr "%02d/%02d/%04d %02d:%02d:%02d %c%02d00" #: ../xgnokii/xgnokii_sms.c:355 ../xgnokii/xgnokii_sms.c:360 #, c-format msgid "%02d/%02d/%04d %02d:%02d:%02d" msgstr "%02d/%02d/%04d %02d:%02d:%02d" #: ../xgnokii/xgnokii_sms.c:368 #, c-format msgid "Picture Message: %s" msgstr "Message Image: %s" #: ../xgnokii/xgnokii_sms.c:461 msgid "From: " msgstr "Expediteur: " #: ../xgnokii/xgnokii_sms.c:466 msgid "Date: " msgstr "Date: " #: ../xgnokii/xgnokii_sms.c:563 msgid "Delete SMS" msgstr "Supprimer SMS" #: ../xgnokii/xgnokii_sms.c:595 msgid "Do you want to delete selected SMS?" msgstr "Souhaitez-vous supprimer les SMS selectionnes?" #: ../xgnokii/xgnokii_sms.c:617 #, c-format msgid "Cannot open mailbox %s for appending!" msgstr "Ouverture de la boite mail %s pour ajout: echec." #: ../xgnokii/xgnokii_sms.c:631 #, c-format msgid "" "Cannot save to mailbox %s.\n" "\\%s is locked for process %d!" msgstr "" "Enregistrement dans la boite mail %s: echec.\\%s est verouillee par le " "processus %d." #: ../xgnokii/xgnokii_sms.c:644 #, c-format msgid "Cannot lock mailbox %s!" msgstr "Verouillage de la boite mail %s: echec." #: ../xgnokii/xgnokii_sms.c:699 #, c-format msgid "Cannot unlock mailbox %s!" msgstr "De-verouillage de la boite mail %s: echec." #: ../xgnokii/xgnokii_sms.c:747 msgid "Choose Mailbox File" msgstr "Choisir la boite mail" #: ../xgnokii/xgnokii_sms.c:857 #, c-format msgid "" "Name: %s\n" "Number: %s\n" "Used: %d\n" msgstr "" "Nom: %s\n" "Numero: %s\n" "Utilise: %d\n" #: ../xgnokii/xgnokii_sms.c:956 ../xgnokii/xgnokii_sms.c:1089 msgid "Address line contains illegal address!" msgstr "La ligne d'adresse contient des caracteres illegaux." #: ../xgnokii/xgnokii_sms.c:1060 #, c-format msgid "" "Error sending SMS to %s\n" "%s" msgstr "" "Envoi du SMS vers %s\n" "%s" #: ../xgnokii/xgnokii_sms.c:1066 #, c-format msgid "Message sent to: %s\n" msgstr "Message envoye a: %s\n" #: ../xgnokii/xgnokii_sms.c:1153 ../xgnokii/xgnokii_sms.c:1185 #: ../xgnokii/xgnokii_sms.c:1211 #, c-format msgid "Sending SMS to %s (%d/%d) ...\n" msgstr "Envoi du SMS vers %s (%d/%d) ...\n" #: ../xgnokii/xgnokii_sms.c:1246 msgid "/File/Sen_d" msgstr "/Fichier/Envoyer" #: ../xgnokii/xgnokii_sms.c:1249 msgid "/File/Check _Names" msgstr "/Fichier/Verifier Noms" #: ../xgnokii/xgnokii_sms.c:1250 msgid "/File/C_ontacts" msgstr "/Fichier/Contacts" #: ../xgnokii/xgnokii_sms.c:1310 msgid "Send message" msgstr "Envoyer message" #: ../xgnokii/xgnokii_sms.c:1314 msgid "Save message to outbox" msgstr "Enregistrer message dans boite d'envoi" #: ../xgnokii/xgnokii_sms.c:1321 msgid "Check names" msgstr "Verifier noms" #: ../xgnokii/xgnokii_sms.c:1334 msgid "To:" msgstr "A:" #: ../xgnokii/xgnokii_sms.c:1402 msgid "Delivery report" msgstr "Rapport d'envoi" #: ../xgnokii/xgnokii_sms.c:1406 msgid "Send as Long SMS" msgstr "Envoyer comme un long SMS" #: ../xgnokii/xgnokii_sms.c:1410 msgid "SMS Center:" msgstr "Centre SMS:" #: ../xgnokii/xgnokii_sms.c:1431 msgid "New Message" msgstr "Nouveau Message" #: ../xgnokii/xgnokii_sms.c:1457 msgid "Forward Message" msgstr "Transferer Message" #: ../xgnokii/xgnokii_sms.c:1498 msgid "Reply Message" msgstr "Repondre au message" #: ../xgnokii/xgnokii_sms.c:1635 msgid "/File/Save to mailbo_x" msgstr "/Fichier/Enregistrer dans boite mail" #: ../xgnokii/xgnokii_sms.c:1636 msgid "/File/Save to _file" msgstr "/File/Enregistrer dans _fichier" #: ../xgnokii/xgnokii_sms.c:1639 msgid "/_Messages" msgstr "/_Messages" #: ../xgnokii/xgnokii_sms.c:1640 msgid "/_Messages/_Activate SMS reading" msgstr "/_Messages/_Activer la lecture des SMS" #: ../xgnokii/xgnokii_sms.c:1641 msgid "/_Messages/_New" msgstr "/_Messages/_Nouveau" #: ../xgnokii/xgnokii_sms.c:1642 msgid "/_Messages/_Forward" msgstr "/_Messages/_Transferer" #: ../xgnokii/xgnokii_sms.c:1643 msgid "/_Messages/_Reply" msgstr "/_Messages/_Repondre" #: ../xgnokii/xgnokii_sms.c:1644 msgid "/_Messages/_Delete" msgstr "/Messages/Supprimer" #: ../xgnokii/xgnokii_sms.c:1645 msgid "/Messages/Sep3" msgstr "/Messages/Sep3" #: ../xgnokii/xgnokii_sms.c:1646 msgid "/_Messages/_Business card" msgstr "/_Messages/_Carte de visite" #: ../xgnokii/xgnokii_sms.c:1666 msgid "Status" msgstr "Etat" #: ../xgnokii/xgnokii_sms.c:1666 msgid "Date / Time" msgstr "Date / Heure" #: ../xgnokii/xgnokii_sms.c:1666 msgid "Sender" msgstr "Expediteur" #: ../xgnokii/xgnokii_sms.c:1666 msgid "Message" msgstr "Message" #: ../xgnokii/xgnokii_sms.c:1703 msgid "New message" msgstr "Nouveau message" #: ../xgnokii/xgnokii_sms.c:1707 msgid "Forward message" msgstr "Transferer message" #: ../xgnokii/xgnokii_sms.c:1711 msgid "Reply message" msgstr "Repondre au message" #: ../xgnokii/xgnokii_sms.c:1723 msgid "Delete message" msgstr "Detruire message" #: ../xgnokii/xgnokii_sms.c:1748 msgid "SMS's" msgstr "SMS's" #: ../xgnokii/xgnokii_speed.c:181 msgid "Reading data ..." msgstr "Lecture des donnees ..." #: ../xgnokii/xgnokii_speed.c:207 #, c-format msgid "Cannot read speed dial key %d!\n" msgstr "Lecture du raccourci %d impossible\n" #: ../xgnokii/xgnokii_speed.c:268 #, c-format msgid "Error writing speed dial for key %d!\n" msgstr "Erreur a l'ecriture de la clef speed dial %d.\n" #: ../xgnokii/xgnokii_speed.c:542 msgid "Key" msgstr "Clef" #: ../xgnokii/xgnokii_xkeyb.c:180 msgid "Cannot load background pixmap!" msgstr "Impossible de charger l'image de fond" #: ../xgnokii/xgnokii_xkeyb.c:253 msgid "XGnokii Keyboard" msgstr "Clavier XGnokii" #: ../xgnokii/xgnokii_xring.c:404 #, c-format msgid "User #%d (%s)" msgstr "Utilisateur #%d (%s)" #: ../xgnokii/xgnokii_xring.c:423 #, c-format msgid "User #%d (*EMPTY*)" msgstr "Utilisateur #%d (*EMPTY*)" #: ../xgnokii/xgnokii_xring.c:628 msgid "Open ringtone..." msgstr "Ouvrir sonnerie ..." #: ../xgnokii/xgnokii_xring.c:670 msgid "Save ringtone as..." msgstr "Enregistrer sonnerie sous ..." #: ../xgnokii/xgnokii_xring.c:736 #, c-format msgid "Empty ringtone list" msgstr "Liste de sonnerie vide" #: ../xgnokii/xgnokii_xring.c:746 #, c-format msgid "" "Error getting ringtone\n" "%s" msgstr "" "Erreur a la lecture d'une sonnerie\n" "%s" #: ../xgnokii/xgnokii_xring.c:763 #, c-format msgid "" "Error setting ringtone\n" "%s" msgstr "" "Erreur a l'enregistrement d'une sonnerie\n" "%s" #: ../xgnokii/xgnokii_xring.c:782 #, c-format msgid "" "Error deleting ringtone\n" "%s" msgstr "" "Erreur a la destruction de la sonnerie: echec\n" "(erreur=%s)." #: ../xgnokii/xgnokii_xring.c:830 msgid "/File/S1" msgstr "/Fichier/S1" #: ../xgnokii/xgnokii_xring.c:831 msgid "/File/_Get ringtone" msgstr "/Fichier/Charger sonnerie" #: ../xgnokii/xgnokii_xring.c:832 msgid "/File/Se_t ringtone" msgstr "/Fichier/Regler sonnerie" #: ../xgnokii/xgnokii_xring.c:833 msgid "/File/Delete ringtone" msgstr "Fichier/Detruire sonnerie" #: ../xgnokii/xgnokii_xring.c:834 msgid "/File/_Play" msgstr "/Fichier/Jouer" #: ../xgnokii/xgnokii_xring.c:835 msgid "/File/S2" msgstr "/Fichier/S2" #: ../xgnokii/xgnokii_xring.c:874 msgid "Clear ringtone" msgstr "Supprimer sonnerie" #: ../xgnokii/xgnokii_xring.c:880 msgid "Get ringtone" msgstr "Charger Sonnerie" #: ../xgnokii/xgnokii_xring.c:884 msgid "Set ringtone" msgstr "Regler Sonnerie" #: ../xgnokii/xgnokii_xring.c:888 msgid "Delete ringtone" msgstr "Supprimer la sonnerie" #: ../xgnokii/xgnokii_xring.c:904 msgid "Play" msgstr "Jouer" #: ../xgnokii/xgnokii_xring.c:913 msgid "Select ringtone" msgstr "Choisir cette sonnerie" #: ../xgnokii/xgnokii_xring.c:918 msgid "Ringtone name" msgstr "Nom de la sonnerie" #: ../xgnokii/xgnokii_xring.c:930 msgid "Set tempo" msgstr "Regler le rythme" #~ msgid "ERROR: Can't find HOME environment variable!\n" #~ msgstr "ERREUR: Variable d'environnement HOME non definie!\n" #~ msgid "+%02d00" #~ msgstr "+%02d00" #~ msgid "%02d00" #~ msgstr "%02d00" #~ msgid "Response date/time: %02d/%02d/%04d %02d:%02d:%02d " #~ msgstr "Reponse date/heure: %02d.%02d.%04d %02d:%02d:%02d " #~ msgid "WARNING: Can't find HOME environment variable!\n" #~ msgstr "" #~ "Avertissement : impossible de trouver la variable d'environnement HOME !\n" #~ "%s: line: %d: Impossible d'enregistrer le contact numero %d en memoire " #~ "ME: Erreur %d.\n" #~ msgid "Progress: %3d%% completed\r" #~ msgstr "Progression : %3d%% effectués\r" #, fuzzy #~ msgid "GetMMS %s %d failed! (%s)\n" #~ msgstr "GetSMS %s %d: echec (erreur=%s).\n" #, fuzzy #~ msgid "Deleted MMS %s %d\n" #~ msgstr "SMS %s %d detruit.\n" #, fuzzy #~ msgid "" #~ "DeleteMMS %s %d failed!(%s)\n" #~ "\n" #~ msgstr "" #~ "DeleteSMS (%s, %d): echec (erreur=%s).\n" #~ "\n" #~ msgid "Deleted SMS %s %d\n" #~ msgstr "SMS %s %d detruit.\n" #, fuzzy #~ msgid "" #~ "Deleting SMS %s %d failed!(%s)\n" #~ "\n" #~ msgstr "" #~ "DeleteSMS (%s, %d): echec (erreur=%s).\n" #~ "\n" #~ msgid "Couldn't read config.\n" #~ msgstr "Impossible de lire la configuration.\n" #~ msgid "Write error!\n" #~ msgstr "Erreur d'écriture !\n" #~ msgid "Read ack error!\n" #~ msgstr "Erreur de validation de lecture (ack) !\n" #~ msgid "Write FAILED (%s): memory type: %s, loc: %d, name: %s, number: %s\n" #~ msgstr "" #~ "Ecriture(%s): Type de memoire: %s, Lieu: %d, Nom: %s, Numero: %s. echec.\n" #~ msgid "" #~ "See the gnokii manual page for the supported memory types with the phone\n" #~ "you use.\n" #~ msgstr "" #~ "Consultez le manuel de gnokii pour connaitre les types de memoire\n" #~ " supportes par votre telephone.\n" #~ msgid "Starting SMS center number is greater than stop\n" #~ msgstr "Le numero du centre SMS est plus grand que la valeur maximale.\n" #~ msgid "%s\n" #~ msgstr "%s\n" #~ msgid "Help" #~ msgstr "Aide" #~ msgid "Help viewer" #~ msgstr "Voir l'aide" #~ msgid "Viewer:" #~ msgstr "Navigateur:" #~ msgid "/Help/_Help" #~ msgstr "/Aide/Aide" #~ msgid "Orphaned line: %s\n" #~ msgstr "Ligne orpheline: %s\n" #~ msgid "Cannot lock NULL device.\n" #~ msgstr "Impossible de verouiller le peripherique NULL\n" #~ msgid "Please enter SMS text. End your input with :" #~ msgstr "Merci d'entrer le texte du SMS. Terminez par :" #, fuzzy #~ msgid "Business number" #~ msgstr "Numero de telephone bureau: " #, fuzzy #~ msgid "Birthday date" #~ msgstr "Anniversaire" #~ msgid " Repeat: every day\n" #~ msgstr " Repeter: tous les jours\n" #~ msgid " Repeat: every week\n" #~ msgstr " Repeter: toutes les semaines\n" #~ msgid " Repeat: every 2 weeks\n" #~ msgstr " Repetition: toutes les 2 semaines\n" #~ msgid " Repeat: every month\n" #~ msgstr " Repeter: tous les mois\n" #~ msgid " Repeat: every year\n" #~ msgstr " Repeter: tous les ans\n" #~ msgid " Repeat: %d hours\n" #~ msgstr " Repeter: %d heures\n" #~ msgid " Phone: %s\n" #~ msgstr " Telephone: %s\n" #~ msgid " Location: %s\n" #~ msgstr " Emplacement: %s\n" #~ msgid "all\n" #~ msgstr "tout\n" #~ msgid "noans\n" #~ msgstr "Pas de reponse\n" #~ msgid "unknown(0x%02x)\n" #~ msgstr "Inconnu: 0x%02x\n" #~ msgid "voice\n" #~ msgstr "Voix\n" #~ msgid "fax\n" #~ msgstr "fax\n" #~ msgid "data\n" #~ msgstr "donnees\n" #, fuzzy #~ msgid "Network: %s, %s (%s), LAC: %02x%02x, CellID: %02x%02x\n" #~ msgstr "Reseau: %s (%s), LAC: %02x%02x, CellID: %02x%02x\n" #, fuzzy #~ msgid "Group: " #~ msgstr "Groupe" #, fuzzy #~ msgid " Street: %s\n" #~ msgstr " Texte: %s\n" #, fuzzy #~ msgid " City: %s\n" #~ msgstr " Texte: %s\n" #, fuzzy #~ msgid " State or province: %s\n" #~ msgstr "Enregistrer dans téléphone" #, fuzzy #~ msgid " Zipcode: %s\n" #~ msgstr " Telephone: %s\n" #, fuzzy #~ msgid " Country: %s\n" #~ msgstr "Remise a zero du compteur" #~ msgid "Filename too long - will be truncated to 63 characters.\n" #~ msgstr "Nom de fichier trop long - il sera coupe a 63 caracteres.\n" #~ msgid "%d. Delivery Report " #~ msgstr "%d. Rapport d'envoi " #~ msgid "(read)\n" #~ msgstr "(lu)\n" #~ msgid "(unread)\n" #~ msgstr "(non lu)\n" #~ msgid "(sent)\n" #~ msgstr "(envoye)\n" #~ msgid "(unsent)\n" #~ msgstr "(non envoye)\n" #, fuzzy #~ msgid "%d. Picture Message " #~ msgstr "Message Image\n" #~ msgid "%d. MO Message " #~ msgstr "%d. Message MO" #~ msgid "Logo:\n" #~ msgstr "Logo:\n" #~ msgid "Ringtone\n" #~ msgstr "Sonnerie\n" #~ msgid "Unknown\n" #~ msgstr "Inconnu\n" #~ msgid "low\n" #~ msgstr "basse\n" #~ msgid "Name: %s\n" #~ msgstr "Nom: %s\n" #~ msgid "URL: %s\n" #~ msgstr "Adresse URL: %s\n" #~ msgid "Home: %s\n" #~ msgstr "Numero Domicile: %s\n" #~ msgid "yes\n" #~ msgstr "Oui\n" #~ msgid "no\n" #~ msgstr "non\n" #~ msgid "SMS\n" #~ msgstr "SMS\n" #~ msgid "automatic\n" #~ msgstr "automatique\n" #~ msgid " Number: %s\n" #~ msgstr " Numero: %s\n" #~ msgid " connection: " #~ msgstr " connection:" #~ msgid " Server number: %s\n" #~ msgstr " Numero du serveur: %s\n" #~ msgid "" #~ "Sorry, phonebook name will be truncated,\n" #~ "because you save it into SIM memory!" #~ msgstr "" #~ "Desole, les noms du repertoire seront tronques,\n" #~ "puisque vous les enregistrez sur memoire SIM" #~ msgid "%s: line %d: Can't write SM memory entry number %d! Error: %d\n" #~ msgstr "" #~ "%s: ligne: %d: Impossible d'enregistrer l'entree numero %d en memoire SM: " #~ "Erreur %d.\n" #~ msgid "Unrecognized [%s] option \"%s\", use \"%s\" or \"%s\" value\n" #~ msgstr "" #~ "Option [%s] \"%s\" non reconnue, utilisez plutot \"%s\" or \"%s\".\n" #~ msgid "Unrecognized [logging] option \"%s\", use \"off\" or \"on\" value\n" #~ msgstr "" #~ "Option [logging] \"%s\" non reconnue, utilisez plutot les valeurs \"on\" " #~ "or \"off\".\n" #~ msgid "Cannot allocate memory!\n" #~ msgstr "Impossible d'allouer de la memoire.\n" #~ msgid "Can't bind socket" #~ msgstr "Socket: bind impossible." #~ msgid "Format problem on line [%s]\n" #~ msgstr "Probleme de format a la ligne [%s]\n" #~ msgid "Cannot write to read-only memory (Dialed Numbers)\n" #~ msgstr "" #~ "Ecriture impossible vers une memoire en lecture seule (Numeros Composes)\n" #~ msgid "" #~ "Sorry, this function is known to break your phone (Nokia phones series 40 " #~ "v1).\n" #~ "Refusing to do it. You may try to use AT driver. If you are brave enough " #~ "to\n" #~ "test the driver anyway, please contact developers at gnokii-users@nongnu." #~ "org.\n" #~ "See also http://thread.gmane.org/gmane.linux.drivers.gnokii/3195\n" #~ msgstr "" #~ "Desole, cette fonction est connue pour rendre votre telephone " #~ "inutilisable (Nokia phone series 40 v1).\n" #~ "Je refuse donc de l'executer. Vous pouvez essayer avec le driver AT, ou, " #~ "si vous etes suffisemment courageux et souhaitez tester le driver quoi " #~ "qu'il arrive, merci de contacter les developpeurs a; gnokii-users@nongnu." #~ "org.\n" #~ "Voir aussi http://thread.gmane.org/gmane.linux.drivers.gnokii/3195\n" #~ msgid "" #~ "Usage:\n" #~ "General options:\n" #~ " gnokii --help\n" #~ " gnokii --monitor [delay|once]\n" #~ " gnokii --version\n" #~ "SMS options:\n" #~ " gnokii --getsms memory_type start [end] [-f file] [-F file] [-" #~ "d]\n" #~ " gnokii --deletesms memory_type start [end]\n" #~ " gnokii --sendsms destination [--smsc message_center_number |\n" #~ " --smscno message_center_index] [-r] [-C n] [-v n]\n" #~ " [--long n] [-i]\n" #~ " gnokii --savesms [--sender from] [--smsc message_center_number " #~ "|\n" #~ " --smscno message_center_index] [--folder folder_id]\n" #~ " [--location number] [--sent | --read] [--deliver] \n" #~ " [--datetime YYMMDDHHMMSS] \n" #~ " gnokii --getsmsc [start_number [end_number]] [-r|--raw]\n" #~ " gnokii --setsmsc\n" #~ " gnokii --createsmsfolder name\n" #~ " gnokii --deletesmsfolder number\n" #~ " gnokii --showsmsfolderstatus\n" #~ " gnokii --smsreader\n" #~ "Phonebook options:\n" #~ " gnokii --getphonebook memory_type start_number [end_number|" #~ "end]\n" #~ " [[-r|--raw]|[-v|--vcard]|[-l|--ldif]]\n" #~ " gnokii --writephonebook [[-o|--overwrite]|[-f|--find-free]]\n" #~ " [-m|--memory-type|--memory] [-n|--memory-location|--" #~ "memory]\n" #~ " [[-v|--vcard]|[-l|--ldif]]\n" #~ " gnokii --deletephonebook memory_type start_number [end_number|" #~ "end]\n" #~ "Calendar options:\n" #~ " gnokii --getcalendarnote start_number [end_number|end] [-v]\n" #~ " gnokii --writecalendarnote vcalendarfile number\n" #~ " gnokii --deletecalendarnote start [end_number|end]\n" #~ "ToDo options:\n" #~ " gnokii --gettodo start_number [end_number|end] [-v]\n" #~ " gnokii --writetodo vcalendarfile number\n" #~ " gnokii --deletealltodos\n" #~ "Dialling and call options:\n" #~ " gnokii --getspeeddial number\n" #~ " gnokii --setspeeddial number memory_type location\n" #~ " gnokii --dialvoice number\n" #~ " gnokii --senddtmf string\n" #~ " gnokii --answercall callid\n" #~ " gnokii --hangup callid\n" #~ " gnokii --divert {--op|-o} {register|enable|query|disable|" #~ "erasure}\n" #~ " {--type|-t} {all|busy|noans|outofreach|notavail}\n" #~ " {--call|-c} {all|voice|fax|data}\n" #~ " [{--timeout|-m} time_in_seconds]\n" #~ " [{--number|-n} number]\n" #~ "Phone settings:\n" #~ " gnokii --getdisplaystatus\n" #~ " gnokii --displayoutput\n" #~ " gnokii --getprofile [start_number [end_number]] [-r|--raw]\n" #~ " gnokii --setprofile\n" #~ " gnokii --getactiveprofile\n" #~ " gnokii --setactiveprofile profile_number\n" #~ " gnokii --netmonitor {reset|off|field|devel|next|nr}\n" #~ " gnokii --reset [soft|hard]\n" #~ " gnokii --setdatetime [YYYY [MM [DD [HH [MM]]]]]\n" #~ " gnokii --getdatetime\n" #~ " gnokii --setalarm [HH MM]\n" #~ " gnokii --getalarm\n" #~ "WAP options:\n" #~ " gnokii --getwapbookmark number\n" #~ " gnokii --writewapbookmark name URL\n" #~ " gnokii --deletewapbookmark number\n" #~ " gnokii --getwapsetting number [-r]\n" #~ " gnokii --writewapsetting\n" #~ " gnokii --activatewapsetting number\n" #~ "Logo options:\n" #~ " gnokii --sendlogo {caller|op|picture} destination logofile\n" #~ " [network code]\n" #~ " gnokii --setlogo op [logofile] [network code]\n" #~ " gnokii --setlogo startup [logofile]\n" #~ " gnokii --setlogo caller [logofile] [caller group number] [group " #~ "name]\n" #~ " gnokii --setlogo {dealer|text} [text]\n" #~ " gnokii --getlogo op [logofile] [network code]\n" #~ " gnokii --getlogo startup [logofile] [network code]\n" #~ " gnokii --getlogo caller [caller group number] [logofile]\n" #~ " [network code]\n" #~ " gnokii --getlogo {dealer|text}\n" #~ " gnokii --viewlogo logofile\n" #~ "Ringtone options:\n" #~ " gnokii --sendringtone rtttlfile destination\n" #~ " gnokii --getringtone rtttlfile [location] [-r|--raw]\n" #~ " gnokii --setringtone rtttlfile [location] [-r|--raw] [--name " #~ "name]\n" #~ " gnokii --playringtone rtttlfile [--volume vol]\n" #~ " gnokii --ringtoneconvert source destination\n" #~ " gnokii --getringtonelist\n" #~ " gnokii --deleteringtone start [end]\n" #~ "Security options:\n" #~ " gnokii --identify\n" #~ " gnokii --getlocksinfo\n" #~ msgstr "" #~ "Usage:\n" #~ "Options generales:\n" #~ " gnokii --help\n" #~ " gnokii --monitor [delay|once]\n" #~ " gnokii --version\n" #~ "SMS options:\n" #~ " gnokii --getsms memory_type start [end] [-f file] [-F file] [-" #~ "d]\n" #~ " gnokii --deletesms memory_type start [end]\n" #~ " gnokii --sendsms destination [--smsc message_center_number |\n" #~ " --smscno message_center_index] [-r] [-C n] [-v n]\n" #~ " [--long n] [-i]\n" #~ " gnokii --savesms [--sender from] [--smsc message_center_number " #~ "|\n" #~ " --smscno message_center_index] [--folder folder_id]\n" #~ " [--location number] [--sent | --read] [--deliver] \n" #~ " [--datetime YYMMDDHHMMSS] \n" #~ " gnokii --getsmsc [num_debut [num_fin]] [-r|--raw]\n" #~ " gnokii --setsmsc\n" #~ " gnokii --createsmsfolder nom\n" #~ " gnokii --deletesmsfolder numero\n" #~ " gnokii --showsmsfolderstatus\n" #~ " gnokii --smsreader\n" #~ "Options carnet telephonique:\n" #~ " gnokii --getphonebook memory_type numero_debut [numero_fin|" #~ "end]\n" #~ " [[-r|--raw]|[-v|--vcard]|[-l|--ldif]]\n" #~ " gnokii --writephonebook [[-o|--overwrite]|[-f|--find-free]]\n" #~ " [-m|--memory-type|--memory] [-n|--memory-location|--" #~ "memory]\n" #~ " [[-v|--vcard]|[-l|--ldif]]\n" #~ " gnokii --deletephonebook type_memoire numero_debut [numero_fin|" #~ "end]\n" #~ "Options Calendrier:\n" #~ " gnokii --getcalendarnote numero_debut [numero_fin|end] [-v]\n" #~ " gnokii --writecalendarnote vcalendarfile numero\n" #~ " gnokii --deletecalendarnote start [numero_fin|end]\n" #~ "Options TODO:\n" #~ " gnokii --gettodo numero_debut [numero_fin|end] [-v]\n" #~ " gnokii --writetodo vcalendarfile numero\n" #~ " gnokii --deletealltodos\n" #~ "Dialling and call options:\n" #~ " gnokii --getspeeddial numero\n" #~ " gnokii --setspeeddial numero type_memoire location\n" #~ " gnokii --dialvoice number\n" #~ " gnokii --senddtmf string\n" #~ " gnokii --answercall callid\n" #~ " gnokii --hangup callid\n" #~ " gnokii --divert {--op|-o} {register|enable|query|disable|" #~ "erasure}\n" #~ " {--type|-t} {all|busy|noans|outofreach|notavail}\n" #~ " {--call|-c} {all|voice|fax|data}\n" #~ " [{--timeout|-m} time_in_seconds]\n" #~ " [{--number|-n} number]\n" #~ "Phone settings:\n" #~ " gnokii --getdisplaystatus\n" #~ " gnokii --displayoutput\n" #~ " gnokii --getprofile [start_number [end_number]] [-r|--raw]\n" #~ " gnokii --setprofile\n" #~ " gnokii --getactiveprofile\n" #~ " gnokii --setactiveprofile profile_number\n" #~ " gnokii --netmonitor {reset|off|field|devel|next|nr}\n" #~ " gnokii --reset [soft|hard]\n" #~ " gnokii --setdatetime [YYYY [MM [DD [HH [MM]]]]]\n" #~ " gnokii --getdatetime\n" #~ " gnokii --setalarm [HH MM]\n" #~ " gnokii --getalarm\n" #~ "WAP options:\n" #~ " gnokii --getwapbookmark number\n" #~ " gnokii --writewapbookmark name URL\n" #~ " gnokii --deletewapbookmark number\n" #~ " gnokii --getwapsetting number [-r]\n" #~ " gnokii --writewapsetting\n" #~ " gnokii --activatewapsetting number\n" #~ "Logo options:\n" #~ " gnokii --sendlogo {caller|op|picture} destination logofile\n" #~ " [network code]\n" #~ " gnokii --setlogo op [logofile] [network code]\n" #~ " gnokii --setlogo startup [logofile]\n" #~ " gnokii --setlogo caller [logofile] [caller group number] [group " #~ "name]\n" #~ " gnokii --setlogo {dealer|text} [text]\n" #~ " gnokii --getlogo op [logofile] [network code]\n" #~ " gnokii --getlogo startup [logofile] [network code]\n" #~ " gnokii --getlogo caller [caller group number] [logofile]\n" #~ " [network code]\n" #~ " gnokii --getlogo {dealer|text}\n" #~ " gnokii --viewlogo logofile\n" #~ "Ringtone options:\n" #~ " gnokii --sendringtone rtttlfile destination\n" #~ " gnokii --getringtone rtttlfile [location] [-r|--raw]\n" #~ " gnokii --setringtone rtttlfile [location] [-r|--raw] [--name " #~ "name]\n" #~ " gnokii --playringtone rtttlfile [--volume vol]\n" #~ " gnokii --ringtoneconvert source destination\n" #~ " gnokii --getringtonelist\n" #~ " gnokii --deleteringtone start [end]\n" #~ "Security options:\n" #~ " gnokii --identify\n" #~ " gnokii --getlocksinfo\n" #~ msgid "" #~ " usage: gnokii --sendsms destination\n" #~ " [--smsc message_center_number | --smscno " #~ "message_center_index]\n" #~ " [-r] [-C n] [-v n] [--long n] [--animation file;file;file;" #~ "file]\n" #~ " [--concat this;total;serial]\n" #~ " Give the text of the message to the standard input.\n" #~ " destination - phone number where to send SMS\n" #~ " --smsc - phone number of the SMSC\n" #~ " --smscno - index of the SMSC set stored in the phone\n" #~ " -r - require delivery report\n" #~ " -C n - message Class; values [0, 3]\n" #~ " -v n - set validity period to n minutes\n" #~ " --long n - read n bytes from the input; default is 160\n" #~ "\n" #~ msgstr "" #~ " usage: gnokii --sendsms destination\n" #~ " [--smsc numero_du_centre_message | --smscno " #~ "message_center_index]\n" #~ " [-r] [-C n] [-v n] [--long n] [--animation fichier;fichier;" #~ "fichier]\n" #~ " [--concat this;total;serial]\n" #~ " Veuillez entrer le texte du message depuis l'entree standard.\n" #~ " destination - Numero ou envoyer le SMS\n" #~ " --smsc - Numero du centre SMSC\n" #~ " --smscno - Index du SMSC stocke dans le telephone\n" #~ " -r - Demande un rapport d'envoi.\n" #~ " -C n - Classe du message: compris entre 1 et 3\n" #~ " -v n - Fixer la periode de validite a n minutes\n" #~ " --long n - Lire n octets depuis l'entree; valeur mise a 160 par " #~ "defaut.\n" #~ "\n" #~ msgid "storing sms" #~ msgstr "stockage du SMS." #~ msgid "Input too long!\n" #~ msgstr "Entree trop longue.\n" #~ msgid "" #~ "Text: %s\n" #~ "\n" #~ msgstr "" #~ "Text: %s\n" #~ "\n" #~ msgid "(not read)\n" #~ msgstr "(non lu)\n" #~ msgid "Error setting" #~ msgstr "Activation: echec." #~ msgid " dealer" #~ msgstr "Vendeur" #~ msgid " Type of the note: " #~ msgstr " Type de la note: " #~ msgid "Reminder\n" #~ msgstr "Rappel\n" #~ msgid "Call\n" #~ msgstr "Appel\n" #~ msgid "Meeting\n" #~ msgstr "Rendez-vous\n" #~ msgid "Birthday\n" #~ msgstr "Anniversaire\n" #~ msgid " Date: %d-%02d-%02d\n" #~ msgstr " Date: %d-%02d-%02d\n" #~ msgid " Time: %02d:%02d:%02d\n" #~ msgstr " Heure: %02d:%02d:%02d\n" #~ msgid "" #~ "%d. Name: %s\n" #~ "Number: %s\n" #~ "Group id: %d\n" #~ msgstr "" #~ "%d. Nom: %s\n" #~ "Numero: %s\n" #~ "Id Groupe : %d\n" #~ msgid "Address: " #~ msgstr "Adresse:" #~ msgid "Notes: " #~ msgstr "Commentaires: " #~ msgid "Cellular number: " #~ msgstr "Numero de Telephone mobile: " #~ msgid "Preferred number: " #~ msgstr "Numero prefere: " #~ msgid "Unknown (%d): " #~ msgstr "Inconnu (%d): " #~ msgid "WWW address: " #~ msgstr "Adresse WWW:" #~ msgid "(unknown)" #~ msgstr "(inconnu)" #~ msgid "" #~ "GN_OP_GetSMSFolderStatus at line %d in file %s returns error %d\n" #~ "Entering dumb mode." #~ msgstr "" #~ "GN_OP_GetSMSFolderStatus a la ligne %d dans le fichier %s retourne une " #~ "erreur %d\n" #~ "Entree en mode dumb." #~ msgid "" #~ "GN_OP_GetSMSStatus at line %d in file %s returns error %d\n" #~ "Entering dumb mode." #~ msgstr "" #~ "GN_OP_GetSMSStatus a la ligne %d dans le fichier %s retourne une erreur " #~ "%d\n" #~ "Entree en mode dumb." #~ msgid "Inserting sms from %s unsuccessful.\n" #~ msgstr "Insertion du sms venant de %s: echec.\n" #~ msgid "LogoTypeEvent called!\n" #~ msgstr "Evennement LogoTypeEvent appele\n" #~ msgid "width: %i, height: %i\n" #~ msgstr "largeur: %i, hauteur: %i\n" gnokii-0.6.31/po/Makevars0000644000175000017500000000345711666163120013326 0ustar leoleo# Makefile variables for PO directory in any package using GNU gettext. # Usually the message domain is the same as the package name. DOMAIN = $(PACKAGE) # These two variables depend on the location of this directory. subdir = po top_builddir = .. # These options get passed to xgettext. XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ # This is the copyright holder that gets inserted into the header of the # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding # package. (Note that the msgstr strings, extracted from the package's # sources, belong to the copyright holder of the package.) Translators are # expected to transfer the copyright for their translations to this person # or entity, or to disclaim their copyright. The empty string stands for # the public domain; in this case the translators are expected to disclaim # their copyright. COPYRIGHT_HOLDER = 1999-2006 Hugh Blemings, Pavel Janik, Pawel Kot # This is the list of locale categories, beyond LC_MESSAGES, for which the # message catalogs shall be used. It is usually empty. EXTRA_LOCALE_CATEGORIES = # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines # in the GNU gettext documentation, section 'Preparing Strings'. # - Strings which use unclear terms or require additional context to be # understood. # - Strings which make invalid assumptions about notation of date, time or money. # - Pluralisation problems. # - Incorrect English spelling. # - Incorrect formatting. # It can be your email address, or a mailing list address where translators # can write to without being subscribed, or the URL of a web page through # which the translators can contact you. MSGID_BUGS_ADDRESS = feedback@gnokii.org gnokii-0.6.31/po/pt.po0000644000175000017500000044741511666163120012623 0ustar leoleo# This is the Portuguese locale definition for Gnokii. # Copyright (C) 1999-2007 Hugh Blemings, Pavel Janik, Pawel Kot # This file is distributed under the same license as the gnokii package. # Pedro Silva , 2007. # msgid "" msgstr "" "Project-Id-Version: gnokii 0.6.20\n" "Report-Msgid-Bugs-To: feedback@gnokii.org\n" "POT-Creation-Date: 2011-12-01 21:36+0100\n" "PO-Revision-Date: 2007-11-11 18:40+0100\n" "Last-Translator: Pedro Silva \n" "Language-Team: Portuguese \n" "Language: pt\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Line not part of any heading #: ../common/cfgreader.c:458 #, c-format msgid "" "Orphaned line: %s\n" "If in doubt place this line into [global] section.\n" msgstr "" #: ../common/cfgreader.c:732 ../common/cfgreader.c:962 #, fuzzy, c-format msgid "No %s section in the config file.\n" msgstr "Não foi especificada nenhuma porta no ficheiro de configuração." #: ../common/cfgreader.c:738 ../common/cfgreader.c:744 #: ../common/cfgreader.c:750 #, c-format msgid "You need to define '%s' in the config file.\n" msgstr "É necessário definir '%s' no ficheiro de configuração.\n" #: ../common/cfgreader.c:755 ../common/cfgreader.c:768 #: ../common/cfgreader.c:777 ../common/cfgreader.c:785 #: ../common/cfgreader.c:797 ../common/cfgreader.c:806 #: ../common/cfgreader.c:814 ../common/cfgreader.c:824 #: ../common/cfgreader.c:842 ../common/cfgreader.c:850 #: ../common/cfgreader.c:871 ../common/cfgreader.c:980 #, c-format msgid "Unsupported [%s] %s value \"%s\"\n" msgstr "Valor não suportado [%s] %s \"%s\"\n" #: ../common/cfgreader.c:769 ../common/cfgreader.c:778 #: ../common/cfgreader.c:786 ../common/cfgreader.c:807 #: ../common/cfgreader.c:815 ../common/cfgreader.c:825 #: ../common/cfgreader.c:843 ../common/cfgreader.c:851 #, c-format msgid "Assuming: %d\n" msgstr "Assumindo: %d\n" #: ../common/cfgreader.c:798 ../common/cfgreader.c:872 #: ../common/cfgreader.c:981 #, c-format msgid "Use either \"%s\" or \"%s\".\n" msgstr "Utilize \"%s\" ou \"%s\".\n" #: ../common/cfgreader.c:799 ../common/cfgreader.c:873 #: ../common/cfgreader.c:982 #, c-format msgid "Assuming: %s\n" msgstr "Assumindo: %s\n" #: ../common/cfgreader.c:1172 #, c-format msgid "Couldn't read %s config file.\n" msgstr "Não foi possivel ler o ficheiro de configuração %s.\n" #: ../common/cfgreader.c:1187 #, fuzzy, c-format msgid "Failed to initialize libgnokii.\n" msgstr "Falhou ao escrever o ficheiro %s.\n" #: ../common/cfgreader.c:1192 #, c-format msgid "Couldn't open a config file or memory.\n" msgstr "Não foi possivel abrir o ficheiro de configuração ou a memória.\n" #: ../common/cfgreader.c:1282 #, c-format msgid "Config error - no model specified.\n" msgstr "Erro na configuração - modelo não especificado.\n" #: ../common/cfgreader.c:1286 #, c-format msgid "Config error - no port specified.\n" msgstr "Erro na configuração - porta não especificado.\n" #: ../common/data/virtmodem.c:144 #, c-format msgid "gn_vm_initialise - VM_GSMInitialise failed!\n" msgstr "gn_vm_initialise - VM_GSMInitialise falhou!\n" #: ../common/data/virtmodem.c:151 #, c-format msgid "gn_vm_initialise - VM_PtySetup failed!\n" msgstr "" #: ../common/data/virtmodem.c:156 #, c-format msgid "gn_vm_initialise - gn_atem_initialise failed!\n" msgstr "gn_vm_initialise - gn_atem_initialise falhou!\n" #: ../common/data/virtmodem.c:161 #, fuzzy, c-format msgid "gn_vm_initialise - dp_Initialise failed!\n" msgstr "gn_vm_Initialise - dp_Initialise falhou!\n" #: ../common/data/virtmodem.c:365 #, fuzzy, c-format msgid "Cannot access %s, check the bindir in your config file!\n" msgstr "Não é possivel abrir %s, verifique a bindir no seu gnokiirc!\n" #: ../common/data/virtmodem.c:372 ../utils/mgnokiidev.c:186 #, c-format msgid "Couldn't open pty!\n" msgstr "Não foi possivel abrir pty!\n" #: ../common/data/virtmodem.c:389 ../gnokii/gnokii-other.c:78 #: ../smsd/lowlevel.c:124 ../xgnokii/xgnokii_lowlevel.c:200 #, c-format msgid "GSM/FBUS init failed! (Unknown model?). Quitting.\n" msgstr "Inicialização GSM/FBUS falhou! (Modelo Desconhecido?). Desistindo.\n" #: ../common/devices/tcp.c:80 msgid "Gnokii tcp_open: socket()" msgstr "" #: ../common/devices/tcp.c:89 #, c-format msgid "Gnokii tcp_open: colon (':') not found in connect strings \"%s\"!\n" msgstr "" "Gnokii tcp_open: dois pontos (':') não foi encontrado nos parametros de " "conexão \"%s\"!\n" #: ../common/devices/tcp.c:97 #, c-format msgid "Gnokii tcp_open: Port string \"%s\" not valid for IPv4 connection!\n" msgstr "Gnokii tcp_open: Nome da porta \"%s\" inválido para conexão IPv4!\n" #: ../common/devices/tcp.c:101 #, c-format msgid "Gnokii tcp_open: Unknown host \"%s\"!\n" msgstr "Gnokii tcp_open: Host \"%s\" desconhecido!\n" #: ../common/devices/tcp.c:105 #, c-format msgid "Gnokii tcp_open: Address resolve for host \"%s\" not compatible!\n" msgstr "" "Gnokii tcp_open: Endereço resolvido para o host \"%s\" não é compativel!\n" #: ../common/devices/tcp.c:115 msgid "Gnokii tcp_open: connect()" msgstr "" #: ../common/devices/tcp.c:127 #, c-format msgid "Gnokii tcp_close: disconnect_script\n" msgstr "" #: ../common/devices/tcp.c:150 #, c-format msgid "Gnokii tcp_opendevice: connect_script\n" msgstr "" #: ../common/devices/tcp.c:160 msgid "Gnokii tcp_opendevice: fcntl(F_SETOWN)" msgstr "" #: ../common/devices/tcp.c:183 msgid "Gnokii tcp_opendevice: fcntl(F_SETFL)" msgstr "" #: ../common/devices/unixbluetooth.c:497 #, c-format msgid "Invalid bluetooth address \"%s\"\n" msgstr "Endereço bluetooth \"%s\" inválido\n" #: ../common/devices/unixbluetooth.c:502 msgid "Can't create socket" msgstr "Não foi possivel criar o socket" #: ../common/devices/unixbluetooth.c:521 #, c-format msgid "" "Cannot find any appropriate rfcomm channel and none was specified in the " "config.\n" msgstr "" #: ../common/devices/unixbluetooth.c:530 msgid "Can't connect" msgstr "Não foi possivel conectar" #: ../common/devices/unixirda.c:150 #, c-format msgid "Virtual IrCOMM device unsupported under Linux\n" msgstr "Dispositivo IrCOMM Virtual não é suportado em Linux\n" #: ../common/devices/unixserial.c:117 #, c-format msgid "device_script(\"%s\"): fork() failure: %s!\n" msgstr "" #: ../common/devices/unixserial.c:124 #, c-format msgid "device_script(\"%s\"): file descriptor preparation failure: %s\n" msgstr "" #: ../common/devices/unixserial.c:130 #, c-format msgid "device_script(\"%s\"): script execution failure: %s\n" msgstr "" #: ../common/devices/unixserial.c:137 #, c-format msgid "" "device_script(\"%s\"): child script execution failure: %s, exit code=%d\n" msgstr "" #: ../common/devices/unixserial.c:138 msgid "normal exit" msgstr "execução terminada normalmente" #: ../common/devices/unixserial.c:138 msgid "abnormal exit" msgstr "execução terminada anormalmente." #: ../common/devices/unixserial.c:394 #, c-format msgid "Serial port speed %d not supported!\n" msgstr "Velocidade da porta série %d não é suportada!\n" #: ../common/devices/unixserial.c:434 #, c-format msgid "ERROR: Modem DCD is down and global/require_dcd parameter is set!\n" msgstr "" "ERRO: Modem DCD está desligado e o parametro global/require_dcd está " "activado!\n" #: ../common/devices/winbluetooth.c:70 ../common/devices/winirda.c:113 #, c-format msgid "Failed to initialize socket subsystem: need WINSOCK2. Please upgrade.\n" msgstr "" "Falha ao inicializar subsistema socket: preciso do WINSOCK2. Por fazer faça " "um upgrade.\n" #: ../common/gsm-common.c:148 msgid "Internal memory" msgstr "Memória Interna" #: ../common/gsm-common.c:149 msgid "SIM card" msgstr "Cartão SIM" #: ../common/gsm-common.c:150 msgid "Fixed dial numbers" msgstr "Número marcados fixos" #: ../common/gsm-common.c:151 msgid "Own numbers" msgstr "Próprios números" #: ../common/gsm-common.c:152 msgid "Emergency numbers" msgstr "Números de emergência" #: ../common/gsm-common.c:153 #, fuzzy msgid "Dialled numbers" msgstr "Números marcados" #: ../common/gsm-common.c:154 msgid "Received numbers" msgstr "Números recebidos" #: ../common/gsm-common.c:155 msgid "Missed numbers" msgstr "Números não atendidos" #: ../common/gsm-common.c:156 #, fuzzy msgid "Last dialled" msgstr "Último número marcado" #: ../common/gsm-common.c:157 #, fuzzy msgid "Barred dialling numbers" msgstr "Números barrados" #: ../common/gsm-common.c:158 #, fuzzy msgid "Service dialling numbers" msgstr "Números de serviço" #: ../common/gsm-common.c:159 msgid "Combined ME and SIM phonebook" msgstr "Lista telefónica ME e SIM combinadas" #: ../common/gsm-common.c:160 msgid "Computer memory" msgstr "Memória do computador" #: ../common/gsm-common.c:161 msgid "Currently selected memory" msgstr "Memória actual selecionada" #: ../common/gsm-common.c:162 msgid "SMS Inbox" msgstr "SMS Entrada" #: ../common/gsm-common.c:163 #, fuzzy msgid "SMS Outbox, sent items" msgstr "SMS Saida" #: ../common/gsm-common.c:164 msgid "SMS Archive" msgstr "SMS Arquivo" #: ../common/gsm-common.c:165 msgid "SMS Templates" msgstr "" #: ../common/gsm-common.c:166 msgid "SMS Status Reports" msgstr "" #: ../common/gsm-common.c:167 msgid "SMS Drafts" msgstr "" #: ../common/gsm-common.c:168 msgid "SMS Outbox, items to be sent" msgstr "" #: ../common/gsm-common.c:169 msgid "SMS Folder 1" msgstr "SMS Pasta 1" #: ../common/gsm-common.c:170 msgid "SMS Folder 2" msgstr "SMS Pasta 2" #: ../common/gsm-common.c:171 msgid "SMS Folder 3" msgstr "SMS Pasta 3" #: ../common/gsm-common.c:172 msgid "SMS Folder 4" msgstr "SMS Pasta 4" #: ../common/gsm-common.c:173 msgid "SMS Folder 5" msgstr "SMS Pasta 5" #: ../common/gsm-common.c:174 msgid "SMS Folder 6" msgstr "SMS Pasta 6" #: ../common/gsm-common.c:175 msgid "SMS Folder 7" msgstr "SMS Pasta 7" #: ../common/gsm-common.c:176 msgid "SMS Folder 8" msgstr "SMS Pasta 8" #: ../common/gsm-common.c:177 msgid "SMS Folder 9" msgstr "SMS Pasta 9" #: ../common/gsm-common.c:178 msgid "SMS Folder 10" msgstr "SMS Pasta 10" #: ../common/gsm-common.c:179 msgid "SMS Folder 11" msgstr "SMS Pasta 11" #: ../common/gsm-common.c:180 msgid "SMS Folder 12" msgstr "SMS Pasta 12" #: ../common/gsm-common.c:181 msgid "SMS Folder 13" msgstr "SMS Pasta 13" #: ../common/gsm-common.c:182 msgid "SMS Folder 14" msgstr "SMS Pasta 14" #: ../common/gsm-common.c:183 msgid "SMS Folder 15" msgstr "SMS Pasta 15" #: ../common/gsm-common.c:184 msgid "SMS Folder 16" msgstr "SMS Pasta 16" #: ../common/gsm-common.c:185 msgid "SMS Folder 17" msgstr "SMS Pasta 17" #: ../common/gsm-common.c:186 msgid "SMS Folder 18" msgstr "SMS Pasta 18" #: ../common/gsm-common.c:187 msgid "SMS Folder 19" msgstr "SMS Pasta 19" #: ../common/gsm-common.c:188 msgid "SMS Folder 20" msgstr "SMS Pasta 20" #: ../common/gsm-common.c:189 msgid "Cell Broadcast" msgstr "" #: ../common/gsm-common.c:190 ../common/gsm-common.c:211 #: ../common/gsm-common.c:222 ../common/gsm-common.c:235 #: ../common/gsm-common.c:290 ../common/gsm-common.c:343 #: ../common/gsm-common.c:356 ../common/gsm-common.c:380 #: ../common/gsm-common.c:381 ../common/gsm-common.c:398 #: ../common/gsm-common.c:409 ../common/gsm-common.c:424 #: ../common/gsm-common.c:437 ../common/gsm-common.c:451 #: ../common/gsm-common.c:464 ../common/gsm-common.c:474 #: ../common/gsm-common.c:485 ../common/gsm-common.c:494 #: ../common/gsm-common.c:505 ../common/gsm-common.c:514 #: ../common/gsm-common.c:524 ../common/gsm-common.c:533 #: ../common/gsm-common.c:542 ../common/gsm-common.c:556 #: ../common/gsm-common.c:565 ../common/gsm-common.c:574 #: ../common/gsm-common.c:587 ../common/gsm-common.c:598 #: ../common/gsm-common.c:610 ../common/gsm-common.c:624 #: ../common/gsm-common.c:635 ../common/gsm-common.c:647 #: ../common/gsm-sms.c:409 ../common/libfunctions.c:219 #: ../common/phones/atgen.c:2695 ../common/phones/atgen.c:2702 #: ../common/phones/atgen.c:3183 ../common/phones/nk6100.c:4087 #: ../gnokii/gnokii-ringtone.c:90 ../xgnokii/xgnokii_calendar.c:187 #: ../xgnokii/xgnokii_contacts.c:765 ../xgnokii/xgnokii_contacts.c:821 #: ../xgnokii/xgnokii_contacts.c:948 ../xgnokii/xgnokii_contacts.c:990 #: ../xgnokii/xgnokii_contacts.c:1206 ../xgnokii/xgnokii_contacts.c:1230 #, c-format msgid "Unknown" msgstr "Desconhecido" #: ../common/gsm-common.c:197 ../common/gsm-common.c:234 #: ../common/gsm-common.c:355 msgid "None" msgstr "" #: ../common/gsm-common.c:198 #, fuzzy msgid "Serial" msgstr "Geral" #: ../common/gsm-common.c:199 msgid "Serial DAU9P" msgstr "" #: ../common/gsm-common.c:200 msgid "Serial DLR3P" msgstr "" #: ../common/gsm-common.c:201 msgid "Infrared (old Nokias)" msgstr "" #: ../common/gsm-common.c:202 msgid "IrDA" msgstr "" #: ../common/gsm-common.c:203 msgid "Bluetooth" msgstr "" #: ../common/gsm-common.c:204 msgid "Tekram Ir-Dongle" msgstr "" #: ../common/gsm-common.c:205 msgid "TCP" msgstr "" #: ../common/gsm-common.c:206 msgid "M2BUS" msgstr "" #: ../common/gsm-common.c:207 msgid "DKU2 (kernel support)" msgstr "" #: ../common/gsm-common.c:208 msgid "DKU2 (libusb support)" msgstr "" #: ../common/gsm-common.c:209 msgid "Smart Card reader (libpcsclite support)" msgstr "" #: ../common/gsm-common.c:210 msgid "Linux Phonet (kernel support)" msgstr "" #: ../common/gsm-common.c:218 msgid "AC-DC" msgstr "" #: ../common/gsm-common.c:219 msgid "Battery" msgstr "" #: ../common/gsm-common.c:220 msgid "No battery" msgstr "" #: ../common/gsm-common.c:221 msgid "Power fault" msgstr "" #: ../common/gsm-common.c:229 #, fuzzy msgid "Security code" msgstr "Código de Segurança inválido." #: ../common/gsm-common.c:230 msgid "PIN" msgstr "" #: ../common/gsm-common.c:231 msgid "PIN2" msgstr "" #: ../common/gsm-common.c:232 msgid "PUK" msgstr "" #: ../common/gsm-common.c:233 msgid "PUK2" msgstr "" #: ../common/gsm-common.c:244 ../common/gsm-common.c:245 #: ../common/gsm-common.c:250 msgid "General number" msgstr "Número Geral" #: ../common/gsm-common.c:246 msgid "Home number" msgstr "Número Casa" #: ../common/gsm-common.c:247 msgid "Mobile number" msgstr "Número Movél" #: ../common/gsm-common.c:248 msgid "Fax number" msgstr "Número FAX" #: ../common/gsm-common.c:249 #, fuzzy msgid "Work number" msgstr "Número Casa" #: ../common/gsm-common.c:251 ../common/gsm-common.c:340 msgid "Unknown number" msgstr "Número desconhecido" #: ../common/gsm-common.c:258 ../gnokii/gnokii-phonebook.c:187 #: ../gnokii/gnokii-wap.c:89 ../gnokii/gnokii-wap.c:220 #: ../xgnokii/xgnokii_contacts.c:749 ../xgnokii/xgnokii_contacts.c:815 #: ../xgnokii/xgnokii_contacts.c:946 ../xgnokii/xgnokii_contacts.c:988 #: ../xgnokii/xgnokii_contacts.c:1224 ../xgnokii/xgnokii_contacts.c:1729 #: ../xgnokii/xgnokii_contacts.c:2936 ../xgnokii/xgnokii_contacts.c:3120 #: ../xgnokii/xgnokii_speed.c:542 msgid "Name" msgstr "Nome" #: ../common/gsm-common.c:259 ../common/gsm-common.c:422 #: ../xgnokii/xgnokii.c:542 ../xgnokii/xgnokii.c:1433 #: ../xgnokii/xgnokii_contacts.c:743 ../xgnokii/xgnokii_contacts.c:812 #: ../xgnokii/xgnokii_contacts.c:945 ../xgnokii/xgnokii_contacts.c:987 #: ../xgnokii/xgnokii_contacts.c:1220 msgid "Email" msgstr "" #: ../common/gsm-common.c:260 ../common/gsm-common.c:277 msgid "Postal address" msgstr "Código Postal" #: ../common/gsm-common.c:261 ../xgnokii/xgnokii_contacts.c:731 #: ../xgnokii/xgnokii_contacts.c:806 ../xgnokii/xgnokii_contacts.c:943 #: ../xgnokii/xgnokii_contacts.c:985 ../xgnokii/xgnokii_contacts.c:1026 #: ../xgnokii/xgnokii_contacts.c:1212 msgid "Note" msgstr "Nota" #: ../common/gsm-common.c:262 ../gnokii/gnokii-dial.c:376 #: ../gnokii/gnokii-phonebook.c:203 ../gnokii/gnokii-wap.c:231 #: ../xgnokii/xgnokii_calendar.c:1540 ../xgnokii/xgnokii_contacts.c:1737 #: ../xgnokii/xgnokii_contacts.c:2936 ../xgnokii/xgnokii_contacts.c:3120 #: ../xgnokii/xgnokii_speed.c:542 msgid "Number" msgstr "" #: ../common/gsm-common.c:263 ../common/gsm-common.c:272 #: ../common/gsm-common.c:367 ../xgnokii/xgnokii.c:1142 #: ../xgnokii/xgnokii_xring.c:845 msgid "Ringtone" msgstr "" #: ../common/gsm-common.c:264 msgid "Date" msgstr "Data" #: ../common/gsm-common.c:265 msgid "Pointer" msgstr "Apontador" #: ../common/gsm-common.c:266 ../common/gsm-common.c:369 msgid "Logo" msgstr "" #: ../common/gsm-common.c:267 msgid "Logo switch" msgstr "" #: ../common/gsm-common.c:268 ../xgnokii/xgnokii_contacts.c:2936 #: ../xgnokii/xgnokii_contacts.c:3120 msgid "Group" msgstr "Grupo" #: ../common/gsm-common.c:269 ../gnokii/gnokii-wap.c:90 #: ../xgnokii/xgnokii_contacts.c:758 ../xgnokii/xgnokii_contacts.c:818 #: ../xgnokii/xgnokii_contacts.c:947 ../xgnokii/xgnokii_contacts.c:989 #: ../xgnokii/xgnokii_contacts.c:1227 msgid "URL" msgstr "" #: ../common/gsm-common.c:270 ../gnokii/gnokii-calendar.c:206 #: ../xgnokii/xgnokii_calendar.c:1541 msgid "Location" msgstr "Localização" #: ../common/gsm-common.c:271 msgid "Image" msgstr "Imagem" #: ../common/gsm-common.c:273 msgid "User ID" msgstr "ID do utilizador" #: ../common/gsm-common.c:274 #, fuzzy msgid "Push-To-Talk address" msgstr "Endereço Push-to-talk" #: ../common/gsm-common.c:275 msgid "First name" msgstr "Primeiro nome" #: ../common/gsm-common.c:276 msgid "Last name" msgstr "Último nome" #: ../common/gsm-common.c:278 ../gnokii/gnokii-phonebook.c:212 msgid "Extended address" msgstr "Endereço extendido" #: ../common/gsm-common.c:279 ../gnokii/gnokii-phonebook.c:214 msgid "Street" msgstr "Rua" #: ../common/gsm-common.c:280 ../gnokii/gnokii-phonebook.c:216 msgid "City" msgstr "Cidade" #: ../common/gsm-common.c:281 ../gnokii/gnokii-phonebook.c:218 msgid "State or province" msgstr "Estado ou provincia" #: ../common/gsm-common.c:282 ../gnokii/gnokii-phonebook.c:220 msgid "Zip code" msgstr "Código Postal" #: ../common/gsm-common.c:283 ../gnokii/gnokii-phonebook.c:222 msgid "Country" msgstr "País" #: ../common/gsm-common.c:284 msgid "Formal name" msgstr "Nome Formal" #: ../common/gsm-common.c:285 msgid "Job title" msgstr "" #: ../common/gsm-common.c:286 msgid "Company" msgstr "Empresa" #: ../common/gsm-common.c:287 msgid "Nickname" msgstr "Alcunha" #: ../common/gsm-common.c:288 ../common/gsm-common.c:448 #: ../xgnokii/xgnokii_calendar.c:181 ../xgnokii/xgnokii_calendar.c:288 msgid "Birthday" msgstr "Aniversário" #: ../common/gsm-common.c:289 msgid "Caller group id" msgstr "" #: ../common/gsm-common.c:350 ../common/nokia-decoding.c:349 #: ../common/phones/nk6100.c:1007 ../xgnokii/xgnokii.c:221 #: ../xgnokii/xgnokii.c:1027 msgid "Family" msgstr "Familia" #: ../common/gsm-common.c:351 msgid "VIPs" msgstr "" #: ../common/gsm-common.c:352 ../common/nokia-decoding.c:355 #: ../common/phones/nk6100.c:1013 ../xgnokii/xgnokii.c:223 #: ../xgnokii/xgnokii.c:1051 msgid "Friends" msgstr "Amigos" #: ../common/gsm-common.c:353 ../xgnokii/xgnokii_contacts.c:713 #: ../xgnokii/xgnokii_contacts.c:797 ../xgnokii/xgnokii_contacts.c:940 #: ../xgnokii/xgnokii_contacts.c:982 ../xgnokii/xgnokii_contacts.c:1194 msgid "Work" msgstr "Trabalho" #: ../common/gsm-common.c:354 msgid "Others" msgstr "Outros" #: ../common/gsm-common.c:365 ../common/gsm-common.c:416 #: ../xgnokii/xgnokii.c:529 ../xgnokii/xgnokii.c:558 ../xgnokii/xgnokii.c:1415 #: ../xgnokii/xgnokii_calendar.c:1539 msgid "Text" msgstr "" #: ../common/gsm-common.c:366 msgid "Linked" msgstr "" #: ../common/gsm-common.c:368 #, fuzzy msgid "GSM Operator Logo" msgstr "A enviar o logotipo do operador.\n" #: ../common/gsm-common.c:370 msgid "Multipart Message" msgstr "" #: ../common/gsm-common.c:371 msgid "WAP vCard" msgstr "" #: ../common/gsm-common.c:372 msgid "WAP vCalendar" msgstr "" #: ../common/gsm-common.c:373 msgid "WAP vCardSecure" msgstr "" #: ../common/gsm-common.c:374 msgid "WAP vCalendarSecure" msgstr "" #: ../common/gsm-common.c:375 msgid "Voice Message" msgstr "" #: ../common/gsm-common.c:376 msgid "Fax Message" msgstr "" #: ../common/gsm-common.c:377 msgid "Email Message" msgstr "" #: ../common/gsm-common.c:378 msgid "WAP Push" msgstr "" #: ../common/gsm-common.c:379 #, fuzzy msgid "Other Message" msgstr "Outros" #: ../common/gsm-common.c:388 msgid "Inbox Message" msgstr "" #: ../common/gsm-common.c:389 #, fuzzy msgid "Delivery Report" msgstr "Entregue" #: ../common/gsm-common.c:390 ../common/gsm-common.c:397 msgid "MO Message" msgstr "" #: ../common/gsm-common.c:391 msgid "Submit Report" msgstr "" #: ../common/gsm-common.c:392 #, fuzzy msgid "Command" msgstr "Empresa" #: ../common/gsm-common.c:393 msgid "Status Report" msgstr "" #: ../common/gsm-common.c:394 msgid "Picture Message" msgstr "" #: ../common/gsm-common.c:395 msgid "Template" msgstr "" #: ../common/gsm-common.c:396 msgid "Picture Message Template" msgstr "" #: ../common/gsm-common.c:405 msgid "Read" msgstr "" #: ../common/gsm-common.c:406 msgid "Unread" msgstr "" #: ../common/gsm-common.c:407 #, fuzzy msgid "Sent" msgstr "Silêncio" #: ../common/gsm-common.c:408 msgid "Unsent" msgstr "" #: ../common/gsm-common.c:417 ../common/gsm-common.c:632 #: ../xgnokii/xgnokii.c:537 ../xgnokii/xgnokii.c:1421 #: ../xgnokii/xgnokii_contacts.c:719 ../xgnokii/xgnokii_contacts.c:800 #: ../xgnokii/xgnokii_contacts.c:941 ../xgnokii/xgnokii_contacts.c:983 #: ../xgnokii/xgnokii_contacts.c:1198 msgid "Fax" msgstr "" #: ../common/gsm-common.c:418 msgid "VoiceMail" msgstr "" #: ../common/gsm-common.c:419 ../xgnokii/xgnokii.c:546 msgid "ERMES" msgstr "" #: ../common/gsm-common.c:420 ../xgnokii/xgnokii.c:533 #: ../xgnokii/xgnokii.c:1427 msgid "Paging" msgstr "" #: ../common/gsm-common.c:421 msgid "Email message in 8110i" msgstr "" #: ../common/gsm-common.c:423 ../xgnokii/xgnokii.c:550 msgid "X.400" msgstr "" #: ../common/gsm-common.c:431 ../xgnokii/xgnokii.c:564 #: ../xgnokii/xgnokii.c:1461 msgid "1 hour" msgstr "" #: ../common/gsm-common.c:432 ../xgnokii/xgnokii.c:568 #: ../xgnokii/xgnokii.c:1467 msgid "6 hours" msgstr "" #: ../common/gsm-common.c:433 ../xgnokii/xgnokii.c:572 #: ../xgnokii/xgnokii.c:588 ../xgnokii/xgnokii.c:1473 msgid "24 hours" msgstr "" #: ../common/gsm-common.c:434 ../xgnokii/xgnokii.c:576 #: ../xgnokii/xgnokii.c:1479 msgid "72 hours" msgstr "" #: ../common/gsm-common.c:435 ../xgnokii/xgnokii.c:580 #: ../xgnokii/xgnokii.c:1485 msgid "1 week" msgstr "" #: ../common/gsm-common.c:436 msgid "Maximum time" msgstr "" #: ../common/gsm-common.c:446 ../common/phones/nk6100.c:2113 #: ../xgnokii/xgnokii_calendar.c:175 #, c-format msgid "Meeting" msgstr "Reunião" #: ../common/gsm-common.c:447 ../xgnokii/xgnokii_calendar.c:169 msgid "Call" msgstr "Chamada" #: ../common/gsm-common.c:449 ../xgnokii/xgnokii_calendar.c:163 msgid "Reminder" msgstr "Lembrete" #: ../common/gsm-common.c:450 ../xgnokii/xgnokii_calendar.c:157 msgid "Memo" msgstr "" #: ../common/gsm-common.c:458 ../xgnokii/xgnokii_calendar.c:831 msgid "Never" msgstr "" #: ../common/gsm-common.c:459 #, fuzzy msgid "Daily" msgstr "Familia" #: ../common/gsm-common.c:460 msgid "Weekly" msgstr "" #: ../common/gsm-common.c:461 #, fuzzy msgid "Every 2 weeks" msgstr " Repetir: de duas em duas semanas\n" #: ../common/gsm-common.c:462 msgid "Monthly" msgstr "" #: ../common/gsm-common.c:463 msgid "Yearly" msgstr "" #: ../common/gsm-common.c:471 msgid "Low" msgstr "" #: ../common/gsm-common.c:472 msgid "Medium" msgstr "" #: ../common/gsm-common.c:473 msgid "High" msgstr "" #: ../common/gsm-common.c:483 msgid "Temporary" msgstr "" #: ../common/gsm-common.c:484 msgid "Permanent" msgstr "" #: ../common/gsm-common.c:492 msgid "Normal" msgstr "" #: ../common/gsm-common.c:493 msgid "Secure" msgstr "" #: ../common/gsm-common.c:501 ../gnokii/gnokii-wap.c:225 msgid "GSM data" msgstr "" #: ../common/gsm-common.c:502 ../gnokii/gnokii-wap.c:234 msgid "GPRS" msgstr "" #: ../common/gsm-common.c:503 ../gnokii/gnokii-wap.c:242 #: ../xgnokii/xgnokii.c:1106 ../xgnokii/xgnokii.c:1848 msgid "SMS" msgstr "" #: ../common/gsm-common.c:504 msgid "USSD" msgstr "" #: ../common/gsm-common.c:512 msgid "Analogue" msgstr "" #: ../common/gsm-common.c:513 msgid "ISDN" msgstr "" #: ../common/gsm-common.c:521 ../common/gsm-common.c:532 #: ../gnokii/gnokii-profile.c:185 msgid "Automatic" msgstr "" #: ../common/gsm-common.c:522 msgid "9600" msgstr "" #: ../common/gsm-common.c:523 msgid "14400" msgstr "" #: ../common/gsm-common.c:531 msgid "Manual" msgstr "" #: ../common/gsm-common.c:540 msgid "Always" msgstr "" #: ../common/gsm-common.c:541 msgid "When needed" msgstr "" #: ../common/gsm-common.c:551 msgid "No tone" msgstr "" #: ../common/gsm-common.c:552 msgid "Standard" msgstr "" #: ../common/gsm-common.c:553 msgid "Special" msgstr "" #: ../common/gsm-common.c:554 ../common/gsm-common.c:582 msgid "Beep once" msgstr "" #: ../common/gsm-common.c:555 ../common/gsm-common.c:585 msgid "Ascending" msgstr "" #: ../common/gsm-common.c:563 ../common/gsm-common.c:572 #: ../common/gsm-common.c:583 ../common/gsm-common.c:594 #: ../gnokii/gnokii-profile.c:192 msgid "Off" msgstr "" #: ../common/gsm-common.c:564 ../common/gsm-common.c:573 #: ../gnokii/gnokii-profile.c:185 ../gnokii/gnokii-profile.c:192 msgid "On" msgstr "" #: ../common/gsm-common.c:581 msgid "Ringing" msgstr "" #: ../common/gsm-common.c:584 msgid "Ring once" msgstr "" #: ../common/gsm-common.c:586 msgid "Caller groups" msgstr "" #: ../common/gsm-common.c:595 ../common/gsm-common.c:605 msgid "Level 1" msgstr "" #: ../common/gsm-common.c:596 ../common/gsm-common.c:606 msgid "Level 2" msgstr "" #: ../common/gsm-common.c:597 ../common/gsm-common.c:607 msgid "Level 3" msgstr "" #: ../common/gsm-common.c:608 msgid "Level 4" msgstr "" #: ../common/gsm-common.c:609 msgid "Level 5" msgstr "" #: ../common/gsm-common.c:619 #, fuzzy msgid "Busy" msgstr "ocupado\n" #: ../common/gsm-common.c:620 msgid "No answer" msgstr "" #: ../common/gsm-common.c:621 #, fuzzy msgid "Out of reach" msgstr "fora do alcance\n" #: ../common/gsm-common.c:622 #, fuzzy msgid "Not available" msgstr "não disponivel\n" #: ../common/gsm-common.c:623 ../common/gsm-common.c:634 msgid "All" msgstr "" #: ../common/gsm-common.c:631 ../xgnokii/xgnokii.c:554 msgid "Voice" msgstr "" #: ../common/gsm-common.c:633 #, fuzzy msgid "Data" msgstr "Data" #: ../common/gsm-common.c:642 ../xgnokii/xgnokii_data.c:124 msgid "Disable" msgstr "" #: ../common/gsm-common.c:643 ../xgnokii/xgnokii_data.c:120 msgid "Enable" msgstr "" #: ../common/gsm-common.c:644 msgid "Query" msgstr "" #: ../common/gsm-common.c:645 #, fuzzy msgid "Register" msgstr "Lembrete" #: ../common/gsm-common.c:646 msgid "Erasure" msgstr "" #: ../common/gsm-error.c:42 msgid "No error." msgstr "Nenhum erro." #: ../common/gsm-error.c:43 msgid "Command failed." msgstr "Comando falhou." #: ../common/gsm-error.c:44 msgid "Model specified isn't known/supported." msgstr "Modelo especificado desconhecido/não suportado." #: ../common/gsm-error.c:45 msgid "Invalid Security code." msgstr "Código de Segurança inválido." #: ../common/gsm-error.c:46 msgid "Problem occurred internal to model specific code." msgstr "Ocorreu um problema interno com o código do modelo." #: ../common/gsm-error.c:47 msgid "Command called isn't implemented in model." msgstr "Comando chamado não está implementado no modelo." #: ../common/gsm-error.c:48 #, fuzzy msgid "" "Function or connection type not supported by the phone or by the phone " "driver." msgstr "Função ou tipo de conexão não suportado pelo telefone." #: ../common/gsm-error.c:49 msgid "User aborted the action." msgstr "O utilizador abortou a acção." #: ../common/gsm-error.c:50 msgid "Unknown error - well better than nothing!!" msgstr "Erro desconhecido - bem, é melhor que nada!!" #: ../common/gsm-error.c:51 msgid "The specified memory is full." msgstr "A memória especificada está cheia." #: ../common/gsm-error.c:52 msgid "Couldn't establish link with phone." msgstr "Não foi possivel establecer uma ligação com o telefone." #: ../common/gsm-error.c:53 msgid "Command timed out." msgstr "Tempo do comando expirou." #: ../common/gsm-error.c:54 msgid "Try again." msgstr "Tente novamente." #: ../common/gsm-error.c:55 msgid "Waiting for the next part of the message." msgstr "À espera da próxima parte da mensagem." #: ../common/gsm-error.c:56 msgid "Device not ready." msgstr "O dispositivo não está pronto." #: ../common/gsm-error.c:57 msgid "Command is still being executed." msgstr "O comando ainda está a ser executado." #: ../common/gsm-error.c:58 msgid "The given memory location is invalid." msgstr "A localização da memória inserida é inválida." #: ../common/gsm-error.c:59 msgid "Invalid type of memory." msgstr "Tipo de memória inválida" #: ../common/gsm-error.c:60 msgid "The given location is empty." msgstr "A localização inserida é inválida." #: ../common/gsm-error.c:61 msgid "The given entry is too long." msgstr "Entrada demasiado grande." #: ../common/gsm-error.c:62 msgid "Data format is not valid." msgstr "Formato da data inválido." #: ../common/gsm-error.c:63 msgid "Wrong size of the object." msgstr "Tamanho do objecto errado." #: ../common/gsm-error.c:64 msgid "Outgoing call requested reported line busy." msgstr "O pedido de chamada detectou a linha ocupada." #: ../common/gsm-error.c:65 msgid "No Carrier error during data call setup?" msgstr "Erro No Carrier durante a preparação da chamada de dados?" #: ../common/gsm-error.c:66 msgid "The current frame isn't handled by the incoming function." msgstr "A frame currente não é gerida pela função de entrada." #: ../common/gsm-error.c:67 msgid "Unsolicited message received." msgstr "Mensagem não solicitada recebida." #: ../common/gsm-error.c:68 msgid "Attempt to read CB when no new CB received." msgstr "Tentativa de ler o CB quando não foi recebido nenhum CB novo." #: ../common/gsm-error.c:69 msgid "SIM card missing or damaged." msgstr "Cartão SIM não encontrado ou danificado." #: ../common/gsm-error.c:70 msgid "PIN or PUK code required." msgstr "É necessário o código PIN ou PUK" #: ../common/gsm-error.c:71 msgid "The requested information is not available." msgstr "A informação pretendida não está disponivel." #: ../common/gsm-error.c:72 msgid "Config file cannot be read." msgstr "Não é possivel ler o ficheiro de configuração." #: ../common/gsm-error.c:73 msgid "Either global or given phone section cannot be found." msgstr "Não foi possivel encontrar a secção global ou especifica do telefone." #: ../common/gsm-error.c:74 msgid "Incorrect logging section configuration." msgstr "Configuração da secção de registo incorrecta." #: ../common/gsm-error.c:75 msgid "No phone model specified in the config file." msgstr "" "Não foi especificado nenhum modelo de telefone no ficheiro de configuração." #: ../common/gsm-error.c:76 msgid "No port specified in the config file." msgstr "Não foi especificada nenhuma porta no ficheiro de configuração." #: ../common/gsm-error.c:77 msgid "No connection type specified in the config file." msgstr "" "Não foi especificado nenhum tipo de conexão no ficheiro de configuração." #: ../common/gsm-error.c:78 #, fuzzy msgid "Device is locked and cannot be unlocked." msgstr "Dispositivo já bloqueado.\n" #: ../common/gsm-error.c:79 msgid "The actual response will be sent asynchronously." msgstr "" #: ../common/gsm-error.c:80 msgid "Unknown error." msgstr "Erro desconhecido." #: ../common/gsm-filetypes.c:599 #, c-format msgid "Sorry, gnokii was not compiled with XPM support.\n" msgstr "Lamento, o gnokii não foi compilado com suporte a XPM.\n" #: ../common/gsm-filetypes.c:642 #, c-format msgid "Bitmap too large\n" msgstr "Bitmap demasiado grande\n" #: ../common/gsm-filetypes.c:1519 #, fuzzy, c-format msgid "Formatting error: too many subentries\n" msgstr "Erro de formatação: conteudo da subentrada vazio\n" #: ../common/gsm-filetypes.c:1528 #, c-format msgid "Formatting error: unknown error while reading subentry type\n" msgstr "" "Erro de formatação: erro desconhecido enquanto lia um tipo de subentrada\n" #: ../common/gsm-filetypes.c:1532 #, c-format msgid "Formatting error: empty entry type\n" msgstr "Erro de formatação: tipo de entrada vazia\n" #: ../common/gsm-filetypes.c:1542 #, c-format msgid "Formatting error: subentry has only entry type field\n" msgstr "Erro de formatação: subentrada apenas tem campo de entrada\n" #: ../common/gsm-filetypes.c:1551 #, c-format msgid "Formatting error: unknown error while reading subentry number type\n" msgstr "" "Erro de formatação: erro desconhecido enquanto lia o tipo de número da " "subentrada\n" #: ../common/gsm-filetypes.c:1555 #, c-format msgid "Formatting error: empty number type\n" msgstr "Erro de formatação: tipo de número vazio\n" #: ../common/gsm-filetypes.c:1570 ../common/gsm-filetypes.c:1593 #, c-format msgid "Formatting error: subentry has only entry and number type fields\n" msgstr "Erro de formatação: subentrada só tem campos do tipo número\n" #: ../common/gsm-filetypes.c:1579 #, c-format msgid "Formatting error: unknown error while reading subentry id\n" msgstr "" "Erro de formatação: erro desconhecido enquanto lia o id da subentrada\n" #: ../common/gsm-filetypes.c:1583 #, c-format msgid "Formatting error: empty id\n" msgstr "Erro de formatação: id vazio\n" #: ../common/gsm-filetypes.c:1617 #, c-format msgid "Formatting error: unknown error while reading subentry contents\n" msgstr "" "Erro de formatação: erro desconhecido enquanto lia o conteudo da subentrada\n" #: ../common/gsm-filetypes.c:1621 #, c-format msgid "Formatting error: empty subentry contents\n" msgstr "Erro de formatação: conteudo da subentrada vazio\n" #. for now be compacrapatible ;) #: ../common/gsm-networks.c:1294 ../common/gsm-networks.c:1341 #: ../gnokii/gnokii-logo.c:254 ../gnokii/gnokii-logo.c:266 #: ../gnokii/gnokii-logo.c:281 ../gnokii/gnokii-logo.c:362 #: ../smsd/lowlevel.c:141 ../smsd/lowlevel.c:142 ../smsd/lowlevel.c:143 #: ../xgnokii/xgnokii_lowlevel.c:220 ../xgnokii/xgnokii_lowlevel.c:221 #: ../xgnokii/xgnokii_lowlevel.c:222 ../xgnokii/xgnokii_lowlevel.c:223 #: ../xgnokii/xgnokii_sms.c:262 ../xgnokii/xgnokii_sms.c:342 msgid "unknown" msgstr "desconhecido" #: ../common/gsm-networks.c:1304 ../common/gsm-networks.c:1318 #: ../common/gsm-networks.c:1355 ../gnokii/gnokii-monitor.c:256 #: ../gnokii/gnokii-other.c:205 msgid "undefined" msgstr "não definido" #: ../common/gsm-sms.c:299 msgid "Delivered" msgstr "Entregue" #: ../common/gsm-sms.c:312 msgid "Failed" msgstr "Falhou" #: ../common/gsm-sms.c:381 msgid "Pending" msgstr "Pendente" #: ../common/gsm-statemachine.c:390 msgid "" "UNHANDLED FRAME RECEIVED\n" "request: " msgstr "" #: ../common/gsm-statemachine.c:393 msgid "reply: " msgstr "resposta: " #: ../common/gsm-statemachine.c:396 ../common/phones/nokia.c:679 msgid "Please read Docs/Bugs and send a bug report!\n" msgstr "Por favor leia a documentação e envie-nos um bug report!\n" #: ../common/libfunctions.c:183 ../gnokiid/gnokiid.c:164 #, c-format msgid "Lock file error. Exiting.\n" msgstr "Erro de lock ao ficheiro. Saindo.\n" #: ../common/libfunctions.c:191 #, c-format msgid "" "Telephone interface init failed: %s\n" "Quitting.\n" msgstr "" #: ../common/links/atbus.c:69 msgid "gnokii I/O error" msgstr "erro de I/O do gnokii" #: ../common/links/atbus.c:85 msgid "Couldn't open ATBUS device" msgstr "Não foi possivel abrir o dispositivo ATBUS" #: ../common/links/cbus.c:284 msgid "Couldn't open CBUS device" msgstr "Não foi possivel abrir o dispositivo CBUS" #: ../common/links/fbus-3110.c:77 ../common/links/fbus.c:85 #: ../common/links/fbus.c:141 ../common/links/fbus.c:184 msgid "Couldn't open FBUS device" msgstr "Não foi possivel abrir o dispositivo FBUS" #: ../common/links/fbus-3110.c:258 #, c-format msgid "fb3110_tx_frame_send - message too long!\n" msgstr "fb3110_tx_frame_send - mensagem demasiado grande!\n" #: ../common/links/fbus-phonet.c:107 msgid "Couldn't open PHONET device" msgstr "Não foi possivel abrir o dispositivo PHONET" #: ../common/links/gnbus.c:305 msgid "Couldn't open GNBUS device" msgstr "Não foi possivel abrir o dispositivo GNBUS" #: ../common/links/m2bus.c:78 msgid "Couldn't open M2BUS device" msgstr "Não foi possivel abrir o dispositivo M2BUS" #: ../common/misc.c:466 #, c-format msgid "Cannot lock NULL device. Set port config parameter correctly.\n" msgstr "" #: ../common/misc.c:481 #, c-format msgid "Out of memory error while locking device.\n" msgstr "Erro de falta de memória enquanto bloqueava o dispositivo.\n" #: ../common/misc.c:510 #, c-format msgid "Lockfile %s is stale. Overriding it...\n" msgstr "" #: ../common/misc.c:513 #, c-format msgid "Overriding file %s failed, please check the permissions.\n" msgstr "" #: ../common/misc.c:514 ../common/misc.c:529 #, c-format msgid "Cannot lock device.\n" msgstr "Não é possivel bloquear o dispositivo.\n" #: ../common/misc.c:518 #, fuzzy, c-format msgid "Device already locked with %s.\n" msgstr "Dispositivo já bloqueado.\n" #: ../common/misc.c:527 #, c-format msgid "Unable to read lockfile %s.\n" msgstr "Não é possivel ler o lockfile %s.\n" #: ../common/misc.c:528 #, c-format msgid "Please check for reason and remove the lockfile by hand.\n" msgstr "Por favor verifique a causa e remova o lockfile à mão.\n" #: ../common/misc.c:538 #, c-format msgid "Device seems to be locked by unknown process.\n" msgstr "O dispositivo parece estar bloqueado por um processo desconhecido.\n" #: ../common/misc.c:540 #, c-format msgid "Please check permission on lock directory.\n" msgstr "Por favor verifique as permissões da directoria de lock.\n" #: ../common/misc.c:542 #, fuzzy, c-format msgid "Cannot create lockfile %s. Please check for existence of the path.\n" msgstr "" "Não é possivel criar lockfile %s. Por favor verifique se o caminho existe." #: ../common/misc.c:547 #, c-format msgid "Failed to write to the lockfile %s.\n" msgstr "Falha ao escrever no lockfile %s.\n" #: ../common/misc.c:572 #, fuzzy, c-format msgid "Cannot unlock device: %s\n" msgstr "Não é possivel desbloquear o dispositivo.\n" #: ../common/nokia-decoding.c:352 ../common/phones/nk6100.c:1010 #: ../xgnokii/xgnokii.c:222 ../xgnokii/xgnokii.c:1039 msgid "VIP" msgstr "" #: ../common/nokia-decoding.c:358 ../common/phones/nk6100.c:1016 #: ../xgnokii/xgnokii.c:224 ../xgnokii/xgnokii.c:1063 msgid "Colleagues" msgstr "Colegas" #: ../common/nokia-decoding.c:361 ../common/phones/nk6100.c:1019 #: ../xgnokii/xgnokii.c:225 ../xgnokii/xgnokii.c:1075 msgid "Other" msgstr "Outro" #. Set a default SMSC name because +CSCA doesn't provide one #. Set a default name #: ../common/phones/atgen.c:2075 ../common/phones/nk6100.c:1552 #: ../common/phones/nk6510.c:1951 ../common/phones/nk7110.c:1479 #: ../common/phones/pcsc.c:692 ../xgnokii/xgnokii.c:521 #: ../xgnokii/xgnokii_sms.c:832 #, c-format msgid "Set %d" msgstr "" #: ../common/phones/atgen.c:2692 #, c-format msgid "Withheld" msgstr "" #: ../common/phones/fake.c:95 #, c-format msgid "" "Apparently you didn't configure gnokii. Please do it prior to using it.\n" "You can get some clues from comments included in sample config file or give\n" "a try with gnokii-configure utility included in gnokii distribution.\n" msgstr "" #: ../common/phones/nk6100.c:2092 #, c-format msgid "Personal" msgstr "Pessoal" #: ../common/phones/nk6100.c:2095 ../common/phones/nk6100.c:2122 #, c-format msgid "Car" msgstr "Carro" #: ../common/phones/nk6100.c:2098 ../common/phones/nk6100.c:2125 #, c-format msgid "Headset" msgstr "" #: ../common/phones/nk6100.c:2101 ../common/phones/nk6100.c:2128 #, c-format msgid "Unknown (%d)" msgstr "Desconhecido (%d)" #: ../common/phones/nk6100.c:2107 ../xgnokii/xgnokii_contacts.c:701 #: ../xgnokii/xgnokii_contacts.c:791 ../xgnokii/xgnokii_contacts.c:938 #: ../xgnokii/xgnokii_contacts.c:980 ../xgnokii/xgnokii_contacts.c:1021 #: ../xgnokii/xgnokii_contacts.c:1094 ../xgnokii/xgnokii_contacts.c:1186 #, c-format msgid "General" msgstr "Geral" #: ../common/phones/nk6100.c:2110 #, c-format msgid "Silent" msgstr "Silêncio" #: ../common/phones/nk6100.c:2116 #, c-format msgid "Outdoor" msgstr "" #: ../common/phones/nk6100.c:2119 #, c-format msgid "Pager" msgstr "" #: ../common/phones/nk6510.c:1811 #, c-format msgid "" "6510 series phones seem to be quite sensitive to malformed SMS messages\n" "It may have to be sent to Nokia Service if something fails!\n" "Do you really want to continue? " msgstr "" #: ../common/phones/nk6510.c:1814 #, c-format msgid "(yes/no) " msgstr "(sim/não) " #: ../common/phones/nk6510.c:1816 ../gnokii/gnokii-phonebook.c:421 #: ../gnokii/gnokii-sms.c:542 ../gnokii/gnokii-sms.c:833 #: ../gnokii/gnokii-utils.c:63 ../gnokii/gnokii-wap.c:223 msgid "yes" msgstr "sim" #: ../common/phones/nk6510.c:2361 ../common/phones/nk6510.c:2426 #, fuzzy, c-format msgid "Progress: %3d%% completed" msgstr "Progresso: %d%% completo\n" #: ../common/phones/nokia.c:338 msgid "Tried to activate CONTACT SERVICE\n" msgstr "Tentei activar o CONTACT SERVICE\n" #: ../common/phones/nokia.c:667 msgid "" "NOKIA RAW RINGTONE DECODING FAILED\n" "ringtone:\n" msgstr "" #: ../common/phones/nokia.c:678 #, c-format msgid "offset: %04x\n" msgstr "" #: ../common/phones/pcsc.c:593 #, c-format msgid "Phase %s SIM" msgstr "" #: ../common/vcal.lx:161 #, c-format msgid "Error: Invalid calendar note number!\n" msgstr "Erro: número da nota de calendário inválida!\n" #. translators: %s are replaced by function names #: ../common/vcal.lx:282 ../common/vcal.lx:344 #, c-format msgid "Function %s() is deprecated. Use %s() instead.\n" msgstr "" #: ../common/vcal.lx:285 ../common/vcal.lx:347 ../gnokii/gnokii-calendar.c:256 #: ../gnokii/gnokii-file.c:437 ../gnokii/gnokii-todo.c:162 ../smsd/file.c:185 #: ../xgnokii/xgnokii_contacts.c:2700 ../xgnokii/xgnokii_dtmf.c:93 #: ../xgnokii/xgnokii_logos.c:1372 ../xgnokii/xgnokii_speed.c:324 #, c-format msgid "Can't open file %s for reading!\n" msgstr "Não é possivel abrir o ficheiro %s para leitura!\n" #: ../common/vcal.lx:294 ../common/vcal.lx:356 #, c-format msgid "Error parsing vCalendar file!\n" msgstr "" #: ../getopt/getopt.c:566 ../getopt/getopt.c:582 #, c-format msgid "%s: option '%s' is ambiguous\n" msgstr "" #: ../getopt/getopt.c:615 ../getopt/getopt.c:619 #, c-format msgid "%s: option '--%s' doesn't allow an argument\n" msgstr "" #: ../getopt/getopt.c:628 ../getopt/getopt.c:633 #, c-format msgid "%s: option '%c%s' doesn't allow an argument\n" msgstr "" #: ../getopt/getopt.c:676 ../getopt/getopt.c:695 ../getopt/getopt.c:998 #: ../getopt/getopt.c:1017 #, c-format msgid "%s: option '%s' requires an argument\n" msgstr "" #: ../getopt/getopt.c:733 ../getopt/getopt.c:736 #, c-format msgid "%s: unrecognized option '--%s'\n" msgstr "" #: ../getopt/getopt.c:744 ../getopt/getopt.c:747 #, c-format msgid "%s: unrecognized option '%c%s'\n" msgstr "" #: ../getopt/getopt.c:796 ../getopt/getopt.c:799 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "" #: ../getopt/getopt.c:849 ../getopt/getopt.c:866 ../getopt/getopt.c:1069 #: ../getopt/getopt.c:1087 #, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "" #: ../getopt/getopt.c:919 ../getopt/getopt.c:935 #, c-format msgid "%s: option '-W %s' is ambiguous\n" msgstr "" #: ../getopt/getopt.c:959 ../getopt/getopt.c:977 #, c-format msgid "%s: option '-W %s' doesn't allow an argument\n" msgstr "" #: ../gnokiid/gnokiid.c:65 #, c-format msgid "GNOKIID Version %s\n" msgstr "" #: ../gnokiid/gnokiid.c:70 #, c-format msgid "" "Copyright (C) Hugh Blemings , 1999\n" "Copyright (C) Pavel Janik ml. , 1999\n" "Built %s %s\n" msgstr "" #: ../gnokiid/gnokiid.c:81 #, c-format msgid "" " usage: gnokiid [--help|--version|--debug]\n" " --help display usage information\n" " --version displays version and copyright information\n" " --debug uses stdin/stdout for virtual modem comms\n" msgstr "" #: ../gnokiid/gnokiid.c:149 #, c-format msgid "" "gnokiid purpose is to work only with the phones that do not have AT Hayes\n" "commands interpreter.\n" msgstr "" #: ../gnokii/gnokii.c:203 #, c-format msgid "GNOKII Version %s\n" msgstr "" #: ../gnokii/gnokii.c:210 #, c-format msgid "" "Copyright (C) Hugh Blemings , 1999, 2000\n" "Copyright (C) Pavel Janik ml. , 1999, 2000\n" "Copyright (C) Pavel Machek , 2001\n" "Copyright (C) Pawel Kot , 2001-2011\n" "Copyright (C) BORBELY Zoltan , 2002\n" "Copyright (C) Daniele Forsi , 2004-2011\n" "gnokii is free software, covered by the GNU General Public License, and you " "are\n" "welcome to change it and/or distribute copies of it under certain " "conditions.\n" "There is absolutely no warranty for gnokii. See GPL for details.\n" "Built %s %s\n" msgstr "" #: ../gnokii/gnokii.c:238 #, c-format msgid "" "Usage:\n" "\tgnokii [CONFIG OPTIONS] OPTIONS\n" "\n" "CONFIG OPTIONS\n" "\t\t--config filename\n" "\t\t--phone phone_section\n" "\n" "OPTIONS\n" "Use just one option at a time.\n" "General options:\n" " --help [all] [monitor] [sms] [mms] [phonebook] [calendar] [todo]\n" " [dial] [profile] [settings] [wap] [logo] [ringtone]\n" " [security] [file] [other]\n" " --version\n" " --shell\n" msgstr "" #: ../gnokii/gnokii.c:359 #, c-format msgid "Cannot open logfile %s\n" msgstr "" #: ../gnokii/gnokii.c:392 #, c-format msgid "File: %s\n" msgstr "" #: ../gnokii/gnokii.c:394 #, c-format msgid "Phone section: [phone_%s]\n" msgstr "" #: ../gnokii/gnokii.c:403 #, c-format msgid "WARNING: cannot open logfile, logs will be directed to stderr\n" msgstr "" #: ../gnokii/gnokii.c:819 #, c-format msgid "Use '%s --help' for usage information.\n" msgstr "" #: ../gnokii/gnokii.c:821 #, c-format msgid "Use '--help' for usage information.\n" msgstr "" #: ../gnokii/gnokii.c:1142 #, c-format msgid "Unknown option: %d\n" msgstr "" #: ../gnokii/gnokii.c:1206 #, c-format msgid "" "gnokii needs to be compiled with readline support to enable this option.\n" msgstr "" #: ../gnokii/gnokii-calendar.c:56 #, c-format msgid "" "Calendar options:\n" " --getcalendarnote start_number [end_number|end] [-v|--vCal]\n" " --writecalendarnote vcalendarfile start_number [end_number|end]\n" " --deletecalendarnote start [end_number|end]\n" msgstr "" #: ../gnokii/gnokii-calendar.c:65 #, c-format msgid "" "usage: --getcalendarnote start_number [end_number | end] [-v|--vCal]\n" " start_number - entry number in the phone calendar " "(numeric)\n" " end_number - read to this entry in the phone " "calendar (numeric, optional)\n" " end - the string \"end\" indicates all " "entries from start to end\n" " -v - output in iCalendar format\n" " NOTE: if no end is given, only the start entry is read\n" msgstr "" #. Plain text output #. Translators: this is the header of a calendar note. Example: 1 (1). Type: Meeting #: ../gnokii/gnokii-calendar.c:130 #, fuzzy, c-format msgid "%d (%d). %s: %s\n" msgstr "%d (%d). Tipo: " #: ../gnokii/gnokii-calendar.c:130 ../xgnokii/xgnokii_calendar.c:1536 msgid "Type" msgstr "" #: ../gnokii/gnokii-calendar.c:132 #, c-format msgid " Start date: %d-%02d-%02d\n" msgstr " Data de inicio: %d-%02d-%02d\n" #: ../gnokii/gnokii-calendar.c:137 #, c-format msgid " Start time: %02d:%02d:%02d\n" msgstr " Hora de inicio: %02d:%02d:%02d\n" #: ../gnokii/gnokii-calendar.c:142 #, c-format msgid " End date: %d-%02d-%02d\n" msgstr " Data de fim: %d-%02d-%02d\n" #: ../gnokii/gnokii-calendar.c:146 #, c-format msgid " End time: %02d:%02d:%02d\n" msgstr " Hora de fim: %02d:%02d:%02d\n" #: ../gnokii/gnokii-calendar.c:154 #, c-format msgid " Alarm date: %02d-%02d\n" msgstr " Data do Alarme: %02d-%02d\n" #: ../gnokii/gnokii-calendar.c:158 #, c-format msgid " Alarm date: %d-%02d-%02d\n" msgstr " Data do alarme: %d-%02d-%02d\n" #: ../gnokii/gnokii-calendar.c:163 #, c-format msgid " Alarm time: %02d:%02d:%02d\n" msgstr " Hora do alarme: %02d:%02d:%02d\n" #: ../gnokii/gnokii-calendar.c:167 #, c-format msgid " Alarm tone %s\n" msgstr " Tom do alarme %s\n" #: ../gnokii/gnokii-calendar.c:168 ../xgnokii/xgnokii_calendar.c:214 #: ../xgnokii/xgnokii_calendar.c:220 msgid "enabled" msgstr "ligado" #: ../gnokii/gnokii-calendar.c:168 ../xgnokii/xgnokii_calendar.c:214 #: ../xgnokii/xgnokii_calendar.c:220 msgid "disabled" msgstr "desligado" #: ../gnokii/gnokii-calendar.c:171 #, c-format msgid " %s: " msgstr "" #: ../gnokii/gnokii-calendar.c:171 msgid "Repeat" msgstr "" #: ../gnokii/gnokii-calendar.c:182 #, c-format msgid "Every %d hours" msgstr "" #: ../gnokii/gnokii-calendar.c:187 #, c-format msgid " The event will be repeated " msgstr " O evento será repetido." #: ../gnokii/gnokii-calendar.c:190 #, c-format msgid "forever." msgstr "para sempre." #: ../gnokii/gnokii-calendar.c:193 #, c-format msgid "%d times." msgstr "%d vezes" #: ../gnokii/gnokii-calendar.c:199 #, c-format msgid " Text: %s\n" msgstr " Texto: %s\n" #: ../gnokii/gnokii-calendar.c:203 ../gnokii/gnokii-calendar.c:206 #: ../gnokii/gnokii-wap.c:226 ../gnokii/gnokii-wap.c:227 #: ../gnokii/gnokii-wap.c:228 ../gnokii/gnokii-wap.c:229 #: ../gnokii/gnokii-wap.c:230 ../gnokii/gnokii-wap.c:231 #: ../gnokii/gnokii-wap.c:232 ../gnokii/gnokii-wap.c:233 #: ../gnokii/gnokii-wap.c:235 ../gnokii/gnokii-wap.c:236 #: ../gnokii/gnokii-wap.c:237 ../gnokii/gnokii-wap.c:238 #: ../gnokii/gnokii-wap.c:239 ../gnokii/gnokii-wap.c:240 #: ../gnokii/gnokii-wap.c:241 ../gnokii/gnokii-wap.c:243 #: ../gnokii/gnokii-wap.c:244 #, fuzzy, c-format msgid " %s: %s\n" msgstr " Texto: %s\n" #: ../gnokii/gnokii-calendar.c:203 ../xgnokii/xgnokii.c:1709 msgid "Phone" msgstr "" #: ../gnokii/gnokii-calendar.c:226 #, c-format msgid "The calendar note can not be read: %s\n" msgstr "A nota do calendário não pôde ser lida: %s\n" #: ../gnokii/gnokii-calendar.c:236 #, c-format msgid "" "usage: --writecalendarnote vcalendarfile start_number [end_number|end]\n" " vcalendarfile - file containing calendar notes in " "vCal format\n" " start_number - first calendar note from " "vcalendarfile to read\n" " end_number - last calendar note from " "vcalendarfile to read\n" " end - read all notes from vcalendarfile " "from start_number\n" " NOTE: it stores the note at the first empty location.\n" msgstr "" #: ../gnokii/gnokii-calendar.c:300 ../gnokii/gnokii-todo.c:206 #, c-format msgid "Failed to load vCalendar file: %s\n" msgstr "Falhou ao carregar o ficheiro vCalendar: %s\n" #: ../gnokii/gnokii-calendar.c:309 ../gnokii/gnokii-dial.c:143 #: ../gnokii/gnokii-todo.c:215 #, c-format msgid "Successfully written!\n" msgstr "Escrito com sucesso!\n" #: ../gnokii/gnokii-calendar.c:311 #, c-format msgid "Failed to write calendar note: %s\n" msgstr "Falhou ao escrever a nota do calendário: %s\n" #: ../gnokii/gnokii-calendar.c:320 #, c-format msgid "" "usage: --deletecalendarnote start_number [end_number | end]\n" " start_number - first number in the phone calendar " "(numeric)\n" " end_number - until this entry in the phone " "calendar (numeric, optional)\n" " end - the string \"end\" indicates all " "entries from start to end\n" " NOTE: if no end is given, only the start entry is deleted\n" msgstr "" #: ../gnokii/gnokii-calendar.c:355 #, c-format msgid "Calendar note deleted.\n" msgstr "Nota do calendário apagada.\n" #: ../gnokii/gnokii-calendar.c:357 #, c-format msgid "The calendar note cannot be deleted: %s\n" msgstr "Não é possivel apagar a nota do calendário: %s\n" #: ../gnokii/gnokii-dial.c:52 #, c-format msgid "" "Dialling and call options:\n" " --getspeeddial location\n" " --setspeeddial number memory_type location\n" " --dialvoice number\n" " --senddtmf string\n" " --answercall callid\n" " --hangup callid\n" " --divert {--op|-o} {register|enable|query|disable|erasure}\n" " {--type|-t} {all|busy|noans|outofreach|notavail}\n" " {--call|-c} {all|voice|fax|data}\n" " [{--timeout|-m} time_in_seconds]\n" " [{--number|-n} number]\n" "All number, location and callid options need to be numeric.\n" msgstr "" #: ../gnokii/gnokii-dial.c:70 #, c-format msgid "" "usage: --getspeeddial location\n" " location - location in the speed dial memory\n" msgstr "" #: ../gnokii/gnokii-dial.c:93 #, c-format msgid "SpeedDial nr. %d %s %d\n" msgstr "" #: ../gnokii/gnokii-dial.c:96 ../gnokii/gnokii-dial.c:146 #: ../gnokii/gnokii-dial.c:186 ../gnokii/gnokii-dial.c:217 #: ../gnokii/gnokii-dial.c:248 ../gnokii/gnokii-dial.c:381 #: ../gnokii/gnokii-logo.c:298 ../gnokii/gnokii-logo.c:469 #: ../gnokii/gnokii-monitor.c:454 ../gnokii/gnokii-monitor.c:457 #: ../gnokii/gnokii-monitor.c:480 ../gnokii/gnokii-other.c:190 #: ../gnokii/gnokii-phonebook.c:256 ../gnokii/gnokii-profile.c:112 #: ../gnokii/gnokii-profile.c:162 ../gnokii/gnokii-security.c:95 #: ../gnokii/gnokii-security.c:127 ../gnokii/gnokii-security.c:205 #: ../gnokii/gnokii-security.c:247 ../gnokii/gnokii-security.c:298 #: ../gnokii/gnokii-settings.c:122 ../gnokii/gnokii-settings.c:146 #: ../gnokii/gnokii-settings.c:180 ../gnokii/gnokii-settings.c:204 #: ../gnokii/gnokii-sms.c:552 ../gnokii/gnokii-sms.c:1048 #: ../gnokii/gnokii-sms.c:1126 ../gnokii/gnokii-sms.c:1156 #: ../gnokii/gnokii-sms.c:1189 ../gnokii/gnokii-sms.c:1329 #: ../gnokii/gnokii-sms.c:1331 ../gnokii/gnokii-wap.c:94 #: ../gnokii/gnokii-wap.c:129 ../gnokii/gnokii-wap.c:162 #: ../gnokii/gnokii-wap.c:248 ../gnokii/gnokii-wap.c:323 #: ../smsd/lowlevel.c:112 ../smsd/lowlevel.c:125 ../smsd/mysql.c:77 #: ../smsd/mysql.c:134 ../smsd/mysql.c:171 ../smsd/mysql.c:189 #: ../smsd/mysql.c:199 ../smsd/mysql.c:225 ../smsd/mysql.c:263 #: ../smsd/mysql.c:296 ../smsd/mysql.c:336 ../smsd/mysql.c:345 #: ../smsd/mysql.c:399 ../smsd/pq.c:68 ../smsd/pq.c:77 ../smsd/pq.c:121 #: ../smsd/pq.c:150 ../smsd/pq.c:190 ../smsd/pq.c:212 ../smsd/pq.c:241 #: ../smsd/pq.c:258 ../smsd/pq.c:296 ../smsd/pq.c:333 ../smsd/pq.c:376 #: ../smsd/pq.c:427 ../smsd/sqlite.c:58 ../smsd/sqlite.c:70 #: ../smsd/sqlite.c:240 #, c-format msgid "Error: %s\n" msgstr "Erro: %s\n" #: ../gnokii/gnokii-dial.c:105 #, c-format msgid "" "usage: --setspeeddial number memory_type location\n" " number - phone number to be stored\n" " memory_type - memory type for the speed dial\n" " location - location in the speed dial memory\n" msgstr "" #: ../gnokii/gnokii-dial.c:128 ../gnokii/gnokii-phonebook.c:111 #: ../gnokii/gnokii-phonebook.c:487 #, c-format msgid "Unknown memory type %s (use ME, SM, ...)!\n" msgstr "Tipo de memória desconhecido %s (use ME, SM, ...)!\n" #: ../gnokii/gnokii-dial.c:169 #, c-format msgid "Dialing failed: %s\n" msgstr "Falhou a discagem: %s\n" #: ../gnokii/gnokii-dial.c:171 #, c-format msgid "Dialled call, id: %d (lowlevel id: %d)\n" msgstr "Chamada discada, id: %d (lowlevel id: %d)\n" #: ../gnokii/gnokii-dial.c:194 #, c-format msgid "" "usage: --answercall callid\n" " callid - call identifier\n" msgstr "" #: ../gnokii/gnokii-dial.c:225 #, c-format msgid "" "usage: --hangup callid\n" " callid - call identifier\n" msgstr "" #: ../gnokii/gnokii-dial.c:256 #, c-format msgid "" " usage: --divert\n" " -o operation\n" " --op operation operation to be executed, needs to be one\n" " of the following: register, enable, query,\n" " disable, erasure; this is required option\n" " -t type\n" " --type type type of the operation, needs to be one of\n" " the following: all, busy, noans, outofreach,\n" " notavail, unconditional; this is required " "option\n" " -c calltype\n" " --call calltype type of call for the operation, needs to be\n" " one of the following: all, voice, fax, data;\n" " this is optional\n" " -m sec\n" " --timeout sec timeout to be set; the value is in seconds\n" " -n msisdn\n" " --number msisdn number for redirection\n" "\n" msgstr "" #: ../gnokii/gnokii-dial.c:373 ../gnokii/gnokii-dial.c:374 #: ../gnokii/gnokii-dial.c:376 ../gnokii/gnokii-phonebook.c:199 #: ../gnokii/gnokii-phonebook.c:203 ../gnokii/gnokii-todo.c:119 #: ../gnokii/gnokii-todo.c:120 ../gnokii/gnokii-wap.c:89 #: ../gnokii/gnokii-wap.c:90 ../gnokii/gnokii-wap.c:220 #: ../gnokii/gnokii-wap.c:221 ../gnokii/gnokii-wap.c:222 #: ../gnokii/gnokii-wap.c:223 ../gnokii/gnokii-wap.c:224 #, fuzzy, c-format msgid "%s: %s\n" msgstr "Assumindo: %s\n" #: ../gnokii/gnokii-dial.c:373 #, fuzzy msgid "Divert type" msgstr "Entregue" #: ../gnokii/gnokii-dial.c:374 #, fuzzy msgid "Call type" msgstr "Tipo de chamada: " #: ../gnokii/gnokii-dial.c:377 #, fuzzy, c-format msgid "%s: %d\n" msgstr "Assumindo: %d\n" #: ../gnokii/gnokii-dial.c:377 msgid "Timeout" msgstr "" #: ../gnokii/gnokii-dial.c:379 #, c-format msgid "Divert isn't active.\n" msgstr "" #: ../gnokii/gnokii-file.c:53 #, c-format msgid "" "File options:\n" " --getfilelist remote_path\n" " --getfiledetailsbyid [id]\n" " --getfileid remote_filename\n" " --getfile remote_filename [local_filename]\n" " --getfilebyid id [local_filename]\n" " --getallfiles remote_path\n" " --putfile local_filename remote_filename\n" " --deletefile remote_filename\n" " --deletefilebyid id\n" msgstr "" #: ../gnokii/gnokii-file.c:98 ../gnokii/gnokii-file.c:192 #: ../gnokii/gnokii-file.c:377 #, c-format msgid "Failed to get info for %s: %s\n" msgstr "Falhou ao obter a informação para %s: %s\n" #: ../gnokii/gnokii-file.c:100 #, c-format msgid "Filelist for path %s:\n" msgstr "Lista de ficheiros para o caminho %s:\n" #: ../gnokii/gnokii-file.c:102 #, c-format msgid " %s\n" msgstr "" #: ../gnokii/gnokii-file.c:135 ../gnokii/gnokii-file.c:170 #, c-format msgid "Failed to get filename: %s\n" msgstr "" #: ../gnokii/gnokii-file.c:142 #, c-format msgid "| %s (%d)\n" msgstr "" #: ../gnokii/gnokii-file.c:167 #, c-format msgid " - %s (%d)\n" msgstr "" #: ../gnokii/gnokii-file.c:194 #, c-format msgid "Fileid for file %s is %02x %02x %02x %02x %02x %02x\n" msgstr "Identificação para o ficheiro %s é %02x %02x %02x %02x %02x %02x\n" #: ../gnokii/gnokii-file.c:212 ../gnokii/gnokii-file.c:232 #, c-format msgid "Failed to delete %s: %s\n" msgstr "Falhou ao apagar %s: %s\n" #: ../gnokii/gnokii-file.c:214 ../gnokii/gnokii-file.c:234 #, c-format msgid "Deleted: %s\n" msgstr "Apagou: %s\n" #: ../gnokii/gnokii-file.c:241 #, c-format msgid " usage: --getfile remote_filename [localfilename]\n" msgstr " modo de uso: --getfile remote_filename [localfilename]\n" #: ../gnokii/gnokii-file.c:266 ../gnokii/gnokii-file.c:391 #, c-format msgid "Failed to get file %s: %s\n" msgstr "Falhou ao puxar o ficheiro %s: %s\n" #: ../gnokii/gnokii-file.c:275 #, c-format msgid "Got file %s. Save to [%s]: " msgstr "Tenho o ficheiro %s. Salvar para [%s]: " #: ../gnokii/gnokii-file.c:290 ../gnokii/gnokii-file.c:345 #: ../gnokii/gnokii-file.c:396 ../gnokii/gnokii-logo.c:198 #: ../gnokii/gnokii-utils.c:93 ../gnokii/gnokii-utils.c:118 #: ../xgnokii/xgnokii_contacts.c:2620 ../xgnokii/xgnokii_dtmf.c:135 #: ../xgnokii/xgnokii_speed.c:417 #, c-format msgid "Can't open file %s for writing!\n" msgstr "Não é possivel abrir o ficheiro %s para escrita!\n" #: ../gnokii/gnokii-file.c:294 ../gnokii/gnokii-file.c:349 #: ../gnokii/gnokii-file.c:400 #, fuzzy, c-format msgid "Failed to write to file %s.\n" msgstr "Falhou ao escrever para o ficheiro %s.\n" #: ../gnokii/gnokii-file.c:305 #, c-format msgid " usage: --getfilebyid id [localfilename]\n" msgstr " modo de uso: --getfilebyid id [localfilename]\n" #: ../gnokii/gnokii-file.c:332 #, c-format msgid "Failed to get file: %s\n" msgstr "Falhou ao puxar o ficheiro: %s\n" #: ../gnokii/gnokii-file.c:393 #, c-format msgid "Got file %s.\n" msgstr "Puxei o ficheiro %s.\n" #: ../gnokii/gnokii-file.c:415 #, c-format msgid " usage: --putfile local_filename remote_filename\n" msgstr " modo de uso: --putfile local_filename remote_filename\n" #: ../gnokii/gnokii-file.c:444 #, c-format msgid "File %s corrupted!\n" msgstr "" #: ../gnokii/gnokii-file.c:449 #, c-format msgid "Failed to put file to %s: %s\n" msgstr "Falhou ao colocar o ficheiro em %s: %s\n" #: ../gnokii/gnokii-logo.c:56 #, c-format msgid "" "Logo options:\n" " --sendlogo {caller|op|picture} destination logofile\n" " [network_code]\n" " --setlogo op [logofile [network_code]]\n" " --setlogo startup [logofile]\n" " --setlogo caller [logofile [caller_group_number [group_name]]]\n" " --setlogo {dealer|text} [text]\n" " --getlogo op [logofile [network_code]]\n" " --getlogo startup [logofile [network_code]]\n" " --getlogo caller [caller_group_number [logofile\n" " [network_code]]]\n" " --getlogo {dealer|text}\n" " --viewlogo logofile\n" msgstr "" #: ../gnokii/gnokii-logo.c:97 #, c-format msgid "Sending operator logo.\n" msgstr "A enviar o logotipo do operador.\n" #: ../gnokii/gnokii-logo.c:98 #, c-format msgid "Sending caller line identification logo.\n" msgstr "A enviar o logotipo da linha de chamada.\n" #: ../gnokii/gnokii-logo.c:99 #, c-format msgid "Sending Multipart Message: Picture Message.\n" msgstr "A enviar mensagem Multipart: Picture Message.\n" #: ../gnokii/gnokii-logo.c:100 #, c-format msgid "Sending EMS-compliant Picture Message.\n" msgstr "A enviar mensagem EMS-compliant Picture.\n" #: ../gnokii/gnokii-logo.c:101 #, c-format msgid "Sending EMS-compliant Animation.\n" msgstr "A enviar animação EMS-compliant.\n" #: ../gnokii/gnokii-logo.c:102 #, c-format msgid "You should specify what kind of logo to send!\n" msgstr "Especifique o tipo de logotipo que deseja enviar!\n" #: ../gnokii/gnokii-logo.c:118 #, c-format msgid "Cannot send logo: specified and loaded bitmap type differ!\n" msgstr "" "Não é possivel enviar o logotipo: type de bitmap especificado e carregado " "diferente!\n" #: ../gnokii/gnokii-logo.c:156 ../gnokii/gnokii-ringtone.c:148 #: ../gnokii/gnokii-sms.c:352 #, c-format msgid "Message sent in %d parts with reference numbers:" msgstr "" #: ../gnokii/gnokii-logo.c:161 ../gnokii/gnokii-ringtone.c:153 #: ../gnokii/gnokii-sms.c:357 #, fuzzy, c-format msgid "Send succeeded with reference %d!\n" msgstr "Envio com sucesso!\n" #: ../gnokii/gnokii-logo.c:163 ../gnokii/gnokii-ringtone.c:155 #: ../gnokii/gnokii-sms.c:359 #, c-format msgid "SMS Send failed (%s)\n" msgstr "Envio de SMS falhou (%s)\n" #: ../gnokii/gnokii-logo.c:180 #, c-format msgid "Saving logo. File \"%s\" exists. (O)verwrite, create (n)ew or (s)kip ? " msgstr "" "A gravar o logotipo. O ficheiro \"%s\" já existe. s(U)bstituir, criar (n)ovo " "ou (s)altar ? " #: ../gnokii/gnokii-logo.c:182 msgid "O" msgstr "U" #: ../gnokii/gnokii-logo.c:182 msgid "o" msgstr "u" #: ../gnokii/gnokii-logo.c:183 msgid "N" msgstr "N" #: ../gnokii/gnokii-logo.c:183 msgid "n" msgstr "n" #: ../gnokii/gnokii-logo.c:184 msgid "S" msgstr "S" #: ../gnokii/gnokii-logo.c:184 msgid "s" msgstr "s" #: ../gnokii/gnokii-logo.c:188 #, c-format msgid "Enter name of new file: " msgstr "Introduza o nome do novo ficheiro: " #: ../gnokii/gnokii-logo.c:233 #, c-format msgid "Dealer welcome note " msgstr "Nota de boas vindas " #: ../gnokii/gnokii-logo.c:235 ../gnokii/gnokii-logo.c:242 #, c-format msgid "currently set to \"%s\"\n" msgstr "" #: ../gnokii/gnokii-logo.c:237 ../gnokii/gnokii-logo.c:244 #, c-format msgid "currently empty\n" msgstr "De momento vazio\n" #: ../gnokii/gnokii-logo.c:240 #, c-format msgid "Welcome note " msgstr "Nota de boas vindas " #: ../gnokii/gnokii-logo.c:250 #, c-format msgid "Operator logo for %s (%s) network got successfully\n" msgstr "Logotipo do Operador para a rede %s (%s) puxado com sucesso\n" #: ../gnokii/gnokii-logo.c:255 ../gnokii/gnokii-logo.c:267 #: ../gnokii/gnokii-logo.c:282 ../gnokii/gnokii-logo.c:363 #, c-format msgid "Sorry, gnokii doesn't know %s network !\n" msgstr "Lamento, o gnokii não conhece a rede %s !\n" #: ../gnokii/gnokii-logo.c:263 #, c-format msgid "Startup logo got successfully\n" msgstr "Logotipo de arranque puxado com sucesso\n" #: ../gnokii/gnokii-logo.c:274 ../gnokii/gnokii-logo.c:291 #, c-format msgid "Your phone doesn't have logo uploaded !\n" msgstr "" #: ../gnokii/gnokii-logo.c:276 #, c-format msgid "Caller logo got successfully\n" msgstr "" #: ../gnokii/gnokii-logo.c:277 #, c-format msgid "Caller group name: %s, ringing tone: %s (%d)\n" msgstr "" #: ../gnokii/gnokii-logo.c:288 #, c-format msgid "Unknown bitmap type.\n" msgstr "Tipo de bitmap desconhecido.\n" #: ../gnokii/gnokii-logo.c:302 #, c-format msgid "What kind of logo do you want to get ?\n" msgstr "" #: ../gnokii/gnokii-logo.c:320 #, c-format msgid "Error while reading file \"%s\": %s\n" msgstr "" #: ../gnokii/gnokii-logo.c:398 #, c-format msgid "What kind of logo do you want to set ?\n" msgstr "" #: ../gnokii/gnokii-logo.c:434 #, c-format msgid "Error setting dealer welcome note - " msgstr "" #: ../gnokii/gnokii-logo.c:436 #, c-format msgid "Error setting welcome note - " msgstr "" #: ../gnokii/gnokii-logo.c:440 #, c-format msgid "SIM card and PIN is required\n" msgstr "" #: ../gnokii/gnokii-logo.c:447 #, c-format msgid "too long, truncated to \"%s\" (length %zi)\n" msgstr "" #: ../gnokii/gnokii-logo.c:455 #, c-format msgid "Error setting startup logo - SIM card and PIN is required\n" msgstr "" #: ../gnokii/gnokii-logo.c:456 #, c-format msgid "i: %i, %2x %2x\n" msgstr "" #: ../gnokii/gnokii-logo.c:466 #, c-format msgid "Done.\n" msgstr "" #: ../gnokii/gnokii-logo.c:481 #, c-format msgid "Could not load bitmap: %s\n" msgstr "" #: ../gnokii/gnokii-mms.c:46 #, c-format msgid "" "MMS options:\n" " --getmms memory_type start [end] [{--mime|--pdu|--raw} file]\n" " [-d|--delete] [-o|--overwrite]\n" " --deletemms memory_type start [end]\n" msgstr "" #: ../gnokii/gnokii-mms.c:56 #, c-format msgid "" " usage: --getmms memory start [end] retrieves messages from memory type " "(SM, ME,\n" " IN, OU, ...) starting from\n" " location start and ending with end;\n" " if end option is omitted, just one " "entry\n" " is read;\n" " start must be a number, end may be a " "number\n" " or 'end' string;\n" " if 'end' is used entries are being read\n" " until empty location\n" " --mime filename convert MMS in MIME format and save it " "to\n" " the given file;\n" " --pdu filename extract MMS from raw format and save it " "to\n" " the given file;\n" " --raw filename get MMS from phone and save it unchanged " "to\n" " the given file;\n" " --delete\n" " -d delete MMS after reading\n" " --overwrite\n" " -o overwrite destination file without " "asking\n" "\n" msgstr "" #: ../gnokii/gnokii-mms.c:82 ../gnokii/gnokii-sms.c:749 #, c-format msgid "%d. %s (%s)\n" msgstr "" #: ../gnokii/gnokii-mms.c:82 msgid "MMS" msgstr "" #: ../gnokii/gnokii-mms.c:113 ../gnokii/gnokii-mms.c:201 #: ../gnokii/gnokii-mms.c:243 ../gnokii/gnokii-sms.c:486 #: ../gnokii/gnokii-sms.c:658 ../gnokii/gnokii-sms.c:884 #: ../gnokii/gnokii-sms.c:936 #, c-format msgid "Unknown memory type %s (use ME, SM, IN, OU, ...)!\n" msgstr "" #: ../gnokii/gnokii-mms.c:114 ../gnokii/gnokii-mms.c:202 #: ../gnokii/gnokii-mms.c:244 ../gnokii/gnokii-sms.c:487 #: ../gnokii/gnokii-sms.c:659 ../gnokii/gnokii-sms.c:885 #: ../gnokii/gnokii-sms.c:937 #, c-format msgid "" "Run gnokii --showsmsfolderstatus for a list of supported memory types.\n" msgstr "" #: ../gnokii/gnokii-mms.c:150 ../gnokii/gnokii-sms.c:715 #, c-format msgid "Saving into %s\n" msgstr "" #: ../gnokii/gnokii-mms.c:187 ../gnokii/gnokii-sms.c:876 #, c-format msgid "(delete failed)\n" msgstr "" #: ../gnokii/gnokii-mms.c:189 ../gnokii/gnokii-sms.c:878 #, c-format msgid "(message deleted)\n" msgstr "" #: ../gnokii/gnokii-mms.c:199 #, c-format msgid "Getting MMS failed (location %d from memory %s)! (%s)\n" msgstr "" #: ../gnokii/gnokii-mms.c:219 #, c-format msgid "" " usage: --deletemms memory start [end] deletes messages from memory type\n" " (SM, ME, IN, OU, ...) starting\n" " from location start and ending with " "end;\n" " if end option is omitted, just one " "entry\n" " is removed;\n" " if 'end' is used entries are being " "removed\n" " until empty location\n" "\n" msgstr "" #: ../gnokii/gnokii-mms.c:262 #, c-format msgid "Deleted MMS (location %d from memory %s)\n" msgstr "" #: ../gnokii/gnokii-mms.c:266 #, c-format msgid "Deleting MMS failed (location %d from memory %s)! (%s)\n" msgstr "" #: ../gnokii/gnokii-monitor.c:67 #, c-format msgid "" "Monitoring options:\n" " --monitor [delay|once]\n" " --getdisplaystatus\n" " --displayoutput\n" " --netmonitor {reset|off|field|devel|next|nr}\n" msgstr "" #: ../gnokii/gnokii-monitor.c:79 #, c-format msgid "INCOMING CALL: ID: %d, Number: %s, Name: \"%s\"\n" msgstr "" #: ../gnokii/gnokii-monitor.c:82 #, c-format msgid "CALL %d TERMINATED (LOCAL)\n" msgstr "" #: ../gnokii/gnokii-monitor.c:85 #, c-format msgid "CALL %d TERMINATED (REMOTE)\n" msgstr "" #: ../gnokii/gnokii-monitor.c:88 #, c-format msgid "CALL %d ACCEPTED BY THE REMOTE SIDE\n" msgstr "" #: ../gnokii/gnokii-monitor.c:91 #, c-format msgid "CALL %d PLACED ON HOLD\n" msgstr "" #: ../gnokii/gnokii-monitor.c:94 #, c-format msgid "CALL %d RETRIEVED FROM HOLD\n" msgstr "" #: ../gnokii/gnokii-monitor.c:135 #, c-format msgid "CALL%d: IDLE\n" msgstr "" #: ../gnokii/gnokii-monitor.c:143 msgid "RINGING" msgstr "" #: ../gnokii/gnokii-monitor.c:147 msgid "DIALING" msgstr "" #: ../gnokii/gnokii-monitor.c:151 msgid "ESTABLISHED" msgstr "" #: ../gnokii/gnokii-monitor.c:155 msgid "ON HOLD" msgstr "" #: ../gnokii/gnokii-monitor.c:159 msgid "UNKNOWN STATE" msgstr "" #: ../gnokii/gnokii-monitor.c:164 #, c-format msgid "CALL%d: %s %s (%s) (callid: %d, duration: %d sec)\n" msgstr "" #: ../gnokii/gnokii-monitor.c:182 #, c-format msgid "LAC: %04x (%d), CellID: %08x (%d)\n" msgstr "" #: ../gnokii/gnokii-monitor.c:212 #, c-format msgid "Argument to --monitor delay needs to be positive number\n" msgstr "" #: ../gnokii/gnokii-monitor.c:226 #, c-format msgid "Entering monitor mode...\n" msgstr "" #: ../gnokii/gnokii-monitor.c:254 #, c-format msgid "Network: %s, %s (%s)\n" msgstr "" #: ../gnokii/gnokii-monitor.c:262 #, c-format msgid "RFLevel: %d\n" msgstr "" #: ../gnokii/gnokii-monitor.c:265 #, c-format msgid "Battery: %d\n" msgstr "" #: ../gnokii/gnokii-monitor.c:268 #, c-format msgid "Power Source: %s\n" msgstr "" #: ../gnokii/gnokii-monitor.c:272 #, c-format msgid "SIM: Used %d, Free %d\n" msgstr "" #: ../gnokii/gnokii-monitor.c:276 #, c-format msgid "Phone: Used %d, Free %d\n" msgstr "" #: ../gnokii/gnokii-monitor.c:280 #, c-format msgid "DC: Used %d, Free %d\n" msgstr "" #: ../gnokii/gnokii-monitor.c:284 #, c-format msgid "EN: Used %d, Free %d\n" msgstr "" #: ../gnokii/gnokii-monitor.c:288 #, c-format msgid "FD: Used %d, Free %d\n" msgstr "" #: ../gnokii/gnokii-monitor.c:292 #, c-format msgid "LD: Used %d, Free %d\n" msgstr "" #: ../gnokii/gnokii-monitor.c:296 #, c-format msgid "MC: Used %d, Free %d\n" msgstr "" #: ../gnokii/gnokii-monitor.c:300 #, c-format msgid "ON: Used %d, Free %d\n" msgstr "" #: ../gnokii/gnokii-monitor.c:304 #, c-format msgid "RC: Used %d, Free %d\n" msgstr "" #: ../gnokii/gnokii-monitor.c:307 #, c-format msgid "SMS Messages: Unread %d, Number %d\n" msgstr "" #: ../gnokii/gnokii-monitor.c:313 #, c-format msgid "Cell broadcast received on channel %d: %s\n" msgstr "" #: ../gnokii/gnokii-monitor.c:323 #, c-format msgid "Leaving monitor mode...\n" msgstr "" #: ../gnokii/gnokii-monitor.c:330 #, c-format msgid "Call in progress: %-3s\n" msgstr "" #: ../gnokii/gnokii-monitor.c:331 ../gnokii/gnokii-monitor.c:333 #: ../gnokii/gnokii-monitor.c:335 ../gnokii/gnokii-monitor.c:337 #: ../gnokii/gnokii-monitor.c:339 ../gnokii/gnokii-monitor.c:341 #: ../gnokii/gnokii-monitor.c:343 ../gnokii/gnokii-monitor.c:345 #: ../gnokii/gnokii-settings.c:200 msgid "on" msgstr "" #: ../gnokii/gnokii-monitor.c:331 ../gnokii/gnokii-monitor.c:333 #: ../gnokii/gnokii-monitor.c:335 ../gnokii/gnokii-monitor.c:337 #: ../gnokii/gnokii-monitor.c:339 ../gnokii/gnokii-monitor.c:341 #: ../gnokii/gnokii-monitor.c:343 ../gnokii/gnokii-monitor.c:345 #: ../gnokii/gnokii-settings.c:200 msgid "off" msgstr "" #: ../gnokii/gnokii-monitor.c:332 #, c-format msgid "Unknown: %-3s\n" msgstr "" #: ../gnokii/gnokii-monitor.c:334 #, c-format msgid "Unread SMS: %-3s\n" msgstr "" #: ../gnokii/gnokii-monitor.c:336 #, c-format msgid "Voice call: %-3s\n" msgstr "" #: ../gnokii/gnokii-monitor.c:338 #, c-format msgid "Fax call active: %-3s\n" msgstr "" #: ../gnokii/gnokii-monitor.c:340 #, c-format msgid "Data call active: %-3s\n" msgstr "" #: ../gnokii/gnokii-monitor.c:342 #, c-format msgid "Keyboard lock: %-3s\n" msgstr "" #: ../gnokii/gnokii-monitor.c:344 #, c-format msgid "SMS storage full: %-3s\n" msgstr "" #: ../gnokii/gnokii-monitor.c:430 #, c-format msgid "Entered display monitoring mode...\n" msgstr "" #: ../gnokii/gnokii-monitor.c:447 ../gnokii/gnokii-sms.c:1322 #, c-format msgid "Shutting down\n" msgstr "" #: ../gnokii/gnokii-monitor.c:449 #, c-format msgid "Leaving display monitor mode...\n" msgstr "" #: ../gnokii/gnokii-monitor.c:490 #, c-format msgid " usage: --netmonitor {reset|off|field|devel|next|nr}\n" msgstr "" #: ../gnokii/gnokii-other.c:59 #, c-format msgid "" "Misc options:\n" " --keysequence\n" " --enterchar\n" " --listnetworks\n" " --getnetworkinfo\n" msgstr "" #: ../gnokii/gnokii-other.c:96 #, c-format msgid "Failed to press key: %s\n" msgstr "" #: ../gnokii/gnokii-other.c:155 #, c-format msgid "Error entering char: %s\n" msgstr "" #: ../gnokii/gnokii-other.c:169 #, c-format msgid "Network Name\n" msgstr "" #: ../gnokii/gnokii-other.c:170 #, c-format msgid "-----------------------------------------\n" msgstr "" #: ../gnokii/gnokii-other.c:172 #, fuzzy, c-format msgid "%-7s %s (%s)\n" msgstr " Texto: %s\n" #: ../gnokii/gnokii-other.c:202 #, c-format msgid "Network : %s (%s)\n" msgstr "" #: ../gnokii/gnokii-other.c:205 #, c-format msgid "Network code : %s\n" msgstr "" #: ../gnokii/gnokii-other.c:206 #, c-format msgid "LAC : %04x (%d)\n" msgstr "" #: ../gnokii/gnokii-other.c:207 #, c-format msgid "Cell id : %08x (%d)\n" msgstr "" #: ../gnokii/gnokii-phonebook.c:55 #, c-format msgid "" "Phonebook options:\n" " --getphonebook memory_type start_number [end_number|end]\n" " [[-r|--raw]|[-v|--vcard]|[-l|--ldif]]\n" " --writephonebook [[-o|--overwrite]|[-f|--find-free]]\n" " [-m|--memory-type|--memory memory_type]\n" " [-n|--memory-location|--location number]\n" " [[-v|--vcard]|[-l|--ldif]]\n" " --deletephonebook memory_type start_number [end_number|end]\n" msgstr "" #: ../gnokii/gnokii-phonebook.c:68 #, c-format msgid "" " usage: --getphonebook memory start [end] reads phonebook entries from " "memory type\n" " (SM, ME, IN, OU, ...) messages " "starting\n" " from location start and ending with " "end;\n" " if end option is omitted, just one " "entry\n" " is read;\n" " if 'end' is used all entries are " "read\n" " -r\n" " --raw output in raw form (comma " "separated)\n" " -v\n" " --vcard output in vcard format\n" " -l\n" " --ldif output in ldif format\n" "\n" msgstr "" #: ../gnokii/gnokii-phonebook.c:187 #, c-format msgid "%d. %s: %s\n" msgstr "" #: ../gnokii/gnokii-phonebook.c:199 msgid "Caller group" msgstr "" #: ../gnokii/gnokii-phonebook.c:208 #, c-format msgid "Address information:\n" msgstr "" #: ../gnokii/gnokii-phonebook.c:210 ../gnokii/gnokii-phonebook.c:212 #: ../gnokii/gnokii-phonebook.c:214 ../gnokii/gnokii-phonebook.c:216 #: ../gnokii/gnokii-phonebook.c:218 ../gnokii/gnokii-phonebook.c:220 #: ../gnokii/gnokii-phonebook.c:222 #, fuzzy, c-format msgid " %s: %s\n" msgstr " Texto: %s\n" #: ../gnokii/gnokii-phonebook.c:210 #, fuzzy msgid "Post office address" msgstr "Código Postal" #: ../gnokii/gnokii-phonebook.c:233 #, c-format msgid "%04u.%02u.%02u %02u:%02u:%02u" msgstr "" #: ../gnokii/gnokii-phonebook.c:247 #, c-format msgid "Date: %04u.%02u.%02u %02u:%02u:%02u\n" msgstr "" #: ../gnokii/gnokii-phonebook.c:252 #, c-format msgid "Empty memory location. Skipping.\n" msgstr "" #: ../gnokii/gnokii-phonebook.c:255 #, c-format msgid "Error reading from the location %d in memory %s\n" msgstr "" #: ../gnokii/gnokii-phonebook.c:272 #, c-format msgid "" " usage: --writephonebook [[-o|--overwrite]|[-f|--find-free]]\n" " [-m|--memory-type|--memory memory_type]\n" " [-n|--memory-location|--location number]\n" " [[-v|--vcard]|[-l|--ldif]]\n" "\n" msgstr "" #: ../gnokii/gnokii-phonebook.c:416 #, c-format msgid "Location busy. " msgstr "" #: ../gnokii/gnokii-phonebook.c:419 ../gnokii/gnokii-sms.c:540 #: ../gnokii/gnokii-sms.c:831 ../gnokii/gnokii-utils.c:61 #, c-format msgid "Overwrite? (yes/no) " msgstr "" #: ../gnokii/gnokii-phonebook.c:423 ../gnokii/gnokii-sms.c:543 #: ../gnokii/gnokii-utils.c:65 ../gnokii/gnokii-wap.c:223 msgid "no" msgstr "" #: ../gnokii/gnokii-phonebook.c:426 #, c-format msgid "" "\n" "Incorrect answer [%s]. Assuming 'no'.\n" msgstr "" #: ../gnokii/gnokii-phonebook.c:446 #, c-format msgid "Write Succeeded: memory type: %s, loc: %d, name: %s, number: %s\n" msgstr "" #: ../gnokii/gnokii-phonebook.c:453 ../gnokii/gnokii-phonebook.c:458 #, c-format msgid "Write failed (%s): memory type: %s, loc: %d, name: %s, number: %s\n" msgstr "" #: ../gnokii/gnokii-phonebook.c:466 #, c-format msgid "" " usage: --deletephonebook memory_type start_number [end_number|end]\n" "\n" msgstr "" #: ../gnokii/gnokii-phonebook.c:505 #, c-format msgid "Phonebook entry removed: memory type: %s, loc: %d\n" msgstr "" #: ../gnokii/gnokii-phonebook.c:512 #, c-format msgid "Phonebook entry removal FAILED (%s): memory type: %s, loc: %d\n" msgstr "" #: ../gnokii/gnokii-profile.c:55 #, c-format msgid "" "Profile options:\n" " --getprofile [start_number [end_number]] [-r|--raw]\n" " --setprofile\n" " --getactiveprofile\n" " --setactiveprofile profile_number\n" msgstr "" #: ../gnokii/gnokii-profile.c:65 #, c-format msgid " usage: --getprofile [start_number [end_number]] [-r|--raw]\n" msgstr "" #: ../gnokii/gnokii-profile.c:133 #, c-format msgid "Starting profile number is greater than stop\n" msgstr "" #: ../gnokii/gnokii-profile.c:138 #, c-format msgid "Profile number must be value from 0 to %d!\n" msgstr "" #: ../gnokii/gnokii-profile.c:143 #, c-format msgid "This phone supports only %d profiles!\n" msgstr "" #: ../gnokii/gnokii-profile.c:161 ../gnokii/gnokii-profile.c:254 #, c-format msgid "Cannot get profile %d\n" msgstr "" #. Translators: %d is the profile number, %s is the profile name. Example: 1. "Outdoors" #: ../gnokii/gnokii-profile.c:175 #, fuzzy, c-format msgid "%d. \"%s\"\n" msgstr "Assumindo: %s\n" #: ../gnokii/gnokii-profile.c:176 #, c-format msgid " (name defined)\n" msgstr "" #: ../gnokii/gnokii-profile.c:177 #, c-format msgid "Incoming call alert: %s\n" msgstr "" #: ../gnokii/gnokii-profile.c:178 #, c-format msgid "Ringing tone: %s (%d)\n" msgstr "" #: ../gnokii/gnokii-profile.c:179 #, c-format msgid "Ringing volume: %s\n" msgstr "" #: ../gnokii/gnokii-profile.c:180 #, c-format msgid "Message alert tone: %s\n" msgstr "" #: ../gnokii/gnokii-profile.c:181 #, c-format msgid "Keypad tones: %s\n" msgstr "" #: ../gnokii/gnokii-profile.c:182 #, c-format msgid "Warning and game tones: %s\n" msgstr "" #. FIXME: Light settings is only used for Car #: ../gnokii/gnokii-profile.c:185 #, c-format msgid "Lights: %s\n" msgstr "" #: ../gnokii/gnokii-profile.c:186 #, c-format msgid "Vibration: %s\n" msgstr "" #. FIXME: it will be nice to add here reading caller group name. #: ../gnokii/gnokii-profile.c:189 #, c-format msgid "Caller groups: 0x%02x\n" msgstr "" #. FIXME: Automatic answer is only used for Car and Headset. #: ../gnokii/gnokii-profile.c:192 #, c-format msgid "Automatic answer: %s\n" msgstr "" #: ../gnokii/gnokii-profile.c:223 ../gnokii/gnokii-sms.c:1120 #: ../gnokii/gnokii-wap.c:285 #, c-format msgid "Input line format isn't valid\n" msgstr "" #: ../gnokii/gnokii-profile.c:229 #, c-format msgid "Cannot set profile: %s\n" msgstr "" #: ../gnokii/gnokii-profile.c:248 #, c-format msgid "Cannot get active profile: %s\n" msgstr "" #: ../gnokii/gnokii-profile.c:256 #, c-format msgid "Active profile: %d (%s)\n" msgstr "" #: ../gnokii/gnokii-profile.c:263 #, fuzzy, c-format msgid " usage: --setactiveprofile profile_number\n" msgstr " modo de uso: --getfile remote_filename [localfilename]\n" #: ../gnokii/gnokii-profile.c:281 #, c-format msgid "Cannot set active profile to %d: %s\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:96 #, c-format msgid "" "Ringtone options:\n" " --sendringtone rtttlfile destination\n" " --getringtone rtttlfile [location] [-r|--raw]\n" " --setringtone rtttlfile [location] [-r|--raw] [--name name]\n" " --playringtone rtttlfile [--volume vol]\n" " --ringtoneconvert source destination\n" " --getringtonelist\n" " --deleteringtone start [end]\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:117 ../gnokii/gnokii-ringtone.c:392 #: ../gnokii/gnokii-ringtone.c:447 #, c-format msgid "Failed to load ringtone: %s\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:162 #, c-format msgid " usage: --getringtone rtttlfile [location] [-r|--raw]\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:216 #, c-format msgid "Getting ringtone %d failed: %s\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:219 #, c-format msgid "Getting ringtone %d (\"%s\") succeeded!\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:222 ../gnokii/gnokii-ringtone.c:303 #: ../gnokii/gnokii-ringtone.c:387 #, c-format msgid "Internal gnokii error: null filename\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:231 #, c-format msgid "Failed to save ringtone.\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:236 #, c-format msgid "Failed to write ringtone.\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:242 ../gnokii/gnokii-ringtone.c:451 #, c-format msgid "Failed to save ringtone: %s\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:252 #, c-format msgid " usage: --setringtone rtttlfile [location] [-r|--raw] [--name name]\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:311 ../gnokii/gnokii-ringtone.c:324 #, c-format msgid "Failed to load ringtone.\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:333 #, c-format msgid "Send succeeded!\n" msgstr "Envio com sucesso!\n" #: ../gnokii/gnokii-ringtone.c:335 #, c-format msgid "Send failed: %s\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:342 #, c-format msgid " usage: --playringtone rtttlfile [-v|--volume vol]\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:424 #, c-format msgid "Play succeeded!\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:426 #, c-format msgid "Play failed: %s\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:433 #, c-format msgid " usage: --ringtoneconvert source destination\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:455 #, c-format msgid "%d note(s) converted.\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:467 #, c-format msgid "Failed to get the list of ringtones\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:471 #, c-format msgid "First user defined ringtone location: %3d\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:472 #, c-format msgid "" "Number of user defined ringtones: %d\n" "\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:473 #, c-format msgid "loc rwu name\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:474 #, c-format msgid "===============================\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:476 #, c-format msgid "%3d %d%d%d %-20s\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:488 #, c-format msgid " usage: --deleteringtone start [end]\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:512 #, c-format msgid "Ringtone %d deleted\n" msgstr "" #: ../gnokii/gnokii-ringtone.c:514 #, c-format msgid "Failed to delete ringtone %d: %s\n" msgstr "" #: ../gnokii/gnokii-security.c:59 #, c-format msgid "" "Security options:\n" " --identify\n" " --getlocksinfo\n" msgstr "" #: ../gnokii/gnokii-security.c:65 #, c-format msgid "" " --entersecuritycode PIN|PIN2|PUK|PUK2|SEC [COMMAND]\n" " --getsecuritycodestatus\n" " --getsecuritycode\n" " --changesecuritycode PIN|PIN2|PUK|PUK2\n" msgstr "" #: ../gnokii/gnokii-security.c:75 #, c-format msgid "IMEI : %s\n" msgstr "" #: ../gnokii/gnokii-security.c:76 #, c-format msgid "Manufacturer : %s\n" msgstr "" #: ../gnokii/gnokii-security.c:77 #, c-format msgid "Model : %s\n" msgstr "" #: ../gnokii/gnokii-security.c:78 #, c-format msgid "Product name : %s\n" msgstr "" #: ../gnokii/gnokii-security.c:79 #, c-format msgid "Revision : %s\n" msgstr "" #: ../gnokii/gnokii-security.c:100 #, c-format msgid "%7s : %10s, %7s, %6s, counter %d\n" msgstr "" #: ../gnokii/gnokii-security.c:120 #, c-format msgid "Getting security code... \n" msgstr "" #: ../gnokii/gnokii-security.c:124 #, c-format msgid "Security code is: %s\n" msgstr "" #: ../gnokii/gnokii-security.c:168 #, c-format msgid " usage: --entersecuritycode PIN|PIN2|PUK|PUK2|SEC\n" msgstr "" #: ../gnokii/gnokii-security.c:193 ../gnokii/gnokii-security.c:281 msgid "Enter your code: " msgstr "" #: ../gnokii/gnokii-security.c:202 #, c-format msgid "Code ok.\n" msgstr "" #: ../gnokii/gnokii-security.c:221 #, c-format msgid "Security code status: " msgstr "" #: ../gnokii/gnokii-security.c:225 #, c-format msgid "waiting for Security Code.\n" msgstr "" #: ../gnokii/gnokii-security.c:228 #, c-format msgid "waiting for PIN.\n" msgstr "" #: ../gnokii/gnokii-security.c:231 #, c-format msgid "waiting for PIN2.\n" msgstr "" #: ../gnokii/gnokii-security.c:234 #, c-format msgid "waiting for PUK.\n" msgstr "" #: ../gnokii/gnokii-security.c:237 #, c-format msgid "waiting for PUK2.\n" msgstr "" #: ../gnokii/gnokii-security.c:240 #, c-format msgid "nothing to enter.\n" msgstr "" #: ../gnokii/gnokii-security.c:243 #, c-format msgid "unknown\n" msgstr "" #: ../gnokii/gnokii-security.c:254 #, c-format msgid " usage: --changesecuritycode PIN|PIN2|PUK|PUK2\n" msgstr "" #: ../gnokii/gnokii-security.c:282 msgid "Enter new code: " msgstr "" #: ../gnokii/gnokii-security.c:283 msgid "Retype new code: " msgstr "" #: ../gnokii/gnokii-security.c:285 #, c-format msgid "Error: new code differs\n" msgstr "" #: ../gnokii/gnokii-security.c:295 #, c-format msgid "Code changed.\n" msgstr "" #: ../gnokii/gnokii-settings.c:56 #, c-format msgid "" "Phone settings:\n" " --reset [soft|hard]\n" " --setdatetime [YYYY [MM [DD [HH [MM]]]]]\n" " --getdatetime\n" " --setalarm [HH MM]\n" " --getalarm\n" msgstr "" #: ../gnokii/gnokii-settings.c:142 #, c-format msgid "Date: %4d/%02d/%02d\n" msgstr "" #: ../gnokii/gnokii-settings.c:143 #, c-format msgid "Time: %02d:%02d:%02d\n" msgstr "" #: ../gnokii/gnokii-settings.c:200 #, c-format msgid "Alarm: %s\n" msgstr "" #: ../gnokii/gnokii-settings.c:201 #, c-format msgid "Time: %02d:%02d\n" msgstr "" #: ../gnokii/gnokii-settings.c:223 #, c-format msgid "What kind of reset do you want??\n" msgstr "" #: ../gnokii/gnokii-sms.c:63 #, c-format msgid "" "SMS options:\n" " --sendsms destination [--smsc message_center_number |\n" " --smscno message_center_index] [-r|--report] [-8|--8bit]\n" " [-C|--class n] [-v|--validity n]\n" " [-i|--imelody] [-a|--animation file;file;file;file]\n" " [-o|--concat this;total;serial] [-w|--wappush url]\n" " --savesms [--sender from] [--smsc message_center_number |\n" " --smscno message_center_index] [-f|--folder folder_id]\n" " [-l|--location number] [-s|--sent|-r|--read] [-d|--" "deliver]\n" " [-t|--datetime YYMMDDHHMMSS]\n" " --getsms memory_type start [end] [-f|--file file]\n" " [-F|--force-file file] [-a|--append-file file]\n" " [-d|--delete]\n" " --deletesms memory_type start [end]\n" " --getsmsc [start_number [end_number]] [-r|--raw]\n" " --setsmsc\n" " --createsmsfolder name\n" " --deletesmsfolder folderid\n" " --showsmsfolderstatus\n" " --smsreader\n" msgstr "" #: ../gnokii/gnokii-sms.c:88 #, c-format msgid "" " usage: --sendsms destination recipient number (msisdn)\n" " --smsc message_center_number number (msisdn) of the message\n" " center\n" " --smscno message_center_index index of the message center " "stored\n" " in the phone memory\n" " -r\n" " --report request delivery report\n" " -v n\n" " --validity n set message validity\n" " -C n\n" " --class n set message class; possible " "values\n" " are 0, 1, 2, or 3\n" " -8\n" " --8bit set 8bit coding\n" " -i\n" " --imelody send imelody message, text is " "read\n" " from stdin\n" " -a file;file;file;file\n" " --animation file;file;file;file send animation message\n" " -o this;total;serial\n" " --concat this;total;serial send 'this' part of all 'total' " "parts\n" " identified by 'serial'\n" " -w url\n" " --wappush url send wappush to the given url\n" "Message text is read from standard input.\n" "\n" msgstr "" #: ../gnokii/gnokii-sms.c:220 #, c-format msgid "Incorrect --concat option\n" msgstr "" #: ../gnokii/gnokii-sms.c:267 ../gnokii/gnokii-sms.c:574 #, c-format msgid "Empty message. Quitting.\n" msgstr "" #: ../gnokii/gnokii-sms.c:278 #, c-format msgid "URL is too long (max 255 chars). Quitting.\n" msgstr "" #: ../gnokii/gnokii-sms.c:287 ../gnokii/gnokii-utils.c:139 #, c-format msgid "Please enter SMS text. End your input with :\n" msgstr "" #: ../gnokii/gnokii-sms.c:294 #, c-format msgid "WAP Push encoding failed!\n" msgstr "" #: ../gnokii/gnokii-sms.c:329 #, c-format msgid "" "Cannot read the SMSC number from your phone. If the sms send will fail, " "please use --smsc option explicitely giving the number.\n" msgstr "" #: ../gnokii/gnokii-sms.c:368 #, c-format msgid "" " usage: --savesms\n" " --smsc message_center_number number (msisdn) of the message\n" " center\n" " --smscno message_center_index index of the message center stored\n" " in the phone memory\n" " --sender msisdn set sender number\n" " -l n\n" " --location n save message at location n\n" " -r\n" " --read mark message as read\n" " -s\n" " --sent mark message as sent\n" " -f ID\n" " --folder ID save message to the folder ID where\n" " is of type IN, OU...\n" " -d\n" " --deliver set message type as sms deliver\n" " (to be sent)\n" " -t YYMMDDHHMISS\n" " --datetime YYMMDDHHMISS set date and time of message " "delivery\n" "Message text is read from standard input.\n" "\n" msgstr "" #: ../gnokii/gnokii-sms.c:496 ../gnokii/gnokii-sms.c:501 #, c-format msgid "Invalid datetime format: %s (should be YYMMDDHHMISS, all digits)!\n" msgstr "" #: ../gnokii/gnokii-sms.c:517 #, c-format msgid "Invalid datetime: %s.\n" msgstr "" #: ../gnokii/gnokii-sms.c:538 #, c-format msgid "Message at specified location exists. " msgstr "" #: ../gnokii/gnokii-sms.c:585 #, c-format msgid "Storing SMS... " msgstr "" #: ../gnokii/gnokii-sms.c:591 #, c-format msgid "Saved to %d!\n" msgstr "" #: ../gnokii/gnokii-sms.c:593 #, c-format msgid "Saving failed (%s)\n" msgstr "" #: ../gnokii/gnokii-sms.c:601 #, c-format msgid "" " usage: --getsms memory start [end] retrieves messages from memory type " "(SM, ME,\n" " IN, OU, ...) starting from\n" " location start and ending with end;\n" " if end option is omitted, just one " "entry\n" " is read;\n" " start must be a number, end may be a " "number\n" " or 'end' string;\n" " if 'end' is used entries are being read\n" " until empty location\n" " --force-file filename\n" " -F filename save sms to the file overwriting it if\n" " the file already exists;\n" " file is in mbox format\n" " --file filename\n" " -f filename as above but user is prompted before\n" " overwriting the file\n" " --append-file filename\n" " -a filename as above but append to the existing " "file\n" " --delete\n" " -d delete message after reading\n" "\n" msgstr "" #: ../gnokii/gnokii-sms.c:752 #, c-format msgid "Sending date/time: %02d/%02d/%04d %02d:%02d:%02d " msgstr "" #. Translators: this format is for printing a timezone with a leading +/- #: ../gnokii/gnokii-sms.c:757 ../gnokii/gnokii-sms.c:765 #: ../gnokii/gnokii-sms.c:779 ../gnokii/gnokii-sms.c:794 #, c-format msgid "%+03d00" msgstr "" #: ../gnokii/gnokii-sms.c:760 #, c-format msgid "Delivery date/time: %02d/%02d/%04d %02d:%02d:%02d " msgstr "" #: ../gnokii/gnokii-sms.c:768 ../gnokii/gnokii-sms.c:800 #, c-format msgid "Recipient: %s Msg Center: %s\n" msgstr "" #: ../gnokii/gnokii-sms.c:769 ../gnokii/gnokii-sms.c:785 #, c-format msgid "Text:\n" msgstr "" #: ../gnokii/gnokii-sms.c:774 ../gnokii/gnokii-sms.c:789 #, c-format msgid "Date/time: %02d/%02d/%04d %02d:%02d:%02d " msgstr "" #: ../gnokii/gnokii-sms.c:782 ../gnokii/gnokii-sms.c:803 #, c-format msgid "Sender: %s Msg Center: %s\n" msgstr "" #: ../gnokii/gnokii-sms.c:783 #, c-format msgid "Bitmap:\n" msgstr "" #: ../gnokii/gnokii-sms.c:809 #, c-format msgid "%s:\n" msgstr "" #: ../gnokii/gnokii-sms.c:814 #, c-format msgid "GSM operator logo for %s (%s) network.\n" msgstr "" #: ../gnokii/gnokii-sms.c:816 #, c-format msgid "Saved by Logo Express\n" msgstr "" #: ../gnokii/gnokii-sms.c:818 #, c-format msgid "Saved by Operator Logo Uploader by Thomas Kessler\n" msgstr "" #: ../gnokii/gnokii-sms.c:830 ../gnokii/gnokii-utils.c:59 #, c-format msgid "File %s exists.\n" msgstr "" #: ../gnokii/gnokii-sms.c:839 #, c-format msgid "Couldn't save logofile %s!\n" msgstr "" #: ../gnokii/gnokii-sms.c:847 #, c-format msgid "Linked (%d/%d):\n" msgstr "" #: ../gnokii/gnokii-sms.c:882 #, c-format msgid "Getting SMS failed (location %d from %s memory)! (%s)\n" msgstr "" #: ../gnokii/gnokii-sms.c:910 #, c-format msgid "" " usage: --deletesms memory start [end] deletes messages from memory type\n" " (SM, ME, IN, OU, ...) starting\n" " from location start and ending with " "end;\n" " if end option is omitted, just one " "entry\n" " is removed;\n" " if 'end' is used entries are being " "removed\n" " until empty location\n" "\n" msgstr "" #: ../gnokii/gnokii-sms.c:957 #, c-format msgid "Deleted SMS (location %d from memory %s)\n" msgstr "" #: ../gnokii/gnokii-sms.c:961 #, c-format msgid "Deleting SMS failed (location %d from %s memory)! (%s)\n" msgstr "" #: ../gnokii/gnokii-sms.c:974 #, c-format msgid "" " usage: --getsmsc [start [end]] reads message center details from\n" " the phone starting with start location\n" " and ending with end location;\n" " no end parameter means to read every\n" " location to the end;\n" " no start parameter means to start with\n" " the first location;\n" "-r\n" "--raw output in raw format (comma separated)\n" " default is human readable form\n" "\n" msgstr "" #: ../gnokii/gnokii-sms.c:1025 #, c-format msgid "SMS center: location number must be greater than 0\n" msgstr "" #: ../gnokii/gnokii-sms.c:1061 #, c-format msgid "No. %d: \"%s\" (defined name)\n" msgstr "" #: ../gnokii/gnokii-sms.c:1063 #, c-format msgid "No. %d: \"%s\" (default name)\n" msgstr "" #: ../gnokii/gnokii-sms.c:1064 #, c-format msgid "SMS center number is %s\n" msgstr "" #: ../gnokii/gnokii-sms.c:1066 #, c-format msgid "Default recipient number is %s\n" msgstr "" #: ../gnokii/gnokii-sms.c:1068 #, c-format msgid "No default recipient number is defined\n" msgstr "" #: ../gnokii/gnokii-sms.c:1069 #, c-format msgid "Messages sent as %s\n" msgstr "" #: ../gnokii/gnokii-sms.c:1070 #, c-format msgid "Message validity is %s\n" msgstr "" #: ../gnokii/gnokii-sms.c:1080 #, c-format msgid "" " usage: --setsmsc\n" "SMSC details are read from standard input.\n" "\n" msgstr "" #: ../gnokii/gnokii-sms.c:1137 #, c-format msgid "" " usage: --createsmsfolder name creates SMS folder with given name\n" "\n" msgstr "" #: ../gnokii/gnokii-sms.c:1158 #, c-format msgid "Folder with name: %s successfully created!\n" msgstr "" #: ../gnokii/gnokii-sms.c:1165 #, c-format msgid "" " usage: --deletesmsfolder folderid removes SMS folder with given id\n" "\n" msgstr "" #: ../gnokii/gnokii-sms.c:1183 #, c-format msgid "Error: Number must be between 1 and %i!\n" msgstr "" #: ../gnokii/gnokii-sms.c:1191 #, c-format msgid "Number %i of 'My Folders' successfully deleted!\n" msgstr "" #: ../gnokii/gnokii-sms.c:1198 #, c-format msgid "" " usage: --showsmsfolderstatus shows summary of SMS folders\n" "\n" msgstr "" #: ../gnokii/gnokii-sms.c:1215 #, c-format msgid "Cannot list available folders: %s\n" msgstr "" #: ../gnokii/gnokii-sms.c:1219 #, c-format msgid "No. Name Id #Msg\n" msgstr "" #: ../gnokii/gnokii-sms.c:1220 #, c-format msgid "========================================================\n" msgstr "" #: ../gnokii/gnokii-sms.c:1224 #, c-format msgid "Cannot get status of folder \"%s\": %s\n" msgstr "" #: ../gnokii/gnokii-sms.c:1227 #, c-format msgid "%3d %-42s %4s %4u\n" msgstr "" #: ../gnokii/gnokii-sms.c:1250 #, c-format msgid "SMS received from number: %s\n" msgstr "" #: ../gnokii/gnokii-sms.c:1259 #, c-format msgid "Got message %d: %s\n" msgstr "" #: ../gnokii/gnokii-sms.c:1267 #, c-format msgid "### Exists?!\n" msgstr "" #: ../gnokii/gnokii-sms.c:1273 #, c-format msgid "### Cannot create file %s\n" msgstr "" #: ../gnokii/gnokii-sms.c:1297 #, c-format msgid "" " usage: --smsreader periodically check sms on the phone and stores them\n" " in mbox format\n" "\n" msgstr "" #: ../gnokii/gnokii-sms.c:1314 #, c-format msgid "Entered sms reader mode...\n" msgstr "" #: ../gnokii/gnokii-sms.c:1324 #, c-format msgid "Exiting sms reader mode...\n" msgstr "" #: ../gnokii/gnokii-todo.c:56 #, c-format msgid "" "ToDo options:\n" " --gettodo start_number [end_number|end] [-v|--vCal]\n" " --writetodo vcalendarfile start_number [end_number|end]\n" " --deletealltodos\n" msgstr "" #: ../gnokii/gnokii-todo.c:65 #, c-format msgid "" "usage: --gettodo start_number [end_number | end] [-v|--vCal]\n" " start_number - entry number in the phone todo (numeric)\n" " end_number - until this entry in the phone todo (numeric, " "optional)\n" " end - the string \"end\" indicates all entries from start to " "end\n" " -v - output in iCalendar format\n" " NOTE: if no end is given, only the start entry is written\n" msgstr "" #: ../gnokii/gnokii-todo.c:119 msgid "Todo" msgstr "" #: ../gnokii/gnokii-todo.c:120 msgid "Priority" msgstr "" #: ../gnokii/gnokii-todo.c:133 #, c-format msgid "The ToDo note could not be read: %s\n" msgstr "" #: ../gnokii/gnokii-todo.c:142 #, c-format msgid "" "usage: --writetodo vcalendarfile start_number [end_number|end]\n" " vcalendarfile - file containing todo notes in vCal format\n" " start_number - first note to read from file\n" " end_number - last note to read from file\n" " end - read all notes from file from start_number\n" " NOTE: it stores the note at the first empty location.\n" msgstr "" #: ../gnokii/gnokii-todo.c:216 #, c-format msgid "Priority %d. %s\n" msgstr "" #: ../gnokii/gnokii-todo.c:218 #, c-format msgid "Failed to write ToDo note: %s\n" msgstr "" #: ../gnokii/gnokii-todo.c:234 #, c-format msgid "Successfully deleted all ToDo notes!\n" msgstr "" #: ../gnokii/gnokii-todo.c:236 #, c-format msgid "Failed to delete ToDo note: %s\n" msgstr "" #: ../gnokii/gnokii-utils.c:145 #, c-format msgid "Couldn't read from stdin!\n" msgstr "" #: ../gnokii/gnokii-utils.c:151 #, c-format msgid "Input too long! (%d, maximum is %d)\n" msgstr "" #: ../gnokii/gnokii-utils.c:166 #, c-format msgid "Could not null bitmap: %s\n" msgstr "" #: ../gnokii/gnokii-utils.c:171 #, c-format msgid "Could not load bitmap from %s: %s\n" msgstr "" #: ../gnokii/gnokii-utils.c:210 #, c-format msgid "" "Warning: end value (%d) is less than start value (%d). Setting it to the " "start value (%d)\n" msgstr "" #: ../gnokii/gnokii-wap.c:55 #, c-format msgid "" "WAP options:\n" " --getwapbookmark number\n" " --writewapbookmark name URL\n" " --deletewapbookmark number\n" " --getwapsetting number [-r|--raw]\n" " --writewapsetting\n" " --activatewapsetting number\n" msgstr "" #: ../gnokii/gnokii-wap.c:67 #, c-format msgid " usage: --getwapbookmark number\n" msgstr "" #: ../gnokii/gnokii-wap.c:88 ../gnokii/gnokii-wap.c:219 #, c-format msgid "WAP bookmark nr. %d:\n" msgstr "" #: ../gnokii/gnokii-wap.c:103 #, c-format msgid " usage: --writebookmark name URL\n" msgstr "" #: ../gnokii/gnokii-wap.c:126 #, c-format msgid "WAP bookmark nr. %d successfully written!\n" msgstr "" #: ../gnokii/gnokii-wap.c:138 #, c-format msgid " usage: --deletewapbookmark number\n" msgstr "" #: ../gnokii/gnokii-wap.c:159 #, c-format msgid "WAP bookmark nr. %d deleted!\n" msgstr "" #: ../gnokii/gnokii-wap.c:171 #, c-format msgid " usage: --getwapsetting number [-r|--raw]\n" msgstr "" #: ../gnokii/gnokii-wap.c:221 ../xgnokii/xgnokii_contacts.c:725 #: ../xgnokii/xgnokii_contacts.c:803 ../xgnokii/xgnokii_contacts.c:942 #: ../xgnokii/xgnokii_contacts.c:984 ../xgnokii/xgnokii_contacts.c:1202 msgid "Home" msgstr "" #: ../gnokii/gnokii-wap.c:222 msgid "Session mode" msgstr "" #: ../gnokii/gnokii-wap.c:223 msgid "Connection security" msgstr "" #: ../gnokii/gnokii-wap.c:224 msgid "Data bearer" msgstr "" #: ../gnokii/gnokii-wap.c:226 ../gnokii/gnokii-wap.c:236 msgid "Authentication type" msgstr "" #: ../gnokii/gnokii-wap.c:227 #, fuzzy msgid "Data call type" msgstr "Tipo de chamada: " #: ../gnokii/gnokii-wap.c:228 msgid "Data call speed" msgstr "" #: ../gnokii/gnokii-wap.c:229 ../gnokii/gnokii-wap.c:237 msgid "Login type" msgstr "" #: ../gnokii/gnokii-wap.c:230 ../gnokii/gnokii-wap.c:239 msgid "IP" msgstr "" #: ../gnokii/gnokii-wap.c:232 ../gnokii/gnokii-wap.c:240 msgid "Username" msgstr "" #: ../gnokii/gnokii-wap.c:233 ../gnokii/gnokii-wap.c:241 msgid "Password" msgstr "" #: ../gnokii/gnokii-wap.c:235 ../xgnokii/xgnokii.c:1615 msgid "Connection" msgstr "" #: ../gnokii/gnokii-wap.c:238 msgid "Access point" msgstr "" #: ../gnokii/gnokii-wap.c:243 #, fuzzy msgid "Service number" msgstr "Números de serviço" #: ../gnokii/gnokii-wap.c:244 #, fuzzy msgid "Server number" msgstr "Número Geral" #: ../gnokii/gnokii-wap.c:292 #, c-format msgid "Cannot write WAP setting: %s\n" msgstr "" #: ../gnokii/gnokii-wap.c:299 #, c-format msgid " usage: --activatewapsetting number\n" msgstr "" #: ../gnokii/gnokii-wap.c:320 #, c-format msgid "WAP setting nr. %d activated!\n" msgstr "" #: ../smsd/file.c:59 ../smsd/file.c:90 #, c-format msgid "Cannot stat file %s!\n" msgstr "" #: ../smsd/file.c:68 #, c-format msgid "" "File %s is not regular file or\n" "you have not executable permission to this file!\n" msgstr "" #: ../smsd/file.c:85 #, c-format msgid "You have not set spool directory, sms sending is disabled!\n" msgstr "" #: ../smsd/file.c:99 #, c-format msgid "" "File %s is not directory or\n" "you have not read and write permissions to this directory,\n" "sms sending is disabled!\n" "!" msgstr "" #: ../smsd/file.c:166 #, c-format msgid "Cannot open directory %s\n" msgstr "" #: ../smsd/file.c:199 #, c-format msgid "Remote number is empty in %s!\n" msgstr "" #: ../smsd/file.c:243 ../smsd/file.c:258 #, c-format msgid "Cannot unlink %s." msgstr "" #: ../smsd/file.c:252 #, c-format msgid "Cannot send sms from file %s\n" msgstr "" #: ../smsd/file.c:255 #, c-format msgid "Cannot rename file %s to %s. Trying to unlink it.\n" msgstr "" #: ../smsd/lowlevel.c:111 #, fuzzy, c-format msgid "" "Cannot load phone %s!\n" "Do you have proper section in the config file?\n" msgstr "Não foi especificada nenhuma porta no ficheiro de configuração." #: ../smsd/lowlevel.c:400 ../xgnokii/xgnokii_lowlevel.c:1349 #, c-format msgid "Event %d failed with return code %d!\n" msgstr "" #: ../smsd/lowlevel.c:449 #, c-format msgid "Timeout in file %s, line %d, restarting connection.\n" msgstr "" #: ../smsd/lowlevel.c:459 #, c-format msgid "Too many consecutive errors, restarting connection.\n" msgstr "" #: ../smsd/mysql.c:75 ../smsd/pq.c:66 #, c-format msgid "Connection to database '%s' on host '%s' failed.\n" msgstr "" #: ../smsd/mysql.c:132 #, c-format msgid "%d: SELECT FROM multipart command failed.\n" msgstr "" #: ../smsd/mysql.c:169 #, c-format msgid "%d: INSERT INTO multipartinbox command failed.\n" msgstr "" #: ../smsd/mysql.c:187 #, c-format msgid "%d: SELECT FROM multipartinbox command failed.\n" msgstr "" #: ../smsd/mysql.c:223 #, c-format msgid "%d: DELETE FROM multipartinbox command failed.\n" msgstr "" #: ../smsd/mysql.c:261 #, c-format msgid "%d: SELECT FROM inbox command failed.\n" msgstr "" #: ../smsd/mysql.c:294 #, c-format msgid "%d: INSERT INTO inbox command failed.\n" msgstr "" #: ../smsd/mysql.c:334 ../smsd/sqlite.c:239 #, c-format msgid "%d: SELECT FROM outbox command failed.\n" msgstr "" #: ../smsd/mysql.c:344 #, c-format msgid "%d: Store Mysql Result Failed.\n" msgstr "" #: ../smsd/mysql.c:397 ../smsd/pq.c:425 #, c-format msgid "%d: UPDATE command failed.\n" msgstr "" #: ../smsd/pq.c:75 #, c-format msgid "Setting client charset '%s' for database '%s' on host '%s' failed.\n" msgstr "" #: ../smsd/pq.c:120 ../smsd/pq.c:257 #, c-format msgid "%d: Escaping string failed.\n" msgstr "" #: ../smsd/pq.c:148 ../smsd/pq.c:210 #, c-format msgid "%d: SELECT FROM %s.multipart command failed.\n" msgstr "" #: ../smsd/pq.c:188 #, c-format msgid "%d: INSERT INTO %s.multipartinbox failed.\n" msgstr "" #: ../smsd/pq.c:239 #, c-format msgid "%d: DELETE FROM %s.multipartinbox command failed.\n" msgstr "" #: ../smsd/pq.c:294 #, c-format msgid "%d: SELECT FROM %s.inbox command failed.\n" msgstr "" #: ../smsd/pq.c:331 #, c-format msgid "%d: INSERT INTO %s.inbox failed.\n" msgstr "" #: ../smsd/pq.c:374 #, c-format msgid "%d: SELECT FROM %s.outbox command failed.\n" msgstr "" #: ../smsd/smsd.c:137 #, c-format msgid "smsd - version %s from gnokii %s\n" msgstr "" #: ../smsd/smsd.c:142 #, c-format msgid "" "smsd - version %s from gnokii %s\n" "Copyright Jan Derfinak 1999-2011\n" msgstr "" #: ../smsd/smsd.c:149 #, c-format msgid "" "\n" "Usage: %s [options]\n" " -u, --user db_username OR action if -m file\n" " -p, --password db_password\n" " -d, --db db_name\n" " -c, --host db_hostname OR spool directory if -m file\n" " -s, --schema db_schema\n" " -e, --encoding client_encoding\n" " -m, --module db_module (pq, mysql, sqlite, file)\n" " -l, --libdir path_to_db_module\n" " -f, --logfile file\n" " -t, --phone phone_number\n" " -i, --interval polling_interval_for_incoming_sms's_in_seconds\n" " -S, --maxsms number_of_sms's (only in dumb mode)\n" " -b, --inbox memoryType\n" " -0, --firstpos0\n" " -v, --version\n" " -h, --help\n" msgstr "" #: ../smsd/smsd.c:183 #, c-format msgid "WARNING: Cannot open file %s for appending.\n" msgstr "" #: ../smsd/smsd.c:342 #, c-format msgid "Wrong number of arguments\n" msgstr "" #: ../smsd/smsd.c:349 #, c-format msgid "Cannot load database module %s in directory %s!\n" msgstr "" #: ../smsd/smsd.c:423 #, c-format msgid "Sending to %s unsuccessful. Error: %s\n" msgstr "" #: ../smsd/smsd.c:429 #, c-format msgid "Sending to %s successful.\n" msgstr "" #: ../smsd/smsd.c:455 #, c-format msgid "Inserting sms from %s successful.\n" msgstr "" #: ../smsd/smsd.c:465 #, c-format msgid "Duplicated sms from %s.\n" msgstr "" #: ../smsd/smsd.c:475 #, c-format msgid "Multipart sms from %s. Waiting for the next parts.\n" msgstr "" #: ../smsd/smsd.c:485 #, c-format msgid "" "Inserting sms from %s unsuccessful.\n" "Date: %02d-%02d-%02d %02d:%02d:%02d+%02d\n" "Text: %s\n" "\n" "Exiting.\n" msgstr "" #: ../smsd/sqlite.c:57 ../smsd/sqlite.c:69 #, c-format msgid "Connection to database '%s' failed.\n" msgstr "" #: ../smsd/sqlite.c:116 ../smsd/sqlite.c:182 #, c-format msgid "%d: Parsing query %s failed!" msgstr "" #: ../smsd/sqlite.c:117 ../smsd/sqlite.c:183 #, fuzzy, c-format msgid "Error: %s" msgstr "Erro: %s\n" #: ../smsd/sqlite.c:133 #, c-format msgid "%d: INSERT INTO inbox failed.\n" msgstr "" #: ../smsd/sqlite.c:134 #, fuzzy, c-format msgid "Error %d: %s\n" msgstr "Erro: %s\n" #: ../smsd/sqlite.c:135 #, fuzzy, c-format msgid "Query: %s\n" msgstr "Número: %s\n" #: ../utils/mgnokiidev.c:179 #, c-format msgid "mgnokiidev takes one and only one argument!\n" msgstr "" #: ../xgnokii/xgnokii.c:217 msgid "Reading caller groups names ..." msgstr "" #: ../xgnokii/xgnokii.c:226 msgid "No group" msgstr "" #: ../xgnokii/xgnokii.c:347 msgid "Short Message received" msgstr "" #: ../xgnokii/xgnokii.c:353 ../xgnokii/xgnokii_lowlevel.c:1346 msgid "Working..." msgstr "" #: ../xgnokii/xgnokii.c:370 msgid "Call in progress" msgstr "" #: ../xgnokii/xgnokii.c:383 msgid "Hide" msgstr "" #: ../xgnokii/xgnokii.c:457 msgid "anonymous" msgstr "" #: ../xgnokii/xgnokii.c:470 #, c-format msgid "" "Outgoing call in progress:\n" "Time: %s" msgstr "" #: ../xgnokii/xgnokii.c:472 #, c-format msgid "" "Incoming call from: %s\n" "Time: %s" msgstr "" #: ../xgnokii/xgnokii.c:584 ../xgnokii/xgnokii.c:1455 msgid "Max. Time" msgstr "" #: ../xgnokii/xgnokii.c:631 msgid "Reading SMS centers ..." msgstr "" #: ../xgnokii/xgnokii.c:896 msgid "SMS not supported!" msgstr "" #: ../xgnokii/xgnokii.c:901 msgid "Calendar not supported!" msgstr "" #: ../xgnokii/xgnokii.c:1088 msgid "Error writing configuration file!" msgstr "" #: ../xgnokii/xgnokii.c:1100 ../xgnokii/xgnokii_contacts.c:3126 msgid "Contacts" msgstr "" #: ../xgnokii/xgnokii.c:1111 ../xgnokii/xgnokii_calendar.c:1547 msgid "Calendar" msgstr "" #: ../xgnokii/xgnokii.c:1116 ../xgnokii/xgnokii_logos.c:1525 msgid "Logos" msgstr "" #: ../xgnokii/xgnokii.c:1122 msgid "DTMF" msgstr "" #: ../xgnokii/xgnokii.c:1127 ../xgnokii/xgnokii_speed.c:548 msgid "Speed Dial" msgstr "" #: ../xgnokii/xgnokii.c:1132 msgid "Keyboard" msgstr "" #: ../xgnokii/xgnokii.c:1137 ../xgnokii/xgnokii_netmon.c:294 msgid "Net Monitor" msgstr "" #: ../xgnokii/xgnokii.c:1147 msgid "Data calls" msgstr "" #: ../xgnokii/xgnokii.c:1156 ../xgnokii/xgnokii.c:1575 msgid "Options" msgstr "" #: ../xgnokii/xgnokii.c:1166 ../xgnokii/xgnokii.c:1183 msgid "About" msgstr "" #: ../xgnokii/xgnokii.c:1186 ../xgnokii/xgnokii.c:1358 #: ../xgnokii/xgnokii_calendar.c:688 ../xgnokii/xgnokii_calendar.c:734 #: ../xgnokii/xgnokii_calendar.c:881 ../xgnokii/xgnokii_calendar.c:1001 #: ../xgnokii/xgnokii_calendar.c:1141 ../xgnokii/xgnokii_calendar.c:1274 #: ../xgnokii/xgnokii_calendar.c:1435 ../xgnokii/xgnokii_contacts.c:875 #: ../xgnokii/xgnokii_contacts.c:1119 ../xgnokii/xgnokii_contacts.c:1255 #: ../xgnokii/xgnokii_contacts.c:1406 ../xgnokii/xgnokii_contacts.c:2949 #: ../xgnokii/xgnokii_sms.c:570 msgid "Ok" msgstr "" #: ../xgnokii/xgnokii.c:1197 #, c-format msgid "" "xgnokii version: %s\n" "gnokii version: %s\n" "\n" "Copyright (C) 1999-2004 Pavel Janik ml.,\n" "Hugh Blemings, Jan Derfinak,\n" "Pawel Kot and others\n" "xgnokii is free software, covered by the GNU General Public License,\n" "and you are welcome to change it and/or distribute copies of it under\n" "certain conditions. There is absolutely no warranty for xgnokii.\n" "See GPL for details.\n" msgstr "" #: ../xgnokii/xgnokii.c:1352 msgid "Edit SMS Setting" msgstr "" #: ../xgnokii/xgnokii.c:1366 ../xgnokii/xgnokii_calendar.c:697 #: ../xgnokii/xgnokii_calendar.c:743 ../xgnokii/xgnokii_calendar.c:890 #: ../xgnokii/xgnokii_calendar.c:1010 ../xgnokii/xgnokii_calendar.c:1150 #: ../xgnokii/xgnokii_calendar.c:1283 ../xgnokii/xgnokii_calendar.c:1443 #: ../xgnokii/xgnokii_common.c:80 ../xgnokii/xgnokii_common.c:162 #: ../xgnokii/xgnokii_contacts.c:886 ../xgnokii/xgnokii_contacts.c:1263 #: ../xgnokii/xgnokii_contacts.c:1414 ../xgnokii/xgnokii_contacts.c:1651 #: ../xgnokii/xgnokii_contacts.c:1698 ../xgnokii/xgnokii_contacts.c:1816 #: ../xgnokii/xgnokii_contacts.c:2212 ../xgnokii/xgnokii_contacts.c:2956 #: ../xgnokii/xgnokii_sms.c:578 msgid "Cancel" msgstr "" #: ../xgnokii/xgnokii.c:1379 msgid "Set's name:" msgstr "" #: ../xgnokii/xgnokii.c:1393 msgid "Center:" msgstr "" #: ../xgnokii/xgnokii.c:1407 msgid "Sending Format:" msgstr "" #: ../xgnokii/xgnokii.c:1447 msgid "Validity Period:" msgstr "" #: ../xgnokii/xgnokii.c:1572 msgid "Set's name" msgstr "" #: ../xgnokii/xgnokii.c:1572 msgid "Center number" msgstr "" #: ../xgnokii/xgnokii.c:1572 msgid "Format" msgstr "" #: ../xgnokii/xgnokii.c:1572 msgid "Validity" msgstr "" #: ../xgnokii/xgnokii.c:1580 msgid "Apply" msgstr "" #: ../xgnokii/xgnokii.c:1588 ../xgnokii/xgnokii_contacts.c:2198 #: ../xgnokii/xgnokii_dtmf.c:181 msgid "Save" msgstr "" #: ../xgnokii/xgnokii.c:1594 msgid "Close" msgstr "" #. ** Connection notebook ** #: ../xgnokii/xgnokii.c:1608 msgid "Phone and connection type" msgstr "" #: ../xgnokii/xgnokii.c:1622 msgid "Port:" msgstr "" #: ../xgnokii/xgnokii.c:1636 ../xgnokii/xgnokii.c:1716 msgid "Model:" msgstr "" #: ../xgnokii/xgnokii.c:1650 msgid "Bindir:" msgstr "" #: ../xgnokii/xgnokii.c:1664 msgid "Init length:" msgstr "" #: ../xgnokii/xgnokii.c:1679 msgid "Connection:" msgstr "" #: ../xgnokii/xgnokii.c:1683 msgid "infrared" msgstr "" #: ../xgnokii/xgnokii.c:1690 msgid "serial" msgstr "" #: ../xgnokii/xgnokii.c:1697 msgid "irda" msgstr "" #. ** Phone notebook ** #: ../xgnokii/xgnokii.c:1702 msgid "Phone information" msgstr "" #: ../xgnokii/xgnokii.c:1730 msgid "Version:" msgstr "" #: ../xgnokii/xgnokii.c:1744 msgid "Revision:" msgstr "" #: ../xgnokii/xgnokii.c:1758 msgid "IMEI:" msgstr "" #: ../xgnokii/xgnokii.c:1772 msgid "Names length:" msgstr "" #: ../xgnokii/xgnokii.c:1780 msgid "SIM:" msgstr "" #: ../xgnokii/xgnokii.c:1798 msgid "Phone:" msgstr "" #: ../xgnokii/xgnokii.c:1805 msgid "Alarm setting" msgstr "" #: ../xgnokii/xgnokii.c:1812 ../xgnokii/xgnokii.c:1819 #: ../xgnokii/xgnokii_calendar.c:957 ../xgnokii/xgnokii_calendar.c:1089 #: ../xgnokii/xgnokii_calendar.c:1218 ../xgnokii/xgnokii_calendar.c:1350 #: ../xgnokii/xgnokii_calendar.c:1542 msgid "Alarm" msgstr "" #. ** SMS notebook ** #: ../xgnokii/xgnokii.c:1842 ../xgnokii/xgnokii_sms.c:1672 msgid "Short Message Service" msgstr "" #: ../xgnokii/xgnokii.c:1875 msgid "Edit" msgstr "" #. ** Business notebook ** #: ../xgnokii/xgnokii.c:1887 ../xgnokii/xgnokii_sms.c:1541 #: ../xgnokii/xgnokii_sms.c:1716 msgid "Business Card" msgstr "" #: ../xgnokii/xgnokii.c:1893 msgid "User" msgstr "" #: ../xgnokii/xgnokii.c:1911 ../xgnokii/xgnokii_calendar.c:1206 #: ../xgnokii/xgnokii_calendar.c:1338 ../xgnokii/xgnokii_contacts.c:1276 msgid "Name:" msgstr "" #: ../xgnokii/xgnokii.c:1936 msgid "Title:" msgstr "" #: ../xgnokii/xgnokii.c:1961 msgid "Company:" msgstr "" #: ../xgnokii/xgnokii.c:1986 msgid "Telephone:" msgstr "" #: ../xgnokii/xgnokii.c:2012 msgid "Fax:" msgstr "" #: ../xgnokii/xgnokii.c:2037 msgid "Email:" msgstr "" #: ../xgnokii/xgnokii.c:2062 msgid "Address:" msgstr "" #. ** Groups notebook ** #: ../xgnokii/xgnokii.c:2085 msgid "Caller groups names" msgstr "" #: ../xgnokii/xgnokii.c:2092 msgid "Groups" msgstr "" #: ../xgnokii/xgnokii.c:2100 #, c-format msgid "Group %d:" msgstr "" #. Mail #: ../xgnokii/xgnokii.c:2113 msgid "Mailbox" msgstr "" #: ../xgnokii/xgnokii.c:2120 msgid "Mail" msgstr "" #: ../xgnokii/xgnokii.c:2127 msgid "Path to mailbox:" msgstr "" #: ../xgnokii/xgnokii_calendar.c:131 msgid "Function not implemented!" msgstr "" #: ../xgnokii/xgnokii_calendar.c:194 #, c-format msgid "%04d/%02d/%02d" msgstr "" #: ../xgnokii/xgnokii_calendar.c:197 ../xgnokii/xgnokii_calendar.c:203 #, c-format msgid "%04d/%02d/%02d %02d:%02d" msgstr "" #: ../xgnokii/xgnokii_calendar.c:211 #, c-format msgid "%02d/%02d %02d:%02d tone %s" msgstr "" #: ../xgnokii/xgnokii_calendar.c:216 #, c-format msgid "%04d/%02d/%02d %02d:%02d tone %s" msgstr "" #: ../xgnokii/xgnokii_calendar.c:229 msgid "never" msgstr "" #: ../xgnokii/xgnokii_calendar.c:232 msgid "daily" msgstr "" #: ../xgnokii/xgnokii_calendar.c:235 msgid "weekly" msgstr "" #: ../xgnokii/xgnokii_calendar.c:238 msgid "every two weeks" msgstr "" #: ../xgnokii/xgnokii_calendar.c:241 msgid "monthly" msgstr "" #: ../xgnokii/xgnokii_calendar.c:244 msgid "yearly" msgstr "" #: ../xgnokii/xgnokii_calendar.c:247 #, c-format msgid "every %d minutes" msgstr "" #: ../xgnokii/xgnokii_calendar.c:282 msgid "Type: " msgstr "" #: ../xgnokii/xgnokii_calendar.c:292 msgid "Start date: " msgstr "" #: ../xgnokii/xgnokii_calendar.c:322 msgid "End date: " msgstr "" #: ../xgnokii/xgnokii_calendar.c:333 msgid "Alarm: " msgstr "" #: ../xgnokii/xgnokii_calendar.c:344 msgid "Number: " msgstr "" #: ../xgnokii/xgnokii_calendar.c:355 msgid "Location: " msgstr "" #: ../xgnokii/xgnokii_calendar.c:366 msgid "Recurrence: " msgstr "" #: ../xgnokii/xgnokii_calendar.c:374 msgid "Text: " msgstr "" #: ../xgnokii/xgnokii_calendar.c:504 #, c-format msgid "" "Error saving calendar note\n" "%s" msgstr "" #: ../xgnokii/xgnokii_calendar.c:632 #, c-format msgid "%d-%02d-%02d" msgstr "" #: ../xgnokii/xgnokii_calendar.c:641 #, c-format msgid "%d-%02d-%02d %02d:%02d" msgstr "" #: ../xgnokii/xgnokii_calendar.c:681 ../xgnokii/xgnokii_calendar.c:727 msgid "Choose date" msgstr "" #: ../xgnokii/xgnokii_calendar.c:767 msgid "Alarm time:" msgstr "" #: ../xgnokii/xgnokii_calendar.c:837 msgid "Every Day" msgstr "" #: ../xgnokii/xgnokii_calendar.c:843 msgid "Every Week" msgstr "" #: ../xgnokii/xgnokii_calendar.c:849 msgid "Every 2 Weeks" msgstr "" #: ../xgnokii/xgnokii_calendar.c:855 msgid "Every Year" msgstr "" #. #. gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL, _("Edit note"), NULL, #. NewPixmap(Edit_xpm, GUI_CalendarWindow->window, #. &GUI_CalendarWindow->style->bg[GTK_STATE_NORMAL]), #. (GtkSignalFunc) NULL, NULL); #. #: ../xgnokii/xgnokii_calendar.c:874 ../xgnokii/xgnokii_calendar.c:1610 msgid "Add reminder" msgstr "" #: ../xgnokii/xgnokii_calendar.c:910 ../xgnokii/xgnokii_calendar.c:1029 #: ../xgnokii/xgnokii_calendar.c:1170 ../xgnokii/xgnokii_calendar.c:1303 msgid "Date:" msgstr "" #: ../xgnokii/xgnokii_calendar.c:945 msgid "Subject:" msgstr "" #: ../xgnokii/xgnokii_calendar.c:994 msgid "Add Call" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1064 ../xgnokii/xgnokii_contacts.c:1289 #: ../xgnokii/xgnokii_contacts.c:1827 msgid "Number:" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1077 msgid "Text:" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1109 ../xgnokii/xgnokii_calendar.c:1241 msgid "Repeat:" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1134 ../xgnokii/xgnokii_calendar.c:1618 msgid "Add meeting" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1267 ../xgnokii/xgnokii_calendar.c:1622 msgid "Add birthday" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1428 msgid "Delete calendar note" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1460 msgid "Do you want to delete selected note(s)?" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1496 ../xgnokii/xgnokii_contacts.c:3081 #: ../xgnokii/xgnokii_dtmf.c:219 ../xgnokii/xgnokii_logos.c:1474 #: ../xgnokii/xgnokii_netmon.c:258 ../xgnokii/xgnokii_sms.c:1245 #: ../xgnokii/xgnokii_sms.c:1633 ../xgnokii/xgnokii_speed.c:516 #: ../xgnokii/xgnokii_xkeyb.c:235 ../xgnokii/xgnokii_xring.c:826 msgid "/_File" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1497 ../xgnokii/xgnokii_contacts.c:3082 #: ../xgnokii/xgnokii_speed.c:517 msgid "/File/_Read from phone" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1498 ../xgnokii/xgnokii_contacts.c:3083 #: ../xgnokii/xgnokii_speed.c:518 msgid "/File/_Save to phone" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1499 ../xgnokii/xgnokii_contacts.c:3084 #: ../xgnokii/xgnokii_dtmf.c:222 ../xgnokii/xgnokii_logos.c:1478 #: ../xgnokii/xgnokii_sms.c:1248 ../xgnokii/xgnokii_sms.c:1637 #: ../xgnokii/xgnokii_speed.c:519 msgid "/File/Sep1" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1500 msgid "/File/Send via S_MS" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1501 ../xgnokii/xgnokii_contacts.c:3087 #: ../xgnokii/xgnokii_logos.c:1482 ../xgnokii/xgnokii_sms.c:1251 #: ../xgnokii/xgnokii_speed.c:522 msgid "/File/Sep2" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1502 ../xgnokii/xgnokii_contacts.c:3085 #: ../xgnokii/xgnokii_speed.c:520 msgid "/File/_Import from file" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1503 ../xgnokii/xgnokii_contacts.c:3086 #: ../xgnokii/xgnokii_speed.c:521 msgid "/File/_Export to file" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1504 msgid "/File/Sep3" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1505 ../xgnokii/xgnokii_contacts.c:3088 #: ../xgnokii/xgnokii_dtmf.c:223 ../xgnokii/xgnokii_logos.c:1483 #: ../xgnokii/xgnokii_netmon.c:259 ../xgnokii/xgnokii_sms.c:1252 #: ../xgnokii/xgnokii_sms.c:1638 ../xgnokii/xgnokii_speed.c:523 #: ../xgnokii/xgnokii_xkeyb.c:236 ../xgnokii/xgnokii_xring.c:836 msgid "/File/_Close" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1506 ../xgnokii/xgnokii_contacts.c:3089 #: ../xgnokii/xgnokii_logos.c:1484 ../xgnokii/xgnokii_speed.c:524 #: ../xgnokii/xgnokii_xring.c:837 msgid "/_Edit" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1507 msgid "/Edit/Add _reminder" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1508 msgid "/Edit/Add _call" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1509 msgid "/Edit/Add _meeting" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1510 msgid "/Edit/Add _birthday" msgstr "" #. #. menu_items[15].path = _("/Edit/_Edit"); #. #: ../xgnokii/xgnokii_calendar.c:1514 ../xgnokii/xgnokii_contacts.c:3093 msgid "/Edit/_Delete" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1515 ../xgnokii/xgnokii_contacts.c:3096 #: ../xgnokii/xgnokii_logos.c:1492 msgid "/Edit/Sep4" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1516 ../xgnokii/xgnokii_contacts.c:3100 msgid "/Edit/Select _all" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1517 ../xgnokii/xgnokii_contacts.c:3103 #: ../xgnokii/xgnokii_dtmf.c:224 ../xgnokii/xgnokii_netmon.c:263 #: ../xgnokii/xgnokii_sms.c:1253 ../xgnokii/xgnokii_sms.c:1647 #: ../xgnokii/xgnokii_speed.c:526 ../xgnokii/xgnokii_xkeyb.c:237 msgid "/_Help" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1518 ../xgnokii/xgnokii_contacts.c:3104 #: ../xgnokii/xgnokii_dtmf.c:225 ../xgnokii/xgnokii_netmon.c:264 #: ../xgnokii/xgnokii_sms.c:1254 ../xgnokii/xgnokii_sms.c:1648 #: ../xgnokii/xgnokii_speed.c:527 ../xgnokii/xgnokii_xkeyb.c:238 msgid "/Help/_About" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1535 msgid "#" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1537 msgid "Start date" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1538 msgid "End date" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1543 msgid "Recurrence" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1576 ../xgnokii/xgnokii_contacts.c:3157 #: ../xgnokii/xgnokii_speed.c:579 msgid "Read from phone" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1580 ../xgnokii/xgnokii_contacts.c:3161 #: ../xgnokii/xgnokii_speed.c:583 msgid "Save to phone" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1587 msgid "Send via SMS" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1594 ../xgnokii/xgnokii_contacts.c:2753 #: ../xgnokii/xgnokii_contacts.c:3168 ../xgnokii/xgnokii_logos.c:1572 #: ../xgnokii/xgnokii_speed.c:395 ../xgnokii/xgnokii_speed.c:590 #: ../xgnokii/xgnokii_xring.c:894 msgid "Import from file" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1598 ../xgnokii/xgnokii_contacts.c:2671 #: ../xgnokii/xgnokii_contacts.c:3172 ../xgnokii/xgnokii_logos.c:1576 #: ../xgnokii/xgnokii_speed.c:474 ../xgnokii/xgnokii_speed.c:594 #: ../xgnokii/xgnokii_xring.c:898 msgid "Export to file" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1614 msgid "Add call" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1626 msgid "Delete note" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1691 ../xgnokii/xgnokii_contacts.c:2290 #: ../xgnokii/xgnokii_contacts.c:2316 ../xgnokii/xgnokii_contacts.c:2979 #: ../xgnokii/xgnokii_contacts.c:3225 ../xgnokii/xgnokii_sms.c:1799 #: ../xgnokii/xgnokii_speed.c:190 ../xgnokii/xgnokii_speed.c:196 #: ../xgnokii/xgnokii_speed.c:256 ../xgnokii/xgnokii_speed.c:340 #: ../xgnokii/xgnokii_speed.c:624 #, c-format msgid "Error: %s: line %d: Can't allocate memory!\n" msgstr "" #: ../xgnokii/xgnokii_calendar.c:1720 ../xgnokii/xgnokii_sms.c:1833 msgid "couldn't allocate colour" msgstr "" #: ../xgnokii/xgnokii_cfg.c:117 #, c-format msgid "WARNING: Can't allocate memory for config reading!\n" msgstr "" #: ../xgnokii/xgnokii_cfg.c:211 #, c-format msgid "ERROR: Can't open file %s for writing!\n" msgstr "" #: ../xgnokii/xgnokii_cfg.c:221 #, c-format msgid "ERROR: Can't allocate memory for config writing!\n" msgstr "" #: ../xgnokii/xgnokii_cfg.c:226 #, c-format msgid "ERROR: Can't write config file!\n" msgstr "" #: ../xgnokii/xgnokii_common.c:73 msgid "Error" msgstr "" #: ../xgnokii/xgnokii_common.c:110 msgid "Info" msgstr "" #: ../xgnokii/xgnokii_common.c:146 msgid "Yes" msgstr "" #: ../xgnokii/xgnokii_common.c:155 msgid "No" msgstr "" #: ../xgnokii/xgnokii_common.c:236 #, c-format msgid "Can't exec %s\n" msgstr "" #: ../xgnokii/xgnokii_contacts.c:143 #, c-format msgid "SIM: %d/%d%c Phone: %d/%d%c" msgstr "" #: ../xgnokii/xgnokii_contacts.c:317 ../xgnokii/xgnokii_contacts.c:337 msgid "Can't change memory type!" msgstr "" #: ../xgnokii/xgnokii_contacts.c:383 #, c-format msgid "" "Phonebook name will be truncated to\n" "%.*s" msgstr "" #: ../xgnokii/xgnokii_contacts.c:611 msgid "Can't find pattern!" msgstr "" #: ../xgnokii/xgnokii_contacts.c:707 ../xgnokii/xgnokii_contacts.c:794 #: ../xgnokii/xgnokii_contacts.c:939 ../xgnokii/xgnokii_contacts.c:981 #: ../xgnokii/xgnokii_contacts.c:1190 msgid "Mobile" msgstr "" #: ../xgnokii/xgnokii_contacts.c:737 ../xgnokii/xgnokii_contacts.c:809 #: ../xgnokii/xgnokii_contacts.c:944 ../xgnokii/xgnokii_contacts.c:986 #: ../xgnokii/xgnokii_contacts.c:1216 msgid "Postal" msgstr "" #: ../xgnokii/xgnokii_contacts.c:869 msgid "Edit subentries" msgstr "" #: ../xgnokii/xgnokii_contacts.c:894 msgid "Delete" msgstr "" #: ../xgnokii/xgnokii_contacts.c:913 msgid "Number/Text:" msgstr "" #: ../xgnokii/xgnokii_contacts.c:925 msgid "Type:" msgstr "" #: ../xgnokii/xgnokii_contacts.c:960 ../xgnokii/xgnokii_contacts.c:1356 #: ../xgnokii/xgnokii_contacts.c:3187 ../xgnokii/xgnokii_speed.c:601 msgid "Edit entry" msgstr "" #: ../xgnokii/xgnokii_contacts.c:1111 msgid "Numbers" msgstr "" #: ../xgnokii/xgnokii_contacts.c:1131 msgid "New" msgstr "" #: ../xgnokii/xgnokii_contacts.c:1315 msgid "Memory:" msgstr "" #: ../xgnokii/xgnokii_contacts.c:1319 msgid "phone" msgstr "" #: ../xgnokii/xgnokii_contacts.c:1336 msgid "Caller group:" msgstr "" #: ../xgnokii/xgnokii_contacts.c:1399 msgid "Delete entries" msgstr "" #: ../xgnokii/xgnokii_contacts.c:1431 msgid "Do you want to delete selected entries?" msgstr "" #: ../xgnokii/xgnokii_contacts.c:1449 ../xgnokii/xgnokii_contacts.c:3179 msgid "New entry" msgstr "" #: ../xgnokii/xgnokii_contacts.c:1493 ../xgnokii/xgnokii_contacts.c:3183 msgid "Duplicate entry" msgstr "" #: ../xgnokii/xgnokii_contacts.c:1562 ../xgnokii/xgnokii_contacts.c:1570 #: ../xgnokii/xgnokii_contacts.c:1598 msgid "Can't find free memory." msgstr "" #: ../xgnokii/xgnokii_contacts.c:1635 msgid "Changing memory type" msgstr "" #: ../xgnokii/xgnokii_contacts.c:1642 msgid "Continue" msgstr "" #: ../xgnokii/xgnokii_contacts.c:1664 msgid "" "If you change from phone memory to SIM memory\n" "some entries may be truncated." msgstr "" #: ../xgnokii/xgnokii_contacts.c:1682 ../xgnokii/xgnokii_contacts.c:1688 msgid "Find" msgstr "" #: ../xgnokii/xgnokii_contacts.c:1714 msgid "Pattern:" msgstr "" #: ../xgnokii/xgnokii_contacts.c:1800 msgid "Dial pad" msgstr "" #: ../xgnokii/xgnokii_contacts.c:1806 msgid "Dial" msgstr "" #: ../xgnokii/xgnokii_contacts.c:2059 msgid "Phone memory..." msgstr "" #: ../xgnokii/xgnokii_contacts.c:2070 msgid "SIM memory..." msgstr "" #: ../xgnokii/xgnokii_contacts.c:2135 msgid "Saving entries" msgstr "" #: ../xgnokii/xgnokii_contacts.c:2150 ../xgnokii/xgnokii_contacts.c:2170 #, c-format msgid "%s: line %d: Can't write %s memory entry number %d! Error: %s\n" msgstr "" #: ../xgnokii/xgnokii_contacts.c:2192 msgid "Save changes?" msgstr "" #: ../xgnokii/xgnokii_contacts.c:2206 msgid "Don't save" msgstr "" #: ../xgnokii/xgnokii_contacts.c:2228 msgid "" "You have made changes in your\n" "contacts directory.\n" "\n" "\n" "Do you want to save these changes into your phone?\n" msgstr "" #: ../xgnokii/xgnokii_contacts.c:2420 msgid "Getting entries" msgstr "" #: ../xgnokii/xgnokii_contacts.c:2654 ../xgnokii/xgnokii_dtmf.c:166 #: ../xgnokii/xgnokii_logos.c:1350 ../xgnokii/xgnokii_speed.c:457 msgid "Overwrite file?" msgstr "" #: ../xgnokii/xgnokii_contacts.c:2655 ../xgnokii/xgnokii_dtmf.c:167 #: ../xgnokii/xgnokii_logos.c:1351 ../xgnokii/xgnokii_speed.c:458 #, c-format msgid "" "File %s already exists.\n" "Overwrite?" msgstr "" #: ../xgnokii/xgnokii_contacts.c:2936 ../xgnokii/xgnokii_contacts.c:3120 msgid "Memory" msgstr "" #: ../xgnokii/xgnokii_contacts.c:2946 ../xgnokii/xgnokii_sms.c:1358 msgid "Select contacts" msgstr "" #: ../xgnokii/xgnokii_contacts.c:3090 msgid "/Edit/_New" msgstr "" #: ../xgnokii/xgnokii_contacts.c:3091 msgid "/Edit/D_uplicate" msgstr "" #: ../xgnokii/xgnokii_contacts.c:3092 ../xgnokii/xgnokii_speed.c:525 msgid "/Edit/_Edit" msgstr "" #: ../xgnokii/xgnokii_contacts.c:3094 ../xgnokii/xgnokii_logos.c:1487 msgid "/Edit/Sep3" msgstr "" #: ../xgnokii/xgnokii_contacts.c:3095 msgid "/Edit/_Change memory type" msgstr "" #: ../xgnokii/xgnokii_contacts.c:3097 msgid "/Edit/_Find" msgstr "" #: ../xgnokii/xgnokii_contacts.c:3098 msgid "/Edit/Find ne_xt" msgstr "" #: ../xgnokii/xgnokii_contacts.c:3099 msgid "/Edit/Sep5" msgstr "" #: ../xgnokii/xgnokii_contacts.c:3101 msgid "/_Dial" msgstr "" #: ../xgnokii/xgnokii_contacts.c:3102 msgid "/Dial/Dial _voice" msgstr "" #: ../xgnokii/xgnokii_contacts.c:3191 msgid "Delete entry" msgstr "" #: ../xgnokii/xgnokii_contacts.c:3198 msgid "Dial voice" msgstr "" #: ../xgnokii/xgnokii_data.c:52 #, c-format msgid "" "Data calls are currently\n" "Disabled\n" " " msgstr "" #: ../xgnokii/xgnokii_data.c:54 #, c-format msgid "" "Data calls are currently\n" "Enabled\n" " " msgstr "" #: ../xgnokii/xgnokii_data.c:102 msgid "Virtual Modem" msgstr "" #: ../xgnokii/xgnokii.desktop.in.h:1 msgid "Manage your mobile phone" msgstr "" #: ../xgnokii/xgnokii.desktop.in.h:2 #, fuzzy msgid "Mobile Phone Suite" msgstr "Número Movél" #: ../xgnokii/xgnokii.desktop.in.h:3 msgid "Xgnokii" msgstr "" #: ../xgnokii/xgnokii_dtmf.c:100 ../xgnokii/xgnokii_speed.c:351 #: ../xgnokii/xgnokii_speed.c:376 #, c-format msgid "Error reading file!" msgstr "" #: ../xgnokii/xgnokii_dtmf.c:116 msgid "Load" msgstr "" #: ../xgnokii/xgnokii_dtmf.c:220 ../xgnokii/xgnokii_logos.c:1475 #: ../xgnokii/xgnokii_xring.c:827 msgid "/File/_Open" msgstr "" #: ../xgnokii/xgnokii_dtmf.c:221 ../xgnokii/xgnokii_logos.c:1476 #: ../xgnokii/xgnokii_sms.c:1247 ../xgnokii/xgnokii_sms.c:1634 #: ../xgnokii/xgnokii_xring.c:828 msgid "/File/_Save" msgstr "" #: ../xgnokii/xgnokii_dtmf.c:247 msgid "Dial Tone" msgstr "" #: ../xgnokii/xgnokii_dtmf.c:312 msgid "Pause" msgstr "" #: ../xgnokii/xgnokii_dtmf.c:317 msgid "Wait" msgstr "" #: ../xgnokii/xgnokii_logos.c:972 #, c-format msgid "" "Error getting network info\n" "%s" msgstr "" #: ../xgnokii/xgnokii_logos.c:1018 #, c-format msgid "" "Error getting bitmap\n" "%s" msgstr "" #: ../xgnokii/xgnokii_logos.c:1068 #, c-format msgid "" "Error setting bitmap\n" "%s" msgstr "" #: ../xgnokii/xgnokii_logos.c:1323 ../xgnokii/xgnokii_xring.c:650 #: ../xgnokii/xgnokii_xring.c:693 #, c-format msgid "" "Error writing file\n" "%s" msgstr "" #: ../xgnokii/xgnokii_logos.c:1382 ../xgnokii/xgnokii_xring.c:613 #, c-format msgid "" "Error reading file\n" "%s" msgstr "" #: ../xgnokii/xgnokii_logos.c:1409 msgid "Save logo as ..." msgstr "" #: ../xgnokii/xgnokii_logos.c:1434 msgid "Open logo..." msgstr "" #: ../xgnokii/xgnokii_logos.c:1477 ../xgnokii/xgnokii_xring.c:829 msgid "/File/Save _as ..." msgstr "" #: ../xgnokii/xgnokii_logos.c:1479 msgid "/File/_Get operator" msgstr "" #: ../xgnokii/xgnokii_logos.c:1480 msgid "/File/Get _logo" msgstr "" #: ../xgnokii/xgnokii_logos.c:1481 msgid "/File/Se_t logo" msgstr "" #: ../xgnokii/xgnokii_logos.c:1485 ../xgnokii/xgnokii_xring.c:838 msgid "/Edit/_Clear" msgstr "" #: ../xgnokii/xgnokii_logos.c:1486 msgid "/Edit/_Invert" msgstr "" #: ../xgnokii/xgnokii_logos.c:1488 msgid "/Edit/_Up logo" msgstr "" #: ../xgnokii/xgnokii_logos.c:1489 msgid "/Edit/_Down logo" msgstr "" #: ../xgnokii/xgnokii_logos.c:1490 msgid "/Edit/_Left logo" msgstr "" #: ../xgnokii/xgnokii_logos.c:1491 msgid "/Edit/_Right logo" msgstr "" #: ../xgnokii/xgnokii_logos.c:1493 msgid "/Edit/Flip _horizontal" msgstr "" #: ../xgnokii/xgnokii_logos.c:1494 msgid "/Edit/Flip _vertical" msgstr "" #: ../xgnokii/xgnokii_logos.c:1553 msgid "Clear logo" msgstr "" #: ../xgnokii/xgnokii_logos.c:1560 msgid "Get logo" msgstr "" #: ../xgnokii/xgnokii_logos.c:1565 msgid "Set logo" msgstr "" #: ../xgnokii/xgnokii_logos.c:1585 msgid "Startup logo" msgstr "" #: ../xgnokii/xgnokii_logos.c:1594 msgid "Operator logo" msgstr "" #: ../xgnokii/xgnokii_logos.c:1604 msgid "Caller logo" msgstr "" #: ../xgnokii/xgnokii_logos.c:1731 msgid "Brush tool" msgstr "" #: ../xgnokii/xgnokii_logos.c:1742 msgid "Line tool" msgstr "" #: ../xgnokii/xgnokii_logos.c:1752 msgid "Rectangle tool" msgstr "" #: ../xgnokii/xgnokii_logos.c:1762 msgid "Filled rectangle tool" msgstr "" #: ../xgnokii/xgnokii_logos.c:1771 msgid "Invert logo" msgstr "" #: ../xgnokii/xgnokii_logos.c:1776 msgid "Horizontal flip" msgstr "" #: ../xgnokii/xgnokii_logos.c:1781 msgid "Vertical flip" msgstr "" #: ../xgnokii/xgnokii_logos.c:1836 msgid "Load preview pixmap error, feature disabled." msgstr "" #: ../xgnokii/xgnokii_lowlevel.c:210 #, c-format msgid "Failed to open the phone. Quitting.\n" msgstr "" #. We have some misconfiguration: phone doesn't handle #. neither folders nor SIM #: ../xgnokii/xgnokii_lowlevel.c:403 #, c-format msgid "" "Misconfiguration detected: phone handles neither folders nor sim.\n" "Contact gnokii developers to fix the issue.\n" msgstr "" #: ../xgnokii/xgnokii_lowlevel.c:481 #, c-format msgid "%s: line %d: Can't get memory entry number %d from memory %d! %d\n" msgstr "" #: ../xgnokii/xgnokii_lowlevel.c:1249 msgid "Connecting..." msgstr "" #: ../xgnokii/xgnokii_lowlevel.c:1260 msgid "" "It has been reported that your phone is known to be broken by xgnokii.\n" "Exiting application to avoid breakage. If you want to take a risk and\n" "run xgnokii anyway, set:\n" "\n" "\tallow_breakage = 1\n" "\n" "in xgnokii section in your config file.\n" "See http://thread.gmane.org/gmane.linux.drivers.gnokii/3195 for details.\n" msgstr "" #: ../xgnokii/xgnokii_lowlevel.c:1397 msgid "Refreshing SMSes..." msgstr "" #: ../xgnokii/xgnokii_netmon.c:260 msgid "/_Tools" msgstr "" #: ../xgnokii/xgnokii_netmon.c:261 msgid "/Tools/Net monitor o_n" msgstr "" #: ../xgnokii/xgnokii_netmon.c:262 msgid "/Tools/Net monitor o_ff" msgstr "" #: ../xgnokii/xgnokii_netmon.c:354 ../xgnokii/xgnokii_netmon.c:357 msgid "Active cell" msgstr "" #: ../xgnokii/xgnokii_netmon.c:360 msgid "NCELL list I" msgstr "" #: ../xgnokii/xgnokii_netmon.c:363 msgid "NCELL list II" msgstr "" #: ../xgnokii/xgnokii_netmon.c:366 msgid "NCELL list III" msgstr "" #: ../xgnokii/xgnokii_netmon.c:369 msgid "Preferred/Denied networks" msgstr "" #: ../xgnokii/xgnokii_netmon.c:372 msgid "System information bits" msgstr "" #: ../xgnokii/xgnokii_netmon.c:375 msgid "TMSI, Paging, PLU" msgstr "" #: ../xgnokii/xgnokii_netmon.c:378 msgid "Cells info" msgstr "" #: ../xgnokii/xgnokii_netmon.c:381 msgid "DTX, Cipher, Hopping" msgstr "" #: ../xgnokii/xgnokii_netmon.c:392 msgid "Uplink DTX" msgstr "" #: ../xgnokii/xgnokii_netmon.c:395 msgid "BTS TEST" msgstr "" #: ../xgnokii/xgnokii_netmon.c:398 msgid "CELL BARR-Flag" msgstr "" #: ../xgnokii/xgnokii_netmon.c:401 msgid "Accumulator, Charge status" msgstr "" #: ../xgnokii/xgnokii_netmon.c:404 msgid "?Constant voltage charging display" msgstr "" #: ../xgnokii/xgnokii_netmon.c:407 msgid "?Battery full detection" msgstr "" #: ../xgnokii/xgnokii_netmon.c:410 msgid "Accumulator" msgstr "" #: ../xgnokii/xgnokii_netmon.c:413 msgid "SW-Resets" msgstr "" #: ../xgnokii/xgnokii_netmon.c:416 msgid "Reset-Counter" msgstr "" #: ../xgnokii/xgnokii_netmon.c:420 msgid "Cause codes for last connection abortion" msgstr "" #: ../xgnokii/xgnokii_netmon.c:431 msgid "Reset handover counters" msgstr "" #: ../xgnokii/xgnokii_netmon.c:434 msgid "Handover Counter" msgstr "" #: ../xgnokii/xgnokii_netmon.c:437 msgid "Handover Counter (Dual)" msgstr "" #: ../xgnokii/xgnokii_netmon.c:440 msgid "L2-Timeouts" msgstr "" #: ../xgnokii/xgnokii_netmon.c:443 msgid "SIM" msgstr "" #: ../xgnokii/xgnokii_netmon.c:446 msgid "?Block display 1" msgstr "" #: ../xgnokii/xgnokii_netmon.c:452 msgid "Memory status before reset" msgstr "" #: ../xgnokii/xgnokii_netmon.c:455 msgid "Reset Counters" msgstr "" #: ../xgnokii/xgnokii_netmon.c:459 msgid "Counter for PLMN Search and Cell reselection (Singleband)" msgstr "" #: ../xgnokii/xgnokii_netmon.c:470 msgid "Neighbourhood measurement" msgstr "" #: ../xgnokii/xgnokii_netmon.c:473 msgid "Calls" msgstr "" #: ../xgnokii/xgnokii_netmon.c:476 msgid "Temporary counters of DSP" msgstr "" #: ../xgnokii/xgnokii_netmon.c:480 msgid "Control of task information displays" msgstr "" #: ../xgnokii/xgnokii_netmon.c:483 msgid "Information about task numbers 0-7" msgstr "" #: ../xgnokii/xgnokii_netmon.c:487 msgid "Information about task numbers 8-15" msgstr "" #: ../xgnokii/xgnokii_netmon.c:491 msgid "Information about task numbers 16-23" msgstr "" #: ../xgnokii/xgnokii_netmon.c:494 msgid "Information about OS_SYSTEM_STACK" msgstr "" #: ../xgnokii/xgnokii_netmon.c:498 msgid "Information about current MCU and DSP software versions" msgstr "" #: ../xgnokii/xgnokii_netmon.c:501 msgid "Hardware version" msgstr "" #: ../xgnokii/xgnokii_netmon.c:520 msgid "Chan" msgstr "" #: ../xgnokii/xgnokii_netmon.c:521 msgid "RxLv" msgstr "" #: ../xgnokii/xgnokii_netmon.c:522 msgid "C1" msgstr "" #: ../xgnokii/xgnokii_netmon.c:523 msgid "C2" msgstr "" #: ../xgnokii/xgnokii_netmon.c:524 msgid "ACT" msgstr "" #: ../xgnokii/xgnokii_netmon.c:525 msgid "NC2" msgstr "" #: ../xgnokii/xgnokii_netmon.c:526 msgid "NC3" msgstr "" #: ../xgnokii/xgnokii_netmon.c:527 msgid "NC4" msgstr "" #: ../xgnokii/xgnokii_netmon.c:528 msgid "NC5" msgstr "" #: ../xgnokii/xgnokii_netmon.c:529 msgid "NC6" msgstr "" #: ../xgnokii/xgnokii_netmon.c:530 msgid "NC7" msgstr "" #: ../xgnokii/xgnokii_netmon.c:560 msgid "Page:" msgstr "" #: ../xgnokii/xgnokii_sms.c:250 ../xgnokii/xgnokii_sms.c:330 #: ../xgnokii/xgnokii_sms.c:444 msgid "read" msgstr "" #: ../xgnokii/xgnokii_sms.c:253 ../xgnokii/xgnokii_sms.c:333 #: ../xgnokii/xgnokii_sms.c:430 msgid "unread" msgstr "" #: ../xgnokii/xgnokii_sms.c:256 ../xgnokii/xgnokii_sms.c:336 msgid "sent" msgstr "" #: ../xgnokii/xgnokii_sms.c:259 ../xgnokii/xgnokii_sms.c:339 msgid "not sent" msgstr "" #: ../xgnokii/xgnokii_sms.c:302 msgid "read report" msgstr "" #: ../xgnokii/xgnokii_sms.c:305 msgid "unread report" msgstr "" #: ../xgnokii/xgnokii_sms.c:312 msgid "seen picture" msgstr "" #: ../xgnokii/xgnokii_sms.c:315 msgid "unseen picture" msgstr "" #: ../xgnokii/xgnokii_sms.c:318 msgid "sent picture" msgstr "" #: ../xgnokii/xgnokii_sms.c:321 msgid "not sent picture" msgstr "" #: ../xgnokii/xgnokii_sms.c:324 msgid "unknown picture" msgstr "" #: ../xgnokii/xgnokii_sms.c:349 #, c-format msgid "%02d/%02d/%04d %02d:%02d:%02d %c%02d00" msgstr "" #: ../xgnokii/xgnokii_sms.c:355 ../xgnokii/xgnokii_sms.c:360 #, c-format msgid "%02d/%02d/%04d %02d:%02d:%02d" msgstr "" #: ../xgnokii/xgnokii_sms.c:368 #, c-format msgid "Picture Message: %s" msgstr "" #: ../xgnokii/xgnokii_sms.c:461 msgid "From: " msgstr "" #: ../xgnokii/xgnokii_sms.c:466 msgid "Date: " msgstr "" #: ../xgnokii/xgnokii_sms.c:563 msgid "Delete SMS" msgstr "" #: ../xgnokii/xgnokii_sms.c:595 msgid "Do you want to delete selected SMS?" msgstr "" #: ../xgnokii/xgnokii_sms.c:617 #, c-format msgid "Cannot open mailbox %s for appending!" msgstr "" #: ../xgnokii/xgnokii_sms.c:631 #, c-format msgid "" "Cannot save to mailbox %s.\n" "\\%s is locked for process %d!" msgstr "" #: ../xgnokii/xgnokii_sms.c:644 #, c-format msgid "Cannot lock mailbox %s!" msgstr "" #: ../xgnokii/xgnokii_sms.c:699 #, c-format msgid "Cannot unlock mailbox %s!" msgstr "" #: ../xgnokii/xgnokii_sms.c:747 msgid "Choose Mailbox File" msgstr "" #: ../xgnokii/xgnokii_sms.c:857 #, c-format msgid "" "Name: %s\n" "Number: %s\n" "Used: %d\n" msgstr "" #: ../xgnokii/xgnokii_sms.c:956 ../xgnokii/xgnokii_sms.c:1089 msgid "Address line contains illegal address!" msgstr "" #: ../xgnokii/xgnokii_sms.c:1060 #, c-format msgid "" "Error sending SMS to %s\n" "%s" msgstr "" #: ../xgnokii/xgnokii_sms.c:1066 #, c-format msgid "Message sent to: %s\n" msgstr "" #: ../xgnokii/xgnokii_sms.c:1153 ../xgnokii/xgnokii_sms.c:1185 #: ../xgnokii/xgnokii_sms.c:1211 #, c-format msgid "Sending SMS to %s (%d/%d) ...\n" msgstr "" #: ../xgnokii/xgnokii_sms.c:1246 msgid "/File/Sen_d" msgstr "" #: ../xgnokii/xgnokii_sms.c:1249 msgid "/File/Check _Names" msgstr "" #: ../xgnokii/xgnokii_sms.c:1250 msgid "/File/C_ontacts" msgstr "" #: ../xgnokii/xgnokii_sms.c:1310 msgid "Send message" msgstr "" #: ../xgnokii/xgnokii_sms.c:1314 msgid "Save message to outbox" msgstr "" #: ../xgnokii/xgnokii_sms.c:1321 msgid "Check names" msgstr "" #: ../xgnokii/xgnokii_sms.c:1334 msgid "To:" msgstr "" #: ../xgnokii/xgnokii_sms.c:1402 msgid "Delivery report" msgstr "" #: ../xgnokii/xgnokii_sms.c:1406 msgid "Send as Long SMS" msgstr "" #: ../xgnokii/xgnokii_sms.c:1410 msgid "SMS Center:" msgstr "" #: ../xgnokii/xgnokii_sms.c:1431 msgid "New Message" msgstr "" #: ../xgnokii/xgnokii_sms.c:1457 msgid "Forward Message" msgstr "" #: ../xgnokii/xgnokii_sms.c:1498 msgid "Reply Message" msgstr "" #: ../xgnokii/xgnokii_sms.c:1635 msgid "/File/Save to mailbo_x" msgstr "" #: ../xgnokii/xgnokii_sms.c:1636 msgid "/File/Save to _file" msgstr "" #: ../xgnokii/xgnokii_sms.c:1639 msgid "/_Messages" msgstr "" #: ../xgnokii/xgnokii_sms.c:1640 msgid "/_Messages/_Activate SMS reading" msgstr "" #: ../xgnokii/xgnokii_sms.c:1641 msgid "/_Messages/_New" msgstr "" #: ../xgnokii/xgnokii_sms.c:1642 msgid "/_Messages/_Forward" msgstr "" #: ../xgnokii/xgnokii_sms.c:1643 msgid "/_Messages/_Reply" msgstr "" #: ../xgnokii/xgnokii_sms.c:1644 msgid "/_Messages/_Delete" msgstr "" #: ../xgnokii/xgnokii_sms.c:1645 msgid "/Messages/Sep3" msgstr "" #: ../xgnokii/xgnokii_sms.c:1646 msgid "/_Messages/_Business card" msgstr "" #: ../xgnokii/xgnokii_sms.c:1666 msgid "Status" msgstr "" #: ../xgnokii/xgnokii_sms.c:1666 msgid "Date / Time" msgstr "" #: ../xgnokii/xgnokii_sms.c:1666 msgid "Sender" msgstr "" #: ../xgnokii/xgnokii_sms.c:1666 msgid "Message" msgstr "" #: ../xgnokii/xgnokii_sms.c:1703 msgid "New message" msgstr "" #: ../xgnokii/xgnokii_sms.c:1707 msgid "Forward message" msgstr "" #: ../xgnokii/xgnokii_sms.c:1711 msgid "Reply message" msgstr "" #: ../xgnokii/xgnokii_sms.c:1723 msgid "Delete message" msgstr "" #: ../xgnokii/xgnokii_sms.c:1748 msgid "SMS's" msgstr "" #: ../xgnokii/xgnokii_speed.c:181 msgid "Reading data ..." msgstr "" #: ../xgnokii/xgnokii_speed.c:207 #, c-format msgid "Cannot read speed dial key %d!\n" msgstr "" #: ../xgnokii/xgnokii_speed.c:268 #, c-format msgid "Error writing speed dial for key %d!\n" msgstr "" #: ../xgnokii/xgnokii_speed.c:542 msgid "Key" msgstr "" #: ../xgnokii/xgnokii_xkeyb.c:180 msgid "Cannot load background pixmap!" msgstr "" #: ../xgnokii/xgnokii_xkeyb.c:253 msgid "XGnokii Keyboard" msgstr "" #: ../xgnokii/xgnokii_xring.c:404 #, c-format msgid "User #%d (%s)" msgstr "" #: ../xgnokii/xgnokii_xring.c:423 #, c-format msgid "User #%d (*EMPTY*)" msgstr "" #: ../xgnokii/xgnokii_xring.c:628 msgid "Open ringtone..." msgstr "" #: ../xgnokii/xgnokii_xring.c:670 msgid "Save ringtone as..." msgstr "" #: ../xgnokii/xgnokii_xring.c:736 #, c-format msgid "Empty ringtone list" msgstr "" #: ../xgnokii/xgnokii_xring.c:746 #, c-format msgid "" "Error getting ringtone\n" "%s" msgstr "" #: ../xgnokii/xgnokii_xring.c:763 #, c-format msgid "" "Error setting ringtone\n" "%s" msgstr "" #: ../xgnokii/xgnokii_xring.c:782 #, c-format msgid "" "Error deleting ringtone\n" "%s" msgstr "" #: ../xgnokii/xgnokii_xring.c:830 msgid "/File/S1" msgstr "" #: ../xgnokii/xgnokii_xring.c:831 msgid "/File/_Get ringtone" msgstr "" #: ../xgnokii/xgnokii_xring.c:832 msgid "/File/Se_t ringtone" msgstr "" #: ../xgnokii/xgnokii_xring.c:833 msgid "/File/Delete ringtone" msgstr "" #: ../xgnokii/xgnokii_xring.c:834 msgid "/File/_Play" msgstr "" #: ../xgnokii/xgnokii_xring.c:835 msgid "/File/S2" msgstr "" #: ../xgnokii/xgnokii_xring.c:874 msgid "Clear ringtone" msgstr "" #: ../xgnokii/xgnokii_xring.c:880 msgid "Get ringtone" msgstr "" #: ../xgnokii/xgnokii_xring.c:884 msgid "Set ringtone" msgstr "" #: ../xgnokii/xgnokii_xring.c:888 msgid "Delete ringtone" msgstr "" #: ../xgnokii/xgnokii_xring.c:904 msgid "Play" msgstr "" #: ../xgnokii/xgnokii_xring.c:913 msgid "Select ringtone" msgstr "" #: ../xgnokii/xgnokii_xring.c:918 msgid "Ringtone name" msgstr "" #: ../xgnokii/xgnokii_xring.c:930 msgid "Set tempo" msgstr "" #, fuzzy #~ msgid "Progress: %3d%% completed\r" #~ msgstr "Progresso: %d%% completo\n" #, fuzzy #~ msgid "GetMMS %s %d failed! (%s)\n" #~ msgstr "Envio de SMS falhou (%s)\n" #, fuzzy #~ msgid "Deleted MMS %s %d\n" #~ msgstr "Apagou: %s\n" #, fuzzy #~ msgid "" #~ "DeleteMMS %s %d failed!(%s)\n" #~ "\n" #~ msgstr "Envio de SMS falhou (%s)\n" #, fuzzy #~ msgid "" #~ "Deleting SMS %s %d failed!(%s)\n" #~ "\n" #~ msgstr "Envio de SMS falhou (%s)\n" #~ msgid "Couldn't read config.\n" #~ msgstr "Não foi possivel ler a configuração.\n" #~ msgid "Write error!\n" #~ msgstr "Erro de escrita!\n" #~ msgid "Read ack error!\n" #~ msgstr "Erro ao ler ack!\n" #~ msgid "Orphaned line: %s\n" #~ msgstr "Linha Orfã: %s\n" #~ msgid "Cannot lock NULL device.\n" #~ msgstr "Não foi possivel bloquear o dispositivo NULL.\n" #~ msgid "Vcard began but not ended?" #~ msgstr "Vcard começou mas não acabou?" #~ msgid "Business number" #~ msgstr "Número Empresa" #~ msgid "Birthday date" #~ msgstr "Data de aniversário" #~ msgid " Repeat: every day\n" #~ msgstr " Repetir: todos os dias\n" #~ msgid " Repeat: every week\n" #~ msgstr " Repetir: todas as semanas\n" #~ msgid " Repeat: every month\n" #~ msgstr " Repetir: todos os mêses\n" #~ msgid " Repeat: every year\n" #~ msgstr " Repetir: todos os anos\n" #, fuzzy #~ msgid " Repeat: %d hours\n" #~ msgstr " Repetir: de %d em %d horas\n" #~ msgid " Phone: %s\n" #~ msgstr " Telefone: %s\n" #~ msgid " Location: %s\n" #~ msgstr " Localização: %s\n" #~ msgid "all\n" #~ msgstr "tudo\n" #~ msgid "unknown(0x%02x)\n" #~ msgstr "desconhecido(0x%02x)\n" #~ msgid "voice\n" #~ msgstr "voz\n" gnokii-0.6.31/po/Makefile.in.in0000644000175000017500000001537711666163203014312 0ustar leoleo# Makefile for program source directory in GNU NLS utilities package. # Copyright (C) 1995, 1996, 1997 by Ulrich Drepper # Copyright (C) 2004-2008 Rodney Dawes # # This file may be copied and used freely without restrictions. It may # be used in projects which are not available under a GNU Public License, # but which still want to provide support for the GNU gettext functionality. # # - Modified by Owen Taylor to use GETTEXT_PACKAGE # instead of PACKAGE and to look for po2tbl in ./ not in intl/ # # - Modified by jacob berkman to install # Makefile.in.in and po2tbl.sed.in for use with glib-gettextize # # - Modified by Rodney Dawes for use with intltool # # We have the following line for use by intltoolize: # INTLTOOL_MAKEFILE GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ PACKAGE = @PACKAGE@ VERSION = @VERSION@ SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ datadir = @datadir@ datarootdir = @datarootdir@ libdir = @libdir@ DATADIRNAME = @DATADIRNAME@ itlocaledir = $(prefix)/$(DATADIRNAME)/locale subdir = po install_sh = @install_sh@ # Automake >= 1.8 provides @mkdir_p@. # Until it can be supposed, use the safe fallback: mkdir_p = $(install_sh) -d INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ GMSGFMT = @GMSGFMT@ MSGFMT = @MSGFMT@ XGETTEXT = @XGETTEXT@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist GENPOT = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot ALL_LINGUAS = @ALL_LINGUAS@ PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi) USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep \^$$lang$$ $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep \^$$lang$$`"; then printf "$$lang "; fi; done; fi) USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done) POFILES=$(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done) DISTFILES = Makefile.in.in POTFILES.in $(POFILES) EXTRA_DISTFILES = ChangeLog POTFILES.skip Makevars LINGUAS POTFILES = \ # This comment gets stripped out CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done) .SUFFIXES: .SUFFIXES: .po .pox .gmo .mo .msg .cat .po.pox: $(MAKE) $(GETTEXT_PACKAGE).pot $(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox .po.mo: $(MSGFMT) -o $@ $< .po.gmo: file=`echo $* | sed 's,.*/,,'`.gmo \ && rm -f $$file && $(GMSGFMT) -o $$file $< .po.cat: sed -f ../intl/po2msg.sed < $< > $*.msg \ && rm -f $@ && gencat $@ $*.msg all: all-@USE_NLS@ all-yes: $(CATALOGS) all-no: $(GETTEXT_PACKAGE).pot: $(POTFILES) $(GENPOT) install: install-data install-data: install-data-@USE_NLS@ install-data-no: all install-data-yes: all linguas="$(USE_LINGUAS)"; \ for lang in $$linguas; do \ dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \ $(mkdir_p) $$dir; \ if test -r $$lang.gmo; then \ $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \ echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \ else \ $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \ echo "installing $(srcdir)/$$lang.gmo as" \ "$$dir/$(GETTEXT_PACKAGE).mo"; \ fi; \ if test -r $$lang.gmo.m; then \ $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \ echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \ else \ if test -r $(srcdir)/$$lang.gmo.m ; then \ $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \ $$dir/$(GETTEXT_PACKAGE).mo.m; \ echo "installing $(srcdir)/$$lang.gmo.m as" \ "$$dir/$(GETTEXT_PACKAGE).mo.m"; \ else \ true; \ fi; \ fi; \ done # Empty stubs to satisfy archaic automake needs dvi info ctags tags CTAGS TAGS ID: # Define this as empty until I found a useful application. install-exec installcheck: uninstall: linguas="$(USE_LINGUAS)"; \ for lang in $$linguas; do \ rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \ rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \ done check: all $(GETTEXT_PACKAGE).pot rm -f missing notexist srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m if [ -r missing -o -r notexist ]; then \ exit 1; \ fi mostlyclean: rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp rm -f .intltool-merge-cache clean: mostlyclean distclean: clean rm -f Makefile Makefile.in POTFILES stamp-it rm -f *.mo *.msg *.cat *.cat.m *.gmo maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." rm -f Makefile.in.in distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) dist distdir: $(DISTFILES) dists="$(DISTFILES)"; \ extra_dists="$(EXTRA_DISTFILES)"; \ for file in $$extra_dists; do \ test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \ done; \ for file in $$dists; do \ test -f $$file || file="$(srcdir)/$$file"; \ ln $$file $(distdir) 2> /dev/null \ || cp -p $$file $(distdir); \ done update-po: Makefile $(MAKE) $(GETTEXT_PACKAGE).pot tmpdir=`pwd`; \ linguas="$(USE_LINGUAS)"; \ for lang in $$linguas; do \ echo "$$lang:"; \ result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \ if $$result; then \ if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ exit 1; \ fi; \ fi; \ else \ echo "msgmerge for $$lang.gmo failed!"; \ rm -f $$tmpdir/$$lang.new.po; \ fi; \ done Makefile POTFILES: stamp-it @if test ! -f $@; then \ rm -f stamp-it; \ $(MAKE) stamp-it; \ fi stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \ $(SHELL) ./config.status # Tell versions [3.59,3.63) of GNU make not to export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gnokii-0.6.31/po/LINGUAS0000644000175000017500000000002511666163120012643 0ustar leoleode fi fr it pl pt sv gnokii-0.6.31/po/it.po0000644000175000017500000057541511666163120012616 0ustar leoleo# This is the Italian locale definition for Gnokii. # Copyright (C) 2000 Gabriele Stella # 2006-2010 Daniele Forsi # msgid "" msgstr "" "Project-Id-Version: it\n" "Report-Msgid-Bugs-To: feedback@gnokii.org\n" "POT-Creation-Date: 2011-12-01 21:36+0100\n" "PO-Revision-Date: 2010-03-10 10:41+0100\n" "Last-Translator: Daniele Forsi \n" "Language-Team: Italian \n" "Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Xgettext-Options: -a -k_ -s -v -d gnokii\n" #. Line not part of any heading #: ../common/cfgreader.c:458 #, c-format msgid "" "Orphaned line: %s\n" "If in doubt place this line into [global] section.\n" msgstr "" "Riga orfana: %s\n" "Nel dubbio inserirla nella sezione [global]\n" #: ../common/cfgreader.c:732 ../common/cfgreader.c:962 #, c-format msgid "No %s section in the config file.\n" msgstr "Nel file di configurazione non esiste la sezione %s.\n" #: ../common/cfgreader.c:738 ../common/cfgreader.c:744 #: ../common/cfgreader.c:750 #, c-format msgid "You need to define '%s' in the config file.\n" msgstr "È necessario definire %s nel file di configurazione.\n" #: ../common/cfgreader.c:755 ../common/cfgreader.c:768 #: ../common/cfgreader.c:777 ../common/cfgreader.c:785 #: ../common/cfgreader.c:797 ../common/cfgreader.c:806 #: ../common/cfgreader.c:814 ../common/cfgreader.c:824 #: ../common/cfgreader.c:842 ../common/cfgreader.c:850 #: ../common/cfgreader.c:871 ../common/cfgreader.c:980 #, c-format msgid "Unsupported [%s] %s value \"%s\"\n" msgstr "Valore non supportato in [%s] «%s» valore «%s»\n" #: ../common/cfgreader.c:769 ../common/cfgreader.c:778 #: ../common/cfgreader.c:786 ../common/cfgreader.c:807 #: ../common/cfgreader.c:815 ../common/cfgreader.c:825 #: ../common/cfgreader.c:843 ../common/cfgreader.c:851 #, c-format msgid "Assuming: %d\n" msgstr "Sostituito con: %d\n" #: ../common/cfgreader.c:798 ../common/cfgreader.c:872 #: ../common/cfgreader.c:981 #, c-format msgid "Use either \"%s\" or \"%s\".\n" msgstr "Usare «%s» o «%s».\n" #: ../common/cfgreader.c:799 ../common/cfgreader.c:873 #: ../common/cfgreader.c:982 #, c-format msgid "Assuming: %s\n" msgstr "Sostituito con: %s\n" #: ../common/cfgreader.c:1172 #, c-format msgid "Couldn't read %s config file.\n" msgstr "Impossibile aprire il file di configurazione «%s».\n" #: ../common/cfgreader.c:1187 #, c-format msgid "Failed to initialize libgnokii.\n" msgstr "Impossibile inizializzare libgnokii.\n" #: ../common/cfgreader.c:1192 #, c-format msgid "Couldn't open a config file or memory.\n" msgstr "Impossibile aprire un file di configurazione o la memoria.\n" #: ../common/cfgreader.c:1282 #, c-format msgid "Config error - no model specified.\n" msgstr "Errore di configurazione - nessun modello specificato.\n" #: ../common/cfgreader.c:1286 #, c-format msgid "Config error - no port specified.\n" msgstr "Errore di configurazione - nessuna porta specificata.\n" #: ../common/data/virtmodem.c:144 #, c-format msgid "gn_vm_initialise - VM_GSMInitialise failed!\n" msgstr "gn_vm_initialise - VM_GSMInitialise fallita.\n" #: ../common/data/virtmodem.c:151 #, c-format msgid "gn_vm_initialise - VM_PtySetup failed!\n" msgstr "gn_vm_initialise - VM_PtySetup fallita.\n" #: ../common/data/virtmodem.c:156 #, c-format msgid "gn_vm_initialise - gn_atem_initialise failed!\n" msgstr "gn_vm_initialise - gn_atem_initialise fallita.\n" #: ../common/data/virtmodem.c:161 #, c-format msgid "gn_vm_initialise - dp_Initialise failed!\n" msgstr "gn_vm_initialise - dp_Initialise fallita.\n" #: ../common/data/virtmodem.c:365 #, c-format msgid "Cannot access %s, check the bindir in your config file!\n" msgstr "" "Impossibile accedere a %s, controllare «bindir» nel file di configurazione.\n" #: ../common/data/virtmodem.c:372 ../utils/mgnokiidev.c:186 #, c-format msgid "Couldn't open pty!\n" msgstr "Impossibile aprire pty.\n" #: ../common/data/virtmodem.c:389 ../gnokii/gnokii-other.c:78 #: ../smsd/lowlevel.c:124 ../xgnokii/xgnokii_lowlevel.c:200 #, c-format msgid "GSM/FBUS init failed! (Unknown model?). Quitting.\n" msgstr "Inizializzazione GSM/FBUS fallita (Modello sconosciuto?). Uscita.\n" #: ../common/devices/tcp.c:80 msgid "Gnokii tcp_open: socket()" msgstr "Gnokii tcp_open: socket()" #: ../common/devices/tcp.c:89 #, c-format msgid "Gnokii tcp_open: colon (':') not found in connect strings \"%s\"!\n" msgstr "" "Gnokii tcp_open: mancano i due punti (:) nelle stringhe di connessione " "«%s».\n" #: ../common/devices/tcp.c:97 #, c-format msgid "Gnokii tcp_open: Port string \"%s\" not valid for IPv4 connection!\n" msgstr "" "Gnokii tcp_open: la porta «%s» non è valida per una connessione IPv4.\n" #: ../common/devices/tcp.c:101 #, c-format msgid "Gnokii tcp_open: Unknown host \"%s\"!\n" msgstr "Gnokii tcp_open: host sconosciuto «%s».\n" #: ../common/devices/tcp.c:105 #, c-format msgid "Gnokii tcp_open: Address resolve for host \"%s\" not compatible!\n" msgstr "" "Gnokii tcp_open: la risoluzione dell'indirizzo per l'host «%s» non è " "compatibile.\n" #: ../common/devices/tcp.c:115 msgid "Gnokii tcp_open: connect()" msgstr "Gnokii tcp_open: connect()" #: ../common/devices/tcp.c:127 #, c-format msgid "Gnokii tcp_close: disconnect_script\n" msgstr "Gnokii tcp_close: disconnect_script\n" #: ../common/devices/tcp.c:150 #, c-format msgid "Gnokii tcp_opendevice: connect_script\n" msgstr "Gnokii tcp_opendevice: connect_script\n" #: ../common/devices/tcp.c:160 msgid "Gnokii tcp_opendevice: fcntl(F_SETOWN)" msgstr "Gnokii tcp_opendevice: fnctl(F_SETOWN)" #: ../common/devices/tcp.c:183 msgid "Gnokii tcp_opendevice: fcntl(F_SETFL)" msgstr "Gnokii tcp_opendevice: fnctl(F_SETFL)" #: ../common/devices/unixbluetooth.c:497 #, c-format msgid "Invalid bluetooth address \"%s\"\n" msgstr "Indirizzo bluetooth non valido «%s»\n" #: ../common/devices/unixbluetooth.c:502 msgid "Can't create socket" msgstr "Impossibile creare il socket" #: ../common/devices/unixbluetooth.c:521 #, c-format msgid "" "Cannot find any appropriate rfcomm channel and none was specified in the " "config.\n" msgstr "" "Impossibile trovare un canale RFCOMM appropriato e non ne è stato " "specificato alcuno nella configurazione.\n" #: ../common/devices/unixbluetooth.c:530 msgid "Can't connect" msgstr "Impossibile collegarsi" #: ../common/devices/unixirda.c:150 #, c-format msgid "Virtual IrCOMM device unsupported under Linux\n" msgstr "Il dispositivo virtuale IrCOMM non è supportato nella versione Linux\n" #: ../common/devices/unixserial.c:117 #, c-format msgid "device_script(\"%s\"): fork() failure: %s!\n" msgstr "device_script(\"%s\"): fork() fallita: %s.\n" #: ../common/devices/unixserial.c:124 #, c-format msgid "device_script(\"%s\"): file descriptor preparation failure: %s\n" msgstr "" "device_script(\"%s\"): preparazione del descrittore del file fallita: %s\n" #: ../common/devices/unixserial.c:130 #, c-format msgid "device_script(\"%s\"): script execution failure: %s\n" msgstr "device_script(\"%s\"): esecuzione dello script fallita: %s\n" #: ../common/devices/unixserial.c:137 #, c-format msgid "" "device_script(\"%s\"): child script execution failure: %s, exit code=%d\n" msgstr "" "device_script(\"%s\"): esecuzione dello script figlio fallita: %s, codice " "d'uscita=%d\n" #: ../common/devices/unixserial.c:138 msgid "normal exit" msgstr "uscita normale" #: ../common/devices/unixserial.c:138 msgid "abnormal exit" msgstr "uscita anomala" #: ../common/devices/unixserial.c:394 #, c-format msgid "Serial port speed %d not supported!\n" msgstr "La velocità %d per la porta seriale non è supportata.\n" #: ../common/devices/unixserial.c:434 #, c-format msgid "ERROR: Modem DCD is down and global/require_dcd parameter is set!\n" msgstr "" "ERRORE: il segnale DCD del modem è a livello basso e il parametro global/" "require_dcd è impostato.\n" #: ../common/devices/winbluetooth.c:70 ../common/devices/winirda.c:113 #, c-format msgid "Failed to initialize socket subsystem: need WINSOCK2. Please upgrade.\n" msgstr "" "Impossibile inizializzare il sottosistema dei socket: è necessario WINSOCK2. " "Aggiornare il sistema.\n" # queste sono le possibili «rubriche» del telefono #: ../common/gsm-common.c:148 msgid "Internal memory" msgstr "Memoria telefono" #: ../common/gsm-common.c:149 msgid "SIM card" msgstr "Scheda SIM" #: ../common/gsm-common.c:150 msgid "Fixed dial numbers" msgstr "Numeri prefissati" #: ../common/gsm-common.c:151 msgid "Own numbers" msgstr "Propri numeri" #: ../common/gsm-common.c:152 msgid "Emergency numbers" msgstr "Numeri di emergenza" #: ../common/gsm-common.c:153 #, fuzzy msgid "Dialled numbers" msgstr "Chiamate effettuate" #: ../common/gsm-common.c:154 msgid "Received numbers" msgstr "Chiamate ricevute" #: ../common/gsm-common.c:155 msgid "Missed numbers" msgstr "Chiamate senza risposta" #: ../common/gsm-common.c:156 #, fuzzy msgid "Last dialled" msgstr "Ultime chiamate effettuate" #: ../common/gsm-common.c:157 #, fuzzy msgid "Barred dialling numbers" msgstr "Numeri bloccati" #: ../common/gsm-common.c:158 #, fuzzy msgid "Service dialling numbers" msgstr "Numeri dei servizi" #: ../common/gsm-common.c:159 msgid "Combined ME and SIM phonebook" msgstr "Rubrica del telefono e della SIM combinate" #: ../common/gsm-common.c:160 msgid "Computer memory" msgstr "Memoria del computer" #: ../common/gsm-common.c:161 msgid "Currently selected memory" msgstr "Memoria attualmente selezionata" #: ../common/gsm-common.c:162 msgid "SMS Inbox" msgstr "Messaggi ricevuti" #: ../common/gsm-common.c:163 msgid "SMS Outbox, sent items" msgstr "Messaggi inviati" #: ../common/gsm-common.c:164 msgid "SMS Archive" msgstr "Propri messaggi" #: ../common/gsm-common.c:165 msgid "SMS Templates" msgstr "Modelli di messaggi" #: ../common/gsm-common.c:166 msgid "SMS Status Reports" msgstr "Rapporti di stato" #: ../common/gsm-common.c:167 msgid "SMS Drafts" msgstr "Bozze" #: ../common/gsm-common.c:168 msgid "SMS Outbox, items to be sent" msgstr "Messaggi in uscita" #: ../common/gsm-common.c:169 msgid "SMS Folder 1" msgstr "Cartella messaggi n° 1" #: ../common/gsm-common.c:170 msgid "SMS Folder 2" msgstr "Cartella messaggi n° 2" #: ../common/gsm-common.c:171 msgid "SMS Folder 3" msgstr "Cartella messaggi n° 3" #: ../common/gsm-common.c:172 msgid "SMS Folder 4" msgstr "Cartella messaggi n° 4" #: ../common/gsm-common.c:173 msgid "SMS Folder 5" msgstr "Cartella messaggi n° 5" #: ../common/gsm-common.c:174 msgid "SMS Folder 6" msgstr "Cartella messaggi n° 6" #: ../common/gsm-common.c:175 msgid "SMS Folder 7" msgstr "Cartella messaggi n° 7" #: ../common/gsm-common.c:176 msgid "SMS Folder 8" msgstr "Cartella messaggi n° 8" #: ../common/gsm-common.c:177 msgid "SMS Folder 9" msgstr "Cartella messaggi n° 9" #: ../common/gsm-common.c:178 msgid "SMS Folder 10" msgstr "Cartella messaggi n° 10" #: ../common/gsm-common.c:179 msgid "SMS Folder 11" msgstr "Cartella messaggi n° 11" #: ../common/gsm-common.c:180 msgid "SMS Folder 12" msgstr "Cartella messaggi n° 12" #: ../common/gsm-common.c:181 msgid "SMS Folder 13" msgstr "Cartella messaggi n° 13" #: ../common/gsm-common.c:182 msgid "SMS Folder 14" msgstr "Cartella messaggi n° 14" #: ../common/gsm-common.c:183 msgid "SMS Folder 15" msgstr "Cartella messaggi n° 15" #: ../common/gsm-common.c:184 msgid "SMS Folder 16" msgstr "Cartella messaggi n° 16" #: ../common/gsm-common.c:185 msgid "SMS Folder 17" msgstr "Cartella messaggi n° 17" #: ../common/gsm-common.c:186 msgid "SMS Folder 18" msgstr "Cartella messaggi n° 18" #: ../common/gsm-common.c:187 msgid "SMS Folder 19" msgstr "Cartella messaggi n° 19" #: ../common/gsm-common.c:188 msgid "SMS Folder 20" msgstr "Cartella messaggi n° 20" #: ../common/gsm-common.c:189 msgid "Cell Broadcast" msgstr "" #: ../common/gsm-common.c:190 ../common/gsm-common.c:211 #: ../common/gsm-common.c:222 ../common/gsm-common.c:235 #: ../common/gsm-common.c:290 ../common/gsm-common.c:343 #: ../common/gsm-common.c:356 ../common/gsm-common.c:380 #: ../common/gsm-common.c:381 ../common/gsm-common.c:398 #: ../common/gsm-common.c:409 ../common/gsm-common.c:424 #: ../common/gsm-common.c:437 ../common/gsm-common.c:451 #: ../common/gsm-common.c:464 ../common/gsm-common.c:474 #: ../common/gsm-common.c:485 ../common/gsm-common.c:494 #: ../common/gsm-common.c:505 ../common/gsm-common.c:514 #: ../common/gsm-common.c:524 ../common/gsm-common.c:533 #: ../common/gsm-common.c:542 ../common/gsm-common.c:556 #: ../common/gsm-common.c:565 ../common/gsm-common.c:574 #: ../common/gsm-common.c:587 ../common/gsm-common.c:598 #: ../common/gsm-common.c:610 ../common/gsm-common.c:624 #: ../common/gsm-common.c:635 ../common/gsm-common.c:647 #: ../common/gsm-sms.c:409 ../common/libfunctions.c:219 #: ../common/phones/atgen.c:2695 ../common/phones/atgen.c:2702 #: ../common/phones/atgen.c:3183 ../common/phones/nk6100.c:4087 #: ../gnokii/gnokii-ringtone.c:90 ../xgnokii/xgnokii_calendar.c:187 #: ../xgnokii/xgnokii_contacts.c:765 ../xgnokii/xgnokii_contacts.c:821 #: ../xgnokii/xgnokii_contacts.c:948 ../xgnokii/xgnokii_contacts.c:990 #: ../xgnokii/xgnokii_contacts.c:1206 ../xgnokii/xgnokii_contacts.c:1230 #, c-format msgid "Unknown" msgstr "Sconosciuto" #: ../common/gsm-common.c:197 ../common/gsm-common.c:234 #: ../common/gsm-common.c:355 msgid "None" msgstr "Nessuno" #: ../common/gsm-common.c:198 msgid "Serial" msgstr "Seriale" #: ../common/gsm-common.c:199 msgid "Serial DAU9P" msgstr "Seriale DAU9P" #: ../common/gsm-common.c:200 msgid "Serial DLR3P" msgstr "Seriale DLR3P" #: ../common/gsm-common.c:201 msgid "Infrared (old Nokias)" msgstr "Infrarossi (vecchi Nokia)" #: ../common/gsm-common.c:202 msgid "IrDA" msgstr "IrDA" #: ../common/gsm-common.c:203 msgid "Bluetooth" msgstr "Bluetooth" #: ../common/gsm-common.c:204 msgid "Tekram Ir-Dongle" msgstr "Tekram Ir-Dongle" #: ../common/gsm-common.c:205 msgid "TCP" msgstr "TCP" #: ../common/gsm-common.c:206 msgid "M2BUS" msgstr "M2BUS" #: ../common/gsm-common.c:207 msgid "DKU2 (kernel support)" msgstr "DKU2 (supportato dal kernel)" #: ../common/gsm-common.c:208 msgid "DKU2 (libusb support)" msgstr "DKU2 (supportato da libusb)" #: ../common/gsm-common.c:209 msgid "Smart Card reader (libpcsclite support)" msgstr "" #: ../common/gsm-common.c:210 #, fuzzy msgid "Linux Phonet (kernel support)" msgstr "DKU2 (supportato dal kernel)" #: ../common/gsm-common.c:218 msgid "AC-DC" msgstr "Da rete" #: ../common/gsm-common.c:219 msgid "Battery" msgstr "Da batteria" #: ../common/gsm-common.c:220 msgid "No battery" msgstr "Senza batteria" #: ../common/gsm-common.c:221 msgid "Power fault" msgstr "Guasto alimentazione" #: ../common/gsm-common.c:229 msgid "Security code" msgstr "Codice di sicurezza" #: ../common/gsm-common.c:230 msgid "PIN" msgstr "PIN" #: ../common/gsm-common.c:231 msgid "PIN2" msgstr "PIN2" #: ../common/gsm-common.c:232 msgid "PUK" msgstr "PUK" #: ../common/gsm-common.c:233 msgid "PUK2" msgstr "PUK2" #: ../common/gsm-common.c:244 ../common/gsm-common.c:245 #: ../common/gsm-common.c:250 msgid "General number" msgstr "Numero generale" #: ../common/gsm-common.c:246 msgid "Home number" msgstr "Numero di casa" #: ../common/gsm-common.c:247 msgid "Mobile number" msgstr "Numero di cellulare" #: ../common/gsm-common.c:248 msgid "Fax number" msgstr "Numero di fax" #: ../common/gsm-common.c:249 msgid "Work number" msgstr "Numero di lavoro" #: ../common/gsm-common.c:251 ../common/gsm-common.c:340 msgid "Unknown number" msgstr "Numero sconosciuto" #: ../common/gsm-common.c:258 ../gnokii/gnokii-phonebook.c:187 #: ../gnokii/gnokii-wap.c:89 ../gnokii/gnokii-wap.c:220 #: ../xgnokii/xgnokii_contacts.c:749 ../xgnokii/xgnokii_contacts.c:815 #: ../xgnokii/xgnokii_contacts.c:946 ../xgnokii/xgnokii_contacts.c:988 #: ../xgnokii/xgnokii_contacts.c:1224 ../xgnokii/xgnokii_contacts.c:1729 #: ../xgnokii/xgnokii_contacts.c:2936 ../xgnokii/xgnokii_contacts.c:3120 #: ../xgnokii/xgnokii_speed.c:542 msgid "Name" msgstr "Nome" #: ../common/gsm-common.c:259 ../common/gsm-common.c:422 #: ../xgnokii/xgnokii.c:542 ../xgnokii/xgnokii.c:1433 #: ../xgnokii/xgnokii_contacts.c:743 ../xgnokii/xgnokii_contacts.c:812 #: ../xgnokii/xgnokii_contacts.c:945 ../xgnokii/xgnokii_contacts.c:987 #: ../xgnokii/xgnokii_contacts.c:1220 msgid "Email" msgstr "Email" #: ../common/gsm-common.c:260 ../common/gsm-common.c:277 msgid "Postal address" msgstr "Indirizzo postale" #: ../common/gsm-common.c:261 ../xgnokii/xgnokii_contacts.c:731 #: ../xgnokii/xgnokii_contacts.c:806 ../xgnokii/xgnokii_contacts.c:943 #: ../xgnokii/xgnokii_contacts.c:985 ../xgnokii/xgnokii_contacts.c:1026 #: ../xgnokii/xgnokii_contacts.c:1212 msgid "Note" msgstr "Note" #: ../common/gsm-common.c:262 ../gnokii/gnokii-dial.c:376 #: ../gnokii/gnokii-phonebook.c:203 ../gnokii/gnokii-wap.c:231 #: ../xgnokii/xgnokii_calendar.c:1540 ../xgnokii/xgnokii_contacts.c:1737 #: ../xgnokii/xgnokii_contacts.c:2936 ../xgnokii/xgnokii_contacts.c:3120 #: ../xgnokii/xgnokii_speed.c:542 msgid "Number" msgstr "Numero" #: ../common/gsm-common.c:263 ../common/gsm-common.c:272 #: ../common/gsm-common.c:367 ../xgnokii/xgnokii.c:1142 #: ../xgnokii/xgnokii_xring.c:845 msgid "Ringtone" msgstr "Suonerie" #: ../common/gsm-common.c:264 msgid "Date" msgstr "Data" #: ../common/gsm-common.c:265 msgid "Pointer" msgstr "Puntatore" #: ../common/gsm-common.c:266 ../common/gsm-common.c:369 msgid "Logo" msgstr "Logo" #: ../common/gsm-common.c:267 msgid "Logo switch" msgstr "Mostra logo" #: ../common/gsm-common.c:268 ../xgnokii/xgnokii_contacts.c:2936 #: ../xgnokii/xgnokii_contacts.c:3120 msgid "Group" msgstr "Gruppo" #: ../common/gsm-common.c:269 ../gnokii/gnokii-wap.c:90 #: ../xgnokii/xgnokii_contacts.c:758 ../xgnokii/xgnokii_contacts.c:818 #: ../xgnokii/xgnokii_contacts.c:947 ../xgnokii/xgnokii_contacts.c:989 #: ../xgnokii/xgnokii_contacts.c:1227 msgid "URL" msgstr "URL" #: ../common/gsm-common.c:270 ../gnokii/gnokii-calendar.c:206 #: ../xgnokii/xgnokii_calendar.c:1541 msgid "Location" msgstr "Posizione" #: ../common/gsm-common.c:271 msgid "Image" msgstr "Immagine" #: ../common/gsm-common.c:273 msgid "User ID" msgstr "ID utente" #: ../common/gsm-common.c:274 msgid "Push-To-Talk address" msgstr "Indirizzo Push-to-talk" #: ../common/gsm-common.c:275 msgid "First name" msgstr "Nome" #: ../common/gsm-common.c:276 msgid "Last name" msgstr "Cognome" #: ../common/gsm-common.c:278 ../gnokii/gnokii-phonebook.c:212 msgid "Extended address" msgstr "Indirizzo esteso" #: ../common/gsm-common.c:279 ../gnokii/gnokii-phonebook.c:214 msgid "Street" msgstr "Via" #: ../common/gsm-common.c:280 ../gnokii/gnokii-phonebook.c:216 msgid "City" msgstr "Città" #: ../common/gsm-common.c:281 ../gnokii/gnokii-phonebook.c:218 msgid "State or province" msgstr "Stato o provincia" #: ../common/gsm-common.c:282 ../gnokii/gnokii-phonebook.c:220 msgid "Zip code" msgstr "CAP" #: ../common/gsm-common.c:283 ../gnokii/gnokii-phonebook.c:222 msgid "Country" msgstr "Nazione" #: ../common/gsm-common.c:284 msgid "Formal name" msgstr "Nome formale" #: ../common/gsm-common.c:285 msgid "Job title" msgstr "Titolo" #: ../common/gsm-common.c:286 msgid "Company" msgstr "Azienda" #: ../common/gsm-common.c:287 msgid "Nickname" msgstr "Soprannome" #: ../common/gsm-common.c:288 ../common/gsm-common.c:448 #: ../xgnokii/xgnokii_calendar.c:181 ../xgnokii/xgnokii_calendar.c:288 msgid "Birthday" msgstr "Compleanno" #: ../common/gsm-common.c:289 msgid "Caller group id" msgstr "Identificativo gruppo chiamanti" #: ../common/gsm-common.c:350 ../common/nokia-decoding.c:349 #: ../common/phones/nk6100.c:1007 ../xgnokii/xgnokii.c:221 #: ../xgnokii/xgnokii.c:1027 msgid "Family" msgstr "Famiglia" #: ../common/gsm-common.c:351 msgid "VIPs" msgstr "VIP" #: ../common/gsm-common.c:352 ../common/nokia-decoding.c:355 #: ../common/phones/nk6100.c:1013 ../xgnokii/xgnokii.c:223 #: ../xgnokii/xgnokii.c:1051 msgid "Friends" msgstr "Amici" #: ../common/gsm-common.c:353 ../xgnokii/xgnokii_contacts.c:713 #: ../xgnokii/xgnokii_contacts.c:797 ../xgnokii/xgnokii_contacts.c:940 #: ../xgnokii/xgnokii_contacts.c:982 ../xgnokii/xgnokii_contacts.c:1194 msgid "Work" msgstr "Lavoro" #: ../common/gsm-common.c:354 msgid "Others" msgstr "Altri" #: ../common/gsm-common.c:365 ../common/gsm-common.c:416 #: ../xgnokii/xgnokii.c:529 ../xgnokii/xgnokii.c:558 ../xgnokii/xgnokii.c:1415 #: ../xgnokii/xgnokii_calendar.c:1539 msgid "Text" msgstr "Testo" #: ../common/gsm-common.c:366 msgid "Linked" msgstr "Concatenato" #: ../common/gsm-common.c:368 msgid "GSM Operator Logo" msgstr "Logo operatore GSM" #: ../common/gsm-common.c:370 msgid "Multipart Message" msgstr "Messaggio multiparte" #: ../common/gsm-common.c:371 msgid "WAP vCard" msgstr "vCard WAP" #: ../common/gsm-common.c:372 msgid "WAP vCalendar" msgstr "vCalendar WAP" #: ../common/gsm-common.c:373 msgid "WAP vCardSecure" msgstr "vCardSecure WAP" #: ../common/gsm-common.c:374 msgid "WAP vCalendarSecure" msgstr "WAP vCalendarSecure WAP" #: ../common/gsm-common.c:375 msgid "Voice Message" msgstr "Messaggio vocale" #: ../common/gsm-common.c:376 msgid "Fax Message" msgstr "Messaggio fax" #: ../common/gsm-common.c:377 msgid "Email Message" msgstr "Messaggio email" #: ../common/gsm-common.c:378 msgid "WAP Push" msgstr "WAP Push" #: ../common/gsm-common.c:379 msgid "Other Message" msgstr "Altro messaggio" #: ../common/gsm-common.c:388 msgid "Inbox Message" msgstr "Messaggio ricevuto" #: ../common/gsm-common.c:389 msgid "Delivery Report" msgstr "Rapporto di consegna" #: ../common/gsm-common.c:390 ../common/gsm-common.c:397 msgid "MO Message" msgstr "Messaggio inviato" #: ../common/gsm-common.c:391 msgid "Submit Report" msgstr "Rapporto di invio" #: ../common/gsm-common.c:392 msgid "Command" msgstr "Comando" #: ../common/gsm-common.c:393 msgid "Status Report" msgstr "Rapporto di stato" #: ../common/gsm-common.c:394 msgid "Picture Message" msgstr "Messaggio con disegno" #: ../common/gsm-common.c:395 msgid "Template" msgstr "Modello" #: ../common/gsm-common.c:396 msgid "Picture Message Template" msgstr "Modello di messaggio con disegno" #: ../common/gsm-common.c:405 msgid "Read" msgstr "Letto" #: ../common/gsm-common.c:406 msgid "Unread" msgstr "Non letto" #: ../common/gsm-common.c:407 msgid "Sent" msgstr "Inviato" #: ../common/gsm-common.c:408 msgid "Unsent" msgstr "Non inviato" #: ../common/gsm-common.c:417 ../common/gsm-common.c:632 #: ../xgnokii/xgnokii.c:537 ../xgnokii/xgnokii.c:1421 #: ../xgnokii/xgnokii_contacts.c:719 ../xgnokii/xgnokii_contacts.c:800 #: ../xgnokii/xgnokii_contacts.c:941 ../xgnokii/xgnokii_contacts.c:983 #: ../xgnokii/xgnokii_contacts.c:1198 msgid "Fax" msgstr "Fax" #: ../common/gsm-common.c:418 msgid "VoiceMail" msgstr "Messaggio vocale" #: ../common/gsm-common.c:419 ../xgnokii/xgnokii.c:546 msgid "ERMES" msgstr "ERMES" #: ../common/gsm-common.c:420 ../xgnokii/xgnokii.c:533 #: ../xgnokii/xgnokii.c:1427 msgid "Paging" msgstr "Cercapersone" #: ../common/gsm-common.c:421 msgid "Email message in 8110i" msgstr "Messaggio email in 8110i" #: ../common/gsm-common.c:423 ../xgnokii/xgnokii.c:550 msgid "X.400" msgstr "X.400" #: ../common/gsm-common.c:431 ../xgnokii/xgnokii.c:564 #: ../xgnokii/xgnokii.c:1461 msgid "1 hour" msgstr "1 ora" #: ../common/gsm-common.c:432 ../xgnokii/xgnokii.c:568 #: ../xgnokii/xgnokii.c:1467 msgid "6 hours" msgstr "6 ore" #: ../common/gsm-common.c:433 ../xgnokii/xgnokii.c:572 #: ../xgnokii/xgnokii.c:588 ../xgnokii/xgnokii.c:1473 msgid "24 hours" msgstr "24 ore" #: ../common/gsm-common.c:434 ../xgnokii/xgnokii.c:576 #: ../xgnokii/xgnokii.c:1479 msgid "72 hours" msgstr "72 ore" #: ../common/gsm-common.c:435 ../xgnokii/xgnokii.c:580 #: ../xgnokii/xgnokii.c:1485 msgid "1 week" msgstr "1 settimana" #: ../common/gsm-common.c:436 msgid "Maximum time" msgstr "Tempo massimo" #: ../common/gsm-common.c:446 ../common/phones/nk6100.c:2113 #: ../xgnokii/xgnokii_calendar.c:175 #, c-format msgid "Meeting" msgstr "Riunione" #: ../common/gsm-common.c:447 ../xgnokii/xgnokii_calendar.c:169 msgid "Call" msgstr "Chiamata" #: ../common/gsm-common.c:449 ../xgnokii/xgnokii_calendar.c:163 msgid "Reminder" msgstr "Promemoria" #: ../common/gsm-common.c:450 ../xgnokii/xgnokii_calendar.c:157 msgid "Memo" msgstr "Memo" #: ../common/gsm-common.c:458 ../xgnokii/xgnokii_calendar.c:831 msgid "Never" msgstr "Mai" #: ../common/gsm-common.c:459 msgid "Daily" msgstr "Giornaliero" #: ../common/gsm-common.c:460 msgid "Weekly" msgstr "Settimanale" #: ../common/gsm-common.c:461 msgid "Every 2 weeks" msgstr "Ogni due settimane" #: ../common/gsm-common.c:462 msgid "Monthly" msgstr "Mensile" #: ../common/gsm-common.c:463 msgid "Yearly" msgstr "Una volta all'anno" #: ../common/gsm-common.c:471 msgid "Low" msgstr "Bassa" #: ../common/gsm-common.c:472 msgid "Medium" msgstr "Media" #: ../common/gsm-common.c:473 msgid "High" msgstr "Alta" #: ../common/gsm-common.c:483 msgid "Temporary" msgstr "Temporaneo" #: ../common/gsm-common.c:484 msgid "Permanent" msgstr "Permanente" #: ../common/gsm-common.c:492 msgid "Normal" msgstr "Normale" #: ../common/gsm-common.c:493 msgid "Secure" msgstr "Sicuro" #: ../common/gsm-common.c:501 ../gnokii/gnokii-wap.c:225 msgid "GSM data" msgstr "Dati GSM" #: ../common/gsm-common.c:502 ../gnokii/gnokii-wap.c:234 msgid "GPRS" msgstr "GPRS" #: ../common/gsm-common.c:503 ../gnokii/gnokii-wap.c:242 #: ../xgnokii/xgnokii.c:1106 ../xgnokii/xgnokii.c:1848 msgid "SMS" msgstr "SMS" #: ../common/gsm-common.c:504 msgid "USSD" msgstr "USSD" #: ../common/gsm-common.c:512 msgid "Analogue" msgstr "Analogico" #: ../common/gsm-common.c:513 msgid "ISDN" msgstr "ISDN" #: ../common/gsm-common.c:521 ../common/gsm-common.c:532 #: ../gnokii/gnokii-profile.c:185 msgid "Automatic" msgstr "Automatiche" #: ../common/gsm-common.c:522 msgid "9600" msgstr "9600" #: ../common/gsm-common.c:523 msgid "14400" msgstr "14400" #: ../common/gsm-common.c:531 msgid "Manual" msgstr "Manuale" #: ../common/gsm-common.c:540 msgid "Always" msgstr "Sempre" #: ../common/gsm-common.c:541 msgid "When needed" msgstr "Quando necessario" #: ../common/gsm-common.c:551 msgid "No tone" msgstr "Senza suoneria" #: ../common/gsm-common.c:552 msgid "Standard" msgstr "Standard" #: ../common/gsm-common.c:553 msgid "Special" msgstr "Speciale" #: ../common/gsm-common.c:554 ../common/gsm-common.c:582 msgid "Beep once" msgstr "Bip x 1" #: ../common/gsm-common.c:555 ../common/gsm-common.c:585 msgid "Ascending" msgstr "Ascendente" #: ../common/gsm-common.c:563 ../common/gsm-common.c:572 #: ../common/gsm-common.c:583 ../common/gsm-common.c:594 #: ../gnokii/gnokii-profile.c:192 msgid "Off" msgstr "No" #: ../common/gsm-common.c:564 ../common/gsm-common.c:573 #: ../gnokii/gnokii-profile.c:185 ../gnokii/gnokii-profile.c:192 msgid "On" msgstr "Sì" # le traduzioni seguenti che non sono letterali # sono simili ai messaggi mostrati dal telefono #: ../common/gsm-common.c:581 msgid "Ringing" msgstr "Suoneria" #: ../common/gsm-common.c:584 msgid "Ring once" msgstr "Suona x 1" #: ../common/gsm-common.c:586 msgid "Caller groups" msgstr "Gruppi chiamanti" #: ../common/gsm-common.c:595 ../common/gsm-common.c:605 msgid "Level 1" msgstr "Livello 1" #: ../common/gsm-common.c:596 ../common/gsm-common.c:606 msgid "Level 2" msgstr "Livello 2" #: ../common/gsm-common.c:597 ../common/gsm-common.c:607 msgid "Level 3" msgstr "Livello 3" #: ../common/gsm-common.c:608 msgid "Level 4" msgstr "Livello 4" #: ../common/gsm-common.c:609 msgid "Level 5" msgstr "Livello 5" #: ../common/gsm-common.c:619 msgid "Busy" msgstr "Se occupato" #: ../common/gsm-common.c:620 msgid "No answer" msgstr "Senza risposta" #: ../common/gsm-common.c:621 msgid "Out of reach" msgstr "Se non raggiungibile" #: ../common/gsm-common.c:622 msgid "Not available" msgstr "Se non disponibile" #: ../common/gsm-common.c:623 ../common/gsm-common.c:634 msgid "All" msgstr "Tutte" #: ../common/gsm-common.c:631 ../xgnokii/xgnokii.c:554 msgid "Voice" msgstr "Voce" #: ../common/gsm-common.c:633 msgid "Data" msgstr "Dati" #: ../common/gsm-common.c:642 ../xgnokii/xgnokii_data.c:124 msgid "Disable" msgstr "Disabilita" #: ../common/gsm-common.c:643 ../xgnokii/xgnokii_data.c:120 msgid "Enable" msgstr "Abilita" #: ../common/gsm-common.c:644 msgid "Query" msgstr "Interrogazione" #: ../common/gsm-common.c:645 msgid "Register" msgstr "Registrazione" #: ../common/gsm-common.c:646 msgid "Erasure" msgstr "Cancellazione" #: ../common/gsm-error.c:42 msgid "No error." msgstr "Nessun errore." #: ../common/gsm-error.c:43 msgid "Command failed." msgstr "Comando fallito." #: ../common/gsm-error.c:44 msgid "Model specified isn't known/supported." msgstr "Il modello specificato è sconosciuto o non supportato." #: ../common/gsm-error.c:45 msgid "Invalid Security code." msgstr "Il codice di sicurezza non è valido." #: ../common/gsm-error.c:46 msgid "Problem occurred internal to model specific code." msgstr "Si è verificato un problema nel codice specifico del modello." #: ../common/gsm-error.c:47 msgid "Command called isn't implemented in model." msgstr "Il comando non è implementato nel modello." #: ../common/gsm-error.c:48 msgid "" "Function or connection type not supported by the phone or by the phone " "driver." msgstr "" "La funzione o il tipo di connessione non sono supportati dal telefono o dal " "driver del telefono." #: ../common/gsm-error.c:49 msgid "User aborted the action." msgstr "L'utente ha interrotto l'azione." #: ../common/gsm-error.c:50 msgid "Unknown error - well better than nothing!!" msgstr "Errore sconosciuto - beh meglio che nulla!!" #: ../common/gsm-error.c:51 msgid "The specified memory is full." msgstr "La memoria specificata è piena." #: ../common/gsm-error.c:52 msgid "Couldn't establish link with phone." msgstr "Impossibile stabilire un collegamento con il telefono." #: ../common/gsm-error.c:53 msgid "Command timed out." msgstr "Tempo esaurito per il comando." #: ../common/gsm-error.c:54 msgid "Try again." msgstr "Riprovare ancora." #: ../common/gsm-error.c:55 msgid "Waiting for the next part of the message." msgstr "In attesa della parte successiva del messaggio." #: ../common/gsm-error.c:56 msgid "Device not ready." msgstr "Il dispositivo non è pronto." #: ../common/gsm-error.c:57 msgid "Command is still being executed." msgstr "Il comando è ancora in corso di esecuzione." #: ../common/gsm-error.c:58 msgid "The given memory location is invalid." msgstr "La posizione di memoria fornita non è valida." #: ../common/gsm-error.c:59 msgid "Invalid type of memory." msgstr "Il tipo di memoria non è valido." #: ../common/gsm-error.c:60 msgid "The given location is empty." msgstr "La posizione fornita è vuota." #: ../common/gsm-error.c:61 msgid "The given entry is too long." msgstr "La voce fornita è troppo lunga." #: ../common/gsm-error.c:62 msgid "Data format is not valid." msgstr "Il formato dei dati non è valido." #: ../common/gsm-error.c:63 msgid "Wrong size of the object." msgstr "L'oggetto ha una dimensione errata." #: ../common/gsm-error.c:64 msgid "Outgoing call requested reported line busy." msgstr "La chiamata segnala che la linea è occupata." #: ../common/gsm-error.c:65 msgid "No Carrier error during data call setup?" msgstr "Nessuna portante all'inizio della chiamata dati?" #: ../common/gsm-error.c:66 msgid "The current frame isn't handled by the incoming function." msgstr "Questo pacchetto non è gestito dalla funzione che l'ha ricevuto." #: ../common/gsm-error.c:67 msgid "Unsolicited message received." msgstr "Ricevuto un messaggio non richiesto." # CB = Cell Broadcast #: ../common/gsm-error.c:68 msgid "Attempt to read CB when no new CB received." msgstr "Tentativo di leggere un CB quando non è stato ricevuto alcun nuovo CB." #: ../common/gsm-error.c:69 msgid "SIM card missing or damaged." msgstr "La scheda SIM manca o è danneggiata." #: ../common/gsm-error.c:70 msgid "PIN or PUK code required." msgstr "È richiesto il PIN o il PUK." #: ../common/gsm-error.c:71 msgid "The requested information is not available." msgstr "L'informazione richiesta non è disponibile." #: ../common/gsm-error.c:72 msgid "Config file cannot be read." msgstr "Il file di configurazione non può essere letto." #: ../common/gsm-error.c:73 msgid "Either global or given phone section cannot be found." msgstr "Impossibile trovare la sezione [global] o quella del telefono." #: ../common/gsm-error.c:74 msgid "Incorrect logging section configuration." msgstr "La configurazione della sezione [logging] è errata." #: ../common/gsm-error.c:75 msgid "No phone model specified in the config file." msgstr "" "Nel file di configurazione non è specificato alcun modello di telefono." #: ../common/gsm-error.c:76 msgid "No port specified in the config file." msgstr "Nel file di configurazione non è specificata alcuna porta." #: ../common/gsm-error.c:77 msgid "No connection type specified in the config file." msgstr "" "Nel file di configurazione non è specificato alcun tipo di connessione." #: ../common/gsm-error.c:78 msgid "Device is locked and cannot be unlocked." msgstr "Il dispositivo è bloccato e non può essere sbloccato." #: ../common/gsm-error.c:79 msgid "The actual response will be sent asynchronously." msgstr "La vera risposta sarà inviata in modo asincrono." #: ../common/gsm-error.c:80 msgid "Unknown error." msgstr "Errore sconosciuto." #: ../common/gsm-filetypes.c:599 #, c-format msgid "Sorry, gnokii was not compiled with XPM support.\n" msgstr "gnokii non è stato compilato con il supporto per il formato XPM.\n" #: ../common/gsm-filetypes.c:642 #, c-format msgid "Bitmap too large\n" msgstr "Bitmap troppo grande\n" #: ../common/gsm-filetypes.c:1519 #, c-format msgid "Formatting error: too many subentries\n" msgstr "Formato errato: troppe sottovoci\n" #: ../common/gsm-filetypes.c:1528 #, c-format msgid "Formatting error: unknown error while reading subentry type\n" msgstr "Formato errato: errore sconosciuto leggendo il tipo della sottovoce\n" #: ../common/gsm-filetypes.c:1532 #, c-format msgid "Formatting error: empty entry type\n" msgstr "Formato errato: manca il tipo della voce\n" #: ../common/gsm-filetypes.c:1542 #, c-format msgid "Formatting error: subentry has only entry type field\n" msgstr "Formato errato: la sottovoce ha solo il campo per il tipo della voce\n" #: ../common/gsm-filetypes.c:1551 #, c-format msgid "Formatting error: unknown error while reading subentry number type\n" msgstr "" "Formato errato: errore sconosciuto leggendo il numero del tipo della " "sottovoce\n" #: ../common/gsm-filetypes.c:1555 #, c-format msgid "Formatting error: empty number type\n" msgstr "Formato errato: il numero del tipo è vuoto\n" #: ../common/gsm-filetypes.c:1570 ../common/gsm-filetypes.c:1593 #, c-format msgid "Formatting error: subentry has only entry and number type fields\n" msgstr "" "Formato errato: la sottovoce ha solo i campi per il tipo e il numero della " "voce\n" #: ../common/gsm-filetypes.c:1579 #, c-format msgid "Formatting error: unknown error while reading subentry id\n" msgstr "" "Formato errato: errore sconosciuto leggendo l'identificativo della " "sottovoce\n" #: ../common/gsm-filetypes.c:1583 #, c-format msgid "Formatting error: empty id\n" msgstr "Formato errato: l'identificativo è vuoto\n" #: ../common/gsm-filetypes.c:1617 #, c-format msgid "Formatting error: unknown error while reading subentry contents\n" msgstr "" "Formato errato: errore sconosciuto leggendo il contenuto della sottovoce\n" #: ../common/gsm-filetypes.c:1621 #, c-format msgid "Formatting error: empty subentry contents\n" msgstr "Formato errato: il contenuto della sottovoce è vuoto\n" #. for now be compacrapatible ;) #: ../common/gsm-networks.c:1294 ../common/gsm-networks.c:1341 #: ../gnokii/gnokii-logo.c:254 ../gnokii/gnokii-logo.c:266 #: ../gnokii/gnokii-logo.c:281 ../gnokii/gnokii-logo.c:362 #: ../smsd/lowlevel.c:141 ../smsd/lowlevel.c:142 ../smsd/lowlevel.c:143 #: ../xgnokii/xgnokii_lowlevel.c:220 ../xgnokii/xgnokii_lowlevel.c:221 #: ../xgnokii/xgnokii_lowlevel.c:222 ../xgnokii/xgnokii_lowlevel.c:223 #: ../xgnokii/xgnokii_sms.c:262 ../xgnokii/xgnokii_sms.c:342 msgid "unknown" msgstr "sconosciuto" #: ../common/gsm-networks.c:1304 ../common/gsm-networks.c:1318 #: ../common/gsm-networks.c:1355 ../gnokii/gnokii-monitor.c:256 #: ../gnokii/gnokii-other.c:205 msgid "undefined" msgstr "non definito" #: ../common/gsm-sms.c:299 msgid "Delivered" msgstr "Consegnato" #: ../common/gsm-sms.c:312 msgid "Failed" msgstr "Fallito" #: ../common/gsm-sms.c:381 msgid "Pending" msgstr "In attesa" #: ../common/gsm-statemachine.c:390 msgid "" "UNHANDLED FRAME RECEIVED\n" "request: " msgstr "" "PACCHETTO NON GESTITO\n" "richiesta: " #: ../common/gsm-statemachine.c:393 msgid "reply: " msgstr "risposta: " #: ../common/gsm-statemachine.c:396 ../common/phones/nokia.c:679 msgid "Please read Docs/Bugs and send a bug report!\n" msgstr "" "Leggere Docs/Bugs (documento in Inglese) e inviare una segnalazione " "dell'errore.\n" #: ../common/libfunctions.c:183 ../gnokiid/gnokiid.c:164 #, c-format msgid "Lock file error. Exiting.\n" msgstr "Errore nel file di blocco. Uscita.\n" #: ../common/libfunctions.c:191 #, c-format msgid "" "Telephone interface init failed: %s\n" "Quitting.\n" msgstr "" "Errore nell'inizializzazione dell'interfaccia del telefono: %s\n" "Uscita.\n" #: ../common/links/atbus.c:69 msgid "gnokii I/O error" msgstr "È stato rilevato un errore di I/O" #: ../common/links/atbus.c:85 msgid "Couldn't open ATBUS device" msgstr "Impossibile aprire il dispositivo ATBUS" #: ../common/links/cbus.c:284 msgid "Couldn't open CBUS device" msgstr "Impossibile aprire il dispositivo CBUS" #: ../common/links/fbus-3110.c:77 ../common/links/fbus.c:85 #: ../common/links/fbus.c:141 ../common/links/fbus.c:184 msgid "Couldn't open FBUS device" msgstr "Impossibile aprire il dispositivo FBUS" #: ../common/links/fbus-3110.c:258 #, c-format msgid "fb3110_tx_frame_send - message too long!\n" msgstr "fb3110_tx_frame_send - messaggio troppo lungo.\n" #: ../common/links/fbus-phonet.c:107 msgid "Couldn't open PHONET device" msgstr "Impossibile aprire il dispositivo PHONET" #: ../common/links/gnbus.c:305 msgid "Couldn't open GNBUS device" msgstr "Impossibile aprire il dispositivo GNBUS" #: ../common/links/m2bus.c:78 msgid "Couldn't open M2BUS device" msgstr "Impossibile aprire il dispositivo M2BUS" #: ../common/misc.c:466 #, c-format msgid "Cannot lock NULL device. Set port config parameter correctly.\n" msgstr "" "Impossibile bloccare il device NULL. Impostare correttamente il parametro " "nella configurazione.\n" #: ../common/misc.c:481 #, c-format msgid "Out of memory error while locking device.\n" msgstr "Memoria esaurita durante il blocco del dispositivo.\n" #: ../common/misc.c:510 #, c-format msgid "Lockfile %s is stale. Overriding it...\n" msgstr "Il file di blocco %s è obsoleto. Verrà ignorato...\n" #: ../common/misc.c:513 #, c-format msgid "Overriding file %s failed, please check the permissions.\n" msgstr "Impossibile scavalcare il file di blocco %s, controllare i permessi.\n" #: ../common/misc.c:514 ../common/misc.c:529 #, c-format msgid "Cannot lock device.\n" msgstr "Impossibile bloccare il dispositivo.\n" #: ../common/misc.c:518 #, c-format msgid "Device already locked with %s.\n" msgstr "Il dispositivo è già bloccato con %s.\n" #: ../common/misc.c:527 #, c-format msgid "Unable to read lockfile %s.\n" msgstr "Impossibile leggere il file di blocco %s.\n" #: ../common/misc.c:528 #, c-format msgid "Please check for reason and remove the lockfile by hand.\n" msgstr "Cercare le cause e rimuovere manualmente il file di blocco.\n" #: ../common/misc.c:538 #, c-format msgid "Device seems to be locked by unknown process.\n" msgstr "Il dispositivo sembra bloccato da un processo sconosciuto.\n" #: ../common/misc.c:540 #, c-format msgid "Please check permission on lock directory.\n" msgstr "Controllare i permessi della directory di blocco.\n" #: ../common/misc.c:542 #, c-format msgid "Cannot create lockfile %s. Please check for existence of the path.\n" msgstr "" "Impossibile creare il file di blocco %s. Controllare se il percorso esiste.\n" #: ../common/misc.c:547 #, c-format msgid "Failed to write to the lockfile %s.\n" msgstr "Impossibile scrivere nel file di blocco «%s».\n" #: ../common/misc.c:572 #, c-format msgid "Cannot unlock device: %s\n" msgstr "Impossibile sbloccare il dispositivo: %s\n" #: ../common/nokia-decoding.c:352 ../common/phones/nk6100.c:1010 #: ../xgnokii/xgnokii.c:222 ../xgnokii/xgnokii.c:1039 msgid "VIP" msgstr "VIP" #: ../common/nokia-decoding.c:358 ../common/phones/nk6100.c:1016 #: ../xgnokii/xgnokii.c:224 ../xgnokii/xgnokii.c:1063 msgid "Colleagues" msgstr "Colleghi" #: ../common/nokia-decoding.c:361 ../common/phones/nk6100.c:1019 #: ../xgnokii/xgnokii.c:225 ../xgnokii/xgnokii.c:1075 msgid "Other" msgstr "Altro" # nemmeno sul mio telefono non è tradotto #. Set a default SMSC name because +CSCA doesn't provide one #. Set a default name #: ../common/phones/atgen.c:2075 ../common/phones/nk6100.c:1552 #: ../common/phones/nk6510.c:1951 ../common/phones/nk7110.c:1479 #: ../common/phones/pcsc.c:692 ../xgnokii/xgnokii.c:521 #: ../xgnokii/xgnokii_sms.c:832 #, c-format msgid "Set %d" msgstr "Set %d" # numero del chiamante #: ../common/phones/atgen.c:2692 #, c-format msgid "Withheld" msgstr "Privato" #: ../common/phones/fake.c:95 #, c-format msgid "" "Apparently you didn't configure gnokii. Please do it prior to using it.\n" "You can get some clues from comments included in sample config file or give\n" "a try with gnokii-configure utility included in gnokii distribution.\n" msgstr "" #: ../common/phones/nk6100.c:2092 #, c-format msgid "Personal" msgstr "Personale" #: ../common/phones/nk6100.c:2095 ../common/phones/nk6100.c:2122 #, c-format msgid "Car" msgstr "Auto" #: ../common/phones/nk6100.c:2098 ../common/phones/nk6100.c:2125 #, c-format msgid "Headset" msgstr "Auricolare" #: ../common/phones/nk6100.c:2101 ../common/phones/nk6100.c:2128 #, c-format msgid "Unknown (%d)" msgstr "Sconosciuto (%d)" #: ../common/phones/nk6100.c:2107 ../xgnokii/xgnokii_contacts.c:701 #: ../xgnokii/xgnokii_contacts.c:791 ../xgnokii/xgnokii_contacts.c:938 #: ../xgnokii/xgnokii_contacts.c:980 ../xgnokii/xgnokii_contacts.c:1021 #: ../xgnokii/xgnokii_contacts.c:1094 ../xgnokii/xgnokii_contacts.c:1186 #, c-format msgid "General" msgstr "Generale" #: ../common/phones/nk6100.c:2110 #, c-format msgid "Silent" msgstr "Silenzioso" #: ../common/phones/nk6100.c:2116 #, c-format msgid "Outdoor" msgstr "All'aperto" #: ../common/phones/nk6100.c:2119 #, c-format msgid "Pager" msgstr "Cercapersone" #: ../common/phones/nk6510.c:1811 #, c-format msgid "" "6510 series phones seem to be quite sensitive to malformed SMS messages\n" "It may have to be sent to Nokia Service if something fails!\n" "Do you really want to continue? " msgstr "" "I telefoni della serie 6510 sembrano molto sensibili ai messaggi SMS " "malformati.\n" "Potrebbe essere necessario l'invio ad un centro assistenza Nokia se qualcosa " "va storto.\n" "Continuare veramente?" #: ../common/phones/nk6510.c:1814 #, c-format msgid "(yes/no) " msgstr "(sì/no) " #: ../common/phones/nk6510.c:1816 ../gnokii/gnokii-phonebook.c:421 #: ../gnokii/gnokii-sms.c:542 ../gnokii/gnokii-sms.c:833 #: ../gnokii/gnokii-utils.c:63 ../gnokii/gnokii-wap.c:223 msgid "yes" msgstr "sì" #: ../common/phones/nk6510.c:2361 ../common/phones/nk6510.c:2426 #, c-format msgid "Progress: %3d%% completed" msgstr "Avanzamento: %3d%% completato" #: ../common/phones/nokia.c:338 msgid "Tried to activate CONTACT SERVICE\n" msgstr "Tentativo di attivare CONTACT SERVICE\n" #: ../common/phones/nokia.c:667 msgid "" "NOKIA RAW RINGTONE DECODING FAILED\n" "ringtone:\n" msgstr "" "La decodifica della suoneria Nokia è fallita\n" "suoneria:\n" #: ../common/phones/nokia.c:678 #, c-format msgid "offset: %04x\n" msgstr "posizione: %04x\n" #: ../common/phones/pcsc.c:593 #, c-format msgid "Phase %s SIM" msgstr "SIM fase %s" #: ../common/vcal.lx:161 #, c-format msgid "Error: Invalid calendar note number!\n" msgstr "Errore: il numero del promemoria non è valido.\n" #. translators: %s are replaced by function names #: ../common/vcal.lx:282 ../common/vcal.lx:344 #, c-format msgid "Function %s() is deprecated. Use %s() instead.\n" msgstr "La funzione %s() è sconsigliata. Usare %s().\n" #: ../common/vcal.lx:285 ../common/vcal.lx:347 ../gnokii/gnokii-calendar.c:256 #: ../gnokii/gnokii-file.c:437 ../gnokii/gnokii-todo.c:162 ../smsd/file.c:185 #: ../xgnokii/xgnokii_contacts.c:2700 ../xgnokii/xgnokii_dtmf.c:93 #: ../xgnokii/xgnokii_logos.c:1372 ../xgnokii/xgnokii_speed.c:324 #, c-format msgid "Can't open file %s for reading!\n" msgstr "Impossibile aprire il file %s in lettura.\n" #: ../common/vcal.lx:294 ../common/vcal.lx:356 #, c-format msgid "Error parsing vCalendar file!\n" msgstr "Errore nel formato del file vCalendar.\n" #: ../getopt/getopt.c:566 ../getopt/getopt.c:582 #, c-format msgid "%s: option '%s' is ambiguous\n" msgstr "%s: l'opzione «%s» è ambigua\n" #: ../getopt/getopt.c:615 ../getopt/getopt.c:619 #, c-format msgid "%s: option '--%s' doesn't allow an argument\n" msgstr "\"%s: l'opzione «--%s» non accetta alcun argomento\n" #: ../getopt/getopt.c:628 ../getopt/getopt.c:633 #, c-format msgid "%s: option '%c%s' doesn't allow an argument\n" msgstr "\"%s: l'opzione «%c%s» non accetta alcun argomento\n" #: ../getopt/getopt.c:676 ../getopt/getopt.c:695 ../getopt/getopt.c:998 #: ../getopt/getopt.c:1017 #, c-format msgid "%s: option '%s' requires an argument\n" msgstr "%s: l'opzione «%s» richiede un argomento\n" #: ../getopt/getopt.c:733 ../getopt/getopt.c:736 #, c-format msgid "%s: unrecognized option '--%s'\n" msgstr "%s: opzione «--%s» non riconosciuta\n" #: ../getopt/getopt.c:744 ../getopt/getopt.c:747 #, c-format msgid "%s: unrecognized option '%c%s'\n" msgstr "%s: opzione «%c%s» non riconosciuta\n" #: ../getopt/getopt.c:796 ../getopt/getopt.c:799 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s: opzione non lecita -- «%c»\n" #: ../getopt/getopt.c:849 ../getopt/getopt.c:866 ../getopt/getopt.c:1069 #: ../getopt/getopt.c:1087 #, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: l'opzione richiede un argomento -- «%c»\n" #: ../getopt/getopt.c:919 ../getopt/getopt.c:935 #, c-format msgid "%s: option '-W %s' is ambiguous\n" msgstr "%s: l'opzione «-W %s» è ambigua\n" #: ../getopt/getopt.c:959 ../getopt/getopt.c:977 #, c-format msgid "%s: option '-W %s' doesn't allow an argument\n" msgstr "%s: l'opzione «-W %s» non accetta alcun argomento\n" #: ../gnokiid/gnokiid.c:65 #, c-format msgid "GNOKIID Version %s\n" msgstr "GNOKIID Versione %s\n" #: ../gnokiid/gnokiid.c:70 #, c-format msgid "" "Copyright (C) Hugh Blemings , 1999\n" "Copyright (C) Pavel Janik ml. , 1999\n" "Built %s %s\n" msgstr "" "Copyright (C) Hugh Blemings , 1999\n" "Copyright (C) Pavel Janik ml. , 1999\n" "Data di compilazione %s %s\n" #: ../gnokiid/gnokiid.c:81 #, c-format msgid "" " usage: gnokiid [--help|--version|--debug]\n" " --help display usage information\n" " --version displays version and copyright information\n" " --debug uses stdin/stdout for virtual modem comms\n" msgstr "" " Uso: gnokiid [--help|--version|--debug]\n" " --help mostra le informazioni sull'uso\n" " --version mostra informazioni sul copyright e sulla " "versione\n" " --debug usa stdin/stdout per comunicare con il modem " "virtuale\n" #: ../gnokiid/gnokiid.c:149 #, c-format msgid "" "gnokiid purpose is to work only with the phones that do not have AT Hayes\n" "commands interpreter.\n" msgstr "" "Lo scopo di gnokiid è di funzionare solo con i telefoni che non hanno un\n" " interprete per i comandi Hayes AT.\n" #: ../gnokii/gnokii.c:203 #, c-format msgid "GNOKII Version %s\n" msgstr "GNOKII Versione %s\n" #: ../gnokii/gnokii.c:210 #, fuzzy, c-format msgid "" "Copyright (C) Hugh Blemings , 1999, 2000\n" "Copyright (C) Pavel Janik ml. , 1999, 2000\n" "Copyright (C) Pavel Machek , 2001\n" "Copyright (C) Pawel Kot , 2001-2011\n" "Copyright (C) BORBELY Zoltan , 2002\n" "Copyright (C) Daniele Forsi , 2004-2011\n" "gnokii is free software, covered by the GNU General Public License, and you " "are\n" "welcome to change it and/or distribute copies of it under certain " "conditions.\n" "There is absolutely no warranty for gnokii. See GPL for details.\n" "Built %s %s\n" msgstr "" "Copyright (C) Hugh Blemings , 1999, 2000\n" "Copyright (C) Pavel Janik ml. , 1999, 2000\n" "Copyright (C) Pavel Machek , 2001\n" "Copyright (C) Pawel Kot , 2001-2009\n" "Copyright (C) BORBELY Zoltan , 2002\n" "Copyright (C) Daniele Forsi , 2004-2009\n" "gnokii è software libero, coperto dalla GNU General Public License e \n" "chiunque può modificarlo o distribuirne copie a certe condizioni.\n" "Non c'è assolutamente nessuna garanzia per gnokii. Vedere la GPL per i " "dettagli.\n" "Data di compilazione %s %s\n" #: ../gnokii/gnokii.c:238 #, c-format msgid "" "Usage:\n" "\tgnokii [CONFIG OPTIONS] OPTIONS\n" "\n" "CONFIG OPTIONS\n" "\t\t--config filename\n" "\t\t--phone phone_section\n" "\n" "OPTIONS\n" "Use just one option at a time.\n" "General options:\n" " --help [all] [monitor] [sms] [mms] [phonebook] [calendar] [todo]\n" " [dial] [profile] [settings] [wap] [logo] [ringtone]\n" " [security] [file] [other]\n" " --version\n" " --shell\n" msgstr "" "Uso:\n" "\tgnokii [OPZIONI DI CONFIGURAZIONE] OPZIONI\n" "\n" "OPZIONI DI CONFIGURAZIONE\n" "\t\t--config NOME_FILE\n" "\t\t--phone SEZIONE_TELEFONO\n" "\n" "OPZIONI\n" "Usare solo un'opzione per volta.\n" "Opzioni generali:\n" " --help [all] [monitor] [sms] [mms] [phonebook] [calendar] [todo]\n" " [dial] [profile] [settings] [wap] [logo] [ringtone]\n" " [security] [file] [other]\n" " --version\n" " --shell\n" #: ../gnokii/gnokii.c:359 #, c-format msgid "Cannot open logfile %s\n" msgstr "Impossibile aprire il file di log %s\n" #: ../gnokii/gnokii.c:392 #, c-format msgid "File: %s\n" msgstr "File: %s\n" #: ../gnokii/gnokii.c:394 #, c-format msgid "Phone section: [phone_%s]\n" msgstr "Sezione telefono: [phone_%s]\n" #: ../gnokii/gnokii.c:403 #, c-format msgid "WARNING: cannot open logfile, logs will be directed to stderr\n" msgstr "" "ATTENZIONE: impossibile aprire il file di log, i messaggi saranno inviati a " "stderr\n" #: ../gnokii/gnokii.c:819 #, c-format msgid "Use '%s --help' for usage information.\n" msgstr "Usare «%s --help» per informazioni sull'uso.\n" #: ../gnokii/gnokii.c:821 #, c-format msgid "Use '--help' for usage information.\n" msgstr "Usare «--help» per informazioni sull'uso.\n" #: ../gnokii/gnokii.c:1142 #, c-format msgid "Unknown option: %d\n" msgstr "Opzione sconosciuta: %d\n" #: ../gnokii/gnokii.c:1206 #, c-format msgid "" "gnokii needs to be compiled with readline support to enable this option.\n" msgstr "" "gnokii deve essere compilato con il supporto a readline per abilitare questa " "opzione.\n" #: ../gnokii/gnokii-calendar.c:56 #, c-format msgid "" "Calendar options:\n" " --getcalendarnote start_number [end_number|end] [-v|--vCal]\n" " --writecalendarnote vcalendarfile start_number [end_number|end]\n" " --deletecalendarnote start [end_number|end]\n" msgstr "" "Opzioni promemoria:\n" " --getcalendarnote numero_iniziale [numero_finale|end] [-v|--vCal]\n" " --writecalendarnote file_vcalendar numero_iniziale [numero_finale|" "end]\n" " --deletecalendarnote numero_iniziale [numero_finale|end]\n" #: ../gnokii/gnokii-calendar.c:65 #, c-format msgid "" "usage: --getcalendarnote start_number [end_number | end] [-v|--vCal]\n" " start_number - entry number in the phone calendar " "(numeric)\n" " end_number - read to this entry in the phone " "calendar (numeric, optional)\n" " end - the string \"end\" indicates all " "entries from start to end\n" " -v - output in iCalendar format\n" " NOTE: if no end is given, only the start entry is read\n" msgstr "" "Uso: --getcalendarnote numero_iniziale [numero_finale | end] [-v|--vCal]\n" " numero_iniziale - il numero della voce nel calendario " "del telefono (numerico)\n" " numero_finale - fino a questa voce nel calendario " "del telefono (numerico, opzionale)\n" " end - la stringa «end» indica tutte le " "voci dall'inizio alla fine\n" " -v - output nel formato iCalendar\n" " NOTA: se non è fornita una voce finale, sarà letta solo la voce iniziale\n" #. Plain text output #. Translators: this is the header of a calendar note. Example: 1 (1). Type: Meeting #: ../gnokii/gnokii-calendar.c:130 #, c-format msgid "%d (%d). %s: %s\n" msgstr "%d (%d). %s: %s\n" #: ../gnokii/gnokii-calendar.c:130 ../xgnokii/xgnokii_calendar.c:1536 msgid "Type" msgstr "Tipo" #: ../gnokii/gnokii-calendar.c:132 #, c-format msgid " Start date: %d-%02d-%02d\n" msgstr " Data inizio: %3$d/%2$02d/%1$04d\n" #: ../gnokii/gnokii-calendar.c:137 #, c-format msgid " Start time: %02d:%02d:%02d\n" msgstr " Ora inizio: %d.%02d.%02d\n" #: ../gnokii/gnokii-calendar.c:142 #, c-format msgid " End date: %d-%02d-%02d\n" msgstr " Data fine: %3$d/%2$02d/%1$04d\n" #: ../gnokii/gnokii-calendar.c:146 #, c-format msgid " End time: %02d:%02d:%02d\n" msgstr " Ora fine: %d.%02d.%02d\n" #: ../gnokii/gnokii-calendar.c:154 #, c-format msgid " Alarm date: %02d-%02d\n" msgstr " Data suoneria: %2$02d/%1$02d\n" #: ../gnokii/gnokii-calendar.c:158 #, c-format msgid " Alarm date: %d-%02d-%02d\n" msgstr " Data suoneria: %3$d/%2$02d/%1$04d\n" #: ../gnokii/gnokii-calendar.c:163 #, c-format msgid " Alarm time: %02d:%02d:%02d\n" msgstr " Ora suoneria: %d.%02d.%02d\n" #: ../gnokii/gnokii-calendar.c:167 #, c-format msgid " Alarm tone %s\n" msgstr " Suoneria %s\n" #: ../gnokii/gnokii-calendar.c:168 ../xgnokii/xgnokii_calendar.c:214 #: ../xgnokii/xgnokii_calendar.c:220 msgid "enabled" msgstr "abilitata" #: ../gnokii/gnokii-calendar.c:168 ../xgnokii/xgnokii_calendar.c:214 #: ../xgnokii/xgnokii_calendar.c:220 msgid "disabled" msgstr "disabilitata" #: ../gnokii/gnokii-calendar.c:171 #, c-format msgid " %s: " msgstr " %s: " #: ../gnokii/gnokii-calendar.c:171 msgid "Repeat" msgstr "Ripetizione" #: ../gnokii/gnokii-calendar.c:182 #, c-format msgid "Every %d hours" msgstr "Ogni %d ore" #: ../gnokii/gnokii-calendar.c:187 #, c-format msgid " The event will be repeated " msgstr " L'evento si ripeterà " #: ../gnokii/gnokii-calendar.c:190 #, c-format msgid "forever." msgstr "per sempre." #: ../gnokii/gnokii-calendar.c:193 #, c-format msgid "%d times." msgstr "%d volte." #: ../gnokii/gnokii-calendar.c:199 #, c-format msgid " Text: %s\n" msgstr " Testo: %s\n" #: ../gnokii/gnokii-calendar.c:203 ../gnokii/gnokii-calendar.c:206 #: ../gnokii/gnokii-wap.c:226 ../gnokii/gnokii-wap.c:227 #: ../gnokii/gnokii-wap.c:228 ../gnokii/gnokii-wap.c:229 #: ../gnokii/gnokii-wap.c:230 ../gnokii/gnokii-wap.c:231 #: ../gnokii/gnokii-wap.c:232 ../gnokii/gnokii-wap.c:233 #: ../gnokii/gnokii-wap.c:235 ../gnokii/gnokii-wap.c:236 #: ../gnokii/gnokii-wap.c:237 ../gnokii/gnokii-wap.c:238 #: ../gnokii/gnokii-wap.c:239 ../gnokii/gnokii-wap.c:240 #: ../gnokii/gnokii-wap.c:241 ../gnokii/gnokii-wap.c:243 #: ../gnokii/gnokii-wap.c:244 #, c-format msgid " %s: %s\n" msgstr " %s: %s\n" #: ../gnokii/gnokii-calendar.c:203 ../xgnokii/xgnokii.c:1709 msgid "Phone" msgstr "Telefono" #: ../gnokii/gnokii-calendar.c:226 #, c-format msgid "The calendar note can not be read: %s\n" msgstr "La nota di calendario non può essere letta: %s\n" #: ../gnokii/gnokii-calendar.c:236 #, c-format msgid "" "usage: --writecalendarnote vcalendarfile start_number [end_number|end]\n" " vcalendarfile - file containing calendar notes in " "vCal format\n" " start_number - first calendar note from " "vcalendarfile to read\n" " end_number - last calendar note from " "vcalendarfile to read\n" " end - read all notes from vcalendarfile " "from start_number\n" " NOTE: it stores the note at the first empty location.\n" msgstr "" "Uso: --writecalendarnote file_vcalendar numero_iniziale [numero_finale|end]\n" " file_vcalendar - file che contiene note di " "calendario in formato vCal\n" " numero - nota di calendario all'interno del " "file\n" " NOTA: memorizza la nota alla prima posizione libera.\n" #: ../gnokii/gnokii-calendar.c:300 ../gnokii/gnokii-todo.c:206 #, c-format msgid "Failed to load vCalendar file: %s\n" msgstr "Impossibile leggere il file vCalendar: %s\n" #: ../gnokii/gnokii-calendar.c:309 ../gnokii/gnokii-dial.c:143 #: ../gnokii/gnokii-todo.c:215 #, c-format msgid "Successfully written!\n" msgstr "Scrittura eseguita.\n" #: ../gnokii/gnokii-calendar.c:311 #, c-format msgid "Failed to write calendar note: %s\n" msgstr "Impossibile scrivere la nota di calendario: %s\n" #: ../gnokii/gnokii-calendar.c:320 #, c-format msgid "" "usage: --deletecalendarnote start_number [end_number | end]\n" " start_number - first number in the phone calendar " "(numeric)\n" " end_number - until this entry in the phone " "calendar (numeric, optional)\n" " end - the string \"end\" indicates all " "entries from start to end\n" " NOTE: if no end is given, only the start entry is deleted\n" msgstr "" "Uso: --deletecalendarnote numero_iniziale [numero_finale | end]\n" " numero_iniziale - il primo numero nel calendario del telefono " "(numerico)\n" " numero_finale - fino a questa voce nel calendario del telefono " "(numerico, opzionale)\n" " end - la stringa «end» indica tutte le voci " "dall'inizio alla fine\n" " NOTA: se non è fornita una voce finale, sarà eliminata solo la voce " "iniziale\n" #: ../gnokii/gnokii-calendar.c:355 #, c-format msgid "Calendar note deleted.\n" msgstr "La nota di calendario è stata eliminata.\n" #: ../gnokii/gnokii-calendar.c:357 #, c-format msgid "The calendar note cannot be deleted: %s\n" msgstr "La nota di calendario non può essere eliminata: %s\n" #: ../gnokii/gnokii-dial.c:52 #, c-format msgid "" "Dialling and call options:\n" " --getspeeddial location\n" " --setspeeddial number memory_type location\n" " --dialvoice number\n" " --senddtmf string\n" " --answercall callid\n" " --hangup callid\n" " --divert {--op|-o} {register|enable|query|disable|erasure}\n" " {--type|-t} {all|busy|noans|outofreach|notavail}\n" " {--call|-c} {all|voice|fax|data}\n" " [{--timeout|-m} time_in_seconds]\n" " [{--number|-n} number]\n" "All number, location and callid options need to be numeric.\n" msgstr "" "Opzioni chiamate:\n" " --getspeeddial posizione\n" " --setspeeddial numero tipo_memoria posizione\n" " --dialvoice numero\n" " --senddtmf stringa\n" " --answercall id_chiamata\n" " --hangup id_chiamata\n" " --divert {--op|-o} {register|enable|query|disable|erasure}\n" " {--type|-t} {all|busy|noans|outofreach|notavail}\n" " {--call|-c} {all|voice|fax|data}\n" " [{--timeout|-m} tempo_in_secondi]\n" " [{--number|-n} numero]\n" "Tutti gli argomenti numero, posizione e id_chiamata devono essere numerici.\n" #: ../gnokii/gnokii-dial.c:70 #, c-format msgid "" "usage: --getspeeddial location\n" " location - location in the speed dial memory\n" msgstr "" "Uso: --getspeeddial posizione\n" " posizione - posizione nella memoria delle chiamate " "rapide\n" #: ../gnokii/gnokii-dial.c:93 #, fuzzy, c-format msgid "SpeedDial nr. %d %s %d\n" msgstr "Chiamata veloce n° %d: %d:%d\n" #: ../gnokii/gnokii-dial.c:96 ../gnokii/gnokii-dial.c:146 #: ../gnokii/gnokii-dial.c:186 ../gnokii/gnokii-dial.c:217 #: ../gnokii/gnokii-dial.c:248 ../gnokii/gnokii-dial.c:381 #: ../gnokii/gnokii-logo.c:298 ../gnokii/gnokii-logo.c:469 #: ../gnokii/gnokii-monitor.c:454 ../gnokii/gnokii-monitor.c:457 #: ../gnokii/gnokii-monitor.c:480 ../gnokii/gnokii-other.c:190 #: ../gnokii/gnokii-phonebook.c:256 ../gnokii/gnokii-profile.c:112 #: ../gnokii/gnokii-profile.c:162 ../gnokii/gnokii-security.c:95 #: ../gnokii/gnokii-security.c:127 ../gnokii/gnokii-security.c:205 #: ../gnokii/gnokii-security.c:247 ../gnokii/gnokii-security.c:298 #: ../gnokii/gnokii-settings.c:122 ../gnokii/gnokii-settings.c:146 #: ../gnokii/gnokii-settings.c:180 ../gnokii/gnokii-settings.c:204 #: ../gnokii/gnokii-sms.c:552 ../gnokii/gnokii-sms.c:1048 #: ../gnokii/gnokii-sms.c:1126 ../gnokii/gnokii-sms.c:1156 #: ../gnokii/gnokii-sms.c:1189 ../gnokii/gnokii-sms.c:1329 #: ../gnokii/gnokii-sms.c:1331 ../gnokii/gnokii-wap.c:94 #: ../gnokii/gnokii-wap.c:129 ../gnokii/gnokii-wap.c:162 #: ../gnokii/gnokii-wap.c:248 ../gnokii/gnokii-wap.c:323 #: ../smsd/lowlevel.c:112 ../smsd/lowlevel.c:125 ../smsd/mysql.c:77 #: ../smsd/mysql.c:134 ../smsd/mysql.c:171 ../smsd/mysql.c:189 #: ../smsd/mysql.c:199 ../smsd/mysql.c:225 ../smsd/mysql.c:263 #: ../smsd/mysql.c:296 ../smsd/mysql.c:336 ../smsd/mysql.c:345 #: ../smsd/mysql.c:399 ../smsd/pq.c:68 ../smsd/pq.c:77 ../smsd/pq.c:121 #: ../smsd/pq.c:150 ../smsd/pq.c:190 ../smsd/pq.c:212 ../smsd/pq.c:241 #: ../smsd/pq.c:258 ../smsd/pq.c:296 ../smsd/pq.c:333 ../smsd/pq.c:376 #: ../smsd/pq.c:427 ../smsd/sqlite.c:58 ../smsd/sqlite.c:70 #: ../smsd/sqlite.c:240 #, c-format msgid "Error: %s\n" msgstr "Errore: %s\n" #: ../gnokii/gnokii-dial.c:105 #, c-format msgid "" "usage: --setspeeddial number memory_type location\n" " number - phone number to be stored\n" " memory_type - memory type for the speed dial\n" " location - location in the speed dial memory\n" msgstr "" "Uso: --setspeeddial numero tipo_memoria posizione\n" " numero - numero di telefono da memorizzare\n" " tipo_memoria - tipo di memoria per la chiamata " "rapida\n" " posizione - posizione nella memoria delle " "chiamate rapide\n" #: ../gnokii/gnokii-dial.c:128 ../gnokii/gnokii-phonebook.c:111 #: ../gnokii/gnokii-phonebook.c:487 #, c-format msgid "Unknown memory type %s (use ME, SM, ...)!\n" msgstr "Tipo di memoria %s sconosciuto (usare ME, SM, ...)\n" #: ../gnokii/gnokii-dial.c:169 #, c-format msgid "Dialing failed: %s\n" msgstr "Chiamata fallita: %s\n" #: ../gnokii/gnokii-dial.c:171 #, c-format msgid "Dialled call, id: %d (lowlevel id: %d)\n" msgstr "Chiamata effettuata, id: %d (lowlevel id: %d)\n" #: ../gnokii/gnokii-dial.c:194 #, c-format msgid "" "usage: --answercall callid\n" " callid - call identifier\n" msgstr "" "Uso: --answercall id_chiamata\n" " id_chiamata - identificativo della chiamata\n" #: ../gnokii/gnokii-dial.c:225 #, c-format msgid "" "usage: --hangup callid\n" " callid - call identifier\n" msgstr "" "Uso: --hangup id_chiamata\n" " id_chiamata - identificativo della chiamata\n" #: ../gnokii/gnokii-dial.c:256 #, c-format msgid "" " usage: --divert\n" " -o operation\n" " --op operation operation to be executed, needs to be one\n" " of the following: register, enable, query,\n" " disable, erasure; this is required option\n" " -t type\n" " --type type type of the operation, needs to be one of\n" " the following: all, busy, noans, outofreach,\n" " notavail, unconditional; this is required " "option\n" " -c calltype\n" " --call calltype type of call for the operation, needs to be\n" " one of the following: all, voice, fax, data;\n" " this is optional\n" " -m sec\n" " --timeout sec timeout to be set; the value is in seconds\n" " -n msisdn\n" " --number msisdn number for redirection\n" "\n" msgstr "" " Uso: --divert\n" " -o operazione\n" " --op operazione operazione da eseguire, deve essere una\n" " tra le seguenti: register, enable, query,\n" " disable, erasure; è un argomento obbligatorio\n" " -t type\n" " --type type tipo dell'operazione, deve essere uno\n" " tra i seguenti: all, busy, noans, outofreach,\n" " notavail, unconditional; è un argomento " "obbligatorio\n" " -c tipo_chiamata\n" " --call tipo_chiamata tipo di chiamata per l'operazione, deve essere " "uno\n" " tra i seguenti: all, voice, fax, data;\n" " è un argomento facoltativo\n" " -m sec\n" " --timeout sec tempo d'attesa da impostare; valore in secondi\n" " -n msisdn\n" " --number msisdn numero per la deviazione\n" "\n" #: ../gnokii/gnokii-dial.c:373 ../gnokii/gnokii-dial.c:374 #: ../gnokii/gnokii-dial.c:376 ../gnokii/gnokii-phonebook.c:199 #: ../gnokii/gnokii-phonebook.c:203 ../gnokii/gnokii-todo.c:119 #: ../gnokii/gnokii-todo.c:120 ../gnokii/gnokii-wap.c:89 #: ../gnokii/gnokii-wap.c:90 ../gnokii/gnokii-wap.c:220 #: ../gnokii/gnokii-wap.c:221 ../gnokii/gnokii-wap.c:222 #: ../gnokii/gnokii-wap.c:223 ../gnokii/gnokii-wap.c:224 #, c-format msgid "%s: %s\n" msgstr "%s: %s\n" #: ../gnokii/gnokii-dial.c:373 msgid "Divert type" msgstr "Tipo deviazione" #: ../gnokii/gnokii-dial.c:374 msgid "Call type" msgstr "Tipo chiamata" #: ../gnokii/gnokii-dial.c:377 #, c-format msgid "%s: %d\n" msgstr "%s: %d\n" #: ../gnokii/gnokii-dial.c:377 msgid "Timeout" msgstr "Attesa" #: ../gnokii/gnokii-dial.c:379 #, c-format msgid "Divert isn't active.\n" msgstr "La deviazione delle chiamate non è attiva.\n" #: ../gnokii/gnokii-file.c:53 #, c-format msgid "" "File options:\n" " --getfilelist remote_path\n" " --getfiledetailsbyid [id]\n" " --getfileid remote_filename\n" " --getfile remote_filename [local_filename]\n" " --getfilebyid id [local_filename]\n" " --getallfiles remote_path\n" " --putfile local_filename remote_filename\n" " --deletefile remote_filename\n" " --deletefilebyid id\n" msgstr "" "Opzioni file:\n" " --getfilelist percorso_remoto\n" " --getfiledetailsbyid [id]\n" " --getfileid file_remoto\n" " --getfile file_remoto [file_locale]\n" " --getfilebyid id [file_locale]\n" " --getallfiles percorso_remoto\n" " --putfile file_locale file_remoto\n" " --deletefile file_remoto\n" " --deletefilebyid id\n" #: ../gnokii/gnokii-file.c:98 ../gnokii/gnokii-file.c:192 #: ../gnokii/gnokii-file.c:377 #, c-format msgid "Failed to get info for %s: %s\n" msgstr "Impossibile ottenere informazioni per %s: %s\n" #: ../gnokii/gnokii-file.c:100 #, c-format msgid "Filelist for path %s:\n" msgstr "Lista dei file per il percorso %s:\n" #: ../gnokii/gnokii-file.c:102 #, c-format msgid " %s\n" msgstr " %s\n" #: ../gnokii/gnokii-file.c:135 ../gnokii/gnokii-file.c:170 #, c-format msgid "Failed to get filename: %s\n" msgstr "Impossibile ottenere il nome del file: %s\n" #: ../gnokii/gnokii-file.c:142 #, c-format msgid "| %s (%d)\n" msgstr "| %s (%d)\n" #: ../gnokii/gnokii-file.c:167 #, c-format msgid " - %s (%d)\n" msgstr " - %s (%d)\n" #: ../gnokii/gnokii-file.c:194 #, c-format msgid "Fileid for file %s is %02x %02x %02x %02x %02x %02x\n" msgstr "Il fileid per il file %s è %02x %02x %02x %02x %02x %02x\n" #: ../gnokii/gnokii-file.c:212 ../gnokii/gnokii-file.c:232 #, c-format msgid "Failed to delete %s: %s\n" msgstr "Impossibile eliminare %s: %s\n" #: ../gnokii/gnokii-file.c:214 ../gnokii/gnokii-file.c:234 #, c-format msgid "Deleted: %s\n" msgstr "Eliminato: %s\n" #: ../gnokii/gnokii-file.c:241 #, c-format msgid " usage: --getfile remote_filename [localfilename]\n" msgstr " Uso: --getfile file_remoto [file_locale]\n" #: ../gnokii/gnokii-file.c:266 ../gnokii/gnokii-file.c:391 #, c-format msgid "Failed to get file %s: %s\n" msgstr "Impossibile ricevere il file %s: %s\n" #: ../gnokii/gnokii-file.c:275 #, c-format msgid "Got file %s. Save to [%s]: " msgstr "Ricevuto il file %s. Salvare in [%s]: " #: ../gnokii/gnokii-file.c:290 ../gnokii/gnokii-file.c:345 #: ../gnokii/gnokii-file.c:396 ../gnokii/gnokii-logo.c:198 #: ../gnokii/gnokii-utils.c:93 ../gnokii/gnokii-utils.c:118 #: ../xgnokii/xgnokii_contacts.c:2620 ../xgnokii/xgnokii_dtmf.c:135 #: ../xgnokii/xgnokii_speed.c:417 #, c-format msgid "Can't open file %s for writing!\n" msgstr "Impossibile aprire il file «%s» in scrittura\n" #: ../gnokii/gnokii-file.c:294 ../gnokii/gnokii-file.c:349 #: ../gnokii/gnokii-file.c:400 #, c-format msgid "Failed to write to file %s.\n" msgstr "Impossibile scrivere nel file «%s».\n" #: ../gnokii/gnokii-file.c:305 #, c-format msgid " usage: --getfilebyid id [localfilename]\n" msgstr " Uso: --getfilebyid id [file_locale]\n" #: ../gnokii/gnokii-file.c:332 #, c-format msgid "Failed to get file: %s\n" msgstr "Impossibile ricevere il file: %s\n" #: ../gnokii/gnokii-file.c:393 #, c-format msgid "Got file %s.\n" msgstr "Ricevuto il file %s.\n" #: ../gnokii/gnokii-file.c:415 #, c-format msgid " usage: --putfile local_filename remote_filename\n" msgstr " Uso: --putfile file_locale file_remoto\n" #: ../gnokii/gnokii-file.c:444 #, c-format msgid "File %s corrupted!\n" msgstr "" #: ../gnokii/gnokii-file.c:449 #, c-format msgid "Failed to put file to %s: %s\n" msgstr "Impossibile mettere il file in %s: %s\n" #: ../gnokii/gnokii-logo.c:56 #, c-format msgid "" "Logo options:\n" " --sendlogo {caller|op|picture} destination logofile\n" " [network_code]\n" " --setlogo op [logofile [network_code]]\n" " --setlogo startup [logofile]\n" " --setlogo caller [logofile [caller_group_number [group_name]]]\n" " --setlogo {dealer|text} [text]\n" " --getlogo op [logofile [network_code]]\n" " --getlogo startup [logofile [network_code]]\n" " --getlogo caller [caller_group_number [logofile\n" " [network_code]]]\n" " --getlogo {dealer|text}\n" " --viewlogo logofile\n" msgstr "" "Opzioni loghi:\n" " --sendlogo {caller|op|picture} destinatario file_logo\n" " [codice_rete]\n" " --setlogo op [file_logo [codice_rete]]\n" " --setlogo startup [file_logo]\n" " --setlogo caller [file_logo [numero_gruppo_chiamanti " "[nome_gruppo]]]\n" " --setlogo {dealer|text} [testo]\n" " --getlogo op [file_logo [codice_rete]]\n" " --getlogo startup [file_logo [codice_rete]]\n" " --getlogo caller [numero_gruppo_chiamanti [file_logo\n" " [codice_rete]]]\n" " --getlogo {dealer|text}\n" " --viewlogo file_logo\n" #: ../gnokii/gnokii-logo.c:97 #, c-format msgid "Sending operator logo.\n" msgstr "Invio del logo operatore.\n" #: ../gnokii/gnokii-logo.c:98 #, c-format msgid "Sending caller line identification logo.\n" msgstr "Invio del logo del chiamante.\n" #: ../gnokii/gnokii-logo.c:99 #, c-format msgid "Sending Multipart Message: Picture Message.\n" msgstr "Invio di SMS multipli: messaggio con disegno.\n" #: ../gnokii/gnokii-logo.c:100 #, c-format msgid "Sending EMS-compliant Picture Message.\n" msgstr "Invio di un messaggio con disegno di tipo EMS.\n" #: ../gnokii/gnokii-logo.c:101 #, c-format msgid "Sending EMS-compliant Animation.\n" msgstr "Invio di un'animazione di tipo EMS.\n" #: ../gnokii/gnokii-logo.c:102 #, c-format msgid "You should specify what kind of logo to send!\n" msgstr "Specificare quale tipo di logo inviare.\n" #: ../gnokii/gnokii-logo.c:118 #, c-format msgid "Cannot send logo: specified and loaded bitmap type differ!\n" msgstr "" "Impossibile inviare il logo: la bitmap caricata non corrisponde al tipo " "specificato.\n" #: ../gnokii/gnokii-logo.c:156 ../gnokii/gnokii-ringtone.c:148 #: ../gnokii/gnokii-sms.c:352 #, c-format msgid "Message sent in %d parts with reference numbers:" msgstr "Messaggio inviato in %d parti con numeri di riferimento:" #: ../gnokii/gnokii-logo.c:161 ../gnokii/gnokii-ringtone.c:153 #: ../gnokii/gnokii-sms.c:357 #, c-format msgid "Send succeeded with reference %d!\n" msgstr "Invio riuscito con referenza numero %d.\n" #: ../gnokii/gnokii-logo.c:163 ../gnokii/gnokii-ringtone.c:155 #: ../gnokii/gnokii-sms.c:359 #, c-format msgid "SMS Send failed (%s)\n" msgstr "Invio SMS fallito (%s)\n" #: ../gnokii/gnokii-logo.c:180 #, c-format msgid "Saving logo. File \"%s\" exists. (O)verwrite, create (n)ew or (s)kip ? " msgstr "" "Salvataggio del logo. Il file «%s» esiste. S(o)vrascrivere, creare (n)uovo o " "(s)altare? " #: ../gnokii/gnokii-logo.c:182 msgid "O" msgstr "O" #: ../gnokii/gnokii-logo.c:182 msgid "o" msgstr "o" #: ../gnokii/gnokii-logo.c:183 msgid "N" msgstr "N" #: ../gnokii/gnokii-logo.c:183 msgid "n" msgstr "n" #: ../gnokii/gnokii-logo.c:184 msgid "S" msgstr "S" #: ../gnokii/gnokii-logo.c:184 msgid "s" msgstr "s" #: ../gnokii/gnokii-logo.c:188 #, c-format msgid "Enter name of new file: " msgstr "Nome del file: " #: ../gnokii/gnokii-logo.c:233 #, c-format msgid "Dealer welcome note " msgstr "Messaggio iniziale in accensione (dealer) " #: ../gnokii/gnokii-logo.c:235 ../gnokii/gnokii-logo.c:242 #, c-format msgid "currently set to \"%s\"\n" msgstr "attualmente impostato a «%s»\n" #: ../gnokii/gnokii-logo.c:237 ../gnokii/gnokii-logo.c:244 #, c-format msgid "currently empty\n" msgstr "attualmente vuoto\n" #: ../gnokii/gnokii-logo.c:240 #, c-format msgid "Welcome note " msgstr "Messaggio iniziale in accensione (utente) " #: ../gnokii/gnokii-logo.c:250 #, c-format msgid "Operator logo for %s (%s) network got successfully\n" msgstr "Logo operatore per la rete %s (%s) letto con successo\n" #: ../gnokii/gnokii-logo.c:255 ../gnokii/gnokii-logo.c:267 #: ../gnokii/gnokii-logo.c:282 ../gnokii/gnokii-logo.c:363 #, c-format msgid "Sorry, gnokii doesn't know %s network !\n" msgstr "gnokii non conosce la rete %s.\n" #: ../gnokii/gnokii-logo.c:263 #, c-format msgid "Startup logo got successfully\n" msgstr "Logo in accensione letto con successo\n" #: ../gnokii/gnokii-logo.c:274 ../gnokii/gnokii-logo.c:291 #, c-format msgid "Your phone doesn't have logo uploaded !\n" msgstr "Il telefono non ha alcun logo caricato.\n" #: ../gnokii/gnokii-logo.c:276 #, c-format msgid "Caller logo got successfully\n" msgstr "Logo del chiamante letto con successo\n" #: ../gnokii/gnokii-logo.c:277 #, c-format msgid "Caller group name: %s, ringing tone: %s (%d)\n" msgstr "Nome gruppo chiamanti: %s, suoneria: %s (%d)\n" #: ../gnokii/gnokii-logo.c:288 #, c-format msgid "Unknown bitmap type.\n" msgstr "Tipo di bitmap sconosciuto.\n" #: ../gnokii/gnokii-logo.c:302 #, c-format msgid "What kind of logo do you want to get ?\n" msgstr "Quale tipo di logo si desidera leggere?\n" #: ../gnokii/gnokii-logo.c:320 #, c-format msgid "Error while reading file \"%s\": %s\n" msgstr "Errore di lettura del file «%s»: %s\n" #: ../gnokii/gnokii-logo.c:398 #, c-format msgid "What kind of logo do you want to set ?\n" msgstr "Quale tipo di logo si desidera scrivere?\n" # nel telefono si chiama "messaggio iniziale in accensione" #: ../gnokii/gnokii-logo.c:434 #, c-format msgid "Error setting dealer welcome note - " msgstr "" "Errore nella scrittura del messaggio iniziale in accensione (dealer) - " #: ../gnokii/gnokii-logo.c:436 #, c-format msgid "Error setting welcome note - " msgstr "" "Errore nella scrittura del messaggio iniziale in accensione (utente) - " #: ../gnokii/gnokii-logo.c:440 #, c-format msgid "SIM card and PIN is required\n" msgstr "servono la SIM e il PIN\n" #: ../gnokii/gnokii-logo.c:447 #, c-format msgid "too long, truncated to \"%s\" (length %zi)\n" msgstr "troppo lungo, ridotto a «%s» (lunghezza %zi)\n" #: ../gnokii/gnokii-logo.c:455 #, c-format msgid "Error setting startup logo - SIM card and PIN is required\n" msgstr "" "Errore nella scrittura del logo in accensione - servono la SIM e il PIN\n" #: ../gnokii/gnokii-logo.c:456 #, c-format msgid "i: %i, %2x %2x\n" msgstr "i: %i, %2x %2x\n" #: ../gnokii/gnokii-logo.c:466 #, c-format msgid "Done.\n" msgstr "Eseguito.\n" #: ../gnokii/gnokii-logo.c:481 #, c-format msgid "Could not load bitmap: %s\n" msgstr "Impossibile caricare l'immagine bitmap: %s\n" #: ../gnokii/gnokii-mms.c:46 #, fuzzy, c-format msgid "" "MMS options:\n" " --getmms memory_type start [end] [{--mime|--pdu|--raw} file]\n" " [-d|--delete] [-o|--overwrite]\n" " --deletemms memory_type start [end]\n" msgstr "" "Opzioni MMS:\n" " --getmms tipo_memoria inizio [fine] [{--mime|--pdu|--raw} file]\n" " [-d|--delete]\n" " --deletemms tipo_memoria inizio [fine]\n" #: ../gnokii/gnokii-mms.c:56 #, c-format msgid "" " usage: --getmms memory start [end] retrieves messages from memory type " "(SM, ME,\n" " IN, OU, ...) starting from\n" " location start and ending with end;\n" " if end option is omitted, just one " "entry\n" " is read;\n" " start must be a number, end may be a " "number\n" " or 'end' string;\n" " if 'end' is used entries are being read\n" " until empty location\n" " --mime filename convert MMS in MIME format and save it " "to\n" " the given file;\n" " --pdu filename extract MMS from raw format and save it " "to\n" " the given file;\n" " --raw filename get MMS from phone and save it unchanged " "to\n" " the given file;\n" " --delete\n" " -d delete MMS after reading\n" " --overwrite\n" " -o overwrite destination file without " "asking\n" "\n" msgstr "" " Uso: --getmms memoria inizio [fine] legge messaggi dalla memoria di tipo " "(SM, ME,\n" " IN, OU, ...) iniziando dalla posizione\n" " inizio e terminando con fine;\n" " se l'opzione fine è omessa, è letto " "solo\n" " un elemento;\n" " inizio deve essere un numero, fine può\n" " essere un numero o la stringa «end»\n" " se è usata la stringa «end» la lettura\n" " prosegue fino all'ultima posizione\n" " --force-file nome_file\n" " -F nome_file salva gli SMS nel file " "sovrascrivendolo\n" " se esiste già;\n" " il file è in formato mbox\n" " --file nome_file\n" " -f nome_file come sopra, ma all'utente è chiesto se\n" " desidera sovrascrivere il file\n" " --append nome_file\n" " -a nome_file come sopra, ma aggiunge al file\n" " esistente\n" " --delete\n" " -d elimina i messaggi dopo la lettura\n" "\n" #: ../gnokii/gnokii-mms.c:82 ../gnokii/gnokii-sms.c:749 #, c-format msgid "%d. %s (%s)\n" msgstr "%d. %s (%s)\n" #: ../gnokii/gnokii-mms.c:82 msgid "MMS" msgstr "MMS" #: ../gnokii/gnokii-mms.c:113 ../gnokii/gnokii-mms.c:201 #: ../gnokii/gnokii-mms.c:243 ../gnokii/gnokii-sms.c:486 #: ../gnokii/gnokii-sms.c:658 ../gnokii/gnokii-sms.c:884 #: ../gnokii/gnokii-sms.c:936 #, c-format msgid "Unknown memory type %s (use ME, SM, IN, OU, ...)!\n" msgstr "Tipo di memoria %s sconosciuto (usare ME, SM, IN, OU, ...)\n" #: ../gnokii/gnokii-mms.c:114 ../gnokii/gnokii-mms.c:202 #: ../gnokii/gnokii-mms.c:244 ../gnokii/gnokii-sms.c:487 #: ../gnokii/gnokii-sms.c:659 ../gnokii/gnokii-sms.c:885 #: ../gnokii/gnokii-sms.c:937 #, c-format msgid "" "Run gnokii --showsmsfolderstatus for a list of supported memory types.\n" msgstr "" "Eseguire gnokii --showsmsfolderstatus per l'elenco di tipi di memorie " "supportate.\n" #: ../gnokii/gnokii-mms.c:150 ../gnokii/gnokii-sms.c:715 #, c-format msgid "Saving into %s\n" msgstr "Salvataggio in %s\n" #: ../gnokii/gnokii-mms.c:187 ../gnokii/gnokii-sms.c:876 #, c-format msgid "(delete failed)\n" msgstr "(eliminazione fallita)\n" #: ../gnokii/gnokii-mms.c:189 ../gnokii/gnokii-sms.c:878 #, c-format msgid "(message deleted)\n" msgstr "(messaggio eliminato)\n" #: ../gnokii/gnokii-mms.c:199 #, c-format msgid "Getting MMS failed (location %d from memory %s)! (%s)\n" msgstr "Recupero MMS fallito (posizione %d della memoria %s). (%s)\n" #: ../gnokii/gnokii-mms.c:219 #, c-format msgid "" " usage: --deletemms memory start [end] deletes messages from memory type\n" " (SM, ME, IN, OU, ...) starting\n" " from location start and ending with " "end;\n" " if end option is omitted, just one " "entry\n" " is removed;\n" " if 'end' is used entries are being " "removed\n" " until empty location\n" "\n" msgstr "" " Uso: --deletemms memoria inizio [fine] elimina messaggi dalla memoria\n" " (SM, ME, IN, OU, ...) iniziando " "dalla\n" " posizione inizio e terminando con " "fine;\n" " se l'opzione fine è omessa, sarà \n" " eliminato solo un messaggio;\n" " se è usato «end» saranno eliminati\n" " i messaggi fino alla posizione vuota\n" "\n" #: ../gnokii/gnokii-mms.c:262 #, c-format msgid "Deleted MMS (location %d from memory %s)\n" msgstr "MMS eliminato (posizione %d della memoria %s)\n" #: ../gnokii/gnokii-mms.c:266 #, c-format msgid "Deleting MMS failed (location %d from memory %s)! (%s)\n" msgstr "Eliminazione MMS fallita (posizione %d della memoria %s). (%s)\n" #: ../gnokii/gnokii-monitor.c:67 #, c-format msgid "" "Monitoring options:\n" " --monitor [delay|once]\n" " --getdisplaystatus\n" " --displayoutput\n" " --netmonitor {reset|off|field|devel|next|nr}\n" msgstr "" "Opzioni di controllo:\n" " --monitor [attesa|once]\n" " --getdisplaystatus\n" " --displayoutput\n" " --netmonitor {reset|off|field|devel|next|numero}\n" #: ../gnokii/gnokii-monitor.c:79 #, c-format msgid "INCOMING CALL: ID: %d, Number: %s, Name: \"%s\"\n" msgstr "Chiamata in arrivo: ID: %d, Numero: %s, Nome: «%s»\n" #: ../gnokii/gnokii-monitor.c:82 #, c-format msgid "CALL %d TERMINATED (LOCAL)\n" msgstr "Chiamata %d terminata (da questo telefono)\n" #: ../gnokii/gnokii-monitor.c:85 #, c-format msgid "CALL %d TERMINATED (REMOTE)\n" msgstr "Chiamata %d terminata (dall'altro telefono)\n" #: ../gnokii/gnokii-monitor.c:88 #, c-format msgid "CALL %d ACCEPTED BY THE REMOTE SIDE\n" msgstr "Chiamata %d accettata dall'altro telefono\n" #: ../gnokii/gnokii-monitor.c:91 #, c-format msgid "CALL %d PLACED ON HOLD\n" msgstr "Chiamata %d messa in attesa\n" #: ../gnokii/gnokii-monitor.c:94 #, c-format msgid "CALL %d RETRIEVED FROM HOLD\n" msgstr "Chiamata %d ripresa dall'attesa\n" #: ../gnokii/gnokii-monitor.c:135 #, c-format msgid "CALL%d: IDLE\n" msgstr "Chiamata CALL%d: non attiva\n" #: ../gnokii/gnokii-monitor.c:143 msgid "RINGING" msgstr "SQUILLA" #: ../gnokii/gnokii-monitor.c:147 msgid "DIALING" msgstr "COMPOSIZIONE" #: ../gnokii/gnokii-monitor.c:151 msgid "ESTABLISHED" msgstr "CONNESSO" #: ../gnokii/gnokii-monitor.c:155 msgid "ON HOLD" msgstr "IN ATTESA" #: ../gnokii/gnokii-monitor.c:159 msgid "UNKNOWN STATE" msgstr "STATO SCONOSCIUTO" #: ../gnokii/gnokii-monitor.c:164 #, c-format msgid "CALL%d: %s %s (%s) (callid: %d, duration: %d sec)\n" msgstr "CALL%d: %s %s (%s) (callid: %d, durata: %d secondi)\n" #: ../gnokii/gnokii-monitor.c:182 #, c-format msgid "LAC: %04x (%d), CellID: %08x (%d)\n" msgstr "LAC: %04x (%d), ID cella: %08x (%d)\n" #: ../gnokii/gnokii-monitor.c:212 #, c-format msgid "Argument to --monitor delay needs to be positive number\n" msgstr "L'argomento per --monitor attesa deve essere un numero positivo\n" #: ../gnokii/gnokii-monitor.c:226 #, c-format msgid "Entering monitor mode...\n" msgstr "Inizio della modalità monitor...\n" #: ../gnokii/gnokii-monitor.c:254 #, c-format msgid "Network: %s, %s (%s)\n" msgstr "Rete: %s, %s (%s)\n" #: ../gnokii/gnokii-monitor.c:262 #, c-format msgid "RFLevel: %d\n" msgstr "Livello RF: %d\n" #: ../gnokii/gnokii-monitor.c:265 #, c-format msgid "Battery: %d\n" msgstr "Batteria: %d\n" #: ../gnokii/gnokii-monitor.c:268 #, c-format msgid "Power Source: %s\n" msgstr "Alimentazione: %s\n" # posizioni usate, posizioni libere #: ../gnokii/gnokii-monitor.c:272 #, c-format msgid "SIM: Used %d, Free %d\n" msgstr "Scheda SIM: usate %d, libere %d\n" #: ../gnokii/gnokii-monitor.c:276 #, c-format msgid "Phone: Used %d, Free %d\n" msgstr "Telefono: usate %d, libere %d\n" #: ../gnokii/gnokii-monitor.c:280 #, c-format msgid "DC: Used %d, Free %d\n" msgstr "DC: usate %d, libere %d\n" #: ../gnokii/gnokii-monitor.c:284 #, c-format msgid "EN: Used %d, Free %d\n" msgstr "EN: usate %d, libere %d\n" #: ../gnokii/gnokii-monitor.c:288 #, c-format msgid "FD: Used %d, Free %d\n" msgstr "FD: usate %d, libere %d\n" #: ../gnokii/gnokii-monitor.c:292 #, c-format msgid "LD: Used %d, Free %d\n" msgstr "LD: usate %d, libere %d\n" #: ../gnokii/gnokii-monitor.c:296 #, c-format msgid "MC: Used %d, Free %d\n" msgstr "MC: usate %d, libere %d\n" #: ../gnokii/gnokii-monitor.c:300 #, c-format msgid "ON: Used %d, Free %d\n" msgstr "ON: usate %d, libere %d\n" #: ../gnokii/gnokii-monitor.c:304 #, c-format msgid "RC: Used %d, Free %d\n" msgstr "RC: usate %d, libere %d\n" #: ../gnokii/gnokii-monitor.c:307 #, c-format msgid "SMS Messages: Unread %d, Number %d\n" msgstr "Messaggi SMS: non letti %d, in totale %d\n" #: ../gnokii/gnokii-monitor.c:313 #, c-format msgid "Cell broadcast received on channel %d: %s\n" msgstr "Informazioni microcella ricevute sul canale %d: %s\n" #: ../gnokii/gnokii-monitor.c:323 #, c-format msgid "Leaving monitor mode...\n" msgstr "Fine della modalità monitor...\n" #: ../gnokii/gnokii-monitor.c:330 #, c-format msgid "Call in progress: %-3s\n" msgstr "Chiamata in corso: %-3s\n" #: ../gnokii/gnokii-monitor.c:331 ../gnokii/gnokii-monitor.c:333 #: ../gnokii/gnokii-monitor.c:335 ../gnokii/gnokii-monitor.c:337 #: ../gnokii/gnokii-monitor.c:339 ../gnokii/gnokii-monitor.c:341 #: ../gnokii/gnokii-monitor.c:343 ../gnokii/gnokii-monitor.c:345 #: ../gnokii/gnokii-settings.c:200 msgid "on" msgstr "sì" #: ../gnokii/gnokii-monitor.c:331 ../gnokii/gnokii-monitor.c:333 #: ../gnokii/gnokii-monitor.c:335 ../gnokii/gnokii-monitor.c:337 #: ../gnokii/gnokii-monitor.c:339 ../gnokii/gnokii-monitor.c:341 #: ../gnokii/gnokii-monitor.c:343 ../gnokii/gnokii-monitor.c:345 #: ../gnokii/gnokii-settings.c:200 msgid "off" msgstr "no" #: ../gnokii/gnokii-monitor.c:332 #, c-format msgid "Unknown: %-3s\n" msgstr "Sconosciuto: %-3s\n" #: ../gnokii/gnokii-monitor.c:334 #, c-format msgid "Unread SMS: %-3s\n" msgstr "SMS non letti: %-3s\n" #: ../gnokii/gnokii-monitor.c:336 #, c-format msgid "Voice call: %-3s\n" msgstr "Chiamata vocale: %-3s\n" #: ../gnokii/gnokii-monitor.c:338 #, c-format msgid "Fax call active: %-3s\n" msgstr "Chiamata fax attiva: %-3s\n" #: ../gnokii/gnokii-monitor.c:340 #, c-format msgid "Data call active: %-3s\n" msgstr "Chiamata dati in corso: %-3s\n" #: ../gnokii/gnokii-monitor.c:342 #, c-format msgid "Keyboard lock: %-3s\n" msgstr "Tastiera bloccata: %-3s\n" #: ../gnokii/gnokii-monitor.c:344 #, c-format msgid "SMS storage full: %-3s\n" msgstr "Memoria SMS piena: %-3s\n" #: ../gnokii/gnokii-monitor.c:430 #, c-format msgid "Entered display monitoring mode...\n" msgstr "Inizio della modalità monitor schermo...\n" #: ../gnokii/gnokii-monitor.c:447 ../gnokii/gnokii-sms.c:1322 #, c-format msgid "Shutting down\n" msgstr "Chiusura\n" #: ../gnokii/gnokii-monitor.c:449 #, c-format msgid "Leaving display monitor mode...\n" msgstr "Fine della modalità monitor schermo...\n" #: ../gnokii/gnokii-monitor.c:490 #, c-format msgid " usage: --netmonitor {reset|off|field|devel|next|nr}\n" msgstr " Uso: --netmonitor {reset|off|field|devel|next|numero}\n" #: ../gnokii/gnokii-other.c:59 #, c-format msgid "" "Misc options:\n" " --keysequence\n" " --enterchar\n" " --listnetworks\n" " --getnetworkinfo\n" msgstr "" "Altre opzioni:\n" " --keysequence\n" " --enterchar\n" " --listnetworks\n" " --getnetworkinfo\n" #: ../gnokii/gnokii-other.c:96 #, c-format msgid "Failed to press key: %s\n" msgstr "Impossibile premere il tasto: %s\n" #: ../gnokii/gnokii-other.c:155 #, c-format msgid "Error entering char: %s\n" msgstr "Errore nell'inserire il carattere: %s\n" #: ../gnokii/gnokii-other.c:169 #, c-format msgid "Network Name\n" msgstr "Rete Nome\n" #: ../gnokii/gnokii-other.c:170 #, c-format msgid "-----------------------------------------\n" msgstr "-----------------------------------------\n" #: ../gnokii/gnokii-other.c:172 #, c-format msgid "%-7s %s (%s)\n" msgstr "%-7s %s (%s)\n" #: ../gnokii/gnokii-other.c:202 #, c-format msgid "Network : %s (%s)\n" msgstr "Rete : %s (%s)\n" #: ../gnokii/gnokii-other.c:205 #, c-format msgid "Network code : %s\n" msgstr "Codice rete : %s\n" #: ../gnokii/gnokii-other.c:206 #, c-format msgid "LAC : %04x (%d)\n" msgstr "LAC : %04x (%d)\n" #: ../gnokii/gnokii-other.c:207 #, c-format msgid "Cell id : %08x (%d)\n" msgstr "Ident. cella : %08x (%d)\n" #: ../gnokii/gnokii-phonebook.c:55 #, c-format msgid "" "Phonebook options:\n" " --getphonebook memory_type start_number [end_number|end]\n" " [[-r|--raw]|[-v|--vcard]|[-l|--ldif]]\n" " --writephonebook [[-o|--overwrite]|[-f|--find-free]]\n" " [-m|--memory-type|--memory memory_type]\n" " [-n|--memory-location|--location number]\n" " [[-v|--vcard]|[-l|--ldif]]\n" " --deletephonebook memory_type start_number [end_number|end]\n" msgstr "" "Opzioni rubrica:\n" " --getphonebook tipo_memoria numero_iniziale [numero_finale|end]\n" " [[-r|--raw]|[-v|--vcard]|[-l|--ldif]]\n" " --writephonebook [[-o|--overwrite]|[-f|--find-free]]\n" " [-m|--memory-type|--memory tipo_memoria]\n" " [-n|--memory-location|--location numero]\n" " [[-v|--vcard]|[-l|--ldif]]\n" " --deletephonebook tipo_memoria numero_iniziale [numero_finale|" "end]\n" #: ../gnokii/gnokii-phonebook.c:68 #, c-format msgid "" " usage: --getphonebook memory start [end] reads phonebook entries from " "memory type\n" " (SM, ME, IN, OU, ...) messages " "starting\n" " from location start and ending with " "end;\n" " if end option is omitted, just one " "entry\n" " is read;\n" " if 'end' is used all entries are " "read\n" " -r\n" " --raw output in raw form (comma " "separated)\n" " -v\n" " --vcard output in vcard format\n" " -l\n" " --ldif output in ldif format\n" "\n" msgstr "" " Uso: --getphonebook memoria inizio [fine] legge le voci della rubrica " "dalla memoria\n" " specificata (SM, ME, IN, OU, ...)\n" " dalla posizione inizio alla " "posizione fine;\n" " se l'opzione fine è omessa, è " "letta\n" " solo una voce;\n" " se si usa «end», sono lette tutte " "le voci\n" " -r\n" " --raw stampa in formato raw (separato da " "virgole)\n" " -v\n" " --vcard stampa in formato vcard\n" " -l\n" " --ldif stampa in formato ldif\n" "\n" #: ../gnokii/gnokii-phonebook.c:187 #, c-format msgid "%d. %s: %s\n" msgstr "%d. %s: %s\n" #: ../gnokii/gnokii-phonebook.c:199 msgid "Caller group" msgstr "Gruppo chiamanti" #: ../gnokii/gnokii-phonebook.c:208 #, c-format msgid "Address information:\n" msgstr "Informazioni sull'indirizzo\n" #: ../gnokii/gnokii-phonebook.c:210 ../gnokii/gnokii-phonebook.c:212 #: ../gnokii/gnokii-phonebook.c:214 ../gnokii/gnokii-phonebook.c:216 #: ../gnokii/gnokii-phonebook.c:218 ../gnokii/gnokii-phonebook.c:220 #: ../gnokii/gnokii-phonebook.c:222 #, c-format msgid " %s: %s\n" msgstr " %s: %s\n" #: ../gnokii/gnokii-phonebook.c:210 msgid "Post office address" msgstr "Indirizzo postale" #: ../gnokii/gnokii-phonebook.c:233 #, c-format msgid "%04u.%02u.%02u %02u:%02u:%02u" msgstr "%3$u/%2$02u/%1$04u %4$u.%5$02u.%6$02u" #: ../gnokii/gnokii-phonebook.c:247 #, c-format msgid "Date: %04u.%02u.%02u %02u:%02u:%02u\n" msgstr "Data: %3$u/%2$02u/%1$04u %4$u.%5$02u.%6$02u\n" #: ../gnokii/gnokii-phonebook.c:252 #, c-format msgid "Empty memory location. Skipping.\n" msgstr "Posizione di memoria vuota. Ignorata.\n" #: ../gnokii/gnokii-phonebook.c:255 #, c-format msgid "Error reading from the location %d in memory %s\n" msgstr "Errore leggendo dalla posizione %d della memoria %s\n" #: ../gnokii/gnokii-phonebook.c:272 #, c-format msgid "" " usage: --writephonebook [[-o|--overwrite]|[-f|--find-free]]\n" " [-m|--memory-type|--memory memory_type]\n" " [-n|--memory-location|--location number]\n" " [[-v|--vcard]|[-l|--ldif]]\n" "\n" msgstr "" " Uso: --writephonebook [[-o|--overwrite]|[-f|--find-free]]\n" " [-m|--memory-type|--memory tipo_memoria]\n" " [-n|--memory-location|--location numero]\n" " [[-v|--vcard]|[-l|--ldif]]\n" #: ../gnokii/gnokii-phonebook.c:416 #, c-format msgid "Location busy. " msgstr "Posizione occupata. " #: ../gnokii/gnokii-phonebook.c:419 ../gnokii/gnokii-sms.c:540 #: ../gnokii/gnokii-sms.c:831 ../gnokii/gnokii-utils.c:61 #, c-format msgid "Overwrite? (yes/no) " msgstr "Sovrascrivere? (sì/no) " #: ../gnokii/gnokii-phonebook.c:423 ../gnokii/gnokii-sms.c:543 #: ../gnokii/gnokii-utils.c:65 ../gnokii/gnokii-wap.c:223 msgid "no" msgstr "no" #: ../gnokii/gnokii-phonebook.c:426 #, c-format msgid "" "\n" "Incorrect answer [%s]. Assuming 'no'.\n" msgstr "" "\n" "Risposta errata [%s]. Si presume «no».\n" #: ../gnokii/gnokii-phonebook.c:446 #, c-format msgid "Write Succeeded: memory type: %s, loc: %d, name: %s, number: %s\n" msgstr "" "Scrittura riuscita: tipo memoria: %s, posizione: %d, nome: %s, numero: %s\n" #: ../gnokii/gnokii-phonebook.c:453 ../gnokii/gnokii-phonebook.c:458 #, c-format msgid "Write failed (%s): memory type: %s, loc: %d, name: %s, number: %s\n" msgstr "" "Scrittura fallita (%s): tipo memoria: %s, posizione: %d, nome: %s, numero: " "%s\n" #: ../gnokii/gnokii-phonebook.c:466 #, c-format msgid "" " usage: --deletephonebook memory_type start_number [end_number|end]\n" "\n" msgstr "" " Uso: --deletephonebook tipo_memoria numero_iniziale [numero_finale|end]\n" "\n" #: ../gnokii/gnokii-phonebook.c:505 #, c-format msgid "Phonebook entry removed: memory type: %s, loc: %d\n" msgstr "Eliminazione dalla rubrica riuscita: tipo memoria: %s, posizione: %d\n" #: ../gnokii/gnokii-phonebook.c:512 #, c-format msgid "Phonebook entry removal FAILED (%s): memory type: %s, loc: %d\n" msgstr "" "Eliminazione dalla rubrica FALLITA (%s): tipo memoria: %s, posizione: %d\n" #: ../gnokii/gnokii-profile.c:55 #, c-format msgid "" "Profile options:\n" " --getprofile [start_number [end_number]] [-r|--raw]\n" " --setprofile\n" " --getactiveprofile\n" " --setactiveprofile profile_number\n" msgstr "" "Opzioni profili:\n" " --getprofile [numero_iniziale [numero_finale]] [-r|--raw]\n" " --setprofile\n" " --getactiveprofile\n" " --setactiveprofile numero_profilo\n" #: ../gnokii/gnokii-profile.c:65 #, c-format msgid " usage: --getprofile [start_number [end_number]] [-r|--raw]\n" msgstr " Uso: --getprofile [numero_iniziale [numero_finale]] [-r|--raw]\n" #: ../gnokii/gnokii-profile.c:133 #, c-format msgid "Starting profile number is greater than stop\n" msgstr "Il numero iniziale del profilo è maggiore di quello finale\n" #: ../gnokii/gnokii-profile.c:138 #, c-format msgid "Profile number must be value from 0 to %d!\n" msgstr "Il numero del profilo deve essere compreso fra 0 e %d\n" #: ../gnokii/gnokii-profile.c:143 #, c-format msgid "This phone supports only %d profiles!\n" msgstr "Questo telefono consente solo %d profili\n" #: ../gnokii/gnokii-profile.c:161 ../gnokii/gnokii-profile.c:254 #, c-format msgid "Cannot get profile %d\n" msgstr "Impossibile leggere il profilo %d\n" #. Translators: %d is the profile number, %s is the profile name. Example: 1. "Outdoors" #: ../gnokii/gnokii-profile.c:175 #, c-format msgid "%d. \"%s\"\n" msgstr "%d. \"%s\"\n" #: ../gnokii/gnokii-profile.c:176 #, c-format msgid " (name defined)\n" msgstr " (nome definito)\n" #: ../gnokii/gnokii-profile.c:177 #, c-format msgid "Incoming call alert: %s\n" msgstr "Chiamata in arrivo: %s\n" #: ../gnokii/gnokii-profile.c:178 #, c-format msgid "Ringing tone: %s (%d)\n" msgstr "Suoneria: %s (%d)\n" #: ../gnokii/gnokii-profile.c:179 #, c-format msgid "Ringing volume: %s\n" msgstr "Volume suoneria: %s\n" #: ../gnokii/gnokii-profile.c:180 #, c-format msgid "Message alert tone: %s\n" msgstr "Tono di avviso SMS entrante: %s\n" #: ../gnokii/gnokii-profile.c:181 #, c-format msgid "Keypad tones: %s\n" msgstr "Toni di tastiera: %s\n" #: ../gnokii/gnokii-profile.c:182 #, c-format msgid "Warning and game tones: %s\n" msgstr "Toni di avviso e di gioco: %s\n" #. FIXME: Light settings is only used for Car #: ../gnokii/gnokii-profile.c:185 #, c-format msgid "Lights: %s\n" msgstr "Luci: %s\n" #: ../gnokii/gnokii-profile.c:186 #, c-format msgid "Vibration: %s\n" msgstr "Vibrazione: %s\n" #. FIXME: it will be nice to add here reading caller group name. #: ../gnokii/gnokii-profile.c:189 #, c-format msgid "Caller groups: 0x%02x\n" msgstr "Gruppi chiamanti: 0x%02x\n" #. FIXME: Automatic answer is only used for Car and Headset. #: ../gnokii/gnokii-profile.c:192 #, c-format msgid "Automatic answer: %s\n" msgstr "Risposta automatica: %s\n" #: ../gnokii/gnokii-profile.c:223 ../gnokii/gnokii-sms.c:1120 #: ../gnokii/gnokii-wap.c:285 #, c-format msgid "Input line format isn't valid\n" msgstr "Il formato della riga non è valido\n" #: ../gnokii/gnokii-profile.c:229 #, c-format msgid "Cannot set profile: %s\n" msgstr "Impossibile impostare il profilo: %s\n" #: ../gnokii/gnokii-profile.c:248 #, c-format msgid "Cannot get active profile: %s\n" msgstr "Impossibile leggere il profilo attivo: %s\n" #: ../gnokii/gnokii-profile.c:256 #, c-format msgid "Active profile: %d (%s)\n" msgstr "Profilo attivo: %d (%s)\n" #: ../gnokii/gnokii-profile.c:263 #, c-format msgid " usage: --setactiveprofile profile_number\n" msgstr " Uso: --setactiveprofile numero_profilo\n" #: ../gnokii/gnokii-profile.c:281 #, c-format msgid "Cannot set active profile to %d: %s\n" msgstr "Impossibile impostare come profilo attivo il numero %d: %s\n" #: ../gnokii/gnokii-ringtone.c:96 #, c-format msgid "" "Ringtone options:\n" " --sendringtone rtttlfile destination\n" " --getringtone rtttlfile [location] [-r|--raw]\n" " --setringtone rtttlfile [location] [-r|--raw] [--name name]\n" " --playringtone rtttlfile [--volume vol]\n" " --ringtoneconvert source destination\n" " --getringtonelist\n" " --deleteringtone start [end]\n" msgstr "" "Opzioni suonerie:\n" " --sendringtone file_rtttl destinatario\n" " --getringtone file_rtttl [posizione] [-r|--raw]\n" " --setringtone file_rtttl [posizione] [-r|--raw] [--name nome]\n" " --playringtone file_rtttl [--volume volume]\n" " --ringtoneconvert file_sorgente file_destinazione\n" " --getringtonelist\n" " --deleteringtone inizio [fine]\n" #: ../gnokii/gnokii-ringtone.c:117 ../gnokii/gnokii-ringtone.c:392 #: ../gnokii/gnokii-ringtone.c:447 #, c-format msgid "Failed to load ringtone: %s\n" msgstr "Impossibile leggere la suoneria: %s\n" #: ../gnokii/gnokii-ringtone.c:162 #, c-format msgid " usage: --getringtone rtttlfile [location] [-r|--raw]\n" msgstr " Uso: --getringtone file_rtttl [posizione] [-r|--raw]\n" #: ../gnokii/gnokii-ringtone.c:216 #, c-format msgid "Getting ringtone %d failed: %s\n" msgstr "Lettura della suoneria %d fallita: %s\n" #: ../gnokii/gnokii-ringtone.c:219 #, c-format msgid "Getting ringtone %d (\"%s\") succeeded!\n" msgstr "Lettura della suoneria %d riuscita («%s»)\n" #: ../gnokii/gnokii-ringtone.c:222 ../gnokii/gnokii-ringtone.c:303 #: ../gnokii/gnokii-ringtone.c:387 #, c-format msgid "Internal gnokii error: null filename\n" msgstr "Errore interno di gnokii: il nome del file è nullo\n" #: ../gnokii/gnokii-ringtone.c:231 #, c-format msgid "Failed to save ringtone.\n" msgstr "Impossibile scrivere la suoneria.\n" #: ../gnokii/gnokii-ringtone.c:236 #, c-format msgid "Failed to write ringtone.\n" msgstr "Impossibile scrivere la suoneria.\n" #: ../gnokii/gnokii-ringtone.c:242 ../gnokii/gnokii-ringtone.c:451 #, c-format msgid "Failed to save ringtone: %s\n" msgstr "Impossibile scrivere la suoneria: %s\n" #: ../gnokii/gnokii-ringtone.c:252 #, c-format msgid " usage: --setringtone rtttlfile [location] [-r|--raw] [--name name]\n" msgstr " Uso: --setringtone file_rtttl [posizione] [-r|--raw] [--name nome]\n" #: ../gnokii/gnokii-ringtone.c:311 ../gnokii/gnokii-ringtone.c:324 #, c-format msgid "Failed to load ringtone.\n" msgstr "Impossibile leggere la suoneria.\n" #: ../gnokii/gnokii-ringtone.c:333 #, c-format msgid "Send succeeded!\n" msgstr "Invio riuscito\n" #: ../gnokii/gnokii-ringtone.c:335 #, c-format msgid "Send failed: %s\n" msgstr "Invio fallito: %s\n" #: ../gnokii/gnokii-ringtone.c:342 #, c-format msgid " usage: --playringtone rtttlfile [-v|--volume vol]\n" msgstr " Uso: --playringtone file_rtttl [-v|--volume volume]\n" #: ../gnokii/gnokii-ringtone.c:424 #, c-format msgid "Play succeeded!\n" msgstr "Suonata.\n" #: ../gnokii/gnokii-ringtone.c:426 #, c-format msgid "Play failed: %s\n" msgstr "Impossibile suonare: %s\n" #: ../gnokii/gnokii-ringtone.c:433 #, c-format msgid " usage: --ringtoneconvert source destination\n" msgstr " Uso: --ringtoneconvert file_sorgente file_destinazione\n" #: ../gnokii/gnokii-ringtone.c:455 #, c-format msgid "%d note(s) converted.\n" msgstr "Note convertite: %d.\n" #: ../gnokii/gnokii-ringtone.c:467 #, c-format msgid "Failed to get the list of ringtones\n" msgstr "Impossibile leggere la lista delle suonerie\n" #: ../gnokii/gnokii-ringtone.c:471 #, c-format msgid "First user defined ringtone location: %3d\n" msgstr "Posizione della prima suoneria personalizzabile dall'utente: %3d\n" #: ../gnokii/gnokii-ringtone.c:472 #, c-format msgid "" "Number of user defined ringtones: %d\n" "\n" msgstr "" "Numero di suonerie personalizzabili dall'utente: %d\n" "\n" #: ../gnokii/gnokii-ringtone.c:473 #, c-format msgid "loc rwu name\n" msgstr "pos. rwu nome\n" #: ../gnokii/gnokii-ringtone.c:474 #, c-format msgid "===============================\n" msgstr "===============================\n" #: ../gnokii/gnokii-ringtone.c:476 #, c-format msgid "%3d %d%d%d %-20s\n" msgstr "%3d %d%d%d %-20s\n" #: ../gnokii/gnokii-ringtone.c:488 #, c-format msgid " usage: --deleteringtone start [end]\n" msgstr " Uso: --deleteringtone inizio [fine]\n" #: ../gnokii/gnokii-ringtone.c:512 #, c-format msgid "Ringtone %d deleted\n" msgstr "Suoneria %d eliminata\n" #: ../gnokii/gnokii-ringtone.c:514 #, c-format msgid "Failed to delete ringtone %d: %s\n" msgstr "Impossibile eliminare la suoneria %d: %s\n" #: ../gnokii/gnokii-security.c:59 #, c-format msgid "" "Security options:\n" " --identify\n" " --getlocksinfo\n" msgstr "" "Opzioni sicurezza:\n" " --identify\n" " --getlocksinfo\n" #: ../gnokii/gnokii-security.c:65 #, c-format msgid "" " --entersecuritycode PIN|PIN2|PUK|PUK2|SEC [COMMAND]\n" " --getsecuritycodestatus\n" " --getsecuritycode\n" " --changesecuritycode PIN|PIN2|PUK|PUK2\n" msgstr "" " --entersecuritycode PIN|PIN2|PUK|PUK2|SEC (COMANDO)\n" " --getsecuritycodestatus\n" " --getsecuritycode\n" " --changesecuritycode PIN|PIN2|PUK|PUK2\n" #: ../gnokii/gnokii-security.c:75 #, c-format msgid "IMEI : %s\n" msgstr "IMEI : %s\n" #: ../gnokii/gnokii-security.c:76 #, c-format msgid "Manufacturer : %s\n" msgstr "Marca : %s\n" #: ../gnokii/gnokii-security.c:77 #, c-format msgid "Model : %s\n" msgstr "Modello : %s\n" #: ../gnokii/gnokii-security.c:78 #, c-format msgid "Product name : %s\n" msgstr "Nome prodotto: %s\n" #: ../gnokii/gnokii-security.c:79 #, c-format msgid "Revision : %s\n" msgstr "Revisione : %s\n" #: ../gnokii/gnokii-security.c:100 #, c-format msgid "%7s : %10s, %7s, %6s, counter %d\n" msgstr "%7s : %10s, %7s, %6s, contatore %d\n" #: ../gnokii/gnokii-security.c:120 #, c-format msgid "Getting security code... \n" msgstr "In attesa del codice di sicurezza...\n" #: ../gnokii/gnokii-security.c:124 #, c-format msgid "Security code is: %s\n" msgstr "Il codice di sicurezza è: %s\n" #: ../gnokii/gnokii-security.c:168 #, c-format msgid " usage: --entersecuritycode PIN|PIN2|PUK|PUK2|SEC\n" msgstr " Uso: --entersecuritycode PIN|PIN2|PUK|PUK2|SEC\n" #: ../gnokii/gnokii-security.c:193 ../gnokii/gnokii-security.c:281 msgid "Enter your code: " msgstr "Digitare il codice: " #: ../gnokii/gnokii-security.c:202 #, c-format msgid "Code ok.\n" msgstr "Codice ok.\n" #: ../gnokii/gnokii-security.c:221 #, c-format msgid "Security code status: " msgstr "Stato del codice di sicurezza: " #: ../gnokii/gnokii-security.c:225 #, c-format msgid "waiting for Security Code.\n" msgstr "in attesa del codice di sicurezza.\n" #: ../gnokii/gnokii-security.c:228 #, c-format msgid "waiting for PIN.\n" msgstr "in attesa del PIN.\n" #: ../gnokii/gnokii-security.c:231 #, c-format msgid "waiting for PIN2.\n" msgstr "in attesa del PIN2.\n" #: ../gnokii/gnokii-security.c:234 #, c-format msgid "waiting for PUK.\n" msgstr "in attesa del PUK.\n" #: ../gnokii/gnokii-security.c:237 #, c-format msgid "waiting for PUK2.\n" msgstr "in attesa del PUK2.\n" #: ../gnokii/gnokii-security.c:240 #, c-format msgid "nothing to enter.\n" msgstr "niente da inserire.\n" #: ../gnokii/gnokii-security.c:243 #, c-format msgid "unknown\n" msgstr "sconosciuta\n" #: ../gnokii/gnokii-security.c:254 #, c-format msgid " usage: --changesecuritycode PIN|PIN2|PUK|PUK2\n" msgstr " Uso: --changesecuritycode PIN|PIN2|PUK|PUK2\n" #: ../gnokii/gnokii-security.c:282 msgid "Enter new code: " msgstr "Digitare il nuovo codice: " #: ../gnokii/gnokii-security.c:283 msgid "Retype new code: " msgstr "Digitare ancora il nuovo codice: " #: ../gnokii/gnokii-security.c:285 #, c-format msgid "Error: new code differs\n" msgstr "Errore: il nuovo codice non coincide\n" #: ../gnokii/gnokii-security.c:295 #, c-format msgid "Code changed.\n" msgstr "Codice cambiato.\n" #: ../gnokii/gnokii-settings.c:56 #, c-format msgid "" "Phone settings:\n" " --reset [soft|hard]\n" " --setdatetime [YYYY [MM [DD [HH [MM]]]]]\n" " --getdatetime\n" " --setalarm [HH MM]\n" " --getalarm\n" msgstr "" "Impostazioni telefono:\n" " --reset [soft|hard]\n" " --setdatetime [AAAA [MM [GG [OO [MM]]]]]\n" " --getdatetime\n" " --setalarm [OO MM]\n" " --getalarm\n" #: ../gnokii/gnokii-settings.c:142 #, c-format msgid "Date: %4d/%02d/%02d\n" msgstr "Data: %3$d/%2$02d/%1$04d\n" #: ../gnokii/gnokii-settings.c:143 #, c-format msgid "Time: %02d:%02d:%02d\n" msgstr "Ora: %d.%02d.%02d\n" #: ../gnokii/gnokii-settings.c:200 #, c-format msgid "Alarm: %s\n" msgstr "Sveglia: %s\n" #: ../gnokii/gnokii-settings.c:201 #, c-format msgid "Time: %02d:%02d\n" msgstr "Ora: %02d.%02d\n" #: ../gnokii/gnokii-settings.c:223 #, c-format msgid "What kind of reset do you want??\n" msgstr "Quale tipo di reset si desidera?\n" #: ../gnokii/gnokii-sms.c:63 #, c-format msgid "" "SMS options:\n" " --sendsms destination [--smsc message_center_number |\n" " --smscno message_center_index] [-r|--report] [-8|--8bit]\n" " [-C|--class n] [-v|--validity n]\n" " [-i|--imelody] [-a|--animation file;file;file;file]\n" " [-o|--concat this;total;serial] [-w|--wappush url]\n" " --savesms [--sender from] [--smsc message_center_number |\n" " --smscno message_center_index] [-f|--folder folder_id]\n" " [-l|--location number] [-s|--sent|-r|--read] [-d|--" "deliver]\n" " [-t|--datetime YYMMDDHHMMSS]\n" " --getsms memory_type start [end] [-f|--file file]\n" " [-F|--force-file file] [-a|--append-file file]\n" " [-d|--delete]\n" " --deletesms memory_type start [end]\n" " --getsmsc [start_number [end_number]] [-r|--raw]\n" " --setsmsc\n" " --createsmsfolder name\n" " --deletesmsfolder folderid\n" " --showsmsfolderstatus\n" " --smsreader\n" msgstr "" "Opzioni SMS:\n" " --sendsms destinatario [--smsc numero_centro_messaggi |\n" " --smscno indice_centro_messaggi] [-r|--report] [-8|--8bit]\n" " [-C|--class n] [-v|--validity n]\n" " [-i|--imelody] [-a|--animation file;file;file;file]\n" " [-o|--concat questo;totale;serie] [-w|--wappush url]\n" " --savesms [--sender mittente] [--smsc numero_centro_messaggi |\n" " --smscno indice_centro_messaggi] [-f|--folder id_cartella]\n" " [-l|--location numero] [-s|--sent|-r|--read] [-d|--" "deliver]\n" " [-t|--datetime AAMMGGHHMMSS] \n" " --getsms tipo_memoria inizio [fine] [-f|--file nome_file]\n" " [-F|--force-file nome_file] [-a|--append-file nome_file]\n" " [-d|--delete]\n" " --deletesms tipo_memoria inizio [fine]\n" " --getsmsc [numero_iniziale [numero_finale]] [-r|--raw]\n" " --setsmsc\n" " --createsmsfolder nome\n" " --deletesmsfolder id_cartella\n" " --showsmsfolderstatus\n" " --smsreader\n" #: ../gnokii/gnokii-sms.c:88 #, c-format msgid "" " usage: --sendsms destination recipient number (msisdn)\n" " --smsc message_center_number number (msisdn) of the message\n" " center\n" " --smscno message_center_index index of the message center " "stored\n" " in the phone memory\n" " -r\n" " --report request delivery report\n" " -v n\n" " --validity n set message validity\n" " -C n\n" " --class n set message class; possible " "values\n" " are 0, 1, 2, or 3\n" " -8\n" " --8bit set 8bit coding\n" " -i\n" " --imelody send imelody message, text is " "read\n" " from stdin\n" " -a file;file;file;file\n" " --animation file;file;file;file send animation message\n" " -o this;total;serial\n" " --concat this;total;serial send 'this' part of all 'total' " "parts\n" " identified by 'serial'\n" " -w url\n" " --wappush url send wappush to the given url\n" "Message text is read from standard input.\n" "\n" msgstr "" " Uso: --sendsms destinatario numero del destinatario (msisdn)\n" " --smsc numero_centro_messaggi numero (msisdn) del centro\n" " messaggi\n" " --smscno indice_centro_messaggi indice del centro messaggi\n" " memorizzato nel telefono\n" " -r\n" " --report richiedi il Rapporto di invio " "SMS\n" " -v n\n" " --validity n imposta la validità del " "messaggio\n" " -C n\n" " --class n imposta la classe del messaggio; " "possibili\n" " valori sono 0, 1, 2, o 3\n" " -8\n" " --8bit imposta la codifica 8bit\n" " -i\n" " --imelody invia un messaggio imelody, il " "testo è\n" " letto da stdin\n" " -a file;file;file;file\n" " --animation file;file;file;file invia un messaggio animation\n" " -o questa;totale;serie\n" " --concat questa;totale;serie invia 'questa' parte di 'totale' " "parti\n" " identificate da 'serie'\n" " -w url\n" " --wappush url invia un wappush verso l'url " "specificato\n" "Il testo del messaggio è letto dallo standard input.\n" "\n" #: ../gnokii/gnokii-sms.c:220 #, c-format msgid "Incorrect --concat option\n" msgstr "L'opzione --concat è errata\n" #: ../gnokii/gnokii-sms.c:267 ../gnokii/gnokii-sms.c:574 #, c-format msgid "Empty message. Quitting.\n" msgstr "Messaggio vuoto. Uscita.\n" #: ../gnokii/gnokii-sms.c:278 #, c-format msgid "URL is too long (max 255 chars). Quitting.\n" msgstr "L'URL è troppo lungo (massimo 255 caratteri). Uscita.\n" #: ../gnokii/gnokii-sms.c:287 ../gnokii/gnokii-utils.c:139 #, c-format msgid "Please enter SMS text. End your input with :\n" msgstr "" "Inserire il testo dell'SMS. Terminare l'inserimento con :\n" #: ../gnokii/gnokii-sms.c:294 #, c-format msgid "WAP Push encoding failed!\n" msgstr "La codifica WAP Push è fallita.\n" #: ../gnokii/gnokii-sms.c:329 #, c-format msgid "" "Cannot read the SMSC number from your phone. If the sms send will fail, " "please use --smsc option explicitely giving the number.\n" msgstr "" "Impossibile leggere il numero del centro messaggi dal telefono. Se l'invio " "dell'SMS fallisce, usare l'opzione --smsc per impostare il numero.\n" #: ../gnokii/gnokii-sms.c:368 #, c-format msgid "" " usage: --savesms\n" " --smsc message_center_number number (msisdn) of the message\n" " center\n" " --smscno message_center_index index of the message center stored\n" " in the phone memory\n" " --sender msisdn set sender number\n" " -l n\n" " --location n save message at location n\n" " -r\n" " --read mark message as read\n" " -s\n" " --sent mark message as sent\n" " -f ID\n" " --folder ID save message to the folder ID where\n" " is of type IN, OU...\n" " -d\n" " --deliver set message type as sms deliver\n" " (to be sent)\n" " -t YYMMDDHHMISS\n" " --datetime YYMMDDHHMISS set date and time of message " "delivery\n" "Message text is read from standard input.\n" "\n" msgstr "" " Uso: --savesms\n" " --smsc numero_centro_messaggi numero (msisdn) del centro\n" " messaggi\n" " --smscno indice_centro_messaggi indice del centro messaggi\n" " memorizzato nel telefono\n" " --sender msisdn imposta il numero del mittente\n" " -l n\n" " --location n salva il messaggio alla posizione " "n\n" " -r\n" " --read segna il messaggio come letto\n" " -s\n" " --sent segna il messaggio come inviato\n" " -f ID\n" " --folder ID salva il messaggio nella cartella " "ID\n" " di tipo IN, OU...\n" " -d\n" " --deliver imposta il tipo di messaggio come\n" " 'sms deliver' (da inviare)\n" " -t AAMMGGHHMISS\n" " --datetime AAMMGGHHMISS imposta data e ora della consegna " "del messaggio\n" "Il testo del messaggio è letto dallo standard input.\n" #: ../gnokii/gnokii-sms.c:496 ../gnokii/gnokii-sms.c:501 #, c-format msgid "Invalid datetime format: %s (should be YYMMDDHHMISS, all digits)!\n" msgstr "" "Formato non valido per data e ora: %s (deve essere AAMMGGOOMMSS, solo " "numeri)\n" #: ../gnokii/gnokii-sms.c:517 #, c-format msgid "Invalid datetime: %s.\n" msgstr "Data e ora non valide: %s.\n" #: ../gnokii/gnokii-sms.c:538 #, c-format msgid "Message at specified location exists. " msgstr "Esiste già un messaggio nella posizione specificata. " #: ../gnokii/gnokii-sms.c:585 #, c-format msgid "Storing SMS... " msgstr "Salvataggio dell'SMS... " #: ../gnokii/gnokii-sms.c:591 #, c-format msgid "Saved to %d!\n" msgstr "Salvato alla posizione %d.\n" #: ../gnokii/gnokii-sms.c:593 #, c-format msgid "Saving failed (%s)\n" msgstr "Salvataggio fallito (%s)\n" #: ../gnokii/gnokii-sms.c:601 #, c-format msgid "" " usage: --getsms memory start [end] retrieves messages from memory type " "(SM, ME,\n" " IN, OU, ...) starting from\n" " location start and ending with end;\n" " if end option is omitted, just one " "entry\n" " is read;\n" " start must be a number, end may be a " "number\n" " or 'end' string;\n" " if 'end' is used entries are being read\n" " until empty location\n" " --force-file filename\n" " -F filename save sms to the file overwriting it if\n" " the file already exists;\n" " file is in mbox format\n" " --file filename\n" " -f filename as above but user is prompted before\n" " overwriting the file\n" " --append-file filename\n" " -a filename as above but append to the existing " "file\n" " --delete\n" " -d delete message after reading\n" "\n" msgstr "" " Uso: --getsms memoria inizio [fine] legge messaggi dalla memoria di tipo " "(SM, ME,\n" " IN, OU, ...) iniziando dalla posizione\n" " inizio e terminando con fine;\n" " se l'opzione fine è omessa, è letto " "solo\n" " un elemento;\n" " inizio deve essere un numero, fine può\n" " essere un numero o la stringa «end»\n" " se è usata la stringa «end» la lettura\n" " prosegue fino all'ultima posizione\n" " --force-file nome_file\n" " -F nome_file salva gli SMS nel file " "sovrascrivendolo\n" " se esiste già;\n" " il file è in formato mbox\n" " --file nome_file\n" " -f nome_file come sopra, ma all'utente è chiesto se\n" " desidera sovrascrivere il file\n" " --append nome_file\n" " -a nome_file come sopra, ma aggiunge al file\n" " esistente\n" " --delete\n" " -d elimina i messaggi dopo la lettura\n" "\n" #: ../gnokii/gnokii-sms.c:752 #, c-format msgid "Sending date/time: %02d/%02d/%04d %02d:%02d:%02d " msgstr "Data/ora di invio: %02d/%02d/%04d %d.%02d.%02d " #. Translators: this format is for printing a timezone with a leading +/- #: ../gnokii/gnokii-sms.c:757 ../gnokii/gnokii-sms.c:765 #: ../gnokii/gnokii-sms.c:779 ../gnokii/gnokii-sms.c:794 #, c-format msgid "%+03d00" msgstr "" #: ../gnokii/gnokii-sms.c:760 #, c-format msgid "Delivery date/time: %02d/%02d/%04d %02d:%02d:%02d " msgstr "Data/ora consegna: %02d/%02d/%04d %d.%02d.%02d " #: ../gnokii/gnokii-sms.c:768 ../gnokii/gnokii-sms.c:800 #, c-format msgid "Recipient: %s Msg Center: %s\n" msgstr "Destinatario: %s Centro Msg: %s\n" # #: ../gnokii/gnokii-sms.c:769 ../gnokii/gnokii-sms.c:785 #, c-format msgid "Text:\n" msgstr "Testo:\n" #: ../gnokii/gnokii-sms.c:774 ../gnokii/gnokii-sms.c:789 #, c-format msgid "Date/time: %02d/%02d/%04d %02d:%02d:%02d " msgstr "Data/ora: %02d/%02d/%04d %d.%02d.%02d " #: ../gnokii/gnokii-sms.c:782 ../gnokii/gnokii-sms.c:803 #, c-format msgid "Sender: %s Msg Center: %s\n" msgstr "Mittente: %s Centro Msg: %s\n" #: ../gnokii/gnokii-sms.c:783 #, c-format msgid "Bitmap:\n" msgstr "Bitmap:\n" #: ../gnokii/gnokii-sms.c:809 #, c-format msgid "%s:\n" msgstr "%s:\n" #: ../gnokii/gnokii-sms.c:814 #, c-format msgid "GSM operator logo for %s (%s) network.\n" msgstr "Logo operatore GSM per la rete %s (%s).\n" #: ../gnokii/gnokii-sms.c:816 #, c-format msgid "Saved by Logo Express\n" msgstr "Salvato da Logo Express\n" #: ../gnokii/gnokii-sms.c:818 #, c-format msgid "Saved by Operator Logo Uploader by Thomas Kessler\n" msgstr "Salvato da Operator Logo Uploader di Thomas Kessler\n" #: ../gnokii/gnokii-sms.c:830 ../gnokii/gnokii-utils.c:59 #, c-format msgid "File %s exists.\n" msgstr "Il file %s esiste.\n" #: ../gnokii/gnokii-sms.c:839 #, c-format msgid "Couldn't save logofile %s!\n" msgstr "Impossibile salvare il file dei loghi %s.\n" # i messaggi più lunghi di 160 caratteri #: ../gnokii/gnokii-sms.c:847 #, c-format msgid "Linked (%d/%d):\n" msgstr "Concatenato (%d/%d):\n" #: ../gnokii/gnokii-sms.c:882 #, c-format msgid "Getting SMS failed (location %d from %s memory)! (%s)\n" msgstr "Recupero SMS fallito (posizione %d della memoria %s). (%s)\n" #: ../gnokii/gnokii-sms.c:910 #, c-format msgid "" " usage: --deletesms memory start [end] deletes messages from memory type\n" " (SM, ME, IN, OU, ...) starting\n" " from location start and ending with " "end;\n" " if end option is omitted, just one " "entry\n" " is removed;\n" " if 'end' is used entries are being " "removed\n" " until empty location\n" "\n" msgstr "" " Uso: --deletesms memoria inizio [fine] elimina messaggi dalla memoria\n" " (SM, ME, IN, OU, ...) iniziando " "dalla\n" " posizione inizio e terminando con " "fine;\n" " se l'opzione fine è omessa, sarà \n" " eliminato solo un messaggio;\n" " se è usato «end» saranno eliminati\n" " i messaggi fino alla posizione vuota\n" "\n" #: ../gnokii/gnokii-sms.c:957 #, c-format msgid "Deleted SMS (location %d from memory %s)\n" msgstr "SMS eliminato (posizione %d della memoria %s)\n" #: ../gnokii/gnokii-sms.c:961 #, c-format msgid "Deleting SMS failed (location %d from %s memory)! (%s)\n" msgstr "Eliminazione SMS fallita (posizione %d della memoria %s). (%s)\n" #: ../gnokii/gnokii-sms.c:974 #, c-format msgid "" " usage: --getsmsc [start [end]] reads message center details from\n" " the phone starting with start location\n" " and ending with end location;\n" " no end parameter means to read every\n" " location to the end;\n" " no start parameter means to start with\n" " the first location;\n" "-r\n" "--raw output in raw format (comma separated)\n" " default is human readable form\n" "\n" msgstr "" " Uso: --getsmsc [iniziale [finale]] legge i dettagli del centro messaggi " "dal\n" " telefono a partire dalla posizione " "iniziale\n" " fino alla posizione finale;\n" " omettere il parametro finale significa\n" " leggere ogni posizione fino alla fine;\n" " omettere il parametro iniziale " "significa\n" " iniziare dalla prima posizione;\n" "-r\n" "--raw stampa in formato grezzo (separato da " "virgole)\n" " il formato predefinito è quello " "leggibile\n" "\n" #: ../gnokii/gnokii-sms.c:1025 #, c-format msgid "SMS center: location number must be greater than 0\n" msgstr "La posizione del centro messaggi deve essere maggiore di 0\n" #: ../gnokii/gnokii-sms.c:1061 #, c-format msgid "No. %d: \"%s\" (defined name)\n" msgstr "N° %d: «%s» (nome personalizzato)\n" #: ../gnokii/gnokii-sms.c:1063 #, c-format msgid "No. %d: \"%s\" (default name)\n" msgstr "N° %d: «%s» (nome predefinito)\n" #: ../gnokii/gnokii-sms.c:1064 #, c-format msgid "SMS center number is %s\n" msgstr "Il numero del centro messaggi è %s\n" #: ../gnokii/gnokii-sms.c:1066 #, c-format msgid "Default recipient number is %s\n" msgstr "Il numero predefinito del destinatario è %s\n" #: ../gnokii/gnokii-sms.c:1068 #, c-format msgid "No default recipient number is defined\n" msgstr "Nessun numero predefinito per il destinatario\n" #: ../gnokii/gnokii-sms.c:1069 #, c-format msgid "Messages sent as %s\n" msgstr "Messaggi inviati come %s\n" #: ../gnokii/gnokii-sms.c:1070 #, c-format msgid "Message validity is %s\n" msgstr "La validità del messaggio è %s\n" #: ../gnokii/gnokii-sms.c:1080 #, c-format msgid "" " usage: --setsmsc\n" "SMSC details are read from standard input.\n" "\n" msgstr "" " Uso: --setsmsc\n" "I dettagli dell'SMSC sono letti dallo standard input.\n" "\n" #: ../gnokii/gnokii-sms.c:1137 #, c-format msgid "" " usage: --createsmsfolder name creates SMS folder with given name\n" "\n" msgstr "" " Uso: --createsmsfolder nome crea una cartella per SMS col nome fornito\n" "\n" #: ../gnokii/gnokii-sms.c:1158 #, c-format msgid "Folder with name: %s successfully created!\n" msgstr "Cartella %s creata con successo\n" #: ../gnokii/gnokii-sms.c:1165 #, c-format msgid "" " usage: --deletesmsfolder folderid removes SMS folder with given id\n" "\n" msgstr "" " Uso: --deletesmsfolder id_cartella elimina la cartella per SMS con " "l'identificativo fornito\n" "\n" #: ../gnokii/gnokii-sms.c:1183 #, c-format msgid "Error: Number must be between 1 and %i!\n" msgstr "Errore: il numero deve essere compreso tra 1 e %i.\n" #: ../gnokii/gnokii-sms.c:1191 #, c-format msgid "Number %i of 'My Folders' successfully deleted!\n" msgstr "Numero %i di «My Folders» eliminato.\n" #: ../gnokii/gnokii-sms.c:1198 #, c-format msgid "" " usage: --showsmsfolderstatus shows summary of SMS folders\n" "\n" msgstr "" " Uso: --showsmsfolderstatus mostra un riepilogo delle cartelle per SMS\n" "\n" #: ../gnokii/gnokii-sms.c:1215 #, c-format msgid "Cannot list available folders: %s\n" msgstr "Impossibile elencare le cartelle disponibili: %s\n" #: ../gnokii/gnokii-sms.c:1219 #, c-format msgid "No. Name Id #Msg\n" msgstr "N° Nome Id #Msg\n" #: ../gnokii/gnokii-sms.c:1220 #, c-format msgid "========================================================\n" msgstr "========================================================\n" #: ../gnokii/gnokii-sms.c:1224 #, c-format msgid "Cannot get status of folder \"%s\": %s\n" msgstr "Impossibile ottenere lo stato della cartella «%s»: %s\n" #: ../gnokii/gnokii-sms.c:1227 #, c-format msgid "%3d %-42s %4s %4u\n" msgstr "%3d %-42s %4s %4u\n" #: ../gnokii/gnokii-sms.c:1250 #, c-format msgid "SMS received from number: %s\n" msgstr "SMS ricevuto dal numero: %s\n" #: ../gnokii/gnokii-sms.c:1259 #, c-format msgid "Got message %d: %s\n" msgstr "Ricevuto il messaggio %d: %s\n" #: ../gnokii/gnokii-sms.c:1267 #, c-format msgid "### Exists?!\n" msgstr "### Esiste?!\n" #: ../gnokii/gnokii-sms.c:1273 #, c-format msgid "### Cannot create file %s\n" msgstr "### Impossibile creare il file %s\n" #: ../gnokii/gnokii-sms.c:1297 #, c-format msgid "" " usage: --smsreader periodically check sms on the phone and stores them\n" " in mbox format\n" "\n" msgstr "" " Uso: --smsreader periodicamente controlla gli SMS sul telefono\n" " e li memorizza in formato mbox\n" "\n" #: ../gnokii/gnokii-sms.c:1314 #, c-format msgid "Entered sms reader mode...\n" msgstr "Inizio della modalità di lettura degli SMS...\n" #: ../gnokii/gnokii-sms.c:1324 #, c-format msgid "Exiting sms reader mode...\n" msgstr "Fine della modalità di lettura degli SMS...\n" #: ../gnokii/gnokii-todo.c:56 #, c-format msgid "" "ToDo options:\n" " --gettodo start_number [end_number|end] [-v|--vCal]\n" " --writetodo vcalendarfile start_number [end_number|end]\n" " --deletealltodos\n" msgstr "" "Opzioni impegni:\n" " --gettodo numero_iniziale [numero_finale|end] [-v|--vCal]\n" " --writetodo file_vcalendar numero_iniziale [numero_finale|end]\n" " --deletealltodos\n" #: ../gnokii/gnokii-todo.c:65 #, c-format msgid "" "usage: --gettodo start_number [end_number | end] [-v|--vCal]\n" " start_number - entry number in the phone todo (numeric)\n" " end_number - until this entry in the phone todo (numeric, " "optional)\n" " end - the string \"end\" indicates all entries from start to " "end\n" " -v - output in iCalendar format\n" " NOTE: if no end is given, only the start entry is written\n" msgstr "" "Uso: --gettodo start_number [end_number | end] [-v|--vCal]\n" " numero_iniziale - il numero della voce negli impegni del " "telefono (numerico)\n" " numero_finale - fino a questa voce negli impegni del telefono " "(numerico, opzionale)\n" " end - la stringa «end» indica tutte le voci " "dall'inizio alla fine\n" " -v - output nel formato iCalendar\n" " NOTA: se non è fornita una voce finale, sarà scritta solo la voce " "iniziale\n" #: ../gnokii/gnokii-todo.c:119 msgid "Todo" msgstr "Promemoria" #: ../gnokii/gnokii-todo.c:120 msgid "Priority" msgstr "Priorità" #: ../gnokii/gnokii-todo.c:133 #, c-format msgid "The ToDo note could not be read: %s\n" msgstr "Impossibile leggere il promemoria: %s\n" #: ../gnokii/gnokii-todo.c:142 #, c-format msgid "" "usage: --writetodo vcalendarfile start_number [end_number|end]\n" " vcalendarfile - file containing todo notes in vCal format\n" " start_number - first note to read from file\n" " end_number - last note to read from file\n" " end - read all notes from file from start_number\n" " NOTE: it stores the note at the first empty location.\n" msgstr "" "Uso: --writetodo file_vcalendar numero_iniziale [numero_finale|end]\n" " file_vcalendar - file che contiene promemoria in formato " "vCal\n" " numero_iniziale - primo promemoria da leggere dal file\n" " numero_finale - ultimo promemoria da leggere dal file\n" " end - legge tutti i promemoria dal file a " "partire da numero_iniziale\n" " NOTA: memorizza la nota alla prima posizione libera.\n" #: ../gnokii/gnokii-todo.c:216 #, c-format msgid "Priority %d. %s\n" msgstr "Priorità %d. %s\n" #: ../gnokii/gnokii-todo.c:218 #, c-format msgid "Failed to write ToDo note: %s\n" msgstr "Impossibile scrivere il promemoria: %s\n" #: ../gnokii/gnokii-todo.c:234 #, c-format msgid "Successfully deleted all ToDo notes!\n" msgstr "Eliminati tutti i promemoria.\n" #: ../gnokii/gnokii-todo.c:236 #, c-format msgid "Failed to delete ToDo note: %s\n" msgstr "Impossibile leggere il promemoria: %s\n" #: ../gnokii/gnokii-utils.c:145 #, c-format msgid "Couldn't read from stdin!\n" msgstr "Impossibile leggere da stdin.\n" #: ../gnokii/gnokii-utils.c:151 #, c-format msgid "Input too long! (%d, maximum is %d)\n" msgstr "Riga troppo lunga! (%d, ma il massimo è %d)\n" #: ../gnokii/gnokii-utils.c:166 #, c-format msgid "Could not null bitmap: %s\n" msgstr "Impossibile preparare un'immagine vuota: %s\n" #: ../gnokii/gnokii-utils.c:171 #, c-format msgid "Could not load bitmap from %s: %s\n" msgstr "Impossibile leggere la bitmap da %s: %s\n" #: ../gnokii/gnokii-utils.c:210 #, c-format msgid "" "Warning: end value (%d) is less than start value (%d). Setting it to the " "start value (%d)\n" msgstr "" "Attenzione: il valore finale (%d) è minore del valore iniziale (%d). Sarà " "impostato al valore inziale (%d)\n" #: ../gnokii/gnokii-wap.c:55 #, c-format msgid "" "WAP options:\n" " --getwapbookmark number\n" " --writewapbookmark name URL\n" " --deletewapbookmark number\n" " --getwapsetting number [-r|--raw]\n" " --writewapsetting\n" " --activatewapsetting number\n" msgstr "" "Opzioni WAP:\n" " --getwapbookmark numero\n" " --writewapbookmark nome URL\n" " --deletewapbookmark numero\n" " --getwapsetting numero [-r|--raw]\n" " --writewapsetting\n" " --activatewapsetting numero\n" #: ../gnokii/gnokii-wap.c:67 #, c-format msgid " usage: --getwapbookmark number\n" msgstr " Uso: --getwapbookmark numero\n" # il telefono li chiama "Preferiti" #: ../gnokii/gnokii-wap.c:88 ../gnokii/gnokii-wap.c:219 #, c-format msgid "WAP bookmark nr. %d:\n" msgstr "Preferiti WAP n° %d:\n" #: ../gnokii/gnokii-wap.c:103 #, c-format msgid " usage: --writebookmark name URL\n" msgstr " Uso: --writewapbookmark nome URL\n" #: ../gnokii/gnokii-wap.c:126 #, c-format msgid "WAP bookmark nr. %d successfully written!\n" msgstr "Preferiti WAP n° %d scritto con successo.\n" #: ../gnokii/gnokii-wap.c:138 #, c-format msgid " usage: --deletewapbookmark number\n" msgstr " Uso: --deletewapbookmark numero\n" #: ../gnokii/gnokii-wap.c:159 #, c-format msgid "WAP bookmark nr. %d deleted!\n" msgstr "Preferiti WAP n° %d eliminato.\n" #: ../gnokii/gnokii-wap.c:171 #, c-format msgid " usage: --getwapsetting number [-r|--raw]\n" msgstr " Uso: --getwapsetting numero [-r|--raw]\n" #: ../gnokii/gnokii-wap.c:221 ../xgnokii/xgnokii_contacts.c:725 #: ../xgnokii/xgnokii_contacts.c:803 ../xgnokii/xgnokii_contacts.c:942 #: ../xgnokii/xgnokii_contacts.c:984 ../xgnokii/xgnokii_contacts.c:1202 msgid "Home" msgstr "Home page" #: ../gnokii/gnokii-wap.c:222 msgid "Session mode" msgstr "Modalità di sessione" #: ../gnokii/gnokii-wap.c:223 msgid "Connection security" msgstr "Sicurezza di connessione" #: ../gnokii/gnokii-wap.c:224 msgid "Data bearer" msgstr "Trasporto dati" #: ../gnokii/gnokii-wap.c:226 ../gnokii/gnokii-wap.c:236 msgid "Authentication type" msgstr "Tipo di autenticazione" #: ../gnokii/gnokii-wap.c:227 msgid "Data call type" msgstr "Tipo di chiamata dati" #: ../gnokii/gnokii-wap.c:228 msgid "Data call speed" msgstr "Velocità di chiamata dati" #: ../gnokii/gnokii-wap.c:229 ../gnokii/gnokii-wap.c:237 msgid "Login type" msgstr "Tipo di login" #: ../gnokii/gnokii-wap.c:230 ../gnokii/gnokii-wap.c:239 msgid "IP" msgstr "IP" #: ../gnokii/gnokii-wap.c:232 ../gnokii/gnokii-wap.c:240 msgid "Username" msgstr "Nome utente" #: ../gnokii/gnokii-wap.c:233 ../gnokii/gnokii-wap.c:241 msgid "Password" msgstr "Password" #: ../gnokii/gnokii-wap.c:235 ../xgnokii/xgnokii.c:1615 msgid "Connection" msgstr "Collegamento" #: ../gnokii/gnokii-wap.c:238 msgid "Access point" msgstr "Punto d'accesso" #: ../gnokii/gnokii-wap.c:243 msgid "Service number" msgstr "Numero del servizio" #: ../gnokii/gnokii-wap.c:244 msgid "Server number" msgstr "Numero del server" #: ../gnokii/gnokii-wap.c:292 #, c-format msgid "Cannot write WAP setting: %s\n" msgstr "Impossibile scrivere le impostazioni WAP: %s\n" #: ../gnokii/gnokii-wap.c:299 #, c-format msgid " usage: --activatewapsetting number\n" msgstr " Uso: --activatewapsetting numero\n" #: ../gnokii/gnokii-wap.c:320 #, c-format msgid "WAP setting nr. %d activated!\n" msgstr "Impostazioni WAP n° %d attivate.\n" #: ../smsd/file.c:59 ../smsd/file.c:90 #, c-format msgid "Cannot stat file %s!\n" msgstr "Impossibile ottenere informazioni sul file %s\n" #: ../smsd/file.c:68 #, c-format msgid "" "File %s is not regular file or\n" "you have not executable permission to this file!\n" msgstr "" "Il file %s non è un file normale oppure\n" "non si dispone del permesso di esecuzione su questo file.\n" #: ../smsd/file.c:85 #, c-format msgid "You have not set spool directory, sms sending is disabled!\n" msgstr "" "Il nome della cartella temporanea non è impostato, per cui l'invio di SMS è " "disabilitato.\n" #: ../smsd/file.c:99 #, c-format msgid "" "File %s is not directory or\n" "you have not read and write permissions to this directory,\n" "sms sending is disabled!\n" "!" msgstr "" "Il file %s non è una cartella oppure\n" "non si dispone dei permessi di lettura e scrittura su questa cartella,\n" "per cui l'invio di SMS è disabilitato.\n" "!" #: ../smsd/file.c:166 #, c-format msgid "Cannot open directory %s\n" msgstr "Impossibile aprire la cartella %s\n" #: ../smsd/file.c:199 #, c-format msgid "Remote number is empty in %s!\n" msgstr "Il numero remoto è vuoto in %s.\n" #: ../smsd/file.c:243 ../smsd/file.c:258 #, c-format msgid "Cannot unlink %s." msgstr "Impossibile eliminare %s" #: ../smsd/file.c:252 #, c-format msgid "Cannot send sms from file %s\n" msgstr "Impossibile inviare SMS dal file %s\n" #: ../smsd/file.c:255 #, c-format msgid "Cannot rename file %s to %s. Trying to unlink it.\n" msgstr "" "Impossibile rinominare il file %s in %s. Tentativo di eliminazione in " "corso.\n" #: ../smsd/lowlevel.c:111 #, c-format msgid "" "Cannot load phone %s!\n" "Do you have proper section in the config file?\n" msgstr "" "Impossibile caricare il telefono %s.\n" "Verificare che sia presente la sezione adatta nel file di configurazione.\n" #: ../smsd/lowlevel.c:400 ../xgnokii/xgnokii_lowlevel.c:1349 #, c-format msgid "Event %d failed with return code %d!\n" msgstr "L'evento %d è fallito con il codice di errore %d.\n" #: ../smsd/lowlevel.c:449 #, c-format msgid "Timeout in file %s, line %d, restarting connection.\n" msgstr "" "Tempo esaurito nel file %s, riga %d, riavvio della connessione in corso.\n" #: ../smsd/lowlevel.c:459 #, c-format msgid "Too many consecutive errors, restarting connection.\n" msgstr "Troppi errori consecutivi, riavvio della connessione.\n" # tradurre host con server non è il massimo #: ../smsd/mysql.c:75 ../smsd/pq.c:66 #, c-format msgid "Connection to database '%s' on host '%s' failed.\n" msgstr "Impossibile connettersi al database «%s» sull'host «%s».\n" #: ../smsd/mysql.c:132 #, fuzzy, c-format msgid "%d: SELECT FROM multipart command failed.\n" msgstr "%d: il comando SELECT FROM outbox è fallito.\n" #: ../smsd/mysql.c:169 #, fuzzy, c-format msgid "%d: INSERT INTO multipartinbox command failed.\n" msgstr "%d: INSERT INTO %s.inbox è fallito.\n" #: ../smsd/mysql.c:187 #, fuzzy, c-format msgid "%d: SELECT FROM multipartinbox command failed.\n" msgstr "%d: il comando SELECT FROM outbox è fallito.\n" #: ../smsd/mysql.c:223 #, fuzzy, c-format msgid "%d: DELETE FROM multipartinbox command failed.\n" msgstr "%d: il comando SELECT FROM outbox è fallito.\n" #: ../smsd/mysql.c:261 #, fuzzy, c-format msgid "%d: SELECT FROM inbox command failed.\n" msgstr "%d: il comando SELECT FROM outbox è fallito.\n" #: ../smsd/mysql.c:294 #, fuzzy, c-format msgid "%d: INSERT INTO inbox command failed.\n" msgstr "%d: INSERT INTO %s.inbox è fallito.\n" #: ../smsd/mysql.c:334 ../smsd/sqlite.c:239 #, c-format msgid "%d: SELECT FROM outbox command failed.\n" msgstr "%d: il comando SELECT FROM outbox è fallito.\n" #: ../smsd/mysql.c:344 #, c-format msgid "%d: Store Mysql Result Failed.\n" msgstr "%d: impossibile memorizzare il risultato di MySQL.\n" #: ../smsd/mysql.c:397 ../smsd/pq.c:425 #, c-format msgid "%d: UPDATE command failed.\n" msgstr "%d: il comando UPDATE è fallito.\n" # tradurre host con server non è il massimo #: ../smsd/pq.c:75 #, fuzzy, c-format msgid "Setting client charset '%s' for database '%s' on host '%s' failed.\n" msgstr "Impossibile connettersi al database «%s» sull'host «%s».\n" #: ../smsd/pq.c:120 ../smsd/pq.c:257 #, fuzzy, c-format msgid "%d: Escaping string failed.\n" msgstr "%d: il comando UPDATE è fallito.\n" #: ../smsd/pq.c:148 ../smsd/pq.c:210 #, fuzzy, c-format msgid "%d: SELECT FROM %s.multipart command failed.\n" msgstr "%d: il comando SELECT FROM %s.outbox è fallito.\n" #: ../smsd/pq.c:188 #, fuzzy, c-format msgid "%d: INSERT INTO %s.multipartinbox failed.\n" msgstr "%d: INSERT INTO %s.inbox è fallito.\n" #: ../smsd/pq.c:239 #, fuzzy, c-format msgid "%d: DELETE FROM %s.multipartinbox command failed.\n" msgstr "%d: il comando SELECT FROM %s.outbox è fallito.\n" #: ../smsd/pq.c:294 #, fuzzy, c-format msgid "%d: SELECT FROM %s.inbox command failed.\n" msgstr "%d: il comando SELECT FROM %s.outbox è fallito.\n" #: ../smsd/pq.c:331 #, c-format msgid "%d: INSERT INTO %s.inbox failed.\n" msgstr "%d: INSERT INTO %s.inbox è fallito.\n" #: ../smsd/pq.c:374 #, c-format msgid "%d: SELECT FROM %s.outbox command failed.\n" msgstr "%d: il comando SELECT FROM %s.outbox è fallito.\n" #: ../smsd/smsd.c:137 #, c-format msgid "smsd - version %s from gnokii %s\n" msgstr "smsd - versione %s da gnokii %s\n" #: ../smsd/smsd.c:142 #, fuzzy, c-format msgid "" "smsd - version %s from gnokii %s\n" "Copyright Jan Derfinak 1999-2011\n" msgstr "" "smsd - versione %s da gnokii %s\n" "Copyright Jan Derfinak \n" #: ../smsd/smsd.c:149 #, fuzzy, c-format msgid "" "\n" "Usage: %s [options]\n" " -u, --user db_username OR action if -m file\n" " -p, --password db_password\n" " -d, --db db_name\n" " -c, --host db_hostname OR spool directory if -m file\n" " -s, --schema db_schema\n" " -e, --encoding client_encoding\n" " -m, --module db_module (pq, mysql, sqlite, file)\n" " -l, --libdir path_to_db_module\n" " -f, --logfile file\n" " -t, --phone phone_number\n" " -i, --interval polling_interval_for_incoming_sms's_in_seconds\n" " -S, --maxsms number_of_sms's (only in dumb mode)\n" " -b, --inbox memoryType\n" " -0, --firstpos0\n" " -v, --version\n" " -h, --help\n" msgstr "" "\n" "Uso: %s [opzioni]\n" " -u, --user nome_utente_db OPPURE azione se si usa -m file\n" " -p, --password password_db\n" " -d, --db nome_db\n" " -c, --host nome_host_db OPPURE spool directory se si usa -m " "file\n" " -s, --schema schema_db\n" " -m, --module modulo_db (pq, mysql, file)\n" " -l, --libdir percorso_per_modulo_db\n" " -f, --logfile nome_del_file\n" " -t, --phone numero_telefono\n" " -i, --interval ogni_quanti_secondi_cercare_nuovi_messaggi\n" " -S, --maxsms numero_sms (solo in modalità stupida)\n" " -b, --inbox tipo_memoria\n" " -0, --firstpos0\n" " -v, --version\n" " -h, --help\n" #: ../smsd/smsd.c:183 #, c-format msgid "WARNING: Cannot open file %s for appending.\n" msgstr "Attenzione: Impossibile aprire il file %s per aggiungere.\n" #: ../smsd/smsd.c:342 #, c-format msgid "Wrong number of arguments\n" msgstr "Numero di argomenti errato\n" #: ../smsd/smsd.c:349 #, c-format msgid "Cannot load database module %s in directory %s!\n" msgstr "Impossibile aprire il modulo di database %s nella directory %s\n" #: ../smsd/smsd.c:423 #, c-format msgid "Sending to %s unsuccessful. Error: %s\n" msgstr "L'invio a %s è fallito. Errore: %s\n" #: ../smsd/smsd.c:429 #, c-format msgid "Sending to %s successful.\n" msgstr "L'invio a %s è riuscito.\n" #: ../smsd/smsd.c:455 #, c-format msgid "Inserting sms from %s successful.\n" msgstr "L'inserimento del messaggio da %s è riuscito.\n" #: ../smsd/smsd.c:465 #, c-format msgid "Duplicated sms from %s.\n" msgstr "SMS duplicato da %s.\n" #: ../smsd/smsd.c:475 #, c-format msgid "Multipart sms from %s. Waiting for the next parts.\n" msgstr "SMS multiparte da %s. In attesa delle parti successive.\n" #: ../smsd/smsd.c:485 #, c-format msgid "" "Inserting sms from %s unsuccessful.\n" "Date: %02d-%02d-%02d %02d:%02d:%02d+%02d\n" "Text: %s\n" "\n" "Exiting.\n" msgstr "" "Inserimento SMS da %s non riuscito.\n" "Data: %02d-%02d-%02d %02d:%02d:%02d+%02d\n" "Testo: %s\n" "\n" "Uscita.\n" # tradurre host con server non è il massimo #: ../smsd/sqlite.c:57 ../smsd/sqlite.c:69 #, fuzzy, c-format msgid "Connection to database '%s' failed.\n" msgstr "Impossibile connettersi al database «%s» sull'host «%s».\n" #: ../smsd/sqlite.c:116 ../smsd/sqlite.c:182 #, c-format msgid "%d: Parsing query %s failed!" msgstr "" #: ../smsd/sqlite.c:117 ../smsd/sqlite.c:183 #, fuzzy, c-format msgid "Error: %s" msgstr "Errore: %s\n" #: ../smsd/sqlite.c:133 #, fuzzy, c-format msgid "%d: INSERT INTO inbox failed.\n" msgstr "%d: INSERT INTO %s.inbox è fallito.\n" #: ../smsd/sqlite.c:134 #, fuzzy, c-format msgid "Error %d: %s\n" msgstr "Errore: %s\n" #: ../smsd/sqlite.c:135 #, fuzzy, c-format msgid "Query: %s\n" msgstr "Interrogazione" #: ../utils/mgnokiidev.c:179 #, c-format msgid "mgnokiidev takes one and only one argument!\n" msgstr "mgnokiidev accetta uno ed un solo argomento.\n" #: ../xgnokii/xgnokii.c:217 msgid "Reading caller groups names ..." msgstr "Lettura dei nomi dei gruppi..." #: ../xgnokii/xgnokii.c:226 msgid "No group" msgstr "Nessun gruppo" #: ../xgnokii/xgnokii.c:347 msgid "Short Message received" msgstr "Ricevuto un messaggio SMS" #: ../xgnokii/xgnokii.c:353 ../xgnokii/xgnokii_lowlevel.c:1346 msgid "Working..." msgstr "Attendere..." #: ../xgnokii/xgnokii.c:370 msgid "Call in progress" msgstr "Chiamata in corso" #: ../xgnokii/xgnokii.c:383 msgid "Hide" msgstr "Nascondi" # per le chiamate in arrivo #: ../xgnokii/xgnokii.c:457 msgid "anonymous" msgstr "Numero privato" #: ../xgnokii/xgnokii.c:470 #, c-format msgid "" "Outgoing call in progress:\n" "Time: %s" msgstr "" "Chiamata in uscita in corso:\n" "Durata: %s" #: ../xgnokii/xgnokii.c:472 #, c-format msgid "" "Incoming call from: %s\n" "Time: %s" msgstr "" "Chiamata proveniente da: %s\n" "Durata: %s" #: ../xgnokii/xgnokii.c:584 ../xgnokii/xgnokii.c:1455 msgid "Max. Time" msgstr "Tempo massimo" #: ../xgnokii/xgnokii.c:631 msgid "Reading SMS centers ..." msgstr "Lettura dei centri messaggi..." #: ../xgnokii/xgnokii.c:896 msgid "SMS not supported!" msgstr "SMS non supportato." #: ../xgnokii/xgnokii.c:901 msgid "Calendar not supported!" msgstr "Calendario non supportato." #: ../xgnokii/xgnokii.c:1088 msgid "Error writing configuration file!" msgstr "Errore scrivendo il file di configurazione." #: ../xgnokii/xgnokii.c:1100 ../xgnokii/xgnokii_contacts.c:3126 msgid "Contacts" msgstr "Rubrica" #: ../xgnokii/xgnokii.c:1111 ../xgnokii/xgnokii_calendar.c:1547 msgid "Calendar" msgstr "Agenda" #: ../xgnokii/xgnokii.c:1116 ../xgnokii/xgnokii_logos.c:1525 msgid "Logos" msgstr "Loghi" #: ../xgnokii/xgnokii.c:1122 msgid "DTMF" msgstr "DTMF" #: ../xgnokii/xgnokii.c:1127 ../xgnokii/xgnokii_speed.c:548 msgid "Speed Dial" msgstr "Chiamate rapide" #: ../xgnokii/xgnokii.c:1132 msgid "Keyboard" msgstr "Tastiera" #: ../xgnokii/xgnokii.c:1137 ../xgnokii/xgnokii_netmon.c:294 msgid "Net Monitor" msgstr "Net Monitor" #: ../xgnokii/xgnokii.c:1147 msgid "Data calls" msgstr "Chiamata dati" #: ../xgnokii/xgnokii.c:1156 ../xgnokii/xgnokii.c:1575 msgid "Options" msgstr "Opzioni" #: ../xgnokii/xgnokii.c:1166 ../xgnokii/xgnokii.c:1183 msgid "About" msgstr "Informazioni su" #: ../xgnokii/xgnokii.c:1186 ../xgnokii/xgnokii.c:1358 #: ../xgnokii/xgnokii_calendar.c:688 ../xgnokii/xgnokii_calendar.c:734 #: ../xgnokii/xgnokii_calendar.c:881 ../xgnokii/xgnokii_calendar.c:1001 #: ../xgnokii/xgnokii_calendar.c:1141 ../xgnokii/xgnokii_calendar.c:1274 #: ../xgnokii/xgnokii_calendar.c:1435 ../xgnokii/xgnokii_contacts.c:875 #: ../xgnokii/xgnokii_contacts.c:1119 ../xgnokii/xgnokii_contacts.c:1255 #: ../xgnokii/xgnokii_contacts.c:1406 ../xgnokii/xgnokii_contacts.c:2949 #: ../xgnokii/xgnokii_sms.c:570 msgid "Ok" msgstr "Ok" #: ../xgnokii/xgnokii.c:1197 #, c-format msgid "" "xgnokii version: %s\n" "gnokii version: %s\n" "\n" "Copyright (C) 1999-2004 Pavel Janik ml.,\n" "Hugh Blemings, Jan Derfinak,\n" "Pawel Kot and others\n" "xgnokii is free software, covered by the GNU General Public License,\n" "and you are welcome to change it and/or distribute copies of it under\n" "certain conditions. There is absolutely no warranty for xgnokii.\n" "See GPL for details.\n" msgstr "" "xgnokii versione: %s\n" "gnokii versione: %s\n" "\n" "Copyright (C) 1999-2004 Pavel Janik ml.,\n" "Hugh Blemings, Jan Derfinak,\n" "Pawel Kot e altri\n" "xgnokii è software libero, protetto dalla GNU General Public License e \n" "chiunque può modificarlo o distribuirne copie a certe condizioni.\n" "Non c'è assolutamente nessuna garanzia per gnokii. Vedere la GPL per i " "dettagli.\n" #: ../xgnokii/xgnokii.c:1352 msgid "Edit SMS Setting" msgstr "Modifica impostazioni SMS" #: ../xgnokii/xgnokii.c:1366 ../xgnokii/xgnokii_calendar.c:697 #: ../xgnokii/xgnokii_calendar.c:743 ../xgnokii/xgnokii_calendar.c:890 #: ../xgnokii/xgnokii_calendar.c:1010 ../xgnokii/xgnokii_calendar.c:1150 #: ../xgnokii/xgnokii_calendar.c:1283 ../xgnokii/xgnokii_calendar.c:1443 #: ../xgnokii/xgnokii_common.c:80 ../xgnokii/xgnokii_common.c:162 #: ../xgnokii/xgnokii_contacts.c:886 ../xgnokii/xgnokii_contacts.c:1263 #: ../xgnokii/xgnokii_contacts.c:1414 ../xgnokii/xgnokii_contacts.c:1651 #: ../xgnokii/xgnokii_contacts.c:1698 ../xgnokii/xgnokii_contacts.c:1816 #: ../xgnokii/xgnokii_contacts.c:2212 ../xgnokii/xgnokii_contacts.c:2956 #: ../xgnokii/xgnokii_sms.c:578 msgid "Cancel" msgstr "Annulla" #: ../xgnokii/xgnokii.c:1379 msgid "Set's name:" msgstr "Nome Set:" #: ../xgnokii/xgnokii.c:1393 msgid "Center:" msgstr "Centro:" #: ../xgnokii/xgnokii.c:1407 msgid "Sending Format:" msgstr "Formato d'invio:" #: ../xgnokii/xgnokii.c:1447 msgid "Validity Period:" msgstr "Periodo di validità:" #: ../xgnokii/xgnokii.c:1572 msgid "Set's name" msgstr "Nome Set" #: ../xgnokii/xgnokii.c:1572 msgid "Center number" msgstr "Numero Centro Messaggi" #: ../xgnokii/xgnokii.c:1572 msgid "Format" msgstr "Formato" #: ../xgnokii/xgnokii.c:1572 msgid "Validity" msgstr "Validità" #: ../xgnokii/xgnokii.c:1580 msgid "Apply" msgstr "Applica" #: ../xgnokii/xgnokii.c:1588 ../xgnokii/xgnokii_contacts.c:2198 #: ../xgnokii/xgnokii_dtmf.c:181 msgid "Save" msgstr "Salva" #: ../xgnokii/xgnokii.c:1594 msgid "Close" msgstr "Chiudi" #. ** Connection notebook ** #: ../xgnokii/xgnokii.c:1608 msgid "Phone and connection type" msgstr "Telefono e tipo collegamento" #: ../xgnokii/xgnokii.c:1622 msgid "Port:" msgstr "Porta:" #: ../xgnokii/xgnokii.c:1636 ../xgnokii/xgnokii.c:1716 msgid "Model:" msgstr "Modello:" #: ../xgnokii/xgnokii.c:1650 msgid "Bindir:" msgstr "Directory degli eseguibili:" #: ../xgnokii/xgnokii.c:1664 msgid "Init length:" msgstr "Stringa di inizializzazione:" #: ../xgnokii/xgnokii.c:1679 msgid "Connection:" msgstr "Collegamento:" #: ../xgnokii/xgnokii.c:1683 msgid "infrared" msgstr "infrarossi" #: ../xgnokii/xgnokii.c:1690 msgid "serial" msgstr "seriale" #: ../xgnokii/xgnokii.c:1697 msgid "irda" msgstr "irda" #. ** Phone notebook ** #: ../xgnokii/xgnokii.c:1702 msgid "Phone information" msgstr "Informazioni sul telefono" #: ../xgnokii/xgnokii.c:1730 msgid "Version:" msgstr "Versione:" #: ../xgnokii/xgnokii.c:1744 msgid "Revision:" msgstr "Revisione:" #: ../xgnokii/xgnokii.c:1758 msgid "IMEI:" msgstr "IMEI:" #: ../xgnokii/xgnokii.c:1772 msgid "Names length:" msgstr "Lunghezza nomi:" #: ../xgnokii/xgnokii.c:1780 msgid "SIM:" msgstr "SIM:" #: ../xgnokii/xgnokii.c:1798 msgid "Phone:" msgstr "Telefono:" #: ../xgnokii/xgnokii.c:1805 msgid "Alarm setting" msgstr "Impostazione sveglia" #: ../xgnokii/xgnokii.c:1812 ../xgnokii/xgnokii.c:1819 #: ../xgnokii/xgnokii_calendar.c:957 ../xgnokii/xgnokii_calendar.c:1089 #: ../xgnokii/xgnokii_calendar.c:1218 ../xgnokii/xgnokii_calendar.c:1350 #: ../xgnokii/xgnokii_calendar.c:1542 msgid "Alarm" msgstr "Sveglia" #. ** SMS notebook ** #: ../xgnokii/xgnokii.c:1842 ../xgnokii/xgnokii_sms.c:1672 msgid "Short Message Service" msgstr "Short Message Service" #: ../xgnokii/xgnokii.c:1875 msgid "Edit" msgstr "Modifica" #. ** Business notebook ** #: ../xgnokii/xgnokii.c:1887 ../xgnokii/xgnokii_sms.c:1541 #: ../xgnokii/xgnokii_sms.c:1716 msgid "Business Card" msgstr "Biglietto da visita" #: ../xgnokii/xgnokii.c:1893 msgid "User" msgstr "Utente" #: ../xgnokii/xgnokii.c:1911 ../xgnokii/xgnokii_calendar.c:1206 #: ../xgnokii/xgnokii_calendar.c:1338 ../xgnokii/xgnokii_contacts.c:1276 msgid "Name:" msgstr "Nome:" #: ../xgnokii/xgnokii.c:1936 msgid "Title:" msgstr "Titolo:" #: ../xgnokii/xgnokii.c:1961 msgid "Company:" msgstr "Ditta:" #: ../xgnokii/xgnokii.c:1986 msgid "Telephone:" msgstr "Telefono:" #: ../xgnokii/xgnokii.c:2012 msgid "Fax:" msgstr "Fax:" #: ../xgnokii/xgnokii.c:2037 msgid "Email:" msgstr "Email:" #: ../xgnokii/xgnokii.c:2062 msgid "Address:" msgstr "Indirizzo:" #. ** Groups notebook ** #: ../xgnokii/xgnokii.c:2085 msgid "Caller groups names" msgstr "Nomi gruppi chiamanti" #: ../xgnokii/xgnokii.c:2092 msgid "Groups" msgstr "Gruppi" #: ../xgnokii/xgnokii.c:2100 #, c-format msgid "Group %d:" msgstr "Gruppo %d:" #. Mail #: ../xgnokii/xgnokii.c:2113 msgid "Mailbox" msgstr "Mailbox" #: ../xgnokii/xgnokii.c:2120 msgid "Mail" msgstr "Mail" #: ../xgnokii/xgnokii.c:2127 msgid "Path to mailbox:" msgstr "Percorso della mailbox:" #: ../xgnokii/xgnokii_calendar.c:131 msgid "Function not implemented!" msgstr "Funzione non implementata." #: ../xgnokii/xgnokii_calendar.c:194 #, c-format msgid "%04d/%02d/%02d" msgstr "%3$02d/%2$02d/%1$04d" #: ../xgnokii/xgnokii_calendar.c:197 ../xgnokii/xgnokii_calendar.c:203 #, c-format msgid "%04d/%02d/%02d %02d:%02d" msgstr "%3$02d/%2$02d/%1$04d %4$d.%5$02d" #: ../xgnokii/xgnokii_calendar.c:211 #, c-format msgid "%02d/%02d %02d:%02d tone %s" msgstr "%2$02d/%1$02d %3$d.%4$02d suoneria %5$s" #: ../xgnokii/xgnokii_calendar.c:216 #, c-format msgid "%04d/%02d/%02d %02d:%02d tone %s" msgstr "%3$02d/%2$02d/%1$04d %4$d.%5$02d suoneria %6$s" #: ../xgnokii/xgnokii_calendar.c:229 msgid "never" msgstr "mai" #: ../xgnokii/xgnokii_calendar.c:232 msgid "daily" msgstr "giornaliero" #: ../xgnokii/xgnokii_calendar.c:235 msgid "weekly" msgstr "settimanale" #: ../xgnokii/xgnokii_calendar.c:238 msgid "every two weeks" msgstr "ogni due settimane" #: ../xgnokii/xgnokii_calendar.c:241 msgid "monthly" msgstr "mensile" #: ../xgnokii/xgnokii_calendar.c:244 msgid "yearly" msgstr "una volta all'anno" #: ../xgnokii/xgnokii_calendar.c:247 #, c-format msgid "every %d minutes" msgstr "ogni %d minuti" #: ../xgnokii/xgnokii_calendar.c:282 msgid "Type: " msgstr "Tipo: " #: ../xgnokii/xgnokii_calendar.c:292 msgid "Start date: " msgstr "Data inizio: " #: ../xgnokii/xgnokii_calendar.c:322 msgid "End date: " msgstr "Data fine: " #: ../xgnokii/xgnokii_calendar.c:333 msgid "Alarm: " msgstr "Sveglia: " #: ../xgnokii/xgnokii_calendar.c:344 msgid "Number: " msgstr "Numero: " #: ../xgnokii/xgnokii_calendar.c:355 msgid "Location: " msgstr "Posizione: " #: ../xgnokii/xgnokii_calendar.c:366 msgid "Recurrence: " msgstr "Ripetizione: " #: ../xgnokii/xgnokii_calendar.c:374 msgid "Text: " msgstr "Testo: " #: ../xgnokii/xgnokii_calendar.c:504 #, c-format msgid "" "Error saving calendar note\n" "%s" msgstr "" "Errore nel salvare la nota di calendario\n" "%s" #: ../xgnokii/xgnokii_calendar.c:632 #, c-format msgid "%d-%02d-%02d" msgstr "%3$d/%2$02d/%1$04d" #: ../xgnokii/xgnokii_calendar.c:641 #, c-format msgid "%d-%02d-%02d %02d:%02d" msgstr "%3$d/%2$02d/%1$04d %4$d.%5$02d" #: ../xgnokii/xgnokii_calendar.c:681 ../xgnokii/xgnokii_calendar.c:727 msgid "Choose date" msgstr "Scegliere una data" #: ../xgnokii/xgnokii_calendar.c:767 msgid "Alarm time:" msgstr "Ora sveglia:" #: ../xgnokii/xgnokii_calendar.c:837 msgid "Every Day" msgstr "Ogni giorno" #: ../xgnokii/xgnokii_calendar.c:843 msgid "Every Week" msgstr "Ogni settimana" #: ../xgnokii/xgnokii_calendar.c:849 msgid "Every 2 Weeks" msgstr "Ogni due settimane" #: ../xgnokii/xgnokii_calendar.c:855 msgid "Every Year" msgstr "Ogni anno" #. #. gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL, _("Edit note"), NULL, #. NewPixmap(Edit_xpm, GUI_CalendarWindow->window, #. &GUI_CalendarWindow->style->bg[GTK_STATE_NORMAL]), #. (GtkSignalFunc) NULL, NULL); #. #: ../xgnokii/xgnokii_calendar.c:874 ../xgnokii/xgnokii_calendar.c:1610 msgid "Add reminder" msgstr "Aggiungi promemoria" #: ../xgnokii/xgnokii_calendar.c:910 ../xgnokii/xgnokii_calendar.c:1029 #: ../xgnokii/xgnokii_calendar.c:1170 ../xgnokii/xgnokii_calendar.c:1303 msgid "Date:" msgstr "Data:" #: ../xgnokii/xgnokii_calendar.c:945 msgid "Subject:" msgstr "Oggetto:" #: ../xgnokii/xgnokii_calendar.c:994 msgid "Add Call" msgstr "Aggiungi chiamata" #: ../xgnokii/xgnokii_calendar.c:1064 ../xgnokii/xgnokii_contacts.c:1289 #: ../xgnokii/xgnokii_contacts.c:1827 msgid "Number:" msgstr "Numero:" #: ../xgnokii/xgnokii_calendar.c:1077 msgid "Text:" msgstr "Testo:" #: ../xgnokii/xgnokii_calendar.c:1109 ../xgnokii/xgnokii_calendar.c:1241 msgid "Repeat:" msgstr "Ripeti:" #: ../xgnokii/xgnokii_calendar.c:1134 ../xgnokii/xgnokii_calendar.c:1618 msgid "Add meeting" msgstr "Aggiungi riunione" #: ../xgnokii/xgnokii_calendar.c:1267 ../xgnokii/xgnokii_calendar.c:1622 msgid "Add birthday" msgstr "Aggiungi compleanno" #: ../xgnokii/xgnokii_calendar.c:1428 msgid "Delete calendar note" msgstr "Elimina nota di calendario" #: ../xgnokii/xgnokii_calendar.c:1460 msgid "Do you want to delete selected note(s)?" msgstr "Eliminare la nota/le note selezionate?" #: ../xgnokii/xgnokii_calendar.c:1496 ../xgnokii/xgnokii_contacts.c:3081 #: ../xgnokii/xgnokii_dtmf.c:219 ../xgnokii/xgnokii_logos.c:1474 #: ../xgnokii/xgnokii_netmon.c:258 ../xgnokii/xgnokii_sms.c:1245 #: ../xgnokii/xgnokii_sms.c:1633 ../xgnokii/xgnokii_speed.c:516 #: ../xgnokii/xgnokii_xkeyb.c:235 ../xgnokii/xgnokii_xring.c:826 msgid "/_File" msgstr "/_File" #: ../xgnokii/xgnokii_calendar.c:1497 ../xgnokii/xgnokii_contacts.c:3082 #: ../xgnokii/xgnokii_speed.c:517 msgid "/File/_Read from phone" msgstr "/File/_Leggi dal telefono" #: ../xgnokii/xgnokii_calendar.c:1498 ../xgnokii/xgnokii_contacts.c:3083 #: ../xgnokii/xgnokii_speed.c:518 msgid "/File/_Save to phone" msgstr "/File/_Salva sul telefono" #: ../xgnokii/xgnokii_calendar.c:1499 ../xgnokii/xgnokii_contacts.c:3084 #: ../xgnokii/xgnokii_dtmf.c:222 ../xgnokii/xgnokii_logos.c:1478 #: ../xgnokii/xgnokii_sms.c:1248 ../xgnokii/xgnokii_sms.c:1637 #: ../xgnokii/xgnokii_speed.c:519 msgid "/File/Sep1" msgstr "/File/Sep1" #: ../xgnokii/xgnokii_calendar.c:1500 msgid "/File/Send via S_MS" msgstr "/File/Invia come S_MS" #: ../xgnokii/xgnokii_calendar.c:1501 ../xgnokii/xgnokii_contacts.c:3087 #: ../xgnokii/xgnokii_logos.c:1482 ../xgnokii/xgnokii_sms.c:1251 #: ../xgnokii/xgnokii_speed.c:522 msgid "/File/Sep2" msgstr "/File/Sep2" #: ../xgnokii/xgnokii_calendar.c:1502 ../xgnokii/xgnokii_contacts.c:3085 #: ../xgnokii/xgnokii_speed.c:520 msgid "/File/_Import from file" msgstr "/File/_Importa da file" #: ../xgnokii/xgnokii_calendar.c:1503 ../xgnokii/xgnokii_contacts.c:3086 #: ../xgnokii/xgnokii_speed.c:521 msgid "/File/_Export to file" msgstr "/File/_Esporta su file" #: ../xgnokii/xgnokii_calendar.c:1504 msgid "/File/Sep3" msgstr "/File/Sep3" #: ../xgnokii/xgnokii_calendar.c:1505 ../xgnokii/xgnokii_contacts.c:3088 #: ../xgnokii/xgnokii_dtmf.c:223 ../xgnokii/xgnokii_logos.c:1483 #: ../xgnokii/xgnokii_netmon.c:259 ../xgnokii/xgnokii_sms.c:1252 #: ../xgnokii/xgnokii_sms.c:1638 ../xgnokii/xgnokii_speed.c:523 #: ../xgnokii/xgnokii_xkeyb.c:236 ../xgnokii/xgnokii_xring.c:836 msgid "/File/_Close" msgstr "/File/_Chiudi" #: ../xgnokii/xgnokii_calendar.c:1506 ../xgnokii/xgnokii_contacts.c:3089 #: ../xgnokii/xgnokii_logos.c:1484 ../xgnokii/xgnokii_speed.c:524 #: ../xgnokii/xgnokii_xring.c:837 msgid "/_Edit" msgstr "/_Modifica" #: ../xgnokii/xgnokii_calendar.c:1507 msgid "/Edit/Add _reminder" msgstr "/Modifica/Aggiungi p_romemoria" #: ../xgnokii/xgnokii_calendar.c:1508 msgid "/Edit/Add _call" msgstr "/Modifica/Aggiungi _chiamata" #: ../xgnokii/xgnokii_calendar.c:1509 msgid "/Edit/Add _meeting" msgstr "/Modifica/Aggiungi _riunione" #: ../xgnokii/xgnokii_calendar.c:1510 msgid "/Edit/Add _birthday" msgstr "/Modifica/Aggiungi c_ompleanno" #. #. menu_items[15].path = _("/Edit/_Edit"); #. #: ../xgnokii/xgnokii_calendar.c:1514 ../xgnokii/xgnokii_contacts.c:3093 msgid "/Edit/_Delete" msgstr "/Modifica/_Elimina" #: ../xgnokii/xgnokii_calendar.c:1515 ../xgnokii/xgnokii_contacts.c:3096 #: ../xgnokii/xgnokii_logos.c:1492 msgid "/Edit/Sep4" msgstr "/Modifica/Sep4" #: ../xgnokii/xgnokii_calendar.c:1516 ../xgnokii/xgnokii_contacts.c:3100 msgid "/Edit/Select _all" msgstr "/Modifica/Selezion_a tutti" #: ../xgnokii/xgnokii_calendar.c:1517 ../xgnokii/xgnokii_contacts.c:3103 #: ../xgnokii/xgnokii_dtmf.c:224 ../xgnokii/xgnokii_netmon.c:263 #: ../xgnokii/xgnokii_sms.c:1253 ../xgnokii/xgnokii_sms.c:1647 #: ../xgnokii/xgnokii_speed.c:526 ../xgnokii/xgnokii_xkeyb.c:237 msgid "/_Help" msgstr "/_Aiuto" #: ../xgnokii/xgnokii_calendar.c:1518 ../xgnokii/xgnokii_contacts.c:3104 #: ../xgnokii/xgnokii_dtmf.c:225 ../xgnokii/xgnokii_netmon.c:264 #: ../xgnokii/xgnokii_sms.c:1254 ../xgnokii/xgnokii_sms.c:1648 #: ../xgnokii/xgnokii_speed.c:527 ../xgnokii/xgnokii_xkeyb.c:238 msgid "/Help/_About" msgstr "/Aiuto/_Informazioni su" #: ../xgnokii/xgnokii_calendar.c:1535 msgid "#" msgstr "n°" #: ../xgnokii/xgnokii_calendar.c:1537 msgid "Start date" msgstr "Data inizio" #: ../xgnokii/xgnokii_calendar.c:1538 msgid "End date" msgstr "Data fine" #: ../xgnokii/xgnokii_calendar.c:1543 msgid "Recurrence" msgstr "Ripetizione" #: ../xgnokii/xgnokii_calendar.c:1576 ../xgnokii/xgnokii_contacts.c:3157 #: ../xgnokii/xgnokii_speed.c:579 msgid "Read from phone" msgstr "Leggi dal telefono" #: ../xgnokii/xgnokii_calendar.c:1580 ../xgnokii/xgnokii_contacts.c:3161 #: ../xgnokii/xgnokii_speed.c:583 msgid "Save to phone" msgstr "Salva sul telefono" #: ../xgnokii/xgnokii_calendar.c:1587 msgid "Send via SMS" msgstr "Invia come SMS" #: ../xgnokii/xgnokii_calendar.c:1594 ../xgnokii/xgnokii_contacts.c:2753 #: ../xgnokii/xgnokii_contacts.c:3168 ../xgnokii/xgnokii_logos.c:1572 #: ../xgnokii/xgnokii_speed.c:395 ../xgnokii/xgnokii_speed.c:590 #: ../xgnokii/xgnokii_xring.c:894 msgid "Import from file" msgstr "Importa da file" #: ../xgnokii/xgnokii_calendar.c:1598 ../xgnokii/xgnokii_contacts.c:2671 #: ../xgnokii/xgnokii_contacts.c:3172 ../xgnokii/xgnokii_logos.c:1576 #: ../xgnokii/xgnokii_speed.c:474 ../xgnokii/xgnokii_speed.c:594 #: ../xgnokii/xgnokii_xring.c:898 msgid "Export to file" msgstr "Esporta su file" #: ../xgnokii/xgnokii_calendar.c:1614 msgid "Add call" msgstr "Aggiungi chiamata" #: ../xgnokii/xgnokii_calendar.c:1626 msgid "Delete note" msgstr "Elimina voci" #: ../xgnokii/xgnokii_calendar.c:1691 ../xgnokii/xgnokii_contacts.c:2290 #: ../xgnokii/xgnokii_contacts.c:2316 ../xgnokii/xgnokii_contacts.c:2979 #: ../xgnokii/xgnokii_contacts.c:3225 ../xgnokii/xgnokii_sms.c:1799 #: ../xgnokii/xgnokii_speed.c:190 ../xgnokii/xgnokii_speed.c:196 #: ../xgnokii/xgnokii_speed.c:256 ../xgnokii/xgnokii_speed.c:340 #: ../xgnokii/xgnokii_speed.c:624 #, c-format msgid "Error: %s: line %d: Can't allocate memory!\n" msgstr "Errore: %s: linea %d: impossibile allocare memoria.\n" #: ../xgnokii/xgnokii_calendar.c:1720 ../xgnokii/xgnokii_sms.c:1833 msgid "couldn't allocate colour" msgstr "impossibile allocare il colore" #: ../xgnokii/xgnokii_cfg.c:117 #, c-format msgid "WARNING: Can't allocate memory for config reading!\n" msgstr "" "ATTENZIONE: impossibile allocare memoria per leggere la configurazione.\n" #: ../xgnokii/xgnokii_cfg.c:211 #, c-format msgid "ERROR: Can't open file %s for writing!\n" msgstr "ERRORE: impossibile scrivere sul file %s\n" #: ../xgnokii/xgnokii_cfg.c:221 #, c-format msgid "ERROR: Can't allocate memory for config writing!\n" msgstr "ERRORE: impossibile allocare memoria per scrivere la configurazione.\n" #: ../xgnokii/xgnokii_cfg.c:226 #, c-format msgid "ERROR: Can't write config file!\n" msgstr "ERRORE: Impossibile scrivere il file di configurazione.\n" #: ../xgnokii/xgnokii_common.c:73 msgid "Error" msgstr "Errore" #: ../xgnokii/xgnokii_common.c:110 msgid "Info" msgstr "Info" #: ../xgnokii/xgnokii_common.c:146 msgid "Yes" msgstr "Sì" #: ../xgnokii/xgnokii_common.c:155 msgid "No" msgstr "No" #: ../xgnokii/xgnokii_common.c:236 #, c-format msgid "Can't exec %s\n" msgstr "Impossibile eseguire %s\n" #: ../xgnokii/xgnokii_contacts.c:143 #, c-format msgid "SIM: %d/%d%c Phone: %d/%d%c" msgstr "SIM: %d/%d%c Telefono: %d/%d%c" #: ../xgnokii/xgnokii_contacts.c:317 ../xgnokii/xgnokii_contacts.c:337 msgid "Can't change memory type!" msgstr "Impossibile cambiare il tipo di memoria." #: ../xgnokii/xgnokii_contacts.c:383 #, c-format msgid "" "Phonebook name will be truncated to\n" "%.*s" msgstr "" "Il nome nella rubrica sarà ridotto a\n" "%.*s" #: ../xgnokii/xgnokii_contacts.c:611 msgid "Can't find pattern!" msgstr "Modello non trovato." #: ../xgnokii/xgnokii_contacts.c:707 ../xgnokii/xgnokii_contacts.c:794 #: ../xgnokii/xgnokii_contacts.c:939 ../xgnokii/xgnokii_contacts.c:981 #: ../xgnokii/xgnokii_contacts.c:1190 msgid "Mobile" msgstr "Cellulare" #: ../xgnokii/xgnokii_contacts.c:737 ../xgnokii/xgnokii_contacts.c:809 #: ../xgnokii/xgnokii_contacts.c:944 ../xgnokii/xgnokii_contacts.c:986 #: ../xgnokii/xgnokii_contacts.c:1216 msgid "Postal" msgstr "Postale" #: ../xgnokii/xgnokii_contacts.c:869 msgid "Edit subentries" msgstr "Modifica sottoelementi" #: ../xgnokii/xgnokii_contacts.c:894 msgid "Delete" msgstr "Elimina" #: ../xgnokii/xgnokii_contacts.c:913 msgid "Number/Text:" msgstr "Numero/Testo:" #: ../xgnokii/xgnokii_contacts.c:925 msgid "Type:" msgstr "Tipo:" #: ../xgnokii/xgnokii_contacts.c:960 ../xgnokii/xgnokii_contacts.c:1356 #: ../xgnokii/xgnokii_contacts.c:3187 ../xgnokii/xgnokii_speed.c:601 msgid "Edit entry" msgstr "Modifica contatto" #: ../xgnokii/xgnokii_contacts.c:1111 msgid "Numbers" msgstr "Numeri" #: ../xgnokii/xgnokii_contacts.c:1131 msgid "New" msgstr "Nuovo" #: ../xgnokii/xgnokii_contacts.c:1315 msgid "Memory:" msgstr "Memoria:" #: ../xgnokii/xgnokii_contacts.c:1319 msgid "phone" msgstr "telefono" #: ../xgnokii/xgnokii_contacts.c:1336 msgid "Caller group:" msgstr "Gruppo chiamanti:" #: ../xgnokii/xgnokii_contacts.c:1399 msgid "Delete entries" msgstr "Elimina contatti" #: ../xgnokii/xgnokii_contacts.c:1431 msgid "Do you want to delete selected entries?" msgstr "Eliminare i contatti selezionati?" #: ../xgnokii/xgnokii_contacts.c:1449 ../xgnokii/xgnokii_contacts.c:3179 msgid "New entry" msgstr "Nuovo contatto" #: ../xgnokii/xgnokii_contacts.c:1493 ../xgnokii/xgnokii_contacts.c:3183 msgid "Duplicate entry" msgstr "Duplica il contatto" #: ../xgnokii/xgnokii_contacts.c:1562 ../xgnokii/xgnokii_contacts.c:1570 #: ../xgnokii/xgnokii_contacts.c:1598 msgid "Can't find free memory." msgstr "Impossibile trovare posizioni di memoria libere." #: ../xgnokii/xgnokii_contacts.c:1635 msgid "Changing memory type" msgstr "Cambiare il tipo di memoria" #: ../xgnokii/xgnokii_contacts.c:1642 msgid "Continue" msgstr "Continua" #: ../xgnokii/xgnokii_contacts.c:1664 msgid "" "If you change from phone memory to SIM memory\n" "some entries may be truncated." msgstr "" "Copiando dalla memoria del telefono alla SIM alcune voci potrebbero essere " "tagliate." #: ../xgnokii/xgnokii_contacts.c:1682 ../xgnokii/xgnokii_contacts.c:1688 msgid "Find" msgstr "Cerca" #: ../xgnokii/xgnokii_contacts.c:1714 msgid "Pattern:" msgstr "Modello:" #: ../xgnokii/xgnokii_contacts.c:1800 msgid "Dial pad" msgstr "Tastiera" #: ../xgnokii/xgnokii_contacts.c:1806 msgid "Dial" msgstr "Chiama" #: ../xgnokii/xgnokii_contacts.c:2059 msgid "Phone memory..." msgstr "Memoria telefono..." #: ../xgnokii/xgnokii_contacts.c:2070 msgid "SIM memory..." msgstr "Memoria SIM..." #: ../xgnokii/xgnokii_contacts.c:2135 msgid "Saving entries" msgstr "Salvataggio contatti" #: ../xgnokii/xgnokii_contacts.c:2150 ../xgnokii/xgnokii_contacts.c:2170 #, c-format msgid "%s: line %d: Can't write %s memory entry number %d! Error: %s\n" msgstr "" "%1$s: linea %2$d: impossibile scrivere nella posizione %4$d della memoria " "%3$s. Errore: %5$s\n" #: ../xgnokii/xgnokii_contacts.c:2192 msgid "Save changes?" msgstr "Salvare i cambiamenti?" #: ../xgnokii/xgnokii_contacts.c:2206 msgid "Don't save" msgstr "Non salvare" #: ../xgnokii/xgnokii_contacts.c:2228 msgid "" "You have made changes in your\n" "contacts directory.\n" "\n" "\n" "Do you want to save these changes into your phone?\n" msgstr "" "Sono state effettuate modifiche\n" "nella rubrica.\n" "\n" "\n" "Salvare queste modifiche nel telefono?\n" #: ../xgnokii/xgnokii_contacts.c:2420 msgid "Getting entries" msgstr "Caricamento dati" #: ../xgnokii/xgnokii_contacts.c:2654 ../xgnokii/xgnokii_dtmf.c:166 #: ../xgnokii/xgnokii_logos.c:1350 ../xgnokii/xgnokii_speed.c:457 msgid "Overwrite file?" msgstr "Sovrascrivere il file?" #: ../xgnokii/xgnokii_contacts.c:2655 ../xgnokii/xgnokii_dtmf.c:167 #: ../xgnokii/xgnokii_logos.c:1351 ../xgnokii/xgnokii_speed.c:458 #, c-format msgid "" "File %s already exists.\n" "Overwrite?" msgstr "" "Il file %s esiste.\n" "Sovrascrivere?" #: ../xgnokii/xgnokii_contacts.c:2936 ../xgnokii/xgnokii_contacts.c:3120 msgid "Memory" msgstr "Memoria" #: ../xgnokii/xgnokii_contacts.c:2946 ../xgnokii/xgnokii_sms.c:1358 msgid "Select contacts" msgstr "Selezionare i nominativi" #: ../xgnokii/xgnokii_contacts.c:3090 msgid "/Edit/_New" msgstr "/Modifica/_Nuovo" #: ../xgnokii/xgnokii_contacts.c:3091 msgid "/Edit/D_uplicate" msgstr "/Modifica/_Duplica" #: ../xgnokii/xgnokii_contacts.c:3092 ../xgnokii/xgnokii_speed.c:525 msgid "/Edit/_Edit" msgstr "/Modifica/_Modifica" #: ../xgnokii/xgnokii_contacts.c:3094 ../xgnokii/xgnokii_logos.c:1487 msgid "/Edit/Sep3" msgstr "/Modifica/Sep3" #: ../xgnokii/xgnokii_contacts.c:3095 msgid "/Edit/_Change memory type" msgstr "/Modifica/_Cambia tipo di memoria" #: ../xgnokii/xgnokii_contacts.c:3097 msgid "/Edit/_Find" msgstr "/Modifica/Tro_va" #: ../xgnokii/xgnokii_contacts.c:3098 msgid "/Edit/Find ne_xt" msgstr "/Modifica/Trova s_uccessivo" #: ../xgnokii/xgnokii_contacts.c:3099 msgid "/Edit/Sep5" msgstr "/Modifica/Sep5" #: ../xgnokii/xgnokii_contacts.c:3101 msgid "/_Dial" msgstr "/_Chiamata" #: ../xgnokii/xgnokii_contacts.c:3102 msgid "/Dial/Dial _voice" msgstr "/Chiamata/Chiamata _vocale" #: ../xgnokii/xgnokii_contacts.c:3191 msgid "Delete entry" msgstr "Elimina contatto" #: ../xgnokii/xgnokii_contacts.c:3198 msgid "Dial voice" msgstr "Chiamata vocale" #: ../xgnokii/xgnokii_data.c:52 #, c-format msgid "" "Data calls are currently\n" "Disabled\n" " " msgstr "" "Le chiamate dati sono\n" "disabilitate\n" " " #: ../xgnokii/xgnokii_data.c:54 #, c-format msgid "" "Data calls are currently\n" "Enabled\n" " " msgstr "" "Le chiamate dati sono\n" "abilitate\n" " " #: ../xgnokii/xgnokii_data.c:102 msgid "Virtual Modem" msgstr "Modem Virtuale" #: ../xgnokii/xgnokii.desktop.in.h:1 msgid "Manage your mobile phone" msgstr "Gestisce il proprio cellulare" #: ../xgnokii/xgnokii.desktop.in.h:2 msgid "Mobile Phone Suite" msgstr "Suite per telefoni cellulari" #: ../xgnokii/xgnokii.desktop.in.h:3 msgid "Xgnokii" msgstr "Xgnokii" #: ../xgnokii/xgnokii_dtmf.c:100 ../xgnokii/xgnokii_speed.c:351 #: ../xgnokii/xgnokii_speed.c:376 #, c-format msgid "Error reading file!" msgstr "Errore di lettura del file." #: ../xgnokii/xgnokii_dtmf.c:116 msgid "Load" msgstr "Carica" #: ../xgnokii/xgnokii_dtmf.c:220 ../xgnokii/xgnokii_logos.c:1475 #: ../xgnokii/xgnokii_xring.c:827 msgid "/File/_Open" msgstr "/File/_Apri" #: ../xgnokii/xgnokii_dtmf.c:221 ../xgnokii/xgnokii_logos.c:1476 #: ../xgnokii/xgnokii_sms.c:1247 ../xgnokii/xgnokii_sms.c:1634 #: ../xgnokii/xgnokii_xring.c:828 msgid "/File/_Save" msgstr "/File/_Salva" # questa è la tastiera per inviare toni DTMF #: ../xgnokii/xgnokii_dtmf.c:247 msgid "Dial Tone" msgstr "Invia toni" #: ../xgnokii/xgnokii_dtmf.c:312 msgid "Pause" msgstr "Pausa" #: ../xgnokii/xgnokii_dtmf.c:317 msgid "Wait" msgstr "Attesa" #: ../xgnokii/xgnokii_logos.c:972 #, c-format msgid "" "Error getting network info\n" "%s" msgstr "" "Errore nel cercare informazioni sulla rete\n" "%s" #: ../xgnokii/xgnokii_logos.c:1018 #, c-format msgid "" "Error getting bitmap\n" "%s" msgstr "" "Errore nel caricare l'immagine bitmap\n" "%s" #: ../xgnokii/xgnokii_logos.c:1068 #, c-format msgid "" "Error setting bitmap\n" "%s" msgstr "" "Errore nell'impostare l'immagine bitmap\n" "%s" #: ../xgnokii/xgnokii_logos.c:1323 ../xgnokii/xgnokii_xring.c:650 #: ../xgnokii/xgnokii_xring.c:693 #, c-format msgid "" "Error writing file\n" "%s" msgstr "" "Errore nello scrivere il file\n" "%s" #: ../xgnokii/xgnokii_logos.c:1382 ../xgnokii/xgnokii_xring.c:613 #, c-format msgid "" "Error reading file\n" "%s" msgstr "" "Errore nel leggere il file\n" "%s" #: ../xgnokii/xgnokii_logos.c:1409 msgid "Save logo as ..." msgstr "Salva il logo come..." #: ../xgnokii/xgnokii_logos.c:1434 msgid "Open logo..." msgstr "Apri logo..." #: ../xgnokii/xgnokii_logos.c:1477 ../xgnokii/xgnokii_xring.c:829 msgid "/File/Save _as ..." msgstr "/File/Salv_a come..." #: ../xgnokii/xgnokii_logos.c:1479 msgid "/File/_Get operator" msgstr "/File/_Seleziona operatore" #: ../xgnokii/xgnokii_logos.c:1480 msgid "/File/Get _logo" msgstr "/File/_Leggi dal telefono" #: ../xgnokii/xgnokii_logos.c:1481 msgid "/File/Se_t logo" msgstr "/File/_Salva sul telefono" #: ../xgnokii/xgnokii_logos.c:1485 ../xgnokii/xgnokii_xring.c:838 msgid "/Edit/_Clear" msgstr "/Modifica/_Cancella tutto" #: ../xgnokii/xgnokii_logos.c:1486 msgid "/Edit/_Invert" msgstr "/Modifica/_Inverti" #: ../xgnokii/xgnokii_logos.c:1488 msgid "/Edit/_Up logo" msgstr "/Modifica/Logo s_u" #: ../xgnokii/xgnokii_logos.c:1489 msgid "/Edit/_Down logo" msgstr "/Modifica/Logo _giù" #: ../xgnokii/xgnokii_logos.c:1490 msgid "/Edit/_Left logo" msgstr "/Modifica/Logo a _sinistra" #: ../xgnokii/xgnokii_logos.c:1491 msgid "/Edit/_Right logo" msgstr "/Modifica/Logo a dest_ra" #: ../xgnokii/xgnokii_logos.c:1493 msgid "/Edit/Flip _horizontal" msgstr "/Modifica/Ribalta in _orizzontale" #: ../xgnokii/xgnokii_logos.c:1494 msgid "/Edit/Flip _vertical" msgstr "/Modifica/Ribalta in _verticale" #: ../xgnokii/xgnokii_logos.c:1553 msgid "Clear logo" msgstr "Cancella il logo" #: ../xgnokii/xgnokii_logos.c:1560 msgid "Get logo" msgstr "Leggi dal telefono" #: ../xgnokii/xgnokii_logos.c:1565 msgid "Set logo" msgstr "Salva sul telefono" #: ../xgnokii/xgnokii_logos.c:1585 msgid "Startup logo" msgstr "Logo in accensione" #: ../xgnokii/xgnokii_logos.c:1594 msgid "Operator logo" msgstr "Logo operatore" #: ../xgnokii/xgnokii_logos.c:1604 msgid "Caller logo" msgstr "Logo chiamante" #: ../xgnokii/xgnokii_logos.c:1731 msgid "Brush tool" msgstr "Strumento matita" #: ../xgnokii/xgnokii_logos.c:1742 msgid "Line tool" msgstr "Strumento linea" #: ../xgnokii/xgnokii_logos.c:1752 msgid "Rectangle tool" msgstr "Strumento rettangolo" #: ../xgnokii/xgnokii_logos.c:1762 msgid "Filled rectangle tool" msgstr "Strumento rettangolo pieno" #: ../xgnokii/xgnokii_logos.c:1771 msgid "Invert logo" msgstr "Inverti logo" #: ../xgnokii/xgnokii_logos.c:1776 msgid "Horizontal flip" msgstr "Ribaltamento orizzontale" #: ../xgnokii/xgnokii_logos.c:1781 msgid "Vertical flip" msgstr "Ribaltamento verticale" #: ../xgnokii/xgnokii_logos.c:1836 msgid "Load preview pixmap error, feature disabled." msgstr "" "Errore nel caricamento dell'immagine per l'anteprima, l'anteprima ora è " "disabilitata." #: ../xgnokii/xgnokii_lowlevel.c:210 #, c-format msgid "Failed to open the phone. Quitting.\n" msgstr "Impossibile aprire il telefono. Uscita.\n" #. We have some misconfiguration: phone doesn't handle #. neither folders nor SIM #: ../xgnokii/xgnokii_lowlevel.c:403 #, c-format msgid "" "Misconfiguration detected: phone handles neither folders nor sim.\n" "Contact gnokii developers to fix the issue.\n" msgstr "" "Errore di configurazione: il telefono non gestisce né le cartelle né la " "SIM.\n" "Contattare gli sviluppatori di gnokii per risolvere questo problema.\n" #: ../xgnokii/xgnokii_lowlevel.c:481 #, c-format msgid "%s: line %d: Can't get memory entry number %d from memory %d! %d\n" msgstr "" "%s: linea %d: impossibile leggere la posizione %d dalla memoria %d! %d\n" #: ../xgnokii/xgnokii_lowlevel.c:1249 msgid "Connecting..." msgstr "Connessione..." #: ../xgnokii/xgnokii_lowlevel.c:1260 msgid "" "It has been reported that your phone is known to be broken by xgnokii.\n" "Exiting application to avoid breakage. If you want to take a risk and\n" "run xgnokii anyway, set:\n" "\n" "\tallow_breakage = 1\n" "\n" "in xgnokii section in your config file.\n" "See http://thread.gmane.org/gmane.linux.drivers.gnokii/3195 for details.\n" msgstr "" "È stato segnalato che il tuo telefono viene rotto da xgnokii\n" "L'applicazione sarà terminata per evitare la rottura. Se si desidera\n" "correre il rischio e lanciare xgnokii ugualmente, impostare:\n" "\n" "\tallow_breakage = 1\n" "\n" "nella sezione xgnokii del file di configurazione.\n" "Vedere http://thread.gmane.org/gmane.linux.drivers.gnokii/3195 per\n" "ulteriori dettagli (in Inglese).\n" #: ../xgnokii/xgnokii_lowlevel.c:1397 msgid "Refreshing SMSes..." msgstr "Aggiornamento SMS..." #: ../xgnokii/xgnokii_netmon.c:260 msgid "/_Tools" msgstr "/S_trumenti" #: ../xgnokii/xgnokii_netmon.c:261 msgid "/Tools/Net monitor o_n" msgstr "/Strumenti/_Attiva Net monitor" #: ../xgnokii/xgnokii_netmon.c:262 msgid "/Tools/Net monitor o_ff" msgstr "/Strumenti/_Disattiva Net monitor" #: ../xgnokii/xgnokii_netmon.c:354 ../xgnokii/xgnokii_netmon.c:357 msgid "Active cell" msgstr "Active cell" #: ../xgnokii/xgnokii_netmon.c:360 msgid "NCELL list I" msgstr "NCELL list I" #: ../xgnokii/xgnokii_netmon.c:363 msgid "NCELL list II" msgstr "NCELL list II" #: ../xgnokii/xgnokii_netmon.c:366 msgid "NCELL list III" msgstr "NCELL list III" #: ../xgnokii/xgnokii_netmon.c:369 msgid "Preferred/Denied networks" msgstr "Preferred/Denied networks" #: ../xgnokii/xgnokii_netmon.c:372 msgid "System information bits" msgstr "System information bits" #: ../xgnokii/xgnokii_netmon.c:375 msgid "TMSI, Paging, PLU" msgstr "TMSI, Paging, PLU" #: ../xgnokii/xgnokii_netmon.c:378 msgid "Cells info" msgstr "Cells info" #: ../xgnokii/xgnokii_netmon.c:381 msgid "DTX, Cipher, Hopping" msgstr "DTX, Cipher, Hopping" #: ../xgnokii/xgnokii_netmon.c:392 msgid "Uplink DTX" msgstr "Uplink DTX" #: ../xgnokii/xgnokii_netmon.c:395 msgid "BTS TEST" msgstr "BTS TEST" #: ../xgnokii/xgnokii_netmon.c:398 msgid "CELL BARR-Flag" msgstr "CELL BARR-Flag" #: ../xgnokii/xgnokii_netmon.c:401 msgid "Accumulator, Charge status" msgstr "Accumulator, Charge status" #: ../xgnokii/xgnokii_netmon.c:404 msgid "?Constant voltage charging display" msgstr "?Constant voltage charging display" #: ../xgnokii/xgnokii_netmon.c:407 msgid "?Battery full detection" msgstr "?Battery full detection" #: ../xgnokii/xgnokii_netmon.c:410 msgid "Accumulator" msgstr "Accumulator" #: ../xgnokii/xgnokii_netmon.c:413 msgid "SW-Resets" msgstr "SW-Resets" #: ../xgnokii/xgnokii_netmon.c:416 msgid "Reset-Counter" msgstr "Reset-Counter" #: ../xgnokii/xgnokii_netmon.c:420 msgid "Cause codes for last connection abortion" msgstr "Cause codes for last connection abortion" #: ../xgnokii/xgnokii_netmon.c:431 msgid "Reset handover counters" msgstr "Reset handover counters" #: ../xgnokii/xgnokii_netmon.c:434 msgid "Handover Counter" msgstr "Handover Counter" #: ../xgnokii/xgnokii_netmon.c:437 msgid "Handover Counter (Dual)" msgstr "Handover Counter (Dual)" #: ../xgnokii/xgnokii_netmon.c:440 msgid "L2-Timeouts" msgstr "L2-Timeouts" #: ../xgnokii/xgnokii_netmon.c:443 msgid "SIM" msgstr "SIM" #: ../xgnokii/xgnokii_netmon.c:446 msgid "?Block display 1" msgstr "?Block display 1" #: ../xgnokii/xgnokii_netmon.c:452 msgid "Memory status before reset" msgstr "Memory status before reset" #: ../xgnokii/xgnokii_netmon.c:455 msgid "Reset Counters" msgstr "Azzera contatori" #: ../xgnokii/xgnokii_netmon.c:459 msgid "Counter for PLMN Search and Cell reselection (Singleband)" msgstr "Counter for PLMN Search and Cell reselection (Singleband)" #: ../xgnokii/xgnokii_netmon.c:470 msgid "Neighbourhood measurement" msgstr "Neighbourhood measurement" #: ../xgnokii/xgnokii_netmon.c:473 msgid "Calls" msgstr "Calls" #: ../xgnokii/xgnokii_netmon.c:476 msgid "Temporary counters of DSP" msgstr "Temporary counters of DSP" #: ../xgnokii/xgnokii_netmon.c:480 msgid "Control of task information displays" msgstr "Control of task information displays" #: ../xgnokii/xgnokii_netmon.c:483 msgid "Information about task numbers 0-7" msgstr "Informazioni sui task 0-7" #: ../xgnokii/xgnokii_netmon.c:487 msgid "Information about task numbers 8-15" msgstr "Informazioni sui task 8-15" #: ../xgnokii/xgnokii_netmon.c:491 msgid "Information about task numbers 16-23" msgstr "Informazioni sui task 16-23" #: ../xgnokii/xgnokii_netmon.c:494 msgid "Information about OS_SYSTEM_STACK" msgstr "Informazioni su OS_SYSTEM_STACK" #: ../xgnokii/xgnokii_netmon.c:498 msgid "Information about current MCU and DSP software versions" msgstr "Informazioni sulla versione del software di MCU e DSP" #: ../xgnokii/xgnokii_netmon.c:501 msgid "Hardware version" msgstr "Versione hardware" #: ../xgnokii/xgnokii_netmon.c:520 msgid "Chan" msgstr "Chan" #: ../xgnokii/xgnokii_netmon.c:521 msgid "RxLv" msgstr "RxLv" #: ../xgnokii/xgnokii_netmon.c:522 msgid "C1" msgstr "C1" #: ../xgnokii/xgnokii_netmon.c:523 msgid "C2" msgstr "C2" #: ../xgnokii/xgnokii_netmon.c:524 msgid "ACT" msgstr "ACT" #: ../xgnokii/xgnokii_netmon.c:525 msgid "NC2" msgstr "NC2" #: ../xgnokii/xgnokii_netmon.c:526 msgid "NC3" msgstr "NC3" #: ../xgnokii/xgnokii_netmon.c:527 msgid "NC4" msgstr "NC4" #: ../xgnokii/xgnokii_netmon.c:528 msgid "NC5" msgstr "NC5" #: ../xgnokii/xgnokii_netmon.c:529 msgid "NC6" msgstr "NC6" #: ../xgnokii/xgnokii_netmon.c:530 msgid "NC7" msgstr "NC7" #: ../xgnokii/xgnokii_netmon.c:560 msgid "Page:" msgstr "Pagina:" #: ../xgnokii/xgnokii_sms.c:250 ../xgnokii/xgnokii_sms.c:330 #: ../xgnokii/xgnokii_sms.c:444 msgid "read" msgstr "letto" #: ../xgnokii/xgnokii_sms.c:253 ../xgnokii/xgnokii_sms.c:333 #: ../xgnokii/xgnokii_sms.c:430 msgid "unread" msgstr "non letto" #: ../xgnokii/xgnokii_sms.c:256 ../xgnokii/xgnokii_sms.c:336 msgid "sent" msgstr "inviato" #: ../xgnokii/xgnokii_sms.c:259 ../xgnokii/xgnokii_sms.c:339 msgid "not sent" msgstr "non inviato" #: ../xgnokii/xgnokii_sms.c:302 msgid "read report" msgstr "rapporto letto" #: ../xgnokii/xgnokii_sms.c:305 msgid "unread report" msgstr "rapporto non letto" #: ../xgnokii/xgnokii_sms.c:312 msgid "seen picture" msgstr "disegno visto" #: ../xgnokii/xgnokii_sms.c:315 msgid "unseen picture" msgstr "disegno non visto" #: ../xgnokii/xgnokii_sms.c:318 msgid "sent picture" msgstr "disegno inviato" #: ../xgnokii/xgnokii_sms.c:321 msgid "not sent picture" msgstr "disegno non inviato" #: ../xgnokii/xgnokii_sms.c:324 msgid "unknown picture" msgstr "disegno sconosciuto" #: ../xgnokii/xgnokii_sms.c:349 #, c-format msgid "%02d/%02d/%04d %02d:%02d:%02d %c%02d00" msgstr "%02d/%02d/%04d %02d:%02d:%02d %c%02d00" #: ../xgnokii/xgnokii_sms.c:355 ../xgnokii/xgnokii_sms.c:360 #, c-format msgid "%02d/%02d/%04d %02d:%02d:%02d" msgstr "%02d/%02d/%04d %d.%02d.%02d" #: ../xgnokii/xgnokii_sms.c:368 #, c-format msgid "Picture Message: %s" msgstr "Messaggio con disegno: %s" #: ../xgnokii/xgnokii_sms.c:461 msgid "From: " msgstr "Da: " #: ../xgnokii/xgnokii_sms.c:466 msgid "Date: " msgstr "Data: " #: ../xgnokii/xgnokii_sms.c:563 msgid "Delete SMS" msgstr "Elimina SMS" #: ../xgnokii/xgnokii_sms.c:595 msgid "Do you want to delete selected SMS?" msgstr "Eliminare l'SMS selezionato?" #: ../xgnokii/xgnokii_sms.c:617 #, c-format msgid "Cannot open mailbox %s for appending!" msgstr "Impossibile aprire la mailbox %s per aggiungere." #: ../xgnokii/xgnokii_sms.c:631 #, c-format msgid "" "Cannot save to mailbox %s.\n" "\\%s is locked for process %d!" msgstr "" "Impossibile salvare nella mailbox %s.\n" "\\%s è bloccato per il processo %d." #: ../xgnokii/xgnokii_sms.c:644 #, c-format msgid "Cannot lock mailbox %s!" msgstr "Impossibile bloccare la mailbox %s" #: ../xgnokii/xgnokii_sms.c:699 #, c-format msgid "Cannot unlock mailbox %s!" msgstr "Impossibile sbloccare la mailbox %s" #: ../xgnokii/xgnokii_sms.c:747 msgid "Choose Mailbox File" msgstr "Scegliere il file per la mailbox" #: ../xgnokii/xgnokii_sms.c:857 #, c-format msgid "" "Name: %s\n" "Number: %s\n" "Used: %d\n" msgstr "" "Nome: %s\n" "Numero: %s\n" "Usati: %d\n" #: ../xgnokii/xgnokii_sms.c:956 ../xgnokii/xgnokii_sms.c:1089 msgid "Address line contains illegal address!" msgstr "L'indirizzo specificato non è valido." #: ../xgnokii/xgnokii_sms.c:1060 #, c-format msgid "" "Error sending SMS to %s\n" "%s" msgstr "" "Errore nell'inviare un SMS a %s\n" "%s" #: ../xgnokii/xgnokii_sms.c:1066 #, c-format msgid "Message sent to: %s\n" msgstr "Messaggio inviato a: %s\n" #: ../xgnokii/xgnokii_sms.c:1153 ../xgnokii/xgnokii_sms.c:1185 #: ../xgnokii/xgnokii_sms.c:1211 #, c-format msgid "Sending SMS to %s (%d/%d) ...\n" msgstr "Invio SMS a %s (%d/%d) in corso...\n" #: ../xgnokii/xgnokii_sms.c:1246 msgid "/File/Sen_d" msgstr "/File/Invi_a" #: ../xgnokii/xgnokii_sms.c:1249 msgid "/File/Check _Names" msgstr "/File/Verifica _nomi" #: ../xgnokii/xgnokii_sms.c:1250 msgid "/File/C_ontacts" msgstr "/File/C_ontatti" #: ../xgnokii/xgnokii_sms.c:1310 msgid "Send message" msgstr "Invia il messaggio" #: ../xgnokii/xgnokii_sms.c:1314 msgid "Save message to outbox" msgstr "Salva il messaggio tra i messaggi in uscita" #: ../xgnokii/xgnokii_sms.c:1321 msgid "Check names" msgstr "Controlla i nominativi" #: ../xgnokii/xgnokii_sms.c:1334 msgid "To:" msgstr "A:" #: ../xgnokii/xgnokii_sms.c:1402 msgid "Delivery report" msgstr "Rapporto di invio" #: ../xgnokii/xgnokii_sms.c:1406 msgid "Send as Long SMS" msgstr "Invia come Long SMS" #: ../xgnokii/xgnokii_sms.c:1410 msgid "SMS Center:" msgstr "Centro messaggi:" #: ../xgnokii/xgnokii_sms.c:1431 msgid "New Message" msgstr "Nuovo messaggio" #: ../xgnokii/xgnokii_sms.c:1457 msgid "Forward Message" msgstr "Inoltra il messaggio" #: ../xgnokii/xgnokii_sms.c:1498 msgid "Reply Message" msgstr "Rispondi al messaggio" #: ../xgnokii/xgnokii_sms.c:1635 msgid "/File/Save to mailbo_x" msgstr "/File/Salva nella mailbo_x" #: ../xgnokii/xgnokii_sms.c:1636 msgid "/File/Save to _file" msgstr "/File/Salva sul _file" #: ../xgnokii/xgnokii_sms.c:1639 msgid "/_Messages" msgstr "/_Messaggi" #: ../xgnokii/xgnokii_sms.c:1640 msgid "/_Messages/_Activate SMS reading" msgstr "/_Messaggi/_Attiva lettura degli SMS" #: ../xgnokii/xgnokii_sms.c:1641 msgid "/_Messages/_New" msgstr "/_Messaggi/_Nuovo" #: ../xgnokii/xgnokii_sms.c:1642 msgid "/_Messages/_Forward" msgstr "/_Messaggi/_Inoltra" #: ../xgnokii/xgnokii_sms.c:1643 msgid "/_Messages/_Reply" msgstr "/_Messaggi/_Rispondi" #: ../xgnokii/xgnokii_sms.c:1644 msgid "/_Messages/_Delete" msgstr "/_Messaggi/_Elimina" #: ../xgnokii/xgnokii_sms.c:1645 msgid "/Messages/Sep3" msgstr "/Messaggi/Sep3" #: ../xgnokii/xgnokii_sms.c:1646 msgid "/_Messages/_Business card" msgstr "/_Messaggi/_Biglietto da visita" #: ../xgnokii/xgnokii_sms.c:1666 msgid "Status" msgstr "Stato" #: ../xgnokii/xgnokii_sms.c:1666 msgid "Date / Time" msgstr "Data / Ora" #: ../xgnokii/xgnokii_sms.c:1666 msgid "Sender" msgstr "Mittente" #: ../xgnokii/xgnokii_sms.c:1666 msgid "Message" msgstr "Messaggio" #: ../xgnokii/xgnokii_sms.c:1703 msgid "New message" msgstr "Nuovo messaggio" #: ../xgnokii/xgnokii_sms.c:1707 msgid "Forward message" msgstr "Inoltra il messaggio" #: ../xgnokii/xgnokii_sms.c:1711 msgid "Reply message" msgstr "Rispondi al messaggio" #: ../xgnokii/xgnokii_sms.c:1723 msgid "Delete message" msgstr "Elimina messaggio" #: ../xgnokii/xgnokii_sms.c:1748 msgid "SMS's" msgstr "SMS" #: ../xgnokii/xgnokii_speed.c:181 msgid "Reading data ..." msgstr "Lettura dati..." #: ../xgnokii/xgnokii_speed.c:207 #, c-format msgid "Cannot read speed dial key %d!\n" msgstr "Impossibile leggere la chiamata veloce per il tasto %d.\n" #: ../xgnokii/xgnokii_speed.c:268 #, c-format msgid "Error writing speed dial for key %d!\n" msgstr "Errore durante la scrittura della chiamata veloce per il tasto %d.\n" #: ../xgnokii/xgnokii_speed.c:542 msgid "Key" msgstr "Tasto" #: ../xgnokii/xgnokii_xkeyb.c:180 msgid "Cannot load background pixmap!" msgstr "Impossibile caricare l'immagine di sfondo." #: ../xgnokii/xgnokii_xkeyb.c:253 msgid "XGnokii Keyboard" msgstr "Tastiera di XGnokii" #: ../xgnokii/xgnokii_xring.c:404 #, c-format msgid "User #%d (%s)" msgstr "Utente #%d (%s)" #: ../xgnokii/xgnokii_xring.c:423 #, c-format msgid "User #%d (*EMPTY*)" msgstr "Utente #%d (*VUOTO*)" #: ../xgnokii/xgnokii_xring.c:628 msgid "Open ringtone..." msgstr "Apertura della suoneria..." #: ../xgnokii/xgnokii_xring.c:670 msgid "Save ringtone as..." msgstr "/File/Salv_a suoneria come..." #: ../xgnokii/xgnokii_xring.c:736 #, c-format msgid "Empty ringtone list" msgstr "La lista delle suonerie è vuota" #: ../xgnokii/xgnokii_xring.c:746 #, c-format msgid "" "Error getting ringtone\n" "%s" msgstr "" "Errore nel caricare la suoneria\n" "%s" #: ../xgnokii/xgnokii_xring.c:763 #, c-format msgid "" "Error setting ringtone\n" "%s" msgstr "" "Errore nell'impostare la suoneria\n" "%s" #: ../xgnokii/xgnokii_xring.c:782 #, c-format msgid "" "Error deleting ringtone\n" "%s" msgstr "" "Errore nell'eliminare la suoneria\n" "%s" #: ../xgnokii/xgnokii_xring.c:830 msgid "/File/S1" msgstr "/File/S1" #: ../xgnokii/xgnokii_xring.c:831 msgid "/File/_Get ringtone" msgstr "/File/_Seleziona suoneria" #: ../xgnokii/xgnokii_xring.c:832 msgid "/File/Se_t ringtone" msgstr "/File/Impos_ta suoneria" #: ../xgnokii/xgnokii_xring.c:833 msgid "/File/Delete ringtone" msgstr "/File/Elimina suoneria" #: ../xgnokii/xgnokii_xring.c:834 msgid "/File/_Play" msgstr "/File/_Suona" #: ../xgnokii/xgnokii_xring.c:835 msgid "/File/S2" msgstr "/File/S2" #: ../xgnokii/xgnokii_xring.c:874 msgid "Clear ringtone" msgstr "Svuota suoneria" #: ../xgnokii/xgnokii_xring.c:880 msgid "Get ringtone" msgstr "Leggi dal telefono" #: ../xgnokii/xgnokii_xring.c:884 msgid "Set ringtone" msgstr "Scrivi sul telefono" #: ../xgnokii/xgnokii_xring.c:888 msgid "Delete ringtone" msgstr "Elimina suoneria" #: ../xgnokii/xgnokii_xring.c:904 msgid "Play" msgstr "Suona" #: ../xgnokii/xgnokii_xring.c:913 msgid "Select ringtone" msgstr "Scegli suoneria" #: ../xgnokii/xgnokii_xring.c:918 msgid "Ringtone name" msgstr "Nome suoneria" # Qui «tempo» è un termine musicale #: ../xgnokii/xgnokii_xring.c:930 msgid "Set tempo" msgstr "Imposta il tempo" #~ msgid "ERROR: Can't find HOME environment variable!\n" #~ msgstr "ERRORE: impossibile trovare la variabile di ambiente HOME.\n" #~ msgid "+%02d00" #~ msgstr "+%02d00" #~ msgid "%02d00" #~ msgstr "%02d00" #~ msgid "Response date/time: %02d/%02d/%04d %02d:%02d:%02d " #~ msgstr "Data/ora della risposta: %02d/%02d/%04d %d.%02d.%02d " #~ msgid "WARNING: Can't find HOME environment variable!\n" #~ msgstr "ATTENZIONE: impossibile trovare la variabile di ambiente HOME\n" gnokii-0.6.31/po/ChangeLog0000644000175000017500000000000011666163120013361 0ustar leoleognokii-0.6.31/README0000644000175000017500000000000011666163120012051 0ustar leoleognokii-0.6.31/COPYRIGHT0000644000175000017500000000272311666163117012510 0ustar leoleoGNOKII - A Linux/Unix toolset and driver for the mobile phones Copyright (C) 1999-2000 Hugh Blemings & Pavel Janík ml. Copyright (C) 2001-2008 PaweÅ‚ Kot This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. You can contact authors by mail at hugh at blemings dot org Pavel at Janik dot cz Hugh Blemings Mgr. Pavel Janík, SuSE CR, s.r.o. PO Box 234 Pod Pekárnami 338/12 Belconnen ACT 2616 190 00 Praha 9 Australia Czech Republic gnokii at gmail dot com PaweÅ‚ Kot ul. Dembego 6/45 02-796 Warsaw Poland We would be delighted to receive a postcard from you if you use gnokii but this is not a requirement of these licence terms! :) Any trademarks in this or other gnokii documents/files are the property of their respective owners. gnokii-0.6.31/AUTHORS0000644000175000017500000000000011666163117012247 0ustar leoleognokii-0.6.31/xgnokii/0000755000175000017500000000000011666163465012667 5ustar leoleognokii-0.6.31/xgnokii/Makefile.am0000644000175000017500000000225111666163120014707 0ustar leoleoSUBDIRS = xpm bin_PROGRAMS = xgnokii AM_CFLAGS = \ $(PTHREAD_CFLAGS) \ $(GTK_CFLAGS) -DGTK_ENABLE_BROKEN \ -DLOCALEDIR=\"$(localedir)\" xgnokii_LDADD = \ $(PTHREAD_LIBS) $(GTK_LIBS) $(INTLLIBS) \ $(top_builddir)/common/libgnokii.la $(top_builddir)/common/data/libDATA.la xgnokii_CFLAGS = -I$(top_srcdir)/include $(AM_CFLAGS) xgnokii_SOURCES = \ xgnokii.c \ xgnokii_common.c \ xgnokii_contacts.c \ xgnokii_sms.c \ xgnokii_netmon.c \ xgnokii_dtmf.c \ xgnokii_cfg.c \ xgnokii_speed.c \ xgnokii_xkeyb.c \ xgnokii_calendar.c \ xgnokii_logos.c \ xgnokii_xring.c \ xgnokii_lowlevel.c \ xgnokii_data.c \ xgnokii_calendar.h \ xgnokii_cfg.h \ xgnokii_common.h \ xgnokii_contacts.h \ xgnokii_data.h \ xgnokii_dtmf.h \ xgnokii.h \ xgnokii_logos.h \ xgnokii_lowlevel.h \ xgnokii_netmon.h \ xgnokii_sms.h \ xgnokii_speed.h \ xgnokii_xkeyb.h \ xgnokii_xring.h pkgconfig_DATA = xgnokii.pc pkgconfigdir = $(libdir)/pkgconfig desktop_in_files = xgnokii.desktop.in desktopdir = $(datadir)/applications desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) @INTLTOOL_DESKTOP_RULE@ CLEANFILES = $(desktop_DATA) EXTRA_DIST = xgnokii.pc.in $(desktop_in_files) README.vcard gnokii-0.6.31/xgnokii/xgnokii_calendar.c0000644000175000017500000016154711666163120016336 0ustar leoleo/* $Id$ X G N O K I I A Linux/Unix GUI for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999 Pavel Janik ml., Hugh Blemings Copyright (C) 1999-2005 Jan Derfinak Copyright (C) 2001-2002 Pawel Kot Copyright (C) 2002 BORBELY Zoltan, Markus Plail */ #include "config.h" #include #include #include #include "misc.h" #include "xgnokii_common.h" #include "xgnokii.h" #include "xgnokii_lowlevel.h" #include "xgnokii_calendar.h" #include "xpm/Read.xpm" #include "xpm/Send.xpm" #include "xpm/Open.xpm" #include "xpm/Save.xpm" /* #include "xpm/Edit.xpm" */ #include "xpm/Delete.xpm" #include "xpm/SendSMS.xpm" #include "xpm/NewBD.xpm" #include "xpm/NewCall.xpm" #include "xpm/NewMeet.xpm" #include "xpm/NewRem.xpm" #include "xpm/quest.xpm" /* Calendar entry columns */ #define ENTRY_COLUMNS 9 #define ENTRY_ID 0 #define ENTRY_TYPE 1 #define ENTRY_SDATE 2 #define ENTRY_EDATE 3 #define ENTRY_TEXT 4 #define ENTRY_NUMBER 5 /* Just for calls */ #define ENTRY_LOCATION 6 /* Just for meetings */ #define ENTRY_ALARM 7 #define ENTRY_RECURRENCE 8 typedef struct { GtkWidget *calendar; GtkWidget *notesClist; GtkWidget *noteText; GdkColor colour; } CalendarWidget; typedef struct { guint year; guint month; guint day; GtkWidget *button; } Date; typedef struct { Date date; guchar hours; guchar minutes; GtkWidget *button; GtkWidget *hButton; GtkWidget *mButton; } DateTime; typedef struct { GtkWidget *dialog; DateTime date; DateTime alarm; gint recurrence; GtkWidget *alarmCheck; GtkWidget *text; GtkWidget *phone; GtkWidget *group; GtkWidget *groupLabel; GtkWidget *groupMenu; } AddDialogData; typedef struct { GtkWidget *dialog; GtkWidget *cal; } CalendarDialog; typedef struct { GtkWidget *dialog; GtkWidget *cal; } CalTimeDialog; static GtkWidget *GUI_CalendarWindow; static ErrorDialog errorDialog = { NULL, NULL }; static CalendarWidget cal = { NULL, NULL }; static QuestMark questMark; static AddDialogData addReminderDialogData; static AddDialogData addCallDialogData; static AddDialogData addMeetingDialogData; static AddDialogData addBirthdayDialogData; static CalendarDialog calendarDialog = { NULL, NULL }; static CalTimeDialog calTimeDialog = { NULL, NULL }; static void FunctionNotImplemented(void) { gtk_label_set_text(GTK_LABEL(errorDialog.text), _("Function not implemented!")); gtk_widget_show(errorDialog.dialog); } static inline void CloseCalendar(GtkWidget * w, gpointer data) { gtk_widget_hide(GUI_CalendarWindow); } inline void GUI_ShowCalendar() { if (phoneMonitor.supported & PM_CALENDAR) gtk_window_present(GTK_WINDOW(GUI_CalendarWindow)); } static gint InsertCalendarEntry(gn_calnote * note) { gchar *row[ENTRY_COLUMNS]; int free_recur = 0; row[ENTRY_ID] = g_strdup_printf("%d", note->location); switch (note->type) { case GN_CALNOTE_MEMO: row[ENTRY_TYPE] = _("Memo"); row[ENTRY_NUMBER] = ""; row[ENTRY_LOCATION] = ""; break; case GN_CALNOTE_REMINDER: row[ENTRY_TYPE] = _("Reminder"); row[ENTRY_NUMBER] = ""; row[ENTRY_LOCATION] = ""; break; case GN_CALNOTE_CALL: row[ENTRY_TYPE] = _("Call"); row[ENTRY_NUMBER] = note->phone_number; row[ENTRY_LOCATION] = ""; break; case GN_CALNOTE_MEETING: row[ENTRY_TYPE] = _("Meeting"); row[ENTRY_NUMBER] = ""; row[ENTRY_LOCATION] = note->mlocation; break; case GN_CALNOTE_BIRTHDAY: row[ENTRY_TYPE] = _("Birthday"); row[ENTRY_NUMBER] = ""; row[ENTRY_LOCATION] = ""; break; default: row[ENTRY_TYPE] = _("Unknown"); row[ENTRY_NUMBER] = ""; row[ENTRY_LOCATION] = ""; break; } if (note->type == GN_CALNOTE_BIRTHDAY) { row[ENTRY_SDATE] = g_strdup_printf(_("%04d/%02d/%02d"), note->time.year, note->time.month, note->time.day); } else { row[ENTRY_SDATE] = g_strdup_printf(_("%04d/%02d/%02d %02d:%02d"), note->time.year, note->time.month, note->time.day, note->time.hour, note->time.minute); } if (note->end_time.year) { row[ENTRY_EDATE] = g_strdup_printf(_("%04d/%02d/%02d %02d:%02d"), note->end_time.year, note->end_time.month, note->end_time.day, note->end_time.hour, note->end_time.minute); } else { row[ENTRY_EDATE] = ""; } if (note->alarm.enabled) { if (note->type == GN_CALNOTE_BIRTHDAY) { row[ENTRY_ALARM] = g_strdup_printf(_("%02d/%02d %02d:%02d tone %s"), note->alarm.timestamp.month, note->alarm.timestamp.day, note->alarm.timestamp.hour, note->alarm.timestamp.minute, note->alarm.tone ? _("enabled") : _("disabled")); } else { row[ENTRY_ALARM] = g_strdup_printf(_("%04d/%02d/%02d %02d:%02d tone %s"), note->alarm.timestamp.year, note->alarm.timestamp.month, note->alarm.timestamp.day, note->alarm.timestamp.hour, note->alarm.timestamp.minute, note->alarm.tone ? _("enabled") : _("disabled")); } } else { row[ENTRY_ALARM] = ""; } row[ENTRY_TEXT] = note->text; switch (note->recurrence) { case GN_CALNOTE_NEVER: row[ENTRY_RECURRENCE] = _("never"); break; case GN_CALNOTE_DAILY: row[ENTRY_RECURRENCE] = _("daily"); break; case GN_CALNOTE_WEEKLY: row[ENTRY_RECURRENCE] = _("weekly"); break; case GN_CALNOTE_2WEEKLY: row[ENTRY_RECURRENCE] = _("every two weeks"); break; case GN_CALNOTE_MONTHLY: row[ENTRY_RECURRENCE] = _("monthly"); break; case GN_CALNOTE_YEARLY: row[ENTRY_RECURRENCE] = _("yearly"); break; default: row[ENTRY_RECURRENCE] = g_strdup_printf(_("every %d minutes"), note->recurrence * 60); free_recur = 1; break; } gtk_clist_freeze(GTK_CLIST(cal.notesClist)); gtk_clist_append(GTK_CLIST(cal.notesClist), row); gtk_clist_sort(GTK_CLIST(cal.notesClist)); gtk_clist_thaw(GTK_CLIST(cal.notesClist)); g_free(row[ENTRY_ID]); g_free(row[ENTRY_SDATE]); if (*row[ENTRY_EDATE] != '\0') g_free(row[ENTRY_EDATE]); if (*row[ENTRY_ALARM] != '\0') g_free(row[ENTRY_ALARM]); if (free_recur) g_free(row[ENTRY_RECURRENCE]); return GN_ERR_NONE; } static void ClickEntry(GtkWidget * clist, gint row, gint column, GdkEventButton * event, gpointer data) { gchar *buf; int birthday = 0; int year, month, day; gtk_text_freeze(GTK_TEXT(cal.noteText)); gtk_text_set_point(GTK_TEXT(cal.noteText), 0); gtk_text_forward_delete(GTK_TEXT(cal.noteText), gtk_text_get_length(GTK_TEXT(cal.noteText))); gtk_text_insert(GTK_TEXT(cal.noteText), NULL, &(cal.colour), NULL, _("Type: "), -1); gtk_clist_get_text(GTK_CLIST(clist), row, ENTRY_TYPE, &buf); gtk_text_insert(GTK_TEXT(cal.noteText), NULL, &(cal.noteText->style->black), NULL, buf, -1); gtk_text_insert(GTK_TEXT(cal.noteText), NULL, &(cal.noteText->style->black), NULL, "\n", -1); if (!strcmp(buf, _("Birthday"))) { birthday = 1; } gtk_text_insert(GTK_TEXT(cal.noteText), NULL, &(cal.colour), NULL, _("Start date: "), -1); gtk_clist_get_text(GTK_CLIST(clist), row, ENTRY_SDATE, &buf); gtk_text_insert(GTK_TEXT(cal.noteText), NULL, &(cal.noteText->style->black), NULL, buf, -1); gtk_text_insert(GTK_TEXT(cal.noteText), NULL, &(cal.noteText->style->black), NULL, "\n", -1); year = atoi(buf); month = atoi(buf + 5) - 1; day = atoi(buf + 8); if (birthday) { time_t t; struct tm *tm; t = time(NULL); tm = localtime(&t); if ((tm->tm_mon > month) || ((tm->tm_mon == month) && (tm->tm_mday > day))) { year = tm->tm_year + 1; } else { year = tm->tm_year; } year += 1900; } gtk_calendar_select_month(GTK_CALENDAR(cal.calendar), month, year); gtk_calendar_select_day(GTK_CALENDAR(cal.calendar), day); gtk_clist_get_text(GTK_CLIST(clist), row, ENTRY_EDATE, &buf); if (*buf != '\0') { gtk_text_insert(GTK_TEXT(cal.noteText), NULL, &(cal.colour), NULL, _("End date: "), -1); gtk_text_insert(GTK_TEXT(cal.noteText), NULL, &(cal.noteText->style->black), NULL, buf, -1); gtk_text_insert(GTK_TEXT(cal.noteText), NULL, &(cal.noteText->style->black), NULL, "\n", -1); } gtk_clist_get_text(GTK_CLIST(clist), row, ENTRY_ALARM, &buf); if (*buf != '\0') { gtk_text_insert(GTK_TEXT(cal.noteText), NULL, &(cal.colour), NULL, _("Alarm: "), -1); gtk_text_insert(GTK_TEXT(cal.noteText), NULL, &(cal.noteText->style->black), NULL, buf, -1); gtk_text_insert(GTK_TEXT(cal.noteText), NULL, &(cal.noteText->style->black), NULL, "\n", -1); } gtk_clist_get_text(GTK_CLIST(clist), row, ENTRY_NUMBER, &buf); if (*buf != '\0') { gtk_text_insert(GTK_TEXT(cal.noteText), NULL, &(cal.colour), NULL, _("Number: "), -1); gtk_text_insert(GTK_TEXT(cal.noteText), NULL, &(cal.noteText->style->black), NULL, buf, -1); gtk_text_insert(GTK_TEXT(cal.noteText), NULL, &(cal.noteText->style->black), NULL, "\n", -1); } gtk_clist_get_text(GTK_CLIST(clist), row, ENTRY_LOCATION, &buf); if (*buf != '\0') { gtk_text_insert(GTK_TEXT(cal.noteText), NULL, &(cal.colour), NULL, _("Location: "), -1); gtk_text_insert(GTK_TEXT(cal.noteText), NULL, &(cal.noteText->style->black), NULL, buf, -1); gtk_text_insert(GTK_TEXT(cal.noteText), NULL, &(cal.noteText->style->black), NULL, "\n", -1); } gtk_clist_get_text(GTK_CLIST(clist), row, ENTRY_RECURRENCE, &buf); if (*buf != '\0') { gtk_text_insert(GTK_TEXT(cal.noteText), NULL, &(cal.colour), NULL, _("Recurrence: "), -1); gtk_text_insert(GTK_TEXT(cal.noteText), NULL, &(cal.noteText->style->black), NULL, buf, -1); gtk_text_insert(GTK_TEXT(cal.noteText), NULL, &(cal.noteText->style->black), NULL, "\n", -1); } gtk_text_insert(GTK_TEXT(cal.noteText), NULL, &(cal.colour), NULL, _("Text: "), -1); gtk_clist_get_text(GTK_CLIST(clist), row, ENTRY_TEXT, &buf); gtk_text_insert(GTK_TEXT(cal.noteText), NULL, &(cal.noteText->style->black), NULL, buf, -1); gtk_text_thaw(GTK_TEXT(cal.noteText)); } static inline gint ReadCalendarFailed(gint i) { return (0); } static void ReadCalNotes(void) { PhoneEvent *e; D_CalendarNoteAll *cna; gtk_clist_clear(GTK_CLIST(cal.notesClist)); cna = (D_CalendarNoteAll *) g_malloc(sizeof(D_CalendarNoteAll)); cna->InsertEntry = InsertCalendarEntry; cna->ReadFailed = ReadCalendarFailed; e = (PhoneEvent *) g_malloc(sizeof(PhoneEvent)); e->event = Event_GetCalendarNoteAll; e->data = cna; GUI_InsertEvent(e); } static gint CListCompareFunc(GtkCList * clist, gconstpointer ptr1, gconstpointer ptr2) { char *text1 = NULL; char *text2 = NULL; GtkCListRow *row1 = (GtkCListRow *) ptr1; GtkCListRow *row2 = (GtkCListRow *) ptr2; switch (row1->cell[clist->sort_column].type) { case GTK_CELL_TEXT: text1 = GTK_CELL_TEXT(row1->cell[clist->sort_column])->text; break; case GTK_CELL_PIXTEXT: text1 = GTK_CELL_PIXTEXT(row1->cell[clist->sort_column])->text; break; default: break; } switch (row2->cell[clist->sort_column].type) { case GTK_CELL_TEXT: text2 = GTK_CELL_TEXT(row2->cell[clist->sort_column])->text; break; case GTK_CELL_PIXTEXT: text2 = GTK_CELL_PIXTEXT(row2->cell[clist->sort_column])->text; break; default: break; } if (!text2) return (text1 != NULL); if (!text1) return -1; if (*text2 == '\0') return (*text1 != '\0'); if (*text1 == '\0') return (-1); if (clist->sort_column == ENTRY_ID) { gint n1 = atoi(text1); gint n2 = atoi(text2); if (n1 > n2) return (1); else if (n1 < n2) return (-1); else return 0; } return (g_strcasecmp(text1, text2)); } static gint ReverseSelection(gconstpointer a, gconstpointer b) { gchar *buf1, *buf2; gint index1, index2; gint row1 = GPOINTER_TO_INT(a); gint row2 = GPOINTER_TO_INT(b); gtk_clist_get_text(GTK_CLIST(cal.notesClist), row1, 0, &buf1); gtk_clist_get_text(GTK_CLIST(cal.notesClist), row2, 0, &buf2); index1 = atoi(buf1); index2 = atoi(buf2); if (index1 < index2) return (1); else if (index1 > index2) return (-1); else return (0); } static gint AddCalendarNote(gn_calnote * cnote) { gn_error error; PhoneEvent *e = (PhoneEvent *) g_malloc(sizeof(PhoneEvent)); D_CalendarNote *dnote = (D_CalendarNote *) g_malloc(sizeof(D_CalendarNote)); dnote->entry = cnote; e->event = Event_WriteCalendarNote; e->data = dnote; GUI_InsertEvent(e); pthread_mutex_lock(&calendarMutex); pthread_cond_wait(&calendarCond, &calendarMutex); pthread_mutex_unlock(&calendarMutex); gn_log_xdebug("Saving calendar note\n"); error = dnote->status; g_free(dnote); if (error != GN_ERR_NONE) { gchar *buf = g_strdup_printf(_("Error saving calendar note\n%s"), gn_error_print(error)); gtk_label_set_text(GTK_LABEL(errorDialog.text), buf); gtk_widget_show(errorDialog.dialog); g_free(buf); } else { gn_log_xdebug("Note saved\n"); ReadCalNotes(); } return (error); } static void OkAddReminderDialog(GtkWidget * widget, gpointer data) { gn_calnote note; note.type = GN_CALNOTE_REMINDER; note.location = 0; strncpy(note.text, gtk_entry_get_text(GTK_ENTRY(((AddDialogData *) data)->text)), 20); note.time.year = ((AddDialogData *) data)->date.date.year; note.time.month = ((AddDialogData *) data)->date.date.month; note.time.day = ((AddDialogData *) data)->date.date.day; note.time.hour = note.time.minute = note.time.second = note.time.timezone = 0; if (GTK_TOGGLE_BUTTON(((AddDialogData *) data)->alarmCheck)->active) { note.alarm.timestamp.year = ((AddDialogData *) data)->alarm.date.year; note.alarm.timestamp.month = ((AddDialogData *) data)->alarm.date.month; note.alarm.timestamp.day = ((AddDialogData *) data)->alarm.date.day; note.alarm.timestamp.hour = ((AddDialogData *) data)->alarm.hours; note.alarm.timestamp.minute = ((AddDialogData *) data)->alarm.minutes; note.alarm.timestamp.second = note.alarm.timestamp.timezone = 0; } else { note.alarm.timestamp.year = 0; } note.recurrence = ((AddDialogData *) data)->recurrence; AddCalendarNote(¬e); gtk_entry_set_text(GTK_ENTRY(((AddDialogData *) data)->text), ""); gtk_widget_hide(((AddDialogData *) data)->dialog); } static void OkAddCallDialog(GtkWidget * widget, gpointer data) { gn_calnote note; note.type = GN_CALNOTE_CALL; note.location = 0; strncpy(note.phone_number, gtk_entry_get_text(GTK_ENTRY(((AddDialogData *) data)->phone)), 20); strncpy(note.text, gtk_entry_get_text(GTK_ENTRY(((AddDialogData *) data)->text)), 20); note.time.year = ((AddDialogData *) data)->date.date.year; note.time.month = ((AddDialogData *) data)->date.date.month; note.time.day = ((AddDialogData *) data)->date.date.day; note.time.hour = ((AddDialogData *) data)->date.hours; note.time.minute = ((AddDialogData *) data)->date.minutes; note.time.second = note.time.timezone = 0; if (GTK_TOGGLE_BUTTON(((AddDialogData *) data)->alarmCheck)->active) { note.alarm.timestamp.year = ((AddDialogData *) data)->alarm.date.year; note.alarm.timestamp.month = ((AddDialogData *) data)->alarm.date.month; note.alarm.timestamp.day = ((AddDialogData *) data)->alarm.date.day; note.alarm.timestamp.hour = ((AddDialogData *) data)->alarm.hours; note.alarm.timestamp.minute = ((AddDialogData *) data)->alarm.minutes; note.alarm.timestamp.second = note.alarm.timestamp.timezone = 0; } else { note.alarm.timestamp.year = 0; } note.recurrence = ((AddDialogData *) data)->recurrence; AddCalendarNote(¬e); gtk_entry_set_text(GTK_ENTRY(((AddDialogData *) data)->text), ""); gtk_entry_set_text(GTK_ENTRY(((AddDialogData *) data)->phone), ""); gtk_widget_hide(((AddDialogData *) data)->dialog); } static void OkAddMeetingDialog(GtkWidget * widget, gpointer data) { gn_calnote note; note.type = GN_CALNOTE_MEETING; note.location = 0; strncpy(note.text, gtk_entry_get_text(GTK_ENTRY(((AddDialogData *) data)->text)), 20); note.time.year = ((AddDialogData *) data)->date.date.year; note.time.month = ((AddDialogData *) data)->date.date.month; note.time.day = ((AddDialogData *) data)->date.date.day; note.time.hour = ((AddDialogData *) data)->date.hours; note.time.minute = ((AddDialogData *) data)->date.minutes; note.time.second = note.time.timezone = 0; if (GTK_TOGGLE_BUTTON(((AddDialogData *) data)->alarmCheck)->active) { note.alarm.timestamp.year = ((AddDialogData *) data)->alarm.date.year; note.alarm.timestamp.month = ((AddDialogData *) data)->alarm.date.month; note.alarm.timestamp.day = ((AddDialogData *) data)->alarm.date.day; note.alarm.timestamp.hour = ((AddDialogData *) data)->alarm.hours; note.alarm.timestamp.minute = ((AddDialogData *) data)->alarm.minutes; note.alarm.timestamp.second = note.alarm.timestamp.timezone = 0; } else { note.alarm.timestamp.year = 0; } note.recurrence = ((AddDialogData *) data)->recurrence; AddCalendarNote(¬e); gtk_entry_set_text(GTK_ENTRY(((AddDialogData *) data)->text), ""); gtk_widget_hide(((AddDialogData *) data)->dialog); } static void OkAddBdayDialog(GtkWidget * widget, gpointer data) { gn_calnote note; note.type = GN_CALNOTE_BIRTHDAY; note.location = 0; strncpy(note.text, gtk_entry_get_text(GTK_ENTRY(((AddDialogData *) data)->text)), 20); note.time.year = ((AddDialogData *) data)->date.date.year; note.time.month = ((AddDialogData *) data)->date.date.month; note.time.day = ((AddDialogData *) data)->date.date.day; note.time.hour = note.time.minute = note.time.second = note.time.timezone = 0; if (GTK_TOGGLE_BUTTON(((AddDialogData *) data)->alarmCheck)->active) { note.alarm.timestamp.year = ((AddDialogData *) data)->alarm.date.year; note.alarm.timestamp.month = ((AddDialogData *) data)->alarm.date.month; note.alarm.timestamp.day = ((AddDialogData *) data)->alarm.date.day; note.alarm.timestamp.hour = ((AddDialogData *) data)->alarm.hours; note.alarm.timestamp.minute = ((AddDialogData *) data)->alarm.minutes; note.alarm.timestamp.second = note.alarm.timestamp.timezone = 0; } else { note.alarm.timestamp.year = 0; } AddCalendarNote(¬e); gtk_entry_set_text(GTK_ENTRY(((AddDialogData *) data)->text), ""); gtk_widget_hide(((AddDialogData *) data)->dialog); } static inline void SetDateButton(Date * date) { gchar *buf = g_strdup_printf(_("%d-%02d-%02d"), date->year, date->month, date->day); gtk_label_set_text(GTK_LABEL(date->button), buf); g_free(buf); } static inline void SetDateTimeButton(DateTime * date) { gchar *buf = g_strdup_printf(_("%d-%02d-%02d %02d:%02d"), date->date.year, date->date.month, date->date.day, date->hours, date->minutes); gtk_label_set_text(GTK_LABEL(date->button), buf); g_free(buf); } static void OkCalendarDialog(GtkWidget * widget, Date * date) { gtk_calendar_get_date(GTK_CALENDAR(calendarDialog.cal), &(date->year), &(date->month), &(date->day)); date->month += 1; SetDateButton(date); gtk_widget_hide(calendarDialog.dialog); } static void OkCalTimeDialog(GtkWidget * widget, DateTime * date) { gtk_calendar_get_date(GTK_CALENDAR(calTimeDialog.cal), &(date->date.year), &(date->date.month), &(date->date.day)); date->date.month += 1; date->hours = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(date->hButton)); date->minutes = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(date->mButton)); SetDateTimeButton(date); gtk_widget_hide(calTimeDialog.dialog); } static void ShowCalendar(GtkWidget * widget, Date * date) { GtkWidget *button; calendarDialog.dialog = gtk_dialog_new(); gtk_window_set_title(GTK_WINDOW(calendarDialog.dialog), _("Choose date")); gtk_window_position(GTK_WINDOW(calendarDialog.dialog), GTK_WIN_POS_MOUSE); gtk_window_set_modal(GTK_WINDOW(calendarDialog.dialog), TRUE); gtk_container_set_border_width(GTK_CONTAINER(calendarDialog.dialog), 10); gtk_signal_connect(GTK_OBJECT(calendarDialog.dialog), "delete_event", GTK_SIGNAL_FUNC(DeleteEvent), NULL); button = gtk_button_new_with_label(_("Ok")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(calendarDialog.dialog)->action_area), button, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(OkCalendarDialog), (gpointer) date); GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); gtk_widget_grab_default(button); gtk_widget_show(button); button = gtk_button_new_with_label(_("Cancel")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(calendarDialog.dialog)->action_area), button, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(CancelDialog), (gpointer) calendarDialog.dialog); gtk_widget_show(button); gtk_container_set_border_width(GTK_CONTAINER (GTK_DIALOG(calendarDialog.dialog)->vbox), 5); calendarDialog.cal = gtk_calendar_new(); gtk_calendar_select_month(GTK_CALENDAR(calendarDialog.cal), date->month - 1, date->year); gtk_calendar_select_day(GTK_CALENDAR(calendarDialog.cal), date->day); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(calendarDialog.dialog)->vbox), calendarDialog.cal); gtk_widget_show(calendarDialog.cal); gtk_widget_show(calendarDialog.dialog); } static void ShowCalTime(GtkWidget * widget, DateTime * date) { GtkWidget *button, *hbox, *label; GtkAdjustment *adj; calTimeDialog.dialog = gtk_dialog_new(); gtk_window_set_title(GTK_WINDOW(calTimeDialog.dialog), _("Choose date")); gtk_window_position(GTK_WINDOW(calTimeDialog.dialog), GTK_WIN_POS_MOUSE); gtk_window_set_modal(GTK_WINDOW(calTimeDialog.dialog), TRUE); gtk_container_set_border_width(GTK_CONTAINER(calTimeDialog.dialog), 10); gtk_signal_connect(GTK_OBJECT(calTimeDialog.dialog), "delete_event", GTK_SIGNAL_FUNC(DeleteEvent), NULL); button = gtk_button_new_with_label(_("Ok")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(calTimeDialog.dialog)->action_area), button, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(OkCalTimeDialog), (gpointer) date); GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); gtk_widget_grab_default(button); gtk_widget_show(button); button = gtk_button_new_with_label(_("Cancel")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(calTimeDialog.dialog)->action_area), button, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(CancelDialog), (gpointer) calTimeDialog.dialog); gtk_widget_show(button); gtk_container_set_border_width(GTK_CONTAINER (GTK_DIALOG(calTimeDialog.dialog)->vbox), 5); calTimeDialog.cal = gtk_calendar_new(); gtk_calendar_select_month(GTK_CALENDAR(calTimeDialog.cal), date->date.month - 1, date->date.year); gtk_calendar_select_day(GTK_CALENDAR(calTimeDialog.cal), date->date.day); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(calTimeDialog.dialog)->vbox), calTimeDialog.cal); gtk_widget_show(calTimeDialog.cal); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(calTimeDialog.dialog)->vbox), hbox); gtk_widget_show(hbox); label = gtk_label_new(_("Alarm time:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); gtk_widget_show(label); adj = (GtkAdjustment *) gtk_adjustment_new(date->hours, 0.0, 23.0, 1.0, 4.0, 0.0); date->hButton = gtk_spin_button_new(adj, 0, 0); gtk_spin_button_set_wrap(GTK_SPIN_BUTTON(date->hButton), TRUE); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(date->hButton), TRUE); gtk_box_pack_start(GTK_BOX(hbox), date->hButton, FALSE, FALSE, 0); gtk_widget_show(date->hButton); label = gtk_label_new(":"); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); gtk_widget_show(label); adj = (GtkAdjustment *) gtk_adjustment_new(date->minutes, 0.0, 59.0, 1.0, 10.0, 0.0); date->mButton = gtk_spin_button_new(adj, 0, 0); gtk_spin_button_set_wrap(GTK_SPIN_BUTTON(date->mButton), TRUE); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(date->mButton), TRUE); gtk_box_pack_start(GTK_BOX(hbox), date->mButton, FALSE, FALSE, 0); gtk_widget_show(date->mButton); gtk_widget_show(calTimeDialog.dialog); } static inline void SetRecurrence0(GtkWidget * item, gpointer data) { ((AddDialogData *) data)->recurrence = 0x0000; } static inline void SetRecurrence1(GtkWidget * item, gpointer data) { ((AddDialogData *) data)->recurrence = 0x0018; } static inline void SetRecurrence2(GtkWidget * item, gpointer data) { ((AddDialogData *) data)->recurrence = 0x00A8; } static inline void SetRecurrence3(GtkWidget * item, gpointer data) { ((AddDialogData *) data)->recurrence = 0x0150; } static inline void SetRecurrence4(GtkWidget * item, gpointer data) { ((AddDialogData *) data)->recurrence = 0xffff; } void CreateRecurrenceMenu(AddDialogData * data) { GtkWidget *item; if (data->groupMenu) { gtk_option_menu_remove_menu(GTK_OPTION_MENU(data->group)); if (GTK_IS_WIDGET(data->groupMenu)) gtk_widget_destroy(GTK_WIDGET(data->groupMenu)); data->groupMenu = NULL; } data->groupMenu = gtk_menu_new(); item = gtk_menu_item_new_with_label(_("Never")); gtk_signal_connect(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(SetRecurrence0), (gpointer) data); gtk_widget_show(item); gtk_menu_append(GTK_MENU(data->groupMenu), item); item = gtk_menu_item_new_with_label(_("Every Day")); gtk_signal_connect(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(SetRecurrence1), (gpointer) data); gtk_widget_show(item); gtk_menu_append(GTK_MENU(data->groupMenu), item); item = gtk_menu_item_new_with_label(_("Every Week")); gtk_signal_connect(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(SetRecurrence2), (gpointer) data); gtk_widget_show(item); gtk_menu_append(GTK_MENU(data->groupMenu), item); item = gtk_menu_item_new_with_label(_("Every 2 Weeks")); gtk_signal_connect(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(SetRecurrence3), (gpointer) data); gtk_widget_show(item); gtk_menu_append(GTK_MENU(data->groupMenu), item); item = gtk_menu_item_new_with_label(_("Every Year")); gtk_signal_connect(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(SetRecurrence4), (gpointer) data); gtk_widget_show(item); gtk_menu_append(GTK_MENU(data->groupMenu), item); gtk_option_menu_set_menu(GTK_OPTION_MENU(data->group), data->groupMenu); } static void AddReminder(void) { GtkWidget *button, *hbox, *vbox, *label; time_t t; struct tm *tm; if (addReminderDialogData.dialog == NULL) { addReminderDialogData.dialog = gtk_dialog_new(); gtk_window_set_title(GTK_WINDOW(addReminderDialogData.dialog), _("Add reminder")); gtk_window_position(GTK_WINDOW(addReminderDialogData.dialog), GTK_WIN_POS_MOUSE); gtk_window_set_modal(GTK_WINDOW(addReminderDialogData.dialog), TRUE); gtk_container_set_border_width(GTK_CONTAINER(addReminderDialogData.dialog), 10); gtk_signal_connect(GTK_OBJECT(addReminderDialogData.dialog), "delete_event", GTK_SIGNAL_FUNC(DeleteEvent), NULL); button = gtk_button_new_with_label(_("Ok")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(addReminderDialogData.dialog)->action_area), button, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(OkAddReminderDialog), (gpointer) & addReminderDialogData); GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); gtk_widget_grab_default(button); gtk_widget_show(button); button = gtk_button_new_with_label(_("Cancel")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(addReminderDialogData.dialog)->action_area), button, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(CancelDialog), (gpointer) addReminderDialogData.dialog); gtk_widget_show(button); gtk_container_set_border_width(GTK_CONTAINER (GTK_DIALOG(addReminderDialogData.dialog)->vbox), 5); vbox = gtk_vbox_new(FALSE, 10); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(addReminderDialogData.dialog)->vbox), vbox); gtk_widget_show(vbox); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(vbox), hbox); gtk_widget_show(hbox); label = gtk_label_new(_("Date:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); gtk_widget_show(label); t = time(NULL); tm = localtime(&t); addReminderDialogData.date.date.year = addReminderDialogData.alarm.date.year = tm->tm_year + 1900; addReminderDialogData.date.date.month = addReminderDialogData.alarm.date.month = tm->tm_mon + 1; addReminderDialogData.date.date.day = addReminderDialogData.alarm.date.day = tm->tm_mday; addReminderDialogData.alarm.hours = tm->tm_hour; addReminderDialogData.alarm.minutes = tm->tm_min; button = gtk_button_new(); addReminderDialogData.date.date.button = gtk_label_new(""); gtk_container_add(GTK_CONTAINER(button), addReminderDialogData.date.date.button); SetDateButton(&(addReminderDialogData.date.date)); gtk_widget_show(addReminderDialogData.date.date.button); gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 2); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(ShowCalendar), (gpointer) & (addReminderDialogData.date)); gtk_widget_show(button); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(vbox), hbox); gtk_widget_show(hbox); label = gtk_label_new(_("Subject:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); gtk_widget_show(label); addReminderDialogData.text = gtk_entry_new_with_max_length(30); gtk_box_pack_end(GTK_BOX(hbox), addReminderDialogData.text, FALSE, FALSE, 2); gtk_widget_show(addReminderDialogData.text); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(vbox), hbox); gtk_widget_show(hbox); addReminderDialogData.alarmCheck = gtk_check_button_new_with_label(_("Alarm")); gtk_box_pack_start(GTK_BOX(hbox), addReminderDialogData.alarmCheck, FALSE, FALSE, 2); /* gtk_signal_connect (GTK_OBJECT (addReminderDialogData.alarmCheck), "toggled", GTK_SIGNAL_FUNC (TogleAlarm), &addReminderDialogData); */ gtk_widget_show(addReminderDialogData.alarmCheck); button = gtk_button_new(); addReminderDialogData.alarm.button = gtk_label_new(""); gtk_container_add(GTK_CONTAINER(button), addReminderDialogData.alarm.button); SetDateTimeButton(&(addReminderDialogData.alarm)); gtk_widget_show(addReminderDialogData.alarm.button); gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 2); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(ShowCalTime), (gpointer) & (addReminderDialogData.alarm)); gtk_widget_show(button); } gtk_widget_show(GTK_WIDGET(addReminderDialogData.dialog)); } static void AddCall(void) { GtkWidget *button, *hbox, *vbox, *label; time_t t; struct tm *tm; if (addCallDialogData.dialog == NULL) { addCallDialogData.dialog = gtk_dialog_new(); gtk_window_set_title(GTK_WINDOW(addCallDialogData.dialog), _("Add Call")); gtk_window_position(GTK_WINDOW(addCallDialogData.dialog), GTK_WIN_POS_MOUSE); gtk_window_set_modal(GTK_WINDOW(addCallDialogData.dialog), TRUE); gtk_container_set_border_width(GTK_CONTAINER(addCallDialogData.dialog), 10); gtk_signal_connect(GTK_OBJECT(addCallDialogData.dialog), "delete_event", GTK_SIGNAL_FUNC(DeleteEvent), NULL); button = gtk_button_new_with_label(_("Ok")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(addCallDialogData.dialog)->action_area), button, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(OkAddCallDialog), (gpointer) & addCallDialogData); GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); gtk_widget_grab_default(button); gtk_widget_show(button); button = gtk_button_new_with_label(_("Cancel")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(addCallDialogData.dialog)->action_area), button, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(CancelDialog), (gpointer) addCallDialogData.dialog); gtk_widget_show(button); gtk_container_set_border_width(GTK_CONTAINER (GTK_DIALOG(addCallDialogData.dialog)->vbox), 5); vbox = gtk_vbox_new(FALSE, 10); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(addCallDialogData.dialog)->vbox), vbox); gtk_widget_show(vbox); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(vbox), hbox); gtk_widget_show(hbox); label = gtk_label_new(_("Date:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); gtk_widget_show(label); t = time(NULL); tm = localtime(&t); addCallDialogData.date.date.year = addCallDialogData.alarm.date.year = tm->tm_year + 1900; addCallDialogData.date.date.month = addCallDialogData.alarm.date.month = tm->tm_mon + 1; addCallDialogData.date.date.day = addCallDialogData.alarm.date.day = tm->tm_mday; addCallDialogData.date.hours = addCallDialogData.alarm.hours = tm->tm_hour; addCallDialogData.date.minutes = addCallDialogData.alarm.minutes = tm->tm_min; button = gtk_button_new(); addCallDialogData.date.button = gtk_label_new(""); gtk_container_add(GTK_CONTAINER(button), addCallDialogData.date.button); SetDateTimeButton(&(addCallDialogData.date)); gtk_widget_show(addCallDialogData.date.button); gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 2); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(ShowCalTime), (gpointer) & (addCallDialogData.date)); gtk_widget_show(button); /* Phone */ hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(vbox), hbox); gtk_widget_show(hbox); label = gtk_label_new(_("Number:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); gtk_widget_show(label); addCallDialogData.phone = gtk_entry_new_with_max_length(30); gtk_box_pack_end(GTK_BOX(hbox), addCallDialogData.phone, FALSE, FALSE, 2); gtk_widget_show(addCallDialogData.phone); /* Text */ hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(vbox), hbox); gtk_widget_show(hbox); label = gtk_label_new(_("Text:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); gtk_widget_show(label); addCallDialogData.text = gtk_entry_new_with_max_length(30); gtk_box_pack_end(GTK_BOX(hbox), addCallDialogData.text, FALSE, FALSE, 2); gtk_widget_show(addCallDialogData.text); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(vbox), hbox); gtk_widget_show(hbox); addCallDialogData.alarmCheck = gtk_check_button_new_with_label(_("Alarm")); gtk_box_pack_start(GTK_BOX(hbox), addCallDialogData.alarmCheck, FALSE, FALSE, 2); gtk_widget_show(addCallDialogData.alarmCheck); button = gtk_button_new(); addCallDialogData.alarm.button = gtk_label_new(""); gtk_container_add(GTK_CONTAINER(button), addCallDialogData.alarm.button); SetDateTimeButton(&(addCallDialogData.alarm)); gtk_widget_show(addCallDialogData.alarm.button); gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 2); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(ShowCalTime), (gpointer) & (addCallDialogData.alarm)); gtk_widget_show(button); addCallDialogData.groupLabel = gtk_label_new(_("Repeat:")); gtk_box_pack_start(GTK_BOX(hbox), addCallDialogData.groupLabel, FALSE, FALSE, 2); addCallDialogData.group = gtk_option_menu_new(); CreateRecurrenceMenu(&addCallDialogData); gtk_box_pack_start(GTK_BOX(hbox), addCallDialogData.group, TRUE, TRUE, 0); } gtk_widget_show(addCallDialogData.group); gtk_widget_show(addCallDialogData.groupLabel); gtk_widget_show(GTK_WIDGET(addCallDialogData.dialog)); } static void AddMeeting(void) { GtkWidget *button, *hbox, *vbox, *label; time_t t; struct tm *tm; if (addMeetingDialogData.dialog == NULL) { addMeetingDialogData.dialog = gtk_dialog_new(); gtk_window_set_title(GTK_WINDOW(addMeetingDialogData.dialog), _("Add meeting")); gtk_window_position(GTK_WINDOW(addMeetingDialogData.dialog), GTK_WIN_POS_MOUSE); gtk_window_set_modal(GTK_WINDOW(addMeetingDialogData.dialog), TRUE); gtk_container_set_border_width(GTK_CONTAINER(addMeetingDialogData.dialog), 10); gtk_signal_connect(GTK_OBJECT(addMeetingDialogData.dialog), "delete_event", GTK_SIGNAL_FUNC(DeleteEvent), NULL); button = gtk_button_new_with_label(_("Ok")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(addMeetingDialogData.dialog)->action_area), button, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(OkAddMeetingDialog), (gpointer) & addMeetingDialogData); GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); gtk_widget_grab_default(button); gtk_widget_show(button); button = gtk_button_new_with_label(_("Cancel")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(addMeetingDialogData.dialog)->action_area), button, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(CancelDialog), (gpointer) addMeetingDialogData.dialog); gtk_widget_show(button); gtk_container_set_border_width(GTK_CONTAINER (GTK_DIALOG(addMeetingDialogData.dialog)->vbox), 5); vbox = gtk_vbox_new(FALSE, 10); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(addMeetingDialogData.dialog)->vbox), vbox); gtk_widget_show(vbox); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(vbox), hbox); gtk_widget_show(hbox); label = gtk_label_new(_("Date:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); gtk_widget_show(label); t = time(NULL); tm = localtime(&t); addMeetingDialogData.date.date.year = addMeetingDialogData.alarm.date.year = tm->tm_year + 1900; addMeetingDialogData.date.date.month = addMeetingDialogData.alarm.date.month = tm->tm_mon + 1; addMeetingDialogData.date.date.day = addMeetingDialogData.alarm.date.day = tm->tm_mday; addMeetingDialogData.date.hours = addMeetingDialogData.alarm.hours = tm->tm_hour; addMeetingDialogData.date.minutes = addMeetingDialogData.alarm.minutes = tm->tm_min; button = gtk_button_new(); addMeetingDialogData.date.button = gtk_label_new(""); gtk_container_add(GTK_CONTAINER(button), addMeetingDialogData.date.button); SetDateTimeButton(&(addMeetingDialogData.date)); gtk_widget_show(addMeetingDialogData.date.button); gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 2); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(ShowCalTime), (gpointer) & (addMeetingDialogData.date)); gtk_widget_show(button); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(vbox), hbox); gtk_widget_show(hbox); label = gtk_label_new(_("Name:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); gtk_widget_show(label); addMeetingDialogData.text = gtk_entry_new_with_max_length(30); gtk_box_pack_end(GTK_BOX(hbox), addMeetingDialogData.text, FALSE, FALSE, 2); gtk_widget_show(addMeetingDialogData.text); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(vbox), hbox); gtk_widget_show(hbox); addMeetingDialogData.alarmCheck = gtk_check_button_new_with_label(_("Alarm")); gtk_box_pack_start(GTK_BOX(hbox), addMeetingDialogData.alarmCheck, FALSE, FALSE, 2); /* gtk_signal_connect (GTK_OBJECT (addMeetingDialogData.alarmCheck), "toggled", GTK_SIGNAL_FUNC (TogleAlarm), &addMeetingDialogData); */ gtk_widget_show(addMeetingDialogData.alarmCheck); button = gtk_button_new(); addMeetingDialogData.alarm.button = gtk_label_new(""); gtk_container_add(GTK_CONTAINER(button), addMeetingDialogData.alarm.button); SetDateTimeButton(&(addMeetingDialogData.alarm)); gtk_widget_show(addMeetingDialogData.alarm.button); gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 2); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(ShowCalTime), (gpointer) & (addMeetingDialogData.alarm)); gtk_widget_show(button); addMeetingDialogData.groupLabel = gtk_label_new(_("Repeat:")); gtk_box_pack_start(GTK_BOX(hbox), addMeetingDialogData.groupLabel, FALSE, FALSE, 2); addMeetingDialogData.group = gtk_option_menu_new(); CreateRecurrenceMenu(&addMeetingDialogData); gtk_box_pack_start(GTK_BOX(hbox), addMeetingDialogData.group, TRUE, TRUE, 0); } gtk_widget_show(addMeetingDialogData.group); gtk_widget_show(addMeetingDialogData.groupLabel); gtk_widget_show(GTK_WIDGET(addMeetingDialogData.dialog)); } static void AddBirthday(void) { GtkWidget *button, *hbox, *vbox, *label; time_t t; struct tm *tm; if (addBirthdayDialogData.dialog == NULL) { addBirthdayDialogData.dialog = gtk_dialog_new(); gtk_window_set_title(GTK_WINDOW(addBirthdayDialogData.dialog), _("Add birthday")); gtk_window_position(GTK_WINDOW(addBirthdayDialogData.dialog), GTK_WIN_POS_MOUSE); gtk_window_set_modal(GTK_WINDOW(addBirthdayDialogData.dialog), TRUE); gtk_container_set_border_width(GTK_CONTAINER(addBirthdayDialogData.dialog), 10); gtk_signal_connect(GTK_OBJECT(addBirthdayDialogData.dialog), "delete_event", GTK_SIGNAL_FUNC(DeleteEvent), NULL); button = gtk_button_new_with_label(_("Ok")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(addBirthdayDialogData.dialog)->action_area), button, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(OkAddBdayDialog), (gpointer) & addBirthdayDialogData); GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); gtk_widget_grab_default(button); gtk_widget_show(button); button = gtk_button_new_with_label(_("Cancel")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(addBirthdayDialogData.dialog)->action_area), button, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(CancelDialog), (gpointer) addBirthdayDialogData.dialog); gtk_widget_show(button); gtk_container_set_border_width(GTK_CONTAINER (GTK_DIALOG(addBirthdayDialogData.dialog)->vbox), 5); vbox = gtk_vbox_new(FALSE, 10); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(addBirthdayDialogData.dialog)->vbox), vbox); gtk_widget_show(vbox); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(vbox), hbox); gtk_widget_show(hbox); label = gtk_label_new(_("Date:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); gtk_widget_show(label); t = time(NULL); tm = localtime(&t); addBirthdayDialogData.date.date.year = addBirthdayDialogData.alarm.date.year = tm->tm_year + 1900; addBirthdayDialogData.date.date.month = addBirthdayDialogData.alarm.date.month = tm->tm_mon + 1; addBirthdayDialogData.date.date.day = addBirthdayDialogData.alarm.date.day = tm->tm_mday; addBirthdayDialogData.alarm.hours = tm->tm_hour; addBirthdayDialogData.alarm.minutes = tm->tm_min; button = gtk_button_new(); addBirthdayDialogData.date.date.button = gtk_label_new(""); gtk_container_add(GTK_CONTAINER(button), addBirthdayDialogData.date.date.button); SetDateButton(&(addBirthdayDialogData.date.date)); gtk_widget_show(addBirthdayDialogData.date.date.button); gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 2); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(ShowCalendar), (gpointer) & (addBirthdayDialogData.date)); gtk_widget_show(button); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(vbox), hbox); gtk_widget_show(hbox); label = gtk_label_new(_("Name:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); gtk_widget_show(label); addBirthdayDialogData.text = gtk_entry_new_with_max_length(30); gtk_box_pack_end(GTK_BOX(hbox), addBirthdayDialogData.text, FALSE, FALSE, 2); gtk_widget_show(addBirthdayDialogData.text); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(vbox), hbox); gtk_widget_show(hbox); addBirthdayDialogData.alarmCheck = gtk_check_button_new_with_label(_("Alarm")); gtk_box_pack_start(GTK_BOX(hbox), addBirthdayDialogData.alarmCheck, FALSE, FALSE, 2); /* gtk_signal_connect (GTK_OBJECT (addBirthdayDialogData.alarmCheck), "toggled", GTK_SIGNAL_FUNC (TogleAlarm), &addBirthdayDialogData); */ gtk_widget_show(addBirthdayDialogData.alarmCheck); button = gtk_button_new(); addBirthdayDialogData.alarm.button = gtk_label_new(""); gtk_container_add(GTK_CONTAINER(button), addBirthdayDialogData.alarm.button); SetDateTimeButton(&(addBirthdayDialogData.alarm)); gtk_widget_show(addBirthdayDialogData.alarm.button); gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 2); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(ShowCalTime), (gpointer) & (addBirthdayDialogData.alarm)); gtk_widget_show(button); gtk_box_pack_start(GTK_BOX(hbox), addBirthdayDialogData.group, TRUE, TRUE, 0); } gtk_widget_show(GTK_WIDGET(addBirthdayDialogData.dialog)); } static void OkDeleteNoteDialog(GtkWidget * widget, gpointer data) { gn_calnote *note; PhoneEvent *e; GList *sel; gint row; gchar *buf; sel = GTK_CLIST(cal.notesClist)->selection; gtk_clist_freeze(GTK_CLIST(cal.notesClist)); sel = g_list_sort(sel, ReverseSelection); while (sel != NULL) { row = GPOINTER_TO_INT(sel->data); sel = sel->next; note = (gn_calnote *) g_malloc(sizeof(gn_calnote)); gtk_clist_get_text(GTK_CLIST(cal.notesClist), row, 0, &buf); note->location = atoi(buf); e = (PhoneEvent *) g_malloc(sizeof(PhoneEvent)); e->event = Event_DeleteCalendarNote; e->data = note; GUI_InsertEvent(e); } gtk_text_set_point(GTK_TEXT(cal.noteText), 0); gtk_text_forward_delete(GTK_TEXT(cal.noteText), gtk_text_get_length(GTK_TEXT(cal.noteText))); gtk_widget_hide(GTK_WIDGET(data)); gtk_clist_thaw(GTK_CLIST(cal.notesClist)); ReadCalNotes(); } static void DeleteNote(void) { static GtkWidget *dialog = NULL; GtkWidget *button, *hbox, *label, *pixmap; if (dialog == NULL) { dialog = gtk_dialog_new(); gtk_window_set_title(GTK_WINDOW(dialog), _("Delete calendar note")); gtk_window_position(GTK_WINDOW(dialog), GTK_WIN_POS_MOUSE); gtk_window_set_modal(GTK_WINDOW(dialog), TRUE); gtk_container_set_border_width(GTK_CONTAINER(dialog), 10); gtk_signal_connect(GTK_OBJECT(dialog), "delete_event", GTK_SIGNAL_FUNC(DeleteEvent), NULL); button = gtk_button_new_with_label(_("Ok")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), button, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(OkDeleteNoteDialog), (gpointer) dialog); GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); gtk_widget_grab_default(button); gtk_widget_show(button); button = gtk_button_new_with_label(_("Cancel")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), button, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(CancelDialog), (gpointer) dialog); gtk_widget_show(button); gtk_container_set_border_width(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), 5); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), hbox); gtk_widget_show(hbox); pixmap = gtk_pixmap_new(questMark.pixmap, questMark.mask); gtk_box_pack_start(GTK_BOX(hbox), pixmap, FALSE, FALSE, 10); gtk_widget_show(pixmap); label = gtk_label_new(_("Do you want to delete selected note(s)?")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 10); gtk_widget_show(label); } gtk_widget_show(GTK_WIDGET(dialog)); } static GtkItemFactoryEntry menu_items[] = { {NULL, NULL, NULL, 0, ""}, {NULL, "R", ReadCalNotes, 0, NULL}, {NULL, "S", FunctionNotImplemented, 0, NULL}, {NULL, NULL, NULL, 0, ""}, {NULL, "X", FunctionNotImplemented, 0, NULL}, {NULL, NULL, NULL, 0, ""}, {NULL, "I", FunctionNotImplemented, 0, NULL}, {NULL, "E", FunctionNotImplemented, 0, NULL}, {NULL, NULL, NULL, 0, ""}, {NULL, "W", CloseCalendar, 0, NULL}, {NULL, NULL, NULL, 0, ""}, {NULL, "N", AddReminder, 0, NULL}, {NULL, "C", AddCall, 0, NULL}, {NULL, "M", AddMeeting, 0, NULL}, {NULL, "B", AddBirthday, 0, NULL}, /* {NULL, NULL, NULL, 0, NULL}, */ {NULL, "D", DeleteNote, 0, NULL}, {NULL, NULL, NULL, 0, ""}, {NULL, "A", NULL, 0, NULL}, {NULL, NULL, NULL, 0, ""}, {NULL, NULL, GUI_ShowAbout, 0, NULL}, }; static void InitMainMenu(void) { menu_items[0].path = _("/_File"); menu_items[1].path = _("/File/_Read from phone"); menu_items[2].path = _("/File/_Save to phone"); menu_items[3].path = _("/File/Sep1"); menu_items[4].path = _("/File/Send via S_MS"); menu_items[5].path = _("/File/Sep2"); menu_items[6].path = _("/File/_Import from file"); menu_items[7].path = _("/File/_Export to file"); menu_items[8].path = _("/File/Sep3"); menu_items[9].path = _("/File/_Close"); menu_items[10].path = _("/_Edit"); menu_items[11].path = _("/Edit/Add _reminder"); menu_items[12].path = _("/Edit/Add _call"); menu_items[13].path = _("/Edit/Add _meeting"); menu_items[14].path = _("/Edit/Add _birthday"); /* menu_items[15].path = _("/Edit/_Edit"); */ menu_items[15].path = _("/Edit/_Delete"); menu_items[16].path = _("/Edit/Sep4"); menu_items[17].path = _("/Edit/Select _all"); menu_items[18].path = _("/_Help"); menu_items[19].path = _("/Help/_About"); } void GUI_CreateCalendarWindow() { int nmenu_items = sizeof(menu_items) / sizeof(menu_items[0]); GtkItemFactory *item_factory; GtkAccelGroup *accel_group; GtkWidget *menubar, *toolbar, *scrolledWindow, *hpaned; GtkWidget *main_vbox; GdkColormap *cmap; time_t t; struct tm *tm; SortColumn *sColumn; register gint i; gchar *titles[ENTRY_COLUMNS]; titles[ENTRY_ID] = _("#"); titles[ENTRY_TYPE] = _("Type"); titles[ENTRY_SDATE] = _("Start date"); titles[ENTRY_EDATE] = _("End date"); titles[ENTRY_TEXT] = _("Text"); titles[ENTRY_NUMBER] = _("Number"); titles[ENTRY_LOCATION] = _("Location"); titles[ENTRY_ALARM] = _("Alarm"); titles[ENTRY_RECURRENCE] = _("Recurrence"); InitMainMenu(); GUI_CalendarWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_wmclass(GTK_WINDOW(GUI_CalendarWindow), "CalendarWindow", "Xgnokii"); gtk_window_set_title(GTK_WINDOW(GUI_CalendarWindow), _("Calendar")); gtk_widget_set_usize (GTK_WIDGET (GUI_CalendarWindow), 1000, 400); gtk_signal_connect(GTK_OBJECT(GUI_CalendarWindow), "delete_event", GTK_SIGNAL_FUNC(DeleteEvent), NULL); gtk_widget_realize(GUI_CalendarWindow); accel_group = gtk_accel_group_new(); item_factory = gtk_item_factory_new(GTK_TYPE_MENU_BAR, "
", accel_group); gtk_item_factory_create_items(item_factory, nmenu_items, menu_items, NULL); gtk_window_add_accel_group (GTK_WINDOW(GUI_CalendarWindow), accel_group); /* Finally, return the actual menu bar created by the item factory. */ menubar = gtk_item_factory_get_widget(item_factory, "
"); main_vbox = gtk_vbox_new(FALSE, 1); gtk_container_border_width(GTK_CONTAINER(main_vbox), 1); gtk_container_add(GTK_CONTAINER(GUI_CalendarWindow), main_vbox); gtk_widget_show(main_vbox); gtk_box_pack_start(GTK_BOX(main_vbox), menubar, FALSE, FALSE, 0); gtk_widget_show(menubar); /* Create the toolbar */ toolbar = gtk_toolbar_new(); gtk_toolbar_set_style(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_ICONS); gtk_toolbar_set_orientation(GTK_TOOLBAR(toolbar), GTK_ORIENTATION_HORIZONTAL); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL, _("Read from phone"), NULL, NewPixmap(Read_xpm, GUI_CalendarWindow->window, &GUI_CalendarWindow->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc) ReadCalNotes, NULL); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL, _("Save to phone"), NULL, NewPixmap(Send_xpm, GUI_CalendarWindow->window, &GUI_CalendarWindow->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc) FunctionNotImplemented, NULL); gtk_toolbar_append_space(GTK_TOOLBAR(toolbar)); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL, _("Send via SMS"), NULL, NewPixmap(SendSMS_xpm, GUI_CalendarWindow->window, &GUI_CalendarWindow->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc) FunctionNotImplemented, NULL); gtk_toolbar_append_space(GTK_TOOLBAR(toolbar)); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL, _("Import from file"), NULL, NewPixmap(Open_xpm, GUI_CalendarWindow->window, &GUI_CalendarWindow->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc) FunctionNotImplemented, NULL); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL, _("Export to file"), NULL, NewPixmap(Save_xpm, GUI_CalendarWindow->window, &GUI_CalendarWindow->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc) FunctionNotImplemented, NULL); gtk_toolbar_append_space(GTK_TOOLBAR(toolbar)); /* gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL, _("Edit note"), NULL, NewPixmap(Edit_xpm, GUI_CalendarWindow->window, &GUI_CalendarWindow->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc) NULL, NULL); */ gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL, _("Add reminder"), NULL, NewPixmap(NewRem_xpm, GUI_CalendarWindow->window, &GUI_CalendarWindow->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc) AddReminder, NULL); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL, _("Add call"), NULL, NewPixmap(NewCall_xpm, GUI_CalendarWindow->window, &GUI_CalendarWindow->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc) AddCall, NULL); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL, _("Add meeting"), NULL, NewPixmap(NewMeet_xpm, GUI_CalendarWindow->window, &GUI_CalendarWindow->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc) AddMeeting, NULL); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL, _("Add birthday"), NULL, NewPixmap(NewBD_xpm, GUI_CalendarWindow->window, &GUI_CalendarWindow->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc) AddBirthday, NULL); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL, _("Delete note"), NULL, NewPixmap(Delete_xpm, GUI_CalendarWindow->window, &GUI_CalendarWindow->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc) DeleteNote, NULL); gtk_box_pack_start(GTK_BOX(main_vbox), toolbar, FALSE, FALSE, 0); gtk_widget_show(toolbar); hpaned = gtk_hpaned_new(); /* gtk_paned_set_handle_size (GTK_PANED (hpaned), 10); gtk_paned_set_gutter_size (GTK_PANED (hpaned), 15); */ gtk_box_pack_start(GTK_BOX(main_vbox), hpaned, TRUE, TRUE, 0); gtk_widget_show(hpaned); /* Note viewer */ cal.noteText = gtk_text_new(NULL, NULL); gtk_text_set_editable(GTK_TEXT(cal.noteText), FALSE); gtk_text_set_word_wrap(GTK_TEXT(cal.noteText), TRUE); scrolledWindow = gtk_scrolled_window_new(NULL, NULL); gtk_widget_set_usize (GTK_WIDGET (scrolledWindow), 250, 120); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledWindow), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); gtk_paned_add1(GTK_PANED(hpaned), scrolledWindow); gtk_container_add(GTK_CONTAINER(scrolledWindow), cal.noteText); gtk_widget_show_all(scrolledWindow); /* Calendar */ cal.calendar = gtk_calendar_new(); t = time(NULL); tm = localtime(&t); gtk_calendar_select_month(GTK_CALENDAR(cal.calendar), tm->tm_mon, tm->tm_year + 1900); gtk_calendar_select_day(GTK_CALENDAR(cal.calendar), tm->tm_mday); gtk_paned_add2(GTK_PANED(hpaned), cal.calendar); gtk_widget_show(cal.calendar); /* Notes list */ cal.notesClist = gtk_clist_new_with_titles(ENTRY_COLUMNS, titles); gtk_clist_set_shadow_type(GTK_CLIST(cal.notesClist), GTK_SHADOW_OUT); gtk_clist_set_compare_func(GTK_CLIST(cal.notesClist), CListCompareFunc); gtk_clist_set_sort_column(GTK_CLIST(cal.notesClist), 0); gtk_clist_set_sort_type(GTK_CLIST(cal.notesClist), GTK_SORT_ASCENDING); gtk_clist_set_auto_sort(GTK_CLIST(cal.notesClist), FALSE); gtk_clist_set_selection_mode(GTK_CLIST(cal.notesClist), GTK_SELECTION_EXTENDED); gtk_clist_set_column_width(GTK_CLIST(cal.notesClist), ENTRY_ID, 17); gtk_clist_set_column_width(GTK_CLIST(cal.notesClist), ENTRY_TYPE, 55); gtk_clist_set_column_width(GTK_CLIST(cal.notesClist), ENTRY_SDATE, 115); gtk_clist_set_column_width(GTK_CLIST(cal.notesClist), ENTRY_EDATE, 115); gtk_clist_set_column_width(GTK_CLIST(cal.notesClist), ENTRY_TEXT, 130); gtk_clist_set_column_width(GTK_CLIST(cal.notesClist), ENTRY_LOCATION, 80); gtk_clist_set_column_width(GTK_CLIST(cal.notesClist), ENTRY_NUMBER, 80); gtk_clist_set_column_width(GTK_CLIST(cal.notesClist), ENTRY_ALARM, 210); gtk_clist_set_column_width(GTK_CLIST(cal.notesClist), ENTRY_RECURRENCE, 120); gtk_clist_set_column_justification(GTK_CLIST(cal.notesClist), 0, GTK_JUSTIFY_RIGHT); for (i = 0; i < ENTRY_COLUMNS; i++) { if ((sColumn = g_malloc(sizeof(SortColumn))) == NULL) { g_print(_("Error: %s: line %d: Can't allocate memory!\n"), __FILE__, __LINE__); gtk_main_quit(); } sColumn->clist = cal.notesClist; sColumn->column = i; gtk_signal_connect(GTK_OBJECT(GTK_CLIST(cal.notesClist)->column[i].button), "clicked", GTK_SIGNAL_FUNC(SetSortColumn), (gpointer) sColumn); } gtk_signal_connect(GTK_OBJECT(cal.notesClist), "select_row", GTK_SIGNAL_FUNC(ClickEntry), NULL); scrolledWindow = gtk_scrolled_window_new(NULL, NULL); gtk_widget_set_usize(scrolledWindow, 900, 200); gtk_container_add(GTK_CONTAINER(scrolledWindow), cal.notesClist); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledWindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_box_pack_end(GTK_BOX(main_vbox), scrolledWindow, TRUE, TRUE, 0); gtk_widget_show(cal.notesClist); gtk_widget_show(scrolledWindow); cmap = gdk_colormap_get_system(); cal.colour.red = 0xffff; cal.colour.green = 0; cal.colour.blue = 0; if (!gdk_color_alloc(cmap, &(cal.colour))) g_error(_("couldn't allocate colour")); questMark.pixmap = gdk_pixmap_create_from_xpm_d(GUI_CalendarWindow->window, &questMark.mask, &GUI_CalendarWindow->style-> bg[GTK_STATE_NORMAL], quest_xpm); CreateErrorDialog(&errorDialog, GUI_CalendarWindow); } gnokii-0.6.31/xgnokii/xgnokii_speed.h0000644000175000017500000000176211666163120015662 0ustar leoleo/* $Id$ X G N O K I I A Linux/Unix GUI for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999 Pavel Janík ml., Hugh Blemings & 1999-2005 Jan Derfinak. */ #ifndef XGNOKII_SPEED_H #define XGNOKII_SPEED_H extern void GUI_CreateSpeedDialWindow(void); extern void GUI_ShowSpeedDial(void); #endif gnokii-0.6.31/xgnokii/Makefile.in0000644000175000017500000015555611666163212014743 0ustar leoleo# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ bin_PROGRAMS = xgnokii$(EXEEXT) subdir = xgnokii DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/xgnokii.pc.in ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_expand_dir.m4 \ $(top_srcdir)/m4/acx_pthread.m4 $(top_srcdir)/m4/intltool.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = xgnokii.pc CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(desktopdir)" \ "$(DESTDIR)$(pkgconfigdir)" PROGRAMS = $(bin_PROGRAMS) am_xgnokii_OBJECTS = xgnokii-xgnokii.$(OBJEXT) \ xgnokii-xgnokii_common.$(OBJEXT) \ xgnokii-xgnokii_contacts.$(OBJEXT) \ xgnokii-xgnokii_sms.$(OBJEXT) xgnokii-xgnokii_netmon.$(OBJEXT) \ xgnokii-xgnokii_dtmf.$(OBJEXT) xgnokii-xgnokii_cfg.$(OBJEXT) \ xgnokii-xgnokii_speed.$(OBJEXT) \ xgnokii-xgnokii_xkeyb.$(OBJEXT) \ xgnokii-xgnokii_calendar.$(OBJEXT) \ xgnokii-xgnokii_logos.$(OBJEXT) \ xgnokii-xgnokii_xring.$(OBJEXT) \ xgnokii-xgnokii_lowlevel.$(OBJEXT) \ xgnokii-xgnokii_data.$(OBJEXT) xgnokii_OBJECTS = $(am_xgnokii_OBJECTS) am__DEPENDENCIES_1 = xgnokii_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(top_builddir)/common/libgnokii.la \ $(top_builddir)/common/data/libDATA.la xgnokii_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(xgnokii_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(xgnokii_SOURCES) DIST_SOURCES = $(xgnokii_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' DATA = $(desktop_DATA) $(pkgconfig_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLUETOOTH_LIBS = @BLUETOOTH_LIBS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FIND = @FIND@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLDFLAGS = @GLDFLAGS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GMODULE_CFLAGS = @GMODULE_CFLAGS@ GMODULE_LIBS = @GMODULE_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GNOKII_LT_VERSION = @GNOKII_LT_VERSION@ GNOKII_LT_VERSION_AGE = @GNOKII_LT_VERSION_AGE@ GNOKII_LT_VERSION_CURRENT = @GNOKII_LT_VERSION_CURRENT@ GNOKII_LT_VERSION_REVISION = @GNOKII_LT_VERSION_REVISION@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_LIBICAL = @HAVE_LIBICAL@ HAVE_LIBUSB = @HAVE_LIBUSB@ HAVE_SOCKETPHONET = @HAVE_SOCKETPHONET@ HAVE_XGNOKII = @HAVE_XGNOKII@ ICAL_CFLAGS = @ICAL_CFLAGS@ ICAL_LIBS = @ICAL_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBGNOKII_VERSION_MAJOR = @LIBGNOKII_VERSION_MAJOR@ LIBGNOKII_VERSION_MINOR = @LIBGNOKII_VERSION_MINOR@ LIBGNOKII_VERSION_RELEASE = @LIBGNOKII_VERSION_RELEASE@ LIBGNOKII_VERSION_STRING = @LIBGNOKII_VERSION_STRING@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBPCSCLITE_CFLAGS = @LIBPCSCLITE_CFLAGS@ LIBPCSCLITE_LIBS = @LIBPCSCLITE_LIBS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKE = @MAKE@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ MYSQLCONFIG = @MYSQLCONFIG@ MYSQLCONFIG5 = @MYSQLCONFIG5@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_LIBS = @MYSQL_LIBS@ NEED_LOCALE_CHARSET = @NEED_LOCALE_CHARSET@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OWN_GETOPT = @OWN_GETOPT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PGCONFIG = @PGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSTGRES_CFLAGS = @POSTGRES_CFLAGS@ POSTGRES_LIBS = @POSTGRES_LIBS@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LIBS = @SQLITE3_LIBS@ SQLITE_CFLAGS = @SQLITE_CFLAGS@ SQLITE_LIBS = @SQLITE_LIBS@ STRIP = @STRIP@ TCP_LIBS = @TCP_LIBS@ TERMLDFLAGS = @TERMLDFLAGS@ TERMLIBS = @TERMLIBS@ USB_LIBS = @USB_LIBS@ USE_NLS = @USE_NLS@ USE_UNIX98PTYS = @USE_UNIX98PTYS@ VERSION = @VERSION@ WIN32 = @WIN32@ WIN32_CROSS = @WIN32_CROSS@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ XPACKAGE = @XPACKAGE@ XPM_CFLAGS = @XPM_CFLAGS@ XPM_LIBS = @XPM_LIBS@ XVERSION = @XVERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ acx_pthread_config = @acx_pthread_config@ 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@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = xpm AM_CFLAGS = \ $(PTHREAD_CFLAGS) \ $(GTK_CFLAGS) -DGTK_ENABLE_BROKEN \ -DLOCALEDIR=\"$(localedir)\" xgnokii_LDADD = \ $(PTHREAD_LIBS) $(GTK_LIBS) $(INTLLIBS) \ $(top_builddir)/common/libgnokii.la $(top_builddir)/common/data/libDATA.la xgnokii_CFLAGS = -I$(top_srcdir)/include $(AM_CFLAGS) xgnokii_SOURCES = \ xgnokii.c \ xgnokii_common.c \ xgnokii_contacts.c \ xgnokii_sms.c \ xgnokii_netmon.c \ xgnokii_dtmf.c \ xgnokii_cfg.c \ xgnokii_speed.c \ xgnokii_xkeyb.c \ xgnokii_calendar.c \ xgnokii_logos.c \ xgnokii_xring.c \ xgnokii_lowlevel.c \ xgnokii_data.c \ xgnokii_calendar.h \ xgnokii_cfg.h \ xgnokii_common.h \ xgnokii_contacts.h \ xgnokii_data.h \ xgnokii_dtmf.h \ xgnokii.h \ xgnokii_logos.h \ xgnokii_lowlevel.h \ xgnokii_netmon.h \ xgnokii_sms.h \ xgnokii_speed.h \ xgnokii_xkeyb.h \ xgnokii_xring.h pkgconfig_DATA = xgnokii.pc pkgconfigdir = $(libdir)/pkgconfig desktop_in_files = xgnokii.desktop.in desktopdir = $(datadir)/applications desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) CLEANFILES = $(desktop_DATA) EXTRA_DIST = xgnokii.pc.in $(desktop_in_files) README.vcard all: all-recursive .SUFFIXES: .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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu xgnokii/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu xgnokii/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 $(am__aclocal_m4_deps): xgnokii.pc: $(top_builddir)/config.status $(srcdir)/xgnokii.pc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list xgnokii$(EXEEXT): $(xgnokii_OBJECTS) $(xgnokii_DEPENDENCIES) @rm -f xgnokii$(EXEEXT) $(xgnokii_LINK) $(xgnokii_OBJECTS) $(xgnokii_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgnokii-xgnokii.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgnokii-xgnokii_calendar.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgnokii-xgnokii_cfg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgnokii-xgnokii_common.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgnokii-xgnokii_contacts.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgnokii-xgnokii_data.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgnokii-xgnokii_dtmf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgnokii-xgnokii_logos.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgnokii-xgnokii_lowlevel.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgnokii-xgnokii_netmon.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgnokii-xgnokii_sms.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgnokii-xgnokii_speed.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgnokii-xgnokii_xkeyb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgnokii-xgnokii_xring.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @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 $@ $< xgnokii-xgnokii.o: xgnokii.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -MT xgnokii-xgnokii.o -MD -MP -MF $(DEPDIR)/xgnokii-xgnokii.Tpo -c -o xgnokii-xgnokii.o `test -f 'xgnokii.c' || echo '$(srcdir)/'`xgnokii.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xgnokii-xgnokii.Tpo $(DEPDIR)/xgnokii-xgnokii.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xgnokii.c' object='xgnokii-xgnokii.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -c -o xgnokii-xgnokii.o `test -f 'xgnokii.c' || echo '$(srcdir)/'`xgnokii.c xgnokii-xgnokii.obj: xgnokii.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -MT xgnokii-xgnokii.obj -MD -MP -MF $(DEPDIR)/xgnokii-xgnokii.Tpo -c -o xgnokii-xgnokii.obj `if test -f 'xgnokii.c'; then $(CYGPATH_W) 'xgnokii.c'; else $(CYGPATH_W) '$(srcdir)/xgnokii.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xgnokii-xgnokii.Tpo $(DEPDIR)/xgnokii-xgnokii.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xgnokii.c' object='xgnokii-xgnokii.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -c -o xgnokii-xgnokii.obj `if test -f 'xgnokii.c'; then $(CYGPATH_W) 'xgnokii.c'; else $(CYGPATH_W) '$(srcdir)/xgnokii.c'; fi` xgnokii-xgnokii_common.o: xgnokii_common.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -MT xgnokii-xgnokii_common.o -MD -MP -MF $(DEPDIR)/xgnokii-xgnokii_common.Tpo -c -o xgnokii-xgnokii_common.o `test -f 'xgnokii_common.c' || echo '$(srcdir)/'`xgnokii_common.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xgnokii-xgnokii_common.Tpo $(DEPDIR)/xgnokii-xgnokii_common.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xgnokii_common.c' object='xgnokii-xgnokii_common.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -c -o xgnokii-xgnokii_common.o `test -f 'xgnokii_common.c' || echo '$(srcdir)/'`xgnokii_common.c xgnokii-xgnokii_common.obj: xgnokii_common.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -MT xgnokii-xgnokii_common.obj -MD -MP -MF $(DEPDIR)/xgnokii-xgnokii_common.Tpo -c -o xgnokii-xgnokii_common.obj `if test -f 'xgnokii_common.c'; then $(CYGPATH_W) 'xgnokii_common.c'; else $(CYGPATH_W) '$(srcdir)/xgnokii_common.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xgnokii-xgnokii_common.Tpo $(DEPDIR)/xgnokii-xgnokii_common.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xgnokii_common.c' object='xgnokii-xgnokii_common.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -c -o xgnokii-xgnokii_common.obj `if test -f 'xgnokii_common.c'; then $(CYGPATH_W) 'xgnokii_common.c'; else $(CYGPATH_W) '$(srcdir)/xgnokii_common.c'; fi` xgnokii-xgnokii_contacts.o: xgnokii_contacts.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -MT xgnokii-xgnokii_contacts.o -MD -MP -MF $(DEPDIR)/xgnokii-xgnokii_contacts.Tpo -c -o xgnokii-xgnokii_contacts.o `test -f 'xgnokii_contacts.c' || echo '$(srcdir)/'`xgnokii_contacts.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xgnokii-xgnokii_contacts.Tpo $(DEPDIR)/xgnokii-xgnokii_contacts.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xgnokii_contacts.c' object='xgnokii-xgnokii_contacts.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -c -o xgnokii-xgnokii_contacts.o `test -f 'xgnokii_contacts.c' || echo '$(srcdir)/'`xgnokii_contacts.c xgnokii-xgnokii_contacts.obj: xgnokii_contacts.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -MT xgnokii-xgnokii_contacts.obj -MD -MP -MF $(DEPDIR)/xgnokii-xgnokii_contacts.Tpo -c -o xgnokii-xgnokii_contacts.obj `if test -f 'xgnokii_contacts.c'; then $(CYGPATH_W) 'xgnokii_contacts.c'; else $(CYGPATH_W) '$(srcdir)/xgnokii_contacts.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xgnokii-xgnokii_contacts.Tpo $(DEPDIR)/xgnokii-xgnokii_contacts.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xgnokii_contacts.c' object='xgnokii-xgnokii_contacts.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -c -o xgnokii-xgnokii_contacts.obj `if test -f 'xgnokii_contacts.c'; then $(CYGPATH_W) 'xgnokii_contacts.c'; else $(CYGPATH_W) '$(srcdir)/xgnokii_contacts.c'; fi` xgnokii-xgnokii_sms.o: xgnokii_sms.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -MT xgnokii-xgnokii_sms.o -MD -MP -MF $(DEPDIR)/xgnokii-xgnokii_sms.Tpo -c -o xgnokii-xgnokii_sms.o `test -f 'xgnokii_sms.c' || echo '$(srcdir)/'`xgnokii_sms.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xgnokii-xgnokii_sms.Tpo $(DEPDIR)/xgnokii-xgnokii_sms.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xgnokii_sms.c' object='xgnokii-xgnokii_sms.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -c -o xgnokii-xgnokii_sms.o `test -f 'xgnokii_sms.c' || echo '$(srcdir)/'`xgnokii_sms.c xgnokii-xgnokii_sms.obj: xgnokii_sms.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -MT xgnokii-xgnokii_sms.obj -MD -MP -MF $(DEPDIR)/xgnokii-xgnokii_sms.Tpo -c -o xgnokii-xgnokii_sms.obj `if test -f 'xgnokii_sms.c'; then $(CYGPATH_W) 'xgnokii_sms.c'; else $(CYGPATH_W) '$(srcdir)/xgnokii_sms.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xgnokii-xgnokii_sms.Tpo $(DEPDIR)/xgnokii-xgnokii_sms.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xgnokii_sms.c' object='xgnokii-xgnokii_sms.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -c -o xgnokii-xgnokii_sms.obj `if test -f 'xgnokii_sms.c'; then $(CYGPATH_W) 'xgnokii_sms.c'; else $(CYGPATH_W) '$(srcdir)/xgnokii_sms.c'; fi` xgnokii-xgnokii_netmon.o: xgnokii_netmon.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -MT xgnokii-xgnokii_netmon.o -MD -MP -MF $(DEPDIR)/xgnokii-xgnokii_netmon.Tpo -c -o xgnokii-xgnokii_netmon.o `test -f 'xgnokii_netmon.c' || echo '$(srcdir)/'`xgnokii_netmon.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xgnokii-xgnokii_netmon.Tpo $(DEPDIR)/xgnokii-xgnokii_netmon.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xgnokii_netmon.c' object='xgnokii-xgnokii_netmon.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -c -o xgnokii-xgnokii_netmon.o `test -f 'xgnokii_netmon.c' || echo '$(srcdir)/'`xgnokii_netmon.c xgnokii-xgnokii_netmon.obj: xgnokii_netmon.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -MT xgnokii-xgnokii_netmon.obj -MD -MP -MF $(DEPDIR)/xgnokii-xgnokii_netmon.Tpo -c -o xgnokii-xgnokii_netmon.obj `if test -f 'xgnokii_netmon.c'; then $(CYGPATH_W) 'xgnokii_netmon.c'; else $(CYGPATH_W) '$(srcdir)/xgnokii_netmon.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xgnokii-xgnokii_netmon.Tpo $(DEPDIR)/xgnokii-xgnokii_netmon.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xgnokii_netmon.c' object='xgnokii-xgnokii_netmon.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -c -o xgnokii-xgnokii_netmon.obj `if test -f 'xgnokii_netmon.c'; then $(CYGPATH_W) 'xgnokii_netmon.c'; else $(CYGPATH_W) '$(srcdir)/xgnokii_netmon.c'; fi` xgnokii-xgnokii_dtmf.o: xgnokii_dtmf.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -MT xgnokii-xgnokii_dtmf.o -MD -MP -MF $(DEPDIR)/xgnokii-xgnokii_dtmf.Tpo -c -o xgnokii-xgnokii_dtmf.o `test -f 'xgnokii_dtmf.c' || echo '$(srcdir)/'`xgnokii_dtmf.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xgnokii-xgnokii_dtmf.Tpo $(DEPDIR)/xgnokii-xgnokii_dtmf.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xgnokii_dtmf.c' object='xgnokii-xgnokii_dtmf.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -c -o xgnokii-xgnokii_dtmf.o `test -f 'xgnokii_dtmf.c' || echo '$(srcdir)/'`xgnokii_dtmf.c xgnokii-xgnokii_dtmf.obj: xgnokii_dtmf.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -MT xgnokii-xgnokii_dtmf.obj -MD -MP -MF $(DEPDIR)/xgnokii-xgnokii_dtmf.Tpo -c -o xgnokii-xgnokii_dtmf.obj `if test -f 'xgnokii_dtmf.c'; then $(CYGPATH_W) 'xgnokii_dtmf.c'; else $(CYGPATH_W) '$(srcdir)/xgnokii_dtmf.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xgnokii-xgnokii_dtmf.Tpo $(DEPDIR)/xgnokii-xgnokii_dtmf.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xgnokii_dtmf.c' object='xgnokii-xgnokii_dtmf.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -c -o xgnokii-xgnokii_dtmf.obj `if test -f 'xgnokii_dtmf.c'; then $(CYGPATH_W) 'xgnokii_dtmf.c'; else $(CYGPATH_W) '$(srcdir)/xgnokii_dtmf.c'; fi` xgnokii-xgnokii_cfg.o: xgnokii_cfg.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -MT xgnokii-xgnokii_cfg.o -MD -MP -MF $(DEPDIR)/xgnokii-xgnokii_cfg.Tpo -c -o xgnokii-xgnokii_cfg.o `test -f 'xgnokii_cfg.c' || echo '$(srcdir)/'`xgnokii_cfg.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xgnokii-xgnokii_cfg.Tpo $(DEPDIR)/xgnokii-xgnokii_cfg.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xgnokii_cfg.c' object='xgnokii-xgnokii_cfg.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -c -o xgnokii-xgnokii_cfg.o `test -f 'xgnokii_cfg.c' || echo '$(srcdir)/'`xgnokii_cfg.c xgnokii-xgnokii_cfg.obj: xgnokii_cfg.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -MT xgnokii-xgnokii_cfg.obj -MD -MP -MF $(DEPDIR)/xgnokii-xgnokii_cfg.Tpo -c -o xgnokii-xgnokii_cfg.obj `if test -f 'xgnokii_cfg.c'; then $(CYGPATH_W) 'xgnokii_cfg.c'; else $(CYGPATH_W) '$(srcdir)/xgnokii_cfg.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xgnokii-xgnokii_cfg.Tpo $(DEPDIR)/xgnokii-xgnokii_cfg.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xgnokii_cfg.c' object='xgnokii-xgnokii_cfg.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -c -o xgnokii-xgnokii_cfg.obj `if test -f 'xgnokii_cfg.c'; then $(CYGPATH_W) 'xgnokii_cfg.c'; else $(CYGPATH_W) '$(srcdir)/xgnokii_cfg.c'; fi` xgnokii-xgnokii_speed.o: xgnokii_speed.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -MT xgnokii-xgnokii_speed.o -MD -MP -MF $(DEPDIR)/xgnokii-xgnokii_speed.Tpo -c -o xgnokii-xgnokii_speed.o `test -f 'xgnokii_speed.c' || echo '$(srcdir)/'`xgnokii_speed.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xgnokii-xgnokii_speed.Tpo $(DEPDIR)/xgnokii-xgnokii_speed.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xgnokii_speed.c' object='xgnokii-xgnokii_speed.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -c -o xgnokii-xgnokii_speed.o `test -f 'xgnokii_speed.c' || echo '$(srcdir)/'`xgnokii_speed.c xgnokii-xgnokii_speed.obj: xgnokii_speed.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -MT xgnokii-xgnokii_speed.obj -MD -MP -MF $(DEPDIR)/xgnokii-xgnokii_speed.Tpo -c -o xgnokii-xgnokii_speed.obj `if test -f 'xgnokii_speed.c'; then $(CYGPATH_W) 'xgnokii_speed.c'; else $(CYGPATH_W) '$(srcdir)/xgnokii_speed.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xgnokii-xgnokii_speed.Tpo $(DEPDIR)/xgnokii-xgnokii_speed.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xgnokii_speed.c' object='xgnokii-xgnokii_speed.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -c -o xgnokii-xgnokii_speed.obj `if test -f 'xgnokii_speed.c'; then $(CYGPATH_W) 'xgnokii_speed.c'; else $(CYGPATH_W) '$(srcdir)/xgnokii_speed.c'; fi` xgnokii-xgnokii_xkeyb.o: xgnokii_xkeyb.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -MT xgnokii-xgnokii_xkeyb.o -MD -MP -MF $(DEPDIR)/xgnokii-xgnokii_xkeyb.Tpo -c -o xgnokii-xgnokii_xkeyb.o `test -f 'xgnokii_xkeyb.c' || echo '$(srcdir)/'`xgnokii_xkeyb.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xgnokii-xgnokii_xkeyb.Tpo $(DEPDIR)/xgnokii-xgnokii_xkeyb.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xgnokii_xkeyb.c' object='xgnokii-xgnokii_xkeyb.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -c -o xgnokii-xgnokii_xkeyb.o `test -f 'xgnokii_xkeyb.c' || echo '$(srcdir)/'`xgnokii_xkeyb.c xgnokii-xgnokii_xkeyb.obj: xgnokii_xkeyb.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -MT xgnokii-xgnokii_xkeyb.obj -MD -MP -MF $(DEPDIR)/xgnokii-xgnokii_xkeyb.Tpo -c -o xgnokii-xgnokii_xkeyb.obj `if test -f 'xgnokii_xkeyb.c'; then $(CYGPATH_W) 'xgnokii_xkeyb.c'; else $(CYGPATH_W) '$(srcdir)/xgnokii_xkeyb.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xgnokii-xgnokii_xkeyb.Tpo $(DEPDIR)/xgnokii-xgnokii_xkeyb.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xgnokii_xkeyb.c' object='xgnokii-xgnokii_xkeyb.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -c -o xgnokii-xgnokii_xkeyb.obj `if test -f 'xgnokii_xkeyb.c'; then $(CYGPATH_W) 'xgnokii_xkeyb.c'; else $(CYGPATH_W) '$(srcdir)/xgnokii_xkeyb.c'; fi` xgnokii-xgnokii_calendar.o: xgnokii_calendar.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -MT xgnokii-xgnokii_calendar.o -MD -MP -MF $(DEPDIR)/xgnokii-xgnokii_calendar.Tpo -c -o xgnokii-xgnokii_calendar.o `test -f 'xgnokii_calendar.c' || echo '$(srcdir)/'`xgnokii_calendar.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xgnokii-xgnokii_calendar.Tpo $(DEPDIR)/xgnokii-xgnokii_calendar.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xgnokii_calendar.c' object='xgnokii-xgnokii_calendar.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -c -o xgnokii-xgnokii_calendar.o `test -f 'xgnokii_calendar.c' || echo '$(srcdir)/'`xgnokii_calendar.c xgnokii-xgnokii_calendar.obj: xgnokii_calendar.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -MT xgnokii-xgnokii_calendar.obj -MD -MP -MF $(DEPDIR)/xgnokii-xgnokii_calendar.Tpo -c -o xgnokii-xgnokii_calendar.obj `if test -f 'xgnokii_calendar.c'; then $(CYGPATH_W) 'xgnokii_calendar.c'; else $(CYGPATH_W) '$(srcdir)/xgnokii_calendar.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xgnokii-xgnokii_calendar.Tpo $(DEPDIR)/xgnokii-xgnokii_calendar.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xgnokii_calendar.c' object='xgnokii-xgnokii_calendar.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -c -o xgnokii-xgnokii_calendar.obj `if test -f 'xgnokii_calendar.c'; then $(CYGPATH_W) 'xgnokii_calendar.c'; else $(CYGPATH_W) '$(srcdir)/xgnokii_calendar.c'; fi` xgnokii-xgnokii_logos.o: xgnokii_logos.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -MT xgnokii-xgnokii_logos.o -MD -MP -MF $(DEPDIR)/xgnokii-xgnokii_logos.Tpo -c -o xgnokii-xgnokii_logos.o `test -f 'xgnokii_logos.c' || echo '$(srcdir)/'`xgnokii_logos.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xgnokii-xgnokii_logos.Tpo $(DEPDIR)/xgnokii-xgnokii_logos.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xgnokii_logos.c' object='xgnokii-xgnokii_logos.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -c -o xgnokii-xgnokii_logos.o `test -f 'xgnokii_logos.c' || echo '$(srcdir)/'`xgnokii_logos.c xgnokii-xgnokii_logos.obj: xgnokii_logos.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -MT xgnokii-xgnokii_logos.obj -MD -MP -MF $(DEPDIR)/xgnokii-xgnokii_logos.Tpo -c -o xgnokii-xgnokii_logos.obj `if test -f 'xgnokii_logos.c'; then $(CYGPATH_W) 'xgnokii_logos.c'; else $(CYGPATH_W) '$(srcdir)/xgnokii_logos.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xgnokii-xgnokii_logos.Tpo $(DEPDIR)/xgnokii-xgnokii_logos.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xgnokii_logos.c' object='xgnokii-xgnokii_logos.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -c -o xgnokii-xgnokii_logos.obj `if test -f 'xgnokii_logos.c'; then $(CYGPATH_W) 'xgnokii_logos.c'; else $(CYGPATH_W) '$(srcdir)/xgnokii_logos.c'; fi` xgnokii-xgnokii_xring.o: xgnokii_xring.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -MT xgnokii-xgnokii_xring.o -MD -MP -MF $(DEPDIR)/xgnokii-xgnokii_xring.Tpo -c -o xgnokii-xgnokii_xring.o `test -f 'xgnokii_xring.c' || echo '$(srcdir)/'`xgnokii_xring.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xgnokii-xgnokii_xring.Tpo $(DEPDIR)/xgnokii-xgnokii_xring.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xgnokii_xring.c' object='xgnokii-xgnokii_xring.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -c -o xgnokii-xgnokii_xring.o `test -f 'xgnokii_xring.c' || echo '$(srcdir)/'`xgnokii_xring.c xgnokii-xgnokii_xring.obj: xgnokii_xring.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -MT xgnokii-xgnokii_xring.obj -MD -MP -MF $(DEPDIR)/xgnokii-xgnokii_xring.Tpo -c -o xgnokii-xgnokii_xring.obj `if test -f 'xgnokii_xring.c'; then $(CYGPATH_W) 'xgnokii_xring.c'; else $(CYGPATH_W) '$(srcdir)/xgnokii_xring.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xgnokii-xgnokii_xring.Tpo $(DEPDIR)/xgnokii-xgnokii_xring.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xgnokii_xring.c' object='xgnokii-xgnokii_xring.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -c -o xgnokii-xgnokii_xring.obj `if test -f 'xgnokii_xring.c'; then $(CYGPATH_W) 'xgnokii_xring.c'; else $(CYGPATH_W) '$(srcdir)/xgnokii_xring.c'; fi` xgnokii-xgnokii_lowlevel.o: xgnokii_lowlevel.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -MT xgnokii-xgnokii_lowlevel.o -MD -MP -MF $(DEPDIR)/xgnokii-xgnokii_lowlevel.Tpo -c -o xgnokii-xgnokii_lowlevel.o `test -f 'xgnokii_lowlevel.c' || echo '$(srcdir)/'`xgnokii_lowlevel.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xgnokii-xgnokii_lowlevel.Tpo $(DEPDIR)/xgnokii-xgnokii_lowlevel.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xgnokii_lowlevel.c' object='xgnokii-xgnokii_lowlevel.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -c -o xgnokii-xgnokii_lowlevel.o `test -f 'xgnokii_lowlevel.c' || echo '$(srcdir)/'`xgnokii_lowlevel.c xgnokii-xgnokii_lowlevel.obj: xgnokii_lowlevel.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -MT xgnokii-xgnokii_lowlevel.obj -MD -MP -MF $(DEPDIR)/xgnokii-xgnokii_lowlevel.Tpo -c -o xgnokii-xgnokii_lowlevel.obj `if test -f 'xgnokii_lowlevel.c'; then $(CYGPATH_W) 'xgnokii_lowlevel.c'; else $(CYGPATH_W) '$(srcdir)/xgnokii_lowlevel.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xgnokii-xgnokii_lowlevel.Tpo $(DEPDIR)/xgnokii-xgnokii_lowlevel.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xgnokii_lowlevel.c' object='xgnokii-xgnokii_lowlevel.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -c -o xgnokii-xgnokii_lowlevel.obj `if test -f 'xgnokii_lowlevel.c'; then $(CYGPATH_W) 'xgnokii_lowlevel.c'; else $(CYGPATH_W) '$(srcdir)/xgnokii_lowlevel.c'; fi` xgnokii-xgnokii_data.o: xgnokii_data.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -MT xgnokii-xgnokii_data.o -MD -MP -MF $(DEPDIR)/xgnokii-xgnokii_data.Tpo -c -o xgnokii-xgnokii_data.o `test -f 'xgnokii_data.c' || echo '$(srcdir)/'`xgnokii_data.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xgnokii-xgnokii_data.Tpo $(DEPDIR)/xgnokii-xgnokii_data.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xgnokii_data.c' object='xgnokii-xgnokii_data.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -c -o xgnokii-xgnokii_data.o `test -f 'xgnokii_data.c' || echo '$(srcdir)/'`xgnokii_data.c xgnokii-xgnokii_data.obj: xgnokii_data.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -MT xgnokii-xgnokii_data.obj -MD -MP -MF $(DEPDIR)/xgnokii-xgnokii_data.Tpo -c -o xgnokii-xgnokii_data.obj `if test -f 'xgnokii_data.c'; then $(CYGPATH_W) 'xgnokii_data.c'; else $(CYGPATH_W) '$(srcdir)/xgnokii_data.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xgnokii-xgnokii_data.Tpo $(DEPDIR)/xgnokii-xgnokii_data.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xgnokii_data.c' object='xgnokii-xgnokii_data.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgnokii_CFLAGS) $(CFLAGS) -c -o xgnokii-xgnokii_data.obj `if test -f 'xgnokii_data.c'; then $(CYGPATH_W) 'xgnokii_data.c'; else $(CYGPATH_W) '$(srcdir)/xgnokii_data.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-desktopDATA: $(desktop_DATA) @$(NORMAL_INSTALL) test -z "$(desktopdir)" || $(MKDIR_P) "$(DESTDIR)$(desktopdir)" @list='$(desktop_DATA)'; test -n "$(desktopdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(desktopdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(desktopdir)" || exit $$?; \ done uninstall-desktopDATA: @$(NORMAL_UNINSTALL) @list='$(desktop_DATA)'; test -n "$(desktopdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(desktopdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(desktopdir)" && rm -f $$files install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(PROGRAMS) $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(desktopdir)" "$(DESTDIR)$(pkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-recursive clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-desktopDATA install-pkgconfigDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-desktopDATA \ uninstall-pkgconfigDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags ctags-recursive distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ install-data-am install-desktopDATA install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-pkgconfigDATA install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-binPROGRAMS \ uninstall-desktopDATA uninstall-pkgconfigDATA @INTLTOOL_DESKTOP_RULE@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gnokii-0.6.31/xgnokii/xgnokii_netmon.h0000644000175000017500000000216511666163120016060 0ustar leoleo/* $Id$ X G N O K I I A Linux/Unix GUI for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999 Pavel Janík ml., Hugh Blemings & 1999-2005 Jan Derfinak. */ #ifndef XGNOKII_NETMON_H #define XGNOKII_NETMON_H #include typedef struct { GtkWidget *number; GtkWidget *label; gint curDisp; } DisplayData; extern void GUI_CreateNetmonWindow(); extern void GUI_ShowNetmon(); extern void GUI_RefreshNetmon(); #endif gnokii-0.6.31/xgnokii/xgnokii_netmon.c0000644000175000017500000004334211666163120016055 0ustar leoleo/* $Id$ X G N O K I I A Linux/Unix GUI for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999 Pavel Janik ml., Hugh Blemings & 1999-2005 Jan Derfinak. Copyright (C) 2002-2004 Pawel Kot */ #include "config.h" #ifndef WIN32 # include #endif #include #include /* for atoi */ #include #include #include "misc.h" #include "xgnokii_common.h" #include "xgnokii.h" #include "xgnokii_lowlevel.h" #include "xgnokii_netmon.h" #include "xpm/Display.xpm" static GtkWidget *GUI_NetmonWindow; static DisplayData displayData = { NULL, NULL, 0 }; static GtkWidget *tableLabels[4][7]; static GtkWidget *tableProgress[7]; static inline void CloseNetmon(GtkWidget * w, gpointer data) { PhoneEvent *e; e = (PhoneEvent *) g_malloc(sizeof(PhoneEvent)); e->event = Event_NetMonitor; e->data = (gpointer) 0; GUI_InsertEvent(e); gtk_widget_hide(GUI_NetmonWindow); } static inline void NetmonOnOff(GtkWidget * w, gpointer data) { PhoneEvent *e; e = (PhoneEvent *) g_malloc(sizeof(PhoneEvent)); e->event = Event_NetMonitorOnOff; e->data = data; GUI_InsertEvent(e); } static inline void RefreshDisplay() { static gchar number[3]; if (!GTK_WIDGET_VISIBLE(GUI_NetmonWindow)) return; g_snprintf(number, 3, "%.2d", displayData.curDisp); if (displayData.number) gtk_label_set_text(GTK_LABEL(displayData.number), number); pthread_mutex_lock(&netMonMutex); if (phoneMonitor.netmonitor.screen && displayData.label) gtk_label_set_text(GTK_LABEL(displayData.label), g_strchomp(phoneMonitor.netmonitor.screen)); pthread_mutex_unlock(&netMonMutex); } static void SetDisplay(GtkWidget * widget, gpointer data) { PhoneEvent *e; e = (PhoneEvent *) g_malloc(sizeof(PhoneEvent)); e->event = Event_NetMonitor; e->data = data; GUI_InsertEvent(e); displayData.curDisp = GPOINTER_TO_INT(data); RefreshDisplay(); } static void ChangedSpinner(GtkWidget * widget, GtkSpinButton * spin) { PhoneEvent *e; displayData.curDisp = gtk_spin_button_get_value_as_int(spin); e = (PhoneEvent *) g_malloc(sizeof(PhoneEvent)); e->event = Event_NetMonitor; e->data = (gpointer) displayData.curDisp; GUI_InsertEvent(e); RefreshDisplay(); } static void ParseScreen(gchar * screen, gint i) { gchar buf[5]; gchar *ptr = screen; if (ptr == NULL || *ptr == '\0') return; strncpy(buf, ptr, 3); buf[3] = '\0'; gtk_label_set_text(GTK_LABEL(tableLabels[0][i]), buf); ptr += 3; strncpy(buf, ptr, 3); buf[3] = '\0'; gtk_label_set_text(GTK_LABEL(tableLabels[2][i]), buf); ptr += 3; if (*ptr != '-') { buf[0] = '-'; strncpy(buf + 1, ptr, 3); buf[4] = '\0'; } else { strncpy(buf, ptr, 3); buf[3] = '\0'; } gtk_label_set_text(GTK_LABEL(tableLabels[1][i]), buf); ptr += 3; gtk_progress_set_value(GTK_PROGRESS(tableProgress[i]), atoi(buf)); strncpy(buf, ptr, 3); buf[3] = '\0'; gtk_label_set_text(GTK_LABEL(tableLabels[3][i]), buf); ptr += 4; if (i == 6) return; i++; strncpy(buf, ptr, 3); buf[3] = '\0'; gtk_label_set_text(GTK_LABEL(tableLabels[0][i]), buf); ptr += 3; strncpy(buf, ptr, 3); buf[3] = '\0'; gtk_label_set_text(GTK_LABEL(tableLabels[2][i]), buf); ptr += 3; if (*ptr != '-') { buf[0] = '-'; strncpy(buf + 1, ptr, 3); buf[4] = '\0'; } else { strncpy(buf, ptr, 3); buf[3] = '\0'; } gtk_label_set_text(GTK_LABEL(tableLabels[1][i]), buf); ptr += 3; gtk_progress_set_value(GTK_PROGRESS(tableProgress[i]), atoi(buf)); strncpy(buf, ptr, 3); buf[3] = '\0'; gtk_label_set_text(GTK_LABEL(tableLabels[3][i]), buf); ptr += 4; i++; strncpy(buf, ptr, 3); buf[3] = '\0'; gtk_label_set_text(GTK_LABEL(tableLabels[0][i]), buf); ptr += 3; strncpy(buf, ptr, 3); buf[3] = '\0'; gtk_label_set_text(GTK_LABEL(tableLabels[2][i]), buf); ptr += 3; if (*ptr != '-') { buf[0] = '-'; strncpy(buf + 1, ptr, 3); buf[4] = '\0'; } else { strncpy(buf, ptr, 3); buf[3] = '\0'; } gtk_label_set_text(GTK_LABEL(tableLabels[1][i]), buf); ptr += 3; gtk_progress_set_value(GTK_PROGRESS(tableProgress[i]), atoi(buf)); strncpy(buf, ptr, 3); buf[3] = '\0'; gtk_label_set_text(GTK_LABEL(tableLabels[3][i]), buf); } void GUI_RefreshNetmon() { if (!GTK_WIDGET_VISIBLE(GUI_NetmonWindow)) return; pthread_mutex_lock(&netMonMutex); ParseScreen(phoneMonitor.netmonitor.screen3, 0); ParseScreen(phoneMonitor.netmonitor.screen4, 3); ParseScreen(phoneMonitor.netmonitor.screen5, 6); pthread_mutex_unlock(&netMonMutex); RefreshDisplay(); } void AddToBorder(GtkWidget * table, gchar * text, gint i, gint j, gint k, gint l) { GtkWidget *label = gtk_label_new(text); GtkWidget *frame = gtk_frame_new(NULL); // gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_OUT); gtk_container_add(GTK_CONTAINER(frame), label); gtk_table_attach_defaults(GTK_TABLE(table), frame, i, j, k, l); } inline void GUI_ShowNetmon() { PhoneEvent *e; e = (PhoneEvent *) g_malloc(sizeof(PhoneEvent)); e->event = Event_NetMonitor; e->data = (gpointer) displayData.curDisp;; GUI_InsertEvent(e); gtk_window_present(GTK_WINDOW(GUI_NetmonWindow)); } static GtkItemFactoryEntry menu_items[] = { {NULL, NULL, NULL, 0, ""}, {NULL, "W", CloseNetmon, 0, NULL}, {NULL, NULL, NULL, 0, ""}, {NULL, NULL, NetmonOnOff, 1, NULL}, {NULL, NULL, NetmonOnOff, 0, NULL}, {NULL, NULL, NULL, 0, ""}, {NULL, NULL, GUI_ShowAbout, 0, NULL}, }; static void InitMainMenu(void) { menu_items[0].path = _("/_File"); menu_items[1].path = _("/File/_Close"); menu_items[2].path = _("/_Tools"); menu_items[3].path = _("/Tools/Net monitor o_n"); menu_items[4].path = _("/Tools/Net monitor o_ff"); menu_items[5].path = _("/_Help"); menu_items[6].path = _("/Help/_About"); } #define DISPLAY_X 12 #define DISPLAY_Y 15 void GUI_CreateNetmonWindow() { int nmenu_items = sizeof(menu_items) / sizeof(menu_items[0]); GtkItemFactory *item_factory; GtkAccelGroup *accel_group; GtkWidget *menubar; GtkWidget *main_vbox; GtkWidget *hbox, *vbox; GtkWidget *toolbar; GtkWidget *table; GtkWidget *display; GtkWidget *label; GtkWidget *frame; GtkWidget *button; GtkWidget *pixmap; GtkAdjustment *adj; gint i, j; InitMainMenu(); GUI_NetmonWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_wmclass(GTK_WINDOW(GUI_NetmonWindow), "NetmonWindow", "Xgnokii"); gtk_window_set_title(GTK_WINDOW(GUI_NetmonWindow), _("Net Monitor")); //gtk_widget_set_usize (GTK_WIDGET (GUI_NetmonWindow), 436, 220); gtk_signal_connect(GTK_OBJECT(GUI_NetmonWindow), "delete_event", GTK_SIGNAL_FUNC(DeleteEvent), NULL); gtk_widget_realize(GUI_NetmonWindow); accel_group = gtk_accel_group_new(); item_factory = gtk_item_factory_new(GTK_TYPE_MENU_BAR, "
", accel_group); gtk_item_factory_create_items(item_factory, nmenu_items, menu_items, NULL); gtk_window_add_accel_group(GTK_WINDOW(GUI_NetmonWindow), accel_group); /* Finally, return the actual menu bar created by the item factory. */ menubar = gtk_item_factory_get_widget(item_factory, "
"); main_vbox = gtk_vbox_new(FALSE, 1); gtk_container_border_width(GTK_CONTAINER(main_vbox), 1); gtk_container_add(GTK_CONTAINER(GUI_NetmonWindow), main_vbox); gtk_widget_show(main_vbox); gtk_box_pack_start(GTK_BOX(main_vbox), menubar, FALSE, FALSE, 0); gtk_widget_show(menubar); frame = gtk_frame_new(NULL); gtk_container_border_width(GTK_CONTAINER(frame), 10); gtk_widget_show(frame); hbox = gtk_hbox_new(FALSE, 0); gtk_container_border_width(GTK_CONTAINER(hbox), 3); gtk_container_add(GTK_CONTAINER(frame), hbox); gtk_box_pack_start(GTK_BOX(main_vbox), frame, FALSE, FALSE, 0); gtk_widget_show(hbox); display = gtk_fixed_new(); gtk_box_pack_start(GTK_BOX(hbox), display, FALSE, FALSE, 10); gtk_widget_show(display); pixmap = NewPixmap(Display_xpm, GUI_NetmonWindow->window, &GUI_NetmonWindow->style->bg[GTK_STATE_NORMAL]); gtk_fixed_put(GTK_FIXED(display), pixmap, 0, 0); gtk_widget_show(pixmap); displayData.number = gtk_label_new(""); gtk_fixed_put(GTK_FIXED(display), displayData.number, DISPLAY_X, DISPLAY_Y); gtk_widget_show(displayData.number); displayData.label = gtk_label_new(""); gtk_fixed_put(GTK_FIXED(display), displayData.label, DISPLAY_X + 3, DISPLAY_Y + 12); gtk_widget_show(displayData.label); displayData.curDisp = 0x01; vbox = gtk_vbox_new(TRUE, 0); /* 1. line */ toolbar = gtk_toolbar_new(); gtk_toolbar_set_style(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_TEXT); gtk_toolbar_set_orientation(GTK_TOOLBAR(toolbar), GTK_ORIENTATION_HORIZONTAL); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "1", _("Active cell"), NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 1); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "2", _("Active cell"), NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 2); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "3", _("NCELL list I"), NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 3); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "4", _("NCELL list II"), NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 4); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "5", _("NCELL list III"), NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 5); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "6", _("Preferred/Denied networks"), NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 6); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "7", _("System information bits"), NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 7); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "10", _("TMSI, Paging, PLU"), NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 10); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "11", _("Cells info"), NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 11); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "12", _("DTX, Cipher, Hopping"), NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 12); gtk_box_pack_start(GTK_BOX(vbox), toolbar, FALSE, FALSE, 0); gtk_widget_show(toolbar); /* 2. line */ toolbar = gtk_toolbar_new(); gtk_toolbar_set_style(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_TEXT); gtk_toolbar_set_orientation(GTK_TOOLBAR(toolbar), GTK_ORIENTATION_HORIZONTAL); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "13", _("Uplink DTX"), NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 13); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "17", _("BTS TEST"), NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 17); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "19", _("CELL BARR-Flag"), NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 19); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "20", _("Accumulator, Charge status"), NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 20); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "21", _("?Constant voltage charging display"), NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 21); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "22", _("?Battery full detection"), NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 22); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "23", _("Accumulator"), NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 23); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "35", _("SW-Resets"), NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 35); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "36", _("Reset-Counter"), NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 36); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "39", _("Cause codes for last connection abortion"), NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 39); gtk_box_pack_start(GTK_BOX(vbox), toolbar, FALSE, FALSE, 0); gtk_widget_show(toolbar); /* 3. line */ toolbar = gtk_toolbar_new(); gtk_toolbar_set_style(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_TEXT); gtk_toolbar_set_orientation(GTK_TOOLBAR(toolbar), GTK_ORIENTATION_HORIZONTAL); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "40", _("Reset handover counters"), NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 40); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "41", _("Handover Counter"), NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 41); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "42", _("Handover Counter (Dual)"), NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 42); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "43", _("L2-Timeouts"), NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 43); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "51", _("SIM"), NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 51); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "54", _("?Block display 1"), NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 54); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "56", NULL, NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 56); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "57", _("Memory status before reset"), NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 57); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "60", _("Reset Counters"), NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 60); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "61", _("Counter for PLMN Search and Cell reselection (Singleband)"), NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 61); gtk_box_pack_start(GTK_BOX(vbox), toolbar, FALSE, FALSE, 0); gtk_widget_show(toolbar); /* 4. line */ toolbar = gtk_toolbar_new(); gtk_toolbar_set_style(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_TEXT); gtk_toolbar_set_orientation(GTK_TOOLBAR(toolbar), GTK_ORIENTATION_HORIZONTAL); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "62", _("Neighbourhood measurement"), NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 62); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "63", _("Calls"), NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 63); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "70", _("Temporary counters of DSP"), NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 70); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "83", _("Control of task information displays"), NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 83); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "84", _("Information about task numbers 0-7"), NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 84); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "85", _("Information about task numbers 8-15"), NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 85); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "86", _("Information about task numbers 16-23"), NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 86); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "87", _("Information about OS_SYSTEM_STACK"), NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 87); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "88", _("Information about current MCU and DSP software versions"), NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 88); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "89", _("Hardware version"), NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 89); gtk_box_pack_start(GTK_BOX(vbox), toolbar, FALSE, FALSE, 0); gtk_widget_show(toolbar); gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 10); gtk_widget_show(vbox); table = gtk_table_new(6, 8, FALSE); frame = gtk_frame_new(NULL); gtk_container_add(GTK_CONTAINER(frame), table); gtk_container_border_width(GTK_CONTAINER(frame), 10); gtk_container_border_width(GTK_CONTAINER(table), 3); gtk_box_pack_start(GTK_BOX(main_vbox), frame, FALSE, FALSE, 0); gtk_widget_show(frame); AddToBorder(table, "", 0, 1, 0, 1); AddToBorder(table, _("Chan"), 1, 2, 0, 1); AddToBorder(table, _("RxLv"), 2, 3, 0, 1); AddToBorder(table, _("C1"), 3, 4, 0, 1); AddToBorder(table, _("C2"), 4, 5, 0, 1); AddToBorder(table, _("ACT"), 0, 1, 1, 2); AddToBorder(table, _("NC2"), 0, 1, 2, 3); AddToBorder(table, _("NC3"), 0, 1, 3, 4); AddToBorder(table, _("NC4"), 0, 1, 4, 5); AddToBorder(table, _("NC5"), 0, 1, 5, 6); AddToBorder(table, _("NC6"), 0, 1, 6, 7); AddToBorder(table, _("NC7"), 0, 1, 7, 8); for (i = 0; i < 4; i++) for (j = 0; j < 7; j++) { tableLabels[i][j] = gtk_label_new(""); frame = gtk_frame_new(NULL); gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_IN); gtk_container_add(GTK_CONTAINER(frame), tableLabels[i][j]); gtk_table_attach_defaults(GTK_TABLE(table), frame, i + 1, i + 2, j + 1, j + 2); } for (i = 0; i < 7; i++) { adj = (GtkAdjustment *) gtk_adjustment_new(-114, -114, -40, 0, 0, 0); tableProgress[i] = gtk_progress_bar_new_with_adjustment(adj); gtk_table_attach_defaults(GTK_TABLE(table), tableProgress[i], 5, 6, i + 1, i + 2); } hbox = gtk_hbox_new(FALSE, 0); gtk_table_attach_defaults(GTK_TABLE(table), hbox, 5, 6, 0, 1); adj = (GtkAdjustment *) gtk_adjustment_new(1, 1, 89, 1, 10, 0); button = gtk_spin_button_new(adj, 0, 0); gtk_spin_button_set_wrap(GTK_SPIN_BUTTON(button), TRUE); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(button), TRUE); // gtk_spin_button_set_shadow_type(GTK_SPIN_BUTTON(button), GTK_SHADOW_OUT); gtk_signal_connect(GTK_OBJECT(adj), "value_changed", GTK_SIGNAL_FUNC(ChangedSpinner), (gpointer) button); gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); label = gtk_label_new(_("Page:")); gtk_box_pack_end(GTK_BOX(hbox), label, FALSE, FALSE, 5); gtk_table_set_col_spacing(GTK_TABLE(table), 4, 10); gtk_widget_show_all(table); GUIEventAdd(GUI_EVENT_NETMON_CHANGED, GUI_RefreshNetmon); } gnokii-0.6.31/xgnokii/xgnokii_cfg.c0000644000175000017500000001300111666163120015301 0ustar leoleo/* $Id$ X G N O K I I A Linux/Unix GUI for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999 Pavel Janik ml., Hugh Blemings Copyright (C) 1999-2005 Jan Derfinak Copyright (C) 2002 Pawel Kot */ #include "config.h" #include #include #include #include #include "xgnokii_cfg.h" #include "xgnokii.h" ConfigEntry config[] = { {"name", &(xgnokiiConfig.user.name)} , {"title", &(xgnokiiConfig.user.title)} , {"company", &(xgnokiiConfig.user.company)} , {"telephone", &(xgnokiiConfig.user.telephone)} , {"fax", &(xgnokiiConfig.user.fax)} , {"email", &(xgnokiiConfig.user.email)} , {"address", &(xgnokiiConfig.user.address)} , {"mailbox", &(xgnokiiConfig.mailbox)} , {"simlen", &(xgnokiiConfig.maxSIMLen)} , {"phonelen", &(xgnokiiConfig.maxPhoneLen)} , {"", NULL} }; static void GetDefaultValues() { const gchar *datadir; xgnokiiConfig.user.name = g_strdup(""); xgnokiiConfig.user.title = g_strdup(""); xgnokiiConfig.user.company = g_strdup(""); xgnokiiConfig.user.telephone = g_strdup(""); xgnokiiConfig.user.fax = g_strdup(""); xgnokiiConfig.user.email = g_strdup(""); xgnokiiConfig.user.address = g_strdup(""); datadir = g_strconcat(g_get_user_data_dir(), "/gnokii/xgnokii/Mail", NULL); if (!g_file_test(datadir, G_FILE_TEST_IS_DIR)) g_mkdir_with_parents(datadir, 0700); xgnokiiConfig.mailbox = g_strdup_printf("%s/smsbox", datadir); xgnokiiConfig.maxSIMLen = g_strdup("14"); xgnokiiConfig.maxPhoneLen = g_strdup("16"); } void GUI_ReadXConfig() { FILE *file; gchar *line; const gchar *confdir; gchar *rcfile; gchar *current; register gint len; register gint i; GetDefaultValues(); #ifdef WIN32 confdir = g_strconcat(getenv("APPDATA"), "\\gnokii", NULL); if (!g_file_test(confdir, G_FILE_TEST_IS_DIR)) g_mkdir_with_parents(confdir, 0700); rcfile = g_strconcat(config, "\\xgnokii-config", NULL); #else confdir = g_strconcat(g_get_user_config_dir(), "/gnokii", NULL); if (!g_file_test(confdir, G_FILE_TEST_IS_DIR)) g_mkdir_with_parents(confdir, 0700); rcfile = g_strconcat(confdir, "/xgnokii-config", NULL); #endif if ((file = fopen(rcfile, "r")) == NULL) { g_free(rcfile); return; } g_free(rcfile); if ((line = (char *) g_malloc(255)) == NULL) { g_print(_("WARNING: Can't allocate memory for config reading!\n")); fclose(file); return; } while (fgets(line, 255, file) != NULL) { gint v; current = line; /* Strip leading, trailing whitespace */ while (isspace((gint) * current)) current++; while ((strlen(current) > 0) && isspace((gint) current[strlen(current) - 1])) current[strlen(current) - 1] = '\0'; /* Ignore blank lines and comments */ if ((*current == '\n') || (*current == '\0') || (*current == '#')) continue; i = 0; while (*config[i].key != '\0') { len = strlen(config[i].key); if (g_strncasecmp(config[i].key, current, len) == 0) { current += len; while (isspace((int) *current)) current++; if (*current == '=') { current++; while (isspace((int) *current)) current++; g_free(*config[i].value); switch (i) { case 3: case 4: *config[i].value = g_strndup(current, max_phonebook_number_length); break; case 7: *config[i].value = g_strndup(current, HTMLVIEWER_LENGTH); break; case 8: *config[i].value = g_strndup(current, MAILBOX_LENGTH); break; case 9: case 10: v = atoi(current); if (v > 0 && v < 100) *config[i].value = g_strndup(current, 3); break; default: *config[i].value = g_strndup(current, MAX_BUSINESS_CARD_LENGTH); break; } } } i++; } } fclose(file); g_free(line); } gint GUI_SaveXConfig() { FILE *file; gchar *line; const gchar *confdir; gchar *rcfile; register gint i; #ifdef WIN32 confdir = g_strconcat(getenv("APPDATA"), "\\gnokii", NULL); if (!g_file_test(confdir, G_FILE_TEST_IS_DIR)) g_mkdir_with_parents(confdir, 0700); rcfile = g_strconcat(config, "\\xgnokii-config", NULL); #else confdir = g_strconcat(g_get_user_config_dir(), "/gnokii", NULL); if (!g_file_test(confdir, G_FILE_TEST_IS_DIR)) g_mkdir_with_parents(confdir, 0700); rcfile = g_strconcat(confdir, "/xgnokii-config", NULL); #endif if ((file = fopen(rcfile, "w")) == NULL) { g_print(_("ERROR: Can't open file %s for writing!\n"), rcfile); g_free(rcfile); return (3); } g_free(rcfile); i = 0; while (*config[i].key != '\0') { if ((line = g_strdup_printf("%s = %s\n", config[i].key, *config[i].value)) == NULL) { g_print(_("ERROR: Can't allocate memory for config writing!\n")); fclose(file); return (2); } if (fputs(line, file) == EOF) { g_print(_("ERROR: Can't write config file!\n")); g_free(line); fclose(file); return (4); } g_free(line); i++; } fclose(file); return (0); } gnokii-0.6.31/xgnokii/README.vcard0000644000175000017500000000067711666163120014643 0ustar leoleoVcard support in xgnokii. Xgnokii is capable to save contatcs in vcard format (Thanks to Pavel Machek ). If you want to save contacts in vcard format you must in export dialog write file name with .vcard or .gcrd extension. Jan Derfinak If you want to know more about vcard format, read rfc2426. You can use gnomecard utility to process .gcrd files. Pavel Machek gnokii-0.6.31/xgnokii/xgnokii_cfg.h0000644000175000017500000000220211666163120015307 0ustar leoleo/* $Id$ X G N O K I I A Linux/Unix GUI for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999 Pavel Janík ml., Hugh Blemings & 1999-2005 Jan Derfinak. */ #ifndef XGNOKII_CFG_H #define XGNOKII_CFG_H #include #include "xgnokii.h" #define HTMLVIEWER_LENGTH 200 #define MAILBOX_LENGTH 200 typedef struct { gchar key[10]; gchar **value; } ConfigEntry; extern void GUI_ReadXConfig(); extern gint GUI_SaveXConfig(); #endif gnokii-0.6.31/xgnokii/xpm/0000755000175000017500000000000011666163465013473 5ustar leoleognokii-0.6.31/xgnokii/xpm/Edit_invert.xpm0000644000175000017500000000107511666163120016464 0ustar leoleo/* XPM */ static char * Edit_invert_xpm[] = { "20 19 4 1", " c None", ". c #000000", "+ c #5ACA62", "@ c #35773A", " ", " ", " ........... .. ", " .+++++++++. . ", " .+++++++++. . ", " .+++@@@+++. . . . ", " .+++@@@+++. ... ", " .+++++++++. . ", " .+++++++++. ", " ................ ", " .@@@@@@@@@. ", " . .@@@@@@@@@. ", " ... .@@@+++@@@. ", " . . . .@@@+++@@@. ", " . .@@@@@@@@@. ", " . .@@@@@@@@@. ", " .. ........... ", " ", " "}; gnokii-0.6.31/xgnokii/xpm/Caller.xpm0000644000175000017500000000171611666163120015414 0ustar leoleo/* XPM */ /* G N O K I I A Linux/Unix toolset and driver for Nokia mobile phones. Copyright (C) 1999 Pavel Janík ml. & Hugh Blemings. Released under the terms of the GNU GPL, see file COPYING for more details. This is the icon for CallerLogo. Last modification: Sat Jul 24 14:30:37 CEST 1999 Modified by Pavel Janík ml. */ static char *Caller_xpm[] = { "20 19 7 1", "* c #000000", "# c #800000", "b c #008000", "c c #00ff00", "i c #808080", " c None", "l c #ffffff", " ", " ", " ********* ", " *********** ", " ** ** ", " ** ", " ** ", " ** ", " ** ", " ** ", " ** ", " ** ", " ** ", " ** ** ", " *********** ", " ********* ", " ", " ", " " }; gnokii-0.6.31/xgnokii/xpm/Makefile.am0000644000175000017500000000154511666163120015520 0ustar leoleoEXTRA_DIST = \ alarm.xpm \ background.xpm \ BCard.xpm \ Black_point.xpm \ Caller_logo.xpm \ Caller.xpm \ Check.xpm \ Delete.xpm \ Dial.xpm \ Display.xpm \ Duplicate.xpm \ Edit_flip_horizontal.xpm \ Edit_flip_vertical.xpm \ Edit_invert.xpm \ Edit.xpm \ Flip.xpm \ Forward.xpm \ Green_pixel.xpm \ Green_point.xpm \ info.xpm \ Invert.xpm \ logo.xpm \ Names.xpm \ NewBD.xpm \ NewCall.xpm \ NewMeet.xpm \ NewRem.xpm \ New.xpm \ Open.xpm \ Operator_logo.xpm \ Op.xpm \ phone.xpm \ Play.xpm \ Preview_default.xpm \ quest.xpm \ Read.xpm \ Reply.xpm \ Save.xpm \ SendSMS.xpm \ Send.xpm \ sim.xpm \ sms.xpm \ Startup_logo.xpm \ Startup.xpm \ stop.xpm \ Tool_brush.xpm \ Tool_filled_rectangle.xpm \ Tool_line.xpm \ Tool_rectangle.xpm gnokii-0.6.31/xgnokii/xpm/Makefile.in0000644000175000017500000003162711666163212015537 0ustar leoleo# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = xgnokii/xpm DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_expand_dir.m4 \ $(top_srcdir)/m4/acx_pthread.m4 $(top_srcdir)/m4/intltool.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLUETOOTH_LIBS = @BLUETOOTH_LIBS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FIND = @FIND@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLDFLAGS = @GLDFLAGS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GMODULE_CFLAGS = @GMODULE_CFLAGS@ GMODULE_LIBS = @GMODULE_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GNOKII_LT_VERSION = @GNOKII_LT_VERSION@ GNOKII_LT_VERSION_AGE = @GNOKII_LT_VERSION_AGE@ GNOKII_LT_VERSION_CURRENT = @GNOKII_LT_VERSION_CURRENT@ GNOKII_LT_VERSION_REVISION = @GNOKII_LT_VERSION_REVISION@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_LIBICAL = @HAVE_LIBICAL@ HAVE_LIBUSB = @HAVE_LIBUSB@ HAVE_SOCKETPHONET = @HAVE_SOCKETPHONET@ HAVE_XGNOKII = @HAVE_XGNOKII@ ICAL_CFLAGS = @ICAL_CFLAGS@ ICAL_LIBS = @ICAL_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBGNOKII_VERSION_MAJOR = @LIBGNOKII_VERSION_MAJOR@ LIBGNOKII_VERSION_MINOR = @LIBGNOKII_VERSION_MINOR@ LIBGNOKII_VERSION_RELEASE = @LIBGNOKII_VERSION_RELEASE@ LIBGNOKII_VERSION_STRING = @LIBGNOKII_VERSION_STRING@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBPCSCLITE_CFLAGS = @LIBPCSCLITE_CFLAGS@ LIBPCSCLITE_LIBS = @LIBPCSCLITE_LIBS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKE = @MAKE@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ MYSQLCONFIG = @MYSQLCONFIG@ MYSQLCONFIG5 = @MYSQLCONFIG5@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_LIBS = @MYSQL_LIBS@ NEED_LOCALE_CHARSET = @NEED_LOCALE_CHARSET@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OWN_GETOPT = @OWN_GETOPT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PGCONFIG = @PGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSTGRES_CFLAGS = @POSTGRES_CFLAGS@ POSTGRES_LIBS = @POSTGRES_LIBS@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LIBS = @SQLITE3_LIBS@ SQLITE_CFLAGS = @SQLITE_CFLAGS@ SQLITE_LIBS = @SQLITE_LIBS@ STRIP = @STRIP@ TCP_LIBS = @TCP_LIBS@ TERMLDFLAGS = @TERMLDFLAGS@ TERMLIBS = @TERMLIBS@ USB_LIBS = @USB_LIBS@ USE_NLS = @USE_NLS@ USE_UNIX98PTYS = @USE_UNIX98PTYS@ VERSION = @VERSION@ WIN32 = @WIN32@ WIN32_CROSS = @WIN32_CROSS@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ XPACKAGE = @XPACKAGE@ XPM_CFLAGS = @XPM_CFLAGS@ XPM_LIBS = @XPM_LIBS@ XVERSION = @XVERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ acx_pthread_config = @acx_pthread_config@ 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@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ alarm.xpm \ background.xpm \ BCard.xpm \ Black_point.xpm \ Caller_logo.xpm \ Caller.xpm \ Check.xpm \ Delete.xpm \ Dial.xpm \ Display.xpm \ Duplicate.xpm \ Edit_flip_horizontal.xpm \ Edit_flip_vertical.xpm \ Edit_invert.xpm \ Edit.xpm \ Flip.xpm \ Forward.xpm \ Green_pixel.xpm \ Green_point.xpm \ info.xpm \ Invert.xpm \ logo.xpm \ Names.xpm \ NewBD.xpm \ NewCall.xpm \ NewMeet.xpm \ NewRem.xpm \ New.xpm \ Open.xpm \ Operator_logo.xpm \ Op.xpm \ phone.xpm \ Play.xpm \ Preview_default.xpm \ quest.xpm \ Read.xpm \ Reply.xpm \ Save.xpm \ SendSMS.xpm \ Send.xpm \ sim.xpm \ sms.xpm \ Startup_logo.xpm \ Startup.xpm \ stop.xpm \ Tool_brush.xpm \ Tool_filled_rectangle.xpm \ Tool_line.xpm \ Tool_rectangle.xpm all: all-am .SUFFIXES: $(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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu xgnokii/xpm/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu xgnokii/xpm/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 $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gnokii-0.6.31/xgnokii/xpm/Read.xpm0000644000175000017500000000133111666163120015056 0ustar leoleo/* XPM */ /* G N O K I I A Linux/Unix toolset and driver for Nokia mobile phones. Copyright (C) 1999 Jan Derfinak Released under the terms of the GNU GPL, see file COPYING for more details. */ static char * Read_xpm[] = { "13 19 7 1", " c None", ". c #000000000000", "X c #861782078617", "o c #61859A694924", "O c #000082070000", "+ c #C71BC30BC71B", "@ c #FFFFFBEEFFFF", " ", " . ", " . ", " .... ", " .XXXX. ", " ...... ", " .oOO.. ", " .+OO.. ", " ...... ", " .X.... ", " . .@..... ", " .. .@@+.... ", " .@.@@+..... ", " .@@@+.X.... ", " .@@+..X.... ", " .++++..... ", " ....... ", " ", " "}; gnokii-0.6.31/xgnokii/xpm/Tool_rectangle.xpm0000644000175000017500000000104211666163120017143 0ustar leoleo/* XPM */ static char * Tool_rectangle_xpm[] = { "20 19 2 1", " c None", ". c #000000", " ", " ", " ", " .............. ", " . . ", " . . ", " . . ", " . . ", " . . ", " . . ", " . . ", " . . ", " . . ", " . . ", " .............. ", " ", " ", " ", " "}; gnokii-0.6.31/xgnokii/xpm/logo.xpm0000644000175000017500000013604411666163120015155 0ustar leoleo/* XPM */ /* G N O K I I A Linux/Unix toolset and driver for Nokia mobile phones. Copyright (C) 1999 Pavel Janík ml. & Hugh Blemings. Released under the terms of the GNU GPL, see file COPYING for more details. This is the logo of the GUI utility. Copyright (C) 1999 FIXME: fill this in. Last modification: Sat Jun 26 07:38:27 CEST 1999 Modified by Pavel Janík ml. */ static char *XPM_logo[] = { "207 105 238 2", ".. c #040204", ".# c #344244", ".a c #b4c2c4", ".b c #14221c", ".c c #94a2a4", ".d c #1c3224", ".e c #dce2dc", ".f c #3c524c", ".g c #84928c", ".h c #041204", ".i c #a4b2ac", ".j c #6c6e6c", ".k c #141214", ".l c #242224", ".m c #ccd2cc", ".n c #8c8a8c", ".o c #5c6e6c", ".p c #041a0c", ".q c #444244", ".r c #94928c", ".s c #b4b2ac", ".t c #a4a2a4", ".u c #6c7a7c", ".v c #243a34", ".w c #c4c2bc", ".x c #5c625c", ".y c #848284", ".z c #344a4c", ".A c #b4bab5", ".B c #142224", ".C c #041214", ".D c #a4aa9f", ".E c #040a08", ".F c #ccdadc", ".G c #545a58", ".H c #2c3232", ".I c #e4eae9", ".J c #8c9a9c", ".K c #141a19", ".L c #242a2a", ".M c #343a35", ".N c #041a1c", ".O c #949a98", ".P c #5c6a70", ".Q c #74828c", ".R c #4c524c", ".S c #7c7a7c", ".T c #c4cac9", ".U c #3c4240", ".V c #8c9291", ".W c #647674", ".X c #444a49", ".Y c #bcbaba", ".Z c #0c0a0c", ".0 c #5c5a5c", ".1 c #9caaab", ".2 c #acbabb", ".3 c #6c7677", ".4 c #fcf6f8", ".5 c #747a79", ".6 c #1c2224", ".7 c #a4aaac", ".8 c #1c1a1c", ".9 c #243233", "#. c #848a87", "## c #646264", "#a c #0c1214", "#b c #eceaeb", "#c c #2c2a2c", "#d c #3c3a3c", "#e c #9c9a9d", "#f c #cccacc", "#g c #7c827c", "#h c #bccacc", "#i c #9ca29f", "#j c #0c120b", "#k c #acb2b0", "#l c #d4d2cc", "#m c #f4f2f4", "#n c #0c1a08", "#o c #142a2c", "#p c #2c3a3a", "#q c #fcfafc", "#r c #dcdadc", "#s c #545a64", "#t c #8c929c", "#u c #4c4a4c", "#v c #747a84", "#w c #acaaac", "#x c #bcc2bf", "#y c #1c221c", "#z c #445251", "#A c #747274", "#B c #948e94", "#C c #b4b6bc", "#D c #5c666c", "#E c #4c5a5b", "#F c #3c4a4f", "#G c #040e14", "#H c #141e24", "#I c #343a44", "#J c #0c1a1c", "#K c #4c525c", "#L c #3c424c", "#M c #bcbec4", "#N c #848a94", "#O c #344645", "#P c #546262", "#Q c #e4e2e4", "#R c #6c727c", "#S c #24262c", "#T c #646e6c", "#U c #94969c", "#V c #b4b6b4", "#W c #5c6662", "#X c #84868c", "#Y c #7c828c", "#Z c #646e74", "#0 c #1c2a2c", "#1 c #2c363c", "#2 c #242e34", "#3 c #949aa4", "#4 c #c4ced4", "#5 c #444e54", "#6 c #0c0e14", "#7 c #eceef4", "#8 c #d4d6dc", "#9 c #44565c", "a. c #4c5a64", "a# c #f4fafa", "aa c #d4dada", "ab c #646a6f", "ac c #747674", "ad c #1c3234", "ae c #84929c", "af c #0c1a14", "ag c #040604", "ah c #748684", "ai c #04160c", "aj c #a4b6b4", "ak c #6c7272", "al c #141615", "am c #242623", "an c #ccd6d4", "ao c #343634", "ap c #545654", "aq c #8c8e8d", "ar c #ecf6f4", "as c #949694", "at c #a4a6a3", "au c #c4c6c4", "av c #848684", "aw c #b4beba", "ax c #142625", "ay c #041616", "az c #040e08", "aA c #545e5b", "aB c #2c3634", "aC c #e4eeec", "aD c #141e1a", "aE c #242e2c", "aF c #343e3c", "aG c #4c5652", "aH c #c4cecc", "aI c #3c4644", "aJ c #8c9693", "aK c #444e4c", "aL c #bcbebc", "aM c #0c0e0c", "aN c #5c5e5c", "aO c #747e7a", "aP c #1c2627", "aQ c #a4aeae", "aR c #1c1e1d", "aS c #243632", "aT c #848e8c", "aU c #0c1615", "aV c #eceeec", "aW c #2c2e2e", "aX c #9c9e9c", "aY c #cccecc", "aZ c #7c8683", "a0 c #9ca6a0", "a1 c #0c160c", "a2 c #acb6b4", "a3 c #d4d6d4", "a4 c #f4f6f4", "a5 c #2c3e3a", "a6 c #fdfdfd", "a7 c #dcdedd", "a8 c #acaead", "a9 c #bcc6c4", "b. c #1c261c", "b# c #4c5e54", "ba c #3c4e51", "bb c #0c1e1e", "bc c #64726a", "bd c #7c868e", "be c #647278", "bf c #1c2e2f", "bg c #14261c", "bh c #94a6a4", "bi c #444644", "bj c #6c7e7c", "bk c #8c9e9c", "bl c #7c7e7c", "bm c #646664", "bn c #3c3e3c", "bo c #545e64", "bp c #8c969c", "bq c #4c4e4c", "br c #747e84", "bs c #a4a6ac", "bt c #343e44", "bu c #4c565c", "bv c #3c464c", "bw c #848e94", "bx c #e4e6e4", "by c #949ea4", "bz c #748284", "bA c #34424c", "bB c #4c6264", "bC c #dce2e4", "bD c #849294", "bE c #04120c", "bF c #a4b2b4", "bG c #ccd2d4", "bH c #343234", "bI c #545254", "bJ c #ecf2f4", "bK c #041a14", "bL c #949294", "bM c #b4b2b4", "bN c #7c8a94", "bO c #1c2a24", "bP c #243a3c", "bQ c #c4c2c4", "bR c #5c6264", "a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6", "a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a#ara6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a#ara6a6a6a6a6a6a6a6a6a6a6a6a6a6a6", "a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6aLaGaF.Ya6a6a6a6a6a6a6a6a6a6a6a6a6a6aLaGaFaLa6a6a6a6a6a6a6a6a6a6a6a6a6a6", "a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6.taFaP.na6a6a6a6a6a6a6a6a6a6a6a6a6a6#ibnaP.na6a6a6a6a6a6a6a6a6a6a6a6a6a6", "a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6asaF#yavbx#ra6a6a6a6a6a6a6a6a6a6a6a6asaFaDavbx#ra6a6a6a6a6a6a6a6a6a6a6a6", "a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6.O.Uaf#AauaL#qa6a6a6a6a6a6a6a6a6a6a6.O.#.KacauaL#qa6a6a6a6a6a6a6a6a6a6a6", "a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6.O.MaU#WbQ.Ya#a6a6a6a6a6a6a6a6a6a6a6.O.M#jbmbQaLa#a6a6a6a6a6a6a6a6a6a6a6", "a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6.VaB#jbRau.A#ma6a6a6a6a6a6a6a6a6a6a6.VaobEbRau.A#ma6a6a6a6a6a6a6a6a6a6a6", "a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6.V.May.Gau.A#ma6a6a6a6a6a6a6a6a6a6a6.V.M#aaAbQ.A#7a6a6a6a6a6a6a6a6a6a6a6", "a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6#..M#6.R#x#V#7a6a6a6a6a6a6a6a6a6a6a6#.#p#j#z#x#V#ma6a6a6a6a6a6a6a6a6a6a6", "a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a4.5.9ag.#aw.Y.Ia6a6a6a6a6a6a6a6a6a6a4.5.9ag.#aL.A#b#qa6a6a6a6a6a6a6a6a6a6", "a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6aC.jaEagaG.A#C#Qa6a6a6a6a6a6a6a6a6a6aV.jaEag.R.A#C#Qa6a6a6a6a6a6a6a6a6a6a6", "a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6aVakaI#y#p#TaZ#ibGaaa4a6a6a6a6a6a6a6aCak.U.6#pbcaZa0aYaaa4a6a6a6a6a6a6a6a6", "a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6bl..............................bQa6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a4aO.x.X#paBbbaR.L.L.Ubla6a6a6a6a6a6arbl.x#F#paS.KaD.L.Lbn.ya6a6a6a6a6a6a6", "a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6.y..............................aLa6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a#by.Pad.baPa1bEaMaz.E.Eaqa6a6a6a6a6a#by.P.9.baPaUaMazazaz.EaTa6a6a6a6a6a6", "a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6bl....ag........................avbMbMa6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6.1#E#JaUbO.KaM#jazagaMaKa7.4a6a6a6a6.1a.#JaU#0.K#j.k.EagazbqbC.4a6a6a6a6", "a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6.y....ag.........................ybMbMa6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6.Ta.aU.CaB#a.Eagag.....b#V#V#qa6a6a6#h.G.N.CaBaU.Eagag.....b.i#V#qa6a6a6", "a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6bl....ag........................avbMbMa6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6an#9.B#H.#ay..ag.......KbMbMbxa6a6a6.F#9.BaDbtayag.........K.DbM.Ia6a6a6", "a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6.y....ag.........................y#kbMa6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6#h#p.N#0aK#Jagagag....aD#VbMaYa6a6a6a9#I.N#0#5#J...E......#ybsbMaYa6a6a6", "a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6bl....ag........................avbMbMa6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6.2#1#J#pbubbag#a.......KbMbM#fa6a6a6.2#1bb#pbubbag#a.......KbybM#fa6a6a6", "a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6.y....ag.........................y#kbMa6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6.7btaxbabu#J#Gal.E....aU.s#k.ma6a6a6.1bt.Bbabu#J.Eal.E....#j.O.s.ma6a6a6", "a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6bl....ag........................avbMbMa6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6bD#I.N#5#E.C#a.Kag....aUbMbM#fa6a6a6.V#pbbaK#9#a#a.Kag....aU.ObM#fa6a6a6", "a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6.y....ag........................avbMbMa6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a8.ubt.N.PaG#aalaR.E....a1bMbM#xa6a6.7.ubt.N.P#E.CalaRag....#jaq#k.Ya6a6a6", "a6a6a6a6a6a6a6a6a6a6bM#Abn.l.......k.qaq#Qa6a6a6a6a6bM.ybl.y.ybl.y.ybl.y.ybl.ybl#Qa6a6#Q.ybl.y.ybl.y.ybl.y.ybl.y.ybl.ybQa6a6#QbLbq.q...........q#AbMa6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6#mbQblbI.q.l.............q.qblbM#ma6a6a6a6a6a6a6a6a6a6a6a6a6bl....ag........................av.sbMa6a6a6a6a6.ybl.y.ybl.y.ybl.y.ybl.y.y.ybl.y#la6a6a6a6a6a6#g#EaB.v.3#E#GalaR......#jbM#kbQa6#qbd#EaBbP.3#E.E.KaR......#jaT#V.Aa6a6a6", "a6a6a6a6a6a6a6#mbl.k......................bn.ta6a6bQ............................aLa6a6bQ..............................blbQ.q........................aR.ta6a6a6a6a6a6a6a6a6a6a6a6a6a6#maqbH..................................aWbL#ma6a6a6a6a6a6a6a6a6a6.y....ag.........................y#kbMa6a6a6a6.t................................a7a6a6a6a6a6#7.3#OaP.faObu.E#HaRag....#jbM.s#xa6#Q.3aIax.faObu.EaR#Hag....#j.g.s.Ya6a6a6", "a6a6a6a6a6a6#laR............ag.Zag......ag.Zag.l#BaM........agagagagagagag.Zag.E.Y.4a4aL......agag.Zagagagagagag.Eag.Zalagag...........Z.E...........Z.ZbH#la6a6a6a6a6a6a6a6a6a6#m.yaM..............ag.E.Zag.............Z.Z.E..aM###ma6a6a6a6a6a6a6a6bl....ag........................avbMbMa6a6a6a6bn......ag.ZagagagagagagagagagagbIa4.4#qa6a6a6#Qbr.U#JbBakba#a.6aR......a1bMbMaLa6#8br.#aDbB.3ba#a.6aR......a1.VbM.Aa6a6a6", "a6a6a6a6a6#Q#6........ag.........................Zag............................avbMbMaL....................................ag...E.........................kaYa6a6a6a6a6a6a6a6#laR..........agag..................................agal.ya6a6a6a6a6a6a6.y....ag.........................ybMbMa6a6a6#Q................................avbMbMa2a6a6a6aYbraF.B.W.u.#.Kam.K.......KbM#kaLa6#M.5aF.Bbe.3.#.KamaD.......KaJ.sawa6a6a6", "a6a6a6a6a6bn........ag..............................agag.........................y#VbMaL....................................ag...............................Z#fa6a6a6a6a6a6#l#6........ag..............................................bI#ma6a6a6a6a6bl....ag........................avbMbMa6a6a6.j.......E......................albM#kbM#ba6a6a6#CaO.9bObjbzaF.Kam.K.......bbMbMbQa6#w#v.9axbjbza5aDamal......#yasbMaLa6a6a6", "a6a6a6a6.t........ag............................................................av#kbMaL.......................................................................G.Ya6a6a6a6#l.k........ag..................................................bHa4a6a6a6a6.y....ag........................av#kbMa6a6a6.k..............................##bMbM.sa6a6a6a6bs.3aP.9ahaZa5.6aEal......aD.sbM.Ta6#iacax.9aZahaF.6.Lal......aDaJ.sawa6a6a6", "a6a6a6a6bq.......E...............................................................ybMbMaL.......................................................................ZbMaLa6a6a6bn........ag.......................................................0#ba6a6a6bl....ag........................avbMbMa6a6aX......ag........................atbM#k#fa6a6a6a6.O#ZaU.#bD.uaSam.Hal......aR#kbMaYbJ#U#Z#JbtbD.uaB#S.Hal......aDas#k.wa6a6a6", "a6a6a6a6........................................................................av#kbMaL........................................................................#ebM.4a6bM....................................................................#ea7a6a6.y....ag.........................ybMbMa6a6.q......ag.......................UbM#kbM#qa6a6a6#q.ObR#J#KbN.3#p.L.Hal......#y.sbMaY#8.ObR#J#KbN.3aB.L.HaU......#y.V.s#Ma6a6a6", "a6a6a6a7.......E.................................................................ybMbMaL........................................................................avbMaLa6bq.......E............................................................bqbM#qa6bl....ag........................av.sbMa6a7................................aq.sbMbMa6a6a6a6bJ#t#s#Jbubw.o#1aWaE#6....agam#kbM.T#4bp#s#Jbubw.o#paWaW#j.......L.ObM#xa6a6a6", "a6a6a6bQ..................................#y.l..................................avbM.s#M.........................................................................ybMbMa6..................................#c#y.................................l.s#ka6.y....ag........................av#kbMa6#A.......E......................#ybMbMbMaVa6a6a6a6.Ibw#KaUbo#N.P#p.L.H#a......aEbM#V.mawbw#K#J#sbw#D#p.LaW#6......aE#i.sbQa6a6a6", "a6a6a6aL................................aqbM#kaq................................av#kbMaL................................##atat##................................av#kbMaL.......E......................al#e#kbM.y................................bMbM#mbl....ag........................avbMbMa6aR...............................jbM#kbMa6a6a6a6a6a7bd#L#a#Zbw#P.9aW.LaM....agaEbM.s#8#kaZ#L.C#Zbw#P#2aW#2aM......aWa0#Va3a6a6a6", "a6a6a6bQ...............................UbMbM.sbMbI.Z.............................ybMbMaL..............................aobM#kbM#k#d...............................ybMbMaq..............................##.sbMbM#kbq.Z.............................ybMa3bl....ag........................avbMbMa8......ag.......................E#w.sbMa3a6a6a6a6a6aYbz#1#J#Zbda.#0aW#c#G.......L.sa2#r.7br#1aU#Zbd#E#0bH.L#6....ag.L.1bM#ra6a6a6", "a6a6a6aL...............................0#kbMbMa6bl..ag..........................av.sbMaL...............................GbMbM.s#qbl..ag..........................avbMbMbl..............................av#kbMaua6bl..ag..........................avbMbMbl....ag........................av#kbM.R......ag.......................qbM#kbMa6a6a6a6a6a6#M.u#2#J#R.QaG.6bH#S.E.....E.LbM#Vana0ac#2#J#R#YbuaPaW#S.E.....Eama8#Va7a6a6a6", "a6a6a6bQ..............................apbMbM.ea6.y....#j.........................ybM#k.w..............................apbM#k#ba6bl.....E.........................y.s#k.y....ag.........................ybM.sbJa6.y....aM........................av#kbM#g....ag.........................ybM#e................................#e#kbM.Ya6a6a6a6a6a6#k#R.6#H.3#v#5.BaW#Sag....agaEbMbM.Tby.3aP#H.u.u#5.6aWaPag....agaE#k.saaa6a6a6", "a6a6a6aL...............................0bMa8#ma6bl....#6........................avbMbMaL...............................0bMbMa4a6bl....ag........................avbMbMbl....ag........................av#kbMa6a6bl....#j........................avbMbMbl....ag........................av.s.0.......E......................aWbM.sbM#ma6a6a6a6a6a6#i#RaPaP#v.u#5.6aW.6......agaB.s#V#xbybeaPaP.u#v#5.6aW.6......agao#k.s#ra6a6a6", "a6a6a6bQ...............................GbMbMaVa6.y....#j.........................y#kbMaL..............................apbMbMa4a6.y....ag........................av#kbM.y....ag.........................ybMbMa6a6.y.....k.........................ybM.s#g....ag.........................y#kal...............................jbM#kbMa6a6a6a6a6a6a6by.Wayadbr.3#5#SaWaR.......EaWbM#VbM.J#Ray#2br.3#5#SaW.6.......E.H.s#Va7a6a6a6", "a6a6a6aL...............................0.sbMaVa6bl....aM........................avbMbMaL...............................0#kbM.4a6bl....ag........................avbMbMbl....ag........................avbMbM#qa6bl....aM........................avbMbMbl....ag........................av.S......ag.......................ZbM.sbMa7a6a6a6a6a6a6a6#t.P.Nbfbr#R.##SaWaR......az#d#k#Ca8#t.P.Nbfbr#R#OaPaWaR.......E.MbM#V#Qa6a6a6", "a6a6a6bQ..............................apbMbMaVa6.y....aM.........................ybM#k.w..............................apbMbMa#a6.y....ag.........................y.s#k.y....ag.........................y.sbM#qa6.y....#j........................av#kbMbl....ag.........................y.M......ag.......................GbM#kbMa6a6a6a6a6a6a6.4bwbBaybfbr#Ra5#SaE.6......agbi#V#VbsbwbB.Cad.Q#Z.##S#2aR......ag#u.sa2#Qa6a6a6", "a6a6a6aL...............................GbMbMaVa6bl....#j........................avbMbMaL...............................0.sbM.4a6bl....ag........................avbMbMbl....ag........................av#kbMa6a6bl....#6........................avbMbMbl....ag.........................j................................#ebMbMaLa6a6a6a6a6a6a6#bbw#9.C#Fbr#Z#p.LaWal.......E.0.s#C#ibw#9.C#Fbr#Za5am.Hal.......E.0#k#V#ba6a6a6", "a6a6a6bQ..............................apbMbMaVa6.y....#6.........................y#kbMaL...............................GbM#ka4a6.y....ag.........................ybM#k.y....ag.........................ybMbMa6a6.y....#j.........................ybMbM#g....ag........................aW.....Mal......................ao#kbMbMa4a6a6a6a6a6a6a6bx#N.z.Cba#v#DaS#SaWal......azbm#V#V.tbN#F.C#F.uab.9#SaWal......azbm.s.2#ma6a6a6", "a6a6a6aL...............................0bMbMaVa6bl....#j........................avbMbMaL...............................GbMbM#qa6bl....ag........................av.sbMbl....ag........................av#kbM#qa6bl....aM........................av#kbMbl....ag..............................aW.........................SbM.sbMa6a6a6a6a6a6a6a6#8#NbA#G#Fbe#P.9.LaW#a.......haca8#V#3#NbA#G#Fbe#P.9.LaW#a.......hac.s#V.4a6a6a6", "a6a6a6bQ..............................apbM#kaVa6.y....aM.........................y.s#k.w..............................apbM.sa4a6.y....ag.........................ybM#k.y....ag.........................ybMbMa6a6.y....#j.........................ybMbM#g....ag...............................k......................albM#kbM.Ia6a6a6a6a6a6a6a6.TbdbP#Gbvabbu#2.L.L#a......azavbM.AbLbdbP#G.z#Z#K#2.L#c#a......azavbM.A#qa6a6a6", "a6a6a6aL...............................GbM.s#ma6bl....#j........................avbMbMaL...............................0bM#k.4a6bl....ag........................avbMbMbl....ag........................av.sbM#qa6bl....#6........................av.sbMbl....ag.......................................................0#kbMbMa6a6a6a6a6a6a6a6a6#Cbd.9.E#O#D#5ax#S.L#j.Eagag#n#B.s#V#t#Y.9.EbA#D#5ax#S#SbE.Eagag#n.r#k.Aa6a6a6a6", "a6a6a6bQ..............................apbMbM#ba6.y....#6.........................y#kbMaL..............................apbMbMa4a6.y....ag.........................ybM#k.y....ag.........................ybM#ka6a6.y....#j.........................ybMbM#g....ag......................................................atbM.s.Ta6a6a6a6a6a6a6a6a6a8.3.9.E.z#9#O#0.l.layag..agbgat#kaQ.V.3.9.Ebv#9#O#o.l.laUag...Ebg.tbM.Aa6a6a6a6", "a6a6a6aL...............................0bMbMaVa6bl....#j........................avbMbMaL...............................0#kbM#qa6bl....ag........................av.sbMbl....ag........................avbMbM#qa6bl....aM........................av#kbMbl....ag.....................................................qbMbMbM.4a6a6a6a6a6a6a6a6a6.cak#2.E.##F.9ay.6b.ai.Eag.EaSa8#VaQbwbe#2ag.#.z.9aU.lb.aiazag.E.9#k#Vawa6a6a6a6", "a6a6a6bQ..............................apbM#kaVa6.y....aM.........................ybM#k.w..............................apbMbMa4a6.y....ag.........................ybM#k.y....ag.........................ybMbMa6a6.y....#j.........................ybMbM#g....ag....................................................av#kbM#ka6a6a6a6a6a6a6a6a6a6#3#ZaE.E#pbPaDaz.6.d.p.h.E.E#p#k#VawaTbeaEag#pbPaDaz.6.d.p.h.E.Ea5.s#V.ma6a6a6a6", "a6a6a6aL...............................GbM.s#ma6bl....#j........................avbMbMaL...............................GbMbM.4a6bl....ag........................avbMbMbl....ag........................av#kbM#qa6bl....#6........................avbMbMbl....ag..................................................albM#k.s#ma6a6a6a6a6a6a6a6a6a6aTab#0.EaSbfaz.Z.K.b.E.haz.Eb##Va2a9#.abaP#6aSbfaz.E.Kbg.E.hazaz.Ga2a2#ra6a6a6a6", "a6a6a6bQ..............................apbM#k#ba6.y....#6.........................y#kbMaL..............................apbM#ka4a6.y....ag.........................ybM#k.y....ag.........................ybM.sa6a6.y....#j.........................y.sbM#g....ag...................................................jbMbMbMa6a6a6a6a6a6a6a6a6a6a6braA.B.E#2ax...E#a.h...hazazbc#Va2#xbraA.Bag#2axag.EaUbE...hazaz.o.s#V.ea6a6a6a6", "a6a6a6aL...............................0bMbM#7a6bl....#j........................avbMbMaL...............................0bMbM#qa6bl....ag........................av.sbMbl....ag........................avbMbM#qa6bl....aM........................av#kbMbl....ag...................................................ybM.s#fa6a6a6a6a6a6a6a6a6a6a4#Z.X.K.LaPay...Eazag..ag.EaDaZ#V#Va9#Z#F#J#caPbK...Eazag..ag.E#naT#V#Va4a6a6a6a6", "a6a6a6bQ..............................apbM.saVa6.y....aM.........................y.s#k.w..............................apbM.sa4a6.y....ag.........................ybM#k.y....ag.........................ybM#ka6a6.y....#j.........................ybMbM#g....ag...................................................UbMbMa6a6a6a6a6a6a6a6a6a6a6bJaNbA#J.L#ybE..ag.E....ag.haG.A#V.s#xbR.##J.LaR#G..ag.E....agaiaG.A.s#V#qa6a6a6a6", "a6a6a6aL...............................GbMbMaVa6bl....#j........................avbMbMaL...............................0bM#k.4a6bl....ag........................avbMbMbl....ag........................avbMbM#qa6bl....#6........................avbMbMbl....ag....................................................atbMa6a6a6a6a6a6a6a6a6a6a6.Ibo.U.6#0.Kag....ag...Eag#yaO#V.sau.aaAaI#H#0al.E....ag...Eag#ybla2#Vaua6a6a6a6a6", "a6a6a6bQ..............................apbMbMaVa6.y....#6.........................y#kbMaL..............................apbMbMa4a6.y....ag.........................ybM#k.y....ag.........................y.sbMa6a6.y....#j.........................ybMbM#g....ag....................................................##bMaVa6a6a6a6a6a6a6a6a6a6bCaG.9.9aP.k.E........agag#y#i.s.Aa4.Abu.9.9aPalag.........Eag#y.c.s.A#ma6a6a6a6a6", "a6a6a6aL...............................0bMbMaVa6bl....#j........................avbMbMaL...............................0#kbM#qa6bl....ag........................av.sbMbl....ag........................av#kbM#qa6bl....aM........................av#kbMbl....ag....................................................albMbMa6a6a6a6a6a6a6a6a6a6#8aK#0#0.6aU.E.........Eagb.#i#V#xa6.2baaE#0.B.k.E.........Eag#ya0.s#xa6a6a6a6a6a6", "a6a6a6bQ..............................apbM#kaVa6.y....aM.........................ybM#k.w..............................apbMbMa4a6.y....ag.........................ybM#k.y....ag.........................ybMbMa6a6.y....#j.........................ybMbM#g....ag.......................................................5bM#qa6a6a6a6a6a6a6a6a6bG.#aDaPaDaMaMag.......Eag#y#i.s#xa6.2.UaDaPaD#6aMag.......Eag#y#i.s#xa6a6a6a6a6a6", "a6a6a6aL...............................GbM.s#ma6bl....#j........................avbMbMaL...............................G.sbM.4a6bl....ag........................avbMbMbl....ag........................av.sbM#qa6bl....#6........................av.sbMbl....ag......................................................aW.s#fa6a6a6a6a6a6a6a6a6#h#paUax.K#6.E........azag#ya0.s.wa6aj#paUax.KaMaz.........Eag#y#i#V.wa6a6a6a6a6a6", "a6a6a6bQ..............................apbMbM#ba6.y....#6.........................y#kbMaL..............................apbM#ka4a6.y....ag.........................ybM#k.y....ag.........................ybM#ka6a6.y....#j.........................ybMbM#g....ag........................................................#ebMa6a6a6a6a6a6a6a6a6aHaS#Gax.K.E.E.........Eag#y#i#VaLa6bF.H#Gax.Kag.E........azag#ya0.s#xa6a6a6a6a6a6", "a6a6a6aL...............................0bMbMaVa6bl....#j........................avbMbMaL...............................0bMbM#qa6bl....ag........................av.sbMbl....ag........................avbMbM#qa6bl....aM........................av#kbMbl....ag.........................................................q#k#Qa6a6a6a6a6a6a6a6a3#2#Gax#aag.E........azag#yat#V.ma6.1#2az.6aUag.E.........Eagb.at#VaYa6a6a6a6a6a6", "a6a6a6bQ..............................apbM#kaVa6.y....aM.........................y.s#k.w..............................apbMbMa4a6.y....ag.........................ybM#k.y....ag.........................ybMbMa6a6.y....#j.........................ybMbM#g....ag.........................................................ZatbMa6a6a6a6a6a6a6a6bCbf.E.B#aag.E.........Eagb..D#VaYa6a0bfaz.B#a...E.........E.Eb..D#k#la6a6a6a6a6a6", "a6a6a6aL...............................GbM.s#ma6bl....#j........................avbMbMaL...............................0bM#k.4a6bl....ag........................avbMbMbl....ag........................av#kbM#qa6bl....#6........................avbMbMbl....ag..........................................................bmbM#ma6a6a6a6a6a6a6aa#0azaD#G...E........azagb..D#k#la6bk#0az#H#Gag.E.........Eagb..D#V.ma6a6a6a6a6a6", "a6a6a6bQ..............................apbM#k#ba6.y....#6.........................y#kbMaL..............................apbMbMa4a6.y....ag.........................ybM#k.y....ag.........................ybM.sa6a6.y....#j.........................y.sbM#g....ag..........................................................al.s.Ya6a6a6a6a6a6a6aa#0#a.B#6ag.E........agagaRat#V.ma6aeaPaU.Baz...E........agagaD.D#V#la6a6a6a6a6a6", "a6a6a6aL...............................0bMbM#7a6bl....#j........................avbMbMaL...............................0#kbM#qa6bl....ag........................av.sbMbl....ag........................avbMbM#qa6bl....aM........................av#kbMbl....ag............................................................avbM#qa6a6a6a6a6a6#8aPaUbb#G..ag........ag..#y.D.A#la6#taPay#H#Gagag........ag..#yata2#la6a6a6a6a6a6", "a6a6a6bQ..............................apbM.saVa6.y....aM.........................ybM#k.w..............................apbM.sa4a6.y....ag.........................ybM#k.y....ag.........................ybM#ka6a6.y....#j.........................ybMbM#g....ag............................................................aobM.Ta6a6a6a6a6a6#8aP.C#HaMag.E........ag..#ya0a2aYa6bwaP.C#Haz...E........ag..#yata2aYa6a6a6a6a6a6", "a6a6a6aL...............................GbMbMaVa6bl....#j........................avbMbMaL...............................GbMbM.4a6bl....ag........................avbMbMbl....ag........................avbMbM#qa6bl....#6........................avbMbMbl....ag.........................U....................................aXbMa6a6a6a6a6a6#8.6ay#H#Gagag............#y.D.s.ma6bNaP.C.B.Eagag.............bat.s#la6a6a6a6a6a6", "a6a6a6bQ..............................apbMbMaVa6.y....#6.........................y#kbMaL..............................apbM#ka4a6.y....ag.........................ybM#k.y....ag.........................y.sbMa6a6.y....#j.........................ybMbM#g....ag.........................S.Z..................................bqbM#ba6a6a6a6a6bG.Bay#Hazagag............aDat.saYa6bd.6.C#H#6agag............aDat#kaYa6a6a6a6a6a6", "a6a6a6aL...............................0bMbMaVa6bl....#j........................avbMbMaL...............................0bMbM#qa6bl....ag........................av.sbMbl....ag........................av#kbM#qa6bl....aM........................av#kbMbl....ag........................av.U...8..............................aMatbMa6a6a6a6a6#8.BaU.B#6agag............aDaXbMaYa6#Y.BaU.B.Eagag.............KaX.s.ma6a6a6a6a6a6", "a6a6a6bQ..............................apbM#kaVa6.y....aM.........................y.s#k.w..............................apbM.sa4a6.y....ag.........................ybM#k.y....ag.........................ybMbMa6a6.y....#j.........................ybMbM#g....ag.........................yaX..bHag...............................jbM#ma6a6a6a6#8#Hay.B.Eagag............a1.O#kaYa6bd.BaU.B#Gagag........ag..a1as.saYa6a6a6a6a6a6", "a6a6a6aL...............................GbM.s#ma6bl....#j........................avbMbMaL...............................0bM#k.4a6bl....ag........................avbMbMbl....ag........................av.sbM#qa6bl....#6........................av.sbMbl....ag........................av.saW...E..............................albMaLa6a6a6a6bG.BaU#H.Eagag........ag..#j.V.s#fa6bN.BaU#H.Eagag........ag..#j.VbMaua6a6a6a6a6a6", "a6a6a6bQ..............................apbMbM#ba6.y....#6.........................y#kbMaL..............................apbMbMa4a6.y....ag.........................ybM#k.y....ag.........................ybM#ka6a6.y....#j.........................ybMbM#g....ag.........................ybM.j.....................................ybMa6a6a6a6#8aP#JaD#6agag............azava8.Ya6aTaP#J#Hazag.E............az#g.s.Ya6a6a6a6a6a6", "a6a6a6aL...............................0bMbMaVa6bl....#j........................avbMbMaL...............................0#kbM#qa6bl....ag........................av.sbMbl....ag........................avbMbM#qa6bl....aM........................av#kbMbl....ag........................av#kbMaR...E...............................qbM#fa6a6a6a3.BaU#J.Eagag............az#g.s.Ya6bD.BaUaf#Gagag............az.y#k.Ya6a6a6a6a6a6", "a6a6a6bQ..............................apbM#kaVa6.y....aM.........................ybM#k.w..............................apbMbMa4a6.y....ag.........................ybM#k.y....ag.........................ybMbMa6a6.y....#j.........................ybMbM#g....ag.........................ybMbM#g....................................aXbMa6a6a6aa#Jaz#JaM.Eag.............Eak.s.Aa6.J#JazaUaMagag.............Eak.s.Aa6a6a6a6a6a6", "a6a6a6aL...............................G.sbM#ma6bl....#j........................avbMbMaL...............................G.sbM.4a6bl....ag........................avbMbMbl....ag........................av.s#k#qa6bl....#6........................avbMbMbl....ag........................av.sbMa7....ag...............................0bMaVa6a6aaaU.Caf#Gagag.............Ebm.s.Aa6byaU.C#Jazagag.............Ebm.s.Aa6a6a6a6a6a6", "a6a6a6aL..............................apbMbM#ba6.y....#6.........................y#kbMaL..............................apbM#ka4a6.y....ag.........................ybM#k.y.....E.........................ybMbMa6a6bl....aM.........................y.sbM#g....ag.........................y#kbMa6aN..ag...............................EbMbMa6a6bC#JafaD.E..ag............agaN.s#V#qbhafaUaD.Eagag............agaN.s#Va6a6a6a6a6a6", "a6a6a6aL...............................0bM.s#7a6bl....#j........................avbMbMaL...............................0bMbM#qa6bl....ag........................avbMbMbl....ag........................av#kbMa6a6bl....#j........................avbMbMbl....ag........................avbMbMa6aL.....................................jbM#qa6#bbb#J.Bagag..............ag.R#k#Va6.2bb#J.b.E................ag.RbM#V#qa6a6a6a6a6", "a6a6a6bQ...............................GbMbMaVa6.y....aM.........................y.s#k.w..............................apbMbMa4a6.y....ag........................av.sbMaq....ag........................##bMbM#qa6bI....aM........................av#kbMbl....ag.........................ybMbMa6a6.l...E...............................l#k.Ya6a6aPaUaf.Eagag............ag.X.s#Va4anaxaUaf.Eagag............agbi.s#Va#a6a6a6a6a6", "a6a6a6aL..............................albMbMaVa6aW....#j........................avbMbMaL...............................0bM#k.4a6bl....ag........................av#kbMaL....ag.........................ZaqbMa6a8......#j........................atbMbMbl....ag........................av#kbMa6a6aX....................................avbMa6a6.U.Caz.E.Eag...............U.sbMa4.IaP.C#G.E.Eag...............UbM#Va4a6a6a6a6a6", "a6a6a6bQ.................................M.S#VbI......#6.........................y#kbMaL..............................apbMbMa4a6.y....ag.........................ybMbMa6....ag............................#c#d........aM......................al.sbMbM#g....ag........................avbMbMa6a6#maM..ag...............................qbM#la6.5aU.E#Gagag...............H.s#VaVa6#1#aaz.Eagag...............H.s.saVa6a6a6a6a6", "a6a6a6aL....................................ag.........Z........................avbMbMaL...............................0#kbM#qa6bl....ag.........................y#kbMa6bq....................................ag.....Z.........................qbM#kbMbl....ag........................av.sbMa6a6a6.x....................................bsbMa6a8.BaU.Eag............ag..aW#kbMaVa6.R.6aU#Gag............ag..aW#k#VaVa6a6a6a6a6", "a6a6a6#l......................................aM.Z.EaM...........................ybM#k.w..............................apbM.sa4a6.y....ag........................avbM.sa6a8......................................aMaM..........................avbMbM#fbl....ag........................avbMbMa6a6a6#Q....ag...............................GbMaVa7.L.E#6ag............ag..b..tbM.ea6#X.L.Eazag............ag..b..tbMa7a6a6a6a6a6", "a6a6a6a6aM......................................................................av.sbMaL...............................0bM#k.4a6bl....ag........................av#kbMa6a6bn...E............................................................#c#kbMbMaVbl....ag........................av#kbMa6a6a6a6bn...Z..............................albMbM.4.#..aM.Eag...........EagaR.ObMa7a6#M.#...Z.Eag...........EagaR.ObMa7a6a6a6a6a6", "a6a6a6a6.y.......................................................................y#kbMaL...............................GbMbMa4a6.y....ag.........................ybMbMa6a6#l#6.............................................................E#ebM.s#ka6.y....ag.........................ybMbMa6a6a6a6.t.....................................jbMa4.3....azag........ag.E...K#..sa3a6#m#D..agaM..........agagag.K#..sa3a6a6a6a6a6", "a6a6a6a6aVaR....................................................................avbMbMaL...............................G.sbM#qa6bl....ag........................avbMbMa6a6a6aY.k.E.......................................................ZaqbM#kbM#Qa6.S....ag........................avbMbMa6a6a6a6a6aR...E..............................#cbM#fbF.....Z..........ag.E.E.K.5#k#la6a6#......Z..........ag.Eag.K.5.s#la6a6a6a6a6", "a6a6a6a6a6#l#6.Z................................................................av#kbMaL..............................apbM#ka4a6.y....ag.........................y.s#ka6a6a6a6#laRag..................................................alaqbM.sbMaLa6a6.y....ag.........................y.s#ka6a6a6a6a6bl....................................aqbMaV#a...Z.............Eaz#nbma8.Ya6a6awaU...E.............Eaz.K#Wa8aLa6a6a6a6a6", "a6a6a6a6a6a6aYaWag...............................................................ybMbMaL...............................0bMbM.4a6bl....ag........................avbMbMa6a6a6a6#q#mblaM..............................................bqatbM#kbMaLa6a6a6bl....ag........................avbMbMa6a6a6a6a6a7....ag...............................qbMa7aZazag.............E#j.K.G#kaLa6a6bJaKazag............az#j#naG#k.Ya6a6a6a6a6", "a6a6a6a6a6a6a6a6.yaM........................al.jap..............................avbM.s#M..............................apbM#ka4a6.y....ag.........................ybMbMa6a6a6a6a6a6a6#m#A#y....................................#y##atbMbMbMbM#fa6a6a6a6bl....ag.........................ybMbMa6a6a6a6a6a6##..ag................................a8bMa4.GaEaU......aU#yafalbn.5.A.Y#qa6a6#V#EaEaU......aU#yala1.Ubl.A.Y#qa6a6a6a6", "a6a6a6a6a6a6a6a6a6a6as.U#c..........#cao.GaqbMbMao...............................y#kbMa6a6a6a6.s#k.s#kbM#k.s#kbM#k.s#kbMbMbM.4a6a6a6a6a4bM#k.s#kbM#k.s#kbM#k.s#kbM#kbMa6a6a6a6a6a6a6a6a6.4a8.y.Gao#cal.............kaWao.0.5#ebMbMbMbM#k.s#ma6a6a6a6a6a6a6a6a4.s#kbMa8bM#k.s#kbM#k.s#kbM#kbMa6a6a6a6a6a6a6a6a6#k.s#kbM#kbM#k.s#kbM#k.s#kbMa8.sbMbMaVanaT#W.HaB.UaG.x.x.jaJ.s.Y.Ya4a6a6a6.2aT.xaBaB.UaG#PbR.j.V#V.AaLa4a6a6a6a6", "a6a6a6a6a6a6a6a6a6a6a6.4aL#k.s#kbM#kbMbMbMbM.sbsaMag..ag........................aqbMbMa6a6a6a6bMbMbMbM.sbMbMbMbMbMbMbM.s#kbMa4a6a6a6a6.4bMbMbMbM.sbMbMbMa8bMbMbMbMbMbMa6a6a6a6a6a6a6a6a6a6a6#qa3bMbM#kbM#k.s#kbMa8bM.sbM#kbM.s#kbM#ka3#qa6a6a6a6a6a6a6a6a6a6#qbM#kbMbM.sbMbMbMbMbMbMbM.sbMbMa6a6a6a6a6a6a6a6a6#mbMbM.sbM.sbMbMbM.sbMbMbMbMbM#kbMbMbMa6a4a3a8aTaJas#ia8.Y#xawaL#ba6a6a6a6a6a4aaaQaq.V#e.ta8aL#x.AaL#b#qa6a6a6a6", "a6a6a6a6a6a6a6a6a6a6a6a6a6a6#7a7bM.sbM.sbMa7.I##.......Z........................bM.sbMa6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6.4bx#QaubM.sbM#kbM#k#f#Q.I.4a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6#qaVau#faYa4a4#qa6a6a6a6a6a6a6a6a6a6#qaVau.TaYa4a4#q#qa6a6a6a6a6a6", "a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6#Qbq.................................EbM#kbMa6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6", "a6a6a6a6a6a6.t.qbn.q.q.q.q.qbn.q.q.q.q.qaR...........E........................aWbMbMbMa6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6", "a6a6a6a6a6a6.y.....................................E..........................##.s#k.Ya6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6", "a6a6a6a6a6a6bl.......Z.Z.E.Z.Z.E.Z.Z.E.Z.Z.E.Zag..............................#ebMbM#Qa6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6", "a6a6a6a6a6a6.y....ag........................................................aRbM#kbM#qa6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6", "a6a6a6a6a6a6bl....ag........................................................akbM.sbMa6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6", "a6a6a6a6a6a6.y....ag......................................................#c.s#kbMa3a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6", "a6a6a6a6a6a6bl.....E.....................................................latbMbMbMa6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6", "a6a6a6a6a6a6bl....ag.................................................Z.G.sbM#kbMa7a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6", "a6a6a6a6a6a6bl....ag..........................................aW#u.S#kbM#kbMbMa3a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6", "a6a6a6a6a6a6bQblbl.yap.0ap.G.0ap.G.0ap.G.0apap.0ap.0apav.y#e#k.s#kbM.sbMbM.Ya4a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6", "a6a6a6a6a6a6a6a6a6a4bMbMbMbM.sbMbM.sbMbM.sbMbM#kbMbMbMbM#kbMbMbMbMbMa7#ma6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6", "a6a6a6a6a6a6a6a6a6a6a4a4a4a4a4a4a4a4a4a4a4a4a4#qa#a4a#a4.4a#a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6", "a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6", "a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6" }; gnokii-0.6.31/xgnokii/xpm/Send.xpm0000644000175000017500000000170611666163120015102 0ustar leoleo/* XPM */ /* G N O K I I A Linux/Unix toolset and driver for Nokia mobile phones. Copyright (C) 1999 Pavel Janík ml. & Hugh Blemings. Released under the terms of the GNU GPL, see file COPYING for more details. This is the icon for Send. Last modification: Sat Jul 24 14:30:37 CEST 1999 Modified by Pavel Janík ml. */ static char *Send_xpm[] = { "20 19 7 1", "* c #000000", "# c #800000", "b c #008000", "c c #00ff00", "i c #808080", " c None", "l c #ffffff", " ", " * ", " * ", " **** ", " *iiii* ", " ****** ", " *cbb** ", " * bb** ", " ****** ", " *********** ", " *lll ***** ", " *ll ***** ", " *lll ***** ", " *ll * ***** ", " *ll * ****** ", " * * **** ", " * ", " ", " " }; gnokii-0.6.31/xgnokii/xpm/NewMeet.xpm0000644000175000017500000000155011666163120015552 0ustar leoleo/* XPM */ /* G N O K I I A Linux/Unix toolset and driver for Nokia mobile phones. Copyright (C) 1999 Pavel Janík ml. & Hugh Blemings. Released under the terms of the GNU GPL, see file COPYING for more details. This is the icon for Open. Last modification: Wed Jun 14 18:04:00 CEST 2000 Modified by Marcel Köppen */ static char*NewMeet_xpm[]={ "20 18 3 1", "# c #000000", ". c None", "a c #ffffff", "....................", "...##########.......", "...#aaaaaaaa##......", "...#aaaaaaaa#a#.....", "...#aaaaaaaa####....", "...#aaaaaaaaaaa#....", "...#aaaaaaaaaaa#....", "...#aaaaaaaaaaa#....", "...#aa#aaaaa#aa#....", "...#aaa#aaa#aaa#....", "...#a####a####a#....", "...#aaa#aaa#aaa#....", "...#aa#aaaaa#aa#....", "...#aaaaaaaaaaa#....", "...#aaaaaaaaaaa#....", "...#aaaaaaaaaaa#....", "...#############....", "...................."}; gnokii-0.6.31/xgnokii/xpm/Names.xpm0000644000175000017500000000060211666163120015246 0ustar leoleo/* XPM */ static char * Names_xpm[] = { "16 14 4 1", " c None", ". c black", "X c gray50", "o c white", " .. ", " .Xo. ... ", " .Xoo. ..oo. ", " .Xooo.Xooo... ", " .Xooo.oooo.X. ", " .Xooo.Xooo.X. ", " .Xooo.oooo.X. ", " .Xooo.Xooo.X. ", " .Xooo.oooo.X. ", " .Xoo.Xoo..X. ", " .Xo.o..ooX. ", " .X..XXXXX. ", " ..X....... ", " .. "}; gnokii-0.6.31/xgnokii/xpm/NewRem.xpm0000644000175000017500000000160511666163120015404 0ustar leoleo/* XPM */ /* G N O K I I A Linux/Unix toolset and driver for Nokia mobile phones. Copyright (C) 1999 Pavel Janík ml. & Hugh Blemings. Released under the terms of the GNU GPL, see file COPYING for more details. This is the icon for Open. Last modification: Wed Jun 14 18:04:00 CEST 2000 Modified by Marcel Köppen */ static char*NewRem_xpm[]={ "20 18 5 1", "c c #c3c3c3", "# c #000000", "b c #ffff00", ". c None", "a c #ffffff", "....................", "...##########.......", "...#aaaaaaaa##......", "...#aaaaaaaa#a#.....", "...#aaaaaaaa####....", "...#aaaaaaaaaaa#....", "...#aaaa###aaaa#....", "...#aaa#bbb#aaa#....", "...#aa#bbbbb#aa#....", "...#aa#bbbbb#aa#....", "...#aa#bbbbb#aa#....", "...#aaa#bbb#aaa#....", "...#aaa#ccc#aaa#....", "...#aaaa#c#aaaa#....", "...#aaaa###aaaa#....", "...#aaaaaaaaaaa#....", "...#############....", "...................."}; gnokii-0.6.31/xgnokii/xpm/Startup_logo.xpm0000644000175000017500000000123111666163120016664 0ustar leoleo/* XPM */ static char * Startup_logo_xpm[] = { "20 19 10 1", " c None", ". c #000000", "+ c #808080", "@ c #00FF00", "# c #008000", "$ c #009D00", "% c #1C5CFF", "& c #FFFF1E", "* c #913615", "= c #0B256B", " ", " ", " . ", " . ", " .... ", " .++++. ... ", " ...... . ", " .@##.. ... ", " . ##.. . ", " ...... ", " ...... .......... ", " ...... .$$$%%%&&. ", " ...... .$*$%%%%&. ", " ...... .%*%%%%%%. ", " ...... .****====. ", " ...... .***=====. ", " .... .......... ", " ", " "}; gnokii-0.6.31/xgnokii/xpm/NewCall.xpm0000644000175000017500000000155011666163120015533 0ustar leoleo/* XPM */ /* G N O K I I A Linux/Unix toolset and driver for Nokia mobile phones. Copyright (C) 1999 Pavel Janík ml. & Hugh Blemings. Released under the terms of the GNU GPL, see file COPYING for more details. This is the icon for Open. Last modification: Wed Jun 14 18:04:00 CEST 2000 Modified by Marcel Köppen */ static char*NewCall_xpm[]={ "20 18 3 1", "# c #000000", ". c None", "a c #ffffff", "....................", "...##########.......", "...#aaaaaaaa##......", "...#aaaaaaaa#a#.....", "...#aaaaaaaa####....", "...#aa###aaaaaa#....", "...#a######aaaa#....", "...#a#######aaa#....", "...#aa##a####aa#....", "...#aaaaaa###aa#....", "...#aaaaaaa###a#....", "...#aaaaaa####a#....", "...#aaaaaa####a#....", "...#aaaaaaa##aa#....", "...#aaaaaaaaaaa#....", "...#aaaaaaaaaaa#....", "...#############....", "...................."}; gnokii-0.6.31/xgnokii/xpm/quest.xpm0000644000175000017500000000667611666163120015365 0ustar leoleo/* XPM */ /* G N O K I I A Linux/Unix toolset and driver for Nokia mobile phones. Copyright (C) 1999 Jan Derfinak Released under the terms of the GNU GPL, see file COPYING for more details. */ static char *quest_xpm[] = { /* columns rows colors chars-per-pixel */ "44 66 2 1", " c Gray0", ". c None", /* pixels */ "................... ...............", ".............. ...........", "........... ........", "....... .......", ".... .....", "... ....... ....", ".... ............. ...", ".... ................ ..", ".... .................. ..", ".... .................... .", "..... ..................... .", "..... ...................... ", "..... ....................... ", "..... ........................ ", "..... ........................ ", "..... ....................... ", "...... ........................ ", "...... ........................ ", "...... ....................... .", "...... ....................... .", "...... ...................... ..", "....... ..................... ..", "....... .................... ...", "........................... ....", ".......................... .....", "......................... ......", "........................ ........", "...................... .........", "..................... ...........", ".................... .............", "................... ...............", ".................. ................", "................. ..................", "................ ...................", "............... ....................", ".............. .....................", ".............. ......................", "............. ......................", "............. ......................", "............. .....................", "............. ....................", "............. ..................", ".............. .................", ".............. .......................", "............... ..........................", "............... ............................", "............................................", "............................................", ".................. ......................", "................. .....................", "............... ....................", "............... ...................", ".............. ...................", ".............. ..................", ".............. ..................", ".............. ..................", ".............. ..................", ".............. ...................", "............... ...................", "............... ....................", "................ .....................", ".................. ......................", "............................................", "............................................", "............................................", "............................................", }; gnokii-0.6.31/xgnokii/xpm/Green_pixel.xpm0000644000175000017500000000013211666163120016442 0ustar leoleo/* XPM */ static char * Green_pixel_xpm[] = { "1 1 2 1", " c None", ". c #5ACA62", "."}; gnokii-0.6.31/xgnokii/xpm/sms.xpm0000644000175000017500000000550211666163120015011 0ustar leoleo/* XPM */ /* G N O K I I A Linux/Unix toolset and driver for Nokia mobile phones. Copyright (C) 1999 Pavel Janík ml. & Hugh Blemings. Released under the terms of the GNU GPL, see file COPYING for more details. This is the logo of the GUI utility. Copyright (C) 1999 Petr Vostøel Last modification: Sat Jun 26 07:38:27 CEST 1999 Modified by Pavel Janík ml. */ static char *XPM_sms[] = { "26 7 126 2", ".. c None", ".# c #161616", ".a c #cf9a98", ".b c #d9e1ed", ".c c #b10707", ".d c #ededed", ".e c #bababa", ".f c #ababab", ".g c #385886", ".h c #c2c2c2", ".i c #9b9b9b", ".j c #af5f5d", ".k c #353535", ".l c #dedede", ".m c #8b8b8b", ".n c #757575", ".o c #444444", ".p c #a4a4a4", ".q c #393939", ".r c #e6e6e6", ".s c #f3f3f3", ".t c #6f0302", ".u c #e6ebf3", ".v c #b2b2b2", ".w c #545454", ".x c #ffffff", ".y c #848383", ".z c #233755", ".A c #656565", ".B c #7b7b7b", ".C c #949494", ".D c #2c2c2d", ".E c #6b6b6b", ".F c #0f1a29", ".G c #4c4c4c", ".H c #cecece", ".I c #d6d6d6", ".J c #1f2020", ".K c #b2c2d9", ".L c #5c5c5c", ".M c #d6deeb", ".N c #2b4468", ".O c #162336", ".P c #0e0e0e", ".Q c #f9f9f9", ".R c #000000", ".S c #e8edf4", ".T c #3d6194", ".U c #edf1f6", ".V c #c9c9c9", ".W c #41669c", ".X c #e8cecd", ".Y c #cad5e5", ".Z c #bccade", ".0 c #4369a1", ".1 c #9ca4ae", ".2 c #b5c5db", ".3 c #c5d2e3", ".4 c #324e78", ".5 c #3d3d3d", ".6 c #9299a3", ".7 c #d3dce9", ".8 c #1b2b42", ".9 c #b4bcc8", "#. c #34527e", "## c #cdd8e7", "#a c #2d0201", "#b c #012343", "#c c #f4eaea", "#d c #08121e", "#e c #8a919d", "#f c #c2cfe1", "#g c #bfbfbf", "#h c #080d14", "#i c #fcfcfc", "#j c #c4cedb", "#k c #bf7c7b", "#l c #cfd9e8", "#m c #757b83", "#n c #b6c6db", "#o c #f9f2f2", "#p c #2e4970", "#q c #d2adac", "#r c #d7e0eb", "#s c #7d838b", "#t c #1f314b", "#u c #61666c", "#v c #686d74", "#w c #08090b", "#x c #484e56", "#y c #6f7071", "#z c #242525", "#A c #bfcde0", "#B c #c7c5c5", "#C c #040506", "#D c #303031", "#E c #37393d", "#F c #273e5e", "#G c #446ba4", "#H c #282929", "#I c #eef2f7", "#J c #344f69", "#K c #eef1f7", "#L c #d1dbe9", "#M c #565758", "#N c #a5adb8", "#O c #606161", "#P c #786463", "#Q c #b4c4da", "#R c #404040", "#S c #575b61", "#T c #858b94", "#U c #dde4ee", "#V c #ebeff5", "#W c #4b2726", "#X c #2b2e34", "#Y c #414449", "#Z c #484848", "#0 c #505050", "#1 c #725655", "#2 c #a23c3a", "#3 c #acb4bf", "#4 c #bdc6d3", "#5 c #c0c9d6", "#6 c #b3c3da", "#7 c #ffffff", "...1#S.#.R.R.R.R.R.R.R.R.R#z#x.R.R.R.R#z#x.#.##x#e..", ".1.D.R.e.x.x.x.x.w.x.x.n#z.J.d.x.n.e.x.x.x.x.w.R#z#e", "#M.R.R.x.m.R.#.n.o.x.x.l#X.A.x.x.n.x.m.R.#.n.o.R.R#x", ".#.R.R.l.x.e.e.f.#.x.f.x.o.f.f.x.n.l.x.e.e.f.#.R.R.#", ".#.R.R#z.o.n.m.x.n.x.n.l.h.x.A.x.n#z.o.n.m.x.n.R.R.#", ".#.R.R.x.f.o.w.x.n.x.n.n.x.d.R.x.n.x.f.o.w.x.n.R.R#M", ".R.R.R.m.x.x.x.d.k.x.n#z.x.i.R.x.n.m.x.x.x.d.k.R.R.R" }; gnokii-0.6.31/xgnokii/xpm/Tool_filled_rectangle.xpm0000644000175000017500000000105111666163120020462 0ustar leoleo/* XPM */ static char * Tool_filled_rectangle_xpm[] = { "20 19 2 1", " c None", ". c #000000", " ", " ", " ", " .............. ", " .............. ", " .............. ", " .............. ", " .............. ", " .............. ", " .............. ", " .............. ", " .............. ", " .............. ", " .............. ", " .............. ", " ", " ", " ", " "}; gnokii-0.6.31/xgnokii/xpm/Reply.xpm0000644000175000017500000000067211666163120015305 0ustar leoleo/* XPM */ static char*Reply_xpm[]={ "16 16 5 1", "b c #ffa858", "c c #c3c3c3", "# c #000080", "a c #000000", ". c None", ".####.....aaaa..", ".#..#.....a##ab.", ".#..#.....a##ab.", ".###c.....a##ab.", ".#c#c.....a##ab.", ".#.c#.....a##ab.", ".#..#c....a##ab.", "....a.....a##ab.", "...aa.....a##ab.", "..a#aaaaaaa##ab.", ".a###########ab.", "a############ab.", ".a###########ab.", "..a#aaaaaaaaaab.", "...aabbbbbbbbbb.", "....a....ccc...."}; gnokii-0.6.31/xgnokii/xpm/Save.xpm0000644000175000017500000000156211666163120015107 0ustar leoleo/* XPM */ /* G N O K I I A Linux/Unix toolset and driver for Nokia mobile phones. Copyright (C) 1999 Pavel Janík ml. & Hugh Blemings. Released under the terms of the GNU GPL, see file COPYING for more details. This is the icon for Save. Last modification: Sat Jul 24 14:30:37 CEST 1999 Modified by Pavel Janík ml. */ static char *Save_xpm[] = { "20 18 3 1", "* c #000000", "# c #808000", " c None", " ", " ************** ", " *#* * * ", " *#* *** ", " *#* *#* ", " *#* *#* ", " *#* *#* ", " *#* *#* ", " *##********##* ", " *############* ", " *##*********#* ", " *##****** *#* ", " *##****** *#* ", " *##****** *#* ", " ************* ", " ", " ", " " }; gnokii-0.6.31/xgnokii/xpm/Operator_logo.xpm0000644000175000017500000000111611666163120017017 0ustar leoleo/* XPM */ static char * Operator_logo_xpm[] = { "20 19 5 1", " c None", ". c #000000", "+ c #808080", "@ c #00FF00", "# c #008000", " ", " ", " . ", " . ", " .... ", " .++++. ", " ...... ....... ", " .@##.. . . ", " . ##.. ..... ", " ...... . . ", " ...... ", " ...... ..... ", " ...... . . . ", " ...... ... ", " ...... . ", " ...... . ", " .... . ", " ", " "}; gnokii-0.6.31/xgnokii/xpm/Startup.xpm0000644000175000017500000000172111666163120015650 0ustar leoleo/* XPM */ /* G N O K I I A Linux/Unix toolset and driver for Nokia mobile phones. Copyright (C) 1999 Pavel Janík ml. & Hugh Blemings. Released under the terms of the GNU GPL, see file COPYING for more details. This is the icon for Startup Logo. Last modification: Sat Jul 24 14:30:37 CEST 1999 Modified by Pavel Janík ml. */ static char *Startup_xpm[] = { "20 19 7 1", "* c #000000", "# c #800000", "b c #008000", "c c #00ff00", "i c #808080", " c None", "l c #ffffff", " ", " ", " ********* ", " *********** ", " ** ** ", " ** ", " ** ", " * ", " ********** ", " ********** ", " ** ", " ** ", " ** ", " ** ** ", " *********** ", " ********* ", " ", " ", " " }; gnokii-0.6.31/xgnokii/xpm/BCard.xpm0000644000175000017500000000073711666163120015167 0ustar leoleo/* XPM */ static char * BCard_xpm[] = { "16 16 7 1", " s None c None", ". c steelblue1", "X c black", "o c white", "O c gray60", "+ c gray45", "@ c gray85", " ", " ............ ", " .X.X.X..X.X. ", " ............ ", " .oooooooooo. ", " .oO+OoOOooo. ", " .ooo+Ooo++O. ", " .o++Ooooooo. ", " .oooOoO@@oo. ", " .oO++@@OOOo. ", " .oooooooooo. ", " ............ ", " ", " ", " ", " "}; gnokii-0.6.31/xgnokii/xpm/Play.xpm0000644000175000017500000000151311666163120015112 0ustar leoleo/* XPM */ /* G N O K I I A Linux/Unix toolset and driver for Nokia mobile phones. Copyright (C) 1999 Pavel Janík ml. & Hugh Blemings. Released under the terms of the GNU GPL, see file COPYING for more details. This is the icon for Play. Last modification: Mon Oct 6 00:39:57 CEST 2003 Modified by BORBELY Zoltan */ static char *Play_xpm[] = { "20 18 2 1", "* c #000000", " c None", " ", " ", " * ", " ** ", " *** ", " **** ", " ***** ", " ****** ", " ******* ", " ******* ", " ****** ", " ***** ", " **** ", " *** ", " ** ", " * ", " ", " " }; gnokii-0.6.31/xgnokii/xpm/Tool_line.xpm0000644000175000017500000000103511666163120016130 0ustar leoleo/* XPM */ static char * Tool_line_xpm[] = { "20 19 2 1", " c None", ". c #000000", " ", " ", " ", " ", " . ", " . ", " . ", " . ", " . ", " . ", " . ", " . ", " . ", " . ", " . ", " ", " ", " ", " "}; gnokii-0.6.31/xgnokii/xpm/background.xpm0000644000175000017500000014745711666163120016346 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for Nokia mobile phones. Copyright (C) 1999 Pavel Janík ml. & Hugh Blemings. Released under the terms of the GNU GPL, see file COPYING for more details. This is the background of the GUI. Copyright (C) 1999 Petr Vostøel Last modification: Sat Jun 26 07:30:06 CEST 1999 Modified by Pavel Janík ml. */ /* XPM */ static char *XPM_background[] = { "261 96 129 2", " c None", ". c #FFFFFF", "+ c #FCFCFC", "@ c #F9F9F9", "# c #F9F2F2", "$ c #F4EAEA", "% c #F3F3F3", "& c #EEF2F7", "* c #EEF1F7", "= c #EDF1F6", "- c #EDEDED", "; c #EBEFF5", "> c #E8EDF4", ", c #E8CECD", "' c #E6EBF3", ") c #E6E6E6", "! c #DFE6EF", "~ c #DEDEDE", "{ c #DCE4EE", "] c #D9E1ED", "^ c #D7DFEB", "/ c #D6DEEB", "( c #D6D6D6", "_ c #D3DCE9", ": c #D2ADAC", "< c #D1DBE9", "[ c #D0DAE8", "} c #CFD9E8", "| c #CF9A98", "1 c #CECECE", "2 c #CDD8E6", "3 c #CAD5E5", "4 c #C9C9C9", "5 c #C7C5C5", "6 c #C6D2E3", "7 c #C5CEDB", "8 c #C2CFE1", "9 c #C1C1C1", "0 c #C0C9D6", "a c #BFCCDF", "b c #BF7C7B", "c c #BDC6D3", "d c #BBC9DD", "e c #BABABA", "f c #B8C7DC", "g c #B8C0CB", "h c #B7C6DC", "i c #B6C6DB", "j c #B4C4DA", "k c #B3C3DA", "l c #B3BBC7", "m c #B2C2D9", "n c #B2B2B2", "o c #B10707", "p c #AF5F5D", "q c #ACB4BF", "r c #ABABAB", "s c #A5ADB8", "t c #A4A4A4", "u c #A23C3A", "v c #9BA3AD", "w c #9B9B9B", "x c #949494", "y c #939AA4", "z c #8C929C", "A c #8B8B8B", "B c #848383", "C c #7D838B", "D c #7B7B7B", "E c #786463", "F c #757B83", "G c #757575", "H c #725655", "I c #6F7070", "J c #6F0302", "K c #6A6A6A", "L c #686D74", "M c #656565", "N c #61666C", "O c #606161", "P c #5C5C5C", "Q c #575B61", "R c #575758", "S c #545454", "T c #505151", "U c #4E4F4F", "V c #4C4C4C", "W c #4B2726", "X c #484848", "Y c #446BA4", "Z c #444444", "` c #4369A1", " . c #41669C", ".. c #414449", "+. c #404040", "@. c #3D6194", "#. c #3D3D3D", "$. c #393939", "%. c #385886", "&. c #37393D", "*. c #353535", "=. c #34527E", "-. c #344F69", ";. c #324E78", ">. c #303031", ",. c #2E4970", "'. c #2D0201", "). c #2C2C2D", "!. c #2B4468", "~. c #292929", "{. c #273E5E", "]. c #252525", "^. c #233755", "/. c #212121", "(. c #1F314B", "_. c #1B2B42", ":. c #1B1B1B", "<. c #162336", "[. c #151515", "}. c #0F1A29", "|. c #0E0E0E", "1. c #08121E", "2. c #080D14", "3. c #08090B", "4. c #040506", "5. c #012343", "6. c #000000", "7. c #FFFFFF", "8. c #000000", " [.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.8.8.8.8. ", " 8.8.|.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8. ", " 8.8.8.8.8.3.Z w e r G [.w e r 8.*.e A 8.8.S r e G [.8.w e G [.r e M A e A A e A 8.8.8.8.8.G e r Z 8.8.8.8.8.8.8.G M G M 8.8.8.8.8.8.8.G M 8.8.8.8.8.8.8.8.8.8.8.8.8.r e e w *.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.[.G e r Z 8.8.8.8.8.8.8.G M 8.8.8.8.8.8.8.1._.,.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.%.;.!.^._.}.2.8.8.8.8. ", " 8.8.8.}.(.(.2.8.G . . . . - [.. . . [.M . A 8.w . . . . e 8.. . G G . ~ [.. . G . . G 8.8.8.8.w 1 S S /.8.8.8.8.8.8.8.~ Z ~ Z 8.8.8.8.8.8.8.~ Z 8.8.8.8.8.8.8.8.8.8.8.8.8.. G Z r ~ 8.8.8.8.8.8.8.[.[.8.8.8.8.8.8.8.8.8.8.1 r Z M /.8.8.8.8.8.8.8.r S 8.[.[.8.8.8.8.8.8.1.!.Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y ` ` .@.=.!._.}.4.8.8.8. ", " 8.8.2._.;. .=.1.8.Z . . G 8.[.+.[.. . . S G . G Z . . Z M . . ).. . G . . +.[.. . D . . G 8.8.8.Z - [.8.8.8.8.8.8.8.8.8.8.. *.. *.8.8.8.8.8.8.8.. *.8.8.8.8.8.8.8.8.8.8.8.8.*.. *.8.[.. Z 8.8.8.8.8.[.. [.8.8.8.8.8.8.8.8.8.*.. [.8.8.8.8.8.8.8.8.8.8.8.8.[.. [.8.8.8.8.8.8.8.1.=.Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y ` ` =.{.<.3.8.8.8. ", " 8.8.2.^.=.Y Y Y (.8.8.w . ~ 8.8.8.8.+.. . . G r . Z r . 1 8.Z . . G . . - . A 8.+.. . G . . Z 8.8.8.w w 8.8.8.8.8.G - . A 8.*.. *.. 8.M 1 8.8.e M *.. 8.A - . e 8.Z . e M 8.8.8.+.. 8.8.8.. Z A - . e 8.1 - e *.A - . e 8.8.8.8.*.. I 8.8.8.M 1 8.8.e M *.. [.4 - e *.G - . A 8.8.8.(.Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y ` =.^.1.4.8.8. ", " 8.3.(.=.Y Y Y Y Y 1.8.8.~ . w G . . . A . A . e e . *.- . w 8.S . . A . . . . /.8.M . . D . . /.8.8.8.~ G 8.8.8.8.G e [.*.. *.T ~ S ~ 8.G r 8.8.- Z S ~ 8./.8.S . 8.M 1 [.8.8.8.8.G 1 8.8.[.. *.:.8.S . 8.M e 8.8./.8.S . 8.8.8.8.8.M - ~ S 8.G r 8.8.- Z +.- 8.M e 8.G e [.*.. *.8.8.1.Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y @.%.=.;.,.!.!.!.!.!.!.,.;.=.%.@.` Y Y Y Y Y Y Y Y @.!.<.3.8.8. ", " 8.8.}.,.` Y Y Y Y Y Y 8.8.8.. . G Z w . . G . G 1 . - . 8.. . G 8.A . . G . - . . G 8.G . . G . . 8.8.8.8.. Z 8.8.8.8.~ r I G . +.G e G e 8.r G 8.8.. [.G e *.~ . ~ 1 8.G w 8.8.8.8.8.A e 8.8.+.. *.~ . ~ 1 8.G w 8.*.~ . ~ 1 8.8.8.8.8.8.[.w . /.r G 8.8.. [.G e 8.G w 8.~ r I G . +.8.8.8.Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y @.;.{._.}.1.2.4.8.8.8.8.8.8.8.8.4.3.1.}.<.^.,.%.` Y Y Y Y Y Y .,.<.3.8.8. ", " 8.8._.%.Y Y Y Y Y Y Y Y 1.8.8.- . w 8.S . - r . Z w . . ~ 8.- . A 8.~ . w r . e e . ~ 8.r . 1 r . 1 8.8.8.8.. Z 8.8.8.8.. w G G G [.w G w G 8.1 S 8.Z . 8.w G ~ w 8.G r 8.r G 8.8.8.8.8.e G 8.8.A r ~ w 8.G r 8.r G 8.~ w 8.G r 8.8.8.8.8.8.8.8.. Z 1 S 8.Z . 8.w A 8.r G 8.. w G G G [.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.}.;.` Y Y Y Y Y Y Y Y Y Y Y Y Y Y @.!._.1.3.8.|.+.I A t r n n n n r r t x A I T ].|.4.1.<.{.%.` Y Y Y Y Y @.!.}.8.8. ", " 8.4.{. .Y Y Y Y Y Y Y %.{.2.8.8.w . . 1 ~ . e e . *.O . . e 8.w . - 1 . - /.e . r M . . Z e . e e . e 8.8.8.8.r r [.[.*.8.~ w [.[.:.8.e G e G 8.. S 8.G 1 8.e G . M [.r G 8.e S 8.8.8.8.8.1 G 8.S - *.. M [.r G 8.e M 8.. M [.r G 8.8.8.8.S [.[.A 1 8.. S 8.G 1 8.e G 8.e M 8.~ w [.[.:.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.}.;.` Y Y Y Y Y Y Y Y Y Y ` ;.(.1.4.4.Z B n 9 9 9 9 e e e n n n r r t t t w w x x D S ].4.2._.,. .Y Y Y Y Y @.^.2.8.8. ", " 8.3.!.` Y Y Y Y Y Y %.^.2.8.8.8.8.[.w - . ~ w S . . 8.*.. . A 8.[.w . . r /.8.. . G [.. . w . . G . . G 8.8.8.8.*.e . ( S 8.*.( . - M 8.- Z - Z 8.A . ~ 1 e 8.- Z G . e 1 M 8.. Z 8.8.8.8.8.. . . 1 Z 8.G . e 1 M 8.r . G G . e 1 M 8.8.8.8.r . . r /.8.A . ~ 1 e 8.- Z 8.r . G *.( . - M 8.8./.v [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ v &.}.;.` Y Y Y Y Y Y Y Y .,.<.3.8.#.A e 4 5 5 9 9 9 9 e e e n n n r r t t t w w x x A A B D V :.4.}.!.@.Y Y Y Y ` ;.<.8.8. ", " 8.4.!.Y Y Y Y Y Y Y !.}.8.8.].N N /.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8./.v > * = ' ] [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ y ).8.}.;.` Y Y Y Y Y Y ` ;.<.4.3.P r 4 4 4 4 5 5 5 9 9 9 e e e n n n r r t t t w w x x A A B B D D P ).4.}.!. .Y Y Y Y @.(.3.[. ", " 8.8.{.Y Y Y Y Y Y @._.8.8./.I l [ [ v O ~.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.2.X g * & & & & & { [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ z /.8.}.;.` Y Y Y Y Y Y %.(.3.4.M e 1 1 1 4 4 4 5 5 9 9 e e e n r t w w w t t t w w w x x A A B B D D G I P ~.4.<.=.Y Y Y Y ` !.1.8. ", " 8.8._.` Y Y Y Y Y %.<.8.8.R s [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ ] m m m m m m m d * & & & & & * [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ z /.8.<.%.` Y Y Y Y Y ` ,.}.8.V n 1 1 1 4 1 4 4 5 9 e n r r t t w w x x x A x w t w w w x x A A B B D D I K K M U :.2.{.@.Y Y Y Y =.}.8. ", " |.}.@.Y Y Y Y Y %.<.8.:.F } [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < < } 3 3 3 / [ [ [ [ [ < < < < < < < < < < < < [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < 6 m m m m m m m k ! & & & & & * [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ y /.8.<.%.Y Y Y Y Y Y @.(.3.:.x 1 1 1 1 1 1 4 5 5 9 n r r t t r w x r ( ) 4 x B w w w x x x A A A B B D D I I M M P P *.3._.%.Y Y Y Y %.}.8. ", " 8.3.,.Y Y Y Y Y =.<.8.).z [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < < 6 m m m m m m m k 2 < [ [ ^ } [ [ [ [ [ [ [ [ [ < < [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ 3 i m m m m m m m k / & & & & & * [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ v ).8.}.%.Y Y Y Y Y Y %.<.4.S e 1 1 1 1 1 1 5 e n n r r n 4 ~ @ . w x . . . . x G A x x x A A A A B B B D D G K K O P R S X [.1.,.Y Y Y Y @.<.8. ", " 8._.` Y Y Y Y %.<.8.).y [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < 3 d m m m m m m m m m m m h 2 _ k m m m m m m m m m m k _ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ 8 m m m m m m m k ] & & & & & * [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ q &.8.}.%.` Y Y Y Y Y =.}.8.D 4 1 1 1 1 1 4 5 e n r r r n . . . @ 1 A e . - I A M M D B B B B B B B B B D D D G I M O P R T V V /.2.!.Y Y Y Y @.<.8. ", " |.1.%.Y Y Y Y Y _.8.:.z [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < < d m m m m m m m m m m m m m m j 8 j m m m m m m m m m m 6 < [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < < m m m m m m m k ; & & & & & = [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ 0 T 8.}.;.` Y Y Y Y Y ;.1.|.w 4 1 4 1 1 4 4 4 e n e ) . 9 x 4 ~ . @ O P x . . % t S X R I G G G G D D D D D D G I K K M P R T V Z +.~.3.{.Y Y Y Y @.}.8. ", " 8.^.Y Y Y Y Y !.8.8.F [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ 3 m m m m m m m m m m m m m m m m m m m m m m m m m m m m m 2 [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ ] 6 m m m m m k ] & & & & & & ' [ [ [ [ [ [ [ [ [ [ [ [ [ [ 3 L 8.3.!.` Y Y Y Y Y ;.1.:.t 4 4 4 4 4 5 5 9 9 r t % . ) w I O B . . O *.>.t . . . r ].~.R P P O M M K I I I I I I K K O P R T X Z #.$.).|.{.` Y Y Y =.1.|. ", " [.2.%.Y Y Y Y %.}.8.R 2 [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < 8 m m m m m m m m m m m m m m m m m m m m m m m m m m m m m k < [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ ] 3 d m k 8 < ^ ' * & & * ' _ [ [ [ [ [ [ [ [ [ [ [ [ [ 2 z |.8.^.` Y Y Y Y Y ;.1./.r 5 4 4 4 4 9 e n r t w r . . I R S #.*.. . D [.|.|.~.9 . - 4.|.Z Z X V U S R P O M M K K K M M P R T X Z #.$.$.).|.{.Y Y Y Y !.3.8. ", " 8.(.Y Y Y Y Y ^.8./.s [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < 8 m m m m m m m m m j h d f k m m m m m m m m m m m m m m m m k < [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < 2 6 2 _ [ [ [ } ] ] } [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ q >.8.<. .Y Y Y Y Y =.1.:.r 5 5 5 4 4 9 n n e n x B x . . M *.)./.:.5 . n 4.4.~ w ~ . n 8.4.#.#.#.#.+.Z X V T S P P O O O O P R T X Z #.$.*.*.~.2.!.Y Y Y ` ^.8.8. ", " 8.4.;.Y Y Y Y %.1.8.I [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < 3 m m m m m m m m 8 3 [ < < < < 3 h m m m m m m m m m k h h d d 6 < [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ } [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ 3 O 8.1.=.` Y Y Y Y %.}.[.t 9 5 5 5 5 9 n r 4 . @ t M S % . e /.[./.3.B . - 8./.. . . 1 >.8.[.$.$.$.#.#.#.#.Z Z X V T R R P P P R T V Z $.$.*.*.*.].2.,.Y Y Y .<.8. ", " |.}. .Y Y Y Y {.8.].l [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < m m m m m m m k } _ [ [ [ [ [ [ [ [ 6 m m m m m m m m 6 _ < _ ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] _ [ [ [ [ [ [ [ < < ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] < [ [ [ [ < ] ] ] ] ] < [ [ [ [ [ [ [ [ [ [ [ [ [ [ < ] ] ] ] < < ] ] ] ] ] < } a d d d d 3 [ [ [ [ [ [ [ [ [ [ [ [ [ z |.4.{.` Y Y Y Y @.<.4.x 9 9 9 9 5 e n r r . . . . t $.t . . B B - [.+.- n |.8.8.>./.8.8.3.).$.$.$.$.$.$.#.#.#.+.Z X V U S S R S T V Z #.*.*.*.*.>./.1.=.Y Y Y =.1.[. ", " 8.^.Y Y Y Y Y }.8.N [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ ^ k m m m m m m 8 } [ [ [ [ [ [ [ [ [ [ ] d m m m m m m m 2 [ ] ' ; * * * * * * * * * * * * * * * & * ' ] [ [ [ [ [ < ' ; = * * * * * * * * * * * * * * & = ; ! < [ [ ] * & * & * < [ [ [ [ [ [ [ [ [ [ [ [ [ < ' & * * & ! < ' & * * & ] 2 k m m m m 6 [ [ [ [ [ [ [ [ [ [ [ [ c #.8.<. .Y Y Y Y ` ^.8.G 9 9 9 9 9 n r t w A ~ . ) . . e *.( . . . - /.8.8.8.4.8.8.8.8.8.3.).$.$.$.$.$.$.$.$.$.#.#.#.+.Z X V U T T U V Z $.$.*.*.>.>.>.[.<.@.Y Y ` {.8.8. ", "8.4.;.Y Y Y Y =.8.8.v [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < 2 m m m m m m 8 < [ [ [ [ [ [ [ [ [ [ [ [ < m m m m m m k _ ] * & & & & & & & & & & & & & & & & & & & & = ] [ [ [ < ; & & & & & & & & & & & & & & & & & & & & & ' < [ ] * & & & * < [ [ [ [ [ [ [ [ [ [ [ [ [ < ' & & & & ! < ' & & & & ] < h m m m m 6 [ [ [ [ [ [ [ [ [ [ [ 2 F |.3.;.` Y Y Y Y ,.3.U e e 9 9 e n r r ( w G x . % 4 . . 1 Z I 9 I |.8.4.4.4.[.*.).).).>.$.$.$.$.$.$.$.$.$.$.$.$.$.#.#.#.Z Z X V V V *.~./.:./.*.>.>.>.>.|.^.Y Y Y .<.8. ", "8.}.@.Y Y Y Y {.8.>.2 [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < k m m m m m d ] [ [ [ [ [ [ [ [ [ [ [ [ [ < k m m m m m d ] ; & & & & & & & & & & & & & & & & & & & & & & = < [ < ' & & & & & & & & & & & & & & & & & & & & & & & ! [ ] * & & & ; < [ [ [ [ [ [ [ [ [ [ [ [ [ < ' & & & & ! < ' & & & & ] < i m m m m 6 [ [ [ [ [ [ [ [ [ [ [ l >.8._. .Y Y Y Y %.}.:.r e e e e n t t - . e P X ) . . ( . . 9 8.8.8.8.4.>.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.#.#.#.+.Z Z #.:.[.|.4.8.8.3.>.>.).).~.2.,.Y Y Y ;.4.8. ", "8._. .Y Y Y Y _.8.Q [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < m m m m m m 2 < [ [ [ [ [ [ [ [ [ [ [ [ [ < k m m m m m 8 ' & & & & & & & & * = = = = = = = & & & & & & & & ' [ ] = & & & & & & & & = = = = = = = & & & & & & & & ; < ] * & & & ; < [ [ [ [ [ [ [ [ [ [ [ [ [ < ' & & & & ! < ' & & & & ] < i m m m m 6 [ [ [ [ [ [ [ [ [ [ 2 F |.2.=.Y Y Y Y ` (.8.B e e e e r t w ~ . @ M X *.x . . :.Z x |.8.|.|./.*.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.#.#.#.*.|.|.|.K B P 8.8.3.>.).).).:.<.@.Y Y ` _.8. ", "|.{.` Y Y Y Y }.8.C [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < 6 m m m m m k < [ [ [ [ [ [ [ [ [ [ [ [ [ [ _ j m m m m m 2 ' & & & & & & & ' ] ] ] ] ] ] ] ] ' = & & & & & & > [ ! & & & & & & & ; ! ] ] ] ] ] ] ] ' * & & & & & & = ] ^ * & & & * < [ [ [ [ [ [ [ [ [ [ [ [ [ < ' & & & & ! < ' & & & & ] } i m m m m 6 [ [ [ [ [ [ [ [ [ [ g *.8.(. .Y Y Y Y ;.3.Z n n n e n t w ( . . . ) R /.].. . I 8.8.8.|.*.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.#.>.3.3.$.~ . . + 5 8.8.[.).).).).|.{.Y Y Y =.3.8. ", "8.!.Y Y Y Y Y 2.8.v [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < j m m m m m 8 < [ [ [ [ [ [ [ [ [ [ [ [ [ [ < k m m m m m < ' & & & & & = ] < [ [ [ [ [ [ [ [ < ] = & & & & & > [ ' & & & & & & ' < [ [ [ [ [ [ [ [ < ] ; & & & & & = ] ^ * & & & ; < [ [ [ [ [ [ [ [ [ [ [ [ [ < ' & & & & ! < ' & & & & ] } i m m m m 6 [ [ [ [ [ [ [ [ [ [ C |.2.=.Y Y Y Y .<.4.w n n n n t w x ) ) n . . % Z |.t 1 >.8.:.:.*.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.[.4.*.- . . 1 ~ % G 8.[.).).~.~./.1.@.Y Y ` _.8. ", "8.=.Y Y Y Y Y 4.8.g [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < m m m m m m d < [ [ [ [ [ [ [ [ [ [ [ [ [ [ < m m m m m k < ' & & & & & ! [ [ [ [ [ [ [ [ [ [ [ [ ! & & & & & > [ ' & & & & & ; _ [ [ [ [ [ [ [ [ [ [ [ ] * & & & & = ] ^ * & & & ; < [ [ [ [ [ [ [ [ [ [ [ [ [ < ' & & & & ! < ' & & & & ] < i m m m m 6 [ [ [ [ [ [ [ [ [ 7 ..8._. .Y Y Y Y ;.4.R r r n n t w w x B I V B . . % M [.[.8.3.).$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.8.4.n . . M 4.|.4 V 8.[.~.).~.~.~.|.^.` Y Y =.3.8. ", "8.%.Y Y Y Y Y 8.8.7 [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < m m m m m m a < [ [ [ [ [ [ [ [ [ [ [ [ [ < 6 m m m m m k < ' & & & & ; < [ [ [ [ [ [ [ [ [ [ [ [ _ ' & & & & > [ ' & & & & = ] [ [ [ [ [ [ [ [ [ [ [ [ [ ! & & & & = ] ^ * & & & ; < [ [ [ [ [ [ [ [ [ [ [ [ [ [ ' & & & & ! < ' & & & & ] < i m m m m 6 [ [ [ [ [ [ [ [ [ v :.4.,.Y Y Y Y ` <.4.t r r r r w x ) @ n P $.~.S % . ~ 8.3.3.>.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.8.8.. . I 4.4.8.8.8.4.4.8.].~.~.]./.1.@.Y Y .<.8. ", "8.@.Y Y Y Y Y 8.8.2 [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ ] m m m m m m a < [ [ [ [ [ [ [ [ [ [ [ [ [ < k m m m m m 6 < ' & & & & ! [ [ [ [ [ [ [ [ [ [ [ [ [ [ ! & & & & > [ ' & & & & ; < [ [ [ [ [ [ [ [ [ [ [ [ [ ] * & & & = ] ^ * & & & * < [ [ [ [ [ [ [ [ [ [ [ [ [ < ' & & & & ! < ' & & & & ] } i m m m m 6 [ [ [ [ [ [ [ [ 2 N 8.}.@.Y Y Y Y =.3.T t t r r t x A ( . . ) D :.|.$.~ >.8.4.*.$.$.$.$.$.$.$.$.$.*.*.*.*.>.*.>.*.>.*.*.*.*.*.$.$.$.$.$.$.$.$.$.$.$.$.8.8.1 . O 4.4.8.8.8.8.:.8.4.].~.].].|.{.Y Y Y !.8. ", "8.%.Y Y Y Y Y 8.8.7 [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ _ m m m m m m j < [ [ [ [ [ [ [ [ [ [ [ [ ^ f m m m m m m < < ' & & & & ] [ [ [ [ [ [ [ [ [ [ [ [ [ [ ] & & & & > [ ' & & & & > [ [ [ [ [ [ [ [ [ [ [ [ [ [ ^ ; & & & = ] ^ * & & & ; < [ [ [ [ [ [ [ [ [ [ [ [ [ / ; & & & & ! < ' & & & & ] } i m m m m 6 [ [ [ [ [ [ [ [ g *.8.{.` Y Y Y Y (.8.x t t t w A A n w x 1 . . ( X 4.8.8.4.>.$.$.$.$.$.$.$.*.*.*.>.>.>.).).).).).).).).>.>.*.*.*.*.$.$.$.$.$.$.$.$.$.3.8.+.. - >.4.+.I t ( 4 |.8.[.].].].:.}. .Y Y %.}.8. ", "8.=.Y Y Y Y Y 4.8.g [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < m m m m m m m 6 < [ [ [ [ [ [ [ [ [ [ < d m m m m m m m < < ' & & & & ] [ [ [ [ [ [ [ [ [ [ [ [ [ [ { = & & & > [ ' & & & & ' [ [ [ [ [ [ [ [ [ [ [ [ [ [ ^ ; & & & = ] ^ * & & & ; < [ [ [ [ [ [ [ [ [ [ [ [ [ ' & & & & & ! < ' & & & & ] < i m m m m 6 [ [ [ [ [ [ [ [ y :.2.=.Y Y Y Y @.1.>.w t t t A B n . . . % . . . . T 8.3.).$.$.$.$.$.$.*.*.*.>.>.).).~.~.].].].].].~.~.).).>.>.*.*.*.$.$.$.$.$.$.$.$.).8.8.T - 9 . . + % ) ( M 8.|.].]././.3.;.Y Y ` _.8. ", "8.!.Y Y Y Y Y 2.8.v [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < a m m m m m m m 6 2 [ [ [ [ [ [ [ 2 3 i m m m m m m m k < < ' & & & & ] [ [ [ [ [ [ [ [ [ [ [ [ [ [ ] = & & & > [ ' & & & & ' [ [ [ [ [ [ [ [ [ [ [ [ [ [ ^ ; & & & = ] ^ * & & & ; / [ [ [ [ [ [ [ [ [ [ [ < ] = & & & & & ! < ' & & & & ] < i m m m m 6 [ [ [ [ [ [ [ [ K 8.<.@.Y Y Y Y !.4.I w w w w A B ) . . . ) . . . 1 8.8.~.$.$.$.$.$.$.*.*.*.>.).).~.].]./././././././.].].~.).).>.*.*.*.$.$.$.$.$.$.$.$.~.8.8.w . . . ~ e ) ~ I 8.|.].]././.[.(.Y Y Y ,.8. ", "8.{.` Y Y Y Y }.8.C [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < < m m m m m m m m f 3 } 3 3 2 2 6 f m m m m m m m m m d _ < ' & & & & ] [ [ [ [ [ [ [ [ [ [ [ [ [ [ { = & & & > [ ' & & & & > [ [ [ [ [ [ [ [ [ [ [ [ [ [ ^ ; & & & = ] ^ * & & & ; < < < < < < < < < < < ] ' & & & & & & & ! < ' & & & & ] } i m m m m 6 [ [ [ [ [ [ [ 0 +.8.^.` Y Y Y Y _.4.x w w w w B D D n . . % A $.Z >.8.3.$.$.$.$.$.$.*.*.>.>.).~.]././.:.:.:.[.[.[.:.:././.].~.).).>.*.*.$.$.$.$.$.$.$.$.$.[.8./.w T - + @ - A 8.8.|./.]././.:.}. .Y Y @.8.8. ", "8._. .Y Y Y Y _.8.Q [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < i m m m m m m m m m k f k f k m m m m m m m m m m m 3 < < ' & & & & ] [ [ [ [ [ [ [ [ [ [ [ [ [ [ { = & & & > [ ' & & & & ; < [ [ [ [ [ [ [ [ [ [ [ [ [ ] = & & & = ] ^ * & & & = > ' ' ' ' ' ' ' ' ' ; * & & & & & & & & ] < ' & & & & ] } i m m m m 6 [ [ [ [ [ [ [ s ].3.;.Y Y Y Y @.1.*.x x x w x D G K P P n . . - Z 8.3.>.$.$.$.$.$.$.*.*.>.).~.]./.:.:.[.[.[.:.[.:.[.[.:.:./.].~.).>.>.*.*.$.$.$.$.$.$.$.$.>.[.8.8.>.~ + @ K 8.8.8.8.[.:././.:.|.;.Y Y ` _.8. ", "8.}.@.Y Y Y Y {.8.>.2 [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < } m m m m m m m m m m m m m m m m m m m m m m m m m [ [ < ' & & & & ] [ [ [ [ [ [ [ [ [ [ [ [ [ [ { = & & & > [ ' & & & & = ] [ [ [ [ [ [ [ [ [ [ [ [ [ ! & & & & = ] ^ * & & & & & & & & & & & & & & & & & & & & & & & ; < < ' & & & & ] < i m m m m 6 [ [ [ [ [ [ [ z |.}.%.Y Y Y Y ;.3.K A x x A G G D n r x #.V 9 . /.8.).$.$.$.$.$.$.*.*.>.).~.]./.:.[.[.[.:.[.[.:.[.[.[.[.:.:./.].~.).>.*.*.$.$.$.$.$.$.$.$.$.>.4.8.~ . . P 8.8.~.S [.8.|././.:.|.^.Y Y Y {.8. ", " 4.;.Y Y Y Y =.8.8.v [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < 3 m m m m m m m m m m m m m m m m m m m m m m m k < [ < ' & & & & ] [ [ [ [ [ [ [ [ [ [ [ [ [ [ { = & & & > [ ' & & & & & ; < [ [ [ [ [ [ [ [ [ [ [ ] * & & & & = ] ^ * & & & & & & & & & & & & & & & & & & & & & & & ] [ < ' & & & & ] < i m m m m 6 [ [ [ [ [ [ [ L 8.<.@.Y Y Y Y {.8.B A A x D I x . . . . . x [./.8.8.>.$.$.$.$.$.$.*.>.).~.]./.:.[.:.[.:.[.[.[.[.:.[.:.[.[.:./.].~.).>.*.*.$.$.$.#.$.$.$.$.$.$.4.8.B - T U w 5 1 9 R 8.|./.:.:.[.<.Y Y Y ;.4. ", " 8.^.Y Y Y Y Y }.8.N [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < 6 m m m m m m m m m m m m m m m d d m m m m m d < [ < ' & & & & ] [ [ [ [ [ [ [ [ [ [ [ [ [ [ { = & & & > [ ! & & & & & & ' < [ [ [ [ [ [ [ [ [ ] ; & & & & & = ] ^ * & & & & & & & & & & & & & & & & & & & & & ; ] [ [ < ' & & & & ] } i m m m m 6 [ [ [ [ [ [ [ U 8.^.` Y Y Y Y _.3.A A A A I K 1 . ~ ~ . . . x 8.8.>.$.$.$.$.$.$.*.*.>.).]./.:.[.[.[.:.[.[.:.[.:.[.[.[.:.[.:.:./.~.).>.*.*.$.$.#.#.#.$.$.$.$.$.:.4.|.~ . + % ) ( 9 M 8.|./.:.:.:.1.@.Y Y @.3.:. ", " 8.}. .Y Y Y Y {.8.].l [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < 6 k m m m m m m m m m m k j [ ] d m m m m m 6 _ [ < ' & & & & ] [ [ [ [ [ [ [ [ [ [ [ [ [ [ { = & & & > [ ! & & & & & & & ; ! ] ] ^ ^ ^ ] ] ' = & & & & & & = ] ^ * & & & = ' ' ' ' ' ' ' ' ' ' * & & & & ' ] < [ [ [ < ' & & & & ] } i m m m m 6 [ [ [ [ [ [ [ &.8.!.Y Y Y Y @.}.>.B B B A K M - . I *.#.B . 1 8.3.$.$.$.$.$.$.$.*.>.).~./.:.[.:.[.[.[.:.[.[.:.[.[.:.[.[.:.[.:./.].~.).>.*.$.$.#.#.#.$.$.$.$.$.*.4.8.1 . + ( B Z 8.8.8.|./.:.:.[.|.%.Y Y Y }.[. ", " 8.4.;.Y Y Y Y %.1.8.I [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < 6 a k m m m m k d 8 3 _ [ ^ k m m m m m 3 [ [ < ' & & & & ] [ [ [ [ [ [ [ [ [ [ [ [ [ [ { = & & & > [ ] = & & & & & & & & & = = = = * & & & & & & & & & ; _ ] * & & & ; < [ [ [ [ [ [ [ [ < > & & & & { [ [ [ [ [ < ' & & & & ] < i m m m m 6 [ [ [ [ [ [ [ ).8.;.Y Y Y Y %.1.T D B B B M O 1 . . ( A B . 9 8.3.$.$.$.$.$.$.$.*.>.).]./.:.[.[.:.[.:.[.~.I n ~ + ~ n I ~.[.:./.].~.>.*.*.$.#.+.+.#.#.$.$.$.$.$.3.8.A . I 8.8.8.8.8.|.[.:.:.:.[.|.,.Y Y Y _.|. ", " 8.(.Y Y Y Y Y ^.8./.s [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < 3 } _ < 2 2 < [ [ [ < } m m m m m k < [ [ < ' & & & & ] [ [ [ [ [ [ [ [ [ [ [ [ [ [ { = & & & > < < ' & & & & & & & & & & & & & & & & & & & & & & & ] [ ] * & & & ; < [ [ [ [ [ [ [ [ _ > & & & & ] [ [ [ [ [ < ' & & & & ] < i m m m m 6 [ [ [ [ [ [ [ :.8.%.Y Y Y Y =.2.M D D D B K P G ) . . . . . B 8.|.$.$.$.$.$.$.*.*.>.~.].:.[.:.[.[.:.[.S e $ , : | | | , n R /.].~.).>.*.$.$.+.Z Z #.#.$.$.$.$.$.:.8.+.. w 8.8.8.8.8.8.3.[.:.[.:.|.{.Y Y Y ^.8. ", " 8.8.%.Y Y Y Y %.}.8.R 2 [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < ] 2 < [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < k m m m m m d ^ [ [ < ' & & & & ] [ [ [ [ [ [ [ [ [ [ [ [ [ [ { = & & & > < [ < ' & & & & & & & & & & & & & & & & & & & & & ' < [ ] * & & & * < [ [ [ [ [ [ [ [ _ > & & & & ] [ [ [ [ [ < ' & & & & ] } i m m m m 6 [ [ [ [ [ [ [ 2.8.%.Y Y Y Y ;.4.I G D D G P P T S x 4 9 9 B 8.8.:.$.$.$.$.$.$.*.>.).~./.:.:.[.[.:.[.S 4 , : : | b b p u b 9 P ~.).>.>.*.$.#.Z X Z +.#.$.$.$.$.$.).8.8.~ D 8.).*.>.R $.8.4.:.:.[.|.^.Y Y Y !.8. ", " 8.^.Y Y Y Y Y !.8.8.F [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < 8 k k 8 3 [ < [ [ [ [ [ [ [ [ [ < 2 k m m m m m m 3 [ [ [ < ' = = = = ] [ [ [ [ [ [ [ [ [ [ [ [ [ [ ] = = = = ; < [ [ _ ' * = = = = = = = = = = = = = = = = = ; ] < [ [ ] ; = = = ; < [ [ [ [ [ [ [ [ < ; = = = = ] [ [ [ [ [ < ' = = = = ] } d k i i i 6 [ [ [ [ [ [ [ 8.8. .Y Y Y Y ,.8.I I G G R T D I Z *./.|.[.>.8.|.$.$.$.$.$.$.$.*.>.).~./.:.[.:.[.[.).e , | | | | b p u u o b e #.).:.).*.).Z [.[.X Z #.$.$.$.$.$.$.4.8.r . @ - ( 9 r I 8.8.:.[.[.[._.Y Y Y ;.8. ", " 8.8.%.Y Y Y Y Y _.8.:.z [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ ] m m m m m m m 8 6 3 3 6 6 3 3 6 k m m m m m m m f ] [ [ [ < ] ] ] ] ] < [ [ [ [ [ [ [ [ [ [ [ [ [ [ < ] ] ] ] ] [ [ [ [ [ < ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] < [ [ [ [ < ] ] ] ] ] < [ [ [ [ [ [ [ [ < ] ] ] ] ] < [ [ [ [ [ < ] ] ] ] ] < [ [ [ [ [ [ [ [ [ [ [ [ [ [ 8.8.` Y Y Y Y !.8.I I I G V U ~ % +.>./.3.- 9 4.4.$.$.$.$.$.$.$.*.>.).]./.:.[.[.:.[.I , | | | b b p u u o J J : B *.4.:.>.4.Z [.3.V Z #.$.$.$.$.$.$.|.8.9 . + - ( 9 r A 8.8.[.[.[.[._.Y Y Y %.8. ", " 8.(.` Y Y Y Y %.<.8.).y [ [ [ [ [ [ [ [ [ [ [ [ [ [ < d m m m m m m m m m m m m m m m m m m m m m m m m < [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ 8.8.Y Y Y Y Y !.8.K K K I X X . % X ).:.[.- ~ 8.4.$.$.$.$.$.$.$.*.>.).]./.:.[.[.[.:.n : b b | # p u u , u J J p e $.4.[.].8./.|.8.U Z #.$.$.$.$.$.$.|.8.w . I x ( |.D x 8.8.[.:.[.[.<.Y Y Y %.8. ", " 8.8.;.Y Y Y Y Y %.<.8.).z [ [ [ [ [ [ [ [ [ [ [ [ < < m m m m m m m m m m m m m m m m m m m m m m m m 3 < [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ 8.8.Y Y Y Y Y !.8.M M K K Z Z ~ . . 4 5 ~ . 9 8.4.$.$.$.$.$.$.$.*.>.).~./.:.:.[.:.[.~ b p p p b $ p , | J J J W ) T |.8.8.8.8.8.8.T Z #.$.$.$.$.$.$.[.8.B . +.G ( ).K A 8.8.:.[.[.[.<.Y Y Y .8.8.", " 8.}.@.Y Y Y Y Y =.<.8.:.F 2 [ [ [ [ [ [ [ [ [ [ ^ d m m m m m m m m m m m m m m m m m m m m m m m 3 _ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ 8.8.Y Y Y Y Y !.8.P O O M Z #.O % . . . . . T 8.|.$.$.$.$.$.$.$.*.>.).~.]./.:.:.[.[.+ u u u u o b . : J J '.'.'.. M *.:./.>.).$.#.S X #.$.$.$.$.$.$.:.8.B ~ >./.|.8.~.].8.8.[.:.[.[.<.Y Y Y @.8.8.", " 8.8.(.` Y Y Y Y Y %.<.8.8.R s [ [ [ [ [ [ [ [ [ 2 d m m m m m m m m m m m m m m m m m m m m m h 3 < [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ 8.8.Y Y Y Y Y !.8.P P P O P $.$.U A e 5 B /.8.8.~.$.$.$.$.$.$.$.*.>.).~.]././.:.:.:.~ u u o J u , : - u J '.'.W - G I K I I I K O S X #.$.$.$.$.$.$.:.8.+.D +.#.8.8.8.8.8.4.[.[.:.[.<.Y Y Y @.8.8.", " 8.8.{.Y Y Y Y Y Y %._.8.8./.I l [ [ [ [ [ [ [ < 3 3 3 8 h k m m m m m m m m m m m m m m i 2 2 [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ 8.8.Y Y Y Y Y !.8.R R R P P R *.>.)./.[.4.8.8.~.$.$.$.$.$.$.$.$.*.*.>.).~.]./././.:.n p J J u , | J p ' W '.'.E ( A D B B D G K O S X #.$.$.$.$.$.$.:.8.D . @ ) 1 n G O 4.8.[.[.[.[._.Y Y Y %.8.8.", " 8.3.!.Y Y Y Y Y Y Y !.}.8.8.].N v 2 [ [ [ [ [ [ [ [ } < [ 3 a d d d d d d d d d d d 3 < [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ 8.8.` Y Y Y Y ,.8.R T S R P P R X $.)./.[.:.>.$.$.$.$.$.$.$.$.$.*.*.>.).~.~.].].]./.D : J J J B J '.'.H ].'.'.n 9 X [.B A B D I M S X #.$.$.$.$.$.$.:.8.>.D A r e r x D 8.8.[.:.[.[._.Y Y Y =.8.8.", " 8.2.!.Y Y Y Y Y Y Y %.(.1.8.8.8.>.Q C v g 7 [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ 8.8.` Y Y Y Y ;.4.T V U T S R R P R T Z #.$.$.$.$.$.$.$.$.$.$.$.$.*.>.>.).).~.~.~.~.#.9 b '.J '.'.'.'.'.'.'.G ) B 3.$.B O S G I M S X #.$.$.$.$.$.$.4.8.+.D e ) 5 r A O 8.8.[.[.:.[.(.Y Y Y !.8.8.", " 8.3.{.` Y Y Y Y Y Y Y %.{.}.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.` Y Y Y Y =.3.V Z X V U S S S S U Z #.$.$.$.$.$.$.$.$.$.$.$.$.*.*.>.>.>.~./.:.].>.M 9 b '.'.'.'.'.'.'.G ) 1 R 8.X ).8.8.~.K O S Z #.$.$.$.$.$.$.8.8.~ + % ~ A #.3.8.8.4.[.:.[.|.{.Y Y Y {.8.8.", " 8.8.(.%.Y Y Y Y Y Y Y Y Y =.{._.}.2.4.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.` Y Y Y Y Y %.1.+.+.Z Z X V T T T U Z #.$.$.$.$.$.$.$.$.$.$.$.$.*.*.*.*.].3.8.8.4.].$.G 4 n E W '.W M n $ ( 5 I 8.8.8.[.:.8.R P U Z #.$.$.$.$.$.*.8.8.+ @ - ( e w B *.8.3.[.[.:.|.!.Y Y Y (.8.8.", " 8.8.}.;.` Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y @.}.~.#.#.+.Z X V V U V Z #.$.$.$.$.$.$.$.$.$.$.$.$.$.*.*.~.4.8.4.[.8.|.+.R G n ( & + % - ~ 1 4 5 n O *.T D ].4.R P V Z #.$.$.$.$.$.:.8.|.U V G G B G D *.8.|.[.:.[.|.=.Y Y Y <.8.8.", " 8.8.3.(.%.Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y ` <.|.$.$.$.#.+.Z X V X Z #.#.$.$.$.$.$.$.$.$.$.$.$.$.$.$.[.8.|.).$.).>.T X V I x t n e x $.].P e 9 e t t S 4.*.O R X +.#.$.$.$.$.$.4.8.A @ w X 8.8.8.8.8.8.3.[.[.:.1.@.Y Y .2.8.8.", " 8.8.1.^.%.Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y %.^.}.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.}.^.%.Y Y Y Y Y Y Y Y %.^.}.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.}.^.%.Y Y Y Y Y Y Y Y Y Y ^.4.+.$.$.$.#.#.Z Z Z Z #.#.$.$.$.$.$.$.$.$.$.$.$.$.$.$.|.8.>.+.Z V S P /.4.X x t r w :.8.8.8.S e n t w M $.M P T X #.#.$.$.$.$.).8.8.- @ - ~ t R |.8.8.3.[.:.[.[.<.` Y Y =.4.8.8.", " |.8.2.(.;. .Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y @._.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8._.%.Y Y Y Y Y Y @._.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8._.%.Y Y Y Y Y Y Y Y Y ,.4.~.*.*.$.$.$.#.+.Z Z #.#.$.$.$.$.$.$.$.$.$.$.$.$.$.$.:.8./.X U S P O |.8.M w t r I 4.#.B 8.|.A r w x B I M R V Z #.$.$.$.$.$.:.8.+.@ 5 4 ( n x G +.8.3.[.[.:.|.^.Y Y Y !.8.8.8.", " [.8.4.}.^.;.@. .` Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y ^.8.8.8.8.8.'.J o J '.8.8.8.[.. . . G 8.e . 8.~ . . . /.~ . . . ).. . . w [.. . . r e M 8.w w 8.8.8.8.8.8.8.^.Y Y Y Y Y Y ^.8.8.8.8.8.8.8.8.8.8.8.8.*.1 e e 8.[.- [.w . - M [.. *./.- 8.e . 8.8.[.- 8.8.8.8.8.'.J o J '.8.8.8.8.8.^.Y Y Y Y Y Y Y Y Y %.1.:.*.*.*.*.$.$.#.#.+.#.#.$.$.$.$.$.$.$.$.$.$.$.$.$.#.$.[.|.X S P O U 4.3.B w t r I 4.:.t >.8.O w x B G K P T X +.#.$.$.$.$.$.:.8.D @ t |.>.K D K ).8.3.[.:.[.|.,.Y Y Y _.8.8.8.", " 8.8.8.8.1.<.(.{.=.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.1.8.8.8.8.8.J o o o J 8.8.8.+.1 Z G w Z ~ e Z 8.G G 8.8.8.G G 8.Z 1 Z +.[.+.e 8.*.. S ~ A e 8.8.8.8.8.8.8.8.1.%.%.%.%.%.%.1.8.8.8.8.8.8.8.8.8.8.8.8.I r [.M /.+.e w x [.*.r +.. w S e Z ~ e Z 8.+.e 8.8.8.8.8.J o o o J 8.8.8.8.8.1.%.%.%.%.%.@.Y Y Y ` <.|.*.*.*.*.*.$.$.$.#.#.$.$.$.$.$.$.$.$.$.$.$.$.$.$.#.#.#.+.V S P M $.8.].A x w t A |.4.G K 8.X A B G K P S V Z #.#.$.$.$.$.:.8.8.>.% ) 4 K $.I M 4.8.|.[.[.:.1.@.Y Y @.1.8.8.8.", " 8.8.|.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.o o o o o 8.8.8.G ~ e - Z e M w M 8.r S 8.8.8.r S 8.G ~ e e [.G . . ~ G 8.~ 1 [.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.[.r - G 8.G G . [.x e A G A ~ A G e M w M 8.G G 8.8.8.8.8.o o o o o 8.8.8.8.8.8.8.8.8.8.8.1.%.Y Y Y {.4.~.>.>.*.*.*.*.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.#.#.+.Z V S P O /.8.#.B A x w w #.8.:.].8.R D G K P S V Z +.#.$.$.$.$.).8.8.A P x ~ 4 r A K +.8.8.[.:.[.[._.Y Y Y ;.3.8.8.8.", " 8.8.1.1.1.1.1.1.1.1.1.1.1.1.8.8.8.8.8.8.J o o o J 8.8.8.r S 8.w w . . . G 8.- /.8.8.8.- /.8.r S 8.8.8.r S /.~ /.8.e S 8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.G 8./.. 8.r S - *.Z r G r S w . B . . . G 8.r S 8.8.8.8.8.J o o o J 8.8.8.8.8.8.1.1.1.1.2.8.}.` Y Y %.2.:.>.>.>.>.*.*.*.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.#.#.+.Z X U R T |.8.|.).I A A A B >.8.8.*.I I M P S V Z +.#.#.$.$.$.$.~.8.+.@ % R *.G A I +.4.8.3.[.[.:.|.,.Y Y Y ^.8.8.8.8.", " 8.8.}.5.5.5.5.5.5.5.5.5.5.5.1.8.8.8.8.8.'.J o J '.8.8.8.~ . . e ) Z 8.S r /.~ 8.8.8./.~ 8.8.~ . . ~ 8.~ /.8.G A 8.- /.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.A 1 e G 8.~ /.M - . r *.~ :.*.. ) Z 8.S r 8.~ . . w 8.8.8.'.J o J '.8.8.8.8.8.1.5.5.5.5.5.4.3.=.Y Y ` _.3.).>.>.>.>.*.*.*.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.#.#.+.Z V U S X >.[.3.R D D D D G K M K M P R U X Z +.#.#.$.$.$.$.~.8.8.|.5 - 1 ].8.8.8.8.8.3.[.:.[.[.1.@.Y Y @.}.8.8.8.8.", " 8.1.5.5.5.5.5.5.5.5.5.5.5.5.2.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.2.5.5.5.5.5.5.2.8.^.Y Y Y ,.4./.).).).>.>.>.*.*.*.$.$.$.$.$.$.$.$.$.$.$.$.$.$.#.#.#.+.Z X V T R P O O M K K K M M P P S U V Z Z #.#.#.$.$.$.$.).8.8.U /.P ) ( r :.8.8.8.3.[.[.[.:.|.^.Y Y Y ;.4.8.8.8.8.", " 8.4.5.5.5.5.5.5.5.5.5.5.5.5.5.1.3.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.3.1.5.5.5.5.5.5.5.}.8.}.@.Y Y .}.|.).).).).).>.>.*.*.*.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.#.#.#.+.Z Z X V U T T S S T T U V X Z Z +.#.#.#.$.$.$.$.$.).4.8.+.@ % ( 4 w t D |.8.4.[.[.[.:.[.|.%.Y Y ` _.8.8.8.8.8.", " 8.1.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.3.8.!.Y Y Y !.8./.).).).).).>.>.*.*.*.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.#.#.#.#.#.#.#.+.+.+.+.+.+.#.#.#.#.#.#.#.$.$.$.$.$.$.).4.8.>.4 ) - ~ 4 w A I S 8.4.[.:.[.[.|.(.` Y Y %.2.8.8.8.8.8.", " 8.4.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.}.8.<. .Y Y @.}.|.~.~.~.~.).).).>.>.*.*.*.$.*.|.8.8.8.8.:.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.).4.4.>.) % R S A e w G M X 8.4.[.[.:.[.|.%.Y Y Y ^.8.8.8.8.8.8.", " 8.2.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.4.3.,.Y Y Y !.4.:.~.~.~.~.~.).).>.>.*.*.*.|.8.8.8.8.8.8.[.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.).4.8.8.>.) - ~ U 8.3.>.X O 4.8.4.[.[.[.|.(.` Y Y %.1.8.8.8.8.8.8.", " 8.8.1.5.5.5.5.5.5.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.5.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.5.5.5.5.1.8.<. .Y Y .<.3.].].].~.~.~.~.).>.>.*./.8.|.e + + A 8.8.[.*.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.*.4.8.>.) t B ~ ( e #.8.8.8.8.8.8.[.:.[.[.}.%.Y Y Y (.8.8.8.8.8.8.8.", " 8.4.}.5.5.5.5.5.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.5.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.5.5.5.5.5.4.4.!.Y Y Y =.2.[.].].].].].~.~.).).>.:.8.K % @ @ + w 8.8.8.~.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.*.4.|.( % - ~ ( e t D [.8.8.8.8.[.[.[.:.|.{.Y Y Y =.2.8.8.8.8.8.8.8.", " 8.4.}.5.5.5.5.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.5.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.5.5.5.5.5.}.8.}.@.Y Y ` {.4.:.].].].].].].~.~.[.4.8.G - ( |.~ - I |.8.8.4.:.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.*.4.8.8.$.I n e I D K O |.8.[.:.[.[.:.|.<. .Y Y ` (.8.8.8.8.8.8.8.8.", " 8.4.}.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.5.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.3.8.^.` Y Y .<.3./././././.].].|.4.8.|.$.) - #.).>.- + U 8.8.4.|.|.).$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.*.4.8.8.8.P t K U M S 4.8.[.[.:.[.[.[.%.Y Y Y ,.8.8.8.8.8.8.8.8.8.", " 8.4.}.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.5.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.}.8.2.;.Y Y Y %.1.|././././././.|.8.M n |.r ~ A 8.V % @ +.- A 8.8.8.|.|.|.|.[.].$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.*.*.>.].[.8.Z B M M +.4.8.4.[.:.[.[.|.!.Y Y Y %.}.8.8.8.8.8.8.8.8.8.", " 8.8.2.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.5.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.1.8.}. .Y Y Y ,.2.[.:././././.|.8.U r r n 4 B 8.w - n e @ r I 9 +.8.8.8.8.8.4.].$.$.$.$.$.$.$.$.$.$.$.$.*.*.*.>.).~.[.8.8.$.V *.8.8.4.[.[.[.:.|.{.` Y Y ` (.8.8.8.8.8.8.8.8.8.8.", " 8.8.8.1.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.3.8.(.` Y Y Y !.3.[.:.:.:.:.|.8.8.V w r r :.|.( ~ 4 - % D ) @ r U 9 9 r O 8.4.*.$.$.$.$.$.$.$.$.$.*.*.*.>.).).~.]./.3.8.8.8.8.8.3.[.[.:.[.|.(. .Y Y Y !.8.8.8.8.8.8.8.8.8.8.8.", " 8.8.8.4.1.}.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.}.4.3.!.Y Y Y Y {.3.[.:.:.:.:.|.8.8.3.].3.8.Z 9 4 ( ~ ~ n - ) #.@ @ + + - |.4.*.$.$.$.$.$.$.$.*.*.*.>.).).~.]./.:.[.[.3.4.4.4.3.[.[.:.[.|._. .Y Y Y =.1.8.8.8.8.8.8.8.8.8.8.8.", " 8.8.8.8.3.2.}.}.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.}.8.1.=.Y Y Y ` {.3.[.:.:.:.:.|.8.8.8.8.8.K t r r w 4 ( ~ I M - - /.#.P 8.4.*.$.$.$.*.*.*.*.>.>.).~.]././.:.[.[.[.:.[.[.[.[.[.[.:.[.|._. .Y Y Y @.}.8.8.8.8.8.8.8.8.8.8.8.8.", " 8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.}.%.Y Y Y ` {.3.|.[.[.[.[.[.[.[.8.8.D B A ].A r n t 8.].1 ( 4 $.8.4./.>.>.>.>.>.).).).~.].]./.:.:.[.[.:.[.:.[.[.:.[.:.[.:.[.|._. .Y Y Y ._.8.8.8.8.8.8.8.8.8.8.8.8.8.", " 8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.<.@.Y Y Y ` !.2.|.:.[.:.[.[.[.8.8.4.).*.|.B A x ].8.8.+.n n r [.8./.~.~.~.~.].].]././.:.:.[.:.[.[.[.[.:.[.[.:.[.[.[.:.[.|.(. .Y Y Y ` (.8.8.8.8.8.8.8.8.8.8.8.8.8.8.", " 8.<.@.Y Y Y Y ,.1.|.:.[.:.[.:.[.8.8.8.8.|.P I T 8.8.:./.:.A x ].8.:./././.:.:.:.:.:.[.[.[.:.[.[.:.[.[.[.:.[.[.:.[.[.[.|.^. .Y Y Y ` (.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.", " 8.<.@.Y Y Y Y =.<.3.:.[.:.[.[.[.|.|.4.8.8./.|.8.8.U K I I I [.8.[.:.:.[.[.:.[.[.[.[.[.:.[.[.:.[.[.:.[.[.:.[.[.:.|.[.!.` Y Y Y .(.8.8.8.8.Z G /.8.8.8.8.8.8.8.8.8.", " 8.}.=.Y Y Y Y @.^.3.|.:.[.:.[.[.[.[.4.8.8.8.4.8.:.X R S ].8.8.[.[.[.:.[.[.:.[.:.[.:.[.[.:.[.[.:.[.[.[.[.:.[.|._.%.Y Y Y Y @._.8.8.8.*.G . - r /.8.M A 8.8.8.8.8.", " 8.1.!.` Y Y Y Y ,.<.4.[.[.:.[.:.[.[.|.|.|.|.4.8.8.8.8.8.8.|.[.[.:.[.[.:.[.[.[.:.[.[.:.[.[.:.[.[.[.:.[.|.[.{. .Y Y Y Y =.}.8.8.8.:.r . - *.8.8./.~ [.8.[.8.8.8.", " |.3.^. .Y Y Y Y @.{.1.3.[.[.[.:.[.:.[.:.[.[.4.4.4.4.4.|.[.:.[.[.:.[.[.:.[.[.[.:.[.[.:.[.[.:.[.:.|.|.(.%.Y Y Y Y Y !.1.8.8.8.[.G . ~ 1 *.8.8.S . M M G 8.8.8.", " /.8.<.=.Y Y Y Y Y %.^.1.3.[.:.[.[.:.[.[.[.[.[.[.[.[.[.:.[.[.:.[.[.:.[.[.:.[.[.:.[.[.:.[.[.|.|.(.%.` Y Y Y Y %.(.4.8.8.8.8.w . 1 G . - *.*.- . . 1 [.8.8.8.", " 8.8.1.{. .Y Y Y Y ` %.{.}.3.|.[.[.:.[.:.[.:.[.:.[.:.[.[.:.[.[.:.[.[.:.[.[.[.[.:.[.[.|.1.^.%. .Y Y Y Y ` ,.}.8.8.8.8.8.8.[.1 A 8.G . - 1 . w 8.8.8.8.8.8.", " [.8.<.;.` Y Y Y Y Y .;.(.}.3.|.[.[.:.[.[.[.:.[.[.:.[.[.:.[.[.:.[.[.[.[.|.|.1._.,.@.Y Y Y Y Y ` =.(.8.8.8.8.8.8.8.8.8.|.8.8.8.w . . e 8.8.8.8.8.8.8.", " 8.4._.=. .Y Y Y Y Y Y .;.^.<.1.2.|.|.|.[.[.[.[.[.[.[.[.[.|.|.|.1.<.^.,.@.Y Y Y Y Y Y @.=.^.2.8.8.8.8.8.8.8.8.8.8.8.8.8.[.1 . . . M 8.8.8.8.8.8.", " 8.8.2._.=. .Y Y Y Y Y Y Y Y @.%.,.{.^._._.<.<.<.<._._.(.{.!.=.@.Y Y Y Y Y Y Y Y @.,.<.4.8.8.8.8.8.8.8.8.8.8.8.8.8.>.G 1 . 1 w . . M 8.8.8.8.8.", " 8.8.3.<.!.%.Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y =.{.}.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8./.~ r . 1 [.8.w . . M 8.8.8.8.", " 8.8.8.}._.,.@.Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y %.{._.2.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.>.*.8.1 G 8.8.8.r . . Z 8.8. ", " 8.8.4.1._.{.;.@.Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y %.{.(.}.2.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.*.~ *.8.8.8.[.1 w 8.8.8. ", " 8.8.8.4.2.}._.^.!.;.%.%. .@.@.=.{.(._.}.1.3.4.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.*.:.8.8.8.8.8.[.8.8.8. ", " 8.8.|.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8. ", " 8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8. "}; gnokii-0.6.31/xgnokii/xpm/stop.xpm0000644000175000017500000001134111666163120015172 0ustar leoleo/* XPM */ /* G N O K I I A Linux/Unix toolset and driver for Nokia mobile phones. Copyright (C) 1999 Jan Derfinak Released under the terms of the GNU GPL, see file COPYING for more details. */ static char *stop_xpm[] = { /* columns rows colors chars-per-pixel */ "65 65 2 1", " c Gray0", ". c None", /* pixels */ "................... ...................", ".................. ..................", "................. .................", "................ ................", "............... ......................... ...............", ".............. ........................... ..............", "............. ............................. .............", "............ ............................... ............", "........... ................................. ...........", ".......... ................................... ..........", "......... ..................................... .........", "........ ....................................... ........", "....... ......................................... .......", "...... ........................................... ......", "..... ............................................. .....", ".... ............................................... ....", "... ................................................. ...", ".. ................................................... ..", ". ..................................................... .", " ....................................................... ", " ......................................................... ", " ......................................................... ", " ...... .. .. ... ....... ", " ...... . . .. ...... ", " ..... . . .. ...... ", " ..... . . .. ...... ", " ..... ..... ..... ..... ..... .. ... ...... ", " ..... ..... ..... ..... ..... .. .... ...... ", " ..... ............ ..... ..... .. .... ...... ", " ..... ............ ..... ..... .. .... ...... ", " ..... ...... ..... ..... .. .... ...... ", " ..... ..... ..... ..... .. ...... ", " ..... ..... ..... ..... .. ...... ", " ...... ..... ..... ..... .. ...... ", " ............ ..... ..... ..... .. ....... ", " ............ ..... ..... ..... .. ............. ", " ..... ..... ..... ..... ..... .. ............. ", " ..... ..... ..... ..... ..... .. ............. ", " ..... ..... ..... .. ............. ", " ..... ..... ..... .. ............. ", " ..... ..... ..... .. ............. ", " ..... ...... ..... .. ............. ", " ...... ........ ...... ... ............. ", " ......................................................... ", " ......................................................... ", " ....................................................... ", ". ..................................................... .", ".. ................................................... ..", "... ................................................. ...", ".... ............................................... ....", "..... ............................................. .....", "...... ........................................... ......", "....... ......................................... .......", "........ ....................................... ........", "......... ..................................... .........", ".......... ................................... ..........", "........... ................................. ...........", "............ ............................... ............", "............. ............................. .............", ".............. ........................... ..............", "............... ...............", "................ ................", "................. .................", ".................. ..................", "................................................................." }; gnokii-0.6.31/xgnokii/xpm/alarm.xpm0000644000175000017500000000110511666163120015276 0ustar leoleo/* XPM */ /* G N O K I I A Linux/Unix toolset and driver for Nokia mobile phones. Copyright (C) 1999 Pavel Janík ml. & Hugh Blemings. Released under the terms of the GNU GPL, see file COPYING for more details. This icon is used for alarm notification. Last modification: Sat Jul 10 21:30:28 CEST 1999 Modified by Pavel Janík ml. */ static char *XPM_alarm[] = { "9 9 3 1", " c None", "# c #000000", "+ c #d0dae8", "#########", "## # ##", "# # #", "# # #", "# ### #", "# #", "# #", "## ##", "#########" }; gnokii-0.6.31/xgnokii/xpm/Green_point.xpm0000644000175000017500000000026111666163120016455 0ustar leoleo/* XPM */ static char * Green_point_xpm[] = { "7 7 3 1", " c None", ". c #397939", "+ c #5ACA62", ".......", ".+++++.", ".+++++.", ".+++++.", ".+++++.", ".+++++.", "......."}; gnokii-0.6.31/xgnokii/xpm/Edit.xpm0000644000175000017500000000130011666163120015064 0ustar leoleo/* XPM */ /* G N O K I I A Linux/Unix toolset and driver for Nokia mobile phones. Copyright (C) 1999 Jan Derfinak Released under the terms of the GNU GPL, see file COPYING for more details. */ static char * Edit_xpm[] = { "16 17 5 1", " c #84207BDE7BDE", ". c None", "X c #FFFFFFFFFFFF", "o c #000000000000", "O c #52945294FFFF", " .......", " XXXXXXX o......", " X X Xo....O", " XXXXXXX ooo..OO", " X XXXXo.OOo", " XXXXXXXXXXoOOo.", " X XOOo..", " XXXXXXXXXOOo...", " X oOo....", " XXXXXXXoooo....", " X oooXo....", " XXXXXoXXXXo....", " XXXXXXXXXXo....", "oooooooooooo....", "................", "................", "................"}; gnokii-0.6.31/xgnokii/xpm/NewBD.xpm0000644000175000017500000000170011666163120015142 0ustar leoleo/* XPM */ /* G N O K I I A Linux/Unix toolset and driver for Nokia mobile phones. Copyright (C) 1999 Pavel Janík ml. & Hugh Blemings. Released under the terms of the GNU GPL, see file COPYING for more details. This is the icon for Open. Last modification: Wed Jun 14 18:04:00 CEST 2000 Modified by Marcel Köppen */ static char*NewBD_xpm[]={ "20 18 9 1", "d c #ffa858", "e c #c05800", "# c #000000", "g c #ff8000", "b c #ffff00", "f c #ffdca8", "c c #0000ff", ". c None", "a c #ffffff", "....................", "...##########.......", "...#aaaaaaaa##......", "...#aaaaaaaa#a#.....", "...#aaaaaaaa####....", "...#aaaaabaaaaa#....", "...#aaabacabaaa#....", "...#aaacacacaaa#....", "...#aaacccacaaa#....", "...#aadcdcdceaa#....", "...#adfcfcfcfea#....", "...#aeeeeeeeeea#....", "...#adggdddggea#....", "...#adggdddggea#....", "...#aaeeeeeeeaa#....", "...#aaaaaaaaaaa#....", "...#############....", "...................."}; gnokii-0.6.31/xgnokii/xpm/Black_point.xpm0000644000175000017500000000026111666163120016431 0ustar leoleo/* XPM */ static char * Black_point_xpm[] = { "7 7 3 1", " c None", ". c #397939", "+ c #000000", ".......", ".+++++.", ".+++++.", ".+++++.", ".+++++.", ".+++++.", "......."}; gnokii-0.6.31/xgnokii/xpm/SendSMS.xpm0000644000175000017500000000070011666163120015456 0ustar leoleo/* XPM */ static char * SendSMS_xpm[] = { "16 17 4 1", " c None", ". c black", "X c white", "o c gray50", " ", " ", " ............. ", " .XXXXXXXXXXX.o ", " ..XXXXXXXXX..o ", " .X.XXXXXXX.X.o ", " .XX.XXXXX.XX.o ", " .XX..XXX..XX.o ", " .X.XX...XX.X.o ", " ..XXXXXXXXX..o ", " .............o ", " ooooooooooooo ", " ", " ", " ", " ", " "}; gnokii-0.6.31/xgnokii/xpm/New.xpm0000644000175000017500000000156011666163120014740 0ustar leoleo/* XPM */ /* G N O K I I A Linux/Unix toolset and driver for Nokia mobile phones. Copyright (C) 1999 Pavel Janík ml. & Hugh Blemings. Released under the terms of the GNU GPL, see file COPYING for more details. This is the icon for New. Last modification: Sat Jul 24 14:30:37 CEST 1999 Modified by Pavel Janík ml. */ static char *New_xpm[] = { "20 18 3 1", "* c #000000", " c None", ". c #ffffff", " ", " ******** ", " *......** ", " *......*.* ", " *......**** ", " *.........* ", " *.........* ", " *.........* ", " *.........* ", " *.........* ", " *.........* ", " *.........* ", " *.........* ", " *********** ", " ", " ", " ", " " }; gnokii-0.6.31/xgnokii/xpm/Check.xpm0000644000175000017500000000071411666163120015224 0ustar leoleo/* XPM */ static char * Check_xpm[] = { "16 17 5 1", " c None", ". c black", "X c gray50", "o c gray85", "# c white", " . . ", " ... ", " X.....X ", " XX.....XX ", " ..#...X.. ", " X.#.XXX...X ", " ...#..o...... ", " .....o..... ", " .....o..... ", " .X....o....X. ", " ....o.... ", " .X...o...X. ", " X..o..X ", " XoX ", " ", " ", " "}; gnokii-0.6.31/xgnokii/xpm/Flip.xpm0000644000175000017500000000101711666163120015076 0ustar leoleo/* XPM */ static char * Flip_xpm[] = { "20 18 3 1", " c None", ". c #000000", "+ c #FFFFFF", " ", " ", " ", " ", " ", " ", " . . ", " .. .. ", " .............. ", " ...++++++++++... ", " .............. ", " .. .. ", " . . ", " ", " ", " ", " ", " "}; gnokii-0.6.31/xgnokii/xpm/Dial.xpm0000644000175000017500000000112711666163120015057 0ustar leoleo/* XPM */ /* G N O K I I A Linux/Unix toolset and driver for Nokia mobile phones. Copyright (C) 1999 Jan Derfinak Released under the terms of the GNU GPL, see file COPYING for more details. */ /* XPM */ static char * Dial_xpm[] = { "14 16 2 1", " c None", ". c #0000FFFF0000", " .... ", " ....... ", " ......... ", "........... ", "..... ...... ", " ... ..... ", " . .....", " ....", " .....", " ......", " .... ", " .. ", " ", " ", " ", " "}; gnokii-0.6.31/xgnokii/xpm/Duplicate.xpm0000644000175000017500000000125411666163120016121 0ustar leoleo/* XPM */ /* G N O K I I A Linux/Unix toolset and driver for Nokia mobile phones. Copyright (C) 1999 Jan Derfinak Released under the terms of the GNU GPL, see file COPYING for more details. */ static char * Duplicate_xpm[] = { "16 18 4 1", " c None", ". c black", "X c gray50", "o c white", " ....... ", " .XXXXXX. ", " .......XXX. ", " .ooooo..XXX. ", " .ooooo.o.XX. ", " .ooooo....X. ", " .oooooooo.X. ", " .oooooooo.X. ", " .oooooooo.X. ", " .oooooooo.X. ", " .oooooooo.X. ", " .oooooooo.X. ", " .oooooooo.X. ", " .oooooooo... ", " .oooooooo. ", " .......... ", " ", " "}; gnokii-0.6.31/xgnokii/xpm/Delete.xpm0000644000175000017500000000122411666163120015406 0ustar leoleo/* XPM */ /* G N O K I I A Linux/Unix toolset and driver for Nokia mobile phones. Copyright (C) 1999 Jan Derfinak Released under the terms of the GNU GPL, see file COPYING for more details. */ static char * Delete_xpm[] = { "16 17 4 1", " c None", ". c red", "X c gray50", "o c black", " ", " . ", " ..X ... ", " ..X ..... ", " .......oo ", " .....o ", " ....o ", " ...... ", " ..o ... ", " ..o ... ", " .o ..X ", " .o .o ", " o o ", " ", " ", " ", " "}; gnokii-0.6.31/xgnokii/xpm/sim.xpm0000644000175000017500000000102111666163120014767 0ustar leoleo/* XPM */ /* G N O K I I A Linux/Unix toolset and driver for Nokia mobile phones. Copyright (C) 1999 Jan Derfinak Released under the terms of the GNU GPL, see file COPYING for more details. */ static char * sim_xpm[] = { "18 10 2 1", " c #000000000000", ". c #FFFFFFFFFFFF", " ", " ................ ", " ................ ", " .. ....... ", " .. ....... ", " .. ....... ", " .. ...... .", " .............. ..", " ............. ...", " ...."}; gnokii-0.6.31/xgnokii/xpm/Open.xpm0000644000175000017500000000162011666163120015105 0ustar leoleo/* XPM */ /* G N O K I I A Linux/Unix toolset and driver for Nokia mobile phones. Copyright (C) 1999 Pavel Janík ml. & Hugh Blemings. Released under the terms of the GNU GPL, see file COPYING for more details. This is the icon for Open. Last modification: Sat Jul 24 14:30:37 CEST 1999 Modified by Pavel Janík ml. */ static char *Open_xpm[] = { "20 18 5 1", "* c #000000", ". c #808000", "a c #ffff00", " c None", "e c #ffffff", " ", " *** ", " * * * ", " ** ", " *** *** ", " *eae******* ", " *aeaeaeaea* ", " *eaeaeaeae* ", " *aeae********** ", " *eae*.........* ", " *ae*.........* ", " *e*.........* ", " **.........* ", " *********** ", " ", " ", " ", " " }; gnokii-0.6.31/xgnokii/xpm/Preview_default.xpm0000644000175000017500000027650511666163120017351 0ustar leoleo/* XPM */ static char * default_xpm[] = { "140 293 896 2", " c None", ". c #000000", "+ c #010101", "@ c #020202", "# c #030303", "$ c #040404", "% c #040606", "& c #060606", "* c #040303", "= c #090808", "- c #0A0A0A", "; c #0D0D0D", "> c #0F0F0F", ", c #121111", "' c #131212", ") c #131313", "! c #141414", "~ c #151515", "{ c #191919", "] c #1D1D1D", "^ c #212121", "/ c #242424", "( c #252626", "_ c #272727", ": c #282929", "< c #292A2A", "[ c #2A2B2B", "} c #2C2C2C", "| c #2D2E2E", "1 c #2C2D2D", "2 c #2B2B2B", "3 c #2C2E2E", "4 c #2B2C2C", "5 c #272828", "6 c #1B1B1B", "7 c #121313", "8 c #111212", "9 c #0F1111", "0 c #0D0F0F", "a c #0B0C0C", "b c #090A0A", "c c #070707", "d c #050505", "e c #080707", "f c #090909", "g c #0C0C0C", "h c #222121", "i c #262525", "j c #292828", "k c #2D2C2C", "l c #353434", "m c #3E3D3D", "n c #474646", "o c #4F4E4E", "p c #585555", "q c #5B5858", "r c #5D5A5A", "s c #605E5E", "t c #615D5D", "u c #666363", "v c #6D6969", "w c #737070", "x c #777575", "y c #7B7878", "z c #7D7A7A", "A c #7F7D7D", "B c #817F7F", "C c #838181", "D c #848383", "E c #868585", "F c #868686", "G c #858484", "H c #838282", "I c #7D7C7C", "J c #696767", "K c #605C5C", "L c #5C5858", "M c #565757", "N c #505353", "O c #494C4C", "P c #424444", "Q c #3A3C3C", "R c #333434", "S c #272626", "T c #222323", "U c #1D1F1F", "V c #181A1A", "W c #0C0D0D", "X c #080808", "Y c #020303", "Z c #141313", "` c #1F1E1E", " . c #2C2A2A", ".. c #373434", "+. c #3D3A3A", "@. c #464444", "#. c #555252", "$. c #646161", "%. c #726D6D", "&. c #7A7575", "*. c #7E7979", "=. c #827C7C", "-. c #8A8585", ";. c #938F8F", ">. c #9C9898", ",. c #A5A1A1", "'. c #B0A9A9", "). c #B4ACAC", "!. c #B5AEAE", "~. c #B7B2B2", "{. c #B6AEAE", "]. c #B8B0B0", "^. c #B9B1B1", "/. c #BAB2B2", "(. c #BBB3B3", "_. c #BCB4B4", ":. c #BDB5B5", "<. c #BDB6B6", "[. c #BBB4B4", "}. c #B7AFAF", "|. c #B5ADAD", "1. c #B2ACAC", "2. c #ACABAB", "3. c #A6A6A6", "4. c #9F9F9F", "5. c #989797", "6. c #8F8D8D", "7. c #888585", "8. c #807C7C", "9. c #7A7676", "0. c #727272", "a. c #686B6B", "b. c #5C5E5E", "c. c #505151", "d. c #444343", "e. c #393939", "f. c #2E3333", "g. c #252929", "h. c #1B1D1D", "i. c #111313", "j. c #0A0C0C", "k. c #070808", "l. c #1B1A1A", "m. c #2A2929", "n. c #3E3C3C", "o. c #4F4C4C", "p. c #5D5959", "q. c #7E7A7A", "r. c #8C8787", "s. c #938D8D", "t. c #999393", "u. c #A39C9C", "v. c #ADA6A6", "w. c #BCB3B3", "x. c #BEB5B5", "y. c #C0B7B7", "z. c #C2B9B9", "A. c #C3BBBB", "B. c #C5BDBD", "C. c #C7BEBE", "D. c #C6BEBE", "E. c #C5BEBE", "F. c #C4BDBD", "G. c #C2BBBB", "H. c #C1B9B9", "I. c #BFB7B7", "J. c #B6B1B1", "K. c #AFACAC", "L. c #A8A5A5", "M. c #A09C9C", "N. c #989292", "O. c #8E8C8C", "P. c #818484", "Q. c #747777", "R. c #676868", "S. c #575858", "T. c #464B4B", "U. c #353939", "V. c #252828", "W. c #191A1A", "X. c #0A0B0B", "Y. c #050606", "Z. c #000101", "`. c #111111", " + c #201F1F", ".+ c #312F2F", "++ c #484646", "@+ c #615E5E", "#+ c #716C6C", "$+ c #807B7B", "%+ c #958E8E", "&+ c #A49C9C", "*+ c #ACA4A4", "=+ c #B2ABAB", "-+ c #B8B1B1", ";+ c #C1B8B8", ">+ c #C3BABA", ",+ c #C4BCBC", "'+ c #C6BDBD", ")+ c #C2BABA", "!+ c #C0B8B8", "~+ c #BDB7B7", "{+ c #B9B4B4", "]+ c #B5B0B0", "^+ c #AFAAAA", "/+ c #A8A4A4", "(+ c #9B9B9B", "_+ c #8B8C8C", ":+ c #7B7B7B", "<+ c #696D6D", "[+ c #565B5B", "}+ c #414444", "|+ c #2C2F2F", "1+ c #1C1F1F", "2+ c #080909", "3+ c #3C3B3B", "4+ c #535151", "5+ c #6E6B6B", "6+ c #868181", "7+ c #9B9595", "8+ c #AEA7A7", "9+ c #C5BCBC", "0+ c #C1BABA", "a+ c #BEB7B7", "b+ c #BAB3B3", "c+ c #B2B0B0", "d+ c #A5A5A5", "e+ c #959393", "f+ c #7F8181", "g+ c #676A6A", "h+ c #4E4F4F", "i+ c #373939", "j+ c #202222", "k+ c #0D0E0E", "l+ c #070606", "m+ c #525050", "n+ c #736F6F", "o+ c #908A8A", "p+ c #A29B9B", "q+ c #B0AAAA", "r+ c #BFB8B8", "s+ c #B8B3B3", "t+ c #ADA9A9", "u+ c #9F9A9A", "v+ c #8A8989", "w+ c #6F6F6F", "x+ c #4B4D4D", "y+ c #272B2B", "z+ c #060707", "A+ c #353333", "B+ c #878181", "C+ c #A39D9D", "D+ c #B1ABAB", "E+ c #9E9A9A", "F+ c #818181", "G+ c #585C5C", "H+ c #2F3333", "I+ c #131515", "J+ c #040505", "K+ c #888383", "L+ c #ABA4A4", "M+ c #B9B3B3", "N+ c #A5A3A3", "O+ c #828383", "P+ c #515454", "Q+ c #222525", "R+ c #070909", "S+ c #2B2A2A", "T+ c #6B6868", "U+ c #9E9898", "V+ c #C4BBBB", "W+ c #B7B1B1", "X+ c #9A9999", "Y+ c #646969", "Z+ c #242A2A", "`+ c #5B5959", " @ c #A49F9F", ".@ c #9D9B9B", "+@ c #505454", "@@ c #010202", "#@ c #7B7777", "$@ c #BAB1B1", "%@ c #B5AFAF", "&@ c #737575", "*@ c #232626", "=@ c #424040", "-@ c #969191", ";@ c #BEB6B6", ">@ c #8D8B8B", ",@ c #363838", "'@ c #5C5959", ")@ c #AAA3A3", "!@ c #9F9D9D", "~@ c #4B5050", "{@ c #0F1212", "]@ c #2A2828", "^@ c #797575", "/@ c #656969", "(@ c #1B1E1E", "_@ c #100F0F", ":@ c #3F3D3D", "<@ c #918B8B", "[@ c #808181", "}@ c #2B2D2D", "|@ c #1C1B1B", "1@ c #585454", "2@ c #A49E9E", "3@ c #9B9A9A", "4@ c #3F4141", "5@ c #565858", "6@ c #434040", "7@ c #8B8585", "8@ c #BDB4B4", "9@ c #B8B2B2", "0@ c #6F7373", "a@ c #1A1D1D", "b@ c #575454", "c@ c #8C8C8C", "d@ c #2C2B2B", "e@ c #696565", "f@ c #B3ABAB", "g@ c #A29D9D", "h@ c #3C3F3F", "i@ c #121212", "j@ c #343333", "k@ c #545A5A", "l@ c #161515", "m@ c #9A9494", "n@ c #1A1C1C", "o@ c #191818", "p@ c #524F4F", "q@ c #898888", "r@ c #2A2C2C", "s@ c #1F1F1F", "t@ c #6C6A6A", "u@ c #B4ADAD", "v@ c #989999", "w@ c #3A4242", "x@ c #857F7F", "y@ c #C3BCBC", "z@ c #A5A6A6", "A@ c #4D5555", "B@ c #0C0E0E", "C@ c #323131", "D@ c #B4AEAE", "E@ c #656565", "F@ c #131414", "G@ c #494747", "H@ c #777878", "I@ c #201E1E", "J@ c #656161", "K@ c #B2AAAA", "L@ c #BEB8B8", "M@ c #888C8C", "N@ c #272C2C", "O@ c #030404", "P@ c #7B7676", "Q@ c #9C9D9D", "R@ c #938C8C", "S@ c #ADA7A7", "T@ c #484A4A", "U@ c #423E3E", "V@ c #A69F9F", "W@ c #B4AFAF", "X@ c #5C6363", "Y@ c #B1A9A9", "Z@ c #BAB5B5", "`@ c #757D7D", " # c #151717", ".# c #252323", "+# c #746F6F", "@# c #8F9090", "## c #1F2121", "$# c #9F9B9B", "%# c #2D3131", "&# c #302E2E", "*# c #414B4B", "=# c #080B0B", "-# c #373535", ";# c #AAA2A2", "># c #AEACAC", ",# c #566464", "'# c #0D1111", ")# c #4A4949", "!# c #AFA7A7", "~# c #6E7474", "{# c #171919", "]# c #232222", "^# c #6C6868", "/# c #818282", "(# c #242929", "_# c #8F9191", ":# c #333B3B", "<# c #060808", "[# c #333131", "}# c #968F8F", "|# c #9B9D9D", "1# c #434B4B", "2# c #A09A9A", "3# c #A7A4A4", "4# c #545555", "5# c #0E0E0E", "6# c #535050", "7# c #ADA5A5", "8# c #AEA8A8", "9# c #616060", "0# c #141616", "a# c #212020", "b# c #666161", "c# c #6B6E6E", "d# c #1A1E1E", "e# c #242323", "f# c #B5B1B1", "g# c #757C7C", "h# c #212727", "i# c #B9B5B5", "j# c #808888", "k# c #282F2F", "l# c #2E2D2D", "m# c #8E8989", "n# c #8D9191", "o# c #323737", "p# c #423F3F", "q# c #A09999", "r# c #9A9898", "s# c #171717", "t# c #ABA3A3", "u# c #A29E9E", "v# c #4B4F4F", "w# c #5F5C5C", "x# c #AFA8A8", "y# c #A8A6A6", "z# c #565E5E", "A# c #0F1313", "B# c #1C1C1C", "C# c #696666", "D# c #ADADAD", "E# c #636D6D", "F# c #131717", "G# c #7A7777", "H# c #B9B2B2", "I# c #B5B3B3", "J# c #737A7A", "K# c #191C1C", "L# c #8A8686", "M# c #BFB6B6", "N# c #8E8B8B", "O# c #2D3030", "P# c #2F2D2D", "Q# c #9C9595", "R# c #959494", "S# c #383F3F", "T# c #474545", "U# c #A69E9E", "V# c #434E4E", "W# c #1B1919", "X# c #625E5E", "Y# c #A3A5A5", "Z# c #505C5C", "`# c #0D1010", " $ c #1E1D1D", ".$ c #ABA9A9", "+$ c #5F6565", "@$ c #101212", "#$ c #161717", "$$ c #7E7878", "%$ c #737171", "&$ c #1C1E1E", "*$ c #B7B0B0", "=$ c #787878", "-$ c #212626", ";$ c #0E0D0D", ">$ c #908B8B", ",$ c #7D7F7F", "'$ c #272D2D", ")$ c #101010", "!$ c #828686", "~$ c #2C3535", "{$ c #050808", "]$ c #4F4D4D", "^$ c #BBB6B6", "/$ c #888E8E", "($ c #323D3D", "_$ c #060A0A", ":$ c #555353", "<$ c #A6A0A0", "[$ c #BDB8B8", "}$ c #8E9494", "|$ c #394444", "1$ c #111010", "2$ c #595555", "3$ c #A9A2A2", "4$ c #C0B9B9", "5$ c #989898", "6$ c #444949", "7$ c #A09B9B", "8$ c #656262", "9$ c #555555", "0$ c #706C6C", "a$ c #A7A3A3", "b$ c #5C5D5D", "c$ c #141818", "d$ c #AAA6A6", "e$ c #616565", "f$ c #181D1D", "g$ c #878282", "h$ c #BBB2B2", "i$ c #ADABAB", "j$ c #676D6D", "k$ c #1C2222", "l$ c #383636", "m$ c #B0AEAE", "n$ c #6D7676", "o$ c #202727", "p$ c #3B3939", "q$ c #979090", "r$ c #B3B2B2", "s$ c #252C2C", "t$ c #3E3B3B", "u$ c #818383", "v$ c #050707", "w$ c #8B8787", "x$ c #484545", "y$ c #9F9999", "z$ c #8F8A8A", "A$ c #171616", "B$ c #514E4E", "C$ c #928E8E", "D$ c #3C3E3E", "E$ c #242222", "F$ c #5E5B5B", "G$ c #A8A1A1", "H$ c #959292", "I$ c #404242", "J$ c #060505", "K$ c #292727", "L$ c #6A6666", "M$ c #979595", "N$ c #434747", "O$ c #999898", "P$ c #464C4C", "Q$ c #282727", "R$ c #747171", "S$ c #9C9C9C", "T$ c #4A5151", "U$ c #0E1111", "V$ c #9E9F9F", "W$ c #4E5555", "X$ c #A1A3A3", "Y$ c #515959", "Z$ c #111414", "`$ c #050404", " % c #847E7E", ".% c #A3A6A6", "+% c #545E5E", "@% c #111616", "#% c #C7BDBD", "$% c #A5A9A9", "%% c #576363", "&% c #C3BDBD", "*% c #A8ACAC", "=% c #5B6868", "-% c #141919", ";% c #383737", ">% c #ABAFAF", ",% c #606C6C", "'% c #161B1B", ")% c #0B0B0B", "!% c #918A8A", "~% c #B2B1B1", "{% c #696E6E", "]% c #4B4A4A", "^% c #969090", "/% c #716F6F", "(% c #515050", "_% c #767272", ":% c #202020", "<% c #545252", "[% c #9D9898", "}% c #232424", "|% c #565555", "1% c #A19B9B", "2% c #7C7B7B", "3% c #262828", "4% c #585656", "5% c #7F7F7F", "6% c #292C2C", "7% c #595858", "8% c #A7A1A1", "9% c #BCB5B5", "0% c #828282", "a% c #2C3030", "b% c #A8A2A2", "c% c #838484", "d% c #2D3232", "e% c #5A5959", "f% c #A9A3A3", "g% c #848686", "h% c #2E3434", "i% c #5C5B5B", "j% c #ABA5A5", "k% c #858787", "l% c #2F3535", "m% c #5E5C5C", "n% c #ACA6A6", "o% c #868989", "p% c #303636", "q% c #625F5F", "r% c #888A8A", "s% c #313838", "t% c #666262", "u% c #898B8B", "v% c #323939", "w% c #686464", "x% c #B3ACAC", "y% c #898D8D", "z% c #333A3A", "A% c #696464", "B% c #8A8E8E", "C% c #343C3C", "D% c #080A0A", "E% c #8C9090", "F% c #353D3D", "G% c #363F3F", "H% c #8D9393", "I% c #374040", "J% c #6A6565", "K% c #A59E9E", "L% c #837E7E", "M% c #888282", "N% c #847F7F", "O% c #807A7A", "P% c #7F7A7A", "Q% c #858080", "R% c #7F7B7B", "S% c #7D7878", "T% c #7D7777", "U% c #7D7979", "V% c #7D7978", "W% c #817C7C", "X% c #868080", "Y% c #7C7878", "Z% c #7C7979", "`% c #7C7777", " & c #807D7D", ".& c #9D9D9D", "+& c #BFB9B9", "@& c #384242", "#& c #090C0C", "$& c #6C6969", "%& c #787474", "&& c #393837", "*& c #2B2C2A", "=& c #2F322E", "-& c #313431", ";& c #323531", ">& c #313430", ",& c #303330", "'& c #2F332F", ")& c #303430", "!& c #2F332E", "~& c #2E322E", "{& c #2D322E", "]& c #2D312E", "^& c #2E332E", "/& c #2F342F", "(& c #2E342F", "_& c #2E332F", ":& c #2D332E", "<& c #2C312D", "[& c #2B312D", "}& c #2A302D", "|& c #29302D", "1& c #29302C", "2& c #282F2B", "3& c #252927", "4& c #292E2D", "5& c #687272", "6& c #8F9696", "7& c #6C6A69", "8& c #2B302A", "9& c #2F4230", "0& c #436346", "a& c #486A4B", "b& c #476A4B", "c& c #47694B", "d& c #47694A", "e& c #46694A", "f& c #45694A", "g& c #456949", "h& c #446949", "i& c #446849", "j& c #436849", "k& c #436848", "l& c #426848", "m& c #426748", "n& c #416748", "o& c #416747", "p& c #406747", "q& c #3F6747", "r& c #3F6647", "s& c #3F6646", "t& c #3E6546", "u& c #3D6546", "v& c #3C6546", "w& c #3A6044", "x& c #2F4338", "y& c #1D2625", "z& c #5A6767", "A& c #B3AFAF", "B& c #919797", "C& c #3A4545", "D& c #6C6B69", "E& c #2E3E2F", "F& c #39713D", "G& c #51AC58", "H& c #57B85E", "I& c #56B85E", "J& c #56B85D", "K& c #55B85D", "L& c #55B75D", "M& c #54B75D", "N& c #55AE5F", "O& c #4D7B5B", "P& c #293632", "Q& c #929898", "R& c #3B4646", "S& c #090D0D", "T& c #2F4130", "U& c #3B7B3F", "V& c #53BC5B", "W& c #59C961", "X& c #5ABF64", "Y& c #548763", "Z& c #2B3A35", "`& c #5C6868", " * c #C0BABA", ".* c #929A9A", "+* c #3C4848", "@* c #2C3B36", "#* c #939C9C", "$* c #3D4949", "%* c #0A0D0D", "&* c #949C9C", "** c #939B9B", "=* c #929999", "-* c #3C4747", ";* c #919898", ">* c #6B6767", ",* c #909797", "'* c #3A4444", ")* c #374141", "!* c #080C0C", "~* c #8D9292", "{* c #3A4646", "]* c #8E9595", "^* c #394242", "/* c #8E9393", "(* c #384141", "_* c #0F0E0E", ":* c #151414", "<* c #8C9191", "[* c #353E3E", "}* c #8B8F8F", "|* c #898E8E", "1* c #323A3A", "2* c #548764", "3* c #2B3B36", "4* c #8A8F8F", "5* c #343E3E", "6* c #548765", "7* c #151313", "8* c #181616", "9* c #181717", "0* c #1A1919", "a* c #538764", "b* c #5A6868", "c* c #1E1C1C", "d* c #191717", "e* c #364040", "f* c #BFBABA", "g* c #538763", "h* c #121010", "i* c #394343", "j* c #538762", "k* c #353F3F", "l* c #353C3C", "m* c #2A3A35", "n* c #909898", "o* c #0A0E0E", "p* c #3B4747", "q* c #1A1A1A", "r* c #1C1A1A", "s* c #528762", "t* c #1F1C1C", "u* c #59C962", "v* c #5AC963", "w* c #909696", "x* c #5AC962", "y* c #5ABF65", "z* c #528763", "A* c #8F9595", "B* c #5BC964", "C* c #5BBF65", "D* c #538663", "E* c #2A3935", "F* c #8B9090", "G* c #5BC963", "H* c #5BBF66", "I* c #181515", "J* c #0F1010", "K* c #5CBF67", "L* c #2F4030", "M* c #3B7A3F", "N* c #53BA5A", "O* c #59C760", "P* c #58C760", "Q* c #59C761", "R* c #5AC764", "S* c #5AC763", "T* c #5BBD66", "U* c #528462", "V* c #293834", "W* c #596767", "X* c #2E3C2E", "Y* c #386C3C", "Z* c #50A556", "`* c #56B15C", " = c #55B15C", ".= c #54B15C", "+= c #54B05C", "@= c #54B05B", "#= c #53B05B", "$= c #52B05B", "%= c #52B05A", "&= c #53B05C", "*= c #54B05E", "== c #54B05D", "-= c #54A75F", ";= c #497558", ">= c #263430", ",= c #596666", "'= c #AFA9A9", ")= c #2D322D", "!= c #2E4230", "~= c #406042", "{= c #446747", "]= c #436747", "^= c #436746", "/= c #426746", "(= c #426646", "_= c #416646", ":= c #416546", "<= c #406546", "[= c #406545", "}= c #3F6545", "|= c #3E6545", "1= c #3E6544", "2= c #3E6444", "3= c #3D6444", "4= c #3C6444", "5= c #3B6444", "6= c #3B6443", "7= c #3A6443", "8= c #3A6343", "9= c #3A6344", "0= c #395E43", "a= c #2E4237", "b= c #1F2826", "c= c #3B4545", "d= c #444242", "e= c #353634", "f= c #383A37", "g= c #393C38", "h= c #383C38", "i= c #373C38", "j= c #363B37", "k= c #353B37", "l= c #353B36", "m= c #343B36", "n= c #343A36", "o= c #333A36", "p= c #323935", "q= c #303332", "r= c #6C7777", "s= c #B6B2B2", "t= c #898484", "u= c #807F7F", "v= c #9B9E9E", "w= c #6C6767", "x= c #0E0F0F", "y= c #384343", "z= c #0D0C0C", "A= c #060404", "B= c #888B8B", "C= c #343B3B", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " . . . . + + + + @ @ # # $ $ $ $ % & & & & & & & & & % $ @ + + + . . . . . . ", " . + @ # * $ & = - ; > , ' ) ! ~ { ] ^ / ( _ : < [ } | | 1 2 } | | 3 4 5 6 ~ ) 7 8 9 0 a b c d $ # # @ + . . ", " . + # & e f g ! 6 h i j k l m n o p q r s t u v w x y z A B C D E F G H D E F E D I J K L q M N O P Q R } S T U V 7 W X & % Y + . . ", " . . + $ f g Z ` ...+.@.#.$.%.&.*.=.-.;.>.,.'.).!.~.{.{.].^./.(.(._._.:.:.<.<.<.:.:.<.<.<.:.[.}.|.).1.2.3.4.5.6.7.8.9.0.a.b.c.d.e.f.g.h.i.j.k.$ + . . ", " . + # & g ' l.m.n.o.p.v q.r.s.t.u.v.!.[._.w.x.y.z.A.B.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.D.E.F.G.H.I.:._./.J.K.L.M.N.O.P.Q.R.S.T.U.V.W.8 X.Y.Y Z. ", " . . # f `. +.+++@+#+$+%+&+*+=+-+:.y.;+>+,+'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.D.B.A.)+!+~+{+]+^+/+(+_+:+<+[+}+|+1+9 2+# . . ", " . . $ > ^ 3+4+5+6+7+8+].w.y.)+,+9+'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.D.B.9+A.0+a+b+c+d+e+f+g+h+i+j+k+$ . . . ", " . + l+, m.m+n+o+p+q+(.;+,+'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.B.A.r+s+t+u+v+w+x+y+i.z++ . ", " . $ ) A+t B+C+=+:.z.9+'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.'+,+H.[.D+E+F+G+H+I+J+. . ", " . X / m+K+L+w.)+9+'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.'+,+H.M+N+O+P+Q+R+. ", " . & S+T+U+^.V+'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.'+G.W+X+Y+Z+Y.. ", " + ! `+ @I.9+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.9+<..@+@I+@@ ", " $ S #@$@'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.B.%@&@*@$ ", " . - =@-@!+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.;@>@,@2+. ", " + ~ '@)@V+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.)+!@~@{@+ ", " X ]@^@{.'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.B.K./@(@Y ", " + _@:@<@x.'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.'+[.[@}@Y.. ", " $ |@1@2@>+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.)+3@4@X.. ", " - .+%.).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.'+^+5@8 + ", " $ ! 6@7@8@'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.9@0@a@@ . ", " X h b@u.>+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.r+c@< $ . ", " ; d@e@f@'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.V+g@h@R+. ", " $ i@j@8.(.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.B.t+k@9 . ", " $ l@:@m@z.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.'+-+&@n@+ . ", " $ o@p@)@9+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.a+q@r@J+. ", " # s@t@u@'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.0+v@w@2+. ", " $ S x@_.'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.y@z@A@B@. ", " + g C@s.!+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.'+D@E@F@. ", " @ l@G@u.A.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.b+H@1+@ . ", " # I@J@K@'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.D.C.C.C.C.C.C.C.C.C.C.C.C.L@M@N@O@. ", " d i P@/.'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.D.B.D.C.C.C.C.C.C.C.C.C.C.C.y@Q@U.z+. ", " X .+R@!+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.D.B.D.C.C.C.C.C.C.C.C.C.C.C.'+S@T@X.. ", " @ `.U@V@9+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.'+C.C.C.C.C.C.C.C.C.C.C.C.C.W@X@9 . . ", " # |@1@Y@'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.Z@`@ #. . ", " $ .#+#^.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.0+@###+ . ", " . $ S+o+!+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.V+$#%#J+. ", " . $ &#u.9+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.9+/+*#=#. ", " . X -#;#'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.B.>#,#'#. . ", " @ ! )#!#'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.'+J.~#{#+ . ", " $ ]#^#}.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.'+[./#(#O@. ", " . d .6+:.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.D.a+_#:#<#. ", " . & [#}#;+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.0+|#1#j.. ", " + g n.2#A.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.,+3#4#5#. . ", " # o@6#7#9+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.9+8#9#0#+ . ", " $ a#b#|.'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.9+1.c#d#Y . ", " . $ e#%.].C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.B.f#g#h#O@. ", " . $ S q.w.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.'+i#j#k#% . ", " . & l#m#I.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.D.L@n#o#z+. ", " + > p#q#>+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.0+r#4@f . ", " @ s##.t#9+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.A.u#v#B@. ", " # l.w#x#9+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.,+y#z#A#. . ", " @ B#C#).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.,+D#E#F#Z.. ", " . @ s@G#H#'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.B.I#J#K#+ . ", " . @ h L#M#C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.<.D T Y . ", " . @ e#%+z.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.I.N#O#Y.. ", " . c P#Q#>+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.H.R#S#R+. ", " @ , T#U#V+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.)+Q@V#j.. ", " . @ W#X#x#9+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.A.Y#Z#`#. ", " . @ $+#{.'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.,+.$+$@$. ", " . @ $^@].'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.9+1.t@#$Z. ", " . @ I@$$$@'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.B.!.%$&$@ ", " . e k 6+(.'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.'+*$=$-$O@ ", " + ;$:@>$x.'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.'+9@,$'$J+ ", " + )$G@N.I.'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.'+{+!$~${$ ", " + `.]$u+H.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.'+^$/$($_$ ", " + `.:$<$A.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.D.[$}$|$=# ", " . 1$2$3$V+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.4$5$6$X.. ", " . . 1$p.t#V+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.)+7$o k+. ", " . + l@8$!#9+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.>+ @9$i.+ ", " . # ` 0$=+9+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.A.a$b$c$@@ ", " . $ S P@{.9+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.V+d$e$f$Y ", " . & &#g$h$'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.,+i$j$k$Y ", " . c l$<@;@'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.B.m$n$o$O@ ", " . X p$q$;+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.B.r$`@s$J+ ", " . X t$N.;+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.'+{+u$O#v$ ", " . f =@7+z.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.<.w$l X ", " . g x$y$)+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.I.z$e.b ", " @ A$B$&+>+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.I.C$D$b . ", " d E$F$G$V+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.!+H$I$a . ", " J$K$L$v.V+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.!+M$N$B@. ", " d K$0$Y@9+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.H.O$P$0 Z. ", " d Q$R$u@9+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.0+S$T$U$Z. ", " $ Q$G#*$'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.)+V$W${@+ ", " $ K$=.w.'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.G.X$Y$Z$+ ", " `$m. %8@C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.'+C.'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.y@.%+%@%+ ", " d .x@8@C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.'+#%'+D.'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.y@$%%%F#+ ", " c .+B+:.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.'+C.'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.&%*%=%-%@@ ", " f ;%7@x.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.F.>%,%'%@@ ", " )%=@!%M#C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.E.~%{%K#@ ", " . ; ]%^%y.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.D.W+/%] @ ", " . ;$(%m@!+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.'+'+C.C.C.'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C./._%:%# ", " . 5#<%[%H.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.'+'+'+'+'+'+'+'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.(.9.}%O@ ", " . 5#|%1%z.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.'+'+C.C.C.'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.(.2%3%$ ", " . > 4%2@>+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.D.B.D.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C._.5%6%% ", " . > 7%8%A.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.'+9+'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.9%0%a%z+ ", " . > 7%b%V+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.:.c%d%z+ ", " . > e%f%V+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.<.g%h%<# ", " . > i%j%,+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.<.k%l%k. ", " . )$m%n%,+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.<.o%p%k. ", " . 1$q%x#9+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.~+r%s%R+ ", " . , t%K@9+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.a+u%v%R+ ", " . , w%x%'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.a+y%z%2+ ", " . , A%).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.a+B%C%D% ", " . , A%).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.L@E%F%D% ", " . , A%).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.'+'+'+'+'+'+C.C.C.C.C.C.'+'+'+'+'+'+'+'+C.C.C.C.C.C.C.C.C.C.C.'+'+'+'+'+'+'+'+'+'+'+'+C.C.C.C.C.'+'+C.C.C.C.C.C.C.'+'+'+C.C.C.C.C.C.C.C.'+'+'+'+'+'+'+'+'+'+'+'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.L@n#G%D% ", " . , A%).'+C.C.C.C.C.C.C.9+z.:._.:.x.;@;@:._._.:._.w.[.9%_.8@_._._._._.(._.(.(.(.h$h$w.w.h$w.w.w.w.w.w.w.w.w.(.(.w.(.(.(.(.(.(.(.(.(.(.(.8@x.;@:.x.8@8@8@w.w.w.w.(._.w.(.h$w.w.w.w.w.w.(.(.w.w.(.(.(._.(.(.w.(.^.(.w.w.w.w.w.w.w.w.w.w._.4$'+C.C.C.C.C.r+H%I%D% ", " . i@J%u@'+C.C.C.C.C.C.'+;@K%K+$+L%6+M%g$N%$+$+L%L%O%P%L%Q%L%R%q.q.q.q.q.*.*.*.S%T%$$$$$$*.*.*.*.*.*.*.*.U%U%U%V%S%S%S%S%S%S%S%S%S%S%S%*.W%N%6+g$B+X%N%W%*.U%U%U%U%S%S%Y%Z%Z%Z%Z%Z%Z%Z%Y%Y%`%`%Y%Y%Y%Y%`%#@#@#@Y%Y%Y%Y%Y%Y%Y%Y%Y%Y%Y%Y% &.&r+C.C.C.C.C.+&}$@&#& ", " . ' $&}.'+C.C.C.C.C.C.9+=+%&&&*&=&-&;&-&>&,&'&,&,&,&'&)&-&)&'&'&'&'&'&!&!&!&=&=&~&~&~&~&~&~&~&~&{&{&{&{&{&{&{&{&{&{&{&{&{&{&{&{&{&{&]&]&~&^&'&/&(&_&:&{&<&[&[&[&[&[&[&[&[&}&}&}&}&}&}&}&}&|&|&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&2&3&4&5&J.C.C.C.C.C.+&6&|$#& ", " . i@L$|.'+C.C.C.C.C.C.,+x#7&8&9&0&a&a&a&a&b&b&b&a&b&b&b&a&b&c&c&c&c&d&d&d&d&e&e&f&f&g&g&g&g&h&i&i&i&i&i&i&j&j&k&k&k&l&l&m&m&m&l&l&m&m&m&m&n&n&n&o&p&p&p&p&q&q&r&r&r&r&r&s&t&t&t&u&u&u&u&u&u&u&u&v&v&v&v&v&v&v&v&v&v&v&v&v&v&v&u&v&w&x&y&z&A&C.C.C.C.C.+&B&C&#& ", " . , A%).'+C.C.C.C.C.C.,+x#D&E&F&G&H&H&H&H&H&H&H&H&H&H&H&H&H&H&H&H&H&H&H&H&H&H&H&H&H&H&H&H&H&I&I&I&I&I&I&I&I&I&I&I&I&I&I&I&I&I&I&I&I&I&I&I&I&I&I&J&K&K&K&K&K&K&K&L&L&L&L&L&L&L&L&L&L&L&L&L&L&L&L&M&M&M&M&M&M&M&M&M&M&M&M&M&M&M&L&M&N&O&P&=%A&C.C.C.C.C.+&Q&R&S& ", " . , A%).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&Y&Z&`&A&C.C.C.C.C. *.*+*S& ", " . , A%).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&Y&@*`&A&C.C.C.C.C. *#*$*%* ", " . , A%).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&Y&@*`&A&C.C.C.C.C. *&*$*%* ", " . , A%).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&Y&@*`&A&C.C.C.C.C. *&*$*%* ", " . , A%).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&Y&@*`&A&C.C.C.C.C. ***$*%* ", " . , A%).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&Y&@*`&A&C.C.C.C.C. *=*-*S& ", " . , A%).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&Y&@*`&A&C.C.C.C.C.+&Q&R&S& ", " . , A%).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&Y&@*`&A&C.C.C.C.C.+&;*C&#& ", " . ' >*|.'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&Y&@*`&A&C.C.C.C.C.+&,*'*#& ", " . i@L$|.'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&Y&@*`&A&C.C.C.C.C.+&6&|$#& ", " . , A%).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&Y&@*`&A&C.C.C.C.C.+&}$@&#& ", " . , A%).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&Y&@*`&A&C.C.C.C.C.r+H%)*!* ", " . , A%).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&Y&@*`&A&C.C.C.C.C.L@~*I%D% ", " . , A%).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&Y&@*`&A&C.C.C.C.C.L@n#G%D% ", " . , A%).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&Y&@*`&A&C.C.C.C.C.L@H%I%D% ", " . , A%).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&Y&@*`&A&C.C.C.C.C.+&;*{*S& ", " . , A%).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&Y&@*`&A&C.C.C.C.C.+&Q&R&S& ", " . , A%).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&Y&@*=%A&D.C.C.C.C.+&;*C&#& ", " . , A%).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&Y&@*=%A&D.C.C.C.C.+&,*'*#& ", " + i@A%).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&Y&@*=%A&D.C.C.C.C.+&6&|$#& ", " = Z A%).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&Y&@*=%A&D.C.C.C.C.+&]*^*#& ", " _@l@A%).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&Y&@*=%A&D.C.C.C.C.r+/*(*#& ", " _@l@A%).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&Y&@*=%A&D.C.C.C.C.r+H%I%D% ", " _*l@A%).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&Y&@*=%A&D.C.C.C.C.L@~*G%D% ", " ;$:*A%).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&Y&@*=%A&D.C.C.C.C.L@<*[*D% ", " 5#:*A%).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&Y&@*=%A&D.C.C.C.C.L@}*F%D% ", " 5#~ A%).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&Y&@*=%A&D.C.C.C.C.a+B%C%D% ", " _@l@A%).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&Y&@*=%A&D.C.C.C.C.a+|*:#2+ ", " )$l@e@).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&Y&@*=%A&D.C.C.C.C.a+y%1*R+ ", " ' l@e@).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&2*3*=%A&D.C.C.C.C.L@4*5*D% ", " ) A$L$|.'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&6*3*=%A&D.C.C.C.C.+&;*C&#& ", " 7*A$>*!.'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&6*3*=%A&D.C.C.C.C.+&Q&R&S& ", " ~ A$J%u@'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&6*3*=%A&D.C.C.C.C.+&;*C&#& ", " l@A$e@).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&6*3*=%A&D.C.C.C.C.+&,*'*#& ", " 8*A$e@).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&6*3*=%A&D.C.C.C.C.+&6&|$#& ", " o@9*e@).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&6*3*=%A&D.C.C.C.C.+&]*^*#& ", " 0*9*e@).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&6*3*=%A&D.C.C.C.C.r+/*(*#& ", " l.9*e@).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&a*3*=%A&D.C.C.C.C.r+H%I%D% ", " |@9*e@).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&a*3*b*A&D.C.C.C.C.L@~*G%D% ", " c*d*e@).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&a*3*b*A&D.C.C.C.C.L@~*e*D% ", " ` o@e@).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&a*3*b*A&D.C.C.C.C.+&;*C&#& ", " ` o@A%).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&a*3*b*A&D.C.C.C.C.f*=*R&S& ", " |@9*A%x%'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&g*Z&b*A&D.C.C.C.C.+&;*C&#& ", " :*A$e@).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&g*Z&b*A&D.C.C.C.C.+&,*'*#& ", " h*l@e@).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&g*Z&b*A&D.C.C.C.C.+&6&|$#& ", " _@l@A%).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&g*Z&b*A&D.C.C.C.C.+&]*i*#& ", " 5#:*A%).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&j*Z&b*A&D.C.C.C.C.+&}$(*#& ", " ;$:*A%).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&j*Z&b*A&D.C.C.C.C.r+H%I%D% ", " 5#:*A%).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&g*Z&b*A&D.C.C.C.C.L@~*G%D% ", " _*l@A%).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&g*Z&b*A&D.C.C.C.C.L@<*k*D% ", " )$l@e@).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&g*Z&b*A&D.C.C.C.C.L@}*F%b ", " h*l@e@).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&j*Z&b*A&D.C.C.C.C.a+B%F%W ", " ' l@e@u@'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&j*Z&b*A&D.C.C.C.C.a+B%l*0 ", " Z A$>*!.'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&j*m*b*A&D.C.C.C.C.a+y%C%{@ ", " :*A$L$!.'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&j*m*b*A&D.C.C.C.C.a+B%[*@$ ", " l@A$e@).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&j*m*b*A&D.C.C.C.C.+&n*{*o* ", " 8*A$e@).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&j*m*b*A&D.C.C.C.C.f*=*p*S& ", " o@8*e@).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&j*m*b*A&D.C.C.C.C.+&;*C&#& ", " 0*9*e@).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&j*m*b*A&D.C.C.C.C.+&,*'*#& ", " q*9*e@).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&j*m*b*A&D.C.C.C.C.+&6&|$#& ", " r*9*e@).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&s*m*b*A&D.C.C.C.C.+&]*i*#& ", " B#9*e@).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&X&s*m*b*A&D.C.C.C.C.r+/*(*#& ", " t*o@e@).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&u*W&W&W&u*W&W&W&u*W&W&W&W&W&W&X&s*m*b*A&D.C.C.C.C.r+H%I%D% ", " ` o@A%).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&v*W&W&W&v*W&W&W&v*W&W&W&W&W&W&X&s*m*b*A&D.C.C.C.C.L@~*G%D% ", " ` o@A%).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&v*W&W&W&v*W&W&W&v*W&W&W&W&W&W&X&s*m*b*A&D.C.C.C.C.L@~*G%D% ", " 8*A$A%).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&v*W&W&W&v*W&W&W&v*W&W&W&W&W&W&X&s*m*b*A&D.C.C.C.C.+&,*'*#& ", " ' l@e@).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&v*W&W&W&v*W&W&W&v*W&W&W&W&W&W&X&s*m*b*A&D.C.C.C.C.+&Q&R&S& ", " _@l@A%).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&v*W&W&W&v*W&W&W&v*W&W&W&W&W&W&X&s*m*b*A&D.C.C.C.C.+&Q&R&S& ", " 5#:*A%).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&v*W&W&W&v*W&W&W&v*W&W&W&W&W&W&X&s*m*b*A&D.C.C.C.C.+&B&C&#& ", " ;$:*A%).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&v*W&W&W&v*W&W&W&v*W&W&W&W&W&W&X&s*m*b*A&D.C.C.C.C.+&w*'*#& ", " 5#:*A%).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&x*v*W&W&x*v*W&W&x*v*W&W&W&W&W&W&y*z*m*b*A&D.C.C.C.C.+&A*i*#& ", " _*l@A%).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&v*B*W&W&v*B*W&W&v*B*W&W&u*W&W&W&y*z*m*b*A&D.C.C.C.C.+&}$@&#& ", " _@l@A%).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&v*B*W&W&v*B*W&W&v*B*W&W&x*W&W&W&C*g*m*b*A&D.C.C.C.C.r+H%I%D% ", " h*l@e@).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&v*B*W&W&v*B*W&W&v*B*W&W&x*W&W&W&C*D*E*z&A&D.C.C.C.C.L@~*G%D% ", " ' l@e@).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&v*B*W&W&v*B*W&W&v*B*W&W&x*W&W&W&C*D*E*z&A&D.C.C.C.C.L@<*G%D% ", " ) A$L$|.'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&v*B*W&W&v*B*W&W&v*B*W&W&x*W&W&W&C*D*E*z&A&D.C.C.C.C.L@F*[*#& ", " :*A$>*!.'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&x*G*W&W&x*G*W&W&x*G*W&W&x*W&W&W&C*D*E*z&A&D.C.C.C.C.L@}*F%W ", " ~ A$e@u@'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&v*v*W&W&v*v*W&W&v*v*W&W&v*W&W&W&H*D*E*z&A&D.C.C.C.C.a+B%l*0 ", " I*A$e@).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&v*x*W&W&v*x*W&W&v*x*W&W&v*W&W&W&H*D*E*z&A&D.C.C.C.C.a+y%l*J* ", " 8*A$e@).'+C.C.C.C.C.C.,+x#D&T&U&V&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&W&x*B*v*W&x*B*v*W&x*B*v*W&x*G*W&W&x*K*D*E*z&A&D.C.C.C.C.a+|*F%{@ ", " o@9*e@).'+C.C.C.C.C.C.,+x#D&L*M*N*O*O*O*O*P*P*P*O*P*P*P*O*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*P*Q*R*S*P*Q*R*S*P*Q*R*S*P*Q*S*P*P*Q*T*U*V*W*A&D.C.C.C.C.+&A*i*B@ ", " 0*9*e@).'+C.C.C.C.C.C.,+x#7&X*Y*Z*`*`*`*`* = = =`* = = =`* = = = = = = = = =.=.=.=.=.=.=.=.=.=.=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=@=@=@=#=#=#=#=#=#=#=#=#=#=#=$=$=$=$=$=$=$=$=%=%=%=%=%=%=%=%=&=*=*=$=&=*=*=$=&=*=*=$=&===%=%=&=-=;=>=,=A&D.C.C.C.C.+&;*{*S& ", " l.9*e@).'+C.C.C.C.C.C.,+'=5+)=!=~={={={={=]=]=]={=]=]=]={=]=]=]=^=^=^=^=^=^=/=/=(=_=_=_=_=_=_=:=:=:=:=<=[=[=[=[=}=}=}=}=|=|=|=}=}=|=1=2=2=3=3=3=3=3=3=3=3=3=3=3=4=4=4=4=4=5=5=5=6=6=6=6=6=6=7=7=8=9=9=8=8=9=9=8=8=9=9=8=8=9=8=7=8=0=a=b=z&A&D.C.C.C.C.+&;*c=#& ", " |@9*e@).'+C.C.C.C.C.C.9+u@P%d=e=f=g=g=g=g=g=g=g=g=g=g=g=g=g=g=g=h=h=h=h=h=h=h=h=h=i=i=i=i=i=i=i=i=i=i=j=j=j=j=j=j=j=k=k=k=k=k=k=k=k=l=l=l=l=l=l=l=l=l=l=l=l=l=l=m=m=m=m=m=m=m=m=n=n=n=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=p=q=U.r=s=C.C.C.C.C.+&B&'*#& ", " c*d*e@).'+C.C.C.C.C.C.'+;@V@t=$+O%O%O%O%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%q.q.q.q.q.q.q.q.q.q.q.q.*.*.*.*.*.*.U%U%U%*.*.U%U%U%U%U%U%U%U%U%U%U%U%U%U%U%U%U%U%U%U%U%U%U%U%U%U%U%U%Z%Z%Z%Z%Z%Z%Z%Z%Z%Z%Z%Z%Z%Z%Z%Z%Z%Z%Z%Z%Z%Z%Z%u=v=r+C.C.C.C.C.+&w*'*#& ", " ` o@A%).'+C.C.C.C.C.C.C.9+H.8@w.w.w.w.w.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(._.4$'+C.C.C.C.C.+&A*i*#& ", " ` o@A%).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.+&}$(*#& ", " l.9*A%).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.r+H%I%D% ", " ) l@e@).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.L@~*G%D% ", " )$l@e@).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.L@~*G%D% ", " _*l@A%).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.+&A*i*#& ", " 5#:*A%).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.+&;*R&S& ", " ;$:*A%).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.+&Q&R&S& ", " 5#:*A%).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.+&;*C&#& ", " _@l@A%).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.+&,*'*#& ", " )$l@e@).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.+&6&i*#& ", " h*l@e@).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.+&}$@&#& ", " ) A$J%u@'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.r+H%)*!* ", " Z A$w=!.'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.L@~*I%D% ", " ~ A$L$|.'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.L@<*G%D% ", " l@A$e@).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.L@F*[*D% ", " 8*A$e@).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.L@}*F%%* ", " o@8*e@).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.a+B%l*k+ ", " 0*9*e@).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.a+y%C%x= ", " l.9*e@).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.a+y%l*@$ ", " r*9*e@).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.r+H%@&0 ", " c*d*e@).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.+&;*c=#& ", " t*o@e@).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.+&Q&R&S& ", " s@o@A%).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.+&;*C&#& ", " t*d*A%x%'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.+&,*'*#& ", " ~ A$e@).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.+&6&i*#& ", " h*l@e@).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.+&}$@&#& ", " _@l@A%).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.r+/*(*#& ", " 5#:*A%).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.+&]*y=#& ", " ;$:*A%).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.+&Q&R&S& ", " z=:*A%).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.+&Q&R&S& ", " f Z A%).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.+&;*C&#& ", " # ' A%).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.+&,*'*#& ", " @ ' A%).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.+&6&|$#& ", " @ ' A%).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.+&]*^*#& ", " @ ' A%).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.r+/*(*#& ", " @ ' A%).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.r+H%I%D% ", " @ ' A%).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.L@~*G%D% ", " # ' A%).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.L@~*e*D% ", " * ' A%).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.+&;*C&#& ", " $ ' A%).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.f*=*R&S& ", " A=Z J%|.'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.+&;*C&#& ", " & Z >*!.'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.+&,*'*#& ", " c Z J%u@'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.+&6&|$#& ", " c Z A%).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.+&]*i*#& ", " X Z A%).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.+&}$(*#& ", " f ! A%).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.r+H%I%D% ", " i@l@e@).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.L@~*G%D% ", " 0*9*e@).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.L@<*k*D% ", " |@9*e@).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.L@}*F%b ", " c*d*e@).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.a+B%F%W ", " t*o@e@).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.a+B%l*0 ", " s@o@A%).'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.a+y%l*@$ ", " +o@A%x%'+C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.C.~+B=C=7 "}; gnokii-0.6.31/xgnokii/xpm/info.xpm0000644000175000017500000000446111666163120015145 0ustar leoleo/* XPM */ static char *info_xpm[] = { /* width height num_colors chars_per_pixel */ " 30 64 2 1", /* colors */ ". c #000000", "# c None", /* pixels */ "##############################", "###############....###########", "###########...........########", "########...............#######", "######..................######", "####.....................#####", "###......................#####", "##.......................#####", "##.......................#####", "##.......................#####", "##......................######", "##.....................#######", "###..................#########", "####...............###########", "######.........###############", "##############################", "##############################", "##############################", "##############################", "#####################...######", "###############..........#####", "###########..............#####", "#######..................#####", "#####....................#####", "###......................#####", "##.......................#####", "#........................#####", "#........................#####", "#........................#####", "##.......................#####", "###......................#####", "####.....................#####", "#####....................#####", "######...................#####", "######...................#####", "######...................#####", "######...................#####", "######...................#####", "######...................#####", "######...................#####", "######...................#####", "######...................#####", "######...................#####", "######...................#####", "######...................#####", "######...................#####", "######...................#####", "######...................#####", "######...................#####", "######....................####", "#####.....................####", "#####.....................####", "####.......................###", "###.........................##", "##...........................#", "#.............................", "#.............................", "#.............................", "#............................#", "##..........................##", "####.......................###", "########...............#######", "##############################", "##############################" }; gnokii-0.6.31/xgnokii/xpm/Edit_flip_horizontal.xpm0000644000175000017500000000110611666163120020353 0ustar leoleo/* XPM */ static char * Edit_flip_horizontal_xpm[] = { "20 19 4 1", " c None", ". c #000000", "+ c #35773A", "@ c #5ACA62", " ", " ", " ", " . . ", " .. .. ", " .+. . . ", " .+. . . ", " .@+. . . ", " .@+. . . ", " .@@+. . . ", " .@@+. . . ", " .@@@+. . . ", " .@@@+. . . ", " .@@@@+. . . ", " ....... ....... ", " ", " ", " ", " "}; gnokii-0.6.31/xgnokii/xpm/Display.xpm0000644000175000017500000002567111666163120015625 0ustar leoleo/* XPM */ /* G N O K I I A Linux/Unix toolset and driver for Nokia mobile phones. Copyright (C) 1999 Jan Derfinak Released under the terms of the GNU GPL, see file COPYING for more details. */ /* XPM */ static char * Display_xpm[] = { "109 96 3 1", " c #000000000000", ". c #FFFFFFFFFFFF", "X c #0000DF7D0000", " ", " ", " ", " ", " ... . .. ... .... ... ... ... ... ", " . .. .. . .. .. . . . . ", " . . .. . . . . . . . ", " . . . . . . . . . . ", " . ... . . . . . ... . . ", " . . . . . . . . .. . . ", " . . . . . . . . .. . . ", " . .. . .. .. .. . .. . . ", " .... ... . .... ... ...... ... ", " ", " ", " ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " ", " ", " "}; gnokii-0.6.31/xgnokii/xpm/Tool_brush.xpm0000644000175000017500000000107411666163120016327 0ustar leoleo/* XPM */ static char * Tool_brush_xpm[] = { "20 19 4 1", " c None", ". c #000000", "+ c #949194", "@ c #FFFFFF", " ", " ", " ", " .... ", " . . ", " . . ", " .. .+ ", " .@@...+ ", " .@ .++ ", " .@@ .+ ", " .@ .++ ", " .@@ .+ ", " .@ .++ ", " .. .+ ", " ....++ ", " ...++ ", " ..++ ", " .++ ", " "}; gnokii-0.6.31/xgnokii/xpm/phone.xpm0000644000175000017500000000102311666163120015312 0ustar leoleo/* XPM */ /* G N O K I I A Linux/Unix toolset and driver for Nokia mobile phones. Copyright (C) 1999 Jan Derfinak Released under the terms of the GNU GPL, see file COPYING for more details. */ static char * phone_xpm[] = { "18 10 2 1", " c #FFFFFFFFFFFF", ". c #000000000000", " ..............", " ...............", ".... .. . . . ..", " .. ...........", " .. .. . . . ..", " .. ...........", " .. .. . . . ..", " .. ...........", " ...............", " .............."}; gnokii-0.6.31/xgnokii/xpm/Op.xpm0000644000175000017500000000171511666163120014567 0ustar leoleo/* XPM */ /* G N O K I I A Linux/Unix toolset and driver for Nokia mobile phones. Copyright (C) 1999 Pavel Janík ml. & Hugh Blemings. Released under the terms of the GNU GPL, see file COPYING for more details. This is the icon for Operator Logo. Last modification: Sat Jul 24 14:30:37 CEST 1999 Modified by Pavel Janík ml. */ static char *Op_xpm[] = { "20 19 7 1", "* c #000000", "# c #800000", "b c #008000", "c c #00ff00", "i c #808080", " c None", "l c #ffffff", " ", " ", " ********** ", " ************ ", " ** ** ", " ** ** ", " ** ** ", " ** ** ", " ** ** ", " ** ** ", " ** ** ", " ** ** ", " ** ** ", " ** ** ", " ************ ", " ********** ", " ", " ", " " }; gnokii-0.6.31/xgnokii/xpm/Invert.xpm0000644000175000017500000000161511666163120015457 0ustar leoleo/* XPM */ /* G N O K I I A Linux/Unix toolset and driver for Nokia mobile phones. Copyright (C) 1999 Pavel Janík ml. & Hugh Blemings. Released under the terms of the GNU GPL, see file COPYING for more details. This is the logo of the GUI utility. Last modification: Sat Jul 24 14:30:37 CEST 1999 Modified by Pavel Janík ml. */ static char *Invert_xpm[] = { "20 18 4 1", "* c #000000", " c None", "b c #dfdfdf", ". c #ffffff", " ", " ******** ", " *......** ", " *......*.* ", " *......**** ", " *.........* ", " *.........* ", " *********** ", " *********** ", " *********** ", " *********** ", " *********** ", " *********** ", " *********** ", " ", " ", " ", " " }; gnokii-0.6.31/xgnokii/xpm/Edit_flip_vertical.xpm0000644000175000017500000000110411666163120017771 0ustar leoleo/* XPM */ static char * Edit_flip_vertical_xpm[] = { "20 19 4 1", " c None", ". c #000000", "+ c #5ACA62", "@ c #35773A", " ", " ", " .. ", " .+.. ", " .+++.. ", " .+++++.. ", " .+++++++.. ", " .@@@@@@@@@. ", " ............ ", " ", " ............ ", " . . ", " . .. ", " . .. ", " . .. ", " . .. ", " .. ", " ", " "}; gnokii-0.6.31/xgnokii/xpm/Forward.xpm0000644000175000017500000000067511666163120015621 0ustar leoleo/* XPM */ static char *Forward_xpm[]={ "16 16 5 1", "c c #ffa858", "a c #c3c3c3", "b c #000000", ". c None", "# c #ff0000", ".####a..........", ".#.aaa..........", ".###..a......a..", ".#aa..a.b...aa..", ".#a....abb.aa...", ".#a....ab#ba....", ".a......b##b....", "bbbbbbbbb###b...", "#############b..", "bbbbbbbbb###bc..", ".cccccccb##bc...", "........b#bc....", "........bbc.....", "........bc......", "........c.......", "................"}; gnokii-0.6.31/xgnokii/xpm/Caller_logo.xpm0000644000175000017500000000121011666163120016421 0ustar leoleo/* XPM */ static char * Caller_logo_xpm[] = { "20 19 9 1", " c None", ". c #000000", "+ c #808080", "@ c #FFFFFF", "# c #00FF00", "$ c #008000", "% c #0B256B", "& c #D4D0C8", "* c #86000A", " ", " ", " . ", " . ", " .... .....+ ", " .++++. ...... ", " .............@+ ", " .#$$.....+.++%+ ", " . $$....+@+@@@+ ", " .......+@%+@@@+ ", " ......@@@@++@+ ", " ......@@@@+&.+ ", " ......+...+@++ ", " ......@@+.***** ", " ......%++%**++ ", " ......%%%%+ ", " .... ", " ", " "}; gnokii-0.6.31/xgnokii/xgnokii_speed.c0000644000175000017500000004551711666163120015663 0ustar leoleo/* $Id$ X G N O K I I A Linux/Unix GUI for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999 Pavel Janik ml., Hugh Blemings & 1999-2005 Jan Derfinak Copyright (C) 2002-2003 Pawel Kot Copyright (C) 2002 BORBELY Zoltan, Markus Plail */ #include "config.h" #include #include #include #include #include "xgnokii_contacts.h" #include "xgnokii.h" #include "xgnokii_lowlevel.h" #include "xgnokii_common.h" #include "xgnokii_speed.h" #include "xpm/Read.xpm" #include "xpm/Send.xpm" #include "xpm/Open.xpm" #include "xpm/Save.xpm" #include "xpm/Edit.xpm" #include "xpm/quest.xpm" static GtkWidget *GUI_SpeedDialWindow; static ErrorDialog errorDialog = { NULL, NULL }; static InfoDialog infoDialog = { NULL, NULL }; static ExportDialogData exportDialogData = { NULL }; static GtkWidget *clist; static QuestMark questMark; static gint selectedKey; static bool speedDialInitialized; static void CloseSpeedDial(GtkWidget * w, gpointer data) { gtk_widget_hide(GUI_SpeedDialWindow); } static inline void DestroyCListData(gpointer data) { if (data) g_free((D_SpeedDial *) data); } static void DeleteSelectContactDialog(GtkWidget * widget, GdkEvent * event, SelectContactData * data) { gtk_widget_destroy(GTK_WIDGET(data->clist)); gtk_widget_destroy(GTK_WIDGET(data->clistScrolledWindow)); gtk_widget_destroy(GTK_WIDGET(widget)); } static void CancelSelectContactDialog(GtkWidget * widget, SelectContactData * data) { gtk_widget_destroy(GTK_WIDGET(data->clist)); gtk_widget_destroy(GTK_WIDGET(data->clistScrolledWindow)); gtk_widget_destroy(GTK_WIDGET(data->dialog)); } static void OkSelectContactDialog(GtkWidget * widget, SelectContactData * data) { GList *sel; PhonebookEntry *pbEntry; gchar *key; if ((sel = GTK_CLIST(data->clist)->selection) != NULL) { D_SpeedDial *d = (D_SpeedDial *) g_malloc(sizeof(D_SpeedDial)); gtk_clist_freeze(GTK_CLIST(clist)); pbEntry = gtk_clist_get_row_data(GTK_CLIST(data->clist), GPOINTER_TO_INT(sel->data)); gtk_clist_get_text(GTK_CLIST(clist), selectedKey, 0, &key); gtk_clist_set_text(GTK_CLIST(clist), selectedKey, 1, pbEntry->entry.name); gtk_clist_set_text(GTK_CLIST(clist), selectedKey, 2, pbEntry->entry.number); d->entry.number = *key - '0'; d->entry.memory_type = pbEntry->entry.memory_type + 2; d->entry.location = pbEntry->entry.location; gtk_clist_set_row_data_full(GTK_CLIST(clist), selectedKey, (gpointer) d, DestroyCListData); gtk_clist_sort(GTK_CLIST(clist)); gtk_clist_thaw(GTK_CLIST(clist)); } gtk_widget_destroy(GTK_WIDGET(data->clist)); gtk_widget_destroy(GTK_WIDGET(data->clistScrolledWindow)); gtk_widget_destroy(GTK_WIDGET(data->dialog)); } static void ShowSelectContactsDialog(void) { SelectContactData *r; if (!GUI_ContactsIsIntialized()) GUI_ReadContacts(); if ((r = GUI_SelectContactDialog()) == NULL) return; gtk_signal_connect(GTK_OBJECT(r->dialog), "delete_event", GTK_SIGNAL_FUNC(DeleteSelectContactDialog), (gpointer) r); gtk_signal_connect(GTK_OBJECT(r->okButton), "clicked", GTK_SIGNAL_FUNC(OkSelectContactDialog), (gpointer) r); gtk_signal_connect(GTK_OBJECT(r->cancelButton), "clicked", GTK_SIGNAL_FUNC(CancelSelectContactDialog), (gpointer) r); } static inline void EditKey(void) { GList *sel; if ((sel = GTK_CLIST(clist)->selection) != NULL) { selectedKey = GPOINTER_TO_INT(sel->data); ShowSelectContactsDialog(); } } static inline void ClickEntry(GtkWidget * clist, gint row, gint column, GdkEventButton * event, gpointer data) { if (event && event->type == GDK_2BUTTON_PRESS) { selectedKey = row; ShowSelectContactsDialog(); } } static void ReadSpeedDial(void) { PhonebookEntry *pbEntry; D_SpeedDial *d; PhoneEvent *e; gchar *row[3]; gchar buf[2] = " "; gint location; register gint i, row_i = 0; if (!GUI_ContactsIsIntialized()) GUI_ReadContacts(); gtk_label_set_text(GTK_LABEL(infoDialog.text), _("Reading data ...")); gtk_widget_show_now(infoDialog.dialog); GUI_Refresh(); gtk_clist_freeze(GTK_CLIST(clist)); gtk_clist_clear(GTK_CLIST(clist)); for (i = 2; i < 10; i++) { if ((d = (D_SpeedDial *) g_malloc(sizeof(D_SpeedDial))) == NULL) { g_print(_("Error: %s: line %d: Can't allocate memory!\n"), __FILE__, __LINE__); return; } memset(d, 0, sizeof(D_SpeedDial)); d->entry.number = i; if ((e = (PhoneEvent *) g_malloc(sizeof(PhoneEvent))) == NULL) { g_print(_("Error: %s: line %d: Can't allocate memory!\n"), __FILE__, __LINE__); g_free(d); return; } e->event = Event_GetSpeedDial; e->data = d; GUI_InsertEvent(e); pthread_mutex_lock(&speedDialMutex); pthread_cond_wait(&speedDialCond, &speedDialMutex); pthread_mutex_unlock(&speedDialMutex); if (d->status != GN_ERR_NONE) { g_print(_("Cannot read speed dial key %d!\n"), i); *buf = i + '0'; row[0] = buf; row[1] = '\0'; row[2] = '\0'; } else { if (d->entry.location == 0) location = i; else location = d->entry.location; if ((pbEntry = GUI_GetEntry(d->entry.memory_type, location)) == NULL) { g_free(d); continue; } *buf = i + '0'; row[0] = buf; row[1] = pbEntry->entry.name; row[2] = pbEntry->entry.number; } gtk_clist_append(GTK_CLIST(clist), row); gtk_clist_set_row_data_full(GTK_CLIST(clist), row_i++, (gpointer) d, DestroyCListData); /* GUI_Refresh (); */ } gtk_widget_hide(infoDialog.dialog); gtk_clist_sort(GTK_CLIST(clist)); gtk_clist_thaw(GTK_CLIST(clist)); speedDialInitialized = TRUE; } static void SaveSpeedDial(void) { //gchar buf[80]; D_SpeedDial *d; PhoneEvent *e; register gint i; if (speedDialInitialized) { for (i = 1; i < 10; i++) { if ((d = (D_SpeedDial *) gtk_clist_get_row_data(GTK_CLIST(clist), i - 1))) { gn_log_xdebug("location: %i\n", d->entry.location); if (d->entry.location == 0) continue; if ((e = (PhoneEvent *) g_malloc(sizeof(PhoneEvent))) == NULL) { g_print(_("Error: %s: line %d: Can't allocate memory!\n"), __FILE__, __LINE__); return; } e->event = Event_SendSpeedDial; e->data = d; GUI_InsertEvent(e); pthread_mutex_lock (&speedDialMutex); pthread_cond_wait (&speedDialCond, &speedDialMutex); pthread_mutex_unlock (&speedDialMutex); if (d->status != GN_ERR_NONE) { g_print(_("Error writing speed dial for key %d!\n"), d->entry.number); /* gtk_label_set_text (GTK_LABEL (errorDialog.text), buf); gtk_widget_show (errorDialog.dialog); */ } /* GUI_Refresh (); */ } } } } static bool ParseLine(D_SpeedDial * d, gchar * buf) { gchar **strings = g_strsplit(buf, ";", 3); d->entry.number = *strings[0] - '0'; if (d->entry.number < 1 || d->entry.number > 9) { g_strfreev(strings); return FALSE; } d->entry.memory_type = *strings[1] - '0'; if (d->entry.memory_type < 2 || d->entry.memory_type > 3) { g_strfreev(strings); return FALSE; } d->entry.location = atoi(strings[2]); if (d->entry.location == INT_MAX || d->entry.location < 0) { g_strfreev(strings); return FALSE; } g_strfreev(strings); return TRUE; } static void OkImportDialog(GtkWidget * w, GtkFileSelection * fs) { FILE *f; D_SpeedDial *d; PhonebookEntry *pbEntry; gchar buf[IO_BUF_LEN]; gchar *row[3]; gchar *fileName; gint location; register gint i, row_i = 0; fileName = (gchar *) gtk_file_selection_get_filename(GTK_FILE_SELECTION(fs)); gtk_widget_hide(GTK_WIDGET(fs)); if ((f = fopen(fileName, "r")) == NULL) { g_snprintf(buf, IO_BUF_LEN, _("Can't open file %s for reading!\n"), fileName); gtk_label_set_text(GTK_LABEL(errorDialog.text), buf); gtk_widget_show(errorDialog.dialog); return; } if (!GUI_ContactsIsIntialized()) GUI_ReadContacts(); gtk_clist_freeze(GTK_CLIST(clist)); gtk_clist_clear(GTK_CLIST(clist)); speedDialInitialized = FALSE; i = 0; while (fgets(buf, IO_BUF_LEN, f) && i++ < 9) { if ((d = (D_SpeedDial *) g_malloc(sizeof(D_SpeedDial))) == NULL) { g_print(_("Error: %s: line %d: Can't allocate memory!\n"), __FILE__, __LINE__); gtk_clist_clear(GTK_CLIST(clist)); gtk_clist_sort(GTK_CLIST(clist)); gtk_clist_thaw(GTK_CLIST(clist)); return; } if (ParseLine(d, buf)) { if (d->entry.number != i) { g_free(d); gtk_clist_clear(GTK_CLIST(clist)); gtk_label_set_text(GTK_LABEL(errorDialog.text), _("Error reading file!")); gtk_widget_show(errorDialog.dialog); gtk_clist_sort(GTK_CLIST(clist)); gtk_clist_thaw(GTK_CLIST(clist)); return; } if (d->entry.location == 0) location = i; else location = d->entry.location; if ((pbEntry = GUI_GetEntry(d->entry.memory_type - 2, location)) == NULL) { g_free(d); continue; } *buf = i + '0'; *(buf + 1) = '\0'; row[0] = buf; row[1] = pbEntry->entry.name; row[2] = pbEntry->entry.number; gtk_clist_append(GTK_CLIST(clist), row); gtk_clist_set_row_data_full(GTK_CLIST(clist), row_i++, (gpointer) d, DestroyCListData); } else { g_free(d); gtk_clist_clear(GTK_CLIST(clist)); gtk_label_set_text(GTK_LABEL(errorDialog.text), _("Error reading file!")); gtk_widget_show(errorDialog.dialog); gtk_clist_sort(GTK_CLIST(clist)); gtk_clist_thaw(GTK_CLIST(clist)); return; } } gtk_clist_sort(GTK_CLIST(clist)); gtk_clist_thaw(GTK_CLIST(clist)); speedDialInitialized = TRUE; } static void ImportSpeedDial(void) { static GtkWidget *fileDialog = NULL; if (fileDialog == NULL) { fileDialog = gtk_file_selection_new(_("Import from file")); gtk_signal_connect(GTK_OBJECT(fileDialog), "delete_event", GTK_SIGNAL_FUNC(DeleteEvent), NULL); gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(fileDialog)->ok_button), "clicked", GTK_SIGNAL_FUNC(OkImportDialog), (gpointer) fileDialog); gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(fileDialog)->cancel_button), "clicked", GTK_SIGNAL_FUNC(CancelDialog), (gpointer) fileDialog); } gtk_widget_show(fileDialog); } static void ExportSpeedDialMain(gchar * name) { FILE *f; D_SpeedDial *d; gchar buf[IO_BUF_LEN]; register gint i; if ((f = fopen(name, "w")) == NULL) { g_snprintf(buf, IO_BUF_LEN, _("Can't open file %s for writing!\n"), name); gtk_label_set_text(GTK_LABEL(errorDialog.text), buf); gtk_widget_show(errorDialog.dialog); return; } for (i = 1; i < 10; i++) { if ((d = (D_SpeedDial *) gtk_clist_get_row_data(GTK_CLIST(clist), i - 1))) { snprintf(buf, sizeof(buf), "%d;%d;%d;", d->entry.number, d->entry.memory_type, d->entry.location); fprintf(f, "%s\n", buf); } } fclose(f); } static void YesExportDialog(GtkWidget * w, gpointer data) { gtk_widget_hide(GTK_WIDGET(data)); ExportSpeedDialMain(exportDialogData.fileName); } static void OkExportDialog(GtkWidget * w, GtkFileSelection * fs) { static YesNoDialog dialog = { NULL, NULL }; FILE *f; gchar err[255]; exportDialogData.fileName = (gchar *) gtk_file_selection_get_filename(GTK_FILE_SELECTION(fs)); gtk_widget_hide(GTK_WIDGET(fs)); if ((f = fopen(exportDialogData.fileName, "r")) != NULL) { fclose(f); if (dialog.dialog == NULL) { CreateYesNoDialog(&dialog, (GtkSignalFunc) YesExportDialog, (GtkSignalFunc) CancelDialog, GUI_SpeedDialWindow); gtk_window_set_title(GTK_WINDOW(dialog.dialog), _("Overwrite file?")); g_snprintf(err, 255, _("File %s already exists.\nOverwrite?"), exportDialogData.fileName); gtk_label_set_text(GTK_LABEL(dialog.text), err); } gtk_widget_show(dialog.dialog); } else ExportSpeedDialMain(exportDialogData.fileName); } static void ExportSpeedDial(void) { static GtkWidget *fileDialog = NULL; if (speedDialInitialized) { if (fileDialog == NULL) { fileDialog = gtk_file_selection_new(_("Export to file")); gtk_signal_connect(GTK_OBJECT(fileDialog), "delete_event", GTK_SIGNAL_FUNC(DeleteEvent), NULL); gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(fileDialog)->ok_button), "clicked", GTK_SIGNAL_FUNC(OkExportDialog), (gpointer) fileDialog); gtk_signal_connect(GTK_OBJECT (GTK_FILE_SELECTION(fileDialog)->cancel_button), "clicked", GTK_SIGNAL_FUNC(CancelDialog), (gpointer) fileDialog); } gtk_widget_show(fileDialog); } } inline void GUI_ShowSpeedDial(void) { ReadSpeedDial(); gtk_window_present(GTK_WINDOW(GUI_SpeedDialWindow)); } static GtkItemFactoryEntry menu_items[] = { {NULL, NULL, NULL, 0, ""}, {NULL, "R", ReadSpeedDial, 0, NULL}, {NULL, "S", SaveSpeedDial, 0, NULL}, {NULL, NULL, NULL, 0, ""}, {NULL, "I", ImportSpeedDial, 0, NULL}, {NULL, "E", ExportSpeedDial, 0, NULL}, {NULL, NULL, NULL, 0, ""}, {NULL, "W", CloseSpeedDial, 0, NULL}, {NULL, NULL, NULL, 0, ""}, {NULL, NULL, EditKey, 0, NULL}, {NULL, NULL, NULL, 0, ""}, {NULL, NULL, GUI_ShowAbout, 0, NULL}, }; static void InitMainMenu(void) { menu_items[0].path = _("/_File"); menu_items[1].path = _("/File/_Read from phone"); menu_items[2].path = _("/File/_Save to phone"); menu_items[3].path = _("/File/Sep1"); menu_items[4].path = _("/File/_Import from file"); menu_items[5].path = _("/File/_Export to file"); menu_items[6].path = _("/File/Sep2"); menu_items[7].path = _("/File/_Close"); menu_items[8].path = _("/_Edit"); menu_items[9].path = _("/Edit/_Edit"); menu_items[10].path = _("/_Help"); menu_items[11].path = _("/Help/_About"); } void GUI_CreateSpeedDialWindow(void) { int nmenu_items = sizeof(menu_items) / sizeof(menu_items[0]); GtkItemFactory *item_factory; GtkAccelGroup *accel_group; SortColumn *sColumn; GtkWidget *menubar; GtkWidget *main_vbox; GtkWidget *toolbar; GtkWidget *clistScrolledWindow; register gint i; gchar *titles[3] = { _("Key"), _("Name"), _("Number") }; InitMainMenu(); GUI_SpeedDialWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_wmclass(GTK_WINDOW(GUI_SpeedDialWindow), "SpeedDialWindow", "Xgnokii"); gtk_window_set_title(GTK_WINDOW(GUI_SpeedDialWindow), _("Speed Dial")); gtk_widget_set_usize(GTK_WIDGET(GUI_SpeedDialWindow), 350, 220); //gtk_container_set_border_width (GTK_CONTAINER (GUI_SpeedDialWindow), 10); gtk_signal_connect(GTK_OBJECT(GUI_SpeedDialWindow), "delete_event", GTK_SIGNAL_FUNC(DeleteEvent), NULL); gtk_widget_realize(GUI_SpeedDialWindow); accel_group = gtk_accel_group_new(); item_factory = gtk_item_factory_new(GTK_TYPE_MENU_BAR, "
", accel_group); gtk_item_factory_create_items(item_factory, nmenu_items, menu_items, NULL); gtk_window_add_accel_group(GTK_WINDOW(GUI_SpeedDialWindow), accel_group); /* Finally, return the actual menu bar created by the item factory. */ menubar = gtk_item_factory_get_widget(item_factory, "
"); main_vbox = gtk_vbox_new(FALSE, 1); gtk_container_border_width(GTK_CONTAINER(main_vbox), 1); gtk_container_add(GTK_CONTAINER(GUI_SpeedDialWindow), main_vbox); gtk_widget_show(main_vbox); gtk_box_pack_start(GTK_BOX(main_vbox), menubar, FALSE, FALSE, 0); gtk_widget_show(menubar); /* Create the toolbar */ toolbar = gtk_toolbar_new(); gtk_toolbar_set_style(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_ICONS); gtk_toolbar_set_orientation(GTK_TOOLBAR(toolbar), GTK_ORIENTATION_HORIZONTAL); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL, _("Read from phone"), NULL, NewPixmap(Read_xpm, GUI_SpeedDialWindow->window, &GUI_SpeedDialWindow->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc) ReadSpeedDial, NULL); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL, _("Save to phone"), NULL, NewPixmap(Send_xpm, GUI_SpeedDialWindow->window, &GUI_SpeedDialWindow->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc) SaveSpeedDial, NULL); gtk_toolbar_append_space(GTK_TOOLBAR(toolbar)); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL, _("Import from file"), NULL, NewPixmap(Open_xpm, GUI_SpeedDialWindow->window, &GUI_SpeedDialWindow->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc) ImportSpeedDial, NULL); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL, _("Export to file"), NULL, NewPixmap(Save_xpm, GUI_SpeedDialWindow->window, &GUI_SpeedDialWindow->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc) ExportSpeedDial, NULL); gtk_toolbar_append_space(GTK_TOOLBAR(toolbar)); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL, _("Edit entry"), NULL, NewPixmap(Edit_xpm, GUI_SpeedDialWindow->window, &GUI_SpeedDialWindow->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc) EditKey, NULL); gtk_box_pack_start(GTK_BOX(main_vbox), toolbar, FALSE, FALSE, 0); gtk_widget_show(toolbar); clist = gtk_clist_new_with_titles(3, titles); gtk_clist_set_shadow_type(GTK_CLIST(clist), GTK_SHADOW_OUT); // gtk_clist_set_compare_func (GTK_CLIST (clist), CListCompareFunc); gtk_clist_set_sort_column(GTK_CLIST(clist), 0); gtk_clist_set_sort_type(GTK_CLIST(clist), GTK_SORT_ASCENDING); gtk_clist_set_auto_sort(GTK_CLIST(clist), FALSE); //gtk_clist_set_selection_mode (GTK_CLIST (clist), GTK_SELECTION_EXTENDED); gtk_clist_set_column_width(GTK_CLIST(clist), 1, 150); gtk_clist_set_column_width(GTK_CLIST(clist), 2, 115); gtk_clist_set_column_justification(GTK_CLIST(clist), 0, GTK_JUSTIFY_CENTER); // gtk_clist_set_column_visibility (GTK_CLIST (clist), 3, xgnokiiConfig.callerGroupsSupported); for (i = 0; i < 3; i++) { if ((sColumn = g_malloc(sizeof(SortColumn))) == NULL) { g_print(_("Error: %s: line %d: Can't allocate memory!\n"), __FILE__, __LINE__); gtk_main_quit(); } sColumn->clist = clist; sColumn->column = i; gtk_signal_connect(GTK_OBJECT(GTK_CLIST(clist)->column[i].button), "clicked", GTK_SIGNAL_FUNC(SetSortColumn), (gpointer) sColumn); } gtk_signal_connect(GTK_OBJECT(clist), "select_row", GTK_SIGNAL_FUNC(ClickEntry), NULL); clistScrolledWindow = gtk_scrolled_window_new(NULL, NULL); gtk_container_add(GTK_CONTAINER(clistScrolledWindow), clist); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(clistScrolledWindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_box_pack_start(GTK_BOX(main_vbox), clistScrolledWindow, TRUE, TRUE, 0); gtk_widget_show(clist); gtk_widget_show(clistScrolledWindow); questMark.pixmap = gdk_pixmap_create_from_xpm_d(GUI_SpeedDialWindow->window, &questMark.mask, &GUI_SpeedDialWindow->style-> bg[GTK_STATE_NORMAL], quest_xpm); CreateErrorDialog(&errorDialog, GUI_SpeedDialWindow); CreateInfoDialog(&infoDialog, GUI_SpeedDialWindow); speedDialInitialized = FALSE; } gnokii-0.6.31/xgnokii/xgnokii_data.h0000644000175000017500000000174511666163120015474 0ustar leoleo/* $Id$ X G N O K I I A Linux/Unix GUI for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999 Pavel Janík ml., Hugh Blemings & 1999-2005 Jan Derfinak. */ #ifndef XGNOKII_DATA_H #define XGNOKII_DATA_H extern void GUI_CreateDataWindow(void); extern void GUI_ShowData(void); #endif gnokii-0.6.31/xgnokii/xgnokii.c0000644000175000017500000022534711666163120014504 0ustar leoleo/* $Id$ X G N O K I I A Linux/Unix GUI for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999 Pavel Janik ml., Hugh Blemings Copyright (C) 1999-2005 Jan Derfinak Copyright (C) 2001-2004 Pawel Kot Copyright (C) 2001 Chris Kemp, Marian Jancar Copyright (C) 2002 Markus Plail Copyright (C) 2003-2004 BORBELY Zoltan */ #include "config.h" #ifdef HAVE_ASPRINTF # ifndef _GNU_SOURCE # define _GNU_SOURCE 1 # endif # include #endif #include #include #include "compat.h" #include "misc.h" #include /* for getenv */ #include #include #include /* for time */ #include #ifdef HAVE_SYS_STAT_H # include #endif #ifndef WIN32 # include #else # include # undef IN # undef OUT #endif #include "gnokii.h" #include "xgnokii.h" #include "xgnokii_common.h" #include "xgnokii_lowlevel.h" #include "xgnokii_contacts.h" #include "xgnokii_sms.h" #include "xgnokii_netmon.h" #include "xgnokii_dtmf.h" #include "xgnokii_speed.h" #include "xgnokii_xkeyb.h" #include "xgnokii_calendar.h" #include "xgnokii_logos.h" #include "xgnokii_xring.h" #include "xgnokii_cfg.h" #include "xgnokii_data.h" #include "xpm/logo.xpm" #include "xpm/background.xpm" #include "xpm/sms.xpm" #include "xpm/alarm.xpm" /* Widgets for dialogs. */ static GtkWidget *SplashWindow; static GtkWidget *GUI_MainWindow; static GtkWidget *AboutDialog; static ErrorDialog errorDialog = { NULL, NULL }; static InfoDialog infoDialog = { NULL, NULL }; static GtkWidget *OptionsDialog; static bool optionsDialogIsOpened; /* SMS sets list */ static GtkWidget *SMSClist; /* Pixmap used for drawing all the stuff. */ static GdkPixmap *Pixmap = NULL; /* Pixmap used for background. */ static GdkPixmap *BackgroundPixmap = NULL; /* Pixmap used for SMS picture. */ static GdkPixmap *SMSPixmap = NULL; /* Pixmap used for alarm picture. */ static GdkPixmap *AlarmPixmap = NULL; /* Widget for popup menu */ static GtkWidget *Menu; static GtkWidget *netmon_menu_item; static GtkWidget *sms_menu_item; static GtkWidget *calendar_menu_item; static GtkWidget *logos_menu_item; static GtkWidget *dtmf_menu_item; static GtkWidget *speedDial_menu_item; static GtkWidget *xkeyb_menu_item; static GtkWidget *xring_menu_item; static GtkWidget *cg_names_option_frame; static GtkWidget *sms_option_frame; static GtkWidget *mail_option_frame; static GtkWidget *user_option_frame; static GtkWidget *data_menu_item; /* Hold main configuration data for xgnokii */ XgnokiiConfig xgnokiiConfig; gint max_phonebook_name_length; gint max_phonebook_number_length; gint max_phonebook_sim_name_length; gint max_phonebook_sim_number_length; char folders[GN_SMS_FOLDER_MAX_NUMBER][GN_SMS_MESSAGE_MAX_NUMBER]; gint foldercount = 0, lastfoldercount = 0; /* Local variables */ static char *DefaultXGnokiiDir = PREFIX "/share/xgnokii"; static bool SMSSettingsInitialized = FALSE; static bool CallersGroupsInitialized = FALSE; static gint hiddenCallDialog; static guint splashRemoveHandler; static struct CallDialog { GtkWidget *dialog; GtkWidget *label; } inCallDialog; typedef struct { GtkWidget *alarmSwitch; GtkWidget *alarmHour; GtkWidget *alarmMin; } AlarmWidgets; typedef struct { GtkWidget *port; GtkWidget *model; GtkWidget *init; GtkWidget *bindir; GtkWidget *serial, *infrared, *irda; } ConnectionWidgets; typedef struct { GtkWidget *model; GtkWidget *version; GtkWidget *revision; GtkWidget *imei; GtkWidget *simNameLen; GtkWidget *phoneNameLen; } PhoneWidgets; typedef struct { GtkWidget *set; GtkWidget *number; GtkWidget *format; GtkWidget *validity; gn_sms_message_center smsSetting[MAX_SMS_CENTER]; } SMSWidgets; typedef struct { GtkWidget *name; GtkWidget *title; GtkWidget *company; GtkWidget *telephone; GtkWidget *fax; GtkWidget *email; GtkWidget *address; GtkWidget *status; gint max; gint used; } UserWidget; static struct ConfigDialogData { ConnectionWidgets connection; PhoneWidgets phone; GtkWidget *groups[GN_PHONEBOOK_CALLER_GROUPS_MAX_NUMBER]; AlarmWidgets alarm; SMSWidgets sms; UserWidget user; GtkWidget *mailbox; } configDialogData; static gn_sms_message_center tempMessageSettings; void GUI_InitCallerGroupsInf(void) { D_CallerGroup *cg; PhoneEvent *e; register gint i; if (CallersGroupsInitialized) return; gtk_label_set_text(GTK_LABEL(infoDialog.text), _("Reading caller groups names ...")); gtk_widget_show_now(infoDialog.dialog); GUI_Refresh(); xgnokiiConfig.callerGroups[0] = g_strndup(_("Family"), MAX_CALLER_GROUP_LENGTH); xgnokiiConfig.callerGroups[1] = g_strndup(_("VIP"), MAX_CALLER_GROUP_LENGTH); xgnokiiConfig.callerGroups[2] = g_strndup(_("Friends"), MAX_CALLER_GROUP_LENGTH); xgnokiiConfig.callerGroups[3] = g_strndup(_("Colleagues"), MAX_CALLER_GROUP_LENGTH); xgnokiiConfig.callerGroups[4] = g_strndup(_("Other"), MAX_CALLER_GROUP_LENGTH); xgnokiiConfig.callerGroups[5] = g_strndup(_("No group"), MAX_CALLER_GROUP_LENGTH); if (phoneMonitor.supported & PM_CALLERGROUP) { for (i = 0; i < GN_PHONEBOOK_CALLER_GROUPS_MAX_NUMBER; i++) { cg = (D_CallerGroup *) g_malloc(sizeof(D_CallerGroup)); cg->number = i; e = (PhoneEvent *) g_malloc(sizeof(PhoneEvent)); e->event = Event_GetCallerGroup; e->data = cg; GUI_InsertEvent(e); pthread_mutex_lock(&callerGroupMutex); pthread_cond_wait(&callerGroupCond, &callerGroupMutex); pthread_mutex_unlock(&callerGroupMutex); if (*cg->text != '\0' && cg->status == GN_ERR_NONE) { g_free(xgnokiiConfig.callerGroups[i]); xgnokiiConfig.callerGroups[i] = g_strndup(cg->text, MAX_CALLER_GROUP_LENGTH); } g_free(cg); } } CallersGroupsInitialized = TRUE; gtk_widget_hide(infoDialog.dialog); GUIEventSend(GUI_EVENT_CALLERS_GROUPS_CHANGED); } static inline void DrawBackground(GtkWidget * data) { gdk_draw_pixmap(Pixmap, GTK_WIDGET(data)->style->fg_gc[GTK_STATE_NORMAL], BackgroundPixmap, 0, 0, 0, 0, 261, 96); } int network_levels[] = { 152, 69, 11, 3, 138, 69, 11, 3, 124, 69, 11, 4, 110, 69, 11, 6 }; static inline void DrawNetwork(GtkWidget * data, int rflevel) { int i; if (rflevel > 100) rflevel = 100; for (i = 0; (i * 25) <= rflevel; i++) { float percent = ((float) rflevel - i * 25) / 25; if (percent > 1) percent = 1; gdk_draw_rectangle(Pixmap, GTK_WIDGET(data)->style->white_gc, TRUE, network_levels[4 * i] + network_levels[4 * i + 2] * (1 - percent), network_levels[4 * i + 1], network_levels[4 * i + 2] * percent, network_levels[4 * i + 3]); } } int battery_levels[] = { 50, 69, 11, 3, 64, 69, 11, 3, 78, 69, 11, 4, 92, 69, 11, 6 }; static inline void DrawBattery(GtkWidget * data, int batterylevel) { int i; if (batterylevel < 0) return; if (batterylevel > 100) batterylevel = 100; for (i = 0; (i * 25) <= batterylevel; i++) { float percent = ((float) batterylevel - i * 25) / 25; if (percent > 1) percent = 1; gdk_draw_rectangle(Pixmap, GTK_WIDGET(data)->style->white_gc, TRUE, battery_levels[4 * i], battery_levels[4 * i + 1], battery_levels[4 * i + 2] * percent, battery_levels[4 * i + 3]); } } static inline void DrawSMS(GtkWidget * data) { gdk_draw_pixmap(Pixmap, GTK_WIDGET(data)->style->fg_gc[GTK_STATE_NORMAL], SMSPixmap, 0, 0, 25, 47, 26, 7); } static inline void DrawAlarm(GtkWidget * data) { gdk_draw_pixmap(Pixmap, GTK_WIDGET(data)->style->fg_gc[GTK_STATE_NORMAL], AlarmPixmap, 0, 0, 163, 11, 9, 9); } static inline void DrawText(GtkWidget * data, int at, char *text) { static GdkFont *Font; Font = gdk_font_load("-misc-fixed-medium-r-*-*-*-90-*-*-*-*-iso8859-*"); gdk_draw_string(Pixmap, Font, GTK_WIDGET(data)->style->fg_gc[GTK_STATE_NORMAL], 33, at, text); } static inline void DrawSMSReceived(GtkWidget * data) { DrawText(data, 25, _("Short Message received")); } static inline void DrawWorking(GtkWidget * data) { DrawText(data, 40, _("Working...")); } static inline void HideCallDialog(GtkWidget * widget, gpointer data) { hiddenCallDialog = 1; gtk_widget_hide(GTK_WIDGET(data)); } static void CreateInCallDialog(void) { GtkWidget *button, *hbox; inCallDialog.dialog = gtk_dialog_new(); gtk_window_position(GTK_WINDOW(inCallDialog.dialog), GTK_WIN_POS_MOUSE); gtk_window_set_title(GTK_WINDOW(inCallDialog.dialog), _("Call in progress")); gtk_container_set_border_width(GTK_CONTAINER(inCallDialog.dialog), 5); gtk_signal_connect(GTK_OBJECT(inCallDialog.dialog), "delete_event", GTK_SIGNAL_FUNC(DeleteEvent), NULL); hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(inCallDialog.dialog)->vbox), hbox, FALSE, FALSE, 5); gtk_widget_show(hbox); inCallDialog.label = gtk_label_new(""); gtk_box_pack_start(GTK_BOX(hbox), inCallDialog.label, FALSE, FALSE, 0); gtk_widget_show(inCallDialog.label); button = gtk_button_new_with_label(_("Hide")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(inCallDialog.dialog)->action_area), button, TRUE, FALSE, 0); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(HideCallDialog), (gpointer) inCallDialog.dialog); GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); gtk_widget_grab_default(button); gtk_widget_show(button); } static gint Update(gpointer data) { static gchar lastCallNum[20] = ""; static gchar callBuf[80]; static gchar timeBuf[10]; static struct tm stm; static gint callTimerStart = 0; gint callTimer = 0; time_t t; static gchar *name; static bool outgoing = TRUE; /* The number of SMS messages before second */ static int smsold = 0; /* The number of second for we should display "Short Message Received" message */ static int smsreceived = -1; DrawBackground(data); DrawNetwork(data, phoneMonitor.rfLevel); DrawBattery(data, phoneMonitor.batteryLevel); if (phoneMonitor.alarm) DrawAlarm(data); if (phoneMonitor.working) DrawText(data, 25, phoneMonitor.working); pthread_mutex_lock(&smsMutex); if (phoneMonitor.sms.unRead > 0) { DrawSMS(data); if (phoneMonitor.sms.unRead > smsold && smsold != -1) smsreceived = 10; /* The message "Short Message Received" is displayed for 10s */ } if (phoneMonitor.sms.changed) GUIEventSend(GUI_EVENT_SMS_NUMBER_CHANGED); phoneMonitor.sms.changed = 0; smsold = phoneMonitor.sms.unRead; pthread_mutex_unlock(&smsMutex); if (smsreceived >= 0) { DrawSMSReceived(data); smsreceived--; } pthread_mutex_lock(&callMutex); if (phoneMonitor.call.callInProgress != CS_Idle) { if (phoneMonitor.call.callInProgress == CS_InProgress) { if (!callTimerStart) callTimerStart = callTimer = time(NULL); else callTimer = time(NULL); } if (phoneMonitor.call.callInProgress == CS_Waiting) { outgoing = FALSE; if (*phoneMonitor.call.callNum == '\0') name = _("anonymous"); else if (strncmp(phoneMonitor.call.callNum, lastCallNum, 20)) { strncpy(lastCallNum, phoneMonitor.call.callNum, 20); lastCallNum[19] = '\0'; name = GUI_GetName(phoneMonitor.call.callNum); if (!name) name = phoneMonitor.call.callNum; } } t = (time_t) difftime(callTimer, callTimerStart); (void) gmtime_r(&t, &stm); strftime(timeBuf, 10, "%T", &stm); if (outgoing) g_snprintf(callBuf, 80, _("Outgoing call in progress:\nTime: %s"), timeBuf); else g_snprintf(callBuf, 80, _("Incoming call from: %s\nTime: %s"), name, timeBuf); gtk_label_set_text(GTK_LABEL(inCallDialog.label), callBuf); if (!GTK_WIDGET_VISIBLE(inCallDialog.dialog) && !hiddenCallDialog) gtk_widget_show(inCallDialog.dialog); } else { callTimerStart = callTimer = 0; *lastCallNum = '\0'; outgoing = TRUE; if (GTK_WIDGET_VISIBLE(inCallDialog.dialog)) gtk_widget_hide(inCallDialog.dialog); hiddenCallDialog = 0; } pthread_mutex_unlock(&callMutex); gtk_widget_draw(data, NULL); GUIEventSend(GUI_EVENT_NETMON_CHANGED); return TRUE; } /* Redraw the screen from the backing pixmap */ static inline gint ExposeEvent(GtkWidget * widget, GdkEventExpose * event) { gdk_draw_pixmap(widget->window, widget->style->fg_gc[GTK_WIDGET_STATE(widget)], Pixmap, event->area.x, event->area.y, event->area.x, event->area.y, event->area.width, event->area.height); return FALSE; } static void ParseSMSCenters(void) { register gint i; register gint j; gtk_clist_freeze(GTK_CLIST(SMSClist)); gtk_clist_clear(GTK_CLIST(SMSClist)); for (i = 0; i < xgnokiiConfig.smsSets; i++) { gchar *row[4]; if (*(configDialogData.sms.smsSetting[i].name) == '\0') row[0] = g_strdup_printf(_("Set %d"), i + 1); else row[0] = g_strdup(configDialogData.sms.smsSetting[i].name); row[1] = g_strdup(configDialogData.sms.smsSetting[i].smsc.number); switch (configDialogData.sms.smsSetting[i].format) { case GN_SMS_MF_Text: row[2] = g_strdup(_("Text")); break; case GN_SMS_MF_Paging: row[2] = g_strdup(_("Paging")); break; case GN_SMS_MF_Fax: row[2] = g_strdup(_("Fax")); break; case GN_SMS_MF_Email: case GN_SMS_MF_UCI: row[2] = g_strdup(_("Email")); break; case GN_SMS_MF_ERMES: row[2] = g_strdup(_("ERMES")); break; case GN_SMS_MF_X400: row[2] = g_strdup(_("X.400")); break; case GN_SMS_MF_Voice: row[2] = g_strdup(_("Voice")); break; default: row[2] = g_strdup(_("Text")); break; } switch (configDialogData.sms.smsSetting[i].validity) { case GN_SMS_VP_1H: row[3] = g_strdup(_("1 hour")); break; case GN_SMS_VP_6H: row[3] = g_strdup(_("6 hours")); break; case GN_SMS_VP_24H: row[3] = g_strdup(_("24 hours")); break; case GN_SMS_VP_72H: row[3] = g_strdup(_("72 hours")); break; case GN_SMS_VP_1W: row[3] = g_strdup(_("1 week")); break; case GN_SMS_VP_Max: row[3] = g_strdup(_("Max. Time")); break; default: row[3] = g_strdup(_("24 hours")); break; } gtk_clist_append(GTK_CLIST(SMSClist), row); for (j = 0; j < 4; j++) g_free(row[j]); } gtk_clist_thaw(GTK_CLIST(SMSClist)); } static void RefreshUserStatus(void) { gchar buf[8]; configDialogData.user.used = GTK_ENTRY(configDialogData.user.name)->text_length + GTK_ENTRY(configDialogData.user.title)->text_length + GTK_ENTRY(configDialogData.user.company)->text_length + GTK_ENTRY(configDialogData.user.telephone)->text_length + GTK_ENTRY(configDialogData.user.fax)->text_length + GTK_ENTRY(configDialogData.user.email)->text_length + GTK_ENTRY(configDialogData.user.address)->text_length; configDialogData.user.max = MAX_BUSINESS_CARD_LENGTH; if (GTK_ENTRY(configDialogData.user.telephone)->text_length > 0) configDialogData.user.max -= 4; if (GTK_ENTRY(configDialogData.user.fax)->text_length > 0) configDialogData.user.max -= 4; g_snprintf(buf, 8, "%d/%d", configDialogData.user.used, configDialogData.user.max); gtk_label_set_text(GTK_LABEL(configDialogData.user.status), buf); } void GUI_InitSMSSettings(void) { PhoneEvent *e; D_SMSCenter *c; register gint i; if (SMSSettingsInitialized) return; gtk_label_set_text(GTK_LABEL(infoDialog.text), _("Reading SMS centers ...")); gtk_widget_show_now(infoDialog.dialog); GUI_Refresh(); for (i = 1; i <= MAX_SMS_CENTER; i++) { xgnokiiConfig.smsSetting[i - 1].id = i; c = (D_SMSCenter *) g_malloc(sizeof(D_SMSCenter)); c->center = &(xgnokiiConfig.smsSetting[i - 1]); e = (PhoneEvent *) g_malloc(sizeof(PhoneEvent)); e->event = Event_GetSMSCenter; e->data = c; GUI_InsertEvent(e); pthread_mutex_lock(&smsCenterMutex); pthread_cond_wait(&smsCenterCond, &smsCenterMutex); pthread_mutex_unlock(&smsCenterMutex); if (c->status != GN_ERR_NONE) break; g_free(c); configDialogData.sms.smsSetting[i - 1] = xgnokiiConfig.smsSetting[i - 1]; } xgnokiiConfig.smsSets = i - 1; ParseSMSCenters(); SMSSettingsInitialized = TRUE; gtk_widget_hide(infoDialog.dialog); } void GUI_ShowOptions(void) { PhoneEvent *e; D_Alarm *alarm; register gint i; if (optionsDialogIsOpened) { gtk_window_present(GTK_WINDOW(OptionsDialog)); return; } gtk_entry_set_text(GTK_ENTRY(configDialogData.connection.port), xgnokiiConfig.port); gtk_entry_set_text(GTK_ENTRY(configDialogData.connection.model), xgnokiiConfig.model); gtk_entry_set_text(GTK_ENTRY(configDialogData.connection.bindir), xgnokiiConfig.bindir); gtk_spin_button_set_value(GTK_SPIN_BUTTON(configDialogData.connection.init), (gdouble) xgnokiiConfig.initlength); if (xgnokiiConfig.connection == GN_CT_Irda) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configDialogData.connection.irda), TRUE); } else if (xgnokiiConfig.connection == GN_CT_Infrared || xgnokiiConfig.connection == GN_CT_Tekram) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (configDialogData.connection.infrared), TRUE); } else { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configDialogData.connection.serial), TRUE); } /* Phone */ gtk_entry_set_text(GTK_ENTRY(configDialogData.phone.model), phoneMonitor.phone.model); gtk_entry_set_text(GTK_ENTRY(configDialogData.phone.version), phoneMonitor.phone.product_name); gtk_entry_set_text(GTK_ENTRY(configDialogData.phone.revision), phoneMonitor.phone.revision); gtk_entry_set_text(GTK_ENTRY(configDialogData.phone.imei), phoneMonitor.phone.imei); gtk_spin_button_set_value(GTK_SPIN_BUTTON(configDialogData.phone.simNameLen), atof(xgnokiiConfig.maxSIMLen)); gtk_spin_button_set_value(GTK_SPIN_BUTTON(configDialogData.phone.phoneNameLen), atof(xgnokiiConfig.maxPhoneLen)); /* Alarm */ alarm = (D_Alarm *) g_malloc(sizeof(D_Alarm)); e = (PhoneEvent *) g_malloc(sizeof(PhoneEvent)); e->event = Event_GetAlarm; e->data = alarm; GUI_InsertEvent(e); pthread_mutex_lock(&alarmMutex); pthread_cond_wait(&alarmCond, &alarmMutex); pthread_mutex_unlock(&alarmMutex); if (alarm->status != GN_ERR_NONE) { xgnokiiConfig.alarmSupported = FALSE; gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configDialogData.alarm.alarmSwitch), FALSE); gtk_spin_button_set_value(GTK_SPIN_BUTTON(configDialogData.alarm.alarmHour), 0.0); gtk_spin_button_set_value(GTK_SPIN_BUTTON(configDialogData.alarm.alarmMin), 0.0); } else { xgnokiiConfig.alarmSupported = TRUE; if (alarm->alarm.enabled) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (configDialogData.alarm.alarmSwitch), TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (configDialogData.alarm.alarmSwitch), FALSE); gtk_spin_button_set_value(GTK_SPIN_BUTTON(configDialogData.alarm.alarmHour), alarm->alarm.timestamp.hour); gtk_spin_button_set_value(GTK_SPIN_BUTTON(configDialogData.alarm.alarmMin), alarm->alarm.timestamp.minute); } g_free(alarm); /* SMS */ if (phoneMonitor.supported & PM_SMS) { gtk_widget_show(sms_option_frame); GUI_InitSMSSettings(); } else gtk_widget_hide(sms_option_frame); /* BUSINESS CARD */ if (phoneMonitor.supported & PM_SMS) { gtk_widget_show(user_option_frame); gtk_entry_set_text(GTK_ENTRY(configDialogData.user.name), xgnokiiConfig.user.name); gtk_entry_set_text(GTK_ENTRY(configDialogData.user.title), xgnokiiConfig.user.title); gtk_entry_set_text(GTK_ENTRY(configDialogData.user.company), xgnokiiConfig.user.company); gtk_entry_set_text(GTK_ENTRY(configDialogData.user.telephone), xgnokiiConfig.user.telephone); gtk_entry_set_text(GTK_ENTRY(configDialogData.user.fax), xgnokiiConfig.user.fax); gtk_entry_set_text(GTK_ENTRY(configDialogData.user.email), xgnokiiConfig.user.email); gtk_entry_set_text(GTK_ENTRY(configDialogData.user.address), xgnokiiConfig.user.address); RefreshUserStatus(); } else gtk_widget_hide(user_option_frame); /* Groups */ if (phoneMonitor.supported & PM_CALLERGROUP) { gtk_widget_show(cg_names_option_frame); GUI_InitCallerGroupsInf(); for (i = 0; i < GN_PHONEBOOK_CALLER_GROUPS_MAX_NUMBER; i++) gtk_entry_set_text(GTK_ENTRY(configDialogData.groups[i]), xgnokiiConfig.callerGroups[i]); } else gtk_widget_hide(cg_names_option_frame); /* Mail */ if (phoneMonitor.supported & PM_SMS) { gtk_widget_show(mail_option_frame); gtk_entry_set_text(GTK_ENTRY(configDialogData.mailbox), xgnokiiConfig.mailbox);; } else gtk_widget_hide(mail_option_frame); optionsDialogIsOpened = TRUE; gtk_widget_show(OptionsDialog); } inline void GUI_ShowAbout(void) { gtk_window_present(GTK_WINDOW(AboutDialog)); } inline void GUI_HideAbout(void) { gtk_widget_hide(AboutDialog); } static void _MainExit(void) { PhoneEvent *e = (PhoneEvent *) g_malloc(sizeof(PhoneEvent)); e->event = Event_Exit; e->data = NULL; GUI_InsertEvent(e); pthread_join(monitor_th, NULL); gtk_main_quit(); } void MainExit(gchar *ermsg) { if (ermsg) { gn_log_xdebug(ermsg); /* Nasty workaround -- that's some race condition that makes sometimes xgnokii to hang on exit */ sleep(1); gtk_label_set_text(GTK_LABEL(infoDialog.text), ermsg); gtk_widget_show_now(infoDialog.dialog); GUI_Refresh(); sleep(10); } _MainExit(); } static void ShowMenu(GdkEventButton * event) { GdkEventButton *bevent = (GdkEventButton *) event; if (phoneMonitor.supported & PM_KEYBOARD) gtk_widget_show(xkeyb_menu_item); else gtk_widget_hide(xkeyb_menu_item); if (phoneMonitor.supported & PM_NETMONITOR) gtk_widget_show(netmon_menu_item); else gtk_widget_hide(netmon_menu_item); if (phoneMonitor.supported & PM_SMS) gtk_widget_show(sms_menu_item); else gtk_widget_hide(sms_menu_item); if (phoneMonitor.supported & PM_CALENDAR) gtk_widget_show(calendar_menu_item); else gtk_widget_hide(calendar_menu_item); if (phoneMonitor.supported & PM_DTMF) gtk_widget_show(dtmf_menu_item); else gtk_widget_hide(dtmf_menu_item); if (phoneMonitor.supported & PM_SPEEDDIAL) gtk_widget_show(speedDial_menu_item); else gtk_widget_hide(speedDial_menu_item); if (phoneMonitor.supported & PM_DATA) gtk_widget_show(data_menu_item); else gtk_widget_hide(data_menu_item); gtk_widget_show(xring_menu_item); gtk_menu_popup(GTK_MENU(Menu), NULL, NULL, NULL, NULL, bevent->button, bevent->time); } static gint ButtonPressEvent(GtkWidget * widget, GdkEventButton * event) { /* Left button */ if (event->button == 1) { /* Close */ if (event->x >= 206 && event->x <= 221 && event->y >= 42 && event->y <= 55) { if (GUI_ContactsIsChanged()) GUI_QuitSaveContacts(); else MainExit(NULL); } else if ((event->x >= 180 && event->x <= 195 && event->y >= 30 && event->y <= 50) || (event->x >= 185 && event->x <= 215 && event->y >= 15 && event->y <= 30)) { GUI_ShowContacts(); } else if (event->x >= 190 && event->x <= 210 && event->y >= 70 && event->y <= 85) { if ((!phoneMonitor.supported) & PM_SMS) phoneMonitor.working = _("SMS not supported!"); else GUI_ShowSMS(); } else if (event->x >= 235 && event->x <= 248 && event->y >= 27 && event->y <= 75) { if ((!phoneMonitor.supported) & PM_CALENDAR) phoneMonitor.working = _("Calendar not supported!"); else GUI_ShowCalendar(); } else if (event->x >= 245 && event->x <= 258 && event->y >= 83 && event->y <= 93) { GUI_ShowOptions(); } } /* Right button */ else if (event->button == 3) ShowMenu(event); // g_print ("event->x: %f\n", event->x); // g_print ("event->y: %f\n", event->y); return TRUE; } static void OptionsApplyCallback(GtkWidget * widget, gpointer data) { PhoneEvent *e; D_Alarm *alarm; register gint i; /* Phone */ max_phonebook_sim_name_length = GNOKII_MIN(GN_PHONEBOOK_NAME_MAX_LENGTH, gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(configDialogData.phone.simNameLen))) + 1; max_phonebook_name_length = GNOKII_MIN(GN_PHONEBOOK_NAME_MAX_LENGTH, gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(configDialogData.phone.phoneNameLen))) + 1; g_free(xgnokiiConfig.maxSIMLen); g_free(xgnokiiConfig.maxPhoneLen); xgnokiiConfig.maxSIMLen = g_strdup_printf("%d", max_phonebook_sim_name_length - 1); xgnokiiConfig.maxPhoneLen = g_strdup_printf("%d", max_phonebook_name_length - 1); /* ALARM */ /* From fbus-6110.c FIXME: we should also allow to set the alarm off :-) */ if (xgnokiiConfig.alarmSupported && GTK_TOGGLE_BUTTON(configDialogData.alarm.alarmSwitch)->active) { alarm = (D_Alarm *) g_malloc(sizeof(D_Alarm)); alarm->alarm.timestamp.hour = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON (configDialogData.alarm.alarmHour)); alarm->alarm.timestamp.minute = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON (configDialogData.alarm.alarmMin)); e = (PhoneEvent *) g_malloc(sizeof(PhoneEvent)); e->event = Event_SetAlarm; e->data = alarm; GUI_InsertEvent(e); } /* SMS */ if (phoneMonitor.supported & PM_SMS) { for (i = 0; i < xgnokiiConfig.smsSets; i++) xgnokiiConfig.smsSetting[i] = configDialogData.sms.smsSetting[i]; GUIEventSend(GUI_EVENT_SMS_CENTERS_CHANGED); } /* BUSINESS CARD */ if (phoneMonitor.supported & PM_SMS) { g_free(xgnokiiConfig.user.name); xgnokiiConfig.user.name = g_strdup(gtk_entry_get_text(GTK_ENTRY(configDialogData.user.name))); g_free(xgnokiiConfig.user.title); xgnokiiConfig.user.title = g_strdup(gtk_entry_get_text(GTK_ENTRY(configDialogData.user.title))); g_free(xgnokiiConfig.user.company); xgnokiiConfig.user.company = g_strdup(gtk_entry_get_text(GTK_ENTRY(configDialogData.user.company))); g_free(xgnokiiConfig.user.telephone); xgnokiiConfig.user.telephone = g_strdup(gtk_entry_get_text(GTK_ENTRY(configDialogData.user.telephone))); g_free(xgnokiiConfig.user.fax); xgnokiiConfig.user.fax = g_strdup(gtk_entry_get_text(GTK_ENTRY(configDialogData.user.fax))); g_free(xgnokiiConfig.user.email); xgnokiiConfig.user.email = g_strdup(gtk_entry_get_text(GTK_ENTRY(configDialogData.user.email))); g_free(xgnokiiConfig.user.address); xgnokiiConfig.user.address = g_strdup(gtk_entry_get_text(GTK_ENTRY(configDialogData.user.address))); } /* GROUPS */ if (phoneMonitor.supported & PM_CALLERGROUP) { for (i = 0; i < GN_PHONEBOOK_CALLER_GROUPS_MAX_NUMBER; i++) { strncpy(xgnokiiConfig.callerGroups[i], gtk_entry_get_text(GTK_ENTRY(configDialogData.groups[i])), MAX_CALLER_GROUP_LENGTH); xgnokiiConfig.callerGroups[i][MAX_CALLER_GROUP_LENGTH] = '\0'; } GUIEventSend(GUI_EVENT_CALLERS_GROUPS_CHANGED); GUIEventSend(GUI_EVENT_CONTACTS_CHANGED); } /* Mail */ if (phoneMonitor.supported & PM_SMS) { g_free(xgnokiiConfig.mailbox); xgnokiiConfig.mailbox = g_strdup(gtk_entry_get_text(GTK_ENTRY(configDialogData.mailbox))); } } static void OptionsSaveCallback(GtkWidget * widget, gpointer data) { D_CallerGroup *cg; D_SMSCenter *c; PhoneEvent *e; register gint i; //gtk_widget_hide(GTK_WIDGET(data)); OptionsApplyCallback(widget, data); for (i = 0; i < xgnokiiConfig.smsSets; i++) { xgnokiiConfig.smsSetting[i].id = i + 1; c = (D_SMSCenter *) g_malloc(sizeof(D_SMSCenter)); c->center = &(xgnokiiConfig.smsSetting[i]); e = (PhoneEvent *) g_malloc(sizeof(PhoneEvent)); e->event = Event_SetSMSCenter; e->data = c; GUI_InsertEvent(e); } if (phoneMonitor.supported & PM_CALLERGROUP) { cg = (D_CallerGroup *) g_malloc(sizeof(D_CallerGroup)); cg->number = 0; if (strcmp(xgnokiiConfig.callerGroups[0], _("Family")) == 0) *cg->text = '\0'; else strncpy(cg->text, xgnokiiConfig.callerGroups[0], 256); cg->text[255] = '\0'; e = (PhoneEvent *) g_malloc(sizeof(PhoneEvent)); e->event = Event_SendCallerGroup; e->data = cg; GUI_InsertEvent(e); cg = (D_CallerGroup *) g_malloc(sizeof(D_CallerGroup)); cg->number = 1; if (strcmp(xgnokiiConfig.callerGroups[1], _("VIP")) == 0) *cg->text = '\0'; else strncpy(cg->text, xgnokiiConfig.callerGroups[1], 256); cg->text[255] = '\0'; e = (PhoneEvent *) g_malloc(sizeof(PhoneEvent)); e->event = Event_SendCallerGroup; e->data = cg; GUI_InsertEvent(e); cg = (D_CallerGroup *) g_malloc(sizeof(D_CallerGroup)); cg->number = 2; if (strcmp(xgnokiiConfig.callerGroups[2], _("Friends")) == 0) *cg->text = '\0'; else strncpy(cg->text, xgnokiiConfig.callerGroups[2], 256); cg->text[255] = '\0'; e = (PhoneEvent *) g_malloc(sizeof(PhoneEvent)); e->event = Event_SendCallerGroup; e->data = cg; GUI_InsertEvent(e); cg = (D_CallerGroup *) g_malloc(sizeof(D_CallerGroup)); cg->number = 3; if (strcmp(xgnokiiConfig.callerGroups[3], _("Colleagues")) == 0) *cg->text = '\0'; else strncpy(cg->text, xgnokiiConfig.callerGroups[3], 256); cg->text[255] = '\0'; e = (PhoneEvent *) g_malloc(sizeof(PhoneEvent)); e->event = Event_SendCallerGroup; e->data = cg; GUI_InsertEvent(e); cg = (D_CallerGroup *) g_malloc(sizeof(D_CallerGroup)); cg->number = 4; if (strcmp(xgnokiiConfig.callerGroups[4], _("Other")) == 0) *cg->text = '\0'; else strncpy(cg->text, xgnokiiConfig.callerGroups[4], 256); cg->text[255] = '\0'; e = (PhoneEvent *) g_malloc(sizeof(PhoneEvent)); e->event = Event_SendCallerGroup; e->data = cg; GUI_InsertEvent(e); } if (GUI_SaveXConfig()) { gtk_label_set_text(GTK_LABEL(errorDialog.text), _("Error writing configuration file!")); gtk_widget_show(errorDialog.dialog); } } static GtkWidget *CreateMenu(void) { GtkWidget *menu, *menu_items; menu = gtk_menu_new(); menu_items = gtk_menu_item_new_with_label(_("Contacts")); gtk_menu_append(GTK_MENU(menu), menu_items); gtk_signal_connect_object(GTK_OBJECT(menu_items), "activate", GTK_SIGNAL_FUNC(GUI_ShowContacts), NULL); gtk_widget_show(menu_items); sms_menu_item = gtk_menu_item_new_with_label(_("SMS")); gtk_menu_append(GTK_MENU(menu), sms_menu_item); gtk_signal_connect_object(GTK_OBJECT(sms_menu_item), "activate", GTK_SIGNAL_FUNC(GUI_ShowSMS), NULL); calendar_menu_item = gtk_menu_item_new_with_label(_("Calendar")); gtk_menu_append(GTK_MENU(menu), calendar_menu_item); gtk_signal_connect_object(GTK_OBJECT(calendar_menu_item), "activate", GTK_SIGNAL_FUNC(GUI_ShowCalendar), NULL); logos_menu_item = gtk_menu_item_new_with_label(_("Logos")); gtk_menu_append(GTK_MENU(menu), logos_menu_item); gtk_signal_connect_object(GTK_OBJECT(logos_menu_item), "activate", GTK_SIGNAL_FUNC(GUI_ShowLogosWindow), NULL); gtk_widget_show(logos_menu_item); dtmf_menu_item = gtk_menu_item_new_with_label(_("DTMF")); gtk_menu_append(GTK_MENU(menu), dtmf_menu_item); gtk_signal_connect_object(GTK_OBJECT(dtmf_menu_item), "activate", GTK_SIGNAL_FUNC(GUI_ShowDTMF), NULL); speedDial_menu_item = gtk_menu_item_new_with_label(_("Speed Dial")); gtk_menu_append(GTK_MENU(menu), speedDial_menu_item); gtk_signal_connect_object(GTK_OBJECT(speedDial_menu_item), "activate", GTK_SIGNAL_FUNC(GUI_ShowSpeedDial), NULL); xkeyb_menu_item = gtk_menu_item_new_with_label(_("Keyboard")); gtk_menu_append(GTK_MENU(menu), xkeyb_menu_item); gtk_signal_connect_object(GTK_OBJECT(xkeyb_menu_item), "activate", GTK_SIGNAL_FUNC(GUI_ShowXkeyb), NULL); netmon_menu_item = gtk_menu_item_new_with_label(_("Net Monitor")); gtk_menu_append(GTK_MENU(menu), netmon_menu_item); gtk_signal_connect_object(GTK_OBJECT(netmon_menu_item), "activate", GTK_SIGNAL_FUNC(GUI_ShowNetmon), NULL); xring_menu_item = gtk_menu_item_new_with_label(_("Ringtone")); gtk_menu_append(GTK_MENU(menu), xring_menu_item); gtk_signal_connect_object(GTK_OBJECT(xring_menu_item), "activate", GTK_SIGNAL_FUNC(GUI_ShowXring), NULL); data_menu_item = gtk_menu_item_new_with_label(_("Data calls")); gtk_menu_append(GTK_MENU(menu), data_menu_item); gtk_signal_connect_object(GTK_OBJECT(data_menu_item), "activate", GTK_SIGNAL_FUNC(GUI_ShowData), NULL); menu_items = gtk_menu_item_new(); gtk_menu_append(GTK_MENU(menu), menu_items); gtk_widget_show(menu_items); menu_items = gtk_menu_item_new_with_label(_("Options")); gtk_menu_append(GTK_MENU(menu), menu_items); gtk_signal_connect_object(GTK_OBJECT(menu_items), "activate", GTK_SIGNAL_FUNC(GUI_ShowOptions), NULL); gtk_widget_show(menu_items); menu_items = gtk_menu_item_new(); gtk_menu_append(GTK_MENU(menu), menu_items); gtk_widget_show(menu_items); menu_items = gtk_menu_item_new_with_label(_("About")); gtk_menu_append(GTK_MENU(menu), menu_items); gtk_signal_connect_object(GTK_OBJECT(menu_items), "activate", GTK_SIGNAL_FUNC(GUI_ShowAbout), NULL); gtk_widget_show(menu_items); return menu; } static GtkWidget *CreateAboutDialog(void) { GtkWidget *dialog; GtkWidget *button, *hbox, *label; gchar buf[2000]; dialog = gtk_dialog_new(); gtk_window_set_title(GTK_WINDOW(dialog), _("About")); gtk_container_set_border_width(GTK_CONTAINER(dialog), 10); gtk_signal_connect(GTK_OBJECT(dialog), "delete_event", GTK_SIGNAL_FUNC(DeleteEvent), NULL); button = gtk_button_new_with_label(_("Ok")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), button, TRUE, FALSE, 5); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(GUI_HideAbout), NULL); GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); gtk_widget_grab_default(button); gtk_widget_show(button); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), hbox); gtk_widget_show(hbox); g_snprintf(buf, 2000, _("xgnokii version: %s\ngnokii version: %s\n\n\ Copyright (C) 1999-2004 Pavel Janik ml.,\nHugh Blemings, Jan Derfinak,\n\ Pawel Kot and others\n\ xgnokii is free software, covered by the GNU General Public License,\n\ and you are welcome to change it and/or distribute copies of it under\n\ certain conditions. There is absolutely no warranty for xgnokii.\n\ See GPL for details.\n"), XVERSION, VERSION); label = gtk_label_new((gchar *) buf); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); gtk_widget_show(label); return dialog; } static inline void SetFormat(GtkWidget * item, gpointer data) { tempMessageSettings.format = GPOINTER_TO_INT(data); } static inline void SetValidity(GtkWidget * item, gpointer data) { tempMessageSettings.validity = GPOINTER_TO_INT(data); } static inline void OptionsDeleteEvent(GtkWidget * widget, GdkEvent * event, gpointer data) { gtk_widget_hide(GTK_WIDGET(widget)); optionsDialogIsOpened = FALSE; } static inline void OptionsCloseCallback(GtkWidget * widget, gpointer data) { gtk_widget_hide(GTK_WIDGET(data)); optionsDialogIsOpened = FALSE; } static gint CheckInUserDataLength(GtkWidget * widget, GdkEvent * event, gpointer callback_data) { register gint len; len = configDialogData.user.max - (GTK_ENTRY(configDialogData.user.name)->text_length + GTK_ENTRY(configDialogData.user.title)->text_length + GTK_ENTRY(configDialogData.user.company)->text_length + GTK_ENTRY(configDialogData.user.telephone)->text_length + GTK_ENTRY(configDialogData.user.fax)->text_length + GTK_ENTRY(configDialogData.user.email)->text_length + GTK_ENTRY(configDialogData.user.address)->text_length - GTK_ENTRY(widget)->text_length); if (len < 1) { gtk_entry_set_editable(GTK_ENTRY(widget), FALSE); return (FALSE); } else gtk_entry_set_editable(GTK_ENTRY(widget), TRUE); if (GPOINTER_TO_INT(callback_data) == 3 || GPOINTER_TO_INT(callback_data) == 4) { if ((GPOINTER_TO_INT(callback_data) == 3 && GTK_ENTRY(configDialogData.user.telephone)->text_length == 0) || (GPOINTER_TO_INT(callback_data) == 4 && GTK_ENTRY(configDialogData.user.fax)->text_length == 0)) len -= 4; if (len < 1) { gtk_entry_set_editable(GTK_ENTRY(widget), FALSE); return (FALSE); } if (len > max_phonebook_number_length) len = max_phonebook_number_length; } gtk_entry_set_max_length(GTK_ENTRY(widget), len); return (FALSE); } static inline gint CheckOutUserDataLength(GtkWidget * widget, GdkEvent * event, gpointer callback_data) { gtk_entry_set_max_length(GTK_ENTRY(widget), GPOINTER_TO_INT(callback_data)); return (FALSE); } static inline gint RefreshUserStatusCallBack(GtkWidget * widget, GdkEventKey * event, gpointer callback_data) { RefreshUserStatus(); if (gtk_editable_get_editable (GTK_EDITABLE(widget)) == FALSE) return (FALSE); if (event->keyval == GDK_BackSpace || event->keyval == GDK_Clear || event->keyval == GDK_Insert || event->keyval == GDK_Delete || event->keyval == GDK_Home || event->keyval == GDK_End || event->keyval == GDK_Left || event->keyval == GDK_Right || event->keyval == GDK_Return || (event->keyval >= 0x20 && event->keyval <= 0xFF)) return (TRUE); return (FALSE); } static void OkEditSMSSetDialog(GtkWidget * w, gpointer data) { strncpy(configDialogData.sms.smsSetting [GPOINTER_TO_INT(GTK_CLIST(SMSClist)->selection->data)].name, gtk_entry_get_text(GTK_ENTRY(configDialogData.sms.set)), GN_SMS_CENTER_NAME_MAX_LENGTH); configDialogData.sms.smsSetting[GPOINTER_TO_INT(GTK_CLIST(SMSClist)->selection->data)]. name[GN_SMS_CENTER_NAME_MAX_LENGTH - 1] = '\0'; strncpy(configDialogData.sms.smsSetting [GPOINTER_TO_INT(GTK_CLIST(SMSClist)->selection->data)].smsc.number, gtk_entry_get_text(GTK_ENTRY(configDialogData.sms.number)), GN_BCD_STRING_MAX_LENGTH); configDialogData.sms.smsSetting[GPOINTER_TO_INT(GTK_CLIST(SMSClist)->selection->data)]. smsc.number[GN_BCD_STRING_MAX_LENGTH - 1] = '\0'; configDialogData.sms.smsSetting[GPOINTER_TO_INT(GTK_CLIST(SMSClist)->selection->data)]. format = tempMessageSettings.format; configDialogData.sms.smsSetting[GPOINTER_TO_INT(GTK_CLIST(SMSClist)->selection->data)]. validity = tempMessageSettings.validity; ParseSMSCenters(); gtk_widget_hide(GTK_WIDGET(data)); } static inline void EditSMSSetDialogClick(GtkWidget * clist, gint row, gint column, GdkEventButton * event, GtkWidget * data) { if (event && event->type == GDK_2BUTTON_PRESS) gtk_signal_emit_by_name(GTK_OBJECT(data), "clicked"); } static void ShowEditSMSSetDialog(GtkWidget * w, gpointer data) { static GtkWidget *dialog = NULL; GtkWidget *button, *label, *hbox, *menu, *item; if (GTK_CLIST(SMSClist)->selection == NULL) return; if (dialog == NULL) { dialog = gtk_dialog_new(); gtk_window_set_title(GTK_WINDOW(dialog), _("Edit SMS Setting")); gtk_window_set_modal(GTK_WINDOW(dialog), TRUE); gtk_container_set_border_width(GTK_CONTAINER(dialog), 10); gtk_signal_connect(GTK_OBJECT(dialog), "delete_event", GTK_SIGNAL_FUNC(DeleteEvent), NULL); button = gtk_button_new_with_label(_("Ok")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), button, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(OkEditSMSSetDialog), (gpointer) dialog); GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); gtk_widget_grab_default(button); gtk_widget_show(button); button = gtk_button_new_with_label(_("Cancel")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), button, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(CancelDialog), (gpointer) dialog); gtk_widget_show(button); gtk_container_set_border_width(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), 5); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), hbox); gtk_widget_show(hbox); label = gtk_label_new(_("Set's name:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); gtk_widget_show(label); configDialogData.sms.set = gtk_entry_new_with_max_length(GN_SMS_CENTER_NAME_MAX_LENGTH - 1); gtk_widget_set_usize(configDialogData.sms.set, 110, 22); gtk_box_pack_end(GTK_BOX(hbox), configDialogData.sms.set, FALSE, FALSE, 2); gtk_widget_show(configDialogData.sms.set); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), hbox); gtk_widget_show(hbox); label = gtk_label_new(_("Center:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); gtk_widget_show(label); configDialogData.sms.number = gtk_entry_new_with_max_length(GN_BCD_STRING_MAX_LENGTH - 1); gtk_widget_set_usize(configDialogData.sms.number, 110, 22); gtk_box_pack_end(GTK_BOX(hbox), configDialogData.sms.number, FALSE, FALSE, 2); gtk_widget_show(configDialogData.sms.number); hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), hbox, FALSE, FALSE, 9); gtk_widget_show(hbox); label = gtk_label_new(_("Sending Format:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); gtk_widget_show(label); configDialogData.sms.format = gtk_option_menu_new(); menu = gtk_menu_new(); gtk_widget_set_usize(configDialogData.sms.format, 110, 28); item = gtk_menu_item_new_with_label(_("Text")); gtk_signal_connect(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(SetFormat), (gpointer) GN_SMS_MF_Text); gtk_widget_show(item); gtk_menu_append(GTK_MENU(menu), item); item = gtk_menu_item_new_with_label(_("Fax")); gtk_signal_connect(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(SetFormat), (gpointer) GN_SMS_MF_Fax); gtk_widget_show(item); gtk_menu_append(GTK_MENU(menu), item); item = gtk_menu_item_new_with_label(_("Paging")); gtk_signal_connect(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(SetFormat), (gpointer) GN_SMS_MF_Paging); gtk_widget_show(item); gtk_menu_append(GTK_MENU(menu), item); item = gtk_menu_item_new_with_label(_("Email")); gtk_signal_connect(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(SetFormat), (gpointer) GN_SMS_MF_Email); gtk_widget_show(item); gtk_menu_append(GTK_MENU(menu), item); gtk_option_menu_set_menu(GTK_OPTION_MENU(configDialogData.sms.format), menu); gtk_box_pack_end(GTK_BOX(hbox), configDialogData.sms.format, FALSE, FALSE, 2); gtk_widget_show(configDialogData.sms.format); hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), hbox, FALSE, FALSE, 9); gtk_widget_show(hbox); label = gtk_label_new(_("Validity Period:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); gtk_widget_show(label); configDialogData.sms.validity = gtk_option_menu_new(); menu = gtk_menu_new(); gtk_widget_set_usize(configDialogData.sms.validity, 110, 28); item = gtk_menu_item_new_with_label(_("Max. Time")); gtk_signal_connect(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(SetValidity), (gpointer) GN_SMS_VP_Max); gtk_widget_show(item); gtk_menu_append(GTK_MENU(menu), item); item = gtk_menu_item_new_with_label(_("1 hour")); gtk_signal_connect(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(SetValidity), (gpointer) GN_SMS_VP_1H); gtk_widget_show(item); gtk_menu_append(GTK_MENU(menu), item); item = gtk_menu_item_new_with_label(_("6 hours")); gtk_signal_connect(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(SetValidity), (gpointer) GN_SMS_VP_6H); gtk_widget_show(item); gtk_menu_append(GTK_MENU(menu), item); item = gtk_menu_item_new_with_label(_("24 hours")); gtk_signal_connect(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(SetValidity), (gpointer) GN_SMS_VP_24H); gtk_widget_show(item); gtk_menu_append(GTK_MENU(menu), item); item = gtk_menu_item_new_with_label(_("72 hours")); gtk_signal_connect(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(SetValidity), (gpointer) GN_SMS_VP_72H); gtk_widget_show(item); gtk_menu_append(GTK_MENU(menu), item); item = gtk_menu_item_new_with_label(_("1 week")); gtk_signal_connect(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(SetValidity), (gpointer) GN_SMS_VP_1W); gtk_widget_show(item); gtk_menu_append(GTK_MENU(menu), item); gtk_option_menu_set_menu(GTK_OPTION_MENU(configDialogData.sms.validity), menu); gtk_box_pack_end(GTK_BOX(hbox), configDialogData.sms.validity, FALSE, FALSE, 2); gtk_widget_show(configDialogData.sms.validity); } gtk_entry_set_text(GTK_ENTRY(configDialogData.sms.set), configDialogData.sms.smsSetting [GPOINTER_TO_INT(GTK_CLIST(SMSClist)->selection->data)].name); gtk_entry_set_text(GTK_ENTRY(configDialogData.sms.number), configDialogData.sms.smsSetting [GPOINTER_TO_INT(GTK_CLIST(SMSClist)->selection->data)].smsc.number); switch (configDialogData.sms.smsSetting [GPOINTER_TO_INT(GTK_CLIST(SMSClist)->selection->data)].format) { case GN_SMS_MF_Text: gtk_option_menu_set_history(GTK_OPTION_MENU(configDialogData.sms.format), 0); break; case GN_SMS_MF_Paging: gtk_option_menu_set_history(GTK_OPTION_MENU(configDialogData.sms.format), 2); break; case GN_SMS_MF_Fax: gtk_option_menu_set_history(GTK_OPTION_MENU(configDialogData.sms.format), 1); break; case GN_SMS_MF_Email: gtk_option_menu_set_history(GTK_OPTION_MENU(configDialogData.sms.format), 3); break; default: gtk_option_menu_set_history(GTK_OPTION_MENU(configDialogData.sms.format), 0); } switch (configDialogData.sms.smsSetting [GPOINTER_TO_INT(GTK_CLIST(SMSClist)->selection->data)].validity) { case GN_SMS_VP_1H: gtk_option_menu_set_history(GTK_OPTION_MENU(configDialogData.sms.validity), 1); break; case GN_SMS_VP_6H: gtk_option_menu_set_history(GTK_OPTION_MENU(configDialogData.sms.validity), 2); break; case GN_SMS_VP_24H: gtk_option_menu_set_history(GTK_OPTION_MENU(configDialogData.sms.validity), 3); break; case GN_SMS_VP_72H: gtk_option_menu_set_history(GTK_OPTION_MENU(configDialogData.sms.validity), 4); break; case GN_SMS_VP_1W: gtk_option_menu_set_history(GTK_OPTION_MENU(configDialogData.sms.validity), 5); break; case GN_SMS_VP_Max: gtk_option_menu_set_history(GTK_OPTION_MENU(configDialogData.sms.validity), 0); break; default: gtk_option_menu_set_history(GTK_OPTION_MENU(configDialogData.sms.validity), 3); } tempMessageSettings.format = configDialogData.sms.smsSetting [GPOINTER_TO_INT(GTK_CLIST(SMSClist)->selection->data)].format; tempMessageSettings.validity = configDialogData.sms.smsSetting [GPOINTER_TO_INT(GTK_CLIST(SMSClist)->selection->data)].validity; gtk_widget_show(dialog); } static GtkWidget *CreateOptionsDialog(void) { gchar labelBuffer[10]; GtkWidget *dialog; GtkWidget *button, *hbox, *vbox, *label, *notebook, *frame, *clistScrolledWindow; register gint i; GtkAdjustment *adj; gchar *titles[4] = { _("Set's name"), _("Center number"), _("Format"), _("Validity") }; dialog = gtk_dialog_new(); gtk_window_set_title(GTK_WINDOW(dialog), _("Options")); gtk_container_set_border_width(GTK_CONTAINER(dialog), 10); gtk_signal_connect(GTK_OBJECT(dialog), "delete_event", GTK_SIGNAL_FUNC(OptionsDeleteEvent), NULL); button = gtk_button_new_with_label(_("Apply")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), button, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(OptionsApplyCallback), (gpointer) dialog); GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); gtk_widget_grab_default(button); gtk_widget_show(button); button = gtk_button_new_with_label(_("Save")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), button, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(OptionsSaveCallback), (gpointer) dialog); gtk_widget_show(button); button = gtk_button_new_with_label(_("Close")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), button, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(OptionsCloseCallback), (gpointer) dialog); gtk_widget_show(button); gtk_container_set_border_width(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), 5); notebook = gtk_notebook_new(); gtk_notebook_set_tab_pos(GTK_NOTEBOOK(notebook), GTK_POS_TOP); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), notebook); gtk_widget_show(notebook); /*** Connection notebook ***/ frame = gtk_frame_new(_("Phone and connection type")); gtk_widget_show(frame); vbox = gtk_vbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(frame), vbox); gtk_widget_show(vbox); label = gtk_label_new(_("Connection")); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), frame, label); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(vbox), hbox); gtk_widget_show(hbox); label = gtk_label_new(_("Port:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); gtk_widget_show(label); configDialogData.connection.port = gtk_entry_new_with_max_length(GN_DEVICE_NAME_MAX_LENGTH); gtk_widget_set_usize(configDialogData.connection.port, 220, 22); gtk_entry_set_editable(GTK_ENTRY(configDialogData.connection.port), FALSE); gtk_box_pack_end(GTK_BOX(hbox), configDialogData.connection.port, FALSE, FALSE, 2); gtk_widget_show(configDialogData.connection.port); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(vbox), hbox); gtk_widget_show(hbox); label = gtk_label_new(_("Model:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); gtk_widget_show(label); configDialogData.connection.model = gtk_entry_new_with_max_length(GN_MODEL_MAX_LENGTH); gtk_widget_set_usize(configDialogData.connection.model, 220, 22); gtk_entry_set_editable(GTK_ENTRY(configDialogData.connection.model), FALSE); gtk_box_pack_end(GTK_BOX(hbox), configDialogData.connection.model, FALSE, FALSE, 2); gtk_widget_show(configDialogData.connection.model); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(vbox), hbox); gtk_widget_show(hbox); label = gtk_label_new(_("Bindir:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); gtk_widget_show(label); configDialogData.connection.bindir = gtk_entry_new_with_max_length(100); gtk_widget_set_usize(configDialogData.connection.bindir, 220, 22); gtk_entry_set_editable(GTK_ENTRY(configDialogData.connection.bindir), FALSE); gtk_box_pack_end(GTK_BOX(hbox), configDialogData.connection.bindir, FALSE, FALSE, 2); gtk_widget_show(configDialogData.connection.bindir); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(vbox), hbox); gtk_widget_show(hbox); label = gtk_label_new(_("Init length:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); gtk_widget_show(label); adj = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 1000, 1.0, 10.0, 0.0); configDialogData.connection.init = gtk_spin_button_new(adj, 0, 0); gtk_spin_button_set_wrap(GTK_SPIN_BUTTON(configDialogData.connection.init), TRUE); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(configDialogData.connection.init), TRUE); gtk_box_pack_start(GTK_BOX(hbox), configDialogData.connection.init, FALSE, FALSE, 2); gtk_widget_show(configDialogData.connection.init); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(vbox), hbox); gtk_widget_show(hbox); label = gtk_label_new(_("Connection:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); gtk_widget_show(label); configDialogData.connection.infrared = gtk_radio_button_new_with_label(NULL, _("infrared")); gtk_box_pack_end(GTK_BOX(hbox), configDialogData.connection.infrared, TRUE, FALSE, 2); gtk_widget_show(configDialogData.connection.infrared); configDialogData.connection.serial = gtk_radio_button_new_with_label(gtk_radio_button_group (GTK_RADIO_BUTTON (configDialogData.connection.infrared)), _("serial")); gtk_box_pack_end(GTK_BOX(hbox), configDialogData.connection.serial, TRUE, FALSE, 2); gtk_widget_show(configDialogData.connection.serial); configDialogData.connection.irda = gtk_radio_button_new_with_label(gtk_radio_button_group (GTK_RADIO_BUTTON (configDialogData.connection.infrared)), _("irda")); gtk_box_pack_end(GTK_BOX(hbox), configDialogData.connection.irda, TRUE, FALSE, 2); gtk_widget_show(configDialogData.connection.irda); /*** Phone notebook ***/ frame = gtk_frame_new(_("Phone information")); gtk_widget_show(frame); vbox = gtk_vbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(frame), vbox); gtk_widget_show(vbox); label = gtk_label_new(_("Phone")); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), frame, label); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(vbox), hbox); gtk_widget_show(hbox); label = gtk_label_new(_("Model:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); gtk_widget_show(label); configDialogData.phone.model = gtk_entry_new_with_max_length(GN_MODEL_MAX_LENGTH); gtk_widget_set_usize(configDialogData.phone.model, 220, 22); gtk_entry_set_editable(GTK_ENTRY(configDialogData.phone.model), FALSE); gtk_box_pack_end(GTK_BOX(hbox), configDialogData.phone.model, FALSE, FALSE, 2); gtk_widget_show(configDialogData.phone.model); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(vbox), hbox); gtk_widget_show(hbox); label = gtk_label_new(_("Version:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); gtk_widget_show(label); configDialogData.phone.version = gtk_entry_new_with_max_length(GN_MODEL_MAX_LENGTH); gtk_widget_set_usize(configDialogData.phone.version, 220, 22); gtk_entry_set_editable(GTK_ENTRY(configDialogData.phone.version), FALSE); gtk_box_pack_end(GTK_BOX(hbox), configDialogData.phone.version, FALSE, FALSE, 2); gtk_widget_show(configDialogData.phone.version); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(vbox), hbox); gtk_widget_show(hbox); label = gtk_label_new(_("Revision:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); gtk_widget_show(label); configDialogData.phone.revision = gtk_entry_new_with_max_length(GN_REVISION_MAX_LENGTH); gtk_widget_set_usize(configDialogData.phone.revision, 220, 22); gtk_entry_set_editable(GTK_ENTRY(configDialogData.phone.revision), FALSE); gtk_box_pack_end(GTK_BOX(hbox), configDialogData.phone.revision, FALSE, FALSE, 2); gtk_widget_show(configDialogData.phone.revision); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(vbox), hbox); gtk_widget_show(hbox); label = gtk_label_new(_("IMEI:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); gtk_widget_show(label); configDialogData.phone.imei = gtk_entry_new_with_max_length(GN_IMEI_MAX_LENGTH); gtk_widget_set_usize(configDialogData.phone.imei, 220, 22); gtk_entry_set_editable(GTK_ENTRY(configDialogData.phone.imei), FALSE); gtk_box_pack_end(GTK_BOX(hbox), configDialogData.phone.imei, FALSE, FALSE, 2); gtk_widget_show(configDialogData.phone.imei); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(vbox), hbox); gtk_widget_show(hbox); label = gtk_label_new(_("Names length:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); gtk_widget_show(label); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(vbox), hbox); gtk_widget_show(hbox); label = gtk_label_new(_("SIM:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); gtk_widget_show(label); adj = (GtkAdjustment *) gtk_adjustment_new(0.0, 1.0, GN_PHONEBOOK_NAME_MAX_LENGTH, 1.0, 10.0, 0.0); configDialogData.phone.simNameLen = gtk_spin_button_new(adj, 0, 0); gtk_spin_button_set_wrap(GTK_SPIN_BUTTON(configDialogData.phone.simNameLen), TRUE); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(configDialogData.phone.simNameLen), TRUE); gtk_box_pack_start(GTK_BOX(hbox), configDialogData.phone.simNameLen, FALSE, FALSE, 2); gtk_widget_show(configDialogData.phone.simNameLen); adj = (GtkAdjustment *) gtk_adjustment_new(0.0, 1.0, GN_PHONEBOOK_NAME_MAX_LENGTH, 1.0, 10.0, 0.0); configDialogData.phone.phoneNameLen = gtk_spin_button_new(adj, 0, 0); gtk_spin_button_set_wrap(GTK_SPIN_BUTTON(configDialogData.phone.phoneNameLen), TRUE); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(configDialogData.phone.phoneNameLen), TRUE); gtk_box_pack_end(GTK_BOX(hbox), configDialogData.phone.phoneNameLen, FALSE, FALSE, 2); gtk_widget_show(configDialogData.phone.phoneNameLen); label = gtk_label_new(_("Phone:")); gtk_box_pack_end(GTK_BOX(hbox), label, FALSE, FALSE, 2); gtk_widget_show(label); /*** Alarm notebook ***/ xgnokiiConfig.alarmSupported = TRUE; frame = gtk_frame_new(_("Alarm setting")); gtk_widget_show(frame); vbox = gtk_vbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(frame), vbox); gtk_widget_show(vbox); label = gtk_label_new(_("Alarm")); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), frame, label); hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5); gtk_widget_show(hbox); configDialogData.alarm.alarmSwitch = gtk_check_button_new_with_label(_("Alarm")); gtk_box_pack_start(GTK_BOX(hbox), configDialogData.alarm.alarmSwitch, FALSE, FALSE, 10); gtk_widget_show(configDialogData.alarm.alarmSwitch); adj = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 23.0, 1.0, 4.0, 0.0); configDialogData.alarm.alarmHour = gtk_spin_button_new(adj, 0, 0); gtk_spin_button_set_wrap(GTK_SPIN_BUTTON(configDialogData.alarm.alarmHour), TRUE); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(configDialogData.alarm.alarmHour), TRUE); gtk_box_pack_start(GTK_BOX(hbox), configDialogData.alarm.alarmHour, FALSE, FALSE, 0); gtk_widget_show(configDialogData.alarm.alarmHour); label = gtk_label_new(":"); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); gtk_widget_show(label); adj = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 59.0, 1.0, 10.0, 0.0); configDialogData.alarm.alarmMin = gtk_spin_button_new(adj, 0, 0); gtk_spin_button_set_wrap(GTK_SPIN_BUTTON(configDialogData.alarm.alarmMin), TRUE); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(configDialogData.alarm.alarmMin), TRUE); gtk_box_pack_start(GTK_BOX(hbox), configDialogData.alarm.alarmMin, FALSE, FALSE, 0); gtk_widget_show(configDialogData.alarm.alarmMin); /*** SMS notebook ***/ sms_option_frame = gtk_frame_new(_("Short Message Service")); vbox = gtk_vbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(sms_option_frame), vbox); gtk_widget_show(vbox); label = gtk_label_new(_("SMS")); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), sms_option_frame, label); SMSClist = gtk_clist_new_with_titles(4, titles); gtk_clist_set_shadow_type(GTK_CLIST(SMSClist), GTK_SHADOW_OUT); gtk_clist_column_titles_passive(GTK_CLIST(SMSClist)); gtk_clist_set_auto_sort(GTK_CLIST(SMSClist), FALSE); gtk_clist_set_column_width(GTK_CLIST(SMSClist), 0, 70); gtk_clist_set_column_width(GTK_CLIST(SMSClist), 1, 115); gtk_clist_set_column_width(GTK_CLIST(SMSClist), 2, 40); gtk_clist_set_column_width(GTK_CLIST(SMSClist), 3, 55); // gtk_clist_set_column_justification (GTK_CLIST (SMSClist), 1, GTK_JUSTIFY_RIGHT); clistScrolledWindow = gtk_scrolled_window_new(NULL, NULL); gtk_container_add(GTK_CONTAINER(clistScrolledWindow), SMSClist); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(clistScrolledWindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_box_pack_start(GTK_BOX(vbox), clistScrolledWindow, TRUE, TRUE, 10); gtk_widget_show(SMSClist); gtk_widget_show(clistScrolledWindow); hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_end(GTK_BOX(vbox), hbox, FALSE, FALSE, 9); gtk_widget_show(hbox); button = gtk_button_new_with_label(_("Edit")); gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, FALSE, 0); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(ShowEditSMSSetDialog), (gpointer) dialog); GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); gtk_widget_grab_default(button); gtk_widget_show(button); gtk_signal_connect(GTK_OBJECT(SMSClist), "select_row", GTK_SIGNAL_FUNC(EditSMSSetDialogClick), (gpointer) button); /*** Business notebook ***/ user_option_frame = gtk_frame_new(_("Business Card")); vbox = gtk_vbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(user_option_frame), vbox); gtk_widget_show(vbox); label = gtk_label_new(_("User")); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), user_option_frame, label); hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 2); gtk_widget_show(hbox); configDialogData.user.status = gtk_label_new(""); gtk_box_pack_end(GTK_BOX(hbox), configDialogData.user.status, FALSE, FALSE, 2); gtk_widget_show(configDialogData.user.status); configDialogData.user.max = MAX_BUSINESS_CARD_LENGTH; configDialogData.user.used = 0; hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 2); gtk_widget_show(hbox); label = gtk_label_new(_("Name:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); gtk_widget_show(label); configDialogData.user.name = gtk_entry_new_with_max_length(configDialogData.user.max); gtk_widget_set_usize(configDialogData.user.name, 220, 22); gtk_signal_connect_after(GTK_OBJECT(configDialogData.user.name), "key_press_event", GTK_SIGNAL_FUNC(RefreshUserStatusCallBack), (gpointer) NULL); gtk_signal_connect_after(GTK_OBJECT(configDialogData.user.name), "button_press_event", GTK_SIGNAL_FUNC(RefreshUserStatusCallBack), (gpointer) NULL); gtk_signal_connect(GTK_OBJECT(configDialogData.user.name), "focus_in_event", GTK_SIGNAL_FUNC(CheckInUserDataLength), (gpointer) 0); gtk_signal_connect(GTK_OBJECT(configDialogData.user.name), "focus_out_event", GTK_SIGNAL_FUNC(CheckOutUserDataLength), (gpointer) configDialogData.user.max); gtk_box_pack_end(GTK_BOX(hbox), configDialogData.user.name, FALSE, FALSE, 2); gtk_widget_show(configDialogData.user.name); hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 2); gtk_widget_show(hbox); label = gtk_label_new(_("Title:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); gtk_widget_show(label); configDialogData.user.title = gtk_entry_new_with_max_length(configDialogData.user.max); gtk_widget_set_usize(configDialogData.user.title, 220, 22); gtk_signal_connect_after(GTK_OBJECT(configDialogData.user.title), "key_press_event", GTK_SIGNAL_FUNC(RefreshUserStatusCallBack), (gpointer) NULL); gtk_signal_connect_after(GTK_OBJECT(configDialogData.user.title), "button_press_event", GTK_SIGNAL_FUNC(RefreshUserStatusCallBack), (gpointer) NULL); gtk_signal_connect(GTK_OBJECT(configDialogData.user.title), "focus_in_event", GTK_SIGNAL_FUNC(CheckInUserDataLength), (gpointer) 1); gtk_signal_connect(GTK_OBJECT(configDialogData.user.title), "focus_out_event", GTK_SIGNAL_FUNC(CheckOutUserDataLength), (gpointer) configDialogData.user.max); gtk_box_pack_end(GTK_BOX(hbox), configDialogData.user.title, FALSE, FALSE, 2); gtk_widget_show(configDialogData.user.title); hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 2); gtk_widget_show(hbox); label = gtk_label_new(_("Company:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); gtk_widget_show(label); configDialogData.user.company = gtk_entry_new_with_max_length(configDialogData.user.max); gtk_widget_set_usize(configDialogData.user.company, 220, 22); gtk_signal_connect_after(GTK_OBJECT(configDialogData.user.company), "key_press_event", GTK_SIGNAL_FUNC(RefreshUserStatusCallBack), (gpointer) NULL); gtk_signal_connect_after(GTK_OBJECT(configDialogData.user.company), "button_press_event", GTK_SIGNAL_FUNC(RefreshUserStatusCallBack), (gpointer) NULL); gtk_signal_connect(GTK_OBJECT(configDialogData.user.company), "focus_in_event", GTK_SIGNAL_FUNC(CheckInUserDataLength), (gpointer) 2); gtk_signal_connect(GTK_OBJECT(configDialogData.user.company), "focus_out_event", GTK_SIGNAL_FUNC(CheckOutUserDataLength), (gpointer) configDialogData.user.max); gtk_box_pack_end(GTK_BOX(hbox), configDialogData.user.company, FALSE, FALSE, 2); gtk_widget_show(configDialogData.user.company); hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 2); gtk_widget_show(hbox); label = gtk_label_new(_("Telephone:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); gtk_widget_show(label); configDialogData.user.telephone = gtk_entry_new_with_max_length(max_phonebook_number_length); gtk_widget_set_usize(configDialogData.user.telephone, 220, 22); gtk_signal_connect_after(GTK_OBJECT(configDialogData.user.telephone), "key_press_event", GTK_SIGNAL_FUNC(RefreshUserStatusCallBack), (gpointer) NULL); gtk_signal_connect_after(GTK_OBJECT(configDialogData.user.telephone), "button_press_event", GTK_SIGNAL_FUNC(RefreshUserStatusCallBack), (gpointer) NULL); gtk_signal_connect(GTK_OBJECT(configDialogData.user.telephone), "focus_in_event", GTK_SIGNAL_FUNC(CheckInUserDataLength), (gpointer) 3); gtk_signal_connect(GTK_OBJECT(configDialogData.user.telephone), "focus_out_event", GTK_SIGNAL_FUNC(CheckOutUserDataLength), (gpointer) max_phonebook_number_length); gtk_box_pack_end(GTK_BOX(hbox), configDialogData.user.telephone, FALSE, FALSE, 2); gtk_widget_show(configDialogData.user.telephone); hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 2); gtk_widget_show(hbox); label = gtk_label_new(_("Fax:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); gtk_widget_show(label); configDialogData.user.fax = gtk_entry_new_with_max_length(max_phonebook_number_length); gtk_widget_set_usize(configDialogData.user.fax, 220, 22); gtk_signal_connect_after(GTK_OBJECT(configDialogData.user.fax), "key_press_event", GTK_SIGNAL_FUNC(RefreshUserStatusCallBack), (gpointer) NULL); gtk_signal_connect_after(GTK_OBJECT(configDialogData.user.fax), "button_press_event", GTK_SIGNAL_FUNC(RefreshUserStatusCallBack), (gpointer) NULL); gtk_signal_connect(GTK_OBJECT(configDialogData.user.fax), "focus_in_event", GTK_SIGNAL_FUNC(CheckInUserDataLength), (gpointer) 4); gtk_signal_connect(GTK_OBJECT(configDialogData.user.fax), "focus_out_event", GTK_SIGNAL_FUNC(CheckOutUserDataLength), (gpointer) max_phonebook_number_length); gtk_box_pack_end(GTK_BOX(hbox), configDialogData.user.fax, FALSE, FALSE, 2); gtk_widget_show(configDialogData.user.fax); hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 2); gtk_widget_show(hbox); label = gtk_label_new(_("Email:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); gtk_widget_show(label); configDialogData.user.email = gtk_entry_new_with_max_length(configDialogData.user.max); gtk_widget_set_usize(configDialogData.user.email, 220, 22); gtk_signal_connect_after(GTK_OBJECT(configDialogData.user.email), "key_press_event", GTK_SIGNAL_FUNC(RefreshUserStatusCallBack), (gpointer) NULL); gtk_signal_connect_after(GTK_OBJECT(configDialogData.user.email), "button_press_event", GTK_SIGNAL_FUNC(RefreshUserStatusCallBack), (gpointer) NULL); gtk_signal_connect(GTK_OBJECT(configDialogData.user.email), "focus_in_event", GTK_SIGNAL_FUNC(CheckInUserDataLength), (gpointer) 5); gtk_signal_connect(GTK_OBJECT(configDialogData.user.email), "focus_out_event", GTK_SIGNAL_FUNC(CheckOutUserDataLength), (gpointer) configDialogData.user.max); gtk_box_pack_end(GTK_BOX(hbox), configDialogData.user.email, FALSE, FALSE, 2); gtk_widget_show(configDialogData.user.email); hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 2); gtk_widget_show(hbox); label = gtk_label_new(_("Address:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); gtk_widget_show(label); configDialogData.user.address = gtk_entry_new_with_max_length(configDialogData.user.max); gtk_widget_set_usize(configDialogData.user.address, 220, 22); gtk_signal_connect_after(GTK_OBJECT(configDialogData.user.address), "key_press_event", GTK_SIGNAL_FUNC(RefreshUserStatusCallBack), (gpointer) NULL); gtk_signal_connect_after(GTK_OBJECT(configDialogData.user.address), "button_press_event", GTK_SIGNAL_FUNC(RefreshUserStatusCallBack), (gpointer) NULL); gtk_signal_connect(GTK_OBJECT(configDialogData.user.address), "focus_in_event", GTK_SIGNAL_FUNC(CheckInUserDataLength), (gpointer) 6); gtk_signal_connect(GTK_OBJECT(configDialogData.user.address), "focus_out_event", GTK_SIGNAL_FUNC(CheckOutUserDataLength), (gpointer) configDialogData.user.max); gtk_box_pack_end(GTK_BOX(hbox), configDialogData.user.address, FALSE, FALSE, 2); gtk_widget_show(configDialogData.user.address); /*** Groups notebook ***/ cg_names_option_frame = gtk_frame_new(_("Caller groups names")); vbox = gtk_vbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(cg_names_option_frame), vbox); gtk_widget_show(vbox); label = gtk_label_new(_("Groups")); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), cg_names_option_frame, label); for (i = 0; i < GN_PHONEBOOK_CALLER_GROUPS_MAX_NUMBER; i++) { hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(vbox), hbox, TRUE, TRUE, 3); gtk_widget_show(hbox); g_snprintf(labelBuffer, 10, _("Group %d:"), i + 1); label = gtk_label_new(labelBuffer); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); gtk_widget_show(label); configDialogData.groups[i] = gtk_entry_new_with_max_length(MAX_CALLER_GROUP_LENGTH); gtk_widget_set_usize(configDialogData.groups[i], 220, 22); gtk_box_pack_end(GTK_BOX(hbox), configDialogData.groups[i], FALSE, FALSE, 2); gtk_widget_show(configDialogData.groups[i]); } /* Mail */ mail_option_frame = gtk_frame_new(_("Mailbox")); gtk_widget_show(mail_option_frame); vbox = gtk_vbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(mail_option_frame), vbox); gtk_widget_show(vbox); label = gtk_label_new(_("Mail")); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), mail_option_frame, label); hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 2); gtk_widget_show(hbox); label = gtk_label_new(_("Path to mailbox:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); gtk_widget_show(label); configDialogData.mailbox = gtk_entry_new_with_max_length(MAILBOX_LENGTH - 1); gtk_widget_set_usize(configDialogData.mailbox, 220, 22); gtk_box_pack_end(GTK_BOX(hbox), configDialogData.mailbox, FALSE, FALSE, 2); gtk_widget_show(configDialogData.mailbox); optionsDialogIsOpened = FALSE; return dialog; } static void TopLevelWindow(void) { GtkWidget *drawing_area; GdkBitmap *mask; struct sigaction act; #if GTK_CHECK_VERSION (2, 6, 0) gtk_window_set_default_icon_name("phone"); #endif GUI_MainWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL); /* gtk_window_set_decorated (GTK_WINDOW (GUI_MainWindow), GTK_FALSE); */ gtk_widget_realize(GUI_MainWindow); BackgroundPixmap = gdk_pixmap_create_from_xpm_d(GUI_MainWindow->window, &mask, &GUI_MainWindow->style->white, (gchar **) XPM_background); SMSPixmap = gdk_pixmap_create_from_xpm_d(GUI_MainWindow->window, &mask, &GUI_MainWindow->style->white, (gchar **) XPM_sms); AlarmPixmap = gdk_pixmap_create_from_xpm_d(GUI_MainWindow->window, &mask, &GUI_MainWindow->style->white, (gchar **) XPM_alarm); Pixmap = gdk_pixmap_create_from_xpm_d(GUI_MainWindow->window, &mask, &GUI_MainWindow->style->white, (gchar **) XPM_background); /* Create the drawing area */ drawing_area = gtk_drawing_area_new(); /* Signals used to handle backing pixmap */ gtk_signal_connect(GTK_OBJECT(drawing_area), "expose_event", (GtkSignalFunc) ExposeEvent, NULL); gtk_signal_connect(GTK_OBJECT(drawing_area), "button_press_event", (GtkSignalFunc) ButtonPressEvent, NULL); gtk_widget_set_events(drawing_area, GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK); gtk_drawing_area_size(GTK_DRAWING_AREA(drawing_area), 261, 96); gtk_container_add(GTK_CONTAINER(GUI_MainWindow), drawing_area); gdk_draw_pixmap(drawing_area->window, drawing_area->style->fg_gc[GTK_WIDGET_STATE(drawing_area)], Pixmap, 0, 0, 0, 0, 261, 96); gtk_widget_shape_combine_mask(GUI_MainWindow, mask, 0, 0); gtk_signal_connect(GTK_OBJECT(GUI_MainWindow), "destroy", GTK_SIGNAL_FUNC(_MainExit), NULL); Menu = CreateMenu(); OptionsDialog = CreateOptionsDialog(); AboutDialog = CreateAboutDialog(); GUI_CreateSMSWindow(); GUI_CreateContactsWindow(); GUI_CreateNetmonWindow(); GUI_CreateDTMFWindow(); GUI_CreateSpeedDialWindow(); GUI_CreateXkeybWindow(); GUI_CreateCalendarWindow(); GUI_CreateLogosWindow(); GUI_CreateXringWindow(); GUI_CreateDataWindow(); CreateErrorDialog(&errorDialog, GUI_MainWindow); CreateInfoDialog(&infoDialog, GUI_MainWindow); CreateInCallDialog(); act.sa_handler = RemoveZombie; sigemptyset(&(act.sa_mask)); act.sa_flags = SA_NOCLDSTOP; sigaction(SIGCHLD, &act, NULL); #if __unices__ act.sa_handler = SIG_IGN; sigemptyset(&(act.sa_mask)); sigaction(SIGALRM, &act, NULL); #endif gtk_widget_show_all(GUI_MainWindow); GUI_Refresh(); GUI_InitPhoneMonitor(); pthread_create(&monitor_th, NULL, GUI_Connect, NULL); gtk_timeout_add(1000, (GtkFunction) Update, GUI_MainWindow); hiddenCallDialog = 0; } static void SplashScreen(void) { GtkWidget *pixmap, *fixed; GdkPixmap *gdk_pixmap; GdkBitmap *mask; GtkStyle *style; SplashWindow = gtk_window_new(GTK_WINDOW_POPUP); gtk_widget_realize(SplashWindow); gtk_widget_set_usize(SplashWindow, 475, 160); gtk_window_position(GTK_WINDOW(SplashWindow), GTK_WIN_POS_CENTER); style = gtk_widget_get_default_style(); gdk_pixmap = gdk_pixmap_create_from_xpm_d(SplashWindow->window, &mask, &style->bg[GTK_STATE_NORMAL], XPM_logo); pixmap = gtk_pixmap_new(gdk_pixmap, mask); fixed = gtk_fixed_new(); gtk_widget_set_usize(fixed, 261, 96); gtk_fixed_put(GTK_FIXED(fixed), pixmap, 0, 0); gtk_container_add(GTK_CONTAINER(SplashWindow), fixed); gtk_widget_shape_combine_mask(SplashWindow, mask, 0, 0); gtk_widget_show_all(SplashWindow); } static gint RemoveSplash(GtkWidget * Win) { if (GTK_WIDGET_VISIBLE(SplashWindow)) { gtk_timeout_remove(splashRemoveHandler); gtk_widget_hide(SplashWindow); gtk_widget_destroy(SplashWindow); return TRUE; } return FALSE; } static void ReadConfig(void) { if (GN_ERR_NONE != gn_lib_phoneprofile_load( NULL, &statemachine )) exit(-1); xgnokiiConfig.model = statemachine->config.model; xgnokiiConfig.port = statemachine->config.port_device; xgnokiiConfig.connection = statemachine->config.connection_type; xgnokiiConfig.initlength = statemachine->config.init_length; xgnokiiConfig.bindir = gn_lib_cfg_get("global", "bindir"); if (!xgnokiiConfig.bindir) xgnokiiConfig.bindir = gn_lib_cfg_get("gnokiid", "bindir"); if (!xgnokiiConfig.bindir) xgnokiiConfig.bindir = g_strdup(SBINDIR); if (gn_lib_cfg_get("xgnokii", "allow_breakage")) xgnokiiConfig.allowBreakage = atoi(gn_lib_cfg_get("xgnokii", "allow_breakage")); else xgnokiiConfig.allowBreakage = 0; max_phonebook_number_length = max_phonebook_sim_number_length = GN_PHONEBOOK_NUMBER_MAX_LENGTH; GUI_ReadXConfig(); max_phonebook_name_length = GNOKII_MIN(GN_PHONEBOOK_NAME_MAX_LENGTH, atoi(xgnokiiConfig.maxPhoneLen) + 1); max_phonebook_sim_name_length = GNOKII_MIN(GN_PHONEBOOK_NAME_MAX_LENGTH, atoi(xgnokiiConfig.maxSIMLen) + 1); #ifndef WIN32 xgnokiiConfig.xgnokiidir = DefaultXGnokiiDir; #endif xgnokiiConfig.callerGroups[0] = xgnokiiConfig.callerGroups[1] = xgnokiiConfig.callerGroups[2] = xgnokiiConfig.callerGroups[3] = xgnokiiConfig.callerGroups[4] = xgnokiiConfig.callerGroups[5] = NULL; xgnokiiConfig.smsSets = 0; } int main(int argc, char *argv[]) { /* For GNU gettext */ #ifdef ENABLE_NLS setlocale(LC_ALL, ""); bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR); textdomain(GETTEXT_PACKAGE); #endif gtk_init(&argc, &argv); gn_elog_handler = NULL; /* Show the splash screen. */ SplashScreen(); /* Remove it after a while. */ ReadConfig(); TopLevelWindow(); splashRemoveHandler = gtk_timeout_add(2000, (GtkFunction) RemoveSplash, (gpointer) SplashWindow); gtk_main(); return (0); } gnokii-0.6.31/xgnokii/xgnokii_contacts.h0000644000175000017500000001157011666163120016376 0ustar leoleo/* $Id$ X G N O K I I A Linux/Unix GUI for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999 Pavel Janík ml., Hugh Blemings Copyright (C) 1999-2005 Jan Derfinak. Copyright (C) 2001-2003 Pawel Kot Copyright (C) 2002 BORBELY Zoltan, Markus Plail */ #ifndef XGNOKII_CONTACTS_H #define XGNOKII_CONTACTS_H #include #include "misc.h" #include "gnokii.h" #define IO_BUF_LEN 1024 /* Structure to keep memory status information */ typedef struct { int MaxME; /* Maximum Phone memory entries. */ int UsedME; /* Actualy used Phone memory entries. */ int FreeME; /* FreeME = MaxME - UsedME */ int MaxSM; /* Maximum SIM memory entries. */ int UsedSM; int FreeSM; } MemoryStatus; /* Array to hold contacts entry */ typedef GPtrArray *ContactsMemory; /* Structure to keep contacts memory entry status */ typedef enum { E_Unchanged, /* Entry is not empty and is unchanged. */ E_Changed, /* Entry is not empty and is changed. */ E_Deleted, /* Entry was deleted. */ E_Empty /* Entry is empty. */ } EntryStatus; /* Memory entry data */ typedef struct { gn_phonebook_entry entry; /* Phonebook entry self. */ EntryStatus status; /* Entry status. */ } PhonebookEntry; /* Structure to hold information of Edit and New dialogs */ typedef struct { PhonebookEntry *pbEntry; GtkWidget *dialog; GtkWidget *name; GtkWidget *number; GtkWidget *extended; GtkWidget *memoryBox; GtkWidget *memoryTypePhone; GtkWidget *memoryTypeSIM; GtkWidget *group; GtkWidget *groupLabel; GtkWidget *groupMenu; gint newGroup; gint newType; gint row; } EditEntryData; typedef struct { PhonebookEntry *pbEntry; GtkWidget *dialog; GtkWidget *clist; gint row; } EditNumbersData; /* Structure to hold information for FindEntry dialog. */ typedef struct { GtkWidget *dialog; GtkWidget *pattern; GtkWidget *nameB; GtkWidget *numberB; } FindEntryData; /* Contains fileName for Export dialog. */ typedef struct { gchar *fileName; } ExportDialogData; /* Hold widgets for SelectContactDialog */ typedef struct { GtkWidget *dialog; GtkWidget *clist; /* list of contacts */ GtkWidget *clistScrolledWindow; GtkWidget *okButton; /* Ok and Cancel button widgets */ GtkWidget *cancelButton; } SelectContactData; /* Max length for status line. (Line that shows used/max information for memories). */ #define STATUS_INFO_LENGTH 40 /* Structure to hold information for status line (bottom line of window) */ typedef struct { GtkWidget *label; gchar text[STATUS_INFO_LENGTH]; /* Status line text. */ gint ch_ME:1; /* 1 if phone memory was changed */ gint ch_SM:1; /* 1 if phone SIM was changed */ } StatusInfo; /* Structure to hold information for progress dialog */ typedef struct { GtkWidget *dialog; GtkWidget *pbarME; GtkWidget *pbarSM; } ProgressDialog; /* Search type. */ typedef enum { FIND_NAME = 0, FIND_NUMBER } FindType; typedef struct { gchar pattern[GN_PHONEBOOK_NAME_MAX_LENGTH + 1]; gint lastRow; FindType type; } FindEntryStruct; typedef struct { GdkPixmap *simMemPix, *phoneMemPix; GdkBitmap *mask; } MemoryPixmaps; extern void GUI_CreateContactsWindow(void); extern void GUI_ShowContacts(void); /* return != 0 if user has unsaved changes in contacts memory */ extern gint GUI_ContactsIsChanged(void); /* return TRUE if Contacts memory was read from phone or from file */ extern bool GUI_ContactsIsIntialized(void); /* Read contacts from phone */ extern void GUI_ReadContacts(void); /* Save contacts to phone */ extern void GUI_SaveContacts(void); /* Create save question dialog and can end application */ extern void GUI_QuitSaveContacts(void); extern void GUI_RefreshContacts(void); /* Function take number and return name belonged to number. If no name is found, return NULL; Do not modify returned name! */ extern gchar *GUI_GetName(gchar * number); extern gchar *GUI_GetNameExact(gchar * number); extern gchar *GUI_GetNumber(gchar * name); /* Function show dialog with contacts and let select entries. See xgnokii_contacts.c for sample of use. */ extern SelectContactData *GUI_SelectContactDialog(void); extern void GUI_RefreshGroupMenu(void); extern PhonebookEntry *GUI_GetEntry(gn_memory_type, gint); void ExtPbkChanged(GtkWidget * widget, gpointer data); #endif gnokii-0.6.31/xgnokii/xgnokii.h0000644000175000017500000000503211666163120014474 0ustar leoleo/* $Id$ X G N O K I I A Linux/Unix GUI for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999 Pavel Janík ml., Hugh Blemings Copyright (C) 1999-2005 Jan Derfinak Copyright (C) 2001 Chris Kemp Copyright (C) 2002 Markus Plail Copyright (C) 2002-2004 Pawel Kot */ #ifndef XGNOKII_H #define XGNOKII_H #include #include "config.h" #include "misc.h" #include "gnokii.h" #define MAX_CALLER_GROUP_LENGTH 10 #define MAX_SMS_CENTER 10 #define MAX_BUSINESS_CARD_LENGTH 139 typedef struct { gchar *name; gchar *title; gchar *company; gchar *telephone; gchar *fax; gchar *email; gchar *address; } UserInf; typedef struct { gint initlength; /* Init length from the config file */ gchar *model; /* Model from the config file. */ gchar *port; /* Serial port from the config file */ gn_connection_type connection; /* Connection type from the config file */ const gchar *bindir; gchar *xgnokiidir; gchar *mailbox; /* Mailbox, where we can save SMS's */ gchar *maxSIMLen; /* Max length of names on SIM card */ gchar *maxPhoneLen; /* Max length of names in phone */ gchar *locale; /* Locale for the app translations */ gn_sms_message_center smsSetting[MAX_SMS_CENTER]; UserInf user; gint allowBreakage; gchar *callerGroups[6]; gint smsSets:4; bool alarmSupported:1; } XgnokiiConfig; /* Hold main configuration data for xgnokii */ extern XgnokiiConfig xgnokiiConfig; extern gint lastfoldercount, foldercount; extern char folders[GN_SMS_FOLDER_MAX_NUMBER][GN_SMS_MESSAGE_MAX_NUMBER]; extern gint max_phonebook_name_length; extern gint max_phonebook_number_length; extern gint max_phonebook_sim_name_length; extern gint max_phonebook_sim_number_length; extern void GUI_InitCallerGroupsInf(void); extern void GUI_InitSMSSettings(void); extern void GUI_ShowAbout(void); extern void MainExit(gchar *); #endif /* XGNOKII_H */ gnokii-0.6.31/xgnokii/xgnokii_common.c0000644000175000017500000002076611666163120016052 0ustar leoleo/* $Id$ X G N O K I I A Linux/Unix GUI for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999 Pavel Janik ml., Hugh Blemings & 1999-2005 Jan Derfinak. */ #include "config.h" #ifndef WIN32 # include # include # include # include #endif #include #include #include "misc.h" /* for _() */ #include "xgnokii_common.h" #include "xgnokii.h" #include "xpm/quest.xpm" #include "xpm/stop.xpm" #include "xpm/info.xpm" typedef struct { GUIEventType type; void (*func) (void); } GUIEvent; static GSList *guiEvents = NULL; inline void DeleteEvent(const GtkWidget * widget, const GdkEvent * event, const gpointer data) { gtk_widget_hide(GTK_WIDGET(widget)); } inline void CancelDialog(const GtkWidget * widget, const gpointer data) { gtk_widget_hide(GTK_WIDGET(data)); } void CreateErrorDialog(ErrorDialog * errorDialog, GtkWidget * window) { GtkWidget *button, *hbox, *pixmap; errorDialog->dialog = gtk_dialog_new(); gtk_window_set_title(GTK_WINDOW(errorDialog->dialog), _("Error")); gtk_window_set_modal(GTK_WINDOW(errorDialog->dialog), TRUE); gtk_window_position(GTK_WINDOW(errorDialog->dialog), GTK_WIN_POS_MOUSE); gtk_container_set_border_width(GTK_CONTAINER(errorDialog->dialog), 5); gtk_signal_connect(GTK_OBJECT(errorDialog->dialog), "delete_event", GTK_SIGNAL_FUNC(DeleteEvent), NULL); button = gtk_button_new_with_label(_("Cancel")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(errorDialog->dialog)->action_area), button, FALSE, FALSE, 0); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(CancelDialog), (gpointer) errorDialog->dialog); GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); gtk_widget_grab_default(button); gtk_widget_show(button); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(errorDialog->dialog)->vbox), hbox); gtk_widget_show(hbox); if (window) { pixmap = NewPixmap(stop_xpm, window->window, &window->style->bg[GTK_STATE_NORMAL]); gtk_box_pack_start(GTK_BOX(hbox), pixmap, FALSE, FALSE, 10); gtk_widget_show(pixmap); } errorDialog->text = gtk_label_new(""); gtk_box_pack_start(GTK_BOX(hbox), errorDialog->text, FALSE, FALSE, 10); gtk_widget_show(errorDialog->text); } void CreateInfoDialog(InfoDialog * infoDialog, GtkWidget * window) { GtkWidget *hbox, *pixmap; infoDialog->dialog = gtk_dialog_new(); gtk_window_set_title(GTK_WINDOW(infoDialog->dialog), _("Info")); gtk_window_set_modal(GTK_WINDOW(infoDialog->dialog), TRUE); gtk_window_position(GTK_WINDOW(infoDialog->dialog), GTK_WIN_POS_MOUSE); gtk_container_set_border_width(GTK_CONTAINER(infoDialog->dialog), 5); gtk_signal_connect(GTK_OBJECT(infoDialog->dialog), "delete_event", GTK_SIGNAL_FUNC(DeleteEvent), NULL); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(infoDialog->dialog)->vbox), hbox); gtk_widget_show_now(hbox); if (window) { pixmap = NewPixmap(info_xpm, window->window, &window->style->bg[GTK_STATE_NORMAL]); gtk_box_pack_start(GTK_BOX(hbox), pixmap, FALSE, FALSE, 10); gtk_widget_show_now(pixmap); } infoDialog->text = gtk_label_new(""); gtk_box_pack_start(GTK_BOX(hbox), infoDialog->text, FALSE, FALSE, 10); gtk_widget_show_now(infoDialog->text); } void CreateYesNoDialog(YesNoDialog * yesNoDialog, const GtkSignalFunc yesFunc, const GtkSignalFunc noFunc, GtkWidget * window) { GtkWidget *button, *hbox, *pixmap; yesNoDialog->dialog = gtk_dialog_new(); gtk_window_position(GTK_WINDOW(yesNoDialog->dialog), GTK_WIN_POS_MOUSE); gtk_window_set_modal(GTK_WINDOW(yesNoDialog->dialog), TRUE); gtk_container_set_border_width(GTK_CONTAINER(yesNoDialog->dialog), 5); gtk_signal_connect(GTK_OBJECT(yesNoDialog->dialog), "delete_event", GTK_SIGNAL_FUNC(DeleteEvent), NULL); button = gtk_button_new_with_label(_("Yes")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(yesNoDialog->dialog)->action_area), button, FALSE, TRUE, 0); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(yesFunc), (gpointer) yesNoDialog->dialog); GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); gtk_widget_grab_default(button); gtk_widget_show(button); button = gtk_button_new_with_label(_("No")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(yesNoDialog->dialog)->action_area), button, FALSE, TRUE, 0); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(noFunc), (gpointer) yesNoDialog->dialog); gtk_widget_show(button); button = gtk_button_new_with_label(_("Cancel")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(yesNoDialog->dialog)->action_area), button, FALSE, TRUE, 0); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(CancelDialog), (gpointer) yesNoDialog->dialog); gtk_widget_show(button); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(yesNoDialog->dialog)->vbox), hbox); gtk_widget_show(hbox); if (window) { pixmap = NewPixmap(quest_xpm, window->window, &window->style->bg[GTK_STATE_NORMAL]); gtk_box_pack_start(GTK_BOX(hbox), pixmap, FALSE, FALSE, 10); gtk_widget_show(pixmap); } yesNoDialog->text = gtk_label_new(""); gtk_box_pack_start(GTK_BOX(hbox), yesNoDialog->text, FALSE, FALSE, 10); gtk_widget_show(yesNoDialog->text); } GtkWidget *NewPixmap(gchar ** data, GdkWindow * window, GdkColor * background) { GtkWidget *wpixmap; GdkPixmap *pixmap; GdkBitmap *mask; pixmap = gdk_pixmap_create_from_xpm_d(window, &mask, background, data); wpixmap = gtk_pixmap_new(pixmap, mask); return wpixmap; } gint LaunchProcess(const gchar * p, const gchar * arg, const gint infile, const gint outfile, const gint errfile) { pid_t pid; if (p == 0) return (1); pid = fork(); if (pid == -1) return (-1); if (pid == 0) { pid = getpid(); setpgid(pid, pid); if (getuid() != geteuid()) seteuid(getuid()); signal(SIGINT, SIG_DFL); signal(SIGQUIT, SIG_DFL); signal(SIGTSTP, SIG_DFL); signal(SIGTTIN, SIG_DFL); signal(SIGTTOU, SIG_DFL); signal(SIGCHLD, SIG_DFL); if (infile != STDIN_FILENO) { dup2(infile, STDIN_FILENO); close(infile); } if (outfile != STDOUT_FILENO) { dup2(outfile, STDOUT_FILENO); close(outfile); } if (errfile != STDERR_FILENO) { dup2(errfile, STDERR_FILENO); close(errfile); } execlp(p, p, arg, NULL); g_print(_("Can't exec %s\n"), p); execlp("/bin/false", p, NULL); return (-1); } setpgid(pid, pid); return (0); } void RemoveZombie(const gint sign) { gint status; wait(&status); } inline gint strrncmp(const gchar * const s1, const gchar * const s2, size_t n) { gint l1 = strlen(s1); gint l2 = strlen(s2); if (l1 == 0 && l2 != 0) return (-1); else if (l1 != 0 && l2 == 0) return (1); while (l1-- > 0 && l2-- > 0 && n-- > 0) { if (s1[l1] < s2[l2]) return (-1); else if (s1[l1] > s2[l2]) return (1); } return (0); } inline void GUI_Refresh(void) { while (gtk_events_pending()) gtk_main_iteration(); } inline void SetSortColumn(GtkWidget * widget, SortColumn * data) { gtk_clist_set_sort_column(GTK_CLIST(data->clist), data->column); gtk_clist_sort(GTK_CLIST(data->clist)); } inline void GUIEventAdd(GUIEventType type, void (*func) (void)) { GUIEvent *event = g_malloc(sizeof(GUIEvent)); event->type = type; event->func = func; guiEvents = g_slist_append(guiEvents, event); } bool GUIEventRemove(GUIEventType type, void (*func) (void)) { GUIEvent event; GSList *list; event.type = type; event.func = func; list = g_slist_find(guiEvents, &event); if (list) { g_print("Nasiel som\n"); guiEvents = g_slist_remove_link(guiEvents, list); g_slist_free_1(list); return (TRUE); } return (FALSE); } static inline void CallEvent(gpointer data, gpointer user_data) { GUIEvent *event = (GUIEvent *) data; if (event->type == GPOINTER_TO_INT(user_data)) event->func(); } inline void GUIEventSend(GUIEventType type) { g_slist_foreach(guiEvents, CallEvent, GINT_TO_POINTER(type)); } gnokii-0.6.31/xgnokii/xgnokii_dtmf.h0000644000175000017500000000173611666163120015515 0ustar leoleo/* $Id$ X G N O K I I A Linux/Unix GUI for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999 Pavel Janík ml., Hugh Blemings & 1999-2005 Jan Derfinak. */ #ifndef XGNOKII_DTMF_H #define XGNOKII_DTMF_H extern void GUI_CreateDTMFWindow(); extern void GUI_ShowDTMF(); #endif gnokii-0.6.31/xgnokii/xgnokii.pc.in0000644000175000017500000000030611666163120015253 0ustar leoleoprefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ xgnokiidir=@prefix@/share/@XPACKAGE@ Name: xgnokii Description: GTK2 gnokii library interface Version: @XVERSION@ gnokii-0.6.31/xgnokii/xgnokii_xring.h0000644000175000017500000000172711666163120015712 0ustar leoleo/* $Id$ X G N O K I I A Linux/Unix GUI for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999 Tomi Ollila Copyright (C) 2003 BORBELY Zoltan */ #ifndef XGNOKII_XRING_H #define XGNOKII_XRING_H extern void GUI_CreateXringWindow(); extern void GUI_ShowXring(); #endif gnokii-0.6.31/xgnokii/xgnokii_xring.c0000644000175000017500000006540411666163120015707 0ustar leoleo/* $Id$ X G N O K I I A Linux/Unix GUI for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999 Tomi Ollila Copyright (C) 2003 BORBELY Zoltan Copyright (C) 2004 Pawel Kot Copyright (C) 2005 Jan Derfinak */ /* * Id: xring.c * * Author: Tomi Ollila * * Copyright (c) 1999 Tomi Ollila * All rights reserved * * Created: Fri Aug 13 17:11:06 1999 too * Last modified: Sun Aug 29 18:50:24 1999 too * * INFO * This program is a quickly written GTK software to interactively create * tunes for some purpote, like cellular phone ring tones. * * Currently the code looks like somebody is just learning (by doing) how * to write GTK programs, and that is just what has happened. Expect * more polished versions ACN * * HISTORY */ #include "config.h" #ifndef WIN32 # include #endif #include #include #include #include #include #include "misc.h" #include "gnokii.h" #include "xgnokii.h" #include "xgnokii_common.h" #include "xgnokii_lowlevel.h" #include "xpm/New.xpm" #include "xpm/Send.xpm" #include "xpm/Read.xpm" #include "xpm/Delete.xpm" #include "xpm/Open.xpm" #include "xpm/Save.xpm" #include "xpm/Play.xpm" static char *blackparts[] = { ".+@@@@@@@@@@@@+.", "+.+@@@@@@@@@@+.+", "@+.+@@@@@@@@+.+@", "@@+.+@@@@@@+.+@@", "@@@+........+@@@", "@@@@........@@@@" }; static char *whitestarts[][3] = { {" ++++++++++++++++", " +..............+", "+++++++++..............+"}, { " ++++++++ ", " +......+ ", "+++++++++......+++++++++"}, { "++++++++++++++++ ", "+..............+ ", "+..............+++++++++"} }; static char *whiteend[] = { "+......................+", "+@....................@+", "+@@..................@@+", "++@@@..............@@@++", "++++++++++++++++++++++++" }; static void writecolors(char *buf0, char *col0, char *buf1, char *col1, char *buf2, char *col2) { sprintf(buf0, ". c #%s", col0); sprintf(buf1, "+ c #%s", col1); sprintf(buf2, "@ c #%s", col2); } typedef struct { GdkPixmap *pixmap; GdkBitmap *mask; } PixmapAndMask; static int createpixmap(GtkWidget * window, PixmapAndMask * pam, char **a); int greateWhitePixmap(GtkWidget * window, PixmapAndMask * pam, char *start[], char *color0, char *color1, char *color2) { int i = 0, j = 0; char *a[160 + 5]; char col0[20]; char col1[20]; char col2[20]; a[i++] = "24 160 4 1"; a[i++] = " c None"; writecolors(col0, color0, col1, color1, col2, color2); a[i++] = col0; a[i++] = col1; a[i++] = col2; a[i++] = start[0]; for (j = 0; j < 99; j++) a[i++] = start[1]; a[i++] = start[2]; for (j = 0; j < 54; j++) a[i++] = whiteend[0]; a[i++] = whiteend[1]; a[i++] = whiteend[1]; a[i++] = whiteend[2]; a[i++] = whiteend[3]; a[i++] = whiteend[4]; assert(i == 165); return createpixmap(window, pam, a); } int greateBlackPixmap(GtkWidget * window, PixmapAndMask * pam, char *color0, char *color1, char *color2) { int i = 0, j = 0; char *a[160 + 4]; char col0[20]; char col1[20]; char col2[20]; a[i++] = "16 100 3 1"; writecolors(col0, color0, col1, color1, col2, color2); a[i++] = col0; a[i++] = col1; a[i++] = col2; for (j = 0; j < 5; j++) a[i++] = blackparts[j]; for (j = 0; j < 90; j++) a[i++] = blackparts[5]; for (j = 4; j >= 0; j--) a[i++] = blackparts[j]; assert(i == 104); return createpixmap(window, pam, a); } static int createpixmap(GtkWidget * window, PixmapAndMask * pam, char **a) { GtkStyle *style = gtk_widget_get_default_style(); pam->pixmap = gdk_pixmap_create_from_xpm_d(window->window, &pam->mask, &style-> bg[GTK_STATE_NORMAL], a); return (int) pam->pixmap; /* (to) NULL or not (to) NULL */ } enum { KIE_BLACK, KIE_BLACKSEL, KIE_WHITEL, KIE_WHITELSEL, KIE_WHITEM, KIE_WHITEMSEL, KIE_WHITER, KIE_WHITERSEL, KIE_COUNT }; #define WHITE_COUNT 28 /* mit? on pianonkosketin englanniksi */ struct GUI { GtkWidget *w; GtkWidget *f; GtkAccelGroup *accel; GtkItemFactory *item_factory; GtkWidget *menu; GtkWidget *toolbar; GtkWidget *vbox; GtkWidget *rlist_combo; GtkWidget *name; GtkWidget *tempo_combo; ErrorDialog error_dialog; PixmapAndMask pam[KIE_COUNT]; GtkWidget *blacks[WHITE_COUNT - 1]; GtkWidget *whites[WHITE_COUNT]; int focus; int pressed; gint32 presstime; gint32 releasetime; gchar *file_name; int volume; gn_ringtone ringtone; gn_ringtone_list ringtone_list; }; static struct GUI gi = {0}; static char xwhi[] = {6, 4, 2, 6, 4, 4, 2}; static char *beats_per_minute[] = { " 25", " 28", " 31", " 35", " 40", " 45", " 50", " 56", " 63", " 70", " 80", " 90", "100", "112", "125", "140", "160", "180", "200", "225", "250", "285", "320", "355", "400", "450", "500", "565", "635", "715", "800", "900", NULL}; #define BLACK_PRESSED 64 #define WHITE_PRESSED 128 static void play_tone(int frequency, int volume, int usec) { PhoneEvent *e = g_malloc(sizeof(PhoneEvent)); D_PlayTone data; /* prepare data for event */ data.frequency = frequency; data.volume = volume; data.usec = usec; e->event = Event_PlayTone; e->data = &data; /* launch event and wait for completition */ GUI_InsertEvent(e); if (usec > 0) while (gtk_events_pending()) gtk_main_iteration_do(FALSE); pthread_mutex_lock(&ringtoneMutex); pthread_cond_wait(&ringtoneCond, &ringtoneMutex); pthread_mutex_unlock(&ringtoneMutex); } static gn_error ringtone_event(int event, gn_ringtone *ringtone) { PhoneEvent *e = g_malloc(sizeof(PhoneEvent)); D_Ringtone data; /* prepare data for event */ data.ringtone = ringtone; e->event = event; e->data = &data; /* launch event and wait for completition */ GUI_InsertEvent(e); pthread_mutex_lock(&ringtoneMutex); pthread_cond_wait(&ringtoneCond, &ringtoneMutex); pthread_mutex_unlock(&ringtoneMutex); return data.status; } static void get_ringtone_list(gn_ringtone_list *rlist) { PhoneEvent *e = g_malloc(sizeof(PhoneEvent)); /* prepare data for event */ e->event = Event_GetRingtoneList; e->data = rlist; /* launch event and wait for completition */ GUI_InsertEvent(e); pthread_mutex_lock(&ringtoneMutex); pthread_cond_wait(&ringtoneCond, &ringtoneMutex); pthread_mutex_unlock(&ringtoneMutex); } static void set_pixmap(struct GUI *gui, int flag) { int i = gui->pressed & ~(BLACK_PRESSED | WHITE_PRESSED); int j; if (gui->pressed & BLACK_PRESSED) { j = flag ? KIE_BLACKSEL : KIE_BLACK; gtk_pixmap_set(GTK_PIXMAP(gui->blacks[i]), gui->pam[j].pixmap, gui->pam[j].mask); } else { j = xwhi[i % 7] + (flag ? 1 : 0); gtk_pixmap_set(GTK_PIXMAP(gui->whites[i]), gui->pam[j].pixmap, gui->pam[j].mask); } } static void tone_stop(struct GUI *gui) { int usec; if (!gui->pressed) return; usec = 1000 * (gui->releasetime - gui->presstime); set_pixmap(gui, FALSE); gui->pressed = 0; play_tone(0, 0, -1); if (gui->releasetime < gui->presstime) { if (gui->ringtone.notes_count) gui->ringtone.notes_count--; return; } gn_ringtone_set_duration(&gui->ringtone, gui->ringtone.notes_count ? gui->ringtone.notes_count - 1 : 0, usec); #if 0 printf("%d %d %3d\n", gui->ringtone.notes[gui->ringtone.notes_count - 1].note / 14, gui->ringtone.notes[gui->ringtone.notes_count - 1].note % 14, gui->ringtone.notes[gui->ringtone.notes_count - 1].duration); #endif } static void tone_start(struct GUI *gui) { int note, pressed, freq, usec; if (!gui->pressed) return; set_pixmap(gui, TRUE); pressed = gui->pressed & ~(BLACK_PRESSED | WHITE_PRESSED); if (gui->pressed & WHITE_PRESSED) { note = 14 * (pressed / 7) + 2 * (pressed % 7); } else { note = 14 * (pressed / 7) + 2 * (pressed % 7) + 1; } gui->ringtone.notes[gui->ringtone.notes_count].note = note; gui->ringtone.notes[gui->ringtone.notes_count].duration = 0; gui->ringtone.notes_count++; gn_ringtone_get_tone(&gui->ringtone, gui->ringtone.notes_count - 1, &freq, &usec); play_tone(freq, gui->volume, -1); if (gui->ringtone.notes_count >= GN_RINGTONE_MAX_NOTES - 1) { gui->pressed = 0; return; } } static void load_ringtone_list(void) { GList *list; int i, uidx; char **userdef; gn_ringtone_info *ri; get_ringtone_list(&gi.ringtone_list); userdef = g_new0(char *, gi.ringtone_list.userdef_count); list = NULL; i = 0; while (i < gi.ringtone_list.count) { if (!gi.ringtone_list.ringtone[i].readable && !gi.ringtone_list.ringtone[i].writable) { memmove(gi.ringtone_list.ringtone + i, gi.ringtone_list.ringtone + i + 1, (GN_RINGTONE_MAX_COUNT - i - 1) * sizeof(gn_ringtone_info)); gi.ringtone_list.count--; continue; } uidx = gi.ringtone_list.ringtone[i].location - gi.ringtone_list.userdef_location; if (uidx >= 0 && uidx < gi.ringtone_list.userdef_count) { userdef[uidx] = g_strdup_printf(_("User #%d (%s)"), uidx, gi.ringtone_list.ringtone[i].name); list = g_list_append(list, userdef[uidx]); } else { list = g_list_append(list, gi.ringtone_list.ringtone[i].name); } i++; } for (i = 0; i < gi.ringtone_list.userdef_count; i++) { if (gi.ringtone_list.count >= GN_RINGTONE_MAX_COUNT) break; if (userdef[i]) continue; ri = gi.ringtone_list.ringtone + gi.ringtone_list.count++; ri->location = gi.ringtone_list.userdef_location + i; ri->name[0] = '\0'; ri->user_defined = 0; ri->readable = 0; ri->writable = 1; userdef[i] = g_strdup_printf(_("User #%d (*EMPTY*)"), i); list = g_list_append(list, userdef[i]); } gtk_combo_set_popdown_strings(GTK_COMBO(gi.rlist_combo), list); for (i = 0; i < gi.ringtone_list.userdef_count; i++) if (userdef[i]) g_free(userdef[i]); } gn_ringtone_info *get_selected_ringtone(void) { GtkList *list; int pos = -1; list = GTK_LIST(GTK_COMBO(gi.rlist_combo)->list); if (list && list->selection) pos = gtk_list_child_position(list, list->selection->data); if (pos < 0 || pos > gi.ringtone_list.count) return NULL; return gi.ringtone_list.ringtone + pos; } static void get_ringtone_info(gn_ringtone *ringtone) { gn_ringtone_info *ri; char term; int x; if (!(ri = get_selected_ringtone())) return; ringtone->location = ri->location; snprintf(ringtone->name, sizeof(ringtone->name), "%s", gtk_entry_get_text(GTK_ENTRY(gi.name))); if (sscanf(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(gi.tempo_combo)->entry)), " %d %c", &x, &term) == 1) ringtone->tempo = x; } static void set_ringtone_info(gn_ringtone *ringtone) { char buf[256]; gtk_entry_set_text(GTK_ENTRY(gi.name), ringtone->name); snprintf(buf, sizeof(buf), "%3d", ringtone->tempo); gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(gi.tempo_combo)->entry), buf); } /* When invoked (via signal delete_event), terminates the application */ static void close_application(GtkWidget * widget, GdkEvent * event, gpointer data) { if (gi.file_name) { g_free(gi.file_name); gi.file_name = NULL; } play_tone(0, 0, -1); // gdk_key_repeat_restore(); gtk_widget_hide(gi.w); } static int key_map(gint keysym) { switch (keysym) { case GDK_q: /* h-1 */ case GDK_a: return 6 | WHITE_PRESSED; /* h-1 in awerty -keyboard */ case GDK_w: return 7 | WHITE_PRESSED; /* c */ case GDK_e: return 8 | WHITE_PRESSED; /* d */ case GDK_r: return 9 | WHITE_PRESSED; /* e */ case GDK_t: return 10 | WHITE_PRESSED; /* f */ case GDK_y: /* g */ case GDK_z: return 11 | WHITE_PRESSED; /* g in qwertz -keyboard */ case GDK_u: return 12 | WHITE_PRESSED; /* a */ case GDK_i: return 13 | WHITE_PRESSED; /* h */ case GDK_o: return 14 | WHITE_PRESSED; /* c+1 */ case GDK_p: return 15 | WHITE_PRESSED; /* d+1 */ case GDK_1: return 5 | BLACK_PRESSED; /* a-1# */ case GDK_3: return 7 | BLACK_PRESSED; /* c# */ case GDK_4: return 8 | BLACK_PRESSED; /* d# */ case GDK_6: return 10 | BLACK_PRESSED; /* f# */ case GDK_7: return 11 | BLACK_PRESSED; /* g# */ case GDK_8: return 12 | BLACK_PRESSED; /* a# */ case GDK_0: return 14 | BLACK_PRESSED; /* c+1# */ } return 0; } static gboolean button_press(GtkWidget * widget, GdkEvent * event, gpointer data) { GdkEventButton *e = (GdkEventButton *) event; int i; if (!gi.focus) { gtk_widget_grab_focus(gi.f); gi.focus = TRUE; } if (!gi.pressed) { guint x = e->x; guint y = e->y; gi.presstime = e->time; if (y < 100) /* a possible black */ for (i = 0; i < WHITE_COUNT - 1; i++) if (gi.blacks[i] && x - 16 - 24 * i < 16) { gi.pressed = i | BLACK_PRESSED; tone_start(&gi); return TRUE; /* this a subroutine and we can do more... */ } for (i = 0; i < WHITE_COUNT; i++) /* whites ? */ if (x - 24 * i < 24) { gi.pressed = i | WHITE_PRESSED; tone_start(&gi); return TRUE; } } return TRUE; } static gboolean button_release(GtkWidget * widget, GdkEvent * event, gpointer data) { gi.releasetime = event->button.time; tone_stop(&gi); return TRUE; } static gboolean focus_in(GtkWidget * widget, GdkEvent * event, gpointer data) { gi.focus = TRUE; // gdk_key_repeat_disable(); return TRUE; } static gboolean focus_out(GtkWidget * widget, GdkEvent * event, gpointer data) { tone_stop(&gi); gi.focus = FALSE; // gdk_key_repeat_restore(); return TRUE; } static gboolean key_press(GtkWidget * widget, GdkEvent * event, gpointer data) { int press = key_map(event->key.keyval); /* printf("key press %d\n", press); */ if (press && !gi.pressed && gi.focus) { gi.presstime = event->key.time; gi.pressed = press; tone_start(&gi); } return TRUE; } static gboolean key_release(GtkWidget * widget, GdkEvent * event, gpointer data) { int press = key_map(event->key.keyval); /* printf("key release %d\n", press); */ if (press && gi.pressed == press) { gi.releasetime = event->key.time; tone_stop(&gi); } return TRUE; } static void read_ringtone(GtkWidget *w, GtkFileSelection *fs) { gchar *file_name; gn_error err; if (gi.file_name) { g_free(gi.file_name); gi.file_name = NULL; } file_name = (gchar *) gtk_file_selection_get_filename(GTK_FILE_SELECTION(fs)); gtk_widget_hide(GTK_WIDGET(fs)); if ((err = gn_file_ringtone_read(file_name, &gi.ringtone)) != GN_ERR_NONE) { gchar *buf = g_strdup_printf(_("Error reading file\n%s"), gn_error_print(err)); gtk_label_set_text(GTK_LABEL(gi.error_dialog.text), buf); gtk_widget_show(gi.error_dialog.dialog); g_free(buf); return; } gi.file_name = g_strdup(file_name); set_ringtone_info(&gi.ringtone); } static void open_ringtone(GtkWidget *w) { GtkWidget *file_select; file_select = gtk_file_selection_new(_("Open ringtone...")); gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(file_select)->ok_button), "clicked", (GtkSignalFunc)read_ringtone, file_select); gtk_signal_connect_object(GTK_OBJECT(GTK_FILE_SELECTION(file_select)->cancel_button), "clicked", (GtkSignalFunc)gtk_widget_destroy, GTK_OBJECT(file_select)); gtk_file_selection_hide_fileop_buttons(GTK_FILE_SELECTION(file_select)); gtk_widget_show(file_select); } static void write_ringtone(GtkWidget *w, GtkFileSelection *fs) { gchar *file_name; gn_error err; file_name = (gchar *) gtk_file_selection_get_filename(GTK_FILE_SELECTION(fs)); gtk_widget_hide(GTK_WIDGET(fs)); if ((err = gn_file_ringtone_save(file_name, &gi.ringtone)) != GN_ERR_NONE) { gchar *buf = g_strdup_printf(_("Error writing file\n%s"), gn_error_print(err)); gtk_label_set_text(GTK_LABEL(gi.error_dialog.text), buf); gtk_widget_show(gi.error_dialog.dialog); g_free(buf); return; } if (gi.file_name) { g_free(gi.file_name); gi.file_name = NULL; } gi.file_name = g_strdup(file_name); } static void save_ringtone_as(GtkWidget *w) { GtkWidget *file_select; get_ringtone_info(&gi.ringtone); file_select = gtk_file_selection_new(_("Save ringtone as...")); gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(file_select)->ok_button), "clicked", (GtkSignalFunc)write_ringtone, file_select); gtk_signal_connect_object(GTK_OBJECT(GTK_FILE_SELECTION(file_select)->cancel_button), "clicked", (GtkSignalFunc)gtk_widget_destroy, GTK_OBJECT(file_select)); gtk_widget_show(file_select); } static void save_ringtone(GtkWidget *w) { gn_error err; get_ringtone_info(&gi.ringtone); if (!gi.file_name) { save_ringtone_as(w); return; } if ((err = gn_file_ringtone_save(gi.file_name, &gi.ringtone)) != GN_ERR_NONE) { gchar *buf = g_strdup_printf(_("Error writing file\n%s"), gn_error_print(err)); gtk_label_set_text(GTK_LABEL(gi.error_dialog.text), buf); gtk_widget_show(gi.error_dialog.dialog); g_free(buf); return; } } static void play_ringtone(GtkWidget *w) { int i, freq, usec; get_ringtone_info(&gi.ringtone); set_pixmap(&gi, FALSE); for (i = 0; i < gi.ringtone.notes_count; i++) { if (gi.ringtone.notes[i].note == 255) { gn_ringtone_get_tone(&gi.ringtone, i, &freq, &usec); play_tone(freq, gi.volume, usec - 10000); continue; } if (gi.ringtone.notes[i].note & 1) gi.pressed = BLACK_PRESSED + gi.ringtone.notes[i].note / 2; else gi.pressed = WHITE_PRESSED + gi.ringtone.notes[i].note / 2; set_pixmap(&gi, TRUE); gn_ringtone_get_tone(&gi.ringtone, i, &freq, &usec); play_tone(freq, gi.volume, usec - 30000); set_pixmap(&gi, FALSE); while (gtk_events_pending()) gtk_main_iteration_do(FALSE); usleep(20000); } play_tone(0, 0, 0); } static void get_ringtone(GtkWidget *w) { gn_error err; gn_ringtone_info *ri; ri = get_selected_ringtone(); if (!ri) { gchar *buf = g_strdup_printf(_("Empty ringtone list")); gtk_label_set_text(GTK_LABEL(gi.error_dialog.text), buf); gtk_widget_show(gi.error_dialog.dialog); g_free(buf); return; } gi.ringtone.location = ri->location; if ((err = ringtone_event(Event_GetRingtone, &gi.ringtone)) != GN_ERR_NONE) { gchar *buf = g_strdup_printf(_("Error getting ringtone\n%s"), gn_error_print(err)); gtk_label_set_text(GTK_LABEL(gi.error_dialog.text), buf); gtk_widget_show(gi.error_dialog.dialog); g_free(buf); return; } set_ringtone_info(&gi.ringtone); } static void set_ringtone(GtkWidget *w) { gn_error err; get_ringtone_info(&gi.ringtone); if ((err = ringtone_event(Event_SetRingtone, &gi.ringtone)) != GN_ERR_NONE) { gchar *buf = g_strdup_printf(_("Error setting ringtone\n%s"), gn_error_print(err)); gtk_label_set_text(GTK_LABEL(gi.error_dialog.text), buf); gtk_widget_show(gi.error_dialog.dialog); g_free(buf); return; } load_ringtone_list(); } static void delete_ringtone(GtkWidget *w) { gn_error err; gn_ringtone ringtone; memset(&ringtone, 0, sizeof(ringtone)); get_ringtone_info(&ringtone); if ((err = ringtone_event(Event_DeleteRingtone, &ringtone)) != GN_ERR_NONE) { gchar *buf = g_strdup_printf(_("Error deleting ringtone\n%s"), gn_error_print(err)); gtk_label_set_text(GTK_LABEL(gi.error_dialog.text), buf); gtk_widget_show(gi.error_dialog.dialog); g_free(buf); return; } load_ringtone_list(); } static void clear_ringtone(GtkWidget *w) { gi.volume = 1; if (gi.file_name) { g_free(gi.file_name); gi.file_name = NULL; } memset(&gi.ringtone, 0, sizeof(gn_ringtone)); gi.ringtone.tempo = 120; set_ringtone_info(&gi.ringtone); } void GUI_CreateXringWindow(void) { int i; GList *list; GtkItemFactoryEntry menu_items[] = { {NULL, NULL, NULL, 0, ""}, {NULL, "O", open_ringtone, 0, NULL}, {NULL, "S", save_ringtone, 0, NULL}, {NULL, NULL, save_ringtone_as, 0, NULL}, {NULL, NULL, NULL, 0, ""}, {NULL, NULL, get_ringtone, 0, NULL}, {NULL, NULL, set_ringtone, 0, NULL}, {NULL, NULL, delete_ringtone, 0, NULL}, {NULL, NULL, play_ringtone, 0, NULL}, {NULL, NULL, NULL, 0, ""}, {NULL, "W", close_application,0, NULL}, {NULL, NULL, NULL, 0, ""}, {NULL, NULL, clear_ringtone, 0, NULL} }; menu_items[0].path = _("/_File"); menu_items[1].path = _("/File/_Open"); menu_items[2].path = _("/File/_Save"); menu_items[3].path = _("/File/Save _as ..."); menu_items[4].path = _("/File/S1"); menu_items[5].path = _("/File/_Get ringtone"); menu_items[6].path = _("/File/Se_t ringtone"); menu_items[7].path = _("/File/Delete ringtone"); menu_items[8].path = _("/File/_Play"); menu_items[9].path = _("/File/S2"); menu_items[10].path = _("/File/_Close"); menu_items[11].path = _("/_Edit"); menu_items[12].path = _("/Edit/_Clear"); /* create toplevel window */ gi.w = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_wmclass(GTK_WINDOW(gi.w), "RingtoneWindow", "Xgnokii"); gtk_window_set_policy(GTK_WINDOW(gi.w), FALSE, FALSE, TRUE); gtk_window_set_title(GTK_WINDOW(gi.w), _("Ringtone")); gtk_container_set_border_width(GTK_CONTAINER(gi.w), 4); gtk_signal_connect(GTK_OBJECT(gi.w), "delete_event", GTK_SIGNAL_FUNC(close_application), &gi); gtk_widget_realize(gi.w); /* create vbox */ gi.vbox = gtk_vbox_new(FALSE, 1); gtk_container_add(GTK_CONTAINER(gi.w), gi.vbox); /* create menubar */ gi.accel = gtk_accel_group_new(); gtk_window_add_accel_group(GTK_WINDOW(gi.w), gi.accel); gi.item_factory = gtk_item_factory_new(GTK_TYPE_MENU_BAR, "
", gi.accel); gtk_item_factory_create_items(gi.item_factory, sizeof(menu_items) / sizeof(menu_items[0]), menu_items, NULL); gi.menu = gtk_item_factory_get_widget(gi.item_factory, "
"); gtk_box_pack_start(GTK_BOX(gi.vbox), gi.menu, FALSE, FALSE, 0); /* create toolbar */ gi.toolbar = gtk_toolbar_new(); gtk_toolbar_set_style(GTK_TOOLBAR(gi.toolbar), GTK_TOOLBAR_ICONS); gtk_toolbar_set_orientation(GTK_TOOLBAR(gi.toolbar), GTK_ORIENTATION_HORIZONTAL); gtk_toolbar_append_item(GTK_TOOLBAR(gi.toolbar), NULL, _("Clear ringtone"), NULL, NewPixmap(New_xpm, gi.w->window, &gi.w->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc)clear_ringtone, gi.toolbar); gtk_toolbar_append_space(GTK_TOOLBAR(gi.toolbar)); gtk_toolbar_append_item(GTK_TOOLBAR(gi.toolbar), NULL, _("Get ringtone"), NULL, NewPixmap(Read_xpm, gi.w->window, &gi.w->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc)get_ringtone, gi.toolbar); gtk_toolbar_append_item(GTK_TOOLBAR(gi.toolbar), NULL, _("Set ringtone"), NULL, NewPixmap(Send_xpm, gi.w->window, &gi.w->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc)set_ringtone, gi.toolbar); gtk_toolbar_append_item(GTK_TOOLBAR(gi.toolbar), NULL, _("Delete ringtone"), NULL, NewPixmap(Delete_xpm, gi.w->window, &gi.w->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc)delete_ringtone, gi.toolbar); gtk_toolbar_append_space(GTK_TOOLBAR(gi.toolbar)); gtk_toolbar_append_item(GTK_TOOLBAR(gi.toolbar), NULL, _("Import from file"), NULL, NewPixmap(Open_xpm, gi.w->window, &gi.w->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc)open_ringtone, gi.toolbar); gtk_toolbar_append_item(GTK_TOOLBAR(gi.toolbar), NULL, _("Export to file"), NULL, NewPixmap(Save_xpm, gi.w->window, &gi.w->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc)save_ringtone, gi.toolbar); gtk_toolbar_append_space(GTK_TOOLBAR(gi.toolbar)); gtk_toolbar_append_item(GTK_TOOLBAR(gi.toolbar), NULL, _("Play"), NULL, NewPixmap(Play_xpm, gi.w->window, &gi.w->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc)play_ringtone, gi.toolbar); gtk_toolbar_append_space(GTK_TOOLBAR(gi.toolbar)); gi.rlist_combo = gtk_combo_new(); gtk_combo_set_use_arrows_always(GTK_COMBO(gi.rlist_combo), 1); gtk_entry_set_editable(GTK_ENTRY(GTK_COMBO(gi.rlist_combo)->entry), FALSE); gtk_toolbar_append_widget(GTK_TOOLBAR(gi.toolbar), gi.rlist_combo, _("Select ringtone"), NULL); gtk_toolbar_append_space(GTK_TOOLBAR(gi.toolbar)); gi.name = gtk_entry_new(); gtk_toolbar_append_widget(GTK_TOOLBAR(gi.toolbar), gi.name, _("Ringtone name"), NULL); gtk_toolbar_append_space(GTK_TOOLBAR(gi.toolbar)); gi.tempo_combo = gtk_combo_new(); gtk_combo_set_use_arrows_always(GTK_COMBO(gi.tempo_combo), 1); gtk_widget_set_usize(gi.tempo_combo, 60, -1); gtk_entry_set_editable(GTK_ENTRY(GTK_COMBO(gi.tempo_combo)->entry), TRUE); gtk_entry_set_max_length(GTK_ENTRY(GTK_COMBO(gi.tempo_combo)->entry), 3); for (list = NULL, i = 0; beats_per_minute[i]; i++) list = g_list_append(list, beats_per_minute[i]); gtk_combo_set_popdown_strings(GTK_COMBO(gi.tempo_combo), list); gtk_toolbar_append_widget(GTK_TOOLBAR(gi.toolbar), gi.tempo_combo, _("Set tempo"), NULL); gtk_box_pack_start(GTK_BOX(gi.vbox), gi.toolbar, FALSE, FALSE, 0); /* create fixed */ gi.f = gtk_fixed_new(); gtk_fixed_set_has_window(GTK_FIXED(gi.f), TRUE); gtk_widget_set_usize(gi.f, 672, 160); gtk_box_pack_start(GTK_BOX(gi.vbox), gi.f, FALSE, FALSE, 0); gtk_widget_add_events(gi.f, GDK_FOCUS_CHANGE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK); GTK_WIDGET_SET_FLAGS(gi.f, GTK_CAN_FOCUS); gtk_signal_connect(GTK_OBJECT(gi.f), "key_press_event", GTK_SIGNAL_FUNC(key_press), &gi); gtk_signal_connect(GTK_OBJECT(gi.f), "key_release_event", GTK_SIGNAL_FUNC(key_release), &gi); /* gtk_signal_connect(GTK_OBJECT(gi.f), "focus_in_event", GTK_SIGNAL_FUNC(focus_in), &gi); gtk_signal_connect(GTK_OBJECT(gi.f), "focus_out_event", GTK_SIGNAL_FUNC(focus_out), &gi); */ gtk_signal_connect(GTK_OBJECT(gi.f), "enter_notify_event", GTK_SIGNAL_FUNC(focus_in), &gi); gtk_signal_connect(GTK_OBJECT(gi.f), "leave_notify_event", GTK_SIGNAL_FUNC(focus_out), &gi); gtk_signal_connect(GTK_OBJECT(gi.f), "button_press_event", GTK_SIGNAL_FUNC(button_press), &gi); gtk_signal_connect(GTK_OBJECT(gi.f), "button_release_event", GTK_SIGNAL_FUNC(button_release), &gi); greateBlackPixmap(gi.w, &gi.pam[KIE_BLACK], "333333", "666666", "999999"); greateBlackPixmap(gi.w, &gi.pam[KIE_BLACKSEL], "000000", "333333", "666666"); for (i = 0; i < 6; i += 2) { greateWhitePixmap(gi.w, &gi.pam[KIE_WHITEL + i], whitestarts[i / 2], "FFFFFF", "999999", "CCCCCC"); greateWhitePixmap(gi.w, &gi.pam[KIE_WHITELSEL + i], whitestarts[i / 2], "CCCCCC", "666666", "999999"); } for (i = 0; i < WHITE_COUNT - 1; i++) { PixmapAndMask *b = &gi.pam[KIE_BLACK]; if (xwhi[i % 7] == 2) continue; gi.blacks[i] = gtk_pixmap_new(b->pixmap, b->mask); gtk_fixed_put(GTK_FIXED(gi.f), gi.blacks[i], 16 + 24 * i, 0); } for (i = 0; i < WHITE_COUNT; i++) { int j = xwhi[i % 7]; gi.whites[i] = gtk_pixmap_new(gi.pam[j].pixmap, gi.pam[j].mask); gtk_fixed_put(GTK_FIXED(gi.f), gi.whites[i], 24 * i, 0); } CreateErrorDialog(&gi.error_dialog, gi.w); } void GUI_ShowXring(void) { clear_ringtone(NULL); load_ringtone_list(); gi.focus = FALSE; gi.pressed = 0; gtk_widget_show_all(gi.w); gtk_window_present(GTK_WINDOW(gi.w)); gtk_widget_grab_focus(gi.f); } gnokii-0.6.31/xgnokii/xgnokii_contacts.c0000644000175000017500000030464511666163120016401 0ustar leoleo/* $Id$ X G N O K I I A Linux/Unix GUI for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999 Pavel Janik ml., Hugh Blemings Copyright (C) 1999-2005 Jan Derfinak Copyright (C) 2002 Markus Plail, Pavel Machek Copyright (C) 2002-2004 Pawel Kot, BORBELY Zoltan Copyright (C) 2002-2003 Uli Hopp Copyright (C) 2003 Ladis Michl */ #include "config.h" #include #include "misc.h" #include #include #ifndef WIN32 # include #else # include #endif #include #include #include "gnokii.h" #include "xgnokii_contacts.h" #include "xgnokii.h" #include "xgnokii_common.h" #include "xgnokii_lowlevel.h" #include "xgnokii_sms.h" #include "xpm/Read.xpm" #include "xpm/Send.xpm" #include "xpm/Open.xpm" #include "xpm/Save.xpm" #include "xpm/New.xpm" #include "xpm/Duplicate.xpm" #include "xpm/Edit.xpm" #include "xpm/Delete.xpm" #include "xpm/Dial.xpm" #include "xpm/sim.xpm" #include "xpm/phone.xpm" #include "xpm/quest.xpm" #define strip_white(x) g_strjoinv("", g_strsplit(x, " ", 0)) typedef struct { GtkWidget *dialog; GtkWidget *entry; } DialVoiceDialog; typedef struct { GtkWidget *dialog; GtkWidget *entry; gint row; GtkWidget *gbutton; GtkWidget *mbutton; GtkWidget *wbutton; GtkWidget *fbutton; GtkWidget *hbutton; PhonebookEntry *pbEntry; } ExtPbkDialog; static GtkWidget *GUI_ContactsWindow; static bool contactsMemoryInitialized; static MemoryStatus memoryStatus; static ContactsMemory contactsMemory; /* Hold contacts. */ static GtkWidget *clist; static StatusInfo statusInfo; static ProgressDialog progressDialog = { NULL, NULL, NULL }; static ErrorDialog errorDialog = { NULL, NULL }; static FindEntryStruct findEntryStruct = { "", 0 }; static ExportDialogData exportDialogData = { NULL }; static MemoryPixmaps memoryPixmaps; static QuestMark questMark; static EditEntryData newEditEntryData = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; static EditEntryData editEditEntryData = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; static EditEntryData duplicateEditEntryData = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; static EditNumbersData editNumbersData = { NULL, NULL }; static EditEntryData editSubEntriesData = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; static void EditPbEntry(PhonebookEntry * pbEntry, gint row); static void NewPbEntry(PhonebookEntry * pbEntry); static void DuplicatePbEntry(PhonebookEntry * pbEntry); /* return != 0 if user has unsaved changes in contacts memory */ inline gint GUI_ContactsIsChanged(void) { return statusInfo.ch_ME | statusInfo.ch_SM; } /* return TRUE if Contacts memory was read from phone or from file */ inline bool GUI_ContactsIsIntialized(void) { return contactsMemoryInitialized; } void RefreshStatusInfo(void) { char p, s; if (statusInfo.ch_ME) p = '*'; else p = ' '; if (statusInfo.ch_SM) s = '*'; else s = ' '; g_snprintf(statusInfo.text, STATUS_INFO_LENGTH, _("SIM: %d/%d%c Phone: %d/%d%c"), memoryStatus.UsedSM, memoryStatus.MaxSM, s, memoryStatus.UsedME, memoryStatus.MaxME, p); gtk_label_set_text(GTK_LABEL(statusInfo.label), statusInfo.text); } static void RefreshEntryRow(PhonebookEntry *newPbEntry, gint row) { gchar string[100]; gtk_clist_set_text(GTK_CLIST(clist), row, 0, newPbEntry->entry.name); if (newPbEntry->entry.subentries_count > 0) { snprintf(string, 100, "%s *", newPbEntry->entry.number); gtk_clist_set_text(GTK_CLIST(clist), row, 1, string); } else gtk_clist_set_text(GTK_CLIST(clist), row, 1, newPbEntry->entry.number); if (newPbEntry->entry.memory_type == GN_MT_ME) { gtk_clist_set_text(GTK_CLIST(clist), row, 2, "P"); gtk_clist_set_pixmap(GTK_CLIST(clist), row, 2, memoryPixmaps.phoneMemPix, memoryPixmaps.mask); } else { gtk_clist_set_text(GTK_CLIST(clist), row, 2, "S"); gtk_clist_set_pixmap(GTK_CLIST(clist), row, 2, memoryPixmaps.simMemPix, memoryPixmaps.mask); } if (phoneMonitor.supported & PM_CALLERGROUP) gtk_clist_set_text(GTK_CLIST(clist), row, 3, xgnokiiConfig.callerGroups[newPbEntry->entry.caller_group]); else gtk_clist_set_text(GTK_CLIST(clist), row, 3, ""); gtk_clist_set_row_data(GTK_CLIST(clist), row, (gpointer) newPbEntry); } static inline void SetGroup0(GtkWidget * item, gpointer data) { ((EditEntryData *) data)->newGroup = 0; } static inline void SetGroup1(GtkWidget * item, gpointer data) { ((EditEntryData *) data)->newGroup = 1; } static inline void SetGroup2(GtkWidget * item, gpointer data) { ((EditEntryData *) data)->newGroup = 2; } static inline void SetGroup3(GtkWidget * item, gpointer data) { ((EditEntryData *) data)->newGroup = 3; } static inline void SetGroup4(GtkWidget * item, gpointer data) { ((EditEntryData *) data)->newGroup = 4; } static inline void SetGroup5(GtkWidget * item, gpointer data) { ((EditEntryData *) data)->newGroup = 5; } static inline void SetType0(GtkWidget * item, gpointer data) { ((EditEntryData *) data)->newType = 0; } static inline void SetType1(GtkWidget * item, gpointer data) { ((EditEntryData *) data)->newType = 1; } static inline void SetType2(GtkWidget * item, gpointer data) { ((EditEntryData *) data)->newType = 2; } static inline void SetType3(GtkWidget * item, gpointer data) { ((EditEntryData *) data)->newType = 3; } static inline void SetType4(GtkWidget * item, gpointer data) { ((EditEntryData *) data)->newType = 4; } static inline void SetType5(GtkWidget * item, gpointer data) { ((EditEntryData *) data)->newType = 5; } static inline void SetType6(GtkWidget * item, gpointer data) { ((EditEntryData *) data)->newType = 6; } static inline void SetType7(GtkWidget * item, gpointer data) { ((EditEntryData *) data)->newType = 7; } static inline void SetType8(GtkWidget * item, gpointer data) { ((EditEntryData *) data)->newType = 8; } static inline void SetType9(GtkWidget * item, gpointer data) { ((EditEntryData *) data)->newType = 9; } static inline void SetType10(GtkWidget * item, gpointer data) { ((EditEntryData *) data)->newType = 10; } PhonebookEntry *FindFreeEntry(gn_memory_type type) { PhonebookEntry *entry; gint start, end; register gint i; if (type == GN_MT_ME) { if (memoryStatus.FreeME == 0) return NULL; start = 0; end = memoryStatus.MaxME; } else { if (memoryStatus.FreeSM == 0) return NULL; start = memoryStatus.MaxME; end = memoryStatus.MaxME + memoryStatus.MaxSM; } for (i = start; i < end; i++) { entry = g_ptr_array_index(contactsMemory, i); if (entry->status == E_Empty || entry->status == E_Deleted) return entry; } return NULL; } inline PhonebookEntry *GUI_GetEntry(gn_memory_type type, gint nr) { if (nr < 1) return NULL; switch (type) { case GN_MT_ME: if (nr >= memoryStatus.MaxME) return NULL; break; case GN_MT_SM: if (nr >= memoryStatus.MaxSM) return NULL; nr += memoryStatus.MaxME; break; default: return NULL; } if (nr >= contactsMemory->len) return NULL; return g_ptr_array_index(contactsMemory, nr - 1); } static PhonebookEntry *ChangeEntryMemoryType(PhonebookEntry *oldPbEntry) { PhonebookEntry *newPbEntry; if (oldPbEntry->entry.memory_type == GN_MT_SM) { if ((newPbEntry = FindFreeEntry(GN_MT_ME)) == NULL) { gtk_label_set_text(GTK_LABEL(errorDialog.text), _("Can't change memory type!")); gtk_widget_show(errorDialog.dialog); return NULL; } newPbEntry->entry = oldPbEntry->entry; newPbEntry->entry.memory_type = GN_MT_ME; newPbEntry->status = E_Changed; oldPbEntry->status = E_Deleted; memoryStatus.UsedME++; memoryStatus.FreeME--; memoryStatus.UsedSM--; memoryStatus.FreeSM++; statusInfo.ch_ME = statusInfo.ch_SM = 1; } else { if ((newPbEntry = FindFreeEntry(GN_MT_SM)) == NULL) { gtk_label_set_text(GTK_LABEL(errorDialog.text), _("Can't change memory type!")); gtk_widget_show(errorDialog.dialog); return NULL; } newPbEntry->entry = oldPbEntry->entry; newPbEntry->entry.memory_type = GN_MT_SM; newPbEntry->status = E_Changed; oldPbEntry->status = E_Deleted; memoryStatus.UsedME--; memoryStatus.FreeME++; memoryStatus.UsedSM++; memoryStatus.FreeSM--; statusInfo.ch_ME = statusInfo.ch_SM = 1; } return newPbEntry; } static PhonebookEntry *EditPhonebookEntry(EditEntryData *data) { gchar **number; PhonebookEntry *current_entry = data->pbEntry; gn_memory_type chosen_memory_type; gint max_name_length, max_number_length; if (GTK_TOGGLE_BUTTON(data->memoryTypePhone)->active) { chosen_memory_type = GN_MT_ME; max_name_length = max_phonebook_name_length; max_number_length = max_phonebook_number_length; } else { chosen_memory_type = GN_MT_SM; max_name_length = max_phonebook_sim_name_length; max_number_length = max_phonebook_sim_number_length; } if (strlen(gtk_entry_get_text(GTK_ENTRY(data->name))) >= max_name_length) { GtkWidget *dialog; gint response; dialog = gtk_message_dialog_new (GTK_WINDOW(editEditEntryData.dialog), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL, _("Phonebook name will be truncated to\n%.*s"), max_name_length - 1, gtk_entry_get_text(GTK_ENTRY(data->name))); response = gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); if (response != GTK_RESPONSE_OK) return NULL; } if (chosen_memory_type != current_entry->entry.memory_type) { /* Memory Type changed SM -> ME or ME -> SM, then get the new entry filled in */ if ((current_entry = ChangeEntryMemoryType(current_entry)) == NULL) { return NULL; } } else { /* Memory type not changed -> current_entry will be "edited" directly */ current_entry->status = E_Changed; if (current_entry->entry.memory_type == GN_MT_ME) { statusInfo.ch_SM = 0; statusInfo.ch_ME = 1; } else { statusInfo.ch_SM = 1; statusInfo.ch_ME = 0; } } snprintf(current_entry->entry.name, max_name_length, "%s", gtk_entry_get_text(GTK_ENTRY(data->name))); if (phoneMonitor.supported & PM_EXTPBK) { number = g_malloc(sizeof(char) * max_number_length); gtk_label_get(GTK_LABEL(data->number), number); snprintf(current_entry->entry.number, max_number_length, "%s", number[0]); snprintf(current_entry->entry.subentries[0].data.number, max_number_length, "%s", number[0]); current_entry->entry.subentries[0].entry_type = GN_PHONEBOOK_ENTRY_Number; current_entry->entry.subentries[0].number_type = GN_PHONEBOOK_NUMBER_General; current_entry->entry.subentries_count = 1; g_free(number); } else { snprintf(current_entry->entry.number, max_number_length, "%s", gtk_entry_get_text(GTK_ENTRY(data->number))); } current_entry->entry.caller_group = data->newGroup; return current_entry; } static void CloseContacts(GtkWidget * w, gpointer data) { gtk_widget_hide(GUI_ContactsWindow); } /* I don't want to allow window to close */ static void ProgressDialogDeleteEvent(GtkWidget * w, gpointer data) { return; } static void CancelEditDialog(GtkWidget * widget, gpointer data) { ((EditEntryData *) data)->pbEntry->status = E_Empty; gtk_widget_hide(GTK_WIDGET(((EditEntryData *) data)->dialog)); } static void OkEditEntryDialog(GtkWidget * widget, gpointer data) { PhonebookEntry *current_entry; current_entry = EditPhonebookEntry((EditEntryData *) data); if (current_entry == NULL) return; gtk_clist_freeze(GTK_CLIST(clist)); RefreshEntryRow(current_entry, ((EditEntryData *) data)->row); gtk_clist_sort(GTK_CLIST(clist)); gtk_clist_thaw(GTK_CLIST(clist)); RefreshStatusInfo(); gtk_widget_hide(GTK_WIDGET(((EditEntryData *) data)->dialog)); ((EditEntryData *) data)->dialog = NULL; } static void OkDeleteEntryDialog(GtkWidget * widget, gpointer data) { PhonebookEntry *pbEntry; GList *sel; gint row; sel = GTK_CLIST(clist)->selection; gtk_clist_freeze(GTK_CLIST(clist)); while (sel != NULL) { row = GPOINTER_TO_INT(sel->data); pbEntry = (PhonebookEntry *) gtk_clist_get_row_data(GTK_CLIST(clist), row); sel = sel->next; pbEntry->status = E_Deleted; if (pbEntry->entry.memory_type == GN_MT_ME) { memoryStatus.UsedME--; memoryStatus.FreeME++; statusInfo.ch_ME = 1; } else { memoryStatus.UsedSM--; memoryStatus.FreeSM++; statusInfo.ch_SM = 1; } gtk_clist_remove(GTK_CLIST(clist), row); } RefreshStatusInfo(); gtk_widget_hide(GTK_WIDGET(data)); gtk_clist_thaw(GTK_CLIST(clist)); } static void OkNewEntryDialog(GtkWidget * widget, gpointer data) { gchar *clist_row[4] = {"", "", "", ""}; PhonebookEntry *current_entry; current_entry = EditPhonebookEntry((EditEntryData *) data); if (current_entry == NULL) return; ((EditEntryData *) data)->pbEntry = current_entry; gtk_clist_freeze(GTK_CLIST(clist)); gtk_clist_insert(GTK_CLIST(clist), 1, clist_row); RefreshEntryRow(current_entry, 1); gtk_clist_sort(GTK_CLIST(clist)); gtk_clist_thaw(GTK_CLIST(clist)); /* GN_MT_ME is set by default by the caller (this is why ME is always shown as modified even if adding a new SM entry) */ memoryStatus.UsedME++; memoryStatus.FreeME--; if (((EditEntryData *) data)->pbEntry->entry.memory_type == GN_MT_ME) { statusInfo.ch_ME = 1; } else { statusInfo.ch_SM = 1; } RefreshStatusInfo(); gtk_widget_hide(GTK_WIDGET(((EditEntryData *) data)->dialog)); ((EditEntryData *) data)->dialog = NULL; } static void OkChangeEntryDialog(GtkWidget * widget, gpointer data) { gint row; GList *sel; PhonebookEntry *newPbEntry, *oldPbEntry; sel = GTK_CLIST(clist)->selection; gtk_widget_hide(GTK_WIDGET(data)); gtk_clist_freeze(GTK_CLIST(clist)); while (sel != NULL) { row = GPOINTER_TO_INT(sel->data); oldPbEntry = (PhonebookEntry *) gtk_clist_get_row_data(GTK_CLIST(clist), row); newPbEntry = ChangeEntryMemoryType(oldPbEntry); if (newPbEntry) RefreshEntryRow(newPbEntry, row); sel = sel->next; } gtk_clist_sort(GTK_CLIST(clist)); gtk_clist_thaw(GTK_CLIST(clist)); RefreshStatusInfo(); } static void SearchEntry(void) { gchar *buf; gchar *entry; gint i; if (!contactsMemoryInitialized || *findEntryStruct.pattern == '\0') return; gtk_clist_unselect_all(GTK_CLIST(clist)); g_strup(findEntryStruct.pattern); gtk_clist_get_text(GTK_CLIST(clist), findEntryStruct.lastRow, findEntryStruct.type, &entry); i = (findEntryStruct.lastRow + 1) % (memoryStatus.MaxME + memoryStatus.MaxSM); while (findEntryStruct.lastRow != i) { buf = g_strdup(entry); g_strup(buf); if (strstr(buf, findEntryStruct.pattern)) { g_free(buf); findEntryStruct.lastRow = i; gtk_clist_select_row(GTK_CLIST(clist), (i + memoryStatus.MaxME + memoryStatus.MaxSM - 1) % (memoryStatus.MaxME + memoryStatus.MaxSM), findEntryStruct.type); gtk_clist_moveto(GTK_CLIST(clist), (i + memoryStatus.MaxME + memoryStatus.MaxSM - 1) % (memoryStatus.MaxME + memoryStatus.MaxSM), findEntryStruct.type, 0.5, 0.5); return; } g_free(buf); gtk_clist_get_text(GTK_CLIST(clist), i, findEntryStruct.type, &entry); i = (i + 1) % (memoryStatus.MaxME + memoryStatus.MaxSM); } gtk_label_set_text(GTK_LABEL(errorDialog.text), _("Can't find pattern!")); gtk_widget_show(errorDialog.dialog); } static void OkFindEntryDialog(GtkWidget * widget, gpointer data) { if (GTK_TOGGLE_BUTTON(((FindEntryData *) data)->nameB)->active) findEntryStruct.type = FIND_NAME; else findEntryStruct.type = FIND_NUMBER; strncpy(findEntryStruct.pattern, gtk_entry_get_text(GTK_ENTRY(((FindEntryData *) data)->pattern)), max_phonebook_number_length); findEntryStruct.pattern[max_phonebook_number_length] = '\0'; findEntryStruct.lastRow = 0; gtk_widget_hide(((FindEntryData *) data)->dialog); SearchEntry(); } void CreateGroupMenu(EditEntryData * data) { GtkWidget *item; if (data->groupMenu) { gtk_option_menu_remove_menu(GTK_OPTION_MENU(data->group)); if (GTK_IS_WIDGET(data->groupMenu)) gtk_widget_destroy(GTK_WIDGET(data->groupMenu)); data->groupMenu = NULL; } data->groupMenu = gtk_menu_new(); item = gtk_menu_item_new_with_label(xgnokiiConfig.callerGroups[0]); gtk_signal_connect(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(SetGroup0), (gpointer) data); gtk_widget_show(item); gtk_menu_append(GTK_MENU(data->groupMenu), item); item = gtk_menu_item_new_with_label(xgnokiiConfig.callerGroups[1]); gtk_signal_connect(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(SetGroup1), (gpointer) data); gtk_widget_show(item); gtk_menu_append(GTK_MENU(data->groupMenu), item); item = gtk_menu_item_new_with_label(xgnokiiConfig.callerGroups[2]); gtk_signal_connect(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(SetGroup2), (gpointer) data); gtk_widget_show(item); gtk_menu_append(GTK_MENU(data->groupMenu), item); item = gtk_menu_item_new_with_label(xgnokiiConfig.callerGroups[3]); gtk_signal_connect(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(SetGroup3), (gpointer) data); gtk_widget_show(item); gtk_menu_append(GTK_MENU(data->groupMenu), item); item = gtk_menu_item_new_with_label(xgnokiiConfig.callerGroups[4]); gtk_signal_connect(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(SetGroup4), (gpointer) data); gtk_widget_show(item); gtk_menu_append(GTK_MENU(data->groupMenu), item); item = gtk_menu_item_new_with_label(xgnokiiConfig.callerGroups[5]); gtk_signal_connect(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(SetGroup5), (gpointer) data); gtk_widget_show(item); gtk_menu_append(GTK_MENU(data->groupMenu), item); gtk_option_menu_set_menu(GTK_OPTION_MENU(data->group), data->groupMenu); } void CreateTypeMenu(EditEntryData * data) { GtkWidget *item; if (data->groupMenu) { gtk_option_menu_remove_menu(GTK_OPTION_MENU(data->group)); if (GTK_IS_WIDGET(data->groupMenu)) gtk_widget_destroy(GTK_WIDGET(data->groupMenu)); data->groupMenu = NULL; } data->groupMenu = gtk_menu_new(); item = gtk_menu_item_new_with_label(_("General")); gtk_signal_connect(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(SetType0), (gpointer) data); gtk_widget_show(item); gtk_menu_append(GTK_MENU(data->groupMenu), item); item = gtk_menu_item_new_with_label(_("Mobile")); gtk_signal_connect(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(SetType1), (gpointer) data); gtk_widget_show(item); gtk_menu_append(GTK_MENU(data->groupMenu), item); item = gtk_menu_item_new_with_label(_("Work")); gtk_signal_connect(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(SetType2), (gpointer) data); gtk_widget_show(item); gtk_menu_append(GTK_MENU(data->groupMenu), item); item = gtk_menu_item_new_with_label(_("Fax")); gtk_signal_connect(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(SetType3), (gpointer) data); gtk_widget_show(item); gtk_menu_append(GTK_MENU(data->groupMenu), item); item = gtk_menu_item_new_with_label(_("Home")); gtk_signal_connect(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(SetType4), (gpointer) data); gtk_widget_show(item); gtk_menu_append(GTK_MENU(data->groupMenu), item); item = gtk_menu_item_new_with_label(_("Note")); gtk_signal_connect(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(SetType5), (gpointer) data); gtk_widget_show(item); gtk_menu_append(GTK_MENU(data->groupMenu), item); item = gtk_menu_item_new_with_label(_("Postal")); gtk_signal_connect(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(SetType6), (gpointer) data); gtk_widget_show(item); gtk_menu_append(GTK_MENU(data->groupMenu), item); item = gtk_menu_item_new_with_label(_("Email")); gtk_signal_connect(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(SetType7), (gpointer) data); gtk_widget_show(item); gtk_menu_append(GTK_MENU(data->groupMenu), item); item = gtk_menu_item_new_with_label(_("Name")); gtk_signal_connect(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(SetType8), (gpointer) data); gtk_widget_show(item); gtk_menu_append(GTK_MENU(data->groupMenu), item); if ((g_strncasecmp(xgnokiiConfig.model, "6210", 4) != 0) && (g_strncasecmp(xgnokiiConfig.model, "7110", 4) != 0) && (g_strncasecmp(xgnokiiConfig.model, "6250", 4) != 0)) { item = gtk_menu_item_new_with_label(_("URL")); gtk_signal_connect(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(SetType9), (gpointer) data); gtk_widget_show(item); gtk_menu_append(GTK_MENU(data->groupMenu), item); } item = gtk_menu_item_new_with_label(_("Unknown")); gtk_signal_connect(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(SetType10), (gpointer) data); gtk_widget_show(item); gtk_menu_append(GTK_MENU(data->groupMenu), item); gtk_option_menu_set_menu(GTK_OPTION_MENU(data->group), data->groupMenu); } inline void GUI_RefreshGroupMenu(void) { if (newEditEntryData.group) CreateGroupMenu(&newEditEntryData); if (editEditEntryData.group) CreateGroupMenu(&editEditEntryData); if (duplicateEditEntryData.group) CreateGroupMenu(&duplicateEditEntryData); } void inttotype(gint int_type, gchar *type) { switch (int_type) { case 0: strcpy(type, _("General")); return; case 1: strcpy(type, _("Mobile")); return; case 2: strcpy(type, _("Work")); return; case 3: strcpy(type, _("Fax")); return; case 4: strcpy(type, _("Home")); return; case 5: strcpy(type, _("Note")); return; case 6: strcpy(type, _("Postal")); return; case 7: strcpy(type, _("Email")); return; case 8: strcpy(type, _("Name")); return; case 9: strcpy(type, _("URL")); return; case 10: strcpy(type, _("Unknown")); return; default: strcpy(type, ""); return; } } static void OkEditSubEntriesDialog(GtkWidget * clist, gpointer data) { gchar *clist_row[3], *temp_row1; gint row; row = editNumbersData.row; gtk_clist_get_text(GTK_CLIST(editNumbersData.clist), row, 0, &temp_row1); clist_row[0] = malloc(sizeof(gchar) * 2); strncpy(clist_row[0], temp_row1, 1); gtk_clist_remove(GTK_CLIST(editNumbersData.clist), row); clist_row[1] = strip_white(gtk_entry_get_text(GTK_ENTRY(editSubEntriesData.number))); clist_row[2] = malloc(sizeof(gchar) * 15); inttotype(editSubEntriesData.newType, clist_row[2]); gtk_clist_insert(GTK_CLIST(editNumbersData.clist), row, clist_row); gtk_widget_hide(GTK_WIDGET(editSubEntriesData.dialog)); } static void DeleteEditSubEntriesDialog(GtkWidget * clist, gpointer data) { gint row; row = editNumbersData.row; /* Do not allow to remove the 'main' entry */ if (row != 0) gtk_clist_remove(GTK_CLIST(editNumbersData.clist), row); gtk_widget_hide(GTK_WIDGET(editSubEntriesData.dialog)); } static void CancelEditSubEntriesDialog(GtkWidget * clist, gpointer data) { gtk_widget_hide(GTK_WIDGET(editSubEntriesData.dialog)); } static void CreateSubEntriesDialog(EditEntryData * editSubEntriesData, gchar * title, GtkSignalFunc okFunc, gint row) { GtkWidget *button, *label, *hbox; editSubEntriesData->dialog = gtk_dialog_new(); gtk_window_set_title(GTK_WINDOW(editSubEntriesData->dialog), _("Edit subentries")); gtk_window_set_modal(GTK_WINDOW(editSubEntriesData->dialog), TRUE); gtk_container_set_border_width(GTK_CONTAINER(editSubEntriesData->dialog), 10); gtk_signal_connect(GTK_OBJECT(editSubEntriesData->dialog), "delete_event", GTK_SIGNAL_FUNC(DeleteEvent), NULL); button = gtk_button_new_with_label(_("Ok")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(editSubEntriesData->dialog)->action_area), button, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(okFunc), GINT_TO_POINTER(row)); GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); gtk_widget_grab_default(button); gtk_widget_show(button); button = gtk_button_new_with_label(_("Cancel")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(editSubEntriesData->dialog)->action_area), button, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(CancelEditSubEntriesDialog), NULL); gtk_widget_show(button); button = gtk_button_new_with_label(_("Delete")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(editSubEntriesData->dialog)->action_area), button, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(DeleteEditSubEntriesDialog), NULL); gtk_widget_show(button); gtk_container_set_border_width(GTK_CONTAINER(GTK_DIALOG(editSubEntriesData->dialog)->vbox), 5); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(editSubEntriesData->dialog)->vbox), hbox); gtk_widget_show(hbox); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(editSubEntriesData->dialog)->vbox), hbox); gtk_widget_show(hbox); label = gtk_label_new(_("Number/Text:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); gtk_widget_show(label); editSubEntriesData->number = gtk_entry_new_with_max_length(max_phonebook_number_length); gtk_box_pack_end(GTK_BOX(hbox), editSubEntriesData->number, FALSE, FALSE, 2); gtk_widget_show(editSubEntriesData->number); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(editSubEntriesData->dialog)->vbox), hbox); gtk_widget_show(hbox); editSubEntriesData->groupLabel = gtk_label_new(_("Type:")); gtk_box_pack_start(GTK_BOX(hbox), editSubEntriesData->groupLabel, FALSE, FALSE, 2); editSubEntriesData->group = gtk_option_menu_new(); CreateTypeMenu(editSubEntriesData); gtk_box_pack_start(GTK_BOX(hbox), editSubEntriesData->group, TRUE, TRUE, 0); } gint typetoint(gchar *type) { if (g_strcasecmp(type, _("General")) == 0) return (0); if (g_strcasecmp(type, _("Mobile")) == 0) return (1); if (g_strcasecmp(type, _("Work")) == 0) return (2); if (g_strcasecmp(type, _("Fax")) == 0) return (3); if (g_strcasecmp(type, _("Home")) == 0) return (4); if (g_strcasecmp(type, _("Note")) == 0) return (5); if (g_strcasecmp(type, _("Postal")) == 0) return (6); if (g_strcasecmp(type, _("Email")) == 0) return (7); if (g_strcasecmp(type, _("Name")) == 0) return (8); if (g_strcasecmp(type, _("URL")) == 0) return (9); if (g_strcasecmp(type, _("Unknown")) == 0) return (10); return(-1); } static void EditSubEntries(GtkWidget * clist, gint row, gint column, GdkEventButton * event, gpointer data) { gchar *buf; gint type; if (editSubEntriesData.dialog == NULL) CreateSubEntriesDialog(&editSubEntriesData, _("Edit entry"), (GtkSignalFunc) OkEditSubEntriesDialog, row); gtk_clist_get_text(GTK_CLIST(clist), row, 1, &buf); editNumbersData.row = row; gtk_entry_set_text(GTK_ENTRY(editSubEntriesData.number), buf); gtk_clist_get_text(GTK_CLIST(clist), row, 2, &buf); type = typetoint(buf); editSubEntriesData.newType = type; gtk_option_menu_set_history(GTK_OPTION_MENU(editSubEntriesData.group), type); gtk_widget_show(editSubEntriesData.group); gtk_widget_show(editSubEntriesData.groupLabel); gtk_widget_show(GTK_WIDGET(editSubEntriesData.dialog)); } gint typetohex(gchar *type) { if (g_strcasecmp(type, _("General")) == 0) return (0x0a); if (g_strcasecmp(type, _("Mobile")) == 0) return (0x03); if (g_strcasecmp(type, _("Work")) == 0) return (0x06); if (g_strcasecmp(type, _("Fax")) == 0) return (0x04); if (g_strcasecmp(type, _("Home")) == 0) return (0x02); if (g_strcasecmp(type, _("Note")) == 0) return (0x0a); if (g_strcasecmp(type, _("Postal")) == 0) return (0x09); if (g_strcasecmp(type, _("Email")) == 0) return (0x08); if (g_strcasecmp(type, _("Name")) == 0) return (0x07); if (g_strcasecmp(type, _("URL")) == 0) return (0x2c); if (g_strcasecmp(type, _("Unknown")) == 0) return (0x00); return(-1); } static void OkEditNumbersDialog(GtkWidget * c_list, EditEntryData * editEntryData) { gchar *row_data; gint found, i, type; editEntryData->pbEntry->entry.subentries_count = 0; editEntryData->pbEntry->status = E_Changed; for (i = 0; i < GN_PHONEBOOK_SUBENTRIES_MAX_NUMBER; i++) { found = gtk_clist_get_text(GTK_CLIST(editNumbersData.clist), i, 0, &row_data); if (found != 1) break; if (g_strncasecmp(row_data, "*", 1) == 0) { found = gtk_clist_get_text(GTK_CLIST(editNumbersData.clist), i, 1, &row_data); memcpy(editEntryData->pbEntry->entry.number, row_data, strlen(row_data) + 1); } else { found = gtk_clist_get_text(GTK_CLIST(editNumbersData.clist), i, 1, &row_data); } memcpy(&editEntryData->pbEntry->entry.subentries[editEntryData->pbEntry->entry.subentries_count].data, row_data, strlen(row_data) + 1); found = gtk_clist_get_text(GTK_CLIST(editNumbersData.clist), i, 2, &row_data); if (found != 1) break; type = typetohex(row_data); switch (type) { /* FIXME: replace constants with the macros */ case 0x0a: if (g_strcasecmp(row_data, _("General")) == 0) { editEntryData->pbEntry->entry.subentries [editEntryData->pbEntry->entry.subentries_count].entry_type = GN_PHONEBOOK_ENTRY_Number; editEntryData->pbEntry->entry.subentries [editEntryData->pbEntry->entry.subentries_count].number_type = type; } else if (g_strcasecmp(row_data, _("Note")) == 0) { editEntryData->pbEntry->entry.subentries [editEntryData->pbEntry->entry.subentries_count].entry_type = type; editEntryData->pbEntry->entry.subentries [editEntryData->pbEntry->entry.subentries_count].number_type = 0x00; } break; case 0x02: case 0x03: case 0x04: case 0x06: editEntryData->pbEntry->entry.subentries [editEntryData->pbEntry->entry.subentries_count].entry_type = GN_PHONEBOOK_ENTRY_Number; editEntryData->pbEntry->entry.subentries [editEntryData->pbEntry->entry.subentries_count].number_type = type; break; case 0x07: case 0x08: case 0x09: case 0x2c: editEntryData->pbEntry->entry.subentries [editEntryData->pbEntry->entry.subentries_count].entry_type = type; editEntryData->pbEntry->entry.subentries [editEntryData->pbEntry->entry.subentries_count].number_type = 0x00; break; default: break; } editEntryData->pbEntry->entry.subentries_count++; } gtk_clist_clear(GTK_CLIST(editNumbersData.clist)); gtk_widget_hide(GTK_WIDGET(editNumbersData.dialog)); snprintf(editEntryData->pbEntry->entry.name, max_phonebook_name_length, "%s", gtk_entry_get_text(GTK_ENTRY(editEntryData->name))); editEntryData->pbEntry->entry.caller_group = editEntryData->newGroup; switch (editEntryData->row) { case -1: NewPbEntry(editEntryData->pbEntry); break; case -2: DuplicatePbEntry(editEntryData->pbEntry); break; default: EditPbEntry(editEntryData->pbEntry , editEntryData->row); break; } } static void NewEditNumbersDialog(GtkWidget * c_list, EditEntryData * editEntryData) { gchar *row[3]; switch (editNumbersData.pbEntry->entry.subentries_count) { case 0: strcpy(editNumbersData.pbEntry->entry.number, ""); row[0] = "*"; break; case GN_PHONEBOOK_SUBENTRIES_MAX_NUMBER: return; break; default: row[0] = ""; break; } row[1] = ""; row[2] = _("General"); gtk_clist_append(GTK_CLIST(editNumbersData.clist), row); strcpy(editNumbersData.pbEntry->entry.subentries[editNumbersData.pbEntry->entry.subentries_count].data.number, ""); editNumbersData.pbEntry->entry.subentries[editNumbersData.pbEntry->entry.subentries_count].entry_type = GN_PHONEBOOK_ENTRY_Number; editNumbersData.pbEntry->entry.subentries[editNumbersData.pbEntry->entry.subentries_count].number_type = GN_PHONEBOOK_NUMBER_General; editNumbersData.pbEntry->entry.subentries_count++; } static void EditNumbers(GtkWidget * widget, EditEntryData *editEntryData) { gchar *row[3]; register gint i; GtkWidget *button, *clistScrolledWindow; editNumbersData.dialog = NULL; if (editNumbersData.dialog == NULL) { editNumbersData.dialog = gtk_dialog_new(); gtk_window_set_title(GTK_WINDOW(editNumbersData.dialog), _("Numbers")); gtk_window_set_modal(GTK_WINDOW(editNumbersData.dialog), TRUE); gtk_window_set_default_size(GTK_WINDOW(editNumbersData.dialog), 350, 200); gtk_container_set_border_width(GTK_CONTAINER(editNumbersData.dialog), 10); gtk_signal_connect(GTK_OBJECT(editNumbersData.dialog), "delete_event", GTK_SIGNAL_FUNC(DeleteEvent), NULL); button = gtk_button_new_with_label(_("Ok")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(editNumbersData.dialog)->action_area), button, TRUE, TRUE, 10); gtk_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (OkEditNumbersDialog), editEntryData); GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); gtk_widget_grab_default(button); gtk_widget_show(button); button = gtk_button_new_with_label(_("New")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(editNumbersData.dialog)->action_area), button, TRUE, TRUE, 10); gtk_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (NewEditNumbersDialog), (gpointer) editEntryData); gtk_widget_show(button); gtk_container_set_border_width(GTK_CONTAINER (GTK_DIALOG(editNumbersData.dialog)->vbox), 5); editNumbersData.clist = gtk_clist_new(3); gtk_clist_set_shadow_type(GTK_CLIST(editNumbersData.clist), GTK_SHADOW_OUT); gtk_clist_set_column_width(GTK_CLIST(editNumbersData.clist), 0, 4); gtk_clist_set_column_width(GTK_CLIST(editNumbersData.clist), 1, 115); gtk_clist_set_column_width(GTK_CLIST(editNumbersData.clist), 2, 10); /* gtk_clist_set_column_justification (GTK_CLIST (editNumbersData.clist), 2, GTK_JUSTIFY_CENTER); */ gtk_signal_connect(GTK_OBJECT(editNumbersData.clist), "select_row", GTK_SIGNAL_FUNC(EditSubEntries), NULL); clistScrolledWindow = gtk_scrolled_window_new(NULL, NULL); gtk_container_add(GTK_CONTAINER(clistScrolledWindow), editNumbersData.clist); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(clistScrolledWindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(editNumbersData.dialog)->vbox), clistScrolledWindow); gtk_widget_show(editNumbersData.clist); gtk_widget_show(clistScrolledWindow); } gtk_clist_freeze(GTK_CLIST(editNumbersData.clist)); gtk_clist_clear(GTK_CLIST(editNumbersData.clist)); for (i = 0; i < editNumbersData.pbEntry->entry.subentries_count; i++) { if (strcmp(editNumbersData.pbEntry->entry.number, editNumbersData.pbEntry->entry.subentries[i].data.number) == 0) row[0] = "*"; else row[0] = ""; row[1] = editNumbersData.pbEntry->entry.subentries[i].data.number; switch (editNumbersData.pbEntry->entry.subentries[i].entry_type) { case GN_PHONEBOOK_ENTRY_Number: switch (editNumbersData.pbEntry->entry.subentries[i].number_type) { case GN_PHONEBOOK_NUMBER_None: case GN_PHONEBOOK_NUMBER_Common: case GN_PHONEBOOK_NUMBER_General: row[2] = _("General"); break; case GN_PHONEBOOK_NUMBER_Mobile: row[2] = _("Mobile"); break; case GN_PHONEBOOK_NUMBER_Work: row[2] = _("Work"); break; case GN_PHONEBOOK_NUMBER_Fax: row[2] = _("Fax"); break; case GN_PHONEBOOK_NUMBER_Home: row[2] = _("Home"); break; default: row[2] = _("Unknown"); break; } break; case GN_PHONEBOOK_ENTRY_Note: row[2] = _("Note"); break; case GN_PHONEBOOK_ENTRY_Postal: row[2] = _("Postal"); break; case GN_PHONEBOOK_ENTRY_Email: row[2] = _("Email"); break; case GN_PHONEBOOK_ENTRY_Name: row[2] = _("Name"); break; case GN_PHONEBOOK_ENTRY_URL: row[2] = _("URL"); break; default: row[2] = _("Unknown"); break; } gtk_clist_append(GTK_CLIST(editNumbersData.clist), row); } gtk_clist_thaw(GTK_CLIST(editNumbersData.clist)); gtk_widget_show(editNumbersData.dialog); } static void CreateEditDialog(EditEntryData * editEntryData, gchar * title, GtkSignalFunc okFunc) { GtkWidget *button, *label, *hbox; editEntryData->dialog = gtk_dialog_new(); gtk_window_set_title(GTK_WINDOW(editEntryData->dialog), title); gtk_window_set_modal(GTK_WINDOW(editEntryData->dialog), TRUE); gtk_container_set_border_width(GTK_CONTAINER(editEntryData->dialog), 10); gtk_signal_connect(GTK_OBJECT(editEntryData->dialog), "delete_event", GTK_SIGNAL_FUNC(DeleteEvent), NULL); button = gtk_button_new_with_label(_("Ok")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(editEntryData->dialog)->action_area), button, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(okFunc), editEntryData); GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); gtk_widget_grab_default(button); gtk_widget_show(button); button = gtk_button_new_with_label(_("Cancel")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(editEntryData->dialog)->action_area), button, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(CancelEditDialog), editEntryData); gtk_widget_show(button); gtk_container_set_border_width(GTK_CONTAINER(GTK_DIALOG(editEntryData->dialog)->vbox), 5); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(editEntryData->dialog)->vbox), hbox); gtk_widget_show(hbox); label = gtk_label_new(_("Name:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); gtk_widget_show(label); editEntryData->name = gtk_entry_new_with_max_length(GN_PHONEBOOK_NAME_MAX_LENGTH); gtk_box_pack_end(GTK_BOX(hbox), editEntryData->name, FALSE, FALSE, 2); gtk_widget_show(editEntryData->name); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(editEntryData->dialog)->vbox), hbox); gtk_widget_show(hbox); label = gtk_label_new(_("Number:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); gtk_widget_show(label); if (phoneMonitor.supported & PM_EXTPBK) { button = gtk_button_new(); editEntryData->number = gtk_label_new(""); gtk_container_add(GTK_CONTAINER(button), editEntryData->number); gtk_box_pack_end(GTK_BOX(hbox), button, TRUE, TRUE, 2); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(EditNumbers), editEntryData); gtk_widget_show_all(button); } else { editEntryData->number = gtk_entry_new_with_max_length(max_phonebook_number_length); gtk_box_pack_end(GTK_BOX(hbox), editEntryData->number, FALSE, FALSE, 2); gtk_widget_show(editEntryData->number); } editEntryData->memoryBox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(editEntryData->dialog)->vbox), editEntryData->memoryBox); label = gtk_label_new(_("Memory:")); gtk_box_pack_start(GTK_BOX(editEntryData->memoryBox), label, FALSE, FALSE, 2); gtk_widget_show(label); editEntryData->memoryTypePhone = gtk_radio_button_new_with_label(NULL, _("phone")); gtk_box_pack_end(GTK_BOX(editEntryData->memoryBox), editEntryData->memoryTypePhone, TRUE, FALSE, 2); gtk_widget_show(editEntryData->memoryTypePhone); editEntryData->memoryTypeSIM = gtk_radio_button_new_with_label(gtk_radio_button_group (GTK_RADIO_BUTTON(editEntryData->memoryTypePhone)), "SIM"); gtk_box_pack_end(GTK_BOX(editEntryData->memoryBox), editEntryData->memoryTypeSIM, TRUE, FALSE, 2); gtk_widget_show(editEntryData->memoryTypeSIM); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(editEntryData->dialog)->vbox), hbox); gtk_widget_show(hbox); editEntryData->groupLabel = gtk_label_new(_("Caller group:")); gtk_box_pack_start(GTK_BOX(hbox), editEntryData->groupLabel, FALSE, FALSE, 2); editEntryData->group = gtk_option_menu_new(); CreateGroupMenu(editEntryData); gtk_box_pack_start(GTK_BOX(hbox), editEntryData->group, TRUE, TRUE, 0); } static void EditPbEntry(PhonebookEntry * pbEntry, gint row) { editEditEntryData.pbEntry = pbEntry; editEditEntryData.newGroup = pbEntry->entry.caller_group; editEditEntryData.row = row; editNumbersData.pbEntry = pbEntry; editSubEntriesData.pbEntry = pbEntry; if (editEditEntryData.dialog == NULL) CreateEditDialog(&editEditEntryData, _("Edit entry"), (GtkSignalFunc) OkEditEntryDialog); gtk_entry_set_text(GTK_ENTRY(editEditEntryData.name), pbEntry->entry.name); if (phoneMonitor.supported & PM_EXTPBK) gtk_label_set_text(GTK_LABEL(editEditEntryData.number), pbEntry->entry.number); else gtk_entry_set_text(GTK_ENTRY(editEditEntryData.number), pbEntry->entry.number); if (pbEntry->entry.memory_type == GN_MT_ME) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(editEditEntryData.memoryTypePhone), TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(editEditEntryData.memoryTypeSIM), TRUE); gtk_option_menu_set_history(GTK_OPTION_MENU(editEditEntryData.group), pbEntry->entry.caller_group); if (phoneMonitor.supported & PM_CALLERGROUP) { gtk_widget_show(editEditEntryData.group); gtk_widget_show(editEditEntryData.groupLabel); } else { gtk_widget_hide(editEditEntryData.group); gtk_widget_hide(editEditEntryData.groupLabel); } if (memoryStatus.MaxME > 0) gtk_widget_show(GTK_WIDGET(editEditEntryData.memoryBox)); else gtk_widget_hide(GTK_WIDGET(editEditEntryData.memoryBox)); gtk_widget_show(GTK_WIDGET(editEditEntryData.dialog)); } void DeletePbEntry(void) { static GtkWidget *dialog = NULL; GtkWidget *button, *hbox, *label, *pixmap; if (dialog == NULL) { dialog = gtk_dialog_new(); gtk_window_set_title(GTK_WINDOW(dialog), _("Delete entries")); gtk_window_position(GTK_WINDOW(dialog), GTK_WIN_POS_MOUSE); gtk_window_set_modal(GTK_WINDOW(dialog), TRUE); gtk_container_set_border_width(GTK_CONTAINER(dialog), 10); gtk_signal_connect(GTK_OBJECT(dialog), "delete_event", GTK_SIGNAL_FUNC(DeleteEvent), NULL); button = gtk_button_new_with_label(_("Ok")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), button, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(OkDeleteEntryDialog), (gpointer) dialog); GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); gtk_widget_grab_default(button); gtk_widget_show(button); button = gtk_button_new_with_label(_("Cancel")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), button, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(CancelDialog), (gpointer) dialog); gtk_widget_show(button); gtk_container_set_border_width(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), 5); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), hbox); gtk_widget_show(hbox); pixmap = gtk_pixmap_new(questMark.pixmap, questMark.mask); gtk_box_pack_start(GTK_BOX(hbox), pixmap, FALSE, FALSE, 10); gtk_widget_show(pixmap); label = gtk_label_new(_("Do you want to delete selected entries?")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 10); gtk_widget_show(label); } gtk_widget_show(GTK_WIDGET(dialog)); } void NewPbEntry(PhonebookEntry * pbEntry) { newEditEntryData.pbEntry = pbEntry; newEditEntryData.newGroup = pbEntry->entry.caller_group; newEditEntryData.row = -1; editNumbersData.pbEntry = pbEntry; editSubEntriesData.pbEntry = pbEntry; if (newEditEntryData.dialog == NULL) CreateEditDialog(&newEditEntryData, _("New entry"), (GtkSignalFunc) OkNewEntryDialog); gtk_entry_set_text(GTK_ENTRY(newEditEntryData.name), pbEntry->entry.name); if (phoneMonitor.supported & PM_EXTPBK) gtk_label_set_text(GTK_LABEL(newEditEntryData.number), pbEntry->entry.number); else gtk_entry_set_text(GTK_ENTRY(newEditEntryData.number), pbEntry->entry.number); if (pbEntry->entry.memory_type == GN_MT_ME) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(newEditEntryData.memoryTypePhone), TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(newEditEntryData.memoryTypeSIM), TRUE); gtk_option_menu_set_history(GTK_OPTION_MENU(newEditEntryData.group), pbEntry->entry.caller_group); if (phoneMonitor.supported & PM_CALLERGROUP) { gtk_widget_show(newEditEntryData.group); gtk_widget_show(newEditEntryData.groupLabel); } else { gtk_widget_hide(newEditEntryData.group); gtk_widget_hide(newEditEntryData.groupLabel); } if (memoryStatus.MaxME > 0) gtk_widget_show(GTK_WIDGET(newEditEntryData.memoryBox)); else gtk_widget_hide(GTK_WIDGET(newEditEntryData.memoryBox)); gtk_widget_show(GTK_WIDGET(newEditEntryData.dialog)); } void DuplicatePbEntry(PhonebookEntry * pbEntry) { duplicateEditEntryData.pbEntry = pbEntry; duplicateEditEntryData.newGroup = pbEntry->entry.caller_group; duplicateEditEntryData.row = -2; editNumbersData.pbEntry = pbEntry; editSubEntriesData.pbEntry = pbEntry; if (duplicateEditEntryData.dialog == NULL) CreateEditDialog(&duplicateEditEntryData, _("Duplicate entry"), (GtkSignalFunc) OkNewEntryDialog); gtk_entry_set_text(GTK_ENTRY(duplicateEditEntryData.name), pbEntry->entry.name); if (phoneMonitor.supported & PM_EXTPBK) gtk_label_set_text(GTK_LABEL(duplicateEditEntryData.number), pbEntry->entry.number); else gtk_entry_set_text(GTK_ENTRY(duplicateEditEntryData.number), pbEntry->entry.number); if (pbEntry->entry.memory_type == GN_MT_ME) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (duplicateEditEntryData.memoryTypePhone), TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (duplicateEditEntryData.memoryTypeSIM), TRUE); gtk_option_menu_set_history(GTK_OPTION_MENU(duplicateEditEntryData.group), pbEntry->entry.caller_group); if (phoneMonitor.supported & PM_CALLERGROUP) { gtk_widget_show(duplicateEditEntryData.group); gtk_widget_show(duplicateEditEntryData.groupLabel); } else { gtk_widget_hide(duplicateEditEntryData.group); gtk_widget_hide(duplicateEditEntryData.groupLabel); } if (memoryStatus.MaxME > 0) gtk_widget_show(GTK_WIDGET(duplicateEditEntryData.memoryBox)); else gtk_widget_hide(GTK_WIDGET(duplicateEditEntryData.memoryBox)); gtk_widget_show(GTK_WIDGET(duplicateEditEntryData.dialog)); } static void EditEntry(void) { if (contactsMemoryInitialized) { if (GTK_CLIST(clist)->selection == NULL) return; EditPbEntry((PhonebookEntry *) gtk_clist_get_row_data(GTK_CLIST(clist), GPOINTER_TO_INT(GTK_CLIST (clist)-> selection-> data)), GPOINTER_TO_INT(GTK_CLIST(clist)->selection->data)); } } static void DuplicateEntry(void) { PhonebookEntry *new, *old; if (contactsMemoryInitialized) { if (GTK_CLIST(clist)->selection == NULL) return; old = (PhonebookEntry *) gtk_clist_get_row_data(GTK_CLIST(clist), GPOINTER_TO_INT(GTK_CLIST(clist)-> selection->data)); if (old->entry.memory_type == GN_MT_ME) { if ((new = FindFreeEntry(GN_MT_ME)) == NULL) if ((new = FindFreeEntry(GN_MT_SM)) == NULL) { gtk_label_set_text(GTK_LABEL(errorDialog.text), _("Can't find free memory.")); gtk_widget_show(errorDialog.dialog); return; } } else { if ((new = FindFreeEntry(GN_MT_SM)) == NULL) if ((new = FindFreeEntry(GN_MT_ME)) == NULL) { gtk_label_set_text(GTK_LABEL(errorDialog.text), _("Can't find free memory.")); gtk_widget_show(errorDialog.dialog); return; } } new->entry = old->entry; DuplicatePbEntry(new); } } static void NewEntry(void) { PhonebookEntry *entry; if (contactsMemoryInitialized) { if ((entry = FindFreeEntry(GN_MT_ME)) != NULL) { memset(entry, 0, sizeof(PhonebookEntry)); entry->entry.memory_type = GN_MT_ME; NewPbEntry(entry); } else if ((entry = FindFreeEntry(GN_MT_SM)) != NULL) { memset(entry, 0, sizeof(PhonebookEntry)); entry->entry.memory_type = GN_MT_SM; NewPbEntry(entry); } else { gtk_label_set_text(GTK_LABEL(errorDialog.text), _("Can't find free memory.")); gtk_widget_show(errorDialog.dialog); } } } static inline void ClickEntry(GtkWidget * clist, gint row, gint column, GdkEventButton * event, gpointer data) { if (event && event->type == GDK_2BUTTON_PRESS) EditPbEntry((PhonebookEntry *) gtk_clist_get_row_data(GTK_CLIST(clist), row), row); } static inline void DeleteEntry(void) { if (contactsMemoryInitialized) { if (GTK_CLIST(clist)->selection == NULL) return; DeletePbEntry(); } } static void ChMemType(void) { static GtkWidget *dialog = NULL; GtkWidget *button, *hbox, *label; if (contactsMemoryInitialized) { if (GTK_CLIST(clist)->selection == NULL) return; if (dialog == NULL) { dialog = gtk_dialog_new(); gtk_window_set_title(GTK_WINDOW(dialog), _("Changing memory type")); gtk_window_position(GTK_WINDOW(dialog), GTK_WIN_POS_MOUSE); gtk_window_set_modal(GTK_WINDOW(dialog), TRUE); gtk_container_set_border_width(GTK_CONTAINER(dialog), 5); gtk_signal_connect(GTK_OBJECT(dialog), "delete_event", GTK_SIGNAL_FUNC(DeleteEvent), NULL); button = gtk_button_new_with_label(_("Continue")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), button, FALSE, FALSE, 0); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(OkChangeEntryDialog), (gpointer) dialog); GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); gtk_widget_grab_default(button); gtk_widget_show(button); button = gtk_button_new_with_label(_("Cancel")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), button, FALSE, FALSE, 0); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(CancelDialog), (gpointer) dialog); gtk_widget_show(button); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), hbox); gtk_widget_show(hbox); label = gtk_label_new(_ ("If you change from phone memory to SIM memory\nsome entries may be truncated.")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 10); gtk_widget_show(label); } gtk_widget_show(dialog); } } static void FindFirstEntry(void) { static FindEntryData findEntryData = { NULL }; GtkWidget *button, *label, *hbox; if (contactsMemoryInitialized) { if (findEntryData.dialog == NULL) { findEntryData.dialog = gtk_dialog_new(); gtk_window_set_title(GTK_WINDOW(findEntryData.dialog), _("Find")); gtk_window_set_modal(GTK_WINDOW(findEntryData.dialog), TRUE); gtk_container_set_border_width(GTK_CONTAINER(findEntryData.dialog), 10); gtk_signal_connect(GTK_OBJECT(findEntryData.dialog), "delete_event", GTK_SIGNAL_FUNC(DeleteEvent), NULL); button = gtk_button_new_with_label(_("Find")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(findEntryData.dialog)->action_area), button, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(OkFindEntryDialog), (gpointer) & findEntryData); GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); gtk_widget_grab_default(button); gtk_widget_show(button); button = gtk_button_new_with_label(_("Cancel")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(findEntryData.dialog)->action_area), button, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(CancelEditDialog), (gpointer) & findEntryData); gtk_widget_show(button); gtk_container_set_border_width(GTK_CONTAINER (GTK_DIALOG(findEntryData.dialog)->vbox), 5); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(findEntryData.dialog)->vbox), hbox); gtk_widget_show(hbox); label = gtk_label_new(_("Pattern:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); gtk_widget_show(label); findEntryData.pattern = gtk_entry_new_with_max_length(max_phonebook_name_length); gtk_box_pack_end(GTK_BOX(hbox), findEntryData.pattern, FALSE, FALSE, 2); gtk_widget_show(findEntryData.pattern); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(findEntryData.dialog)->vbox), hbox); gtk_widget_show(hbox); findEntryData.nameB = gtk_radio_button_new_with_label(NULL, _("Name")); gtk_box_pack_start(GTK_BOX(hbox), findEntryData.nameB, TRUE, FALSE, 2); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(findEntryData.nameB), TRUE); gtk_widget_show(findEntryData.nameB); findEntryData.numberB = gtk_radio_button_new_with_label(gtk_radio_button_group (GTK_RADIO_BUTTON(findEntryData.nameB)), _("Number")); gtk_box_pack_start(GTK_BOX(hbox), findEntryData.numberB, TRUE, FALSE, 2); gtk_widget_show(findEntryData.numberB); } gtk_widget_show(findEntryData.dialog); } } static inline void SelectAll(void) { gtk_clist_select_all(GTK_CLIST(clist)); } static inline void OkDialVoiceDialog(GtkWidget * w, gpointer data) { PhoneEvent *e; gchar *buf = g_strdup(gtk_entry_get_text(GTK_ENTRY(((DialVoiceDialog *) data)->entry))); if (strlen(buf) > 0) { e = (PhoneEvent *) g_malloc(sizeof(PhoneEvent)); e->event = Event_DialVoice; e->data = buf; GUI_InsertEvent(e); } else g_free(buf); gtk_widget_hide(((DialVoiceDialog *) data)->dialog); } static void EditableInsertText(GtkEditable *w, gpointer data) { gint selection_start, selection_end, position; if (gtk_editable_get_selection_bounds(w, &selection_start, &selection_end)) { gtk_editable_delete_text(w, selection_start, selection_end); } position = gtk_editable_get_position(w); gtk_editable_insert_text(w, data, strlen(data), &position); gtk_editable_set_position(w, position); } static void ClickPad(GtkWidget *w, gpointer data) { gchar *label = (char *)gtk_button_get_label(GTK_BUTTON(w)); EditableInsertText(GTK_EDITABLE(data), label); } static void DialPad(void) { static DialVoiceDialog dialPadDialog = { NULL, NULL }; GtkWidget *button, *label; GtkWidget *d1, *d2, *d3, *d4, *d5, *d6, *d7, *d8, *d9, *d0 /* digits */, *p /* plus (+) */, *h /* hash (#) */, *s /* star (*) */, *wt /* wait (w) */, *ps /* pause (p) */; GtkWidget *row1, *row2, *row3, *row4, *row5; PhonebookEntry *pbEntry; if (dialPadDialog.dialog == NULL) { dialPadDialog.dialog = gtk_dialog_new(); gtk_window_set_title(GTK_WINDOW(dialPadDialog.dialog), _("Dial pad")); gtk_window_set_modal(GTK_WINDOW(dialPadDialog.dialog), TRUE); gtk_container_set_border_width(GTK_CONTAINER(dialPadDialog.dialog), 10); gtk_signal_connect(GTK_OBJECT(dialPadDialog.dialog), "delete_event", GTK_SIGNAL_FUNC(DeleteEvent), NULL); button = gtk_button_new_with_label(_("Dial")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialPadDialog.dialog)->action_area), button, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(OkDialVoiceDialog), (gpointer) & dialPadDialog); GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); gtk_widget_grab_default(button); gtk_widget_show(button); button = gtk_button_new_with_label(_("Cancel")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialPadDialog.dialog)->action_area), button, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(CancelDialog), (gpointer) dialPadDialog.dialog); gtk_widget_show(button); gtk_container_set_border_width(GTK_CONTAINER (GTK_DIALOG(dialPadDialog.dialog)->vbox), 5); label = gtk_label_new(_("Number:")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialPadDialog.dialog)->vbox), label, FALSE, FALSE, 5); gtk_widget_show(label); dialPadDialog.entry = gtk_entry_new_with_max_length(GN_PHONEBOOK_NUMBER_MAX_LENGTH); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialPadDialog.dialog)->vbox), dialPadDialog.entry, FALSE, FALSE, 5); gtk_widget_show(dialPadDialog.entry); row1 = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(GTK_BOX(GTK_DIALOG(dialPadDialog.dialog)->vbox)), row1); gtk_widget_show(row1); /* dial pad */ d1 = gtk_button_new_with_label("1"); gtk_box_pack_start(GTK_BOX(row1), d1, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(d1), "clicked", GTK_SIGNAL_FUNC(ClickPad), (gpointer) dialPadDialog.entry); gtk_widget_show(d1); d2 = gtk_button_new_with_label("2"); gtk_box_pack_start(GTK_BOX(row1), d2, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(d2), "clicked", GTK_SIGNAL_FUNC(ClickPad), (gpointer) dialPadDialog.entry); gtk_widget_show(d2); d3 = gtk_button_new_with_label("3"); gtk_box_pack_start(GTK_BOX(row1), d3, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(d3), "clicked", GTK_SIGNAL_FUNC(ClickPad), (gpointer) dialPadDialog.entry); gtk_widget_show(d3); row2 = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(GTK_BOX(GTK_DIALOG(dialPadDialog.dialog)->vbox)), row2); gtk_widget_show(row2); d4 = gtk_button_new_with_label("4"); gtk_box_pack_start(GTK_BOX(row2), d4, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(d4), "clicked", GTK_SIGNAL_FUNC(ClickPad), (gpointer) dialPadDialog.entry); gtk_widget_show(d4); d5 = gtk_button_new_with_label("5"); gtk_box_pack_start(GTK_BOX(row2), d5, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(d5), "clicked", GTK_SIGNAL_FUNC(ClickPad), (gpointer) dialPadDialog.entry); gtk_widget_show(d5); d6 = gtk_button_new_with_label("6"); gtk_box_pack_start(GTK_BOX(row2), d6, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(d6), "clicked", GTK_SIGNAL_FUNC(ClickPad), (gpointer) dialPadDialog.entry); gtk_widget_show(d6); row3 = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(GTK_BOX(GTK_DIALOG(dialPadDialog.dialog)->vbox)), row3); gtk_widget_show(row3); d7 = gtk_button_new_with_label("7"); gtk_box_pack_start(GTK_BOX(row3), d7, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(d7), "clicked", GTK_SIGNAL_FUNC(ClickPad), (gpointer) dialPadDialog.entry); gtk_widget_show(d7); d8 = gtk_button_new_with_label("8"); gtk_box_pack_start(GTK_BOX(row3), d8, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(d8), "clicked", GTK_SIGNAL_FUNC(ClickPad), (gpointer) dialPadDialog.entry); gtk_widget_show(d8); d9 = gtk_button_new_with_label("9"); gtk_box_pack_start(GTK_BOX(row3), d9, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(d9), "clicked", GTK_SIGNAL_FUNC(ClickPad), (gpointer) dialPadDialog.entry); gtk_widget_show(d9); row4 = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(GTK_BOX(GTK_DIALOG(dialPadDialog.dialog)->vbox)), row4); gtk_widget_show(row4); p = gtk_button_new_with_label("+"); gtk_box_pack_start(GTK_BOX(row4), p, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(p), "clicked", GTK_SIGNAL_FUNC(ClickPad), (gpointer) dialPadDialog.entry); gtk_widget_show(p); d0 = gtk_button_new_with_label("0"); gtk_box_pack_start(GTK_BOX(row4), d0, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(d0), "clicked", GTK_SIGNAL_FUNC(ClickPad), (gpointer) dialPadDialog.entry); gtk_widget_show(d0); h = gtk_button_new_with_label("#"); gtk_box_pack_start(GTK_BOX(row4), h, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(h), "clicked", GTK_SIGNAL_FUNC(ClickPad), (gpointer) dialPadDialog.entry); gtk_widget_show(h); row5 = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(GTK_BOX(GTK_DIALOG(dialPadDialog.dialog)->vbox)), row5); gtk_widget_show(row4); s = gtk_button_new_with_label("*"); gtk_box_pack_start(GTK_BOX(row5), s, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(s), "clicked", GTK_SIGNAL_FUNC(ClickPad), (gpointer) dialPadDialog.entry); gtk_widget_show(s); ps = gtk_button_new_with_label("p"); gtk_box_pack_start(GTK_BOX(row5), ps, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(ps), "clicked", GTK_SIGNAL_FUNC(ClickPad), (gpointer) dialPadDialog.entry); gtk_widget_show(ps); wt = gtk_button_new_with_label("w"); gtk_box_pack_start(GTK_BOX(row5), wt, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(wt), "clicked", GTK_SIGNAL_FUNC(ClickPad), (gpointer) dialPadDialog.entry); gtk_widget_show(h); } if (GTK_CLIST(clist)->selection != NULL) { pbEntry = (PhonebookEntry *) gtk_clist_get_row_data(GTK_CLIST(clist), GPOINTER_TO_INT(GTK_CLIST (clist)-> selection-> data)); gtk_entry_set_text(GTK_ENTRY(dialPadDialog.entry), pbEntry->entry.number); } gtk_widget_show(dialPadDialog.dialog); } static gint CListCompareFunc(GtkCList * clist, gconstpointer ptr1, gconstpointer ptr2) { static gchar phoneText[] = "ME"; static gchar simText[] = "SM"; char *text1 = NULL; char *text2 = NULL; gint ret; GtkCListRow *row1 = (GtkCListRow *) ptr1; GtkCListRow *row2 = (GtkCListRow *) ptr2; switch (row1->cell[clist->sort_column].type) { case GTK_CELL_TEXT: text1 = GTK_CELL_TEXT(row1->cell[clist->sort_column])->text; break; case GTK_CELL_PIXTEXT: text1 = GTK_CELL_PIXTEXT(row1->cell[clist->sort_column])->text; break; default: break; } switch (row2->cell[clist->sort_column].type) { case GTK_CELL_TEXT: text2 = GTK_CELL_TEXT(row2->cell[clist->sort_column])->text; break; case GTK_CELL_PIXTEXT: text2 = GTK_CELL_PIXTEXT(row2->cell[clist->sort_column])->text; break; default: break; } if (clist->sort_column == 2) { if (((PhonebookEntry *) row1->data)->entry.memory_type == GN_MT_ME) text1 = phoneText; else text1 = simText; if (((PhonebookEntry *) row2->data)->entry.memory_type == GN_MT_ME) text2 = phoneText; else text2 = simText; } if (!text2) return (text1 != NULL); if (!text1) return -1; if ((ret = g_strcasecmp(text1, text2)) == 0) { if (((PhonebookEntry *) row1->data)->entry.memory_type < ((PhonebookEntry *) row2->data)->entry.memory_type) ret = -1; else if (((PhonebookEntry *) row1->data)->entry.memory_type > ((PhonebookEntry *) row2->data)->entry.memory_type) ret = 1; } return ret; } static void CreateProgressDialog(gint maxME, gint maxSM) { GtkWidget *vbox, *label; GtkAdjustment *adj; progressDialog.dialog = gtk_dialog_new(); gtk_window_position(GTK_WINDOW(progressDialog.dialog), GTK_WIN_POS_MOUSE); gtk_window_set_modal(GTK_WINDOW(progressDialog.dialog), TRUE); gtk_signal_connect(GTK_OBJECT(progressDialog.dialog), "delete_event", GTK_SIGNAL_FUNC(ProgressDialogDeleteEvent), NULL); vbox = GTK_DIALOG(progressDialog.dialog)->vbox; label = gtk_label_new(_("Phone memory...")); gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); gtk_widget_show(label); adj = (GtkAdjustment *) gtk_adjustment_new(0, 1, maxME, 0, 0, 0); progressDialog.pbarME = gtk_progress_bar_new_with_adjustment(adj); gtk_box_pack_start(GTK_BOX(vbox), progressDialog.pbarME, FALSE, FALSE, 0); gtk_widget_show(progressDialog.pbarME); label = gtk_label_new(_("SIM memory...")); gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); gtk_widget_show(label); adj = (GtkAdjustment *) gtk_adjustment_new(0, 1, maxSM, 0, 0, 0); progressDialog.pbarSM = gtk_progress_bar_new_with_adjustment(adj); gtk_box_pack_start(GTK_BOX(vbox), progressDialog.pbarSM, FALSE, FALSE, 0); gtk_widget_show(progressDialog.pbarSM); } static gint SaveContactsInsertEvent(PhonebookEntry *pbEntry) { PhoneEvent *e; D_MemoryLocation *ml; gn_error error; ml = (D_MemoryLocation *) g_malloc(sizeof(D_MemoryLocation)); ml->entry = &(pbEntry->entry); e = (PhoneEvent *) g_malloc(sizeof(PhoneEvent)); if (pbEntry->status == E_Deleted) { e->event = Event_DeleteMemoryLocation; } else { e->event = Event_WriteMemoryLocation; } e->data = ml; GUI_InsertEvent(e); pthread_mutex_lock(&memoryMutex); pthread_cond_wait(&memoryCond, &memoryMutex); pthread_mutex_unlock(&memoryMutex); error = ml->status; if (error == GN_ERR_NONE) { switch (pbEntry->status) { case E_Changed: pbEntry->status = E_Unchanged; break; case E_Deleted: pbEntry->status = E_Empty; break; default: break; } } g_free(ml); return error; } static void SaveContacts(void) { register gint i; PhonebookEntry *pbEntry; gn_error error; if (progressDialog.dialog == NULL) { CreateProgressDialog(memoryStatus.MaxME, memoryStatus.MaxSM); } if (contactsMemoryInitialized && progressDialog.dialog) { gtk_progress_set_value(GTK_PROGRESS(progressDialog.pbarME), 0); gtk_progress_set_value(GTK_PROGRESS(progressDialog.pbarSM), 0); gtk_window_set_title(GTK_WINDOW(progressDialog.dialog), _("Saving entries")); gtk_widget_show_now(progressDialog.dialog); /* Save Phone memory */ for (i = 0; i < memoryStatus.MaxME; i++) { pbEntry = g_ptr_array_index(contactsMemory, i); if (pbEntry->status == E_Changed || pbEntry->status == E_Deleted) { gn_log_xdebug("%d;%s;%s;%d;%d;%d\n", pbEntry->entry.empty, pbEntry->entry.name, pbEntry->entry.number, (int) pbEntry->entry.memory_type, pbEntry->entry.caller_group, (int) pbEntry->status); pbEntry->entry.location = i + 1; error = SaveContactsInsertEvent(pbEntry); if (error != GN_ERR_NONE) { g_print(_ ("%s: line %d: Can't write %s memory entry number %d! Error: %s\n"), __FILE__, __LINE__, "ME", i + 1, gn_error_print(error)); } } gtk_progress_set_value(GTK_PROGRESS(progressDialog.pbarME), i + 1); GUI_Refresh(); } /* Save SIM memory */ for (i = memoryStatus.MaxME; i < memoryStatus.MaxME + memoryStatus.MaxSM; i++) { pbEntry = g_ptr_array_index(contactsMemory, i); if (pbEntry->status == E_Changed || pbEntry->status == E_Deleted) { gn_log_xdebug("%d;%s;%s;%d;%d;%d\n", pbEntry->entry.empty, pbEntry->entry.name, pbEntry->entry.number, (int) pbEntry->entry.memory_type, pbEntry->entry.caller_group, (int) pbEntry->status); pbEntry->entry.location = i - memoryStatus.MaxME + 1; error = SaveContactsInsertEvent(pbEntry); if (error != GN_ERR_NONE) { g_print(_ ("%s: line %d: Can't write %s memory entry number %d! Error: %s\n"), __FILE__, __LINE__, "SM", i - memoryStatus.MaxME + 1, gn_error_print(error)); } } gtk_progress_set_value(GTK_PROGRESS(progressDialog.pbarSM), i - memoryStatus.MaxME + 1); GUI_Refresh(); } statusInfo.ch_ME = statusInfo.ch_SM = 0; RefreshStatusInfo(); gtk_widget_hide(progressDialog.dialog); } } static GtkWidget *CreateSaveQuestionDialog(GtkSignalFunc SaveFunc, GtkSignalFunc DontSaveFunc) { GtkWidget *dialog; GtkWidget *button, *label, *hbox, *pixmap; dialog = gtk_dialog_new(); gtk_window_set_title(GTK_WINDOW(dialog), _("Save changes?")); gtk_window_position(GTK_WINDOW(dialog), GTK_WIN_POS_MOUSE); gtk_window_set_modal(GTK_WINDOW(dialog), TRUE); gtk_container_set_border_width(GTK_CONTAINER(dialog), 10); gtk_signal_connect(GTK_OBJECT(dialog), "delete_event", GTK_SIGNAL_FUNC(DeleteEvent), NULL); button = gtk_button_new_with_label(_("Save")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), button, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(SaveFunc), (gpointer) dialog); GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); gtk_widget_grab_default(button); gtk_widget_show(button); button = gtk_button_new_with_label(_("Don't save")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), button, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(DontSaveFunc), (gpointer) dialog); gtk_widget_show(button); button = gtk_button_new_with_label(_("Cancel")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), button, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(CancelDialog), (gpointer) dialog); gtk_widget_show(button); gtk_container_set_border_width(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), 5); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), hbox); gtk_widget_show(hbox); pixmap = gtk_pixmap_new(questMark.pixmap, questMark.mask); gtk_box_pack_start(GTK_BOX(hbox), pixmap, FALSE, FALSE, 10); gtk_widget_show(pixmap); label = gtk_label_new(_("You have made changes in your\ncontacts directory.\n\ \n\nDo you want to save these changes into your phone?\n")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); gtk_widget_show(label); return dialog; } void GUI_RefreshContacts(void) { PhonebookEntry *pbEntry; gint row_i = 0; register gint i; if (contactsMemoryInitialized == FALSE) return; gtk_clist_freeze(GTK_CLIST(clist)); gtk_clist_clear(GTK_CLIST(clist)); for (i = 0; i < memoryStatus.MaxME + memoryStatus.MaxSM; i++) { gchar *row[4]; pbEntry = g_ptr_array_index(contactsMemory, i); if (pbEntry->status != E_Empty && pbEntry->status != E_Deleted) { row[0] = pbEntry->entry.name; row[1] = pbEntry->entry.number; if (pbEntry->entry.memory_type == GN_MT_ME) row[2] = "P"; else row[2] = "S"; if (phoneMonitor.supported & PM_CALLERGROUP && (int)pbEntry->entry.caller_group >= 0) row[3] = xgnokiiConfig.callerGroups[pbEntry->entry.caller_group]; else row[3] = ""; gtk_clist_append(GTK_CLIST(clist), row); if (pbEntry->entry.memory_type == GN_MT_ME) gtk_clist_set_pixmap(GTK_CLIST(clist), row_i, 2, memoryPixmaps.phoneMemPix, memoryPixmaps.mask); else gtk_clist_set_pixmap(GTK_CLIST(clist), row_i, 2, memoryPixmaps.simMemPix, memoryPixmaps.mask); gtk_clist_set_row_data(GTK_CLIST(clist), row_i++, (gpointer) pbEntry); gn_log_xdebug("%d;%s;%s;%d;%d;%d\n", pbEntry->entry.empty, pbEntry->entry.name, pbEntry->entry.number, (int) pbEntry->entry.memory_type, pbEntry->entry.caller_group, (int) pbEntry->status); } } gtk_clist_sort(GTK_CLIST(clist)); gtk_clist_thaw(GTK_CLIST(clist)); } static gint InsertPBEntryME(gn_phonebook_entry * entry) { PhonebookEntry *pbEntry; if ((pbEntry = (PhonebookEntry *) g_malloc(sizeof(PhonebookEntry))) == NULL) { g_print(_("Error: %s: line %d: Can't allocate memory!\n"), __FILE__, __LINE__); g_ptr_array_free(contactsMemory, TRUE); gtk_widget_hide(progressDialog.dialog); return (-1); } pbEntry->entry = *entry; if (*pbEntry->entry.name == '\0' && *pbEntry->entry.number == '\0') pbEntry->status = E_Empty; else pbEntry->status = E_Unchanged; g_ptr_array_add(contactsMemory, (gpointer) pbEntry); gtk_progress_set_value(GTK_PROGRESS(progressDialog.pbarME), entry->location); GUI_Refresh(); return GN_ERR_NONE; } static gint InsertPBEntrySM(gn_phonebook_entry * entry) { PhonebookEntry *pbEntry; if ((pbEntry = (PhonebookEntry *) g_malloc(sizeof(PhonebookEntry))) == NULL) { g_print(_("Error: %s: line %d: Can't allocate memory!\n"), __FILE__, __LINE__); g_ptr_array_free(contactsMemory, TRUE); gtk_widget_hide(progressDialog.dialog); return (-1); } pbEntry->entry = *entry; if (*pbEntry->entry.name == '\0' && *pbEntry->entry.number == '\0') pbEntry->status = E_Empty; else { pbEntry->status = E_Unchanged; } g_ptr_array_add(contactsMemory, (gpointer) pbEntry); gtk_progress_set_value(GTK_PROGRESS(progressDialog.pbarSM), entry->location); GUI_Refresh(); return GN_ERR_NONE; } static inline gint ReadFailedPBEntry(gint i) { g_ptr_array_free(contactsMemory, TRUE); gtk_widget_hide(progressDialog.dialog); return (0); } static void ReadContactsMain(void) { PhoneEvent *e; D_MemoryStatus *ms; D_MemoryLocationAll *mla; PhonebookEntry *pbEntry; register gint i; bool has_memory_stats = true; if (contactsMemoryInitialized == TRUE) { for (i = 0; i < memoryStatus.MaxME + memoryStatus.MaxSM; i++) { pbEntry = g_ptr_array_index(contactsMemory, i); g_free(pbEntry); } g_ptr_array_free(contactsMemory, TRUE); contactsMemory = NULL; gtk_clist_clear(GTK_CLIST(clist)); contactsMemoryInitialized = FALSE; memoryStatus.MaxME = memoryStatus.UsedME = memoryStatus.FreeME = memoryStatus.MaxSM = memoryStatus.UsedSM = memoryStatus.FreeSM = 0; statusInfo.ch_ME = statusInfo.ch_SM = 0; RefreshStatusInfo(); } ms = (D_MemoryStatus *) g_malloc(sizeof(D_MemoryStatus)); ms->memoryStatus.memory_type = GN_MT_ME; e = (PhoneEvent *) g_malloc(sizeof(PhoneEvent)); e->event = Event_GetMemoryStatus; e->data = ms; GUI_InsertEvent(e); pthread_mutex_lock(&memoryMutex); pthread_cond_wait(&memoryCond, &memoryMutex); pthread_mutex_unlock(&memoryMutex); if (ms->status == GN_ERR_NONE || ms->status == GN_ERR_NOTSUPPORTED) { memoryStatus.MaxME = ms->memoryStatus.used + ms->memoryStatus.free; memoryStatus.UsedME = ms->memoryStatus.used; memoryStatus.FreeME = ms->memoryStatus.free; } else { /* Phone doesn't support ME (5110) */ memoryStatus.MaxME = memoryStatus.UsedME = memoryStatus.FreeME = 0; } ms->memoryStatus.memory_type = GN_MT_SM; e = (PhoneEvent *) g_malloc(sizeof(PhoneEvent)); e->event = Event_GetMemoryStatus; e->data = ms; GUI_InsertEvent(e); pthread_mutex_lock(&memoryMutex); pthread_cond_wait(&memoryCond, &memoryMutex); pthread_mutex_unlock(&memoryMutex); has_memory_stats = ms->status == GN_ERR_NONE; if (ms->status == GN_ERR_NONE || ms->status == GN_ERR_NOTSUPPORTED) { memoryStatus.MaxSM = ms->memoryStatus.used + ms->memoryStatus.free; memoryStatus.UsedSM = ms->memoryStatus.used; memoryStatus.FreeSM = ms->memoryStatus.free; } else { /* guess that there are 100 entries and sort out UsedSM later */ memoryStatus.MaxSM = memoryStatus.FreeSM = 100; memoryStatus.UsedSM = 0; } g_free(ms); statusInfo.ch_ME = statusInfo.ch_SM = 0; RefreshStatusInfo(); if (progressDialog.dialog == NULL) { CreateProgressDialog(memoryStatus.MaxME, memoryStatus.MaxSM); } gtk_progress_set_value(GTK_PROGRESS(progressDialog.pbarME), 0); gtk_progress_set_value(GTK_PROGRESS(progressDialog.pbarSM), 0); gtk_window_set_title(GTK_WINDOW(progressDialog.dialog), _("Getting entries")); gtk_widget_show_now(progressDialog.dialog); contactsMemory = g_ptr_array_new(); mla = (D_MemoryLocationAll *) g_malloc(sizeof(D_MemoryLocationAll)); if (memoryStatus.MaxME > 0) { mla->min = 1; mla->max = memoryStatus.MaxME; mla->used = memoryStatus.UsedME; mla->type = GN_MT_ME; mla->InsertEntry = InsertPBEntryME; mla->ReadFailed = ReadFailedPBEntry; e = (PhoneEvent *) g_malloc(sizeof(PhoneEvent)); e->event = Event_GetMemoryLocationAll; e->data = mla; GUI_InsertEvent(e); pthread_mutex_lock(&memoryMutex); pthread_cond_wait(&memoryCond, &memoryMutex); pthread_mutex_unlock(&memoryMutex); if (mla->status != GN_ERR_NONE) { g_free(mla); gtk_widget_hide(progressDialog.dialog); return; } if (!has_memory_stats) { memoryStatus.FreeME = memoryStatus.UsedME = 0; for (i = 0; i < memoryStatus.MaxME; i++) { pbEntry = g_ptr_array_index(contactsMemory, i); if (pbEntry->status == E_Empty) memoryStatus.FreeME++; else memoryStatus.UsedME++; } RefreshStatusInfo(); } } mla->min = 1; mla->max = memoryStatus.MaxSM; mla->used = memoryStatus.UsedSM; mla->type = GN_MT_SM; mla->InsertEntry = InsertPBEntrySM; mla->ReadFailed = ReadFailedPBEntry; e = (PhoneEvent *) g_malloc(sizeof(PhoneEvent)); e->event = Event_GetMemoryLocationAll; e->data = mla; GUI_InsertEvent(e); pthread_mutex_lock(&memoryMutex); pthread_cond_wait(&memoryCond, &memoryMutex); pthread_mutex_unlock(&memoryMutex); if (mla->status != GN_ERR_NONE) { g_free(mla); gtk_widget_hide(progressDialog.dialog); return; } if (!has_memory_stats) { memoryStatus.FreeSM = memoryStatus.UsedSM = 0; for (i = memoryStatus.MaxME; i < memoryStatus.MaxME+memoryStatus.MaxSM; i++) { pbEntry = g_ptr_array_index(contactsMemory, i); if (pbEntry->status == E_Empty) memoryStatus.FreeSM++; else memoryStatus.UsedSM++; } RefreshStatusInfo(); } g_free(mla); gtk_widget_hide(progressDialog.dialog); contactsMemoryInitialized = TRUE; statusInfo.ch_ME = statusInfo.ch_SM = 0; GUIEventSend(GUI_EVENT_CONTACTS_CHANGED); GUIEventSend(GUI_EVENT_SMS_NUMBER_CHANGED); } static void ReadSaveCallback(GtkWidget * widget, gpointer data) { gtk_widget_hide(GTK_WIDGET(data)); SaveContacts(); ReadContactsMain(); } static void ReadDontSaveCallback(GtkWidget * widget, gpointer data) { gtk_widget_hide(GTK_WIDGET(data)); ReadContactsMain(); } static void ReadSaveContacts(void) { static GtkWidget *dialog = NULL; if (dialog == NULL) dialog = CreateSaveQuestionDialog((GtkSignalFunc) ReadSaveCallback, (GtkSignalFunc) ReadDontSaveCallback); gtk_widget_show(dialog); } static void ReadContacts(void) { if (contactsMemoryInitialized == TRUE && (statusInfo.ch_ME || statusInfo.ch_SM)) ReadSaveContacts(); else ReadContactsMain(); } inline void GUI_ReadContacts(void) { ReadContacts(); } inline void GUI_SaveContacts(void) { SaveContacts(); } inline void GUI_ShowContacts(void) { if (xgnokiiConfig.callerGroups[0] == NULL) { GUI_Refresh(); GUI_InitCallerGroupsInf(); } gtk_clist_set_column_visibility(GTK_CLIST(clist), 3, phoneMonitor.supported & PM_CALLERGROUP); GUI_RefreshContacts(); gtk_window_present(GTK_WINDOW(GUI_ContactsWindow)); /* if (!contactsMemoryInitialized) ReadContacts (); */ } static void ExportVCARD(FILE * f) { gchar location[32]; register gint i; PhonebookEntry *pbEntry; for (i = 0; i < memoryStatus.MaxME + memoryStatus.MaxSM; i++) { pbEntry = g_ptr_array_index(contactsMemory, i); if (pbEntry->status == E_Deleted || pbEntry->status == E_Empty) continue; if (pbEntry->entry.memory_type == GN_MT_ME) snprintf(location, sizeof(location), "ME%d", i + 1); else snprintf(location, sizeof(location), "SM%d", i - memoryStatus.MaxME + 1); gn_phonebook2vcard(f, &pbEntry->entry, location); } fclose(f); } static void ExportNative(FILE * f) { register gint i; PhonebookEntry *pbEntry; char *memory_type_string; for (i = 0; i < memoryStatus.MaxME + memoryStatus.MaxSM; i++) { pbEntry = g_ptr_array_index(contactsMemory, i); if (pbEntry->status != E_Deleted && pbEntry->status != E_Empty) { if (pbEntry->entry.memory_type == GN_MT_ME) memory_type_string = "ME"; else memory_type_string = "SM"; gn_file_phonebook_raw_write(f, &pbEntry->entry, memory_type_string); } } fclose(f); } static void ExportContactsMain(gchar * name) { FILE *f; gchar buf[IO_BUF_LEN]; if ((f = fopen(name, "w")) == NULL) { g_snprintf(buf, IO_BUF_LEN, _("Can't open file %s for writing!\n"), name); gtk_label_set_text(GTK_LABEL(errorDialog.text), buf); gtk_widget_show(errorDialog.dialog); return; } if (strstr(name, ".vcard") || strstr(name, ".gcrd")) ExportVCARD(f); else ExportNative(f); } static void YesExportDialog(GtkWidget * w, gpointer data) { gtk_widget_hide(GTK_WIDGET(data)); ExportContactsMain(exportDialogData.fileName); } static void OkExportDialog(GtkWidget * w, GtkFileSelection * fs) { static YesNoDialog dialog = { NULL, NULL }; FILE *f; gchar err[255]; exportDialogData.fileName = (gchar *)gtk_file_selection_get_filename(GTK_FILE_SELECTION(fs)); gtk_widget_hide(GTK_WIDGET(fs)); if ((f = fopen(exportDialogData.fileName, "r")) != NULL) { fclose(f); if (dialog.dialog == NULL) { CreateYesNoDialog(&dialog, (GtkSignalFunc) YesExportDialog, (GtkSignalFunc) CancelDialog, GUI_ContactsWindow); gtk_window_set_title(GTK_WINDOW(dialog.dialog), _("Overwrite file?")); g_snprintf(err, 255, _("File %s already exists.\nOverwrite?"), exportDialogData.fileName); gtk_label_set_text(GTK_LABEL(dialog.text), err); } gtk_widget_show(dialog.dialog); } else ExportContactsMain(exportDialogData.fileName); } static void ExportContacts(void) { static GtkWidget *fileDialog = NULL; if (contactsMemoryInitialized) { if (fileDialog == NULL) { fileDialog = gtk_file_selection_new(_("Export to file")); gtk_signal_connect(GTK_OBJECT(fileDialog), "delete_event", GTK_SIGNAL_FUNC(DeleteEvent), NULL); gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(fileDialog)->ok_button), "clicked", GTK_SIGNAL_FUNC(OkExportDialog), (gpointer) fileDialog); gtk_signal_connect(GTK_OBJECT (GTK_FILE_SELECTION(fileDialog)->cancel_button), "clicked", GTK_SIGNAL_FUNC(CancelDialog), (gpointer) fileDialog); } gtk_widget_show(fileDialog); } } static void OkImportDialog(GtkWidget * w, GtkFileSelection * fs) { FILE *f; PhonebookEntry *pbEntry; gn_phonebook_entry gsmEntry; gchar buf[IO_BUF_LEN]; gchar *fileName; gint i; fileName = (gchar *) gtk_file_selection_get_filename(GTK_FILE_SELECTION(fs)); gtk_widget_hide(GTK_WIDGET(fs)); if ((f = fopen(fileName, "r")) == NULL) { g_snprintf(buf, IO_BUF_LEN, _("Can't open file %s for reading!\n"), fileName); gtk_label_set_text(GTK_LABEL(errorDialog.text), buf); gtk_widget_show(errorDialog.dialog); return; } if (contactsMemoryInitialized == FALSE) { ReadContactsMain(); } statusInfo.ch_ME = statusInfo.ch_SM = 0; while (fgets(buf, IO_BUF_LEN, f)) { if (gn_file_phonebook_raw_parse(&gsmEntry, buf) == GN_ERR_NONE) { i = gsmEntry.location; if (gsmEntry.memory_type == GN_MT_ME && memoryStatus.FreeME > 0 && i > 0 && i <= memoryStatus.MaxME) { pbEntry = g_ptr_array_index(contactsMemory, i - 1); if (pbEntry->status == E_Empty || pbEntry->status == E_Deleted) { memoryStatus.UsedME++; memoryStatus.FreeME--; } pbEntry->entry = gsmEntry; pbEntry->status = E_Changed; statusInfo.ch_ME = 1; } else if (gsmEntry.memory_type == GN_MT_SM && memoryStatus.FreeSM > 0 && i > 0 && i <= memoryStatus.MaxSM) { pbEntry = g_ptr_array_index(contactsMemory, memoryStatus.MaxME + i - 1); if (pbEntry->status == E_Empty || pbEntry->status == E_Deleted) { memoryStatus.UsedSM++; memoryStatus.FreeSM--; } pbEntry->entry = gsmEntry; pbEntry->status = E_Changed; statusInfo.ch_SM = 1; } } } RefreshStatusInfo(); GUIEventSend(GUI_EVENT_CONTACTS_CHANGED); GUIEventSend(GUI_EVENT_SMS_NUMBER_CHANGED); } static void ImportContactsFileDialog() { static GtkWidget *fileDialog = NULL; if (fileDialog == NULL) { fileDialog = gtk_file_selection_new(_("Import from file")); gtk_signal_connect(GTK_OBJECT(fileDialog), "delete_event", GTK_SIGNAL_FUNC(DeleteEvent), NULL); gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(fileDialog)->ok_button), "clicked", GTK_SIGNAL_FUNC(OkImportDialog), (gpointer) fileDialog); gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(fileDialog)->cancel_button), "clicked", GTK_SIGNAL_FUNC(CancelDialog), (gpointer) fileDialog); } gtk_widget_show(fileDialog); } static void ImportSaveCallback(GtkWidget * widget, gpointer data) { gtk_widget_hide(GTK_WIDGET(data)); SaveContacts(); ImportContactsFileDialog(); } static void ImportDontSaveCallback(GtkWidget * widget, gpointer data) { gtk_widget_hide(GTK_WIDGET(data)); ImportContactsFileDialog(); } void static ImportSaveContacts(void) { static GtkWidget *dialog = NULL; if (dialog == NULL) dialog = CreateSaveQuestionDialog((GtkSignalFunc) ImportSaveCallback, (GtkSignalFunc) ImportDontSaveCallback); gtk_widget_show(dialog); } static void ImportContacts(void) { if (contactsMemoryInitialized == TRUE && (statusInfo.ch_ME || statusInfo.ch_SM)) ImportSaveContacts(); else ImportContactsFileDialog(); } static void QuitSaveCallback(GtkWidget * widget, gpointer data) { PhoneEvent *e; gtk_widget_hide(GTK_WIDGET(data)); SaveContacts(); e = (PhoneEvent *) g_malloc(sizeof(PhoneEvent)); e->event = Event_Exit; e->data = NULL; GUI_InsertEvent(e); pthread_join(monitor_th, NULL); gtk_main_quit(); } static void QuitDontSaveCallback(GtkWidget * widget, gpointer data) { PhoneEvent *e; gtk_widget_hide(GTK_WIDGET(data)); e = (PhoneEvent *) g_malloc(sizeof(PhoneEvent)); e->event = Event_Exit; e->data = NULL; GUI_InsertEvent(e); pthread_join(monitor_th, NULL); gtk_main_quit(); } void GUI_QuitSaveContacts(void) { static GtkWidget *dialog = NULL; if (dialog == NULL) dialog = CreateSaveQuestionDialog((GtkSignalFunc) QuitSaveCallback, (GtkSignalFunc) QuitDontSaveCallback); gtk_widget_show(dialog); } /* Function take number and return name belonged to number. If no name is found, return NULL; Do not modify returned name! */ gchar *GUI_GetName(gchar * number) { PhonebookEntry *pbEntry; register gint i; if (contactsMemoryInitialized == FALSE || number == NULL) return (gchar *) NULL; for (i = 0; i < memoryStatus.MaxME + memoryStatus.MaxSM; i++) { pbEntry = g_ptr_array_index(contactsMemory, i); if (pbEntry->status == E_Empty || pbEntry->status == E_Deleted) continue; if (strcmp(pbEntry->entry.number, number) == 0) return pbEntry->entry.name; } for (i = 0; i < memoryStatus.MaxME + memoryStatus.MaxSM; i++) { pbEntry = g_ptr_array_index(contactsMemory, i); if (pbEntry->status == E_Empty || pbEntry->status == E_Deleted) continue; if (strrncmp(pbEntry->entry.number, number, 9) == 0) return pbEntry->entry.name; } return NULL; } gchar *GUI_GetNameExact(gchar * number) { PhonebookEntry *pbEntry; register gint i; if (contactsMemoryInitialized == FALSE || number == NULL) return (gchar *) NULL; for (i = 0; i < memoryStatus.MaxME + memoryStatus.MaxSM; i++) { pbEntry = g_ptr_array_index(contactsMemory, i); if (pbEntry->status == E_Empty || pbEntry->status == E_Deleted) continue; if (strcmp(pbEntry->entry.number, number) == 0) return pbEntry->entry.name; } return NULL; } gchar *GUI_GetNumber(gchar * name) { PhonebookEntry *pbEntry; register gint i; if (contactsMemoryInitialized == FALSE || name == NULL || *name == '\0') return (gchar *) NULL; for (i = 0; i < memoryStatus.MaxME + memoryStatus.MaxSM; i++) { pbEntry = g_ptr_array_index(contactsMemory, i); if (pbEntry->status == E_Empty || pbEntry->status == E_Deleted) continue; if (strcmp(g_strstrip(pbEntry->entry.name), g_strstrip(name)) == 0) return pbEntry->entry.number; } return NULL; } static void SelectDialogClickEntry(GtkWidget * clist, gint row, gint column, GdkEventButton * event, SelectContactData * data) { if (event && event->type == GDK_2BUTTON_PRESS) gtk_signal_emit_by_name(GTK_OBJECT(data->okButton), "clicked"); } SelectContactData *GUI_SelectContactDialog(void) { PhonebookEntry *pbEntry; static SelectContactData selectContactData; SortColumn *sColumn; gchar *titles[4] = { _("Name"), _("Number"), _("Memory"), _("Group") }; gint row_i = 0; register gint i; gchar string[100]; if (contactsMemoryInitialized == FALSE) return NULL; selectContactData.dialog = gtk_dialog_new(); gtk_widget_set_usize(GTK_WIDGET(selectContactData.dialog), 436, 200); gtk_window_set_title(GTK_WINDOW(selectContactData.dialog), _("Select contacts")); gtk_window_set_modal(GTK_WINDOW(selectContactData.dialog), TRUE); selectContactData.okButton = gtk_button_new_with_label(_("Ok")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(selectContactData.dialog)->action_area), selectContactData.okButton, TRUE, TRUE, 10); GTK_WIDGET_SET_FLAGS(selectContactData.okButton, GTK_CAN_DEFAULT); gtk_widget_grab_default(selectContactData.okButton); gtk_widget_show(selectContactData.okButton); selectContactData.cancelButton = gtk_button_new_with_label(_("Cancel")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(selectContactData.dialog)->action_area), selectContactData.cancelButton, TRUE, TRUE, 10); gtk_widget_show(selectContactData.cancelButton); selectContactData.clist = gtk_clist_new_with_titles(4, titles); gtk_clist_set_shadow_type(GTK_CLIST(selectContactData.clist), GTK_SHADOW_OUT); gtk_clist_set_compare_func(GTK_CLIST(selectContactData.clist), CListCompareFunc); gtk_clist_set_sort_column(GTK_CLIST(selectContactData.clist), 0); gtk_clist_set_sort_type(GTK_CLIST(selectContactData.clist), GTK_SORT_ASCENDING); gtk_clist_set_auto_sort(GTK_CLIST(selectContactData.clist), FALSE); gtk_clist_set_selection_mode(GTK_CLIST(selectContactData.clist), GTK_SELECTION_EXTENDED); gtk_clist_set_column_width(GTK_CLIST(selectContactData.clist), 0, 150); gtk_clist_set_column_width(GTK_CLIST(selectContactData.clist), 1, 115); gtk_clist_set_column_width(GTK_CLIST(selectContactData.clist), 3, 70); gtk_clist_set_column_justification(GTK_CLIST(selectContactData.clist), 2, GTK_JUSTIFY_CENTER); gtk_clist_set_column_visibility(GTK_CLIST(selectContactData.clist), 3, phoneMonitor.supported & PM_CALLERGROUP); for (i = 0; i < 4; i++) { if ((sColumn = g_malloc(sizeof(SortColumn))) == NULL) { g_print(_("Error: %s: line %d: Can't allocate memory!\n"), __FILE__, __LINE__); return NULL; } sColumn->clist = selectContactData.clist; sColumn->column = i; gtk_signal_connect(GTK_OBJECT(GTK_CLIST(selectContactData.clist)->column[i].button), "clicked", GTK_SIGNAL_FUNC(SetSortColumn), (gpointer) sColumn); } gtk_signal_connect(GTK_OBJECT(selectContactData.clist), "select_row", GTK_SIGNAL_FUNC(SelectDialogClickEntry), (gpointer) & selectContactData); selectContactData.clistScrolledWindow = gtk_scrolled_window_new(NULL, NULL); gtk_container_add(GTK_CONTAINER(selectContactData.clistScrolledWindow), selectContactData.clist); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(selectContactData.clistScrolledWindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(selectContactData.dialog)->vbox), selectContactData.clistScrolledWindow, TRUE, TRUE, 0); gtk_widget_show(selectContactData.clist); gtk_widget_show(selectContactData.clistScrolledWindow); if (xgnokiiConfig.callerGroups[0] == NULL) GUI_InitCallerGroupsInf(); gtk_clist_freeze(GTK_CLIST(selectContactData.clist)); for (i = 0; i < memoryStatus.MaxME + memoryStatus.MaxSM; i++) { gchar *row[4]; pbEntry = g_ptr_array_index(contactsMemory, i); if (pbEntry->status != E_Empty && pbEntry->status != E_Deleted) { row[0] = pbEntry->entry.name; if (pbEntry->entry.subentries_count > 0) { snprintf(string, 100, "%s *", pbEntry->entry.number); row[1] = string; } else row[1] = pbEntry->entry.number; if (pbEntry->entry.memory_type == GN_MT_ME) row[2] = "P"; else row[2] = "S"; if (phoneMonitor.supported & PM_CALLERGROUP) row[3] = xgnokiiConfig.callerGroups[pbEntry->entry.caller_group]; else row[3] = ""; gtk_clist_append(GTK_CLIST(selectContactData.clist), row); if (pbEntry->entry.memory_type == GN_MT_ME) gtk_clist_set_pixmap(GTK_CLIST(selectContactData.clist), row_i, 2, memoryPixmaps.phoneMemPix, memoryPixmaps.mask); else gtk_clist_set_pixmap(GTK_CLIST(selectContactData.clist), row_i, 2, memoryPixmaps.simMemPix, memoryPixmaps.mask); gtk_clist_set_row_data(GTK_CLIST(selectContactData.clist), row_i++, (gpointer) pbEntry); } } gtk_clist_sort(GTK_CLIST(selectContactData.clist)); gtk_clist_thaw(GTK_CLIST(selectContactData.clist)); gtk_widget_show(selectContactData.dialog); return &selectContactData; } static GtkItemFactoryEntry menu_items[] = { {NULL, NULL, NULL, 0, ""}, {NULL, "R", ReadContacts, 0, NULL}, {NULL, "S", SaveContacts, 0, NULL}, {NULL, NULL, NULL, 0, ""}, {NULL, "I", ImportContacts, 0, NULL}, {NULL, "E", ExportContacts, 0, NULL}, {NULL, NULL, NULL, 0, ""}, {NULL, "W", CloseContacts, 0, NULL}, {NULL, NULL, NULL, 0, ""}, {NULL, "N", NewEntry, 0, NULL}, {NULL, "U", DuplicateEntry, 0, NULL}, {NULL, NULL, EditEntry, 0, NULL}, {NULL, "D", DeleteEntry, 0, NULL}, {NULL, NULL, NULL, 0, ""}, {NULL, "C", ChMemType, 0, NULL}, {NULL, NULL, NULL, 0, ""}, {NULL, "F", FindFirstEntry, 0, NULL}, {NULL, "L", SearchEntry, 0, NULL}, {NULL, NULL, NULL, 0, ""}, {NULL, "A", SelectAll, 0, NULL}, {NULL, NULL, NULL, 0, ""}, {NULL, "V", DialPad, 0, NULL}, {NULL, NULL, NULL, 0, ""}, {NULL, NULL, GUI_ShowAbout, 0, NULL}, }; static void InitMainMenu(void) { menu_items[0].path = _("/_File"); menu_items[1].path = _("/File/_Read from phone"); menu_items[2].path = _("/File/_Save to phone"); menu_items[3].path = _("/File/Sep1"); menu_items[4].path = _("/File/_Import from file"); menu_items[5].path = _("/File/_Export to file"); menu_items[6].path = _("/File/Sep2"); menu_items[7].path = _("/File/_Close"); menu_items[8].path = _("/_Edit"); menu_items[9].path = _("/Edit/_New"); menu_items[10].path = _("/Edit/D_uplicate"); menu_items[11].path = _("/Edit/_Edit"); menu_items[12].path = _("/Edit/_Delete"); menu_items[13].path = _("/Edit/Sep3"); menu_items[14].path = _("/Edit/_Change memory type"); menu_items[15].path = _("/Edit/Sep4"); menu_items[16].path = _("/Edit/_Find"); menu_items[17].path = _("/Edit/Find ne_xt"); menu_items[18].path = _("/Edit/Sep5"); menu_items[19].path = _("/Edit/Select _all"); menu_items[20].path = _("/_Dial"); menu_items[21].path = _("/Dial/Dial _voice"); menu_items[22].path = _("/_Help"); menu_items[23].path = _("/Help/_About"); } void GUI_CreateContactsWindow(void) { int nmenu_items = sizeof(menu_items) / sizeof(menu_items[0]); GtkItemFactory *item_factory; GtkAccelGroup *accel_group; SortColumn *sColumn; GtkWidget *menubar; GtkWidget *main_vbox; GtkWidget *toolbar; GtkWidget *clistScrolledWindow; GtkWidget *status_hbox; register gint i; gchar *titles[4] = { _("Name"), _("Number"), _("Memory"), _("Group") }; InitMainMenu(); contactsMemoryInitialized = FALSE; GUI_ContactsWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_wmclass(GTK_WINDOW(GUI_ContactsWindow), "ContactsWindow", "Xgnokii"); gtk_window_set_title(GTK_WINDOW(GUI_ContactsWindow), _("Contacts")); gtk_widget_set_usize(GTK_WIDGET(GUI_ContactsWindow), 436, 220); //gtk_container_set_border_width (GTK_CONTAINER (GUI_ContactsWindow), 10); gtk_signal_connect(GTK_OBJECT(GUI_ContactsWindow), "delete_event", GTK_SIGNAL_FUNC(DeleteEvent), NULL); gtk_widget_realize(GUI_ContactsWindow); accel_group = gtk_accel_group_new(); item_factory = gtk_item_factory_new(GTK_TYPE_MENU_BAR, "
", accel_group); gtk_item_factory_create_items(item_factory, nmenu_items, menu_items, NULL); gtk_window_add_accel_group(GTK_WINDOW(GUI_ContactsWindow), accel_group); /* Finally, return the actual menu bar created by the item factory. */ menubar = gtk_item_factory_get_widget(item_factory, "
"); main_vbox = gtk_vbox_new(FALSE, 1); gtk_container_border_width(GTK_CONTAINER(main_vbox), 1); gtk_container_add(GTK_CONTAINER(GUI_ContactsWindow), main_vbox); gtk_widget_show(main_vbox); gtk_box_pack_start(GTK_BOX(main_vbox), menubar, FALSE, FALSE, 0); gtk_widget_show(menubar); /* Create the toolbar */ toolbar = gtk_toolbar_new(); gtk_toolbar_set_style(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_ICONS); gtk_toolbar_set_orientation(GTK_TOOLBAR(toolbar), GTK_ORIENTATION_HORIZONTAL); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL, _("Read from phone"), NULL, NewPixmap(Read_xpm, GUI_ContactsWindow->window, &GUI_ContactsWindow->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc) ReadContacts, NULL); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL, _("Save to phone"), NULL, NewPixmap(Send_xpm, GUI_ContactsWindow->window, &GUI_ContactsWindow->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc) SaveContacts, NULL); gtk_toolbar_append_space(GTK_TOOLBAR(toolbar)); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL, _("Import from file"), NULL, NewPixmap(Open_xpm, GUI_ContactsWindow->window, &GUI_ContactsWindow->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc) ImportContacts, NULL); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL, _("Export to file"), NULL, NewPixmap(Save_xpm, GUI_ContactsWindow->window, &GUI_ContactsWindow->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc) ExportContacts, NULL); gtk_toolbar_append_space(GTK_TOOLBAR(toolbar)); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL, _("New entry"), NULL, NewPixmap(New_xpm, GUI_ContactsWindow->window, &GUI_ContactsWindow->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc) NewEntry, NULL); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL, _("Duplicate entry"), NULL, NewPixmap(Duplicate_xpm, GUI_ContactsWindow->window, &GUI_ContactsWindow->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc) DuplicateEntry, NULL); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL, _("Edit entry"), NULL, NewPixmap(Edit_xpm, GUI_ContactsWindow->window, &GUI_ContactsWindow->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc) EditEntry, NULL); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL, _("Delete entry"), NULL, NewPixmap(Delete_xpm, GUI_ContactsWindow->window, &GUI_ContactsWindow->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc) DeleteEntry, NULL); gtk_toolbar_append_space(GTK_TOOLBAR(toolbar)); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL, _("Dial voice"), NULL, NewPixmap(Dial_xpm, GUI_ContactsWindow->window, &GUI_ContactsWindow->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc) DialPad, NULL); // gtk_toolbar_set_style (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_ICONS); gtk_box_pack_start(GTK_BOX(main_vbox), toolbar, FALSE, FALSE, 0); gtk_widget_show(toolbar); clist = gtk_clist_new_with_titles(4, titles); gtk_clist_set_shadow_type(GTK_CLIST(clist), GTK_SHADOW_OUT); gtk_clist_set_compare_func(GTK_CLIST(clist), CListCompareFunc); gtk_clist_set_sort_column(GTK_CLIST(clist), 0); gtk_clist_set_sort_type(GTK_CLIST(clist), GTK_SORT_ASCENDING); gtk_clist_set_auto_sort(GTK_CLIST(clist), FALSE); gtk_clist_set_selection_mode(GTK_CLIST(clist), GTK_SELECTION_EXTENDED); gtk_clist_set_column_width(GTK_CLIST(clist), 0, 150); gtk_clist_set_column_width(GTK_CLIST(clist), 1, 115); gtk_clist_set_column_width(GTK_CLIST(clist), 3, 70); gtk_clist_set_column_justification(GTK_CLIST(clist), 2, GTK_JUSTIFY_CENTER); // gtk_clist_set_column_visibility (GTK_CLIST (clist), 3, phoneMonitor.supported & PM_CALLERGROUP); for (i = 0; i < 4; i++) { if ((sColumn = g_malloc(sizeof(SortColumn))) == NULL) { g_print(_("Error: %s: line %d: Can't allocate memory!\n"), __FILE__, __LINE__); gtk_main_quit(); } sColumn->clist = clist; sColumn->column = i; gtk_signal_connect(GTK_OBJECT(GTK_CLIST(clist)->column[i].button), "clicked", GTK_SIGNAL_FUNC(SetSortColumn), (gpointer) sColumn); } gtk_signal_connect(GTK_OBJECT(clist), "select_row", GTK_SIGNAL_FUNC(ClickEntry), NULL); clistScrolledWindow = gtk_scrolled_window_new(NULL, NULL); gtk_container_add(GTK_CONTAINER(clistScrolledWindow), clist); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(clistScrolledWindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_box_pack_start(GTK_BOX(main_vbox), clistScrolledWindow, TRUE, TRUE, 0); gtk_widget_show(clist); gtk_widget_show(clistScrolledWindow); status_hbox = gtk_hbox_new(FALSE, 20); gtk_box_pack_start(GTK_BOX(main_vbox), status_hbox, FALSE, FALSE, 0); gtk_widget_show(status_hbox); memoryStatus.MaxME = memoryStatus.UsedME = memoryStatus.FreeME = memoryStatus.MaxSM = memoryStatus.UsedSM = memoryStatus.FreeSM = 0; statusInfo.ch_ME = statusInfo.ch_SM = 0; statusInfo.label = gtk_label_new(""); RefreshStatusInfo(); gtk_box_pack_start(GTK_BOX(status_hbox), statusInfo.label, FALSE, FALSE, 10); gtk_widget_show(statusInfo.label); memoryPixmaps.simMemPix = gdk_pixmap_create_from_xpm_d(GUI_ContactsWindow->window, &memoryPixmaps.mask, &GUI_ContactsWindow->style-> bg[GTK_STATE_NORMAL], sim_xpm); memoryPixmaps.phoneMemPix = gdk_pixmap_create_from_xpm_d(GUI_ContactsWindow->window, &memoryPixmaps.mask, &GUI_ContactsWindow->style-> bg[GTK_STATE_NORMAL], phone_xpm); questMark.pixmap = gdk_pixmap_create_from_xpm_d(GUI_ContactsWindow->window, &questMark.mask, &GUI_ContactsWindow->style-> bg[GTK_STATE_NORMAL], quest_xpm); CreateErrorDialog(&errorDialog, GUI_ContactsWindow); GUIEventAdd(GUI_EVENT_CONTACTS_CHANGED, GUI_RefreshContacts); GUIEventAdd(GUI_EVENT_CALLERS_GROUPS_CHANGED, GUI_RefreshGroupMenu); } gnokii-0.6.31/xgnokii/xgnokii_lowlevel.c0000644000175000017500000010724511666163120016411 0ustar leoleo/* X G N O K I I A Linux/Unix GUI for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999 Pavel Janik ml., Hugh Blemings Copyright (C) 1999-2005 Jan Derfinak Copyright (C) 2002-2004 Pawel Kot, BORBELY Zoltan Copyright (C) 2002 Markus Plail, Manfred Jonsson, Pavel Machek Copyright (C) 2003 Tomi Ollila, Uli Hopp */ #include "config.h" #ifndef WIN32 # include #endif #include #include #include #include "misc.h" #include "gnokii.h" #include "xgnokii_lowlevel.h" #include "xgnokii.h" #include "xgnokii_common.h" pthread_t monitor_th; PhoneMonitor phoneMonitor; pthread_mutex_t memoryMutex; pthread_cond_t memoryCond; pthread_mutex_t calendarMutex; pthread_cond_t calendarCond; pthread_mutex_t smsMutex; pthread_mutex_t sendSMSMutex; pthread_cond_t sendSMSCond; pthread_mutex_t callMutex; pthread_mutex_t netMonMutex; pthread_mutex_t speedDialMutex; pthread_cond_t speedDialCond; pthread_mutex_t callerGroupMutex; pthread_cond_t callerGroupCond; pthread_mutex_t smsCenterMutex; pthread_cond_t smsCenterCond; pthread_mutex_t alarmMutex; pthread_cond_t alarmCond; pthread_mutex_t getBitmapMutex; pthread_cond_t getBitmapCond; pthread_mutex_t setBitmapMutex; pthread_cond_t setBitmapCond; pthread_mutex_t getNetworkInfoMutex; pthread_cond_t getNetworkInfoCond; pthread_mutex_t ringtoneMutex; pthread_cond_t ringtoneCond; static pthread_mutex_t eventsMutex; static GSList *ScheduledEvents = NULL; gn_sms_status SMSStatus = {0,0,0,0}; gn_sms_folder_stats FolderStats[GN_SMS_FOLDER_MAX_NUMBER]; gn_sms_message_list MessagesList[GN_SMS_MESSAGE_MAX_NUMBER][GN_SMS_FOLDER_MAX_NUMBER]; struct gn_statemachine *statemachine; /* FIXME - don't really know what should own the statemachine in */ /* the xgnokii scheme of things - Chris */ int isSMSactivated = 0; inline void GUI_InsertEvent(PhoneEvent * event) { gn_log_xdebug("Inserting Event: %d\n", event->event); pthread_mutex_lock(&eventsMutex); ScheduledEvents = g_slist_prepend(ScheduledEvents, event); pthread_mutex_unlock(&eventsMutex); } inline static PhoneEvent *RemoveEvent(void) { GSList *list; PhoneEvent *event = NULL; pthread_mutex_lock(&eventsMutex); list = g_slist_last(ScheduledEvents); if (list) { event = (PhoneEvent *) list->data; ScheduledEvents = g_slist_remove_link(ScheduledEvents, list); g_slist_free_1(list); } pthread_mutex_unlock(&eventsMutex); return (event); } gn_error GUI_InitSMSFolders(void) { gn_data gdat; gn_error error; gn_sms_folder_list list; gint i; gn_data_clear(&gdat); if (phoneMonitor.supported & PM_FOLDERS) { gdat.sms_folder_list = &list; if ((error = gn_sm_functions(GN_OP_GetSMSFolders, &gdat, statemachine)) != GN_ERR_NONE) return error; foldercount = gdat.sms_folder_list->number; for (i = 0; i < gdat.sms_folder_list->number; i++) { strcpy(folders[i], gdat.sms_folder_list->folder[i].name); } } else { foldercount = 2; strcpy(folders[0], "Inbox"); strcpy(folders[1], "Outbox"); } return GN_ERR_NONE; } static inline void FreeElement(gpointer data, gpointer userData) { g_free((gn_sms *) data); } static inline void FreeArray(GSList ** array) { if (*array) { g_slist_foreach(*array, FreeElement, NULL); g_slist_free(*array); *array = NULL; } } static gn_error InitModelInf(void) { gint i, j; phoneMonitor.phone.model = g_strdup(gn_lib_get_phone_model(statemachine)); if (gn_lib_lasterror(statemachine) != GN_ERR_NONE) return gn_lib_lasterror(statemachine); phoneMonitor.phone.product_name = g_strdup(gn_lib_get_phone_product_name(statemachine)); phoneMonitor.phone.revision = g_strdup(gn_lib_get_phone_revision(statemachine)); phoneMonitor.phone.imei = g_strdup(gn_lib_get_phone_imei(statemachine)); phoneMonitor.supported = gn_phone_model_get(phoneMonitor.phone.product_name)->flags; for (i = 0; i < GN_SMS_FOLDER_MAX_NUMBER; i++) { FolderStats[i].number = 0; FolderStats[i].changed = 0; FolderStats[i].unread = 0; FolderStats[i].used = 0; for (j = 0; j < GN_SMS_MESSAGE_MAX_NUMBER; j++) { MessagesList[j][i].status = GN_SMS_FLD_Old; MessagesList[j][i].location = 0; MessagesList[j][i].message_type = GN_SMS_MT_Deliver; } } gn_log_xdebug("Model: %s\n", phoneMonitor.phone.model); gn_log_xdebug("Product: %s\n", phoneMonitor.phone.product_name); gn_log_xdebug("IMEI: %s\n", phoneMonitor.phone.imei); gn_log_xdebug("Revision: %s\n", phoneMonitor.phone.revision); return GN_ERR_NONE; } static void busterminate(void) { gn_lib_phone_close(statemachine); gn_lib_phoneprofile_free(&statemachine); gn_lib_library_free(); } static gn_error fbusinit() { gn_error error; error = gn_lib_phoneprofile_load(NULL, &statemachine); gn_log_xdebug("fbusinit: error %d\n", error); if (error != GN_ERR_NONE) { g_print(_("GSM/FBUS init failed! (Unknown model?). Quitting.\n")); /* FIXME: should popup some message... */ return (error); } /* register cleanup function */ atexit(busterminate); error = gn_lib_phone_open(statemachine); if (error != GN_ERR_NONE) { g_print(_("Failed to open the phone. Quitting.\n")); return (error); } return InitModelInf(); } void GUI_InitPhoneMonitor(void) { phoneMonitor.phone.model = g_strdup(_("unknown")); phoneMonitor.phone.product_name = g_strdup(_("unknown")); phoneMonitor.phone.revision = g_strdup(_("unknown")); phoneMonitor.phone.imei = g_strdup(_("unknown")); phoneMonitor.supported = 0; phoneMonitor.rfLevel = phoneMonitor.batteryLevel = -1; phoneMonitor.powerSource = GN_PS_BATTERY; phoneMonitor.working = NULL; phoneMonitor.alarm = FALSE; phoneMonitor.sms.changed = phoneMonitor.sms.unRead = phoneMonitor.sms.number = 0; phoneMonitor.sms.messages = NULL; phoneMonitor.call.callInProgress = CS_Idle; *phoneMonitor.call.callNum = '\0'; phoneMonitor.netmonitor.number = 0; *phoneMonitor.netmonitor.screen = *phoneMonitor.netmonitor.screen3 = *phoneMonitor.netmonitor.screen4 = *phoneMonitor.netmonitor.screen5 = '\0'; pthread_mutex_init(&memoryMutex, NULL); pthread_cond_init(&memoryCond, NULL); pthread_mutex_init(&calendarMutex, NULL); pthread_cond_init(&calendarCond, NULL); pthread_mutex_init(&smsMutex, NULL); pthread_mutex_init(&sendSMSMutex, NULL); pthread_cond_init(&sendSMSCond, NULL); pthread_mutex_init(&callMutex, NULL); pthread_mutex_init(&eventsMutex, NULL); pthread_mutex_init(&callMutex, NULL); pthread_mutex_init(&netMonMutex, NULL); pthread_mutex_init(&speedDialMutex, NULL); pthread_cond_init(&speedDialCond, NULL); pthread_mutex_init(&callerGroupMutex, NULL); pthread_cond_init(&callerGroupCond, NULL); pthread_mutex_init(&smsCenterMutex, NULL); pthread_cond_init(&smsCenterCond, NULL); pthread_mutex_init(&getBitmapMutex, NULL); pthread_cond_init(&getBitmapCond, NULL); pthread_mutex_init(&setBitmapMutex, NULL); pthread_cond_init(&setBitmapCond, NULL); pthread_mutex_init(&getNetworkInfoMutex, NULL); pthread_cond_init(&getNetworkInfoCond, NULL); pthread_mutex_init(&ringtoneMutex, NULL); pthread_cond_init(&ringtoneCond, NULL); } static gint compare_folder_and_number(const gn_sms *a, const gn_sms *b) { gn_log_xdebug("memory type a: %i memory type b: %i\n", a->memory_type, b->memory_type); gn_log_xdebug("message number a: %i message number b: %i\n", a->number, b->number); if (a->memory_type == b->memory_type) if (a->number == b->number) return 0; else return 1; else return 1; } static void RefreshSMS(const gint number) { gn_data gdat; gn_error error; gn_sms *msg, *tmp_msg; gn_sms_folder *fld; gn_sms_folder_list *list; gn_sms_raw *raw; GSList *tmp_list; gint i, j, dummy; gn_log_xdebug("RefreshSMS is running...\n"); gn_data_clear(&gdat); gn_log_xdebug("RefreshSMS: changed: %i\n", SMSStatus.changed); gn_log_xdebug("RefreshSMS: unread: %i, total: %i\n", SMSStatus.unread, SMSStatus.number); for (i = 0; i < SMSStatus.folders_count; i++) { dummy = 0; for (j = 0; j < FolderStats[i].used; j++) { if ((MessagesList[j][i].status == GN_SMS_FLD_Changed) || (MessagesList[j][i].status == GN_SMS_FLD_NotRead) || (MessagesList[j][i].status == GN_SMS_FLD_New)) gn_log_xdebug("RefreshSMS: change #%i in folder %i at location %i!\n", ++dummy, i, MessagesList[j][i].location); } } if (phoneMonitor.supported & PM_FOLDERS) { for (i = 0; i < SMSStatus.folders_count; i++) { for (j = 0; j < FolderStats[i].used; j++) { if (MessagesList[j][i].status == GN_SMS_FLD_Deleted || MessagesList[j][i].status == GN_SMS_FLD_Changed) { gn_log_xdebug("We got a deleted message here to handle!\n"); pthread_mutex_lock(&smsMutex); msg = g_malloc0(sizeof(gn_sms)); /* 0 + 12 = GN_MT_IN, 1 + 12 = GN_MT_OU ... => gsm-common.h definition of gn_memory_type */ msg->memory_type = i + 12; msg->number = MessagesList[j][i].location; tmp_list = g_slist_find_custom(phoneMonitor.sms.messages, msg, (GCompareFunc) compare_folder_and_number); tmp_msg = (gn_sms *) tmp_list->data; phoneMonitor.sms.messages = g_slist_remove(phoneMonitor.sms.messages, tmp_msg); g_free(tmp_msg); pthread_mutex_unlock(&smsMutex); if (MessagesList[j][i].status == GN_SMS_FLD_Deleted) MessagesList[j][i].status = GN_SMS_FLD_ToBeRemoved; /* FreeDeletedMessages has to find it */ } if (MessagesList[j][i].status == GN_SMS_FLD_New || MessagesList[j][i].status == GN_SMS_FLD_NotRead || MessagesList[j][i].status == GN_SMS_FLD_Changed) { msg = g_malloc0(sizeof(gn_sms)); list = g_malloc(sizeof(gn_sms_folder_list)); raw = g_malloc(sizeof(gn_sms_raw)); gdat.sms = msg; gdat.sms_folder = NULL; gdat.sms_folder_list = list; gdat.raw_sms = raw; gdat.sms->number = MessagesList[j][i].location; gdat.sms->memory_type =(gn_memory_type) i + 12; gn_log_xdebug("#: %i, mt: %i\n", gdat.sms->number, gdat.sms->memory_type); if ((error = gn_sms_get_no_validate(&gdat, statemachine)) == GN_ERR_NONE) { gn_log_xdebug("Found valid SMS ...\n %s\n", msg->user_data[0].u.text); pthread_mutex_lock(&smsMutex); phoneMonitor.sms.messages = g_slist_append(phoneMonitor.sms.messages, msg); pthread_mutex_unlock(&smsMutex); } if (MessagesList[j][i].status == GN_SMS_FLD_New || MessagesList[j][i].status == GN_SMS_FLD_Changed) MessagesList[j][i].status = GN_SMS_FLD_Old; if (MessagesList[j][i].status == GN_SMS_FLD_NotRead) MessagesList[j][i].status = GN_SMS_FLD_NotReadHandled; } } FolderStats[i].changed = 0; /* now we handled the changes and can reset */ } SMSStatus.changed = 0; /* now we handled the changes and can reset */ } else { pthread_mutex_lock(&smsMutex); FreeArray(&(phoneMonitor.sms.messages)); phoneMonitor.sms.number = 0; pthread_mutex_unlock(&smsMutex); fld = g_malloc(sizeof(gn_sms_folder)); list = g_malloc(sizeof(gn_sms_folder_list)); gdat.sms_folder = fld; gdat.sms_folder_list = list; i = 0; while (1) { i++; msg = g_malloc0(sizeof(gn_sms)); msg->memory_type = GN_MT_SM; msg->number = i; gdat.sms = msg; if ((error = gn_sms_get(&gdat, statemachine)) == GN_ERR_NONE) { gn_log_xdebug("Found valid SMS ...\n"); pthread_mutex_lock(&smsMutex); phoneMonitor.sms.messages = g_slist_append(phoneMonitor.sms.messages, msg); phoneMonitor.sms.number++; pthread_mutex_unlock(&smsMutex); if (phoneMonitor.sms.number == number) { g_free(list); g_free(fld); break; } } else if (error == GN_ERR_INVALIDLOCATION) { /* All positions are read */ g_free(list); g_free(fld); g_free(msg); break; } else if (error == GN_ERR_INVALIDMEMORYTYPE) { /* We have some misconfiguration: phone doesn't handle neither folders nor SIM */ fprintf(stderr, _("Misconfiguration detected: phone handles neither folders nor sim.\n" "Contact gnokii developers to fix the issue.\n")); break; } else { g_free(msg); usleep(750000); } } } } static gint A_GetMemoryStatus(gpointer data) { gn_error error = GN_ERR_UNKNOWN; D_MemoryStatus *ms = (D_MemoryStatus *) data; gn_data gdat; if (!ms) return error; gn_data_clear(&gdat); pthread_mutex_lock(&memoryMutex); gdat.memory_status = &(ms->memoryStatus); error = ms->status = gn_sm_functions(GN_OP_GetMemoryStatus, &gdat, statemachine); pthread_cond_signal(&memoryCond); pthread_mutex_unlock(&memoryMutex); return (error); } static gint A_GetMemoryLocation(gpointer data) { gn_error error = GN_ERR_UNKNOWN; D_MemoryLocation *ml = (D_MemoryLocation *) data; gn_data gdat; if (!ml) return error; gn_data_clear(&gdat); pthread_mutex_lock(&memoryMutex); gdat.phonebook_entry = (ml->entry); error = ml->status = gn_sm_functions(GN_OP_ReadPhonebook, &gdat, statemachine); pthread_cond_signal(&memoryCond); pthread_mutex_unlock(&memoryMutex); return (error); } static gint A_GetMemoryLocationAll(gpointer data) { gn_phonebook_entry entry; gn_error error; D_MemoryLocationAll *mla = (D_MemoryLocationAll *)data; register gint i, j, read = 0; gn_data gdat; gn_data_clear(&gdat); error = mla->status = GN_ERR_NONE; gdat.phonebook_entry = &entry; pthread_mutex_lock(&memoryMutex); for (i = mla->min; i <= mla->max; i++) { memset(&entry, 0, sizeof(entry)); entry.memory_type = mla->type; entry.location = i; error = gn_sm_functions(GN_OP_ReadPhonebook, &gdat, statemachine); if (error != GN_ERR_NONE && error != GN_ERR_INVALIDLOCATION && error != GN_ERR_EMPTYLOCATION && error != GN_ERR_INVALIDMEMORYTYPE) { gint err_count = 0; while (error != GN_ERR_NONE) { g_print(_ ("%s: line %d: Can't get memory entry number %d from memory %d! %d\n"), __FILE__, __LINE__, i, entry.memory_type, error); if (err_count++ > 3) { mla->ReadFailed(i); mla->status = error; pthread_cond_signal(&memoryCond); pthread_mutex_unlock(&memoryMutex); return (error); } error = gn_sm_functions(GN_OP_ReadPhonebook, &gdat, statemachine); sleep(2); } } else { if (error == GN_ERR_INVALIDMEMORYTYPE) { /* If the memory type was invalid - just fill up the rest */ /* (Markus) */ entry.empty = true; entry.name[0] = 0; entry.number[0] = 0; for (j = mla->min; j <= mla->max; j++) error = mla->InsertEntry(&entry); pthread_cond_signal(&memoryCond); pthread_mutex_unlock(&memoryMutex); return GN_ERR_NONE; } } if ((error == GN_ERR_NONE) && (entry.empty == false)) read++; gn_log_xdebug("Name: %s\n", entry.name); error = mla->InsertEntry(&entry); /* FIXME: It only works this way at the moment */ /* if (error != GN_ERR_NONE) break;*/ if (read == mla->used) { mla->status = error; entry.empty = true; entry.name[0] = 0; entry.number[0] = 0; for (j = i + 1; j <= mla->max; j++) error = mla->InsertEntry(&entry); pthread_cond_signal(&memoryCond); pthread_mutex_unlock(&memoryMutex); return GN_ERR_NONE; } } mla->status = error; pthread_cond_signal(&memoryCond); pthread_mutex_unlock(&memoryMutex); return (error); } static gint A_WriteMemoryLocation(gpointer data) { gn_error error; D_MemoryLocation *ml = (D_MemoryLocation *) data; gn_data gdat; if (!data) return GN_ERR_INTERNALERROR; gn_data_clear(&gdat); error = ml->status = GN_ERR_UNKNOWN; if (ml->entry) { gn_phonebook_entry_sanitize(ml->entry); gdat.phonebook_entry = (ml->entry); pthread_mutex_lock(&memoryMutex); error = ml->status = gn_sm_functions(GN_OP_WritePhonebook, &gdat, statemachine); pthread_cond_signal(&memoryCond); pthread_mutex_unlock(&memoryMutex); } return (error); } static gint A_WriteMemoryLocationAll(gpointer data) { gn_error error; D_MemoryLocationAll *mla = (D_MemoryLocationAll *) data; gn_data gdat; gn_data_clear(&gdat); error = mla->status = GN_ERR_UNKNOWN; return error; } static gint A_DeleteMemoryLocation(gpointer data) { gn_error error = GN_ERR_UNKNOWN; D_MemoryLocation *ml = (D_MemoryLocation *) data; gn_data gdat; if (!ml) return GN_ERR_INTERNALERROR; gn_data_clear(&gdat); error = ml->status = GN_ERR_UNKNOWN; if (ml->entry) { gn_phonebook_entry_sanitize(ml->entry); gdat.phonebook_entry = (ml->entry); pthread_mutex_lock(&memoryMutex); error = ml->status = gn_sm_functions(GN_OP_DeletePhonebook, &gdat, statemachine); pthread_cond_signal(&memoryCond); pthread_mutex_unlock(&memoryMutex); } return (error); } static gint A_GetCalendarNote(gpointer data) { gn_error error = GN_ERR_UNKNOWN; D_CalendarNote *cn = (D_CalendarNote *) data; gn_data gdat; if (!cn) return error; gn_data_clear(&gdat); pthread_mutex_lock(&calendarMutex); gdat.calnote = cn->entry; error = cn->status = gn_sm_functions(GN_OP_GetCalendarNote, &gdat, statemachine); pthread_cond_signal(&calendarCond); pthread_mutex_unlock(&calendarMutex); return (error); } static gint A_GetCalendarNoteAll(gpointer data) { gn_calnote_list list; gn_calnote entry; D_CalendarNoteAll *cna = (D_CalendarNoteAll *) data; gn_error error; register gint i = 1; gn_data gdat; gn_data_clear(&gdat); memset(&entry, 0, sizeof(entry)); memset(&list, 0, sizeof(list)); pthread_mutex_lock(&calendarMutex); while (1) { entry.location = i; gdat.calnote = &entry; gdat.calnote_list = &list; if ((error = gn_sm_functions(GN_OP_GetCalendarNote, &gdat, statemachine)) != GN_ERR_NONE) break; /* This is necessary for phones with calendar notes index (7110/6510) */ entry.location = i++; if (cna->InsertEntry(&entry) != GN_ERR_NONE) break; } pthread_mutex_unlock(&calendarMutex); g_free(cna); if (error == GN_ERR_INVALIDLOCATION) return GN_ERR_NONE; else return error; } static gint A_WriteCalendarNote(gpointer data) { gn_error error = GN_ERR_UNKNOWN; D_CalendarNote *cn = (D_CalendarNote *) data; gn_data gdat; if (!cn) return error; gn_data_clear(&gdat); pthread_mutex_lock(&calendarMutex); gdat.calnote = cn->entry; error = cn->status = gn_sm_functions(GN_OP_WriteCalendarNote, &gdat, statemachine); pthread_cond_signal(&calendarCond); pthread_mutex_unlock(&calendarMutex); return (error); } static gint A_DeleteCalendarNote(gpointer data) { gn_calnote *note = (gn_calnote *) data; gn_error error = GN_ERR_UNKNOWN; gn_data gdat; gn_data_clear(&gdat); if (note) { gdat.calnote = note; error = gn_sm_functions(GN_OP_DeleteCalendarNote, &gdat, statemachine); g_free(note); } return (error); } static gint A_GetCallerGroup(gpointer data) { gn_bmp bitmap; gn_error error = GN_ERR_UNKNOWN; D_CallerGroup *cg = (D_CallerGroup *) data; gn_data gdat; if (!cg) return error; gn_data_clear(&gdat); bitmap.type = GN_BMP_CallerLogo; bitmap.number = cg->number; pthread_mutex_lock(&callerGroupMutex); gdat.bitmap = &bitmap; error = cg->status = gn_sm_functions(GN_OP_GetBitmap, &gdat, statemachine); snprintf(cg->text, sizeof(cg->text), "%s", bitmap.text); pthread_cond_signal(&callerGroupCond); pthread_mutex_unlock(&callerGroupMutex); return (error); } static gint A_SendCallerGroup(gpointer data) { gn_bmp bitmap; D_CallerGroup *cg = (D_CallerGroup *) data; gn_error error; gn_data gdat; if (!cg) return GN_ERR_UNKNOWN; gn_data_clear(&gdat); bitmap.type = GN_BMP_CallerLogo; bitmap.number = cg->number; gdat.bitmap = &bitmap; if ((error = gn_sm_functions(GN_OP_GetBitmap, &gdat, statemachine)) != GN_ERR_NONE) { g_free(cg); return (error); } strncpy(bitmap.text, cg->text, 256); bitmap.text[255] = '\0'; g_free(cg); return (gn_sm_functions(GN_OP_SetBitmap, &gdat, statemachine)); } static gint A_GetSMSCenter(gpointer data) { D_SMSCenter *c = (D_SMSCenter *) data; gn_error error = GN_ERR_UNKNOWN; gn_data gdat; if (!c) return error; gn_data_clear(&gdat); pthread_mutex_lock(&smsCenterMutex); gdat.message_center = c->center; error = c->status = gn_sm_functions(GN_OP_GetSMSCenter, &gdat, statemachine); pthread_cond_signal(&smsCenterCond); pthread_mutex_unlock(&smsCenterMutex); return (error); } static gint A_SetSMSCenter(gpointer data) { D_SMSCenter *smsc = (D_SMSCenter *) data; gn_error error = GN_ERR_UNKNOWN; gn_data gdat; if (!smsc) return error; gn_data_clear(&gdat); gdat.message_center = smsc->center; pthread_mutex_lock(&smsCenterMutex); error = smsc->status = gn_sm_functions(GN_OP_GetSMSCenter, &gdat, statemachine); g_free(smsc); pthread_cond_signal(&smsCenterCond); pthread_mutex_unlock(&smsCenterMutex); return (error); } static gint A_SendSMSMessage(gpointer data) { D_SMSMessage *d = (D_SMSMessage *) data; gn_error error = GN_ERR_UNKNOWN; gn_data gdat; if (!d) return error; gn_data_clear(&gdat); gdat.sms = d->sms; pthread_mutex_lock(&sendSMSMutex); error = d->status = gn_sms_send(&gdat, statemachine); /* we do not use sms reference numbers in xgnokii */ free(gdat.sms->reference); pthread_cond_signal(&sendSMSCond); pthread_mutex_unlock(&sendSMSMutex); return (error); } static gint A_DeleteSMSMessage(gpointer data) { gn_sms *sms = (gn_sms *) data; gn_error error = GN_ERR_UNKNOWN; gn_data gdat; gn_data_clear(&gdat); if (sms) { gdat.sms = sms; if (phoneMonitor.supported & PM_FOLDERS) error = gn_sms_delete_no_validate(&gdat, statemachine); else error = gn_sms_delete(&gdat, statemachine); g_free(sms); } return (error); } static gint A_GetSpeedDial(gpointer data) { D_SpeedDial *d = (D_SpeedDial *) data; gn_error error = GN_ERR_UNKNOWN; gn_data gdat; if (!d) return error; gn_data_clear(&gdat); gdat.speed_dial = &d->entry; pthread_mutex_lock(&speedDialMutex); error = d->status = gn_sm_functions(GN_OP_GetSpeedDial, &gdat, statemachine); pthread_cond_signal(&speedDialCond); pthread_mutex_unlock(&speedDialMutex); return (error); } static gint A_SendSpeedDial(gpointer data) { D_SpeedDial *d = (D_SpeedDial *) data; gn_error error = GN_ERR_UNKNOWN; gn_data gdat; if (!d) return error; gn_data_clear(&gdat); gdat.speed_dial = &d->entry; pthread_mutex_lock(&speedDialMutex); error = d->status = gn_sm_functions(GN_OP_SetSpeedDial, &gdat, statemachine); pthread_cond_signal(&speedDialCond); pthread_mutex_unlock(&speedDialMutex); return (error); } static gint A_SendDTMF(gpointer data) { gchar *buf = (gchar *) data; gn_error error = GN_ERR_UNKNOWN; gn_data gdat; gn_data_clear(&gdat); if (buf) { gdat.dtmf_string = buf; error = gn_sm_functions(GN_OP_SendDTMF, &gdat, statemachine); gdat.dtmf_string = NULL; g_free(buf); } return (error); } static gint A_NetMonOnOff(gpointer data) { gint mode = GPOINTER_TO_INT(data); gn_netmonitor nm; gn_data gdat; gn_data_clear(&gdat); gdat.netmonitor = &nm; if (mode) nm.field = 0xf3; else nm.field = 0xf1; return gn_sm_functions(GN_OP_NetMonitor, &gdat, statemachine); } static gint A_NetMonitor(gpointer data) { gint number = GPOINTER_TO_INT(data); if (data == 0) phoneMonitor.netmonitor.number = 0; else phoneMonitor.netmonitor.number = number; return (0); } static gint A_DialVoice(gpointer data) { gchar *number = (gchar *) data; gn_error error; gn_call_info CallInfo; int CallId; gn_data gdat; gn_data_clear(&gdat); if (!number) return GN_ERR_UNKNOWN; memset(&CallInfo, 0, sizeof(CallInfo)); snprintf(CallInfo.number, sizeof(CallInfo.number), "%s", number); CallInfo.type = GN_CALL_Voice; CallInfo.send_number = GN_CALL_Default; g_free(number); gdat.call_info = &CallInfo; error = gn_call_dial(&CallId, &gdat, statemachine); gdat.call_info = NULL; return (error); } static gint A_GetAlarm(gpointer data) { D_Alarm *a = (D_Alarm *) data; gn_error error; gn_data gdat; gn_data_clear(&gdat); error = GN_ERR_UNKNOWN; if (a) { a->status = GN_ERR_UNKNOWN; pthread_mutex_lock(&alarmMutex); gdat.datetime = &a->alarm.timestamp; gdat.alarm = &a->alarm; error = a->status = gn_sm_functions(GN_OP_GetAlarm, &gdat, statemachine); pthread_cond_signal(&alarmCond); pthread_mutex_unlock(&alarmMutex); } return (error); } static gint A_SetAlarm(gpointer data) { D_Alarm *a = (D_Alarm *) data; gn_error error = GN_ERR_UNKNOWN; gn_data gdat; if (!a) return GN_ERR_UNKNOWN; gn_data_clear(&gdat); gdat.alarm = &a->alarm; error = a->status = gn_sm_functions(GN_OP_SetAlarm, &gdat, statemachine); g_free(a); return (error); } static gint A_PressKey(gpointer data) { gn_data gdat; gn_data_clear(&gdat); gdat.key_code = GPOINTER_TO_INT(data); return gn_sm_functions(GN_OP_PressPhoneKey, &gdat, statemachine); } static gint A_ReleaseKey(gpointer data) { gn_data gdat; gn_data_clear(&gdat); gdat.key_code = GPOINTER_TO_INT(data); return gn_sm_functions(GN_OP_ReleasePhoneKey, &gdat, statemachine); } static gint A_GetBitmap(gpointer data) { gn_error error; D_Bitmap *d = (D_Bitmap *) data; gn_data gdat; gn_data_clear(&gdat); pthread_mutex_lock(&getBitmapMutex); gdat.bitmap = d->bitmap; error = d->status = gn_sm_functions(GN_OP_GetBitmap, &gdat, statemachine); pthread_cond_signal(&getBitmapCond); pthread_mutex_unlock(&getBitmapMutex); return error; } static gint A_SetBitmap(gpointer data) { gn_error error; D_Bitmap *d = (D_Bitmap *) data; gn_bmp bitmap; gn_data gdat; gn_data_clear(&gdat); pthread_mutex_lock(&setBitmapMutex); if (d->bitmap->type == GN_BMP_CallerLogo) { bitmap.type = d->bitmap->type; bitmap.number = d->bitmap->number; gdat.bitmap = &bitmap; error = d->status = gn_sm_functions(GN_OP_GetBitmap, &gdat, statemachine); if (error == GN_ERR_NONE) { strncpy(d->bitmap->text, bitmap.text, sizeof(bitmap.text)); d->bitmap->ringtone = bitmap.ringtone; gdat.bitmap = d->bitmap; error = d->status = gn_sm_functions(GN_OP_SetBitmap, &gdat, statemachine); } } else { gdat.bitmap = d->bitmap; error = d->status = gn_sm_functions(GN_OP_SetBitmap, &gdat, statemachine); } pthread_cond_signal(&setBitmapCond); pthread_mutex_unlock(&setBitmapMutex); return error; } static gint A_GetNetworkInfo(gpointer data) { gn_error error; D_NetworkInfo *d = (D_NetworkInfo *) data; gn_data gdat; gn_data_clear(&gdat); pthread_mutex_lock(&getNetworkInfoMutex); gdat.network_info = d->info; gdat.reg_notification = NULL; gdat.callback_data = NULL; error = d->status = gn_sm_functions(GN_OP_GetNetworkInfo, &gdat, statemachine); pthread_cond_signal(&getNetworkInfoCond); pthread_mutex_unlock(&getNetworkInfoMutex); return error; } static gint A_PlayTone(gpointer data) { D_PlayTone *d = (D_PlayTone *) data; gn_tone tone; gn_data gdat; gn_error error; static int uadj = -1; gn_data_clear(&gdat); pthread_mutex_lock(&ringtoneMutex); tone.frequency = d->frequency; tone.volume = d->volume; gdat.tone = &tone; if (uadj < 0) { struct timeval t1, t2, dt; gettimeofday(&t1, NULL); error = gn_sm_functions(GN_OP_PlayTone, &gdat, statemachine); gettimeofday(&t2, NULL); timersub(&t2, &t1, &dt); uadj = 2 * dt.tv_usec; } else { error = gn_sm_functions(GN_OP_PlayTone, &gdat, statemachine); } if (d->usec > 0) { if (d->usec > uadj) usleep(d->usec - uadj); tone.frequency = 0; tone.volume = 0; gn_sm_functions(GN_OP_PlayTone, &gdat, statemachine); } pthread_cond_signal(&ringtoneCond); pthread_mutex_unlock(&ringtoneMutex); return error; } static gint A_GetRingtone(gpointer data) { D_Ringtone *d = (D_Ringtone *) data; gn_data gdat; gn_data_clear(&gdat); pthread_mutex_lock(&ringtoneMutex); gdat.ringtone = d->ringtone; d->status = gn_sm_functions(GN_OP_GetRingtone, &gdat, statemachine); pthread_cond_signal(&ringtoneCond); pthread_mutex_unlock(&ringtoneMutex); return d->status; } static gint A_SetRingtone(gpointer data) { D_Ringtone *d = (D_Ringtone *) data; gn_data gdat; gn_data_clear(&gdat); pthread_mutex_lock(&ringtoneMutex); gdat.ringtone = d->ringtone; d->status = gn_sm_functions(GN_OP_SetRingtone, &gdat, statemachine); pthread_cond_signal(&ringtoneCond); pthread_mutex_unlock(&ringtoneMutex); return d->status; } static gint A_DeleteRingtone(gpointer data) { D_Ringtone *d = (D_Ringtone *) data; gn_data gdat; gn_data_clear(&gdat); pthread_mutex_lock(&ringtoneMutex); gdat.ringtone = d->ringtone; d->status = gn_sm_functions(GN_OP_DeleteRingtone, &gdat, statemachine); pthread_cond_signal(&ringtoneCond); pthread_mutex_unlock(&ringtoneMutex); return d->status; } static gint A_GetRingtoneList(gpointer data) { gn_ringtone_list *d = (gn_ringtone_list *) data; gn_data gdat; gn_data_clear(&gdat); pthread_mutex_lock(&ringtoneMutex); gdat.ringtone_list = d; if (gn_sm_functions(GN_OP_GetRingtoneList, &gdat, statemachine) != GN_ERR_NONE) { d->count = 0; d->userdef_location = 0; d->userdef_count = 0; } pthread_cond_signal(&ringtoneCond); pthread_mutex_unlock(&ringtoneMutex); return GN_ERR_NONE; } static gint A_Exit(gpointer data) { pthread_exit(0); return (0); /* just to be proper */ } gint(*DoAction[])(gpointer) = { A_GetMemoryStatus, A_GetMemoryLocation, A_GetMemoryLocationAll, A_WriteMemoryLocation, A_WriteMemoryLocationAll, A_DeleteMemoryLocation, A_GetCalendarNote, A_GetCalendarNoteAll, A_WriteCalendarNote, A_DeleteCalendarNote, A_GetCallerGroup, A_SendCallerGroup, A_GetSMSCenter, A_SetSMSCenter, A_SendSMSMessage, A_DeleteSMSMessage, A_GetSpeedDial, A_SendSpeedDial, A_SendDTMF, A_NetMonOnOff, A_NetMonitor, A_DialVoice, A_GetAlarm, A_SetAlarm, A_PressKey, A_ReleaseKey, A_GetBitmap, A_SetBitmap, A_GetNetworkInfo, A_PlayTone, A_GetRingtone, A_SetRingtone, A_DeleteRingtone, A_GetRingtoneList, A_Exit}; void *GUI_Connect(void *a) { /* Define required unit types for RF and Battery level meters. */ gn_rf_unit rf_units = GN_RF_Percentage; gn_battery_unit batt_units = GN_BU_Percentage; gn_calnote_alarm Alarm; gn_netmonitor netmonitor; gn_data gdat; gint displaystatus, i, j; time_t newtime, oldtime; gn_call *call; PhoneEvent *event; gn_error error; gn_log_xdebug("Initializing connection...\n"); phoneMonitor.working = _("Connecting..."); if (fbusinit() != GN_ERR_NONE) { gn_log_xdebug("Initialization failed...\n"); MainExit(NULL); return NULL; } if (!xgnokiiConfig.allowBreakage && /* User did not allow to break the phone */ (phoneMonitor.supported & PM_XGNOKIIBREAKAGE) && /* Phone is known to be on the black list */ strncmp(xgnokiiConfig.model, "AT", 2)) { /* We're not using it in AT mode */ gn_log_xdebug("Detected phone known to be broken using xgnokii\n"); MainExit(_("It has been reported that your phone is known to be broken by xgnokii.\n" "Exiting application to avoid breakage. If you want to take a risk and\n" "run xgnokii anyway, set:\n\n" "\tallow_breakage = 1\n\n" "in xgnokii section in your config file.\n" "See http://thread.gmane.org/gmane.linux.drivers.gnokii/3195 for details.\n")); return NULL; } gn_log_xdebug("Phone connected. Starting monitoring...\n"); sleep(1); gn_data_clear(&gdat); gdat.rf_level = &phoneMonitor.rfLevel; gdat.rf_unit = &rf_units; gdat.power_source = &phoneMonitor.powerSource; gdat.battery_unit = &batt_units; gdat.battery_level = &phoneMonitor.batteryLevel; gdat.datetime = &Alarm.timestamp; gdat.alarm = &Alarm; oldtime = time(&oldtime); oldtime += 2; while (1) { phoneMonitor.working = NULL; /* FIXME - this loop goes mad on my 7110 - so I've put in a usleep */ usleep(50000); if ((call = gn_call_get_active(0)) != NULL) { gn_log_xdebug("Call in progress: %s\n", phoneMonitor.call.callNum); gdat.display_status = &displaystatus; gn_sm_functions(GN_OP_GetDisplayStatus, &gdat, statemachine); if (displaystatus & (1<remote_number, INCALL_NUMBER_LENGTH); pthread_mutex_unlock (&callMutex); } } else { pthread_mutex_lock(&callMutex); phoneMonitor.call.callInProgress = CS_Idle; *phoneMonitor.call.callNum = '\0'; pthread_mutex_unlock(&callMutex); } pthread_mutex_lock(&netMonMutex); if (phoneMonitor.netmonitor.number) { gdat.netmonitor = &netmonitor; gdat.netmonitor->field = phoneMonitor.netmonitor.number; gn_sm_functions(GN_OP_NetMonitor, &gdat, statemachine); memcpy(phoneMonitor.netmonitor.screen, gdat.netmonitor->screen, sizeof(gdat.netmonitor->screen)); gdat.netmonitor->field = 3; gn_sm_functions(GN_OP_NetMonitor, &gdat, statemachine); memcpy(phoneMonitor.netmonitor.screen3, gdat.netmonitor->screen, sizeof(gdat.netmonitor->screen)); gdat.netmonitor->field = 4; gn_sm_functions(GN_OP_NetMonitor, &gdat, statemachine); memcpy(phoneMonitor.netmonitor.screen4, gdat.netmonitor->screen, sizeof(gdat.netmonitor->screen)); gdat.netmonitor->field = 5; gn_sm_functions(GN_OP_NetMonitor, &gdat, statemachine); memcpy(phoneMonitor.netmonitor.screen5, gdat.netmonitor->screen, sizeof(gdat.netmonitor->screen)); } else { *phoneMonitor.netmonitor.screen = *phoneMonitor.netmonitor.screen3 = *phoneMonitor.netmonitor.screen4 = *phoneMonitor.netmonitor.screen5 = '\0'; } pthread_mutex_unlock(&netMonMutex); while ((event = RemoveEvent()) != NULL) { gn_log_xdebug("Processing Event: %d\n", event->event); phoneMonitor.working = _("Working..."); if (event->event <= Event_Exit) if ((error = DoAction[event->event] (event->data)) != GN_ERR_NONE) g_print(_("Event %d failed with return code %d!\n"), event->event, error); g_free(event); } /* two seconds delay for SMS, RF/power level */ newtime = time(&newtime); if (newtime < oldtime + 2) continue; oldtime = newtime; if (gn_sm_functions(GN_OP_GetRFLevel, &gdat, statemachine) != GN_ERR_NONE) phoneMonitor.rfLevel = -1; if (gn_sm_functions(GN_OP_GetPowersource, &gdat, statemachine) == GN_ERR_NONE && phoneMonitor.powerSource == GN_PS_ACDC) phoneMonitor.batteryLevel = ((gint) phoneMonitor.batteryLevel + 25) % 125; else { if (gn_sm_functions(GN_OP_GetBatteryLevel, &gdat, statemachine) != GN_ERR_NONE) phoneMonitor.batteryLevel = -1; if (batt_units == GN_BU_Arbitrary) phoneMonitor.batteryLevel *= 25; } if (rf_units == GN_RF_Arbitrary) phoneMonitor.rfLevel *= 25; if (gn_sm_functions(GN_OP_GetAlarm, &gdat, statemachine) == GN_ERR_NONE && Alarm.enabled != 0) phoneMonitor.alarm = TRUE; else phoneMonitor.alarm = FALSE; /* only do SMS monitoring when activated */ if (!isSMSactivated) continue; gdat.sms_status = &SMSStatus; /* FIXME: This can surely be done easier */ for (i = 0; i < GN_SMS_FOLDER_MAX_NUMBER; i++) { gdat.folder_stats[i] = &FolderStats[i]; for (j = 0; j < GN_SMS_MESSAGE_MAX_NUMBER; j++) gdat.message_list[j][i] = &MessagesList[j][i]; } if ((gn_sms_get_folder_changes(&gdat, statemachine, (phoneMonitor.supported & PM_FOLDERS))) == GN_ERR_NONE) { gn_log_xdebug("old UR: %i, new UR: %i, old total: %i, new total: %i\n", phoneMonitor.sms.unRead, gdat.sms_status->unread, phoneMonitor.sms.number, gdat.sms_status->number); phoneMonitor.sms.changed += gdat.sms_status->changed; if (gdat.sms_status->changed) { phoneMonitor.working = _("Refreshing SMSes..."); RefreshSMS(gdat.sms_status->number); phoneMonitor.working = NULL; GUIEventSend(GUI_EVENT_SMS_NUMBER_CHANGED); } phoneMonitor.sms.unRead = gdat.sms_status->unread; } } } gnokii-0.6.31/xgnokii/xgnokii.desktop.in0000644000175000017500000000034111666163120016321 0ustar leoleo[Desktop Entry] _Name=Xgnokii _GenericName=Mobile Phone Suite _Comment=Manage your mobile phone Icon=phone Exec=xgnokii Terminal=false Type=Application Categories=Utility;TelephonyTools;Calendar;ContactManagement;Office;GTK; gnokii-0.6.31/xgnokii/xgnokii_sms.h0000644000175000017500000000207411666163120015361 0ustar leoleo/* $Id$ X G N O K I I A Linux/Unix GUI for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999 Pavel Janík ml., Hugh Blemings & 1999-2005 Jan Derfinak. */ #ifndef XGNOKII_SMS_H #define XGNOKII_SMS_H extern void GUI_CreateSMSWindow(void); extern void GUI_ShowSMS(void); extern void GUI_RefreshMessageWindow(void); extern void GUI_RefreshSMSCenterMenu(void); #endif gnokii-0.6.31/xgnokii/xgnokii_logos.c0000644000175000017500000015012211666163120015673 0ustar leoleo/* $Id$ X G N O K I I A Linux/Unix GUI for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999 Pavel Janik ml., Hugh Blemings Copyright (C) 1999-2005 Jan Derfinak Copyright (C) 2000-2001 Marcin Wiacek, Chris Kemp Copyright (C) 2002-2006 Pawel Kot Copyright (C) 2002 Markus Plail */ #include "config.h" #include #include #include #include #include #include #include #include #include "misc.h" #include "gnokii.h" #include "xgnokii_logos.h" #include "xgnokii_common.h" #include "xgnokii_lowlevel.h" #include "xgnokii.h" #include "xpm/Operator_logo.xpm" #include "xpm/Startup_logo.xpm" #include "xpm/Caller_logo.xpm" #include "xpm/Black_point.xpm" #include "xpm/Green_point.xpm" #include "xpm/Green_pixel.xpm" #include "xpm/New.xpm" #include "xpm/Send.xpm" #include "xpm/Read.xpm" #include "xpm/Open.xpm" #include "xpm/Save.xpm" #include "xpm/Edit_invert.xpm" #include "xpm/Edit_flip_horizontal.xpm" #include "xpm/Edit_flip_vertical.xpm" #include "xpm/Tool_brush.xpm" #include "xpm/Tool_line.xpm" #include "xpm/Tool_rectangle.xpm" #include "xpm/Tool_filled_rectangle.xpm" GtkWidget *GUI_LogosWindow; ErrorDialog errorDialog = { NULL, NULL }; InfoDialog infoDialog = { NULL, NULL }; /* stuff for drawingArea */ GtkWidget *drawingArea = NULL; GdkPixmap *drawingPixmap = NULL; GdkPixmap *greenPointPixmap, *blackPointPixmap; int drawingAreaWidth, drawingAreaHeight; /* in pixels */ int mouseButtonPushed = 0; /* stuff for previewArea */ #define MAX_PIXMAPS 100 GtkWidget *previewArea = NULL; GdkPixmap *previewPixmap = NULL; GdkPixmap *greenPixelPixmap; int previewPixmapWidth, previewPixmapHeight; int previewAvailable = 1, showPreviewErrorDialog = 1; int previewPixmapNumber = 0, pixmapFiles = 0; int pixmapsInitialized = FALSE, pixmapDefaultId = -1; gchar *pixmapNames[MAX_PIXMAPS]; gn_bmp bitmap, oldBitmap; gn_network_info networkInfo; /* widgets for toolbar - some, need global variables */ GtkWidget *buttonStartup, *buttonOperator, *buttonCaller; GtkWidget *networkCombo, *callerCombo; int activeTool = TOOL_BRUSH; int toolStartX, toolStartY, toolLastX, toolLastY; /* tools for drawing */ static GtkWidget *buttonBrush, *buttonLine, *buttonRectangle; static GtkWidget *buttonFilledRectangle; /* Contains fileName for Export dialog. */ typedef struct { gchar *fileName; } ExportDialogData; static ExportDialogData exportDialogData = { NULL }; GtkWidget *FileSelection; static int callersGroupsInitialized = 0; /* returns lowest number from three numbers */ int GetMinFrom3(int a, int b, int c) { if (a > b) { if (b > c) return c; else return b; } else { if (a > c) return c; else return a; } } /* returns highest number from three numbers */ int GetMaxFrom3(int a, int b, int c) { if (a > b) { if (c > a) return c; else return a; } else { if (c > b) return c; else return b; } } /* Read all Preview* files from the given path and put them into pixmapNames * array. We support no more than MAX_PIXMAP files. */ static void GetPixmaps(gchar *path) { DIR *dir; struct dirent *de; dir = opendir(path); while (dir && (de = readdir(dir))) { if (pixmapFiles == MAX_PIXMAPS) break; if (!strncmp(de->d_name, "Preview_", 8)) { pixmapNames[pixmapFiles] = g_strdup(de->d_name); if (!strcmp(de->d_name, "Preview_default.xpm")) pixmapDefaultId = pixmapFiles; pixmapFiles++; } } closedir(dir); pixmapsInitialized = TRUE; } /* Get the pixmap that filename contains model string. If there's none, get * default one. */ static int GetPixmapId(gchar *model) { int i, pos = pixmapDefaultId; for (i = 0; i < pixmapFiles; i++) { if (strstr(pixmapNames[i], model)) { pos = i; break; } } return pos; } /* Load preview pixmap from file. On the first run do the initialization. * Next runs are after clicking on the preview area that should switch to the * next pixmap. In case none is available NULL is returned. */ GdkPixmap *GetPreviewPixmap(GtkWidget *widget) { GdkPixmap *pixmap = NULL; GdkBitmap *mask; gchar *file, *dirname; dirname = g_strdup_printf("%s/xpm/", xgnokiiConfig.xgnokiidir); if (!pixmapsInitialized) { GetPixmaps(dirname); previewPixmapNumber = GetPixmapId(xgnokiiConfig.model); } if (previewPixmapNumber >= 0) { file = g_strdup_printf("%s%s", dirname, pixmapNames[previewPixmapNumber]); pixmap = gdk_pixmap_create_from_xpm(widget->window, &mask, &widget->style->bg[GTK_STATE_NORMAL], file); g_free(file); } g_free(dirname); return pixmap; } /* ******************************************************** * ** SET/CLEAR POINTS ************************************ * ******************************************************** */ void SetPreviewPoint(GtkWidget * widget, int x, int y, int update) { if (!previewAvailable) return; /* there is difference between positiong of startupLogo and others */ if (bitmap.type != GN_BMP_StartupLogo) { x += PREVIEWJUMPX; y += PREVIEWJUMPY; } /* draw point to pixmap */ if (previewPixmap) gdk_draw_point(previewPixmap, widget->style->black_gc, x + PREVIEWSTARTX, y + PREVIEWSTARTY); if (update) { GdkRectangle updateRect; /* update point on screen */ updateRect.width = 1; updateRect.height = 1; updateRect.x = PREVIEWSTARTX + x; updateRect.y = PREVIEWSTARTY + y; gtk_widget_draw(previewArea, &updateRect); } } void ClearPreviewPoint(GtkWidget * widget, int x, int y, int update) { if (!previewAvailable) return; /* there is difference between positiong of startupLogo and others */ if (bitmap.type != GN_BMP_StartupLogo) { x += PREVIEWJUMPX; y += PREVIEWJUMPY; } /* clean point from pixmap - any idea how to draw green point without pixmap? */ if (previewPixmap) gdk_draw_pixmap(previewPixmap, widget->style->fg_gc[GTK_WIDGET_STATE(widget)], greenPixelPixmap, 0, 0, x + PREVIEWSTARTX, y + PREVIEWSTARTY, 1, 1); if (update) { GdkRectangle updateRect; /* clean from screen too */ updateRect.width = 1; updateRect.height = 1; updateRect.x = PREVIEWSTARTX + x; updateRect.y = PREVIEWSTARTY + y; gtk_widget_draw(previewArea, &updateRect); } } int IsPoint(int x, int y) { return gn_bmp_point(&bitmap, x, y); } void SetPoint(GtkWidget * widget, int x, int y, int update) { /* difference between settings points in startupLogo and others */ gn_bmp_point_set(&bitmap, x, y); /* draw point to pixmap */ gdk_draw_pixmap(drawingPixmap, widget->style->fg_gc[GTK_WIDGET_STATE(widget)], blackPointPixmap, 0, 0, x * (POINTSIZE + 1), y * (POINTSIZE + 1), -1, -1); if (update) { GdkRectangle updateRect; /* calculate update rectangle */ updateRect.width = POINTSIZE + 2; updateRect.height = POINTSIZE + 2; updateRect.x = x * (POINTSIZE + 1); updateRect.y = y * (POINTSIZE + 1); /* update on screen */ gtk_widget_draw(drawingArea, &updateRect); } /* draw preview point too */ if (previewAvailable) SetPreviewPoint(widget, x, y, update); } void ClearPoint(GtkWidget * widget, int x, int y, int update) { /* difference between settings points in startupLogo and others */ gn_bmp_point_clear(&bitmap, x, y); /* clear point from pixmap */ gdk_draw_pixmap(drawingPixmap, widget->style->fg_gc[GTK_WIDGET_STATE(widget)], greenPointPixmap, 0, 0, x * (POINTSIZE + 1), y * (POINTSIZE + 1), -1, -1); if (update) { GdkRectangle updateRect; /* calculate update rectangle */ updateRect.width = POINTSIZE + 2; updateRect.height = POINTSIZE + 2; updateRect.x = x * (POINTSIZE + 1); updateRect.y = y * (POINTSIZE + 1); /* update on screen */ gtk_widget_draw(drawingArea, &updateRect); } /* clear point from previewArea too */ if (previewAvailable) ClearPreviewPoint(widget, x, y, update); } /* **************************************************** * *** UPDATES - PREVIEW & DRAWING AREAS ************** * **************************************************** */ /* this redraw all logo points - preview & drawing area */ void UpdatePointsRectangle(GtkWidget * widget, int x1, int y1, int x2, int y2) { GdkRectangle updateRect; int x, y, dx = 0, dy = 0; if (bitmap.type != GN_BMP_StartupLogo) { dx = PREVIEWJUMPX; dy = PREVIEWJUMPY; } if (x1 > x2) { x = x1; x1 = x2; x2 = x; } if (y1 > y2) { y = y1; y1 = y2; y2 = y; } for (y = y1; y <= y2; y++) for (x = x1; x <= x2; x++) { if (IsPoint(x, y)) { /* set on drawing area */ gdk_draw_pixmap(drawingPixmap, drawingArea->style-> fg_gc[GTK_WIDGET_STATE(drawingArea)], blackPointPixmap, 0, 0, x * (POINTSIZE + 1), y * (POINTSIZE + 1), -1, -1); /* set on preview */ if (previewAvailable && previewPixmap) gdk_draw_point(previewPixmap, previewArea->style->black_gc, x + PREVIEWSTARTX + dx, y + PREVIEWSTARTY + dy); } else { /* clear from drawing */ gdk_draw_pixmap(drawingPixmap, drawingArea->style-> fg_gc[GTK_WIDGET_STATE(drawingArea)], greenPointPixmap, 0, 0, x * (POINTSIZE + 1), y * (POINTSIZE + 1), -1, -1); /* clear from preview */ if (previewAvailable && previewPixmap) gdk_draw_pixmap(previewPixmap, previewArea->style-> fg_gc[GTK_WIDGET_STATE(previewArea)], greenPixelPixmap, 0, 0, x + PREVIEWSTARTX + dx, y + PREVIEWSTARTY + dy, 1, 1); } } if (previewAvailable) { updateRect.x = PREVIEWSTARTX + dx + x1; updateRect.y = PREVIEWSTARTY + dy + y1; updateRect.width = x2 - x1 + 1; updateRect.height = y2 - y1 + 1; gtk_widget_draw(previewArea, &updateRect); } updateRect.x = x1 * (POINTSIZE + 1); updateRect.y = y1 * (POINTSIZE + 1); updateRect.width = (x2 - x1 + 1) * (POINTSIZE + 1) + 1; updateRect.height = (y2 - y1 + 1) * (POINTSIZE + 1) + 1; gtk_widget_draw(drawingArea, &updateRect); } void UpdatePoints(GtkWidget * widget) { UpdatePointsRectangle(widget, 0, 0, bitmap.width - 1, bitmap.height - 1); } /* this redraw all logo points in previewArea, NO DRAWING AREA */ void UpdatePreviewPoints(void) { GdkRectangle updateRect; int x, y, dx = 0, dy = 0; if (!previewPixmap || !previewAvailable) return; if (bitmap.type != GN_BMP_StartupLogo) { dx = PREVIEWJUMPX; dy = PREVIEWJUMPY; } for (y = 0; y < bitmap.height; y++) for (x = 0; x < bitmap.width; x++) { if (IsPoint(x, y)) { gdk_draw_point(previewPixmap, previewArea->style->black_gc, x + PREVIEWSTARTX + dx, y + PREVIEWSTARTY + dy); } else { gdk_draw_pixmap(previewPixmap, previewArea->style-> fg_gc[GTK_WIDGET_STATE(previewArea)], greenPixelPixmap, 0, 0, x + PREVIEWSTARTX + dx, y + PREVIEWSTARTY + dy, 1, 1); } } updateRect.x = dx; updateRect.y = dy; updateRect.width = bitmap.width; updateRect.height = bitmap.height; gtk_widget_draw(previewArea, &updateRect); } /* ****************************************************** * **** DRAWING TOOLS *********************************** * ****************************************************** */ /* TOOL - BRUSH */ void ToolBrush(GtkWidget * widget, int column, int row, int button) { /* only this tool directly update bitmap & screen */ if (button > 1) ClearPoint(widget, column, row, 1); else SetPoint(widget, column, row, 1); } /* TOOL - LINE */ /* this function clear or draw a line on the screen USED BY TOOLLINEUPDATE */ void ToolLine(GtkWidget * widget, int x1, int y1, int x2, int y2, int draw) { int udx, udy, dx, dy, error, loop, xadd, yadd; dx = x2 - x1; /* x delta */ dy = y2 - y1; /* y delta */ udx = abs(dx); /* unsigned x delta */ udy = abs(dy); /* unsigned y delta */ if (dx < 0) { xadd = -1; } else { xadd = 1; } /* set directions */ if (dy < 0) { yadd = -1; } else { yadd = 1; } error = 0; loop = 0; if (udx > udy) { /* delta X > delta Y */ do { error += udy; if (error >= udx) { /* is time to move up or down? */ error -= udx; y1 += yadd; } loop++; if (draw == 1) { SetPoint(widget, x1, y1, 0); } else { /* now clearing line before drawing new one, we must check */ /* if there is a point in oldBitmap which saves bitmap before */ /* we starting drawing new line */ if (!gn_bmp_point(&oldBitmap, x1, y1)) { ClearPoint(widget, x1, y1, 0); } } x1 += xadd; /* move horizontally */ } while (loop < udx); /* repeat for x length */ } else { do { error += udx; if (error >= udy) { /* is time to move left or right? */ error -= udy; x1 += xadd; } loop++; if (draw == 1) { SetPoint(widget, x1, y1, 0); } else { /* check comment in delta X > delta Y */ if (!gn_bmp_point(&oldBitmap, x1, y1)) { ClearPoint(widget, x1, y1, 0); } } y1 += yadd; /* move vertically */ } while (loop < udy); /* repeat for y length */ } } /* going to rewrite to Bresenham algorithm */ void ToolLineUpdate(GtkWidget * widget, int column, int row) { /* clear old line */ ToolLine(widget, toolStartX, toolStartY, toolLastX, toolLastY, 0); /* draw new one */ ToolLine(widget, toolStartX, toolStartY, column, row, 1); } /* TOOL - FILLED RECT */ /* FIXME - going to rewrite for optimalized version, clearing and */ /* drawing new parts only before clearing and drawing whole */ /* filled rectangle - it's too slow on diskless terminal ;(( */ void ToolFilledRectangleUpdate(GtkWidget * widget, int column, int row) { int i, j, x1, y1, x2, y2; /* swap Xs to x1 < x2 */ if (toolStartX > toolLastX) { x1 = toolLastX; x2 = toolStartX; } else { x1 = toolStartX; x2 = toolLastX; } /* swap Ys to y1 < y2 */ if (toolStartY > toolLastY) { y1 = toolLastY; y2 = toolStartY; } else { y1 = toolStartY; y2 = toolLastY; } /* clear one now */ for (j = y1; j <= y2; j++) for (i = x1; i <= x2; i++) if (!gn_bmp_point(&oldBitmap, i, j)) ClearPoint(widget, i, j, 0); /* swap Xs to x1 < x2 */ if (toolStartX > column) { x1 = column; x2 = toolStartX; } else { x1 = toolStartX; x2 = column; } /* swap Ys to y1 < y2 */ if (toolStartY > row) { y1 = row; y2 = toolStartY; } else { y1 = toolStartY; y2 = row; } /* draw new one */ for (j = y1; j <= y2; j++) for (i = x1; i <= x2; i++) SetPoint(widget, i, j, 0); } /* TOOL - RECTANGLE */ void ToolRectangleUpdate(GtkWidget * widget, int column, int row) { int i, j, x1, y1, x2, y2; /* clear old rectangle */ /* swap Xs to x1 < x2 */ if (toolStartX > toolLastX) { x1 = toolLastX; x2 = toolStartX; } else { x1 = toolStartX; x2 = toolLastX; } /* swap Ys to y1 < y2 */ if (toolStartY > toolLastY) { y1 = toolLastY; y2 = toolStartY; } else { y1 = toolStartY; y2 = toolLastY; } /* clear old one */ for (i = x1; i <= x2; i++) { if (!gn_bmp_point(&oldBitmap, i, y1)) ClearPoint(widget, i, y1, 0); if (!gn_bmp_point(&oldBitmap, i, y2)) ClearPoint(widget, i, y2, 0); } for (j = y1; j <= y2; j++) { if (!gn_bmp_point(&oldBitmap, x1, j)) ClearPoint(widget, x1, j, 0); if (!gn_bmp_point(&oldBitmap, x2, j)) ClearPoint(widget, x2, j, 0); } /* draw new rectangle */ /* swap Xs to x1 < x2 */ if (toolStartX > column) { x1 = column; x2 = toolStartX; } else { x1 = toolStartX; x2 = column; } /* swap Ys to y1 < y2 */ if (toolStartY > row) { y1 = row; y2 = toolStartY; } else { y1 = toolStartY; y2 = row; } /* draw new one */ for (i = x1; i <= x2; i++) { if (!IsPoint(i, y1)) SetPoint(widget, i, y1, 0); if (!IsPoint(i, y2)) SetPoint(widget, i, y2, 0); } for (j = y1; j <= y2; j++) { if (!IsPoint(x1, j)) SetPoint(widget, x1, j, 0); if (!IsPoint(x2, j)) SetPoint(widget, x2, j, 0); } } /* this update tools actions on the screen - this is for optimalization */ /* eg. for faster redrawing tools actions - we do not need redraw pixel */ /* by pixel. Faster is redraw whole rectangle which contains all changes */ void UpdateToolScreen(GtkWidget * widget, int x1, int y1, int x2, int y2) { GdkRectangle updateRect; /* update preview area */ if (previewAvailable) { updateRect.x = PREVIEWSTARTX + x1; updateRect.y = PREVIEWSTARTY + y1; if (bitmap.type != GN_BMP_StartupLogo) { updateRect.x += PREVIEWJUMPX; updateRect.y += PREVIEWJUMPY; } updateRect.width = x2 - x1 + 1; updateRect.height = y2 - y1 + 1; gtk_widget_draw(previewArea, &updateRect); } /* update drawing area */ updateRect.x = x1 * (POINTSIZE + 1); updateRect.y = y1 * (POINTSIZE + 1); updateRect.width = (x2 - x1 + 1) * (POINTSIZE + 2); updateRect.height = (y2 - y1 + 1) * (POINTSIZE + 2); gtk_widget_draw(drawingArea, &updateRect); } /* ************************************* * ** PREVIEW AREA EVENTS ************** * ************************************* */ gint PreviewAreaButtonPressEvent(GtkWidget * widget, GdkEventButton * event) { previewPixmapNumber = ((previewPixmapNumber + 1) % pixmapFiles); gtk_drawing_area_size(GTK_DRAWING_AREA(previewArea), previewPixmapWidth, previewPixmapHeight); return TRUE; } gint PreviewAreaConfigureEvent(GtkWidget * widget, GdkEventConfigure * event) { if (previewPixmap) gdk_pixmap_unref(previewPixmap); previewPixmap = GetPreviewPixmap(widget); UpdatePreviewPoints(); return TRUE; } gint PreviewAreaExposeEvent(GtkWidget * widget, GdkEventExpose * event) { /* got previewPixmap? */ if (previewPixmap) /* yes - simply redraw some rectangle */ gdk_draw_pixmap(widget->window, widget->style->fg_gc[GTK_WIDGET_STATE(widget)], previewPixmap, event->area.x, event->area.y, event->area.x, event->area.y, event->area.width, event->area.height); return FALSE; } /* ******************************** * ** DRAWING AREA EVENTS ********* * ******************************** */ gint DrawingAreaButtonPressEvent(GtkWidget * widget, GdkEventButton * event) { /* got drawingPixmap? */ if (drawingPixmap == NULL) return TRUE; if (!mouseButtonPushed) { if ((event->button == 1 && activeTool != TOOL_BRUSH) || (activeTool == TOOL_BRUSH)) { /* position from we starting drawing */ toolStartX = event->x / (POINTSIZE + 1); if (toolStartX < 0) toolStartX = 0; if (toolStartX > bitmap.width - 1) toolStartX = bitmap.width - 1; toolStartY = event->y / (POINTSIZE + 1); if (toolStartY < 0) toolStartY = 0; if (toolStartY > bitmap.height - 1) toolStartY = bitmap.height - 1; toolLastX = toolStartX; toolLastY = toolStartY; /* store old bitmap for drawing, resp. for moving, resizing primitive */ memcpy(&oldBitmap, &bitmap, sizeof(oldBitmap)); } if (event->button == 1) mouseButtonPushed = 1; switch (activeTool) { case TOOL_BRUSH: ToolBrush(widget, toolStartX, toolStartY, event->button); break; case TOOL_LINE: case TOOL_RECTANGLE: if (event->button == 1) ToolBrush(widget, toolStartX, toolStartY, event->button); break; } } /* user is drawing some tool other than TOOL_BRUSH and pushed mouse button * another than first => cancel tool and redraw to oldBitmap (bitmap when * user start drawing) */ if (mouseButtonPushed && activeTool != TOOL_BRUSH && event->button != 1) { int lowestX, lowestY, highestX, highestY; int i, j; lowestX = GetMinFrom3(toolStartX, toolLastX, toolLastX); lowestY = GetMinFrom3(toolStartY, toolLastY, toolLastY); highestX = GetMaxFrom3(toolStartX, toolLastX, toolLastX); highestY = GetMaxFrom3(toolStartY, toolLastY, toolLastY); for (j = lowestY; j <= highestY; j++) for (i = lowestX; i <= highestX; i++) if (gn_bmp_point(&oldBitmap, i, j)) SetPoint(widget, i, j, 0); else ClearPoint(widget, i, j, 0); UpdateToolScreen(widget, lowestX, lowestY, highestX, highestY); mouseButtonPushed = 0; } return TRUE; } gint DrawingAreaButtonReleaseEvent(GtkWidget * widget, GdkEventButton * event) { if (event->button == 1) mouseButtonPushed = 0; return TRUE; } gint DrawingAreaMotionNotifyEvent(GtkWidget * widget, GdkEventMotion * event) { int x, y; GdkModifierType state; if (!mouseButtonPushed && activeTool != TOOL_BRUSH) return TRUE; if (event->is_hint) gdk_window_get_pointer(event->window, &x, &y, &state); else { x = event->x; y = event->y; state = event->state; } x = x / (POINTSIZE + 1); y = y / (POINTSIZE + 1); if (x < 0) x = 0; if (y < 0) y = 0; if (x > bitmap.width - 1) x = bitmap.width - 1; if (y > bitmap.height - 1) y = bitmap.height - 1; if (y == toolLastY && x == toolLastX) return TRUE; switch (activeTool) { case TOOL_BRUSH: if (state & GDK_BUTTON1_MASK && drawingPixmap != NULL) ToolBrush(widget, x, y, 1); if (state & GDK_BUTTON2_MASK && drawingPixmap != NULL) ToolBrush(widget, x, y, 2); if (state & GDK_BUTTON3_MASK && drawingPixmap != NULL) ToolBrush(widget, x, y, 3); break; case TOOL_RECTANGLE: if (drawingPixmap != NULL) ToolRectangleUpdate(widget, x, y); break; case TOOL_FILLED_RECTANGLE: if (drawingPixmap != NULL) ToolFilledRectangleUpdate(widget, x, y); break; case TOOL_LINE: if (drawingPixmap != NULL) ToolLineUpdate(widget, x, y); break; } /* what is this? * it's simple, above tools updates only bitmap in memory and this * function update from bitmap to screen, it's made as non-blinking * drawing functions with this, simply draw everything we need and * after that, redraw to screen rectangle in which we made changes * it's not redrawing pixel by pixel (blinking) */ if (activeTool != TOOL_BRUSH) { int lowestX, lowestY, highestX, highestY; lowestX = GetMinFrom3(toolStartX, toolLastX, x); lowestY = GetMinFrom3(toolStartY, toolLastY, y); highestX = GetMaxFrom3(toolStartX, toolLastX, x); highestY = GetMaxFrom3(toolStartY, toolLastY, y); UpdateToolScreen(widget, lowestX, lowestY, highestX, highestY); } toolLastX = x; toolLastY = y; return TRUE; } /* configureEvent? -> event when someone resize windows, ... */ gint DrawingAreaConfigureEvent(GtkWidget * widget, GdkEventConfigure * event) { int x, y; /* got drawingPixmap? */ if (drawingPixmap) gdk_pixmap_unref(drawingPixmap); /* got, erase it */ /* make a new pixmap */ drawingPixmap = gdk_pixmap_new(widget->window, drawingAreaWidth, drawingAreaHeight, -1); /* draw grid into pixmap */ for (y = 0; y < bitmap.height; y++) for (x = 0; x < bitmap.width; x++) if (IsPoint(x, y)) gdk_draw_pixmap(drawingPixmap, widget->style->fg_gc[GTK_WIDGET_STATE(widget)], blackPointPixmap, 0, 0, x * (POINTSIZE + 1), y * (POINTSIZE + 1), -1, -1); else gdk_draw_pixmap(drawingPixmap, widget->style->fg_gc[GTK_WIDGET_STATE(widget)], greenPointPixmap, 0, 0, x * (POINTSIZE + 1), y * (POINTSIZE + 1), -1, -1); return TRUE; } gint DrawingAreaExposeEvent(GtkWidget * widget, GdkEventExpose * event) { /* got drawingPixmap? */ if (drawingPixmap) /* got - draw it */ gdk_draw_pixmap(widget->window, widget->style->fg_gc[GTK_WIDGET_STATE(widget)], drawingPixmap, event->area.x, event->area.y, event->area.x, event->area.y, event->area.width, event->area.height); return FALSE; } /* ***************************************** * ** TOOLBAR & MENU EVENTS **************** * ***************************************** */ void GetNetworkInfoEvent(GtkWidget * widget) { gn_error error; gchar *netcou; PhoneEvent *e = (PhoneEvent *) g_malloc(sizeof(PhoneEvent)); D_NetworkInfo *data = (D_NetworkInfo *) g_malloc(sizeof(D_NetworkInfo)); /* prepare data for event */ data->info = &networkInfo; e->event = Event_GetNetworkInfo; e->data = data; /* launch event and wait for result */ GUI_InsertEvent(e); pthread_mutex_lock(&getNetworkInfoMutex); pthread_cond_wait(&getNetworkInfoCond, &getNetworkInfoMutex); pthread_mutex_unlock(&getNetworkInfoMutex); error = data->status; g_free(data); /* watch for errors */ if (error != GN_ERR_NONE) { gchar *buf = g_strdup_printf(_("Error getting network info\n%s"), gn_error_print(error)); gtk_label_set_text(GTK_LABEL(errorDialog.text), buf); gtk_widget_show(errorDialog.dialog); g_free(buf); /* after the error network_code is undefined but later code won't know */ networkInfo.network_code[0] = '\0'; } /* set new operator name to combo */ netcou = g_strdup_printf("%s (%s)", gn_network_name_get(networkInfo.network_code), gn_network2country(networkInfo.network_code)); gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(networkCombo)->entry), netcou); } void GetLogoEvent(GtkWidget * widget) { gn_error error; int i; PhoneEvent *e = (PhoneEvent *) g_malloc(sizeof(PhoneEvent)); D_Bitmap *data = (D_Bitmap *) g_malloc(sizeof(D_Bitmap)); gchar *netcou = (gchar *) gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(networkCombo)->entry)); gchar network[64], country[24]; /* prepare data for event */ sscanf(netcou, "%s (%[^)])", network, country); strncpy(bitmap.netcode, gn_network_code_find(network, country), sizeof(bitmap.netcode)); data->bitmap = &bitmap; e->event = Event_GetBitmap; e->data = data; if (phoneMonitor.supported & PM_CALLERGROUP) { for (i = 0; i < GN_PHONEBOOK_CALLER_GROUPS_MAX_NUMBER; i++) if (strcmp(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(callerCombo)->entry)), xgnokiiConfig.callerGroups[i]) == 0) bitmap.number = i; } /* launch event and wait for result */ GUI_InsertEvent(e); pthread_mutex_lock(&getBitmapMutex); pthread_cond_wait(&getBitmapCond, &getBitmapMutex); pthread_mutex_unlock(&getBitmapMutex); error = data->status; g_free(data); /* watch for errors */ if (error != GN_ERR_NONE) { gchar *buf = g_strdup_printf(_("Error getting bitmap\n%s"), gn_error_print(error)); gtk_label_set_text(GTK_LABEL(errorDialog.text), buf); gtk_widget_show(errorDialog.dialog); g_free(buf); } else { /* no error, draw logo from phone */ UpdatePoints(drawingArea); } } void SetLogoEvent(GtkWidget * widget) { gn_error error; PhoneEvent *e = (PhoneEvent *) g_malloc(sizeof(PhoneEvent)); D_Bitmap *data = (D_Bitmap *) g_malloc(sizeof(D_Bitmap)); gchar *netcou = (gchar *) gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(networkCombo)->entry)); gchar network[64], country[24]; int i; /* prepare data */ sscanf(netcou, "%s (%[^)])", network, country); strncpy(bitmap.netcode, gn_network_code_find(network, country), sizeof(bitmap.netcode)); if (bitmap.type == GN_BMP_CallerLogo) { /* above condition must be there, because if you launch logos before * callerGroups are available, you will see segfault - callerGroups not initialized */ if (phoneMonitor.supported & PM_CALLERGROUP) { for (i = 0; i < GN_PHONEBOOK_CALLER_GROUPS_MAX_NUMBER; i++) if (strcmp (gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(callerCombo)->entry)), xgnokiiConfig.callerGroups[i]) == 0) bitmap.number = i; } } data->bitmap = &bitmap; e->event = Event_SetBitmap; e->data = data; /* launch event and wait for result */ GUI_InsertEvent(e); pthread_mutex_lock(&setBitmapMutex); pthread_cond_wait(&setBitmapCond, &setBitmapMutex); pthread_mutex_unlock(&setBitmapMutex); error = data->status; g_free(data); /* watch for errors */ if (error != GN_ERR_NONE) { gchar *buf = g_strdup_printf(_("Error setting bitmap\n%s"), gn_error_print(error)); gtk_label_set_text(GTK_LABEL(errorDialog.text), buf); gtk_widget_show(errorDialog.dialog); g_free(buf); } } static void ClearLogoEvent(GtkWidget * widget) { /* bitmap.size=bitmap.width*bitmap.height/8; */ gn_bmp_clear(&bitmap); UpdatePoints(widget); } void InvertLogoEvent(GtkWidget * widget) { int column, row; for (column = 0; column < bitmap.width; column++) for (row = 0; row < bitmap.height; row++) if (IsPoint(column, row)) gn_bmp_point_clear(&bitmap, column, row); else gn_bmp_point_set(&bitmap, column, row); UpdatePoints(widget); } void UpLogoEvent(GtkWidget * widget) { int column, row; gn_bmp tbitmap; memcpy(&tbitmap, &bitmap, sizeof(gn_bmp)); for (row = 0; row < bitmap.height - 1; row++) for (column = 0; column < bitmap.width; column++) if (IsPoint(column, row + 1)) gn_bmp_point_set(&bitmap, column, row); else gn_bmp_point_clear(&bitmap, column, row); for (column = 0; column < bitmap.width; column++) if (gn_bmp_point(&tbitmap, column, 0)) gn_bmp_point_set(&bitmap, column, bitmap.height - 1); else gn_bmp_point_clear(&bitmap, column, bitmap.height - 1); UpdatePoints(widget); } void DownLogoEvent(GtkWidget * widget) { int column, row; gn_bmp tbitmap; memcpy(&tbitmap, &bitmap, sizeof(gn_bmp)); for (row = bitmap.height - 1; row > 0; row--) for (column = 0; column < bitmap.width; column++) if (IsPoint(column, row - 1)) gn_bmp_point_set(&bitmap, column, row); else gn_bmp_point_clear(&bitmap, column, row); for (column = 0; column < bitmap.width; column++) if (gn_bmp_point(&tbitmap, column, bitmap.height - 1)) gn_bmp_point_set(&bitmap, column, 0); else gn_bmp_point_clear(&bitmap, column, 0); UpdatePoints(widget); } void LeftLogoEvent(GtkWidget * widget) { int column, row; gn_bmp tbitmap; memcpy(&tbitmap, &bitmap, sizeof(gn_bmp)); for (column = 0; column < bitmap.width - 1; column++) for (row = 0; row < bitmap.height; row++) if (IsPoint(column + 1, row)) gn_bmp_point_set(&bitmap, column, row); else gn_bmp_point_clear(&bitmap, column, row); for (row = 0; row < bitmap.height; row++) if (gn_bmp_point(&tbitmap, 0, row)) gn_bmp_point_set(&bitmap, bitmap.width - 1, row); else gn_bmp_point_clear(&bitmap, bitmap.width - 1, row); UpdatePoints(widget); } void RightLogoEvent(GtkWidget * widget) { int column, row; gn_bmp tbitmap; memcpy(&tbitmap, &bitmap, sizeof(gn_bmp)); for (column = bitmap.width - 1; column > 0; column--) for (row = 0; row < bitmap.height; row++) if (IsPoint(column - 1, row)) gn_bmp_point_set(&bitmap, column, row); else gn_bmp_point_clear(&bitmap, column, row); for (row = 0; row < bitmap.height; row++) if (gn_bmp_point(&tbitmap, bitmap.width - 1, row)) gn_bmp_point_set(&bitmap, 0, row); else gn_bmp_point_clear(&bitmap, 0, row); UpdatePoints(widget); } void FlipVerticalLogoEvent(GtkWidget * widget) { int row, column, temp; for (row = 0; row < (bitmap.height / 2); row++) for (column = 0; column < bitmap.width; column++) { temp = IsPoint(column, row); if (IsPoint(column, bitmap.height - 1 - row)) gn_bmp_point_set(&bitmap, column, row); else gn_bmp_point_clear(&bitmap, column, row); if (temp) gn_bmp_point_set(&bitmap, column, bitmap.height - 1 - row); else gn_bmp_point_clear(&bitmap, column, bitmap.height - 1 - row); } UpdatePoints(widget); } void FlipHorizontalLogoEvent(GtkWidget * widget) { int row, column, temp; for (row = 0; row < bitmap.height; row++) for (column = 0; column < (bitmap.width / 2); column++) { temp = IsPoint(column, row); if (IsPoint(bitmap.width - 1 - column, row)) gn_bmp_point_set(&bitmap, column, row); else gn_bmp_point_clear(&bitmap, column, row); if (temp) gn_bmp_point_set(&bitmap, bitmap.width - 1 - column, row); else gn_bmp_point_clear(&bitmap, bitmap.width - 1 - column, row); } UpdatePoints(widget); } /* this is launched when tool was changed */ gint ToolTypeEvent(GtkWidget * widget) { if (GTK_TOGGLE_BUTTON(buttonBrush)->active) activeTool = TOOL_BRUSH; else if (GTK_TOGGLE_BUTTON(buttonLine)->active) activeTool = TOOL_LINE; else if (GTK_TOGGLE_BUTTON(buttonRectangle)->active) activeTool = TOOL_RECTANGLE; else if (GTK_TOGGLE_BUTTON(buttonFilledRectangle)->active) activeTool = TOOL_FILLED_RECTANGLE; return 0; } /* this is launched when logo type was changed by buttons on toolbar */ gint LogoTypeEvent(GtkWidget * widget) { int clear = 0; gn_log_xdebug("LogoTypeEvent called!\n"); gn_log_xdebug("width: %i, height: %i\n", statemachine->driver.phone.startup_logo_width, statemachine->driver.phone.startup_logo_height); /* is startupLogo? */ /* Resize and clear anyway - CK */ if (GTK_TOGGLE_BUTTON(buttonStartup)->active) { /* look for old bitmap type, clean if another */ clear = 1; gn_bmp_resize(&bitmap, GN_BMP_StartupLogo, &statemachine->driver.phone); } /* has phone support for callerGroups? */ if (phoneMonitor.supported & PM_CALLERGROUP) { if (GTK_TOGGLE_BUTTON(buttonCaller)->active && bitmap.type != GN_BMP_CallerLogo) { /* previous was startup? clear and draw batteries, signal, ... */ /* Clear anyway for 7110...CK */ clear = 1; gn_bmp_resize(&bitmap, GN_BMP_CallerLogo, &statemachine->driver.phone); } } /* is new type operatorLogo? */ if ((GTK_TOGGLE_BUTTON(buttonOperator)->active && bitmap.type != GN_BMP_OperatorLogo) || (GTK_TOGGLE_BUTTON(buttonOperator)->active && bitmap.type != GN_BMP_NewOperatorLogo)) { /* previous startup? clear and draw batteries, signal, ... */ /* Clear anyway for 7110..CK */ clear = 1; if (!strncmp(statemachine->driver.phone.models, "6510", 4)) gn_bmp_resize(&bitmap, GN_BMP_NewOperatorLogo, &statemachine->driver.phone); else gn_bmp_resize(&bitmap, GN_BMP_OperatorLogo, &statemachine->driver.phone); } /* must clear? */ if (clear) { if (previewAvailable) { /* configure event reload pixmap from disk and redraws */ gtk_drawing_area_size(GTK_DRAWING_AREA(previewArea), previewPixmapWidth, previewPixmapHeight); } /* change new drawingArea size */ drawingAreaWidth = bitmap.width * (POINTSIZE + 1) + 1; drawingAreaHeight = bitmap.height * (POINTSIZE + 1) + 1; gtk_drawing_area_size(GTK_DRAWING_AREA(drawingArea), drawingAreaWidth, drawingAreaHeight); } return 0; } inline void CloseLogosWindow(void) { gtk_widget_hide(GUI_LogosWindow); } void ExportLogoFileMain(gchar * name) { gn_bmp tbitmap; gn_error error; tbitmap = bitmap; strncpy(tbitmap.netcode, gn_network_code_get(networkInfo.network_code), sizeof(tbitmap.netcode)); error = gn_file_bitmap_save(name, &tbitmap, &statemachine->driver.phone); if (error != GN_ERR_NONE) { gchar *buf = g_strdup_printf(_("Error writing file\n%s"), gn_error_print(error)); gtk_label_set_text(GTK_LABEL(errorDialog.text), buf); gtk_widget_show(errorDialog.dialog); g_free(buf); } } static void YesLogoFileExportDialog(GtkWidget * w, gpointer data) { gtk_widget_hide(GTK_WIDGET(data)); ExportLogoFileMain(exportDialogData.fileName); } static void ExportFileSelected(GtkWidget * w, GtkFileSelection * fs) { static YesNoDialog dialog = { NULL, NULL }; FILE *f; gchar err[255]; exportDialogData.fileName = (gchar *) gtk_file_selection_get_filename(GTK_FILE_SELECTION(fs)); gtk_widget_hide(GTK_WIDGET(fs)); if ((f = fopen(exportDialogData.fileName, "r")) != NULL) { fclose(f); if (dialog.dialog == NULL) { CreateYesNoDialog(&dialog, (GtkSignalFunc) YesLogoFileExportDialog, (GtkSignalFunc) CancelDialog, GUI_LogosWindow); gtk_window_set_title(GTK_WINDOW(dialog.dialog), _("Overwrite file?")); g_snprintf(err, 255, _("File %s already exists.\nOverwrite?"), exportDialogData.fileName); gtk_label_set_text(GTK_LABEL(dialog.text), err); } gtk_widget_show(dialog.dialog); } else ExportLogoFileMain(exportDialogData.fileName); } void ImportFileSelected(GtkWidget * w, GtkFileSelection * fs) { gn_bmp tbitmap; gn_error error = 0; gchar *fileName; FILE *f; fileName = (gchar *) gtk_file_selection_get_filename(GTK_FILE_SELECTION(fs)); gtk_widget_hide(GTK_WIDGET(fs)); if ((f = fopen(fileName, "r")) == NULL) { gchar *buf = g_strdup_printf(_("Can't open file %s for reading!\n"), fileName); gtk_label_set_text(GTK_LABEL(errorDialog.text), buf); gtk_widget_show(errorDialog.dialog); g_free(buf); return; } else fclose(f); error = gn_file_bitmap_read(fileName, &tbitmap, &statemachine->driver.phone); if (error != GN_ERR_NONE) { gchar *buf = g_strdup_printf(_("Error reading file\n%s"), gn_error_print(error)); gtk_label_set_text(GTK_LABEL(errorDialog.text), buf); gtk_widget_show(errorDialog.dialog); g_free(buf); return; } exportDialogData.fileName = fileName; gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(buttonStartup), false); gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(buttonOperator), false); gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(buttonCaller), false); if (tbitmap.type == GN_BMP_NewOperatorLogo || tbitmap.type == GN_BMP_OperatorLogo) gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(buttonOperator), true); if (tbitmap.type == GN_BMP_StartupLogo) gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(buttonStartup), true); if (tbitmap.type == GN_BMP_CallerLogo) gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(buttonCaller), true); memcpy(&bitmap, &tbitmap, sizeof(gn_bmp)); UpdatePoints(drawingArea); } void SaveLogoAs(GtkWidget * widget) { FileSelection = gtk_file_selection_new(_("Save logo as ...")); gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(FileSelection)->ok_button), "clicked", (GtkSignalFunc) ExportFileSelected, FileSelection); gtk_signal_connect_object(GTK_OBJECT(GTK_FILE_SELECTION(FileSelection)->cancel_button), "clicked", (GtkSignalFunc) gtk_widget_destroy, GTK_OBJECT(FileSelection)); gtk_file_selection_hide_fileop_buttons(GTK_FILE_SELECTION(FileSelection)); gtk_widget_show(FileSelection); } void SaveLogo(GtkWidget * widget) { if (exportDialogData.fileName == NULL) { SaveLogoAs(widget); } else { ExportLogoFileMain(exportDialogData.fileName); } } void OpenLogo(GtkWidget * widget) { FileSelection = gtk_file_selection_new(_("Open logo...")); gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(FileSelection)->ok_button), "clicked", (GtkSignalFunc) ImportFileSelected, FileSelection); gtk_signal_connect_object(GTK_OBJECT(GTK_FILE_SELECTION(FileSelection)->cancel_button), "clicked", (GtkSignalFunc) gtk_widget_destroy, GTK_OBJECT(FileSelection)); gtk_file_selection_hide_fileop_buttons(GTK_FILE_SELECTION(FileSelection)); gtk_widget_show(FileSelection); } static GtkItemFactoryEntry logosMenuItems[] = { {NULL, NULL, NULL, 0, ""}, {NULL, "O", OpenLogo, 0, NULL}, {NULL, "S", SaveLogo, 0, NULL}, {NULL, NULL, SaveLogoAs, 0, NULL}, {NULL, NULL, NULL, 0, ""}, {NULL, "G", GetNetworkInfoEvent, 0, NULL}, {NULL, NULL, GetLogoEvent, 0, NULL}, {NULL, "T", SetLogoEvent, 0, NULL}, {NULL, NULL, NULL, 0, ""}, {NULL, "W", CloseLogosWindow, 0, NULL}, {NULL, NULL, NULL, 0, ""}, {NULL, "C", ClearLogoEvent, 0, NULL}, {NULL, "I", InvertLogoEvent, 0, NULL}, {NULL, NULL, NULL, 0, ""}, {NULL, "U", UpLogoEvent, 0, NULL}, {NULL, "D", DownLogoEvent, 0, NULL}, {NULL, "L", LeftLogoEvent, 0, NULL}, {NULL, "R", RightLogoEvent, 0, NULL}, {NULL, NULL, NULL, 0, ""}, {NULL, "H", FlipHorizontalLogoEvent, 0, NULL}, {NULL, "V", FlipVerticalLogoEvent, 0, NULL}, }; void InitLogosMenu(void) { logosMenuItems[0].path = _("/_File"); logosMenuItems[1].path = _("/File/_Open"); logosMenuItems[2].path = _("/File/_Save"); logosMenuItems[3].path = _("/File/Save _as ..."); logosMenuItems[4].path = _("/File/Sep1"); logosMenuItems[5].path = _("/File/_Get operator"); logosMenuItems[6].path = _("/File/Get _logo"); logosMenuItems[7].path = _("/File/Se_t logo"); logosMenuItems[8].path = _("/File/Sep2"); logosMenuItems[9].path = _("/File/_Close"); logosMenuItems[10].path = _("/_Edit"); logosMenuItems[11].path = _("/Edit/_Clear"); logosMenuItems[12].path = _("/Edit/_Invert"); logosMenuItems[13].path = _("/Edit/Sep3"); logosMenuItems[14].path = _("/Edit/_Up logo"); logosMenuItems[15].path = _("/Edit/_Down logo"); logosMenuItems[16].path = _("/Edit/_Left logo"); logosMenuItems[17].path = _("/Edit/_Right logo"); logosMenuItems[18].path = _("/Edit/Sep4"); logosMenuItems[19].path = _("/Edit/Flip _horizontal"); logosMenuItems[20].path = _("/Edit/Flip _vertical"); } void GUI_CreateLogosWindow(void) { int nMenuItems = sizeof(logosMenuItems) / sizeof(logosMenuItems[0]); GtkAccelGroup *accelGroup; GtkItemFactory *itemFactory; GtkWidget *menuBar; GtkWidget *toolBar, *vertToolBar; GtkWidget *vbox; GtkWidget *hbox; GtkWidget *drawingBox; GtkWidget *separator; GdkBitmap *mask; GList *glistNetwork = NULL; int i = 0; gn_network network; previewPixmapWidth = PREVIEWWIDTH; previewPixmapHeight = PREVIEWHEIGHT; InitLogosMenu(); /* realize top level window for logos */ GUI_LogosWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_wmclass(GTK_WINDOW(GUI_LogosWindow), "LogosWindow", "Xgnokii"); gtk_window_set_policy(GTK_WINDOW(GUI_LogosWindow), 1, 1, 1); gtk_window_set_title(GTK_WINDOW(GUI_LogosWindow), _("Logos")); gtk_signal_connect(GTK_OBJECT(GUI_LogosWindow), "delete_event", GTK_SIGNAL_FUNC(DeleteEvent), NULL); gtk_widget_realize(GUI_LogosWindow); CreateErrorDialog(&errorDialog, GUI_LogosWindow); CreateInfoDialog(&infoDialog, GUI_LogosWindow); accelGroup = gtk_accel_group_new(); gtk_window_add_accel_group(GTK_WINDOW(GUI_LogosWindow), accelGroup); /* create main vbox */ vbox = gtk_vbox_new(FALSE, 1); gtk_container_add(GTK_CONTAINER(GUI_LogosWindow), vbox); gtk_widget_show(vbox); itemFactory = gtk_item_factory_new(GTK_TYPE_MENU_BAR, "
", accelGroup); gtk_item_factory_create_items(itemFactory, nMenuItems, logosMenuItems, NULL); menuBar = gtk_item_factory_get_widget(itemFactory, "
"); gtk_box_pack_start(GTK_BOX(vbox), menuBar, FALSE, FALSE, 0); gtk_widget_show(menuBar); /* toolbar */ toolBar = gtk_toolbar_new(); gtk_toolbar_set_style(GTK_TOOLBAR(toolBar), GTK_TOOLBAR_ICONS); gtk_toolbar_set_orientation(GTK_TOOLBAR(toolBar), GTK_ORIENTATION_HORIZONTAL); gtk_toolbar_append_item(GTK_TOOLBAR(toolBar), NULL, _("Clear logo"), NULL, NewPixmap(New_xpm, GUI_LogosWindow->window, &GUI_LogosWindow->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc) ClearLogoEvent, toolBar); gtk_toolbar_append_space(GTK_TOOLBAR(toolBar)); gtk_toolbar_append_item(GTK_TOOLBAR(toolBar), NULL, _("Get logo"), NULL, NewPixmap(Read_xpm, GUI_LogosWindow->window, &GUI_LogosWindow->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc) GetLogoEvent, toolBar); gtk_toolbar_append_item(GTK_TOOLBAR(toolBar), NULL, _("Set logo"), NULL, NewPixmap(Send_xpm, GUI_LogosWindow->window, &GUI_LogosWindow->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc) SetLogoEvent, toolBar); gtk_toolbar_append_space(GTK_TOOLBAR(toolBar)); gtk_toolbar_append_item(GTK_TOOLBAR(toolBar), NULL, _("Import from file"), NULL, NewPixmap(Open_xpm, GUI_LogosWindow->window, &GUI_LogosWindow->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc) OpenLogo, NULL); gtk_toolbar_append_item(GTK_TOOLBAR(toolBar), NULL, _("Export to file"), NULL, NewPixmap(Save_xpm, GUI_LogosWindow->window, &GUI_LogosWindow->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc) SaveLogo, NULL); gtk_toolbar_append_space(GTK_TOOLBAR(toolBar)); buttonStartup = gtk_toolbar_append_element(GTK_TOOLBAR(toolBar), GTK_TOOLBAR_CHILD_RADIOBUTTON, NULL, NULL, _("Startup logo"), "", NewPixmap(Startup_logo_xpm, GUI_LogosWindow->window, &GUI_LogosWindow->style-> bg[GTK_STATE_NORMAL]), GTK_SIGNAL_FUNC(LogoTypeEvent), NULL); buttonOperator = gtk_toolbar_append_element(GTK_TOOLBAR(toolBar), GTK_TOOLBAR_CHILD_RADIOBUTTON, buttonStartup, NULL, _("Operator logo"), "", NewPixmap(Operator_logo_xpm, GUI_LogosWindow->window, &GUI_LogosWindow->style-> bg[GTK_STATE_NORMAL]), GTK_SIGNAL_FUNC(LogoTypeEvent), NULL); buttonCaller = gtk_toolbar_append_element(GTK_TOOLBAR(toolBar), GTK_TOOLBAR_CHILD_RADIOBUTTON, buttonOperator, NULL, _("Caller logo"), "", NewPixmap(Caller_logo_xpm, GUI_LogosWindow->window, &GUI_LogosWindow->style-> bg[GTK_STATE_NORMAL]), GTK_SIGNAL_FUNC(LogoTypeEvent), NULL); gtk_toolbar_append_space(GTK_TOOLBAR(toolBar)); networkCombo = gtk_combo_new(); gtk_combo_set_use_arrows_always(GTK_COMBO(networkCombo), 1); while (gn_network_get(&network, i++)) { gchar *netcou; netcou = g_strdup_printf("%s (%s)", network.name, gn_network2country(network.code)); glistNetwork = g_list_insert_sorted(glistNetwork, netcou, (GCompareFunc) strcmp); } gtk_combo_set_popdown_strings(GTK_COMBO(networkCombo), glistNetwork); gtk_entry_set_editable(GTK_ENTRY(GTK_COMBO(networkCombo)->entry), FALSE); gtk_toolbar_append_widget(GTK_TOOLBAR(toolBar), networkCombo, "", ""); gtk_widget_show(networkCombo); g_list_foreach(glistNetwork, (GFunc) g_free, NULL); g_list_free(glistNetwork); callerCombo = gtk_combo_new(); gtk_entry_set_editable(GTK_ENTRY(GTK_COMBO(callerCombo)->entry), FALSE); gtk_toolbar_append_widget(GTK_TOOLBAR(toolBar), callerCombo, "", ""); gtk_widget_show(callerCombo); gtk_box_pack_start(GTK_BOX(vbox), toolBar, FALSE, FALSE, 0); gtk_widget_show(toolBar); /* vertical separator */ separator = gtk_hseparator_new(); gtk_box_pack_start(GTK_BOX(vbox), GTK_WIDGET(separator), FALSE, FALSE, 0); /* create horizontal box for preview and drawing areas */ hbox = gtk_hbox_new(FALSE, 5); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); gtk_widget_show(hbox); /* set gn_bmp width,height needed for creating drawinArea * we are starting, default is startupLogo */ bitmap.type = GN_BMP_StartupLogo; bitmap.height = 48; bitmap.width = 84; bitmap.size = bitmap.height * bitmap.width / 8; drawingAreaWidth = bitmap.width * (POINTSIZE + 1) + 1; drawingAreaHeight = bitmap.height * (POINTSIZE + 1) + 1; /* previewArea */ previewPixmap = GetPreviewPixmap(GUI_LogosWindow); if (previewPixmap != NULL) { previewArea = gtk_drawing_area_new(); gtk_drawing_area_size(GTK_DRAWING_AREA(previewArea), previewPixmapWidth, previewPixmapHeight); greenPixelPixmap = gdk_pixmap_create_from_xpm_d(GUI_LogosWindow->window, &mask, &GUI_LogosWindow->style-> bg[GTK_STATE_NORMAL], Green_pixel_xpm); gtk_signal_connect(GTK_OBJECT(previewArea), "expose_event", (GtkSignalFunc) PreviewAreaExposeEvent, NULL); gtk_signal_connect(GTK_OBJECT(previewArea), "configure_event", (GtkSignalFunc) PreviewAreaConfigureEvent, NULL); gtk_signal_connect(GTK_OBJECT(previewArea), "button_press_event", (GtkSignalFunc) PreviewAreaButtonPressEvent, NULL); gtk_widget_set_events(previewArea, GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK); gtk_box_pack_start(GTK_BOX(hbox), previewArea, FALSE, FALSE, 0); gtk_widget_show(previewArea); /* clear battery, signal, menu & names from preview phone */ UpdatePreviewPoints(); } else previewAvailable = 0; /* drawingArea */ greenPointPixmap = gdk_pixmap_create_from_xpm_d(GUI_LogosWindow->window, &mask, &GUI_LogosWindow->style-> bg[GTK_STATE_NORMAL], Green_point_xpm); blackPointPixmap = gdk_pixmap_create_from_xpm_d(GUI_LogosWindow->window, &mask, &GUI_LogosWindow->style->bg[GTK_STATE_NORMAL], Black_point_xpm); drawingBox = gtk_vbox_new(FALSE, 3); gtk_box_pack_start(GTK_BOX(hbox), drawingBox, FALSE, FALSE, 0); gtk_widget_show(drawingBox); drawingArea = gtk_drawing_area_new(); gtk_drawing_area_size(GTK_DRAWING_AREA(drawingArea), drawingAreaWidth, drawingAreaHeight); gtk_signal_connect(GTK_OBJECT(drawingArea), "configure_event", (GtkSignalFunc) DrawingAreaConfigureEvent, NULL); gtk_signal_connect(GTK_OBJECT(drawingArea), "expose_event", (GtkSignalFunc) DrawingAreaExposeEvent, NULL); gtk_signal_connect(GTK_OBJECT(drawingArea), "button_press_event", (GtkSignalFunc) DrawingAreaButtonPressEvent, NULL); gtk_signal_connect(GTK_OBJECT(drawingArea), "button_release_event", (GtkSignalFunc) DrawingAreaButtonReleaseEvent, NULL); gtk_signal_connect(GTK_OBJECT(drawingArea), "motion_notify_event", (GtkSignalFunc) DrawingAreaMotionNotifyEvent, NULL); gtk_widget_set_events(drawingArea, GDK_EXPOSURE_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK); gtk_box_pack_start(GTK_BOX(drawingBox), drawingArea, FALSE, FALSE, 0); gtk_widget_show(drawingArea); /* vertical tool bar */ vertToolBar = gtk_toolbar_new(); gtk_toolbar_set_style(GTK_TOOLBAR(vertToolBar), GTK_TOOLBAR_ICONS); gtk_toolbar_set_orientation(GTK_TOOLBAR(vertToolBar), GTK_ORIENTATION_VERTICAL); buttonBrush = gtk_toolbar_append_element(GTK_TOOLBAR(vertToolBar), GTK_TOOLBAR_CHILD_RADIOBUTTON, NULL, NULL, _("Brush tool"), "", NewPixmap(Tool_brush_xpm, GUI_LogosWindow-> window, &GUI_LogosWindow-> style-> bg [GTK_STATE_NORMAL]), GTK_SIGNAL_FUNC(ToolTypeEvent), NULL); buttonLine = gtk_toolbar_append_element(GTK_TOOLBAR(vertToolBar), GTK_TOOLBAR_CHILD_RADIOBUTTON, buttonBrush, NULL, _("Line tool"), "", NewPixmap(Tool_line_xpm, GUI_LogosWindow-> window, &GUI_LogosWindow-> style-> bg[GTK_STATE_NORMAL]), GTK_SIGNAL_FUNC(ToolTypeEvent), NULL); buttonRectangle = gtk_toolbar_append_element(GTK_TOOLBAR(vertToolBar), GTK_TOOLBAR_CHILD_RADIOBUTTON, buttonLine, NULL, _("Rectangle tool"), "", NewPixmap(Tool_rectangle_xpm, GUI_LogosWindow->window, &GUI_LogosWindow->style-> bg[GTK_STATE_NORMAL]), GTK_SIGNAL_FUNC(ToolTypeEvent), NULL); buttonFilledRectangle = gtk_toolbar_append_element(GTK_TOOLBAR(vertToolBar), GTK_TOOLBAR_CHILD_RADIOBUTTON, buttonRectangle, NULL, _("Filled rectangle tool"), "", NewPixmap(Tool_filled_rectangle_xpm, GUI_LogosWindow->window, &GUI_LogosWindow->style-> bg[GTK_STATE_NORMAL]), GTK_SIGNAL_FUNC(ToolTypeEvent), NULL); gtk_toolbar_append_space(GTK_TOOLBAR(vertToolBar)); gtk_toolbar_append_item(GTK_TOOLBAR(vertToolBar), NULL, _("Invert logo"), NULL, NewPixmap(Edit_invert_xpm, GUI_LogosWindow->window, &GUI_LogosWindow->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc) InvertLogoEvent, vertToolBar); gtk_toolbar_append_item(GTK_TOOLBAR(vertToolBar), NULL, _("Horizontal flip"), NULL, NewPixmap(Edit_flip_horizontal_xpm, GUI_LogosWindow->window, &GUI_LogosWindow->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc) FlipHorizontalLogoEvent, vertToolBar); gtk_toolbar_append_item(GTK_TOOLBAR(vertToolBar), NULL, _("Vertical flip"), NULL, NewPixmap(Edit_flip_vertical_xpm, GUI_LogosWindow->window, &GUI_LogosWindow->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc) FlipVerticalLogoEvent, vertToolBar); gtk_box_pack_start(GTK_BOX(hbox), vertToolBar, FALSE, FALSE, 0); gtk_widget_show(vertToolBar); GUIEventAdd(GUI_EVENT_CALLERS_GROUPS_CHANGED, &GUI_RefreshLogosGroupsCombo); } void GUI_RefreshLogosGroupsCombo(void) { GList *callerList = NULL; int i; /* All groups + no group */ for (i = 0; i < GN_PHONEBOOK_CALLER_GROUPS_MAX_NUMBER + 1; i++) callerList = g_list_insert(callerList, xgnokiiConfig.callerGroups[i], i); gtk_combo_set_popdown_strings(GTK_COMBO(callerCombo), callerList); g_list_free(callerList); if (!callersGroupsInitialized) callersGroupsInitialized = 1; } void GUI_ShowLogosWindow(void) { /* Set network name taken from the phone */ GetNetworkInfoEvent(NULL); /* if phone support caller groups, read callerGroups names */ if (phoneMonitor.supported & PM_CALLERGROUP) { if (xgnokiiConfig.callerGroups[0] == NULL) { GUI_Refresh(); GUI_InitCallerGroupsInf(); GUI_RefreshLogosGroupsCombo(); } if (!callersGroupsInitialized) GUI_RefreshLogosGroupsCombo(); gtk_widget_show(buttonCaller); gtk_widget_show(callerCombo); } else { /* if not supported, hide widget for handling callerGroups */ gtk_widget_hide(buttonCaller); gtk_widget_hide(callerCombo); } /* Call to reset Startup logo size */ LogoTypeEvent(GUI_LogosWindow); gn_log_xdebug("width: %i, height: %i\n", bitmap.width, bitmap.height); gtk_window_present(GTK_WINDOW(GUI_LogosWindow)); if (!previewAvailable && showPreviewErrorDialog) { gchar *buf = g_strdup(_("Load preview pixmap error, feature disabled.")); gtk_label_set_text(GTK_LABEL(errorDialog.text), buf); gtk_widget_show(errorDialog.dialog); g_free(buf); showPreviewErrorDialog = 0; } } gnokii-0.6.31/xgnokii/xgnokii_calendar.h0000644000175000017500000000175611666163120016336 0ustar leoleo/* $Id$ X G N O K I I A Linux/Unix GUI for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999 Pavel Janík ml., Hugh Blemings & 1999-2005 Jan Derfinak. */ #ifndef XGNOKII_CALENDAR_H #define XGNOKII_CALENDAR_H extern void GUI_CreateCalendarWindow(); extern void GUI_ShowCalendar(); #endif gnokii-0.6.31/xgnokii/xgnokii_sms.c0000644000175000017500000015233711666163120015364 0ustar leoleo/* $Id$ X G N O K I I A Linux/Unix GUI for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999 Pavel Janik ml., Hugh Blemings Copyright (C) 1999-2005 Jan Derfinak Copyright (C) 2001-2003 Pawel Kot Copyright (C) 2002-2003 BORBELY Zoltan Copyright (C) 2002 Markus Plail Copyright (C) 2003 Uli Hopp */ #include "config.h" #ifndef WIN32 # include #endif #include #include #include #include #include #include #include #include #include #include "misc.h" #include "gnokii.h" #include "xgnokii_common.h" #include "xgnokii.h" #include "xgnokii_lowlevel.h" #include "xgnokii_contacts.h" #include "xgnokii_sms.h" #include "xpm/Edit.xpm" #include "xpm/Delete.xpm" #include "xpm/Forward.xpm" #include "xpm/Reply.xpm" #include "xpm/Send.xpm" #include "xpm/SendSMS.xpm" #include "xpm/Check.xpm" #include "xpm/Names.xpm" #include "xpm/BCard.xpm" #include "xpm/quest.xpm" typedef struct { gint count; /* Messages count */ gint number; /* Number of tail in Long SMS */ gint *msgPtr; /* Array of MessageNumber */ gint validity; gint class; gint memory; gchar sender[GN_BCD_STRING_MAX_LENGTH + 1]; } MessagePointers; typedef struct { gchar *number; gchar *name; gint used:1; } AddressPar; typedef struct { GtkWidget *smsClist; GtkWidget *smsText; GSList *messages; GdkColor colour; gint row_i; gint currentBox; } SMSWidget; typedef struct { GtkWidget *SMSSendWindow; GtkWidget *smsSendText; GtkWidget *addr; GtkWidget *status; GtkWidget *report; GtkWidget *longSMS; GtkWidget *smscOptionMenu; GtkTooltips *addrTip; gint center; GSList *addressLine; } SendSMSWidget; static gchar *mailbox_name=NULL; static GtkWidget *GUI_SMSWindow; static GtkWidget* create_SaveSMStoMailbox (void); static SMSWidget SMS = { NULL, NULL, NULL }; static SendSMSWidget sendSMS = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL }; static ErrorDialog errorDialog = { NULL, NULL }; static InfoDialog infoDialog = { NULL, NULL }; static QuestMark questMark; static GtkWidget *treeFolderItem[GN_SMS_FOLDER_MAX_NUMBER], *subTree; static inline void CloseSMS(GtkWidget * w, gpointer data) { gtk_widget_hide(GUI_SMSWindow); } static inline void CloseSMSSend(GtkWidget * w, gpointer data) { gtk_widget_hide(sendSMS.SMSSendWindow); } static gint CListCompareFunc(GtkCList * clist, gconstpointer ptr1, gconstpointer ptr2) { gchar *text1 = NULL; gchar *text2 = NULL; GtkCListRow *row1 = (GtkCListRow *) ptr1; GtkCListRow *row2 = (GtkCListRow *) ptr2; switch (row1->cell[clist->sort_column].type) { case GTK_CELL_TEXT: text1 = GTK_CELL_TEXT(row1->cell[clist->sort_column])->text; break; case GTK_CELL_PIXTEXT: text1 = GTK_CELL_PIXTEXT(row1->cell[clist->sort_column])->text; break; default: break; } switch (row2->cell[clist->sort_column].type) { case GTK_CELL_TEXT: text2 = GTK_CELL_TEXT(row2->cell[clist->sort_column])->text; break; case GTK_CELL_PIXTEXT: text2 = GTK_CELL_PIXTEXT(row2->cell[clist->sort_column])->text; break; default: break; } if (!text2) return (text1 != NULL); if (!text1) return -1; if (clist->sort_column == 1 && !SMS.currentBox) { struct tm bdTime; time_t time1, time2; bdTime.tm_sec = atoi(text1 + 17); bdTime.tm_min = atoi(text1 + 14); bdTime.tm_hour = atoi(text1 + 11); bdTime.tm_mday = atoi(text1); bdTime.tm_mon = atoi(text1 + 3) - 1; bdTime.tm_year = atoi(text1 + 6) - 1900; #ifdef HAVE_TM_GMTON if (text1[19] != '\0') bdTime.tm_gmtoff = atoi(text1 + 20) * 3600; #endif bdTime.tm_isdst = -1; time1 = mktime(&bdTime); bdTime.tm_sec = atoi(text2 + 17); bdTime.tm_min = atoi(text2 + 14); bdTime.tm_hour = atoi(text2 + 11); bdTime.tm_mday = atoi(text2); bdTime.tm_mon = atoi(text2 + 3) - 1; bdTime.tm_year = atoi(text2 + 6) - 1900; #ifdef HAVE_TM_GMTON if (text2[19] != '\0') bdTime.tm_gmtoff = atoi(text2 + 20) * 3600; #endif bdTime.tm_isdst = -1; time2 = mktime(&bdTime); if (time1 < time2) return (1); else if (time1 > time2) return (-1); else return 0; } return (g_strcasecmp(text1, text2)); } static inline void DestroyMsgPtrs(gpointer data) { g_free(((MessagePointers *) data)->msgPtr); g_free((MessagePointers *) data); } static int IsValidSMSforFolder(gpointer d, gpointer userData) { gn_sms *data = (gn_sms *) d; int folder_idx; if (phoneMonitor.supported & PM_FOLDERS) { folder_idx = data->memory_type - 12; if (folder_idx == SMS.currentBox) return 1; } else { if ((data->type == GN_SMS_MT_Deliver && !SMS.currentBox) || (data->type == GN_SMS_MT_StatusReport && !SMS.currentBox) || (data->type == GN_SMS_MT_Submit && SMS.currentBox)) return 1; } return 0; } /* This function works only if phoneMonitor.sms.messages.number ( = data->number) is the number of the SMS in the current folder ( = row + 1, row = 0 is the first row in the SMS list ) */ static void MarkSMSasRead(gpointer d, gpointer userData) { gn_sms *data = (gn_sms *) d; gint row = *(gint *) userData; #ifdef XDEBUG gchar *dprint_status1; #endif gint valid; row = row + 1 ; if ((valid = IsValidSMSforFolder(d, userData))) { #ifdef XDEBUG switch (data->status) { case GN_SMS_Read: dprint_status1 = g_strdup(_("read")); break; case GN_SMS_Unread: dprint_status1 = g_strdup(_("unread")); break; case GN_SMS_Sent: dprint_status1 = g_strdup(_("sent")); break; case GN_SMS_Unsent: dprint_status1 = g_strdup(_("not sent")); break; default: dprint_status1 = g_strdup(_("unknown")); break; } gn_log_xdebug("In MarkSMSasRead : data->status : %s \n", dprint_status1); gn_log_xdebug("In MarkSMSasRead : data->number : %i row : %i\n", data->number, row); #endif if (data->number == row) data->status = GN_SMS_Read; }; } static void InsertFolderElement(gpointer d, gpointer userData) { gn_sms *data = (gn_sms *) d; MessagePointers *msgPtrs; gn_timestamp *dt = NULL; gint valid; dt = &data->smsc_time; if ((valid = IsValidSMSforFolder(d, userData))) { /* if (data->type == GST_MT && data->UDHtype == GSM_ConcatenatedMessages) { msgPtrs = (MessagePointers *) g_malloc (sizeof (MessagePointers)); msgPtrs->count = data->UDH[4]; msgPtrs->number = data->UDH[5]; msgPtrs->validity = data->Validity; msgPtrs->class = data->Class; strcpy (msgPtrs->sender, data->Sender); msgPtrs->msgPtr = (gint *) g_malloc (msgPtrs->count * sizeof (gint)); *(msgPtrs->msgPtr + msgPtrs->number - 1) = data->MessageNumber; } else { */ gchar *row[4]; switch (data->type) { case GN_SMS_MT_StatusReport: switch (data->status) { case GN_SMS_Read: row[0] = g_strdup(_("read report")); break; default: row[0] = g_strdup(_("unread report")); break; } case GN_SMS_MT_Picture: case GN_SMS_MT_PictureTemplate: switch (data->status) { case GN_SMS_Read: row[0] = g_strdup(_("seen picture")); break; case GN_SMS_Unread: row[0] = g_strdup(_("unseen picture")); break; case GN_SMS_Sent: row[0] = g_strdup(_("sent picture")); break; case GN_SMS_Unsent: row[0] = g_strdup(_("not sent picture")); break; default: row[0] = g_strdup(_("unknown picture")); break; } default: switch (data->status) { case GN_SMS_Read: row[0] = g_strdup(_("read")); break; case GN_SMS_Unread: row[0] = g_strdup(_("unread")); break; case GN_SMS_Sent: row[0] = g_strdup(_("sent")); break; case GN_SMS_Unsent: row[0] = g_strdup(_("not sent")); break; default: row[0] = g_strdup(_("unknown")); break; } } if (dt) { if (dt->timezone) row[1] = g_strdup_printf(_("%02d/%02d/%04d %02d:%02d:%02d %c%02d00"), dt->day, dt->month, dt->year, dt->hour, dt->minute, dt->second, dt->timezone > 0 ? '+' : '-', abs(dt->timezone)); else row[1] = g_strdup_printf(_("%02d/%02d/%04d %02d:%02d:%02d"), dt->day, dt->month, dt->year, dt->hour, dt->minute, dt->second); } else { row[1] = g_strdup_printf(_("%02d/%02d/%04d %02d:%02d:%02d"), 01, 01, 0001, 01, 01, 01); } row[2] = GUI_GetName(data->remote.number); if (row[2] == NULL) row[2] = data->remote.number; if ((data->type == GN_SMS_MT_Picture) || (data->type == GN_SMS_MT_PictureTemplate)) row[3] = g_strdup_printf(_("Picture Message: %s"), data->user_data[1].u.text); else row[3] = data->user_data[0].u.text; gtk_clist_append(GTK_CLIST(SMS.smsClist), row); msgPtrs = (MessagePointers *) g_malloc(sizeof(MessagePointers)); msgPtrs->count = msgPtrs->number = 1; msgPtrs->validity = data->validity; /* msgPtrs->class = data->Class; */ strcpy(msgPtrs->sender, data->remote.number); msgPtrs->msgPtr = (gint *) g_malloc(sizeof(gint)); *(msgPtrs->msgPtr) = (int) data->number; msgPtrs->memory = data->memory_type; gtk_clist_set_row_data_full(GTK_CLIST(SMS.smsClist), SMS.row_i++, msgPtrs, DestroyMsgPtrs); g_free(row[0]); g_free(row[1]); } } static inline void RefreshFolder(void) { GtkTextBuffer *buffer; gn_log_xdebug("RefreshFolder\n\n\n"); /* Clear the SMS text window */ buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(SMS.smsText)); gtk_text_buffer_set_text(buffer, "", 0); gtk_clist_freeze(GTK_CLIST(SMS.smsClist)); gtk_clist_clear(GTK_CLIST(SMS.smsClist)); SMS.row_i = 0; g_slist_foreach(phoneMonitor.sms.messages, InsertFolderElement, (gpointer) NULL); gtk_clist_sort(GTK_CLIST(SMS.smsClist)); gtk_clist_thaw(GTK_CLIST(SMS.smsClist)); } inline void GUI_RefreshMessageWindow(void) { if (!GTK_WIDGET_VISIBLE(GUI_SMSWindow)) return; RefreshFolder(); } static void SelectTreeItem(GtkWidget * item, gpointer data) { SMS.currentBox = GPOINTER_TO_INT(data); GUI_RefreshMessageWindow(); } static void ClickEntry(GtkWidget * clist, gint row, gint column, GdkEventButton * event, gpointer data) { gchar *buf; gchar *text1, *text2, *text3; text2 = g_strdup(_("unread")); GtkTextBuffer *buffer; /* Mark SMS as read */ if (gtk_clist_get_text(GTK_CLIST(clist), row, 0, &(text1))) { gn_log_xdebug("*text1: %s *text2: %s \n", text1, text2); /* strcpm(text1,text2) = 0 if text1 is the same string as text2 */ if (!(strcmp(text1, text2) )) { /* Store the read status in phoneMonitor.sms.messages */ g_slist_foreach(phoneMonitor.sms.messages, (GFunc) MarkSMSasRead, (gpointer) &(row)); text3 = g_strdup(_("read")); /* Change the status now in the clist window and don't wait for */ /* the next refresh command */ gtk_clist_freeze(GTK_CLIST(clist)); gtk_clist_set_text(GTK_CLIST(clist), row, 0, text3); gtk_clist_thaw(GTK_CLIST(clist)); }; }; buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(SMS.smsText)); gtk_text_buffer_set_text(buffer, "", 0); gtk_text_buffer_insert_at_cursor(buffer, _("From: "), -1); gtk_clist_get_text(GTK_CLIST(clist), row, 2, &buf); gtk_text_buffer_insert_at_cursor(buffer, buf, -1); gtk_text_buffer_insert_at_cursor(buffer, "\n", -1); gtk_text_buffer_insert_at_cursor(buffer, _("Date: "), -1); gtk_clist_get_text(GTK_CLIST(clist), row, 1, &buf); gtk_text_buffer_insert_at_cursor(buffer, buf, -1); gtk_text_buffer_insert_at_cursor(buffer, "\n\n", -1); gtk_clist_get_text(GTK_CLIST(clist), row, 3, &buf); gtk_text_buffer_insert_at_cursor(buffer, buf, -1); } inline void GUI_ShowSMS(void) { gint i, j; gn_error error; while ((error = GUI_InitSMSFolders()) != GN_ERR_NONE) sleep(1); for (i = 0; i < foldercount; i++) { if (i > lastfoldercount - 1) { treeFolderItem[i] = gtk_tree_item_new_with_label(_(folders[i])); gtk_tree_append(GTK_TREE(subTree), treeFolderItem[i]); gtk_signal_connect(GTK_OBJECT(treeFolderItem[i]), "select", GTK_SIGNAL_FUNC(SelectTreeItem), GINT_TO_POINTER(i)); gtk_widget_show(treeFolderItem[i]); } else { gtk_widget_set_name(treeFolderItem[i], _(folders[i])); } } for (j = i + 1; j < lastfoldercount; j++) gtk_widget_hide(treeFolderItem[j - 1]); lastfoldercount = foldercount; gtk_window_present(GTK_WINDOW(GUI_SMSWindow)); GUI_RefreshMessageWindow(); } static void OkDeleteSMSDialog(GtkWidget * widget, gpointer data) { gn_sms *message; PhoneEvent *e; GList *sel; gint row, count, number; sel = GTK_CLIST(SMS.smsClist)->selection; gtk_clist_freeze(GTK_CLIST(SMS.smsClist)); while (sel != NULL) { row = GPOINTER_TO_INT(sel->data); sel = sel->next; for (count = 0; count < ((MessagePointers *) gtk_clist_get_row_data(GTK_CLIST(SMS.smsClist), row))->count; count++) { message = (gn_sms *) g_malloc(sizeof(gn_sms)); number = *(((MessagePointers *) gtk_clist_get_row_data(GTK_CLIST(SMS.smsClist), row))->msgPtr + count); if (number == -1) { g_free(message); continue; } message->number = number; message->memory_type = ((MessagePointers *) gtk_clist_get_row_data(GTK_CLIST(SMS.smsClist), row))->memory; e = (PhoneEvent *) g_malloc(sizeof(PhoneEvent)); e->event = Event_DeleteSMSMessage; e->data = message; GUI_InsertEvent(e); /* if (e->status != GN_ERR_NONE) { if (e->status == GN_ERR_NOTIMPLEMENTED) { gtk_label_set_text(GTK_LABEL(errorDialog.text), _("Function not implemented!")); gtk_widget_show(errorDialog.dialog); } else { gtk_label_set_text(GTK_LABEL(errorDialog.text), _("Delete SMS failed!")); gtk_widget_show(errorDialog.dialog); } } */ } } gtk_widget_hide(GTK_WIDGET(data)); gtk_clist_thaw(GTK_CLIST(SMS.smsClist)); } static void DelSMS(void) { static GtkWidget *dialog = NULL; GtkWidget *button, *hbox, *label, *pixmap; if (dialog == NULL) { dialog = gtk_dialog_new(); gtk_window_set_title(GTK_WINDOW(dialog), _("Delete SMS")); gtk_window_position(GTK_WINDOW(dialog), GTK_WIN_POS_MOUSE); gtk_window_set_modal(GTK_WINDOW(dialog), TRUE); gtk_container_set_border_width(GTK_CONTAINER(dialog), 10); gtk_signal_connect(GTK_OBJECT(dialog), "delete_event", GTK_SIGNAL_FUNC(DeleteEvent), NULL); button = gtk_button_new_with_label(_("Ok")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), button, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(OkDeleteSMSDialog), (gpointer) dialog); GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); gtk_widget_grab_default(button); gtk_widget_show(button); button = gtk_button_new_with_label(_("Cancel")); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), button, TRUE, TRUE, 10); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(CancelDialog), (gpointer) dialog); gtk_widget_show(button); gtk_container_set_border_width(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), 5); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), hbox); gtk_widget_show(hbox); pixmap = gtk_pixmap_new(questMark.pixmap, questMark.mask); gtk_box_pack_start(GTK_BOX(hbox), pixmap, FALSE, FALSE, 10); gtk_widget_show(pixmap); label = gtk_label_new(_("Do you want to delete selected SMS?")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 10); gtk_widget_show(label); } gtk_widget_show(GTK_WIDGET(dialog)); } static void SaveToMailbox(gchar *mailbox_name) { gchar buf[255]; FILE *f; gint fd; GList *sel; struct tm t, *loctime; struct flock lock; time_t caltime; gint row; gchar *number, *text, *loc, dummy[6]; if ((f = fopen(mailbox_name, "a")) == NULL) { snprintf(buf, 255, _("Cannot open mailbox %s for appending!"), mailbox_name); gtk_label_set_text(GTK_LABEL(errorDialog.text), buf); gtk_widget_show(errorDialog.dialog); return; } fd = fileno(f); lock.l_type = F_WRLCK; lock.l_whence = SEEK_SET; lock.l_start = 0; lock.l_len = 0; if (fcntl(fd, F_GETLK, &lock) != -1 && lock.l_type != F_UNLCK) { snprintf(buf, 255, _("Cannot save to mailbox %s.\n\%s is locked for process %d!"), mailbox_name, mailbox_name, lock.l_pid); gtk_label_set_text(GTK_LABEL(errorDialog.text), buf); gtk_widget_show(errorDialog.dialog); fclose(f); return; } lock.l_type = F_WRLCK; lock.l_whence = SEEK_SET; lock.l_start = 0; lock.l_len = 0; if (fcntl(fd, F_SETLK, &lock) == -1) { snprintf(buf, 255, _("Cannot lock mailbox %s!"), mailbox_name); gtk_label_set_text(GTK_LABEL(errorDialog.text), buf); gtk_widget_show(errorDialog.dialog); fclose(f); return; } sel = GTK_CLIST(SMS.smsClist)->selection; while (sel != NULL) { row = GPOINTER_TO_INT(sel->data); sel = sel->next; gtk_clist_get_text(GTK_CLIST(SMS.smsClist), row, 1, &text); dummy[3] = 0; snprintf(dummy, 3, "%s", text + 17); t.tm_sec = atoi(dummy); snprintf(dummy, 3, "%s", text + 14); t.tm_min = atoi(dummy); snprintf(dummy, 3, "%s", text + 11); t.tm_hour = atoi(dummy); snprintf(dummy, 3, "%s", text); t.tm_mday = atoi(dummy); snprintf(dummy, 3, "%s", text + 3); t.tm_mon = atoi(dummy) - 1; dummy[5] = 0; snprintf(dummy, 5, "%s", text + 6); t.tm_year = atoi(dummy) - 1900; #ifdef HAVE_TM_GMTON if (text[19] != '\0') t.tm_gmtoff = atoi(text + 18) * 3600; #endif caltime = mktime(&t); loctime = localtime(&caltime); gtk_clist_get_text(GTK_CLIST(SMS.smsClist), row, 2, &number); gtk_clist_get_text(GTK_CLIST(SMS.smsClist), row, 3, &text); fprintf(f, "From %s@xgnokii %s", number, asctime(loctime)); loc = setlocale(LC_ALL, "C"); strftime(buf, 255, "Date: %a, %d %b %Y %H:%M:%S %z (%Z)\n", loctime); setlocale(LC_ALL, loc); fprintf(f, "%s", buf); fprintf(f, "From: %s@xgnokii\n", number); strncpy(buf, text, 20); buf[20] = '\0'; fprintf(f, "Subject: %s\n\n", buf); fprintf(f, "%s\n\n", text); } lock.l_type = F_UNLCK; lock.l_whence = SEEK_SET; lock.l_start = 0; lock.l_len = 0; if (fcntl(fd, F_SETLK, &lock) == -1) { snprintf(buf, 255, _("Cannot unlock mailbox %s!"), mailbox_name); gtk_label_set_text(GTK_LABEL(errorDialog.text), buf); gtk_widget_show(errorDialog.dialog); } fclose(f); } static void OKSaveSMStoMailbox(GtkWidget * widget, gpointer data) { mailbox_name = (gchar *) gtk_file_selection_get_filename(GTK_FILE_SELECTION(data)); SaveToMailbox(mailbox_name); gtk_widget_hide(GTK_WIDGET(data)); } static void SaveSMStoMailbox_dialog (void) { static GtkWidget *SaveSMS_dialog = NULL; if ( SaveSMS_dialog == NULL) SaveSMS_dialog = create_SaveSMStoMailbox(); if (mailbox_name == NULL) { mailbox_name = g_malloc (strlen(xgnokiiConfig.mailbox)+1); mailbox_name = strcpy ( mailbox_name, xgnokiiConfig.mailbox); }; gtk_file_selection_set_filename (GTK_FILE_SELECTION(SaveSMS_dialog), mailbox_name); gtk_widget_show(GTK_WIDGET(SaveSMS_dialog)); } static void SaveSMStoMailbox (void) { SaveToMailbox(xgnokiiConfig.mailbox); } /* created with the help of glade */ static GtkWidget* create_SaveSMStoMailbox (void) { GtkWidget *SaveSMStoMailbox; GtkWidget *ok_button1; GtkWidget *cancel_button1; SaveSMStoMailbox = gtk_file_selection_new (_("Choose Mailbox File")); gtk_object_set_data (GTK_OBJECT (SaveSMStoMailbox), "SaveSMStoMailbox", SaveSMStoMailbox); gtk_container_set_border_width (GTK_CONTAINER (SaveSMStoMailbox), 10); GTK_WINDOW (SaveSMStoMailbox)->type = GTK_WINDOW_TOPLEVEL; ok_button1 = GTK_FILE_SELECTION (SaveSMStoMailbox)->ok_button; gtk_object_set_data (GTK_OBJECT (SaveSMStoMailbox), "ok_button1", ok_button1); gtk_widget_show (ok_button1); GTK_WIDGET_SET_FLAGS (ok_button1, GTK_CAN_DEFAULT); cancel_button1 = GTK_FILE_SELECTION (SaveSMStoMailbox)->cancel_button; gtk_object_set_data (GTK_OBJECT (SaveSMStoMailbox), "cancel_button1", cancel_button1); gtk_widget_show (cancel_button1); GTK_WIDGET_SET_FLAGS (cancel_button1, GTK_CAN_DEFAULT); gtk_signal_connect (GTK_OBJECT (ok_button1), "clicked", GTK_SIGNAL_FUNC (OKSaveSMStoMailbox), (gpointer) SaveSMStoMailbox); gtk_signal_connect(GTK_OBJECT(SaveSMStoMailbox), "delete_event", GTK_SIGNAL_FUNC(DeleteEvent), NULL); gtk_signal_connect (GTK_OBJECT (cancel_button1), "clicked", GTK_SIGNAL_FUNC (CancelDialog), (gpointer) SaveSMStoMailbox ); return SaveSMStoMailbox; } static inline void RefreshSMSStatus(void) { gchar *buf; guint l, m; GtkTextBuffer *buffer; buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(sendSMS.smsSendText)); /* FIXME: char count is not the same as octects to be sent */ l = gtk_text_buffer_get_char_count(buffer); if (l <= GN_SMS_MAX_LENGTH) buf = g_strdup_printf("%d/1", l); else { m = l % 153; buf = g_strdup_printf("%d/%d", l > 0 && !m ? 153 : m, l == 0 ? 1 : ((l - 1) / 153) + 1); } gtk_frame_set_label(GTK_FRAME(sendSMS.status), buf); g_free(buf); } static inline gint RefreshSMSLength(GtkWidget * widget, gpointer callback_data) { RefreshSMSStatus(); return (FALSE); } static inline void SetActiveCenter(GtkWidget * item, gpointer data) { sendSMS.center = GPOINTER_TO_INT(data); } void GUI_RefreshsmscenterMenu(void) { static GtkWidget *smscMenu = NULL; GtkWidget *item; register gint i; if (!sendSMS.smscOptionMenu) return; if (smscMenu) { gtk_option_menu_remove_menu(GTK_OPTION_MENU(sendSMS.smscOptionMenu)); if (GTK_IS_WIDGET(smscMenu)) gtk_widget_destroy(GTK_WIDGET(smscMenu)); smscMenu = NULL; } smscMenu = gtk_menu_new(); for (i = 0; i < xgnokiiConfig.smsSets; i++) { if (*(xgnokiiConfig.smsSetting[i].name) == '\0') { gchar *buf = g_strdup_printf(_("Set %d"), i + 1); item = gtk_menu_item_new_with_label(xgnokiiConfig.smsSetting[i].smsc.number); g_free(buf); } else item = gtk_menu_item_new_with_label(xgnokiiConfig.smsSetting[i].name); gtk_signal_connect(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(SetActiveCenter), (gpointer) i); gtk_widget_show(item); gtk_menu_append(GTK_MENU(smscMenu), item); } gtk_option_menu_set_menu(GTK_OPTION_MENU(sendSMS.smscOptionMenu), smscMenu); } static inline void InitAddressLine(gpointer d, gpointer userData) { ((AddressPar *) d)->used = 0; } #ifdef XDEBUG static inline void PrintAddressLine(gpointer d, gpointer userData) { g_print(_("Name: %s\nNumber: %s\nUsed: %d\n"), ((AddressPar *) d)->name, ((AddressPar *) d)->number, ((AddressPar *) d)->used); } #endif static inline gint CompareAddressLineName(gconstpointer a, gconstpointer b) { return strcmp(((AddressPar *) a)->name, ((AddressPar *) b)->name); } static inline gint CompareAddressLineUsed(gconstpointer a, gconstpointer b) { return !(((AddressPar *) a)->used == ((AddressPar *) b)->used); } static gint CheckAddressMain(void) { AddressPar aps; GSList *r; register gint i = 0; gint ret = 0; gchar *buf; GString *tooltipBuf; gchar **strings = g_strsplit(gtk_entry_get_text(GTK_ENTRY(sendSMS.addr)), ",", 0); tooltipBuf = g_string_new(""); gtk_entry_set_text(GTK_ENTRY(sendSMS.addr), ""); g_slist_foreach(sendSMS.addressLine, InitAddressLine, (gpointer) NULL); while (strings[i]) { g_strstrip(strings[i]); if (*strings[i] == '\0') { i++; continue; } if ((buf = GUI_GetName(strings[i])) != NULL) { AddressPar *ap = g_malloc(sizeof(AddressPar)); ap->number = g_strdup(strings[i]); ap->name = g_strdup(buf); ap->used = 1; sendSMS.addressLine = g_slist_append(sendSMS.addressLine, ap); gtk_entry_append_text(GTK_ENTRY(sendSMS.addr), buf); g_string_append(tooltipBuf, ap->number); } else if ((buf = GUI_GetNumber(strings[i])) != NULL) { aps.name = strings[i]; r = g_slist_find_custom(sendSMS.addressLine, &aps, CompareAddressLineName); if (r) { ((AddressPar *) r->data)->used = 1; g_string_append(tooltipBuf, ((AddressPar *) r->data)->number); } else g_string_append(tooltipBuf, buf); gtk_entry_append_text(GTK_ENTRY(sendSMS.addr), strings[i]); } else { gint len = strlen(strings[i]); gint j; for (j = 0; j < len; j++) if (strings[i][j] != '*' && strings[i][j] != '#' && strings[i][j] != '+' && (strings[i][j] < '0' || strings[i][j] > '9')) ret = 1; gtk_entry_append_text(GTK_ENTRY(sendSMS.addr), strings[i]); g_string_append(tooltipBuf, strings[i]); } if (strings[i + 1] != NULL) { gtk_entry_append_text(GTK_ENTRY(sendSMS.addr), ", "); g_string_append(tooltipBuf, ", "); } i++; } aps.used = 0; while ((r = g_slist_find_custom(sendSMS.addressLine, &aps, CompareAddressLineUsed))) sendSMS.addressLine = g_slist_remove(sendSMS.addressLine, r->data); if (tooltipBuf->len > 0) { gtk_tooltips_set_tip(sendSMS.addrTip, sendSMS.addr, tooltipBuf->str, NULL); gtk_tooltips_enable(sendSMS.addrTip); } else gtk_tooltips_disable(sendSMS.addrTip); #ifdef XDEBUG g_slist_foreach(sendSMS.addressLine, PrintAddressLine, (gpointer) NULL); #endif g_strfreev(strings); g_string_free(tooltipBuf, TRUE); return ret; } static inline void CheckAddress(void) { if (CheckAddressMain()) { gtk_label_set_text(GTK_LABEL(errorDialog.text), _("Address line contains illegal address!")); gtk_widget_show(errorDialog.dialog); } } static void DeleteSelectContactDialog(GtkWidget * widget, GdkEvent * event, SelectContactData * data) { gtk_widget_destroy(GTK_WIDGET(data->clist)); gtk_widget_destroy(GTK_WIDGET(data->clistScrolledWindow)); gtk_widget_destroy(GTK_WIDGET(widget)); } static void CancelSelectContactDialog(GtkWidget * widget, SelectContactData * data) { gtk_widget_destroy(GTK_WIDGET(data->clist)); gtk_widget_destroy(GTK_WIDGET(data->clistScrolledWindow)); gtk_widget_destroy(GTK_WIDGET(data->dialog)); } static void OkSelectContactDialog(GtkWidget * widget, SelectContactData * data) { GList *sel; PhonebookEntry *pbEntry; if ((sel = GTK_CLIST(data->clist)->selection) != NULL) while (sel != NULL) { AddressPar *ap = g_malloc(sizeof(AddressPar)); pbEntry = gtk_clist_get_row_data(GTK_CLIST(data->clist), GPOINTER_TO_INT(sel->data)); ap->number = g_strdup(pbEntry->entry.number); ap->name = g_strdup(pbEntry->entry.name); ap->used = 1; sendSMS.addressLine = g_slist_append(sendSMS.addressLine, ap); if (strlen(gtk_entry_get_text(GTK_ENTRY(sendSMS.addr))) > 0) gtk_entry_append_text(GTK_ENTRY(sendSMS.addr), ", "); gtk_entry_append_text(GTK_ENTRY(sendSMS.addr), ap->name); sel = sel->next; } gtk_widget_destroy(GTK_WIDGET(data->clist)); gtk_widget_destroy(GTK_WIDGET(data->clistScrolledWindow)); gtk_widget_destroy(GTK_WIDGET(data->dialog)); CheckAddressMain(); } static void ShowSelectContactsDialog(void) { SelectContactData *r; if (!GUI_ContactsIsIntialized()) GUI_ReadContacts(); if ((r = GUI_SelectContactDialog()) == NULL) return; gtk_signal_connect(GTK_OBJECT(r->dialog), "delete_event", GTK_SIGNAL_FUNC(DeleteSelectContactDialog), (gpointer) r); gtk_signal_connect(GTK_OBJECT(r->okButton), "clicked", GTK_SIGNAL_FUNC(OkSelectContactDialog), (gpointer) r); gtk_signal_connect(GTK_OBJECT(r->cancelButton), "clicked", GTK_SIGNAL_FUNC(CancelSelectContactDialog), (gpointer) r); } static gint Sendsmscore(gn_sms * sms) { gn_error error; PhoneEvent *e = (PhoneEvent *) g_malloc(sizeof(PhoneEvent)); D_SMSMessage *m = (D_SMSMessage *) g_malloc(sizeof(D_SMSMessage)); unsigned int i = 0; while (sms->user_data[i].type != GN_SMS_DATA_None) { if ((sms->user_data[i].type == GN_SMS_DATA_Text || sms->user_data[i].type == GN_SMS_DATA_NokiaText || sms->user_data[i].type == GN_SMS_DATA_iMelody) && !gn_char_def_alphabet(sms->user_data[i].u.text)) sms->dcs.u.general.alphabet = GN_SMS_DCS_UCS2; i++; } m->sms = sms; e->event = Event_SendSMSMessage; e->data = m; GUI_InsertEvent(e); pthread_mutex_lock(&sendSMSMutex); pthread_cond_wait(&sendSMSCond, &sendSMSMutex); pthread_mutex_unlock(&sendSMSMutex); gn_log_xdebug("Address: %s\nText: %s\nDelivery report: %d\nSMS Center: %d\n", sms->remote.number, sms->user_data[0].u.text, GTK_TOGGLE_BUTTON(sendSMS.report)->active, sendSMS.center); error = m->status; g_free(m); if (error != GN_ERR_NONE) { gchar *buf = g_strdup_printf(_("Error sending SMS to %s\n%s"), sms->remote.number, gn_error_print(error)); gtk_label_set_text(GTK_LABEL(errorDialog.text), buf); gtk_widget_show(errorDialog.dialog); g_free(buf); } else g_print(_("Message sent to: %s\n"), sms->remote.number); return (error); } static void DoSendSMS(void) { gn_sms sms; AddressPar aps; char udh[256]; GSList *r; gchar *text, *number; gchar **addresses; gchar *buf; gint offset, nr_msg, l; gint longSMS; register gint i = 0, j; GtkTextBuffer *buffer; GtkTextIter startIter, endIter; if (CheckAddressMain()) { gtk_label_set_text(GTK_LABEL(errorDialog.text), _("Address line contains illegal address!")); gtk_widget_show(errorDialog.dialog); return; } buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(sendSMS.smsSendText)); /* FIXME: char count is not the same as octects to be sent */ l = gtk_text_buffer_get_char_count(buffer); gtk_text_buffer_get_start_iter(buffer, &startIter); gtk_text_buffer_get_end_iter(buffer, &endIter); text = gtk_text_buffer_get_text(buffer, &startIter, &endIter, FALSE); addresses = g_strsplit(gtk_entry_get_text(GTK_ENTRY(sendSMS.addr)), ",", 0); longSMS = GTK_TOGGLE_BUTTON(sendSMS.longSMS)->active; while (addresses[i]) { g_strstrip(addresses[i]); if ((number = GUI_GetNumber(addresses[i]))) { aps.name = addresses[i]; if ((r = g_slist_find_custom(sendSMS.addressLine, &aps, CompareAddressLineName))) number = ((AddressPar *) r->data)->number; } else number = addresses[i]; gn_sms_default_submit(&sms); strcpy(sms.smsc.number, xgnokiiConfig.smsSetting[sendSMS.center].smsc.number); sms.smsc.type = xgnokiiConfig.smsSetting[sendSMS.center].smsc.type; if (GTK_TOGGLE_BUTTON(sendSMS.report)->active) sms.delivery_report = true; else sms.delivery_report = false; sms.type = GN_SMS_MT_Submit; strncpy(sms.remote.number, number, GN_BCD_STRING_MAX_LENGTH); sms.remote.number[GN_BCD_STRING_MAX_LENGTH - 1] = '\0'; if (sms.remote.number[0] == '+') sms.remote.type = GN_GSM_NUMBER_International; else sms.remote.type = GN_GSM_NUMBER_Unknown; if (l > GN_SMS_MAX_LENGTH) { if (longSMS) { sms.user_data[0].type = GN_SMS_DATA_Concat; nr_msg = ((l - 1) / 153) + 1; udh[0] = 0x05; /* UDH length */ udh[1] = 0x00; /* concatenated messages (IEI) */ udh[2] = 0x03; /* IEI data length */ udh[3] = 0x01; /* reference number */ udh[4] = nr_msg; /* number of messages */ udh[5] = 0x00; /* message reference number */ offset = 6; for (j = 0; j < nr_msg; j++) { udh[5] = j + 1; memcpy(sms.user_data[0].u.text, udh, offset); strncpy(sms.user_data[0].u.text + offset, text + (j * 153), 153); sms.user_data[0].u.text[153] = '\0'; buf = g_strdup_printf(_("Sending SMS to %s (%d/%d) ...\n"), sms.remote.number, j + 1, nr_msg); gtk_label_set_text(GTK_LABEL(infoDialog.text), buf); gtk_widget_show_now(infoDialog.dialog); g_free(buf); GUI_Refresh(); if (Sendsmscore(&sms) != GN_ERR_NONE) { gtk_widget_hide(infoDialog.dialog); GUI_Refresh(); break; } gtk_widget_hide(infoDialog.dialog); GUI_Refresh(); sleep(1); } } else { sms.udh.length = 0; sms.user_data[0].type = GN_SMS_DATA_Text; nr_msg = ((l - 1) / 153) + 1; if (nr_msg > 99) /* We have place only for 99 messages in header. */ nr_msg = 99; for (j = 0; j < nr_msg; j++) { gchar header[8]; g_snprintf(header, 8, "%2d/%-2d: ", j + 1, nr_msg); header[7] = '\0'; strcpy(sms.user_data[0].u.text, header); strncat(sms.user_data[0].u.text, text + (j * 153), 153); sms.user_data[0].u.text[160] = '\0'; buf = g_strdup_printf(_("Sending SMS to %s (%d/%d) ...\n"), sms.remote.number, j + 1, nr_msg); gtk_label_set_text(GTK_LABEL(infoDialog.text), buf); gtk_widget_show_now(infoDialog.dialog); g_free(buf); GUI_Refresh(); if (Sendsmscore(&sms) != GN_ERR_NONE) { gtk_widget_hide(infoDialog.dialog); GUI_Refresh(); break; } gtk_widget_hide(infoDialog.dialog); GUI_Refresh(); sleep(1); } } } else { sms.udh.length = 0; sms.user_data[0].type = GN_SMS_DATA_Text; strncpy(sms.user_data[0].u.text, text, GN_SMS_MAX_LENGTH + 1); sms.user_data[0].u.text[GN_SMS_MAX_LENGTH] = '\0'; buf = g_strdup_printf(_("Sending SMS to %s (%d/%d) ...\n"), sms.remote.number, 1, 1); gtk_label_set_text(GTK_LABEL(infoDialog.text), buf); gtk_widget_show_now(infoDialog.dialog); g_free(buf); GUI_Refresh(); (void) Sendsmscore(&sms); gtk_widget_hide(infoDialog.dialog); GUI_Refresh(); } i++; } g_strfreev(addresses); g_free(text); } static GtkItemFactoryEntry send_menu_items[] = { {NULL, NULL, NULL, 0, ""}, {NULL, "X", DoSendSMS, 0, NULL}, {NULL, "S", NULL, 0, NULL}, {NULL, NULL, NULL, 0, ""}, {NULL, "N", CheckAddress, 0, NULL}, {NULL, "C", ShowSelectContactsDialog, 0, NULL}, {NULL, NULL, NULL, 0, ""}, {NULL, "W", CloseSMSSend, 0, NULL}, {NULL, NULL, NULL, 0, ""}, {NULL, NULL, GUI_ShowAbout, 0, NULL}, }; static void InitSendMenu(void) { send_menu_items[0].path = _("/_File"); send_menu_items[1].path = _("/File/Sen_d"); send_menu_items[2].path = _("/File/_Save"); send_menu_items[3].path = _("/File/Sep1"); send_menu_items[4].path = _("/File/Check _Names"); send_menu_items[5].path = _("/File/C_ontacts"); send_menu_items[6].path = _("/File/Sep2"); send_menu_items[7].path = _("/File/_Close"); send_menu_items[8].path = _("/_Help"); send_menu_items[9].path = _("/Help/_About"); } static void CreateSMSSendWindow(void) { int nmenu_items = sizeof(send_menu_items) / sizeof(send_menu_items[0]); GtkItemFactory *item_factory; GtkAccelGroup *accel_group; GtkWidget *menubar; GtkWidget *main_vbox; GtkWidget *hbox, *vbox; GtkWidget *button; GtkWidget *pixmap; GtkWidget *label; GtkWidget *toolbar; GtkWidget *scrolledWindow; GtkTooltips *tooltips; if (sendSMS.SMSSendWindow) return; InitSendMenu(); sendSMS.SMSSendWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_wmclass(GTK_WINDOW(sendSMS.SMSSendWindow), "SMSSendWindow", "Xgnokii"); gtk_widget_set_usize (GTK_WIDGET (sendSMS.SMSSendWindow), 436, 220); gtk_signal_connect(GTK_OBJECT(sendSMS.SMSSendWindow), "delete_event", GTK_SIGNAL_FUNC(DeleteEvent), NULL); gtk_widget_realize(sendSMS.SMSSendWindow); accel_group = gtk_accel_group_new(); item_factory = gtk_item_factory_new(GTK_TYPE_MENU_BAR, "
", accel_group); gtk_item_factory_create_items(item_factory, nmenu_items, send_menu_items, NULL); gtk_window_add_accel_group(GTK_WINDOW(sendSMS.SMSSendWindow), accel_group); /* Finally, return the actual menu bar created by the item factory. */ menubar = gtk_item_factory_get_widget(item_factory, "
"); main_vbox = gtk_vbox_new(FALSE, 1); gtk_container_border_width(GTK_CONTAINER(main_vbox), 1); gtk_container_add(GTK_CONTAINER(sendSMS.SMSSendWindow), main_vbox); gtk_widget_show(main_vbox); gtk_box_pack_start(GTK_BOX(main_vbox), menubar, FALSE, FALSE, 0); gtk_widget_show(menubar); /* Create the toolbar */ toolbar = gtk_toolbar_new(); gtk_toolbar_set_style(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_ICONS); gtk_toolbar_set_orientation(GTK_TOOLBAR(toolbar), GTK_ORIENTATION_HORIZONTAL); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL, _("Send message"), NULL, NewPixmap(SendSMS_xpm, GUI_SMSWindow->window, &GUI_SMSWindow->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc) DoSendSMS, NULL); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL, _("Save message to outbox"), NULL, NewPixmap(Send_xpm, GUI_SMSWindow->window, &GUI_SMSWindow->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc) NULL, NULL); gtk_toolbar_append_space(GTK_TOOLBAR(toolbar)); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL, _("Check names"), NULL, NewPixmap(Check_xpm, GUI_SMSWindow->window, &GUI_SMSWindow->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc) CheckAddress, NULL); gtk_box_pack_start(GTK_BOX(main_vbox), toolbar, FALSE, FALSE, 0); gtk_widget_show(toolbar); /* Address line */ hbox = gtk_hbox_new(FALSE, 3); gtk_box_pack_start(GTK_BOX(main_vbox), hbox, FALSE, FALSE, 3); gtk_widget_show(hbox); label = gtk_label_new(_("To:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 3); gtk_widget_show(label); sendSMS.addr = gtk_entry_new(); gtk_box_pack_start(GTK_BOX(hbox), sendSMS.addr, TRUE, TRUE, 1); sendSMS.addrTip = gtk_tooltips_new(); gtk_tooltips_set_tip(sendSMS.addrTip, sendSMS.addr, "", NULL); gtk_tooltips_disable(sendSMS.addrTip); gtk_widget_show(sendSMS.addr); button = gtk_button_new(); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(ShowSelectContactsDialog), (gpointer) NULL); pixmap = NewPixmap(Names_xpm, sendSMS.SMSSendWindow->window, &sendSMS.SMSSendWindow->style->bg[GTK_STATE_NORMAL]); gtk_container_add(GTK_CONTAINER(button), pixmap); gtk_widget_show(pixmap); gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 5); tooltips = gtk_tooltips_new(); gtk_tooltips_set_tip(tooltips, button, _("Select contacts"), NULL); gtk_widget_show(button); hbox = gtk_hbox_new(FALSE, 3); gtk_box_pack_end(GTK_BOX(main_vbox), hbox, TRUE, TRUE, 3); gtk_widget_show(hbox); /* Edit SMS widget */ vbox = gtk_vbox_new(FALSE, 3); gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 3); gtk_widget_show(vbox); sendSMS.status = gtk_frame_new("0/1"); gtk_frame_set_label_align(GTK_FRAME(sendSMS.status), 1.0, 0.0); gtk_frame_set_shadow_type(GTK_FRAME(sendSMS.status), GTK_SHADOW_OUT); gtk_box_pack_end(GTK_BOX(vbox), sendSMS.status, TRUE, TRUE, 5); gtk_widget_show(sendSMS.status); sendSMS.smsSendText = gtk_text_view_new(); gtk_widget_set_usize(GTK_WIDGET(sendSMS.smsSendText), 0, 120); gtk_text_view_set_editable(GTK_TEXT_VIEW(sendSMS.smsSendText), TRUE); gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(sendSMS.smsSendText), GTK_WRAP_WORD); g_signal_connect_after(G_OBJECT(gtk_text_view_get_buffer(GTK_TEXT_VIEW(sendSMS.smsSendText))), "changed", G_CALLBACK(RefreshSMSLength), (gpointer) NULL); scrolledWindow = gtk_scrolled_window_new(NULL, NULL); gtk_container_set_border_width(GTK_CONTAINER(scrolledWindow), 5); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledWindow), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); gtk_container_add(GTK_CONTAINER(scrolledWindow), sendSMS.smsSendText); gtk_container_add(GTK_CONTAINER(sendSMS.status), scrolledWindow); gtk_widget_show(sendSMS.smsSendText); gtk_widget_show(scrolledWindow); /* Options widget */ vbox = gtk_vbox_new(FALSE, 3); gtk_box_pack_end(GTK_BOX(hbox), vbox, FALSE, FALSE, 5); gtk_widget_show(vbox); sendSMS.report = gtk_check_button_new_with_label(_("Delivery report")); gtk_box_pack_start(GTK_BOX(vbox), sendSMS.report, FALSE, FALSE, 3); gtk_widget_show(sendSMS.report); sendSMS.longSMS = gtk_check_button_new_with_label(_("Send as Long SMS")); gtk_box_pack_start(GTK_BOX(vbox), sendSMS.longSMS, FALSE, FALSE, 3); gtk_widget_show(sendSMS.longSMS); label = gtk_label_new(_("SMS Center:")); gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 1); gtk_widget_show(label); GUI_InitSMSSettings(); sendSMS.smscOptionMenu = gtk_option_menu_new(); GUIEventSend(GUI_EVENT_SMS_CENTERS_CHANGED); gtk_box_pack_start(GTK_BOX(vbox), sendSMS.smscOptionMenu, FALSE, FALSE, 1); gtk_widget_show(sendSMS.smscOptionMenu); } static void NewSMS(void) { GtkTextBuffer *buffer; if (!sendSMS.SMSSendWindow) CreateSMSSendWindow(); gtk_window_set_title(GTK_WINDOW(sendSMS.SMSSendWindow), _("New Message")); gtk_tooltips_disable(sendSMS.addrTip); buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(sendSMS.smsSendText)); gtk_text_buffer_set_text(buffer, "", 0); gtk_entry_set_text(GTK_ENTRY(sendSMS.addr), ""); RefreshSMSStatus(); gtk_window_present(GTK_WINDOW(sendSMS.SMSSendWindow)); } static void ForwardSMS(void) { gchar *buf; GtkTextBuffer *buffer; if (GTK_CLIST(SMS.smsClist)->selection == NULL) return; if (!sendSMS.SMSSendWindow) CreateSMSSendWindow(); gtk_window_set_title(GTK_WINDOW(sendSMS.SMSSendWindow), _("Forward Message")); gtk_tooltips_disable(sendSMS.addrTip); gtk_clist_get_text(GTK_CLIST(SMS.smsClist), GPOINTER_TO_INT(GTK_CLIST(SMS.smsClist)->selection->data), 3, &buf); buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(sendSMS.smsSendText)); gtk_text_buffer_set_text(buffer, buf, -1); gtk_entry_set_text(GTK_ENTRY(sendSMS.addr), ""); RefreshSMSStatus(); gtk_window_present(GTK_WINDOW(sendSMS.SMSSendWindow)); } /* static inline gint CompareSMSMessageLocation (gconstpointer a, gconstpointer b) { return !(((gn_sms *) a)->Number == ((gn_sms *) b)->Number); } */ static void ReplySMS(void) { gchar *buf; GtkTextBuffer *buffer; /* GSList *r; gn_sms msg; */ if (GTK_CLIST(SMS.smsClist)->selection == NULL) return; if (!sendSMS.SMSSendWindow) CreateSMSSendWindow(); gtk_window_set_title(GTK_WINDOW(sendSMS.SMSSendWindow), _("Reply Message")); gtk_clist_get_text(GTK_CLIST(SMS.smsClist), GPOINTER_TO_INT(GTK_CLIST(SMS.smsClist)->selection->data), 3, &buf); buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(sendSMS.smsSendText)); gtk_text_buffer_set_text(buffer, buf, -1); /* msg.Number = *(((MessagePointers *) gtk_clist_get_row_data(GTK_CLIST (SMS.smsClist), GPOINTER_TO_INT (GTK_CLIST (SMS.smsClist)->selection->data)))->msgPtr); r = g_slist_find_custom (SMS.messages, &msg, CompareSMSMessageLocation); if (r) */ gtk_entry_set_text(GTK_ENTRY(sendSMS.addr), ((MessagePointers *) gtk_clist_get_row_data(GTK_CLIST(SMS.smsClist), GPOINTER_TO_INT(GTK_CLIST (SMS. smsClist)-> selection-> data)))-> sender); CheckAddressMain(); RefreshSMSStatus(); gtk_window_present(GTK_WINDOW(sendSMS.SMSSendWindow)); } static void ActivateSMS(void) { if (isSMSactivated) isSMSactivated = 0; else isSMSactivated = 1; } static void NewBC(void) { if (!sendSMS.SMSSendWindow) CreateSMSSendWindow(); gtk_window_set_title(GTK_WINDOW(sendSMS.SMSSendWindow), _("Business Card")); gtk_tooltips_disable(sendSMS.addrTip); gtk_text_freeze(GTK_TEXT(sendSMS.smsSendText)); gtk_text_set_point(GTK_TEXT(sendSMS.smsSendText), 0); gtk_text_forward_delete(GTK_TEXT(sendSMS.smsSendText), gtk_text_get_length(GTK_TEXT(sendSMS.smsSendText))); gtk_text_insert(GTK_TEXT(sendSMS.smsSendText), NULL, &(SMS.colour), NULL, "Business Card\n", -1); gtk_text_insert(GTK_TEXT(sendSMS.smsSendText), NULL, &(sendSMS.smsSendText->style->black), NULL, xgnokiiConfig.user.name, -1); gtk_text_insert(GTK_TEXT(sendSMS.smsSendText), NULL, &(sendSMS.smsSendText->style->black), NULL, ", ", -1); gtk_text_insert(GTK_TEXT(sendSMS.smsSendText), NULL, &(sendSMS.smsSendText->style->black), NULL, xgnokiiConfig.user.title, -1); gtk_text_insert(GTK_TEXT(sendSMS.smsSendText), NULL, &(sendSMS.smsSendText->style->black), NULL, "\n", -1); gtk_text_insert(GTK_TEXT(sendSMS.smsSendText), NULL, &(sendSMS.smsSendText->style->black), NULL, xgnokiiConfig.user.company, -1); gtk_text_insert(GTK_TEXT(sendSMS.smsSendText), NULL, &(sendSMS.smsSendText->style->black), NULL, "\n\n", -1); gtk_text_insert(GTK_TEXT(sendSMS.smsSendText), NULL, &(SMS.colour), NULL, "tel ", -1); gtk_text_insert(GTK_TEXT(sendSMS.smsSendText), NULL, &(sendSMS.smsSendText->style->black), NULL, xgnokiiConfig.user.telephone, -1); gtk_text_insert(GTK_TEXT(sendSMS.smsSendText), NULL, &(sendSMS.smsSendText->style->black), NULL, "\n", -1); gtk_text_insert(GTK_TEXT(sendSMS.smsSendText), NULL, &(SMS.colour), NULL, "fax ", -1); gtk_text_insert(GTK_TEXT(sendSMS.smsSendText), NULL, &(sendSMS.smsSendText->style->black), NULL, xgnokiiConfig.user.fax, -1); gtk_text_insert(GTK_TEXT(sendSMS.smsSendText), NULL, &(sendSMS.smsSendText->style->black), NULL, "\n", -1); gtk_text_insert(GTK_TEXT(sendSMS.smsSendText), NULL, &(sendSMS.smsSendText->style->black), NULL, xgnokiiConfig.user.email, -1); gtk_text_insert(GTK_TEXT(sendSMS.smsSendText), NULL, &(sendSMS.smsSendText->style->black), NULL, "\n", -1); gtk_text_insert(GTK_TEXT(sendSMS.smsSendText), NULL, &(sendSMS.smsSendText->style->black), NULL, xgnokiiConfig.user.address, -1); gtk_text_insert(GTK_TEXT(sendSMS.smsSendText), NULL, &(sendSMS.smsSendText->style->black), NULL, "\n", -1); gtk_text_thaw(GTK_TEXT(sendSMS.smsSendText)); gtk_entry_set_text(GTK_ENTRY(sendSMS.addr), ""); RefreshSMSStatus(); gtk_window_present(GTK_WINDOW(sendSMS.SMSSendWindow)); } static GtkItemFactoryEntry menu_items[] = { {NULL, NULL, NULL, 0, ""}, {NULL, "S", NULL, 0, NULL}, {NULL, "M", SaveSMStoMailbox, 0, NULL}, {NULL, "T", SaveSMStoMailbox_dialog, 0, NULL}, {NULL, NULL, NULL, 0, ""}, {NULL, "W", CloseSMS, 0, NULL}, {NULL, NULL, NULL, 0, ""}, {NULL, "A", ActivateSMS, 0, ""}, {NULL, "N", NewSMS, 0, NULL}, {NULL, "F", ForwardSMS, 0, NULL}, {NULL, "R", ReplySMS, 0, NULL}, {NULL, "D", DelSMS, 0, NULL}, {NULL, NULL, NULL, 0, ""}, {NULL, "B", NewBC, 0, NULL}, {NULL, NULL, NULL, 0, ""}, {NULL, NULL, GUI_ShowAbout, 0, NULL}, }; static void InitMainMenu(void) { register gint i = 0; menu_items[i++].path = _("/_File"); menu_items[i++].path = _("/File/_Save"); menu_items[i++].path = _("/File/Save to mailbo_x"); menu_items[i++].path = _("/File/Save to _file"); menu_items[i++].path = _("/File/Sep1"); menu_items[i++].path = _("/File/_Close"); menu_items[i++].path = _("/_Messages"); menu_items[i++].path = _("/_Messages/_Activate SMS reading"); menu_items[i++].path = _("/_Messages/_New"); menu_items[i++].path = _("/_Messages/_Forward"); menu_items[i++].path = _("/_Messages/_Reply"); menu_items[i++].path = _("/_Messages/_Delete"); menu_items[i++].path = _("/Messages/Sep3"); menu_items[i++].path = _("/_Messages/_Business card"); menu_items[i++].path = _("/_Help"); menu_items[i++].path = _("/Help/_About"); } void GUI_CreateSMSWindow(void) { int nmenu_items = sizeof(menu_items) / sizeof(menu_items[0]); GtkItemFactory *item_factory; GtkAccelGroup *accel_group; GtkWidget *menubar; GtkWidget *main_vbox; GtkWidget *toolbar; GtkWidget *scrolledWindow; GtkWidget *vpaned, *hpaned; GtkWidget *tree, *treeSMSItem; /* , *subTree; */ SortColumn *sColumn; GdkColormap *cmap; register gint i; gchar *titles[4] = { _("Status"), _("Date / Time"), _("Sender"), _("Message") }; InitMainMenu(); GUI_SMSWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_wmclass(GTK_WINDOW(GUI_SMSWindow), "SMSWindow", "Xgnokii"); gtk_window_set_title(GTK_WINDOW(GUI_SMSWindow), _("Short Message Service")); /* gtk_widget_set_usize (GTK_WIDGET (GUI_SMSWindow), 436, 220); */ gtk_signal_connect(GTK_OBJECT(GUI_SMSWindow), "delete_event", GTK_SIGNAL_FUNC(DeleteEvent), NULL); gtk_widget_realize(GUI_SMSWindow); accel_group = gtk_accel_group_new(); item_factory = gtk_item_factory_new(GTK_TYPE_MENU_BAR, "
", accel_group); gtk_item_factory_create_items(item_factory, nmenu_items, menu_items, NULL); gtk_window_add_accel_group(GTK_WINDOW(GUI_SMSWindow), accel_group); /* Finally, return the actual menu bar created by the item factory. */ menubar = gtk_item_factory_get_widget(item_factory, "
"); main_vbox = gtk_vbox_new(FALSE, 1); gtk_container_border_width(GTK_CONTAINER(main_vbox), 1); gtk_container_add(GTK_CONTAINER(GUI_SMSWindow), main_vbox); gtk_widget_show(main_vbox); gtk_box_pack_start(GTK_BOX(main_vbox), menubar, FALSE, FALSE, 0); gtk_widget_show(menubar); /* Create the toolbar */ toolbar = gtk_toolbar_new(); gtk_toolbar_set_style(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_ICONS); gtk_toolbar_set_orientation(GTK_TOOLBAR(toolbar), GTK_ORIENTATION_HORIZONTAL); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL, _("New message"), NULL, NewPixmap(Edit_xpm, GUI_SMSWindow->window, &GUI_SMSWindow->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc) NewSMS, NULL); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL, _("Forward message"), NULL, NewPixmap(Forward_xpm, GUI_SMSWindow->window, &GUI_SMSWindow->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc) ForwardSMS, NULL); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL, _("Reply message"), NULL, NewPixmap(Reply_xpm, GUI_SMSWindow->window, &GUI_SMSWindow->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc) ReplySMS, NULL); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL, _("Business Card"), NULL, NewPixmap(BCard_xpm, GUI_SMSWindow->window, &GUI_SMSWindow->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc) NewBC, NULL); gtk_toolbar_append_space(GTK_TOOLBAR(toolbar)); gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL, _("Delete message"), NULL, NewPixmap(Delete_xpm, GUI_SMSWindow->window, &GUI_SMSWindow->style->bg[GTK_STATE_NORMAL]), (GtkSignalFunc) DelSMS, NULL); gtk_box_pack_start(GTK_BOX(main_vbox), toolbar, FALSE, FALSE, 0); gtk_widget_show(toolbar); vpaned = gtk_vpaned_new(); // gtk_paned_set_handle_size(GTK_PANED(vpaned), 10); // gtk_paned_set_gutter_size(GTK_PANED(vpaned), 15); gtk_box_pack_end(GTK_BOX(main_vbox), vpaned, TRUE, TRUE, 0); gtk_widget_show(vpaned); hpaned = gtk_hpaned_new(); // gtk_paned_set_handle_size(GTK_PANED(hpaned), 8); // gtk_paned_set_gutter_size(GTK_PANED(hpaned), 10); gtk_paned_add1(GTK_PANED(vpaned), hpaned); gtk_widget_show(hpaned); /* Navigation tree */ tree = gtk_tree_new(); gtk_tree_set_selection_mode(GTK_TREE(tree), GTK_SELECTION_SINGLE); gtk_widget_show(tree); treeSMSItem = gtk_tree_item_new_with_label(_("SMS's")); gtk_tree_append(GTK_TREE(tree), treeSMSItem); gtk_widget_show(treeSMSItem); subTree = gtk_tree_new(); gtk_tree_set_selection_mode(GTK_TREE(subTree), GTK_SELECTION_SINGLE); gtk_tree_set_view_mode(GTK_TREE(subTree), GTK_TREE_VIEW_ITEM); gtk_tree_item_set_subtree(GTK_TREE_ITEM(treeSMSItem), subTree); scrolledWindow = gtk_scrolled_window_new(NULL, NULL); gtk_widget_set_usize(scrolledWindow, 175, 180); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledWindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_paned_add1(GTK_PANED(hpaned), scrolledWindow); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolledWindow), tree); gtk_widget_show(scrolledWindow); /* Message viewer */ SMS.smsText = gtk_text_view_new(); gtk_text_view_set_editable(GTK_TEXT_VIEW(SMS.smsText), FALSE); gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(SMS.smsText), GTK_WRAP_WORD); scrolledWindow = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledWindow), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); gtk_paned_add2(GTK_PANED(hpaned), scrolledWindow); gtk_container_add(GTK_CONTAINER(scrolledWindow), SMS.smsText); gtk_widget_show_all(scrolledWindow); /* Messages list */ SMS.smsClist = gtk_clist_new_with_titles(4, titles); gtk_clist_set_shadow_type(GTK_CLIST(SMS.smsClist), GTK_SHADOW_OUT); gtk_clist_set_compare_func(GTK_CLIST(SMS.smsClist), CListCompareFunc); gtk_clist_set_sort_column(GTK_CLIST(SMS.smsClist), 1); gtk_clist_set_sort_type(GTK_CLIST(SMS.smsClist), GTK_SORT_ASCENDING); gtk_clist_set_auto_sort(GTK_CLIST(SMS.smsClist), FALSE); gtk_clist_set_selection_mode(GTK_CLIST(SMS.smsClist), GTK_SELECTION_EXTENDED); gtk_clist_set_column_width(GTK_CLIST(SMS.smsClist), 0, 70); gtk_clist_set_column_width(GTK_CLIST(SMS.smsClist), 1, 142); gtk_clist_set_column_width(GTK_CLIST(SMS.smsClist), 2, 135); /* gtk_clist_set_column_justification (GTK_CLIST (SMS.smsClist), 2, GTK_JUSTIFY_CENTER); */ for (i = 0; i < 4; i++) { if ((sColumn = g_malloc(sizeof(SortColumn))) == NULL) { g_print(_("Error: %s: line %d: Can't allocate memory!\n"), __FILE__, __LINE__); gtk_main_quit(); } sColumn->clist = SMS.smsClist; sColumn->column = i; gtk_signal_connect(GTK_OBJECT(GTK_CLIST(SMS.smsClist)->column[i].button), "clicked", GTK_SIGNAL_FUNC(SetSortColumn), (gpointer) sColumn); } gtk_signal_connect(GTK_OBJECT(SMS.smsClist), "select_row", GTK_SIGNAL_FUNC(ClickEntry), NULL); scrolledWindow = gtk_scrolled_window_new(NULL, NULL); gtk_widget_set_usize(scrolledWindow, 550, 100); gtk_container_add(GTK_CONTAINER(scrolledWindow), SMS.smsClist); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledWindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_paned_add2(GTK_PANED(vpaned), scrolledWindow); gtk_widget_show(SMS.smsClist); gtk_widget_show(scrolledWindow); CreateErrorDialog(&errorDialog, GUI_SMSWindow); CreateInfoDialog(&infoDialog, GUI_SMSWindow); gtk_signal_emit_by_name(GTK_OBJECT(treeSMSItem), "expand"); cmap = gdk_colormap_get_system(); SMS.colour.red = 0xffff; SMS.colour.green = 0; SMS.colour.blue = 0; if (!gdk_color_alloc(cmap, &(SMS.colour))) g_error(_("couldn't allocate colour")); questMark.pixmap = gdk_pixmap_create_from_xpm_d(GUI_SMSWindow->window, &questMark.mask, &GUI_SMSWindow->style->bg[GTK_STATE_NORMAL], quest_xpm); GUIEventAdd(GUI_EVENT_SMS_CENTERS_CHANGED, GUI_RefreshsmscenterMenu); GUIEventAdd(GUI_EVENT_SMS_NUMBER_CHANGED, GUI_RefreshMessageWindow); } gnokii-0.6.31/xgnokii/xgnokii_dtmf.c0000644000175000017500000002351711666163120015511 0ustar leoleo/* $Id$ X G N O K I I A Linux/Unix GUI for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999 Pavel Janik ml., Hugh Blemings & 1999-2005 Jan Derfinak. */ #include "config.h" #include #include #include "misc.h" #include "xgnokii_common.h" #include "xgnokii.h" #include "xgnokii_lowlevel.h" #include "xgnokii_dtmf.h" #include "xpm/Send.xpm" #include "xpm/Delete.xpm" #define MAX_DTMF_LENGTH 50 static GtkWidget *GUI_DTMFWindow; static GtkWidget *displayEntry; static ErrorDialog errorDialog = { NULL, NULL }; static gchar *saveFileName; static inline void ButtonCB(GtkWidget * widget, gpointer data) { gchar buf[2] = " "; *buf = GPOINTER_TO_INT(data); gtk_entry_append_text(GTK_ENTRY(displayEntry), buf); } static inline void ClearCB(GtkWidget * widget, gpointer data) { gtk_entry_set_text(GTK_ENTRY(displayEntry), ""); } static inline void SendCB(GtkWidget * widget, gpointer data) { PhoneEvent *e; gchar *buf = g_strdup(gtk_entry_get_text(GTK_ENTRY(displayEntry))); if (*buf == '\0') { g_free(buf); return; } e = g_malloc(sizeof(PhoneEvent)); e->event = Event_SendDTMF; e->data = buf; GUI_InsertEvent(e); } static void OkLoadDialog(GtkWidget * w, GtkFileSelection * fs) { FILE *f; gchar *fileName; gchar line[MAX_DTMF_LENGTH + 1]; gchar buf[80]; fileName = (gchar *) gtk_file_selection_get_filename(GTK_FILE_SELECTION(fs)); gtk_widget_hide(GTK_WIDGET(fs)); if ((f = fopen(fileName, "r")) == NULL) { g_snprintf(buf, 80, _("Can't open file %s for reading!\n"), fileName); gtk_label_set_text(GTK_LABEL(errorDialog.text), buf); gtk_widget_show(errorDialog.dialog); return; } if (fgets(line, MAX_DTMF_LENGTH + 1, f) == NULL) { g_snprintf(buf, 80, _("Error reading file!")); gtk_label_set_text(GTK_LABEL(errorDialog.text), buf); gtk_widget_show(errorDialog.dialog); } else { gtk_entry_set_text(GTK_ENTRY(displayEntry), line); } fclose(f); } static void LoadFileDialog() { static GtkWidget *fileDialog = NULL; if (fileDialog == NULL) { fileDialog = gtk_file_selection_new(_("Load")); gtk_signal_connect(GTK_OBJECT(fileDialog), "delete_event", GTK_SIGNAL_FUNC(DeleteEvent), NULL); gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(fileDialog)->ok_button), "clicked", GTK_SIGNAL_FUNC(OkLoadDialog), (gpointer) fileDialog); gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(fileDialog)->cancel_button), "clicked", GTK_SIGNAL_FUNC(CancelDialog), (gpointer) fileDialog); } gtk_widget_show(fileDialog); } static void SaveDTMF() { FILE *f; gchar buf[80]; if ((f = fopen(saveFileName, "w")) == NULL) { g_snprintf(buf, 80, _("Can't open file %s for writing!\n"), saveFileName); gtk_label_set_text(GTK_LABEL(errorDialog.text), buf); gtk_widget_show(errorDialog.dialog); return; } fputs(gtk_entry_get_text(GTK_ENTRY(displayEntry)), f); fclose(f); } static inline void YesSaveDialog(GtkWidget * w, gpointer data) { gtk_widget_hide(GTK_WIDGET(data)); SaveDTMF(); } static void OkSaveDialog(GtkWidget * w, GtkFileSelection * fs) { FILE *f; static YesNoDialog dialog = { NULL, NULL }; gchar err[255]; saveFileName = (gchar *) gtk_file_selection_get_filename(GTK_FILE_SELECTION(fs)); gtk_widget_hide(GTK_WIDGET(fs)); if ((f = fopen(saveFileName, "r")) != NULL) { fclose(f); if (dialog.dialog == NULL) { CreateYesNoDialog(&dialog, (GtkSignalFunc) YesSaveDialog, (GtkSignalFunc) CancelDialog, GUI_DTMFWindow); gtk_window_set_title(GTK_WINDOW(dialog.dialog), _("Overwrite file?")); g_snprintf(err, 255, _("File %s already exists.\nOverwrite?"), saveFileName); gtk_label_set_text(GTK_LABEL(dialog.text), err); } gtk_widget_show(dialog.dialog); } else SaveDTMF(); } static void SaveFileDialog() { static GtkWidget *fileDialog = NULL; if (fileDialog == NULL) { fileDialog = gtk_file_selection_new(_("Save")); gtk_signal_connect(GTK_OBJECT(fileDialog), "delete_event", GTK_SIGNAL_FUNC(DeleteEvent), NULL); gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(fileDialog)->ok_button), "clicked", GTK_SIGNAL_FUNC(OkSaveDialog), (gpointer) fileDialog); gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(fileDialog)->cancel_button), "clicked", GTK_SIGNAL_FUNC(CancelDialog), (gpointer) fileDialog); } gtk_widget_show(fileDialog); } static inline void CloseDTMF(GtkWidget * w, gpointer data) { gtk_widget_hide(GUI_DTMFWindow); } inline void GUI_ShowDTMF() { gtk_window_present(GTK_WINDOW(GUI_DTMFWindow)); } static GtkItemFactoryEntry menu_items[] = { {NULL, NULL, NULL, 0, ""}, {NULL, "O", LoadFileDialog, 0, NULL}, {NULL, "S", SaveFileDialog, 0, NULL}, {NULL, NULL, NULL, 0, ""}, {NULL, "W", CloseDTMF, 0, NULL}, {NULL, NULL, NULL, 0, ""}, {NULL, NULL, GUI_ShowAbout, 0, NULL}, }; static void InitMainMenu(void) { menu_items[0].path = _("/_File"); menu_items[1].path = _("/File/_Open"); menu_items[2].path = _("/File/_Save"); menu_items[3].path = _("/File/Sep1"); menu_items[4].path = _("/File/_Close"); menu_items[5].path = _("/_Help"); menu_items[6].path = _("/Help/_About"); } void GUI_CreateDTMFWindow() { int nmenu_items = sizeof(menu_items) / sizeof(menu_items[0]); GtkItemFactory *item_factory; GtkAccelGroup *accel_group; GtkWidget *menubar; GtkWidget *main_vbox; GtkWidget *table; GtkWidget *frame; GtkWidget *button; GtkWidget *pixmap; gchar buf[2]; gint i, j; InitMainMenu(); GUI_DTMFWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_wmclass(GTK_WINDOW(GUI_DTMFWindow), "DTMFWindow", "Xgnokii"); gtk_window_set_title(GTK_WINDOW(GUI_DTMFWindow), _("Dial Tone")); //gtk_widget_set_usize (GTK_WIDGET (GUI_DTMFWindow), 436, 220); gtk_signal_connect(GTK_OBJECT(GUI_DTMFWindow), "delete_event", GTK_SIGNAL_FUNC(DeleteEvent), NULL); gtk_widget_realize(GUI_DTMFWindow); accel_group = gtk_accel_group_new(); item_factory = gtk_item_factory_new(GTK_TYPE_MENU_BAR, "
", accel_group); gtk_item_factory_create_items(item_factory, nmenu_items, menu_items, NULL); gtk_window_add_accel_group(GTK_WINDOW(GUI_DTMFWindow), accel_group); /* Finally, return the actual menu bar created by the item factory. */ menubar = gtk_item_factory_get_widget(item_factory, "
"); main_vbox = gtk_vbox_new(FALSE, 1); gtk_container_border_width(GTK_CONTAINER(main_vbox), 1); gtk_container_add(GTK_CONTAINER(GUI_DTMFWindow), main_vbox); gtk_widget_show(main_vbox); gtk_box_pack_start(GTK_BOX(main_vbox), menubar, FALSE, FALSE, 0); gtk_widget_show(menubar); table = gtk_table_new(8, 3, TRUE); frame = gtk_frame_new(NULL); gtk_container_add(GTK_CONTAINER(frame), table); gtk_container_border_width(GTK_CONTAINER(frame), 10); gtk_container_border_width(GTK_CONTAINER(table), 3); gtk_box_pack_start(GTK_BOX(main_vbox), frame, FALSE, FALSE, 0); gtk_widget_show(frame); gtk_table_set_row_spacings(GTK_TABLE(table), 2); gtk_table_set_col_spacings(GTK_TABLE(table), 2); displayEntry = gtk_entry_new_with_max_length(MAX_DTMF_LENGTH); gtk_table_attach_defaults(GTK_TABLE(table), displayEntry, 0, 3, 0, 1); gtk_widget_set_usize(displayEntry, 110, 22); for (i = 0; i < 3; i++) for (j = 0; j < 3; j++) { g_snprintf(buf, 2, "%d", j * 3 + i + 1); button = gtk_button_new_with_label(buf); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(ButtonCB), (gpointer) ((gint) * buf)); gtk_table_attach_defaults(GTK_TABLE(table), button, i, i + 1, j + 2, j + 3); } button = gtk_button_new_with_label("*"); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(ButtonCB), (gpointer) '*'); gtk_table_attach_defaults(GTK_TABLE(table), button, 0, 1, 5, 6); button = gtk_button_new_with_label("0"); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(ButtonCB), (gpointer) '0'); gtk_table_attach_defaults(GTK_TABLE(table), button, 1, 2, 5, 6); button = gtk_button_new_with_label("#"); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(ButtonCB), (gpointer) '#'); gtk_table_attach_defaults(GTK_TABLE(table), button, 2, 3, 5, 6); button = gtk_button_new_with_label(_("Pause")); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(ButtonCB), (gpointer) 'p'); gtk_table_attach_defaults(GTK_TABLE(table), button, 0, 1, 6, 7); button = gtk_button_new_with_label(_("Wait")); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(ButtonCB), (gpointer) 'w'); gtk_table_attach_defaults(GTK_TABLE(table), button, 1, 2, 6, 7); button = gtk_button_new(); pixmap = NewPixmap(Send_xpm, GUI_DTMFWindow->window, &GUI_DTMFWindow->style->bg[GTK_STATE_NORMAL]); gtk_container_add(GTK_CONTAINER(button), pixmap); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(SendCB), (gpointer) NULL); gtk_table_attach_defaults(GTK_TABLE(table), button, 0, 3, 7, 8); button = gtk_button_new(); pixmap = NewPixmap(Delete_xpm, GUI_DTMFWindow->window, &GUI_DTMFWindow->style->bg[GTK_STATE_NORMAL]); gtk_container_add(GTK_CONTAINER(button), pixmap); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(ClearCB), (gpointer) NULL); gtk_table_attach_defaults(GTK_TABLE(table), button, 2, 3, 6, 7); gtk_widget_show_all(table); CreateErrorDialog(&errorDialog, GUI_DTMFWindow); } gnokii-0.6.31/xgnokii/xgnokii_common.h0000644000175000017500000000461711666163120016054 0ustar leoleo/* $Id$ X G N O K I I A Linux/Unix GUI for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999 Pavel Janík ml., Hugh Blemings & 1999-2005 Jan Derfinak. */ #ifndef XGNOKII_COMMON_H #define XGNOKII_COMMON_H #include #include /* for size_t */ typedef struct { GtkWidget *clist; gint column; } SortColumn; /* typedef struct { gchar *model; gchar *number; } Model; */ typedef struct { GtkWidget *dialog; GtkWidget *text; } ErrorDialog; typedef struct { GtkWidget *dialog; GtkWidget *text; } InfoDialog; typedef struct { GtkWidget *dialog; GtkWidget *text; } YesNoDialog; typedef struct { GdkPixmap *pixmap; GdkBitmap *mask; } QuestMark; typedef enum { GUI_EVENT_CONTACTS_CHANGED, GUI_EVENT_CALLERS_GROUPS_CHANGED, GUI_EVENT_SMS_NUMBER_CHANGED, GUI_EVENT_SMS_CENTERS_CHANGED, GUI_EVENT_NETMON_CHANGED, } GUIEventType; extern void CancelDialog(const GtkWidget *, const gpointer); extern void CreateErrorDialog(ErrorDialog *, GtkWidget *); extern void CreateInfoDialog(InfoDialog *, GtkWidget *); extern void CreateYesNoDialog(YesNoDialog *, const GtkSignalFunc, const GtkSignalFunc, GtkWidget *); extern GtkWidget *NewPixmap(gchar **, GdkWindow *, GdkColor *); extern void DeleteEvent(const GtkWidget *, const GdkEvent *, const gpointer); extern gint LaunchProcess(const gchar *, const gchar *, const gint, const gint, const gint); extern void RemoveZombie(const gint); extern gint strrncmp(const gchar * const, const gchar * const, size_t); extern void GUI_Refresh(void); extern void SetSortColumn(GtkWidget *, SortColumn *); extern void GUIEventAdd(GUIEventType, void (*)(void)); extern bool GUIEventRemove(GUIEventType, void (*)(void)); extern void GUIEventSend(GUIEventType); #endif gnokii-0.6.31/xgnokii/xgnokii_xkeyb.c0000644000175000017500000002162411666163120015676 0ustar leoleo/* $Id$ X G N O K I I A Linux/Unix GUI for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999 Pavel Janik ml., Hugh Blemings & 1999-2005 Jan Derfinak. Copyright (C) 2002 BORBELY Zoltan */ #include "config.h" #include #include #include "misc.h" #include "gnokii.h" #include "xgnokii_common.h" #include "xgnokii.h" #include "xgnokii_lowlevel.h" #include "xgnokii_xkeyb.h" typedef struct { int top_left_x, top_left_y; int bottom_right_x, bottom_right_y; int code; } ButtonT; static GtkWidget *GUI_XkeybWindow; static GtkWidget *pixArea; static GtkWidget *phonePixmap = NULL; static ErrorDialog errorDialog = { NULL, NULL }; static ButtonT *button = NULL; static ButtonT button_6110[30] = { {103, 91, 114, 107, GN_KEY_POWER}, /* Power */ {28, 240, 54, 263, GN_KEY_MENU}, /* Menu */ {84, 240, 110, 263, GN_KEY_NAMES}, /* Names */ {58, 245, 82, 258, GN_KEY_UP}, /* Up */ {55, 263, 85, 276, GN_KEY_DOWN}, /* Down */ {22, 271, 50, 289, GN_KEY_GREEN}, /* Green */ {91, 271, 115, 289, GN_KEY_RED}, /* Red */ {18, 294, 44, 310, GN_KEY_1}, /* 1 */ {56, 294, 85, 310, GN_KEY_2}, /* 2 */ {98, 294, 121, 310, GN_KEY_3}, /* 3 */ {18, 317, 44, 333, GN_KEY_4}, /* 4 */ {56, 317, 85, 333, GN_KEY_5}, /* 5 */ {98, 317, 121, 333, GN_KEY_6}, /* 6 */ {18, 342, 44, 356, GN_KEY_7}, /* 7 */ {56, 342, 85, 356, GN_KEY_8}, /* 8 */ {98, 342, 121, 356, GN_KEY_9}, /* 9 */ {18, 365, 44, 380, GN_KEY_ASTERISK}, /* * */ {56, 365, 85, 380, GN_KEY_0}, /* 0 */ {98, 365, 121, 380, GN_KEY_HASH}, /* # */ {1, 138, 10, 150, GN_KEY_INCREASEVOLUME}, /* Volume + */ {1, 165, 10, 176, GN_KEY_DECREASEVOLUME}, /* Volume - */ {0, 0, 0, 0, 0x00} }; static ButtonT button_6150[30] = { {99, 78, 114, 93, GN_KEY_POWER}, /* Power */ {20, 223, 49, 245, GN_KEY_MENU}, /* Menu */ {90, 223, 120, 245, GN_KEY_NAMES}, /* Names */ {59, 230, 83, 247, GN_KEY_UP}, /* Up */ {56, 249, 84, 265, GN_KEY_DOWN}, /* Down */ {14, 254, 51, 273, GN_KEY_GREEN}, /* Green */ {90, 255, 126, 273, GN_KEY_RED}, /* Red */ {18, 281, 53, 299, GN_KEY_1}, /* 1 */ {55, 280, 86, 299, GN_KEY_2}, /* 2 */ {90, 281, 122, 299, GN_KEY_3}, /* 3 */ {18, 303, 53, 323, GN_KEY_4}, /* 4 */ {55, 303, 87, 323, GN_KEY_5}, /* 5 */ {90, 303, 122, 323, GN_KEY_6}, /* 6 */ {18, 327, 53, 346, GN_KEY_7}, /* 7 */ {53, 327, 87, 346, GN_KEY_8}, /* 8 */ {90, 327, 122, 346, GN_KEY_9}, /* 9 */ {18, 349, 53, 370, GN_KEY_ASTERISK}, /* * */ {56, 349, 87, 370, GN_KEY_0}, /* 0 */ {98, 349, 122, 370, GN_KEY_HASH}, /* # */ {2, 131, 10, 147, GN_KEY_INCREASEVOLUME}, /* Volume + */ {2, 155, 10, 173, GN_KEY_DECREASEVOLUME}, /* Volume - */ {0, 0, 0, 0, 0x00} }; static ButtonT button_5110[30] = { {100, 85, 114, 99, GN_KEY_POWER}, /* Power */ {50, 240, 85, 265, GN_KEY_MENU}, /* Menu */ {20, 240, 45, 260, GN_KEY_NAMES}, /* Names */ {100, 240, 117, 258, GN_KEY_UP}, /* Up */ {93, 267, 112, 287, GN_KEY_DOWN}, /* Down */ {14, 294, 44, 312, GN_KEY_1}, /* 1 */ {54, 294, 83, 312, GN_KEY_2}, /* 2 */ {94, 294, 122, 312, GN_KEY_3}, /* 3 */ {14, 320, 44, 338, GN_KEY_4}, /* 4 */ {54, 320, 83, 338, GN_KEY_5}, /* 5 */ {94, 320, 122, 338, GN_KEY_6}, /* 6 */ {14, 345, 44, 363, GN_KEY_7}, /* 7 */ {54, 345, 83, 363, GN_KEY_8}, /* 8 */ {94, 345, 122, 363, GN_KEY_9}, /* 9 */ {18, 374, 49, 389, GN_KEY_ASTERISK}, /* * */ {53, 371, 82, 387, GN_KEY_0}, /* 0 */ {96, 374, 119, 389, GN_KEY_HASH}, /* # */ {0, 0, 0, 0, 0x00} }; static GtkWidget *GetPixmap(void) { GtkWidget *wpixmap; GdkPixmap *pixmap; GdkBitmap *mask; gchar *file; if (!strcmp(phoneMonitor.phone.model, "6110") || !strcmp(phoneMonitor.phone.model, "6120")) { button = button_6110; file = g_strdup_printf("%s%s", xgnokiiConfig.xgnokiidir, "/xpm/keyb_6110.xpm"); } else if (!strcmp(phoneMonitor.phone.model, "6130") || !strcmp(phoneMonitor.phone.model, "6150") || !strcmp(phoneMonitor.phone.model, "616x") || !strcmp(phoneMonitor.phone.model, "6185") || !strcmp(phoneMonitor.phone.model, "6190")) { button = button_6150; file = g_strdup_printf("%s%s", xgnokiiConfig.xgnokiidir, "/xpm/keyb_6150.xpm"); } else if (!strcmp(phoneMonitor.phone.model, "5110") || !strcmp(phoneMonitor.phone.model, "5130") || !strcmp(phoneMonitor.phone.model, "5160") || !strcmp(phoneMonitor.phone.model, "5190")) { button = button_5110; file = g_strdup_printf("%s%s", xgnokiiConfig.xgnokiidir, "/xpm/keyb_5110.xpm"); } else return NULL; pixmap = gdk_pixmap_create_from_xpm(pixArea->window, &mask, &pixArea->style->bg[GTK_STATE_NORMAL], file); g_free(file); if (pixmap == NULL) return NULL; wpixmap = gtk_pixmap_new(pixmap, mask); return wpixmap; } static inline void CloseXkeyb(GtkWidget * w, gpointer data) { gtk_widget_hide(GUI_XkeybWindow); } void GUI_ShowXkeyb(void) { if (phonePixmap == NULL) { phonePixmap = GetPixmap(); if (phonePixmap != NULL) { gtk_fixed_put(GTK_FIXED(pixArea), phonePixmap, 0, 0); gtk_widget_show(phonePixmap); } else { gtk_label_set_text(GTK_LABEL(errorDialog.text), _("Cannot load background pixmap!")); gtk_widget_show(errorDialog.dialog); } } gtk_window_present(GTK_WINDOW(GUI_XkeybWindow)); } static gint ButtonEvent(GtkWidget * widget, GdkEventButton * event) { register gint i = 0; int action; if (button == NULL) return TRUE; if (event->button != 1) return TRUE; if (event->type == GDK_BUTTON_PRESS) action = Event_PressKey; else if (event->type == GDK_BUTTON_RELEASE) action = Event_ReleaseKey; else return TRUE; // g_print ("%f %f\n", event->x, event->y); while (button[i].top_left_x != 0) { if (button[i].top_left_x <= event->x && event->x <= button[i].bottom_right_x && button[i].top_left_y <= event->y && event->y <= button[i].bottom_right_y) { PhoneEvent *e = g_malloc(sizeof(PhoneEvent)); e->event = action; e->data = GINT_TO_POINTER(button[i].code); GUI_InsertEvent(e); } i++; } return TRUE; } static GtkItemFactoryEntry menu_items[] = { {NULL, NULL, NULL, 0, ""}, {NULL, "W", CloseXkeyb, 0, NULL}, {NULL, NULL, NULL, 0, ""}, {NULL, NULL, GUI_ShowAbout, 0, NULL}, }; static void InitMainMenu(void) { menu_items[0].path = _("/_File"); menu_items[1].path = _("/File/_Close"); menu_items[2].path = _("/_Help"); menu_items[3].path = _("/Help/_About"); } void GUI_CreateXkeybWindow(void) { int nmenu_items = sizeof(menu_items) / sizeof(menu_items[0]); GtkItemFactory *item_factory; GtkAccelGroup *accel_group; GtkWidget *menubar; GtkWidget *main_vbox; InitMainMenu(); GUI_XkeybWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_wmclass(GTK_WINDOW(GUI_XkeybWindow), "XkeybWindow", "Xgnokii"); gtk_window_set_title(GTK_WINDOW(GUI_XkeybWindow), _("XGnokii Keyboard")); //gtk_widget_set_usize (GTK_WIDGET (GUI_XkeybWindow), 436, 220); gtk_signal_connect(GTK_OBJECT(GUI_XkeybWindow), "delete_event", GTK_SIGNAL_FUNC(DeleteEvent), NULL); gtk_widget_realize(GUI_XkeybWindow); accel_group = gtk_accel_group_new(); item_factory = gtk_item_factory_new(GTK_TYPE_MENU_BAR, "
", accel_group); gtk_item_factory_create_items(item_factory, nmenu_items, menu_items, NULL); gtk_window_add_accel_group(GTK_WINDOW(GUI_XkeybWindow), accel_group); /* Finally, return the actual menu bar created by the item factory. */ menubar = gtk_item_factory_get_widget(item_factory, "
"); main_vbox = gtk_vbox_new(FALSE, 1); gtk_container_border_width(GTK_CONTAINER(main_vbox), 1); gtk_container_add(GTK_CONTAINER(GUI_XkeybWindow), main_vbox); gtk_widget_show(main_vbox); gtk_box_pack_start(GTK_BOX(main_vbox), menubar, FALSE, FALSE, 0); gtk_widget_show(menubar); pixArea = gtk_fixed_new(); gtk_fixed_set_has_window(GTK_FIXED(pixArea), TRUE); gtk_signal_connect(GTK_OBJECT(pixArea), "button_press_event", (GtkSignalFunc) ButtonEvent, NULL); gtk_signal_connect(GTK_OBJECT(pixArea), "button_release_event", (GtkSignalFunc) ButtonEvent, NULL); gtk_widget_set_events(pixArea, GDK_EXPOSURE_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK); gtk_box_pack_start(GTK_BOX(main_vbox), pixArea, FALSE, FALSE, 3); gtk_widget_show(pixArea); CreateErrorDialog(&errorDialog, GUI_XkeybWindow); } gnokii-0.6.31/xgnokii/xgnokii_lowlevel.h0000644000175000017500000001205011666163120016403 0ustar leoleo/* $Id$ X G N O K I I A Linux/Unix GUI for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999 Pavel Janík ml., Hugh Blemings & 1999-2005 Jan Derfinak. Copyright (C) 2002 Markus Plail Copyright (C) 2002-2003 Pawel Kot, BORBELY Zoltan Copyright (C) 2003 Tomi Ollila */ #ifndef XGNOKII_LOWLEVEL_H #define XGNOKII_LOWLEVEL_H #include #include #include "gnokii.h" #define INCALL_NUMBER_LENGTH 20 #define NETMON_SCREEN_LENGTH 60 typedef enum { CS_Idle, CS_Waiting, CS_InProgress } CallState; typedef enum { Event_GetMemoryStatus, Event_GetMemoryLocation, Event_GetMemoryLocationAll, Event_WriteMemoryLocation, Event_WriteMemoryLocationAll, Event_DeleteMemoryLocation, Event_GetCalendarNote, Event_GetCalendarNoteAll, Event_WriteCalendarNote, Event_DeleteCalendarNote, Event_GetCallerGroup, Event_SendCallerGroup, Event_GetSMSCenter, Event_SetSMSCenter, Event_SendSMSMessage, Event_DeleteSMSMessage, Event_GetSpeedDial, Event_SendSpeedDial, Event_SendDTMF, Event_NetMonitorOnOff, Event_NetMonitor, Event_DialVoice, Event_GetAlarm, Event_SetAlarm, Event_PressKey, Event_ReleaseKey, Event_GetBitmap, Event_SetBitmap, Event_GetNetworkInfo, Event_PlayTone, Event_GetRingtone, Event_SetRingtone, Event_DeleteRingtone, Event_GetRingtoneList, Event_Exit } PhoneAction; typedef struct { PhoneAction event; gpointer data; } PhoneEvent; typedef struct { gn_speed_dial entry; gn_error status; } D_SpeedDial; typedef struct { gn_sms *sms; gn_error status; } D_SMSMessage; typedef struct { gn_sms_message_center *center; gn_error status; } D_SMSCenter; typedef struct { guchar number; gchar text[256]; gint status; } D_CallerGroup; typedef struct { gn_calnote_alarm alarm; gint status; } D_Alarm; typedef struct { gn_memory_status memoryStatus; gint status; } D_MemoryStatus; typedef struct { gn_phonebook_entry *entry; gint status; } D_MemoryLocation; typedef struct { gint min; gint max; gint used; gn_memory_type type; gint status; gint (*InsertEntry)(gn_phonebook_entry *); gint(*ReadFailed) (gint); } D_MemoryLocationAll; typedef struct { gn_calnote *entry; gint status; } D_CalendarNote; typedef struct { gint status; gint (*InsertEntry)(gn_calnote *); gint(*ReadFailed) (gint); } D_CalendarNoteAll; typedef struct { gn_error status; gn_bmp *bitmap; } D_Bitmap; typedef struct { gn_error status; gn_network_info *info; } D_NetworkInfo; typedef struct { int frequency; int volume; int usec; } D_PlayTone; typedef struct { gn_ringtone *ringtone; gn_error status; } D_Ringtone; typedef struct { gfloat rfLevel; gfloat batteryLevel; gn_power_source powerSource; gchar *working; bool alarm; struct { gchar *model; gchar *imei; gchar *revision; gchar *product_name; } phone; struct { gint unRead; gint number; gint changed; GSList *messages; } sms; struct { CallState callInProgress; gchar callNum[INCALL_NUMBER_LENGTH]; } call; struct { gint number; gchar screen[NETMON_SCREEN_LENGTH]; gchar screen3[NETMON_SCREEN_LENGTH]; gchar screen4[NETMON_SCREEN_LENGTH]; gchar screen5[NETMON_SCREEN_LENGTH]; } netmonitor; gint supported; } PhoneMonitor; extern pthread_t monitor_th; extern PhoneMonitor phoneMonitor; extern pthread_mutex_t memoryMutex; extern pthread_cond_t memoryCond; extern pthread_mutex_t calendarMutex; extern pthread_cond_t calendarCond; extern pthread_mutex_t smsMutex; extern pthread_mutex_t sendSMSMutex; extern pthread_cond_t sendSMSCond; extern pthread_mutex_t callMutex; extern pthread_mutex_t netMonMutex; extern pthread_mutex_t speedDialMutex; extern pthread_cond_t speedDialCond; extern pthread_mutex_t callerGroupMutex; extern pthread_cond_t callerGroupCond; extern pthread_mutex_t smsCenterMutex; extern pthread_cond_t smsCenterCond; extern pthread_mutex_t alarmMutex; extern pthread_cond_t alarmCond; extern pthread_mutex_t getBitmapMutex; extern pthread_cond_t getBitmapCond; extern pthread_mutex_t setBitmapMutex; extern pthread_cond_t setBitmapCond; extern pthread_mutex_t getNetworkInfoMutex; extern pthread_cond_t getNetworkInfoCond; extern pthread_mutex_t ringtoneMutex; extern pthread_cond_t ringtoneCond; extern void GUI_InitPhoneMonitor(void); extern void *GUI_Connect(void *a); extern void GUI_InsertEvent(PhoneEvent * event); extern gn_error GUI_InitSMSFolders(void); extern int isSMSactivated; extern struct gn_statemachine *statemachine; #endif gnokii-0.6.31/xgnokii/xgnokii_logos.h0000644000175000017500000000336411666163120015705 0ustar leoleo/* $Id$ X G N O K I I A Linux/Unix GUI for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999 Pavel Janík ml., Hugh Blemings & 1999-2005 Jan Derfinak. */ #ifndef XGNOKII_LOGOS_H #define XGNOKII_LOGOS_H /* drawable point size - depends on .xpm file */ #define POINTSIZE 5 /* maximal size for drawing area */ #define MAXWIDTH 82 #define MAXHEIGHT 48 /* where to draw preview logos in previewPixmap */ #define PREVIEWSTARTX 28 #define PREVIEWSTARTY 160 #define PREVIEWWIDTH 138 #define PREVIEWHEIGHT 289 /* relative movement caller & operator logo from startuplogo */ #define PREVIEWJUMPX 6 #define PREVIEWJUMPY 6 #define TOOL_BRUSH 0 #define TOOL_LINE 1 #define TOOL_RECTANGLE 2 #define TOOL_FILLED_RECTANGLE 3 #define TOOL_CIRCLE 4 #define TOOL_FILLED_CIRCLE 5 #define TOOL_ELIPSE 6 #define TOOL_FILLED_ELIPSE 7 #define TOOL_TEXT 8 extern void GUI_ShowLogosWindow(void); extern void GUI_CreateLogosWindow(void); /* this is called from optionsApplyCallback when some changes * caller groups names */ extern void GUI_RefreshLogosGroupsCombo(void); #endif gnokii-0.6.31/xgnokii/xgnokii_data.c0000644000175000017500000000662111666163120015465 0ustar leoleo/* $Id$ X G N O K I I A Linux/Unix GUI for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999 Pavel Janik ml., Hugh Blemings & 1999-2005 Jan Derfinak. Copyright (C) 2002-2004 Pawel Kot Copyright (C) 2002 BORBELY Zoltan */ #include "config.h" #include #include #include "misc.h" #include "xgnokii_common.h" #include "xgnokii.h" #include "xgnokii_lowlevel.h" #include "xgnokii_data.h" static GtkWidget *GUI_DataWindow; bool GTerminateThread = false; bool enabled = false; static GtkWidget *label = NULL; static void UpdateStatus(void) { gchar *buf; if (!enabled) buf = g_strdup_printf(_("Data calls are currently\nDisabled\n ")); else buf = g_strdup_printf(_("Data calls are currently\nEnabled\n ")); if (label != NULL) gtk_label_set_text(GTK_LABEL(label), buf); g_free(buf); } void GUI_ShowData(void) { if ((!phoneMonitor.supported) & PM_DATA) return; if (GTerminateThread) { gn_vm_terminate(); enabled = false; GTerminateThread = false; } UpdateStatus(); gtk_window_present(GTK_WINDOW(GUI_DataWindow)); } static inline void DisableData(GtkWidget * widget, gpointer data) { gn_vm_terminate(); enabled = false; UpdateStatus(); } static inline void EnableData(GtkWidget * widget, gpointer data) { GTerminateThread = false; gn_vm_initialise("", xgnokiiConfig.bindir, false, false); enabled = true; UpdateStatus(); } void GUI_CreateDataWindow(void) { GtkWidget *button, *hbox, *vbox; GUI_DataWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_wmclass(GTK_WINDOW(GUI_DataWindow), "DataWindow", "Xgnokii"); gtk_window_set_title(GTK_WINDOW(GUI_DataWindow), _("Virtual Modem")); gtk_container_set_border_width(GTK_CONTAINER(GUI_DataWindow), 10); gtk_signal_connect(GTK_OBJECT(GUI_DataWindow), "delete_event", GTK_SIGNAL_FUNC(DeleteEvent), NULL); vbox = gtk_vbox_new(FALSE, 1); gtk_container_border_width(GTK_CONTAINER(vbox), 1); gtk_container_add(GTK_CONTAINER(GUI_DataWindow), vbox); gtk_widget_show(vbox); label = gtk_label_new(""); gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); gtk_widget_show(label); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(vbox), hbox); gtk_widget_show(hbox); button = gtk_button_new_with_label(_("Enable")); gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, FALSE, 5); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(EnableData), NULL); gtk_widget_show(button); button = gtk_button_new_with_label(_("Disable")); gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, FALSE, 5); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(DisableData), NULL); GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); gtk_widget_grab_default(button); gtk_widget_show(button); } gnokii-0.6.31/xgnokii/ChangeLog0000644000175000017500000002746211666163120014440 0ustar leoleo* Sat 18 Jun 2011 Daniele Forsi - Set "phone" as default window icon * Sun 26 Sep 2010 Matthias Mucks - On 64Bit Machines, while reading contacts from a mobile, 'pbEntry->entry.caller_group' sometimes contains a large nubmer, seems to be unsigned -1, which causes the SEGFAULT * Sun 15 Aug 2010 Daniele Forsi - Replace dprintf() with gn_log_xdebug() * Sun 25 Jul 2010 Daniele Forsi - Replace GtkText with GtkTextView in SMS windows to gain UTF-8 support * Tue 31 Mar 2009 PaweÅ‚ Kot - Remove online documentation. It's outdated. * Thu 26 Feb 2009 Daniele Forsi - In xgnokii.desktop.in use Icon=phone (patch by Ariszló) * Thu 14 Feb 2008 Daniele Forsi - In Calendar window connect menu items for "Add reminder", "Add call", "Add meeting", "Add birthday", "Delete note" to the same action as the toolbar buttons and display a dialog for the actions that aren't yet implemented ("Save to phone", "Send via SMS", "Import from file", "Export to file") * Wed 21 Nov 2007 Daniele Forsi - never let the user write a phonebook name longer than GN_PHONEBOOK_NAME_MAX_LENGTH and allocate memory for string terminator too * Tue 20 Nov 2007 Daniele Forsi - fix moving phonebook entries from SM to ME or from ME to SM closes https://savannah.nongnu.org/bugs/?21580 * Mon 19 Nov 2007 Daniele Forsi - fix deleting phonebook entries fixes original submission of https://savannah.nongnu.org/bugs/?20816 * Sun 4 Nov 2007 Daniele Forsi - when importing contacts from file overwrite entries with same location number; leave untouched other entries - fix optimization to read the phonebook when empty entries are present * Fri 26 Oct 2007 Daniele Forsi - when exporting the phonebook in raw format use the same function as gnokii closes https://savannah.nongnu.org/bugs/?20815 * Tue 19 Dec 2006 Daniele Forsi - clear the text box after deleting a note and update the list after adding a note in the Calendar window * Sun 17 Dec 2006 Pawel Kot - Add support for blacklisting phones based on PM_XGNOKIIBREAKAGE capability. * Tue 17 Jan 2006 Daniele Forsi - Changed CreateProgressDialog() to use the vbox provided by the dialog, since creating a new vbox was no more possible (a GtkDialog is a subclass of GtkBin and can only contain one widget, the warning said). * Sun 15 Jan 2006 Daniele Forsi - Changed again some messages to be consistent across the whole project. * Sat 07 Jan 2006 Daniele Forsi - Changed some messages to be consistent across the whole project. * Wed 10 Aug 2005 Jan Derfinak - First phase of moving to gtk2. -DGTK_ENABLE_BROKEN is needed to compile. Based on patch from Bastien Nocera. * Thu 22 Mar 2001 Jan Derfinak - Added 6210 preview to xlogos module. * Sat 03 Mar 2001 Jan Derfinak - Pavel Machek's patch for finegrained indicators. * Fri 02 Feb 2001 Jan Derfinak - New dialoges for 6210/7110 in contacts window. * Sat 13 Jan 2001 Jan Derfinak - Patch from Pavel Machek . It provides better feedback to user, puts GPL into copyright (it belongs there), and fixes docs. - Corrected non translatable labels/sentenses in xgnokii.c. Hans Motshärg * Sun 19 Dec 2000 Jan Derfinak - Functions for detecting phone's capabilites moved to common directory. * Sat Jul 15 13:18:12 CEST 2000 Jan Derfinak Jan Derfinak - Patch from Christopher Kemp to enable data mode in xgnokii. * Sun Jul 02 19:02:39 CEST 2000 Jan Derfinak - Deleting calendar notes work. - Initialization timeout shorted from 15 secs to 10 secs. * Sun Jun 18 03:18:27 CEST 2000 Jan Derfinak - Saving SMS's to mailbox. Original idea from Petri Lahti - User configurable maximum length of names in contacts on SIM and phone. * Sat Jun 16 22:35:24 CEST 2000 Jan Derfinak - New pixmap in calendar window from Marcel Koeppen * Tue Jun 13 01:58:56 CEST 2000 Jan Derfinak - Initialization timeout was extended from 5 secs to 15 secs. - Corrected algorithm for SMS reading. Now we can read all SMS on SIM card. - Changed date/time in delivery report from send date to delivery date. * Mon Jun 12 16:33:45 CEST 2000 Jan Derfinak - xlogos integrated into xgnokii (Robert Vojta ) - Little progress in calendar window. - Cleaning code for compiling under Solaris 8 with new gcc. - Small changes and fixes. * Wed May 24 16:50:07 CEST 2000 Jan Derfinak - Changed structure in help directory. (Polish help don't work now.) * Sun May 21 22:33:19 CEST 2000 Jan Derfinak - New English online help. <(Marcin Wiacek ) - Added notes viewer in Calendar window. - Added function which get and show notes in phone. * Wed May 17 17:51:07 CEST 2000 Jan Derfinak - New install procedure for online documetation. (Brad Guillory ) - Small progress in Calendar window. * Tue May 16 11:24:08 CEST 2000 Jan Derfinak - Okay, okay you are better in ice hockey. - Why did you removed slovak messages? You cannot translate them? :) - New skin for 5110 in keyboard window (Marcin Wiacek ) - Corrected initialization of some static variables. - Progress in Calendar window design. * Mon May 15 19:15:04 CEST 2000 Pavel Janik ml. - removed references to malloc.h, it is deprecated. We now use stdlib.h. * Sun May 14 21:17:06 CEST 2000 Pavel Janik ml. - Hey, we really won the World Championship in ice hockey again! - Fixed some minor language stuff. * Sat May 13 20:46:26 CEST 2000 Pavel Janik ml. - slovak debug messages removed :-) - Hey, we will beat you tomorrow in ice hockey! * Fri May 12 01:14:48 CEST 2000 Jan Derfinak - Callers groups are readed only once. - Added info dialog when reading SMS centers. - New online help from Marcin Wiacek in English and Polish language. Language version depends on locale settings (LANG, LC_MESSAGES or LC_ALL) * Mon May 1 21:16:35 CEST 2000 Jan Derfinak - added new thread to xgnokii. This thread glue slow phone interface with quick user interface (GUI). - new backgroung for xgnokii. "Business Cards" is replaced with "Calendar". (Petr Vostrel ) - Initial support for Calendar. - added online help for netmonitor from Marcin Wiacek . - added info dialog. - added support for showing outgoing call. - added support for translation menus into national languages. - corrected xkeyb map for 6150 (Jochen Schnapka ) - added detection for MNT phones (Andrew Kozin ) - more minor fixes. * Thu Mar 20 12:06:47 CET 2000 Jan Derfinak xgnokii-20000320 - corrected if clause for support Callers groups and Netmonitor. - removed option for memory type change, if phone support only SIM memory. - xkeyb integrated into xgnokii. * Thu Mar 16 15:45:39 CET 2000 Jan Derfinak xgnokii-20000316 - File CHANGES renamed to ChangeLog - Changed URL to Marcin Wi1cek nokia pages in xgnokii help. - xgnokii automatically recognizes phone and disable/enable supported features (in 38xx serie is better to say "automagically") - Caller groups names are loaded from phone (I have not know that GetBitmap do this.) User can change CGN and save it to phone. - Range checking for battery level added. Changes in SMS window: - Support for sending long SMS. User can choose, if he want only split SMS in many SMS or if he uses Long SMS format. - Fixed bug in sorting in SMS's list. xgnokii-19991228 - Speed Dial settings are possible view and edit. Changes in SMS window: - minor bugfixes - Bussiness Card sending work. But we cannot read received bussiness card! xgnokii-19991216 Changes in Contacts window: - Dial voice function let you to type arbitrary number. - Minor bugfixes in configuration refreshing stuff. Changes in SMS window: - SMS sending work! New SMS dialog look as if is possible to send long SMS but this is only illusion. For now GSM->SendSMSMessage accept only first 160 characters. - New pixmaps. xgnokii-19991207 - replaced 'getenv ("{HOME,HOMEDRIVE,HOMEPATH}")' with 'g_get_home_dir ()', which is (I hope) more portable under MS Windows. - added incoming call notification with stop watch. Changes in SMS window: - corrected GSList handling. (xgnogii have catch sigseg or end in endless loop when SMS's number in phone had changed.) - added delete SMS functionality. - added sorting in SMS's list. xgnokii-19991130 - Added DTMF window. - Added execution of html viewer as help viewer. We need to write nice help pages. :) Changes in Options window: - We can read name, number, format and validity period of SMS centers from phone and also we can edit and save them to phone. Changes in SMS window: - Source completely rewriten. New design. Inbox and outbox in tree hierarchy. If you have initialized contacts in xgnokii, xgnokii is trying to resolve numbers to names. Messages are shown in viewer space. xgnokii-19991116 - Added Net monitor. I thank Andreas Schmidt for idea about graphical representation of Net monitor data. I thank also Norbert Hüttisch (nobbi@nobbi.com) for his great web pages about Nokia Net Monitor. xgnokii-19991110 - Added support for gettext() and messages catalogs. - Added Win32 support. (Acquadro Daniele ) Changes in Contacts window: - Fixed bug when Save to phone haven't work in the case we just import contacts from file and haven't read they from phone before. - Fixed bug when empty contacts in phone have been not cleared when we have import contacts from file and then we have save they into phone. xgnokii-19991010 Changes in Options window: - Added User information edit window (needed for Business Card). - Added SMS settings windows. Xgnokii can only read SMS centers numbers from phone. I can't read SMS set name, SMS format and Validity period from phone. I can't also write any SMS setting in phone. And I don't know differencies between SMS formats. :( - Added Groups names edit window. I can change group names in xgnokii. But I can't read or write group names from/to phone because I don't have support in gnokii. - Added Alarm window. Xgnokii can read alarm from phone and set alarm in phone. It can't unset alarm because lack support in gnokii. Changes in Contacts window: - Added Voice dial function. - Allowed sort order changing by clicking on titles. - Removed bug, when contacts in SIM card were not removed from phone, when deleted in xgnokii. xgnokii-19990915 Changes in Contacts window: - Fixed scrolling. - Fixed SIGSEG error due uninitialized variable. xgnokii-19990914 - Fixed error in FB61_GetMemoryStatus. (FB61_GetMemoryStatus had ignore all error status except GE_TIMEOUT. This break Contacts memory reading for phone with only SIM memory.) I think that Contacts memory reading is working also in 38xx series, but I can't test it. Changes in Contacts window: - Export to file is working. - Import from file is working. Xgnokii uses extended format from NCDS (with group entry) and is capable reading NCDS files. - More icons. xgnokii-19990906 Changes in Contacts window: - Duplicate is working. - Delete accept multiple selection. - 'Change memory type' is working and accept multiple selection. - 'Select all' is working. - Find and 'Find next' is working. - Caller groups are working in xgnokii, but in GSM->WritePhonebookLocation function is something wrong and it don't save caller group to phone. - New toolbar and xgnokii use some new pixmaps from Robert Vojta. Changes in SMS window: - We can get SMS's from phone. (Andri Saar ) xgnokii-19990824 Changes in Contacts window: - Read/Save from/to phone is working. - New, Delete, Edit is working. - Export to file simply dump memory to standart output. - Import, Duplicate, 'Change memory type', 'Sellect all' is not working. xgnokii-19990816 - My first release of xgnokii. - Simple options menu. - Application skeleton and some code cleanup. - Base for contacts window. gnokii-0.6.31/xgnokii/xgnokii_xkeyb.h0000644000175000017500000000174211666163120015702 0ustar leoleo/* $Id$ X G N O K I I A Linux/Unix GUI for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999 Pavel Janík ml., Hugh Blemings & 1999-2005 Jan Derfinak. */ #ifndef XGNOKII_XKEYB_H #define XGNOKII_XKEYB_H extern void GUI_CreateXkeybWindow(); extern void GUI_ShowXkeyb(); #endif gnokii-0.6.31/intltool-extract.in0000644000175000017500000000000011666163203015037 0ustar leoleognokii-0.6.31/aclocal.m40000644000175000017500000032632111666163206013057 0ustar leoleo# generated automatically by aclocal 1.11.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, [m4_warning([this file was generated for autoconf 2.68. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # codeset.m4 serial 4 (gettext-0.18) dnl Copyright (C) 2000-2002, 2006, 2008-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_DEFUN([AM_LANGINFO_CODESET], [ AC_CACHE_CHECK([for nl_langinfo and CODESET], [am_cv_langinfo_codeset], [AC_TRY_LINK([#include ], [char* cs = nl_langinfo(CODESET); return !cs;], [am_cv_langinfo_codeset=yes], [am_cv_langinfo_codeset=no]) ]) if test $am_cv_langinfo_codeset = yes; then AC_DEFINE([HAVE_LANGINFO_CODESET], [1], [Define if you have and nl_langinfo(CODESET).]) fi ]) # Copyright (C) 1995-2002 Free Software Foundation, Inc. # Copyright (C) 2001-2003,2004 Red Hat, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program # that contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU Public License # but which still want to provide support for the GNU gettext functionality. # # Macro to add for using GNU gettext. # Ulrich Drepper , 1995, 1996 # # Modified to never use included libintl. # Owen Taylor , 12/15/1998 # # Major rework to remove unused code # Owen Taylor , 12/11/2002 # # Added better handling of ALL_LINGUAS from GNU gettext version # written by Bruno Haible, Owen Taylor 5/30/3002 # # Modified to require ngettext # Matthias Clasen 08/06/2004 # # We need this here as well, since someone might use autoconf-2.5x # to configure GLib then an older version to configure a package # using AM_GLIB_GNU_GETTEXT AC_PREREQ(2.53) dnl dnl We go to great lengths to make sure that aclocal won't dnl try to pull in the installed version of these macros dnl when running aclocal in the glib directory. dnl m4_copy([AC_DEFUN],[glib_DEFUN]) m4_copy([AC_REQUIRE],[glib_REQUIRE]) dnl dnl At the end, if we're not within glib, we'll define the public dnl definitions in terms of our private definitions. dnl # GLIB_LC_MESSAGES #-------------------- glib_DEFUN([GLIB_LC_MESSAGES], [AC_CHECK_HEADERS([locale.h]) if test $ac_cv_header_locale_h = yes; then AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, [AC_TRY_LINK([#include ], [return LC_MESSAGES], am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) if test $am_cv_val_LC_MESSAGES = yes; then AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your file defines LC_MESSAGES.]) fi fi]) # GLIB_PATH_PROG_WITH_TEST #---------------------------- dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) glib_DEFUN([GLIB_PATH_PROG_WITH_TEST], [# Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL(ac_cv_path_$1, [case "[$]$1" in /*) ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in ifelse([$5], , $PATH, [$5]); do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_PATH_PROGS will keep looking. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then AC_MSG_RESULT([$]$1) else AC_MSG_RESULT(no) fi AC_SUBST($1)dnl ]) # GLIB_WITH_NLS #----------------- glib_DEFUN([GLIB_WITH_NLS], dnl NLS is obligatory [USE_NLS=yes AC_SUBST(USE_NLS) gt_cv_have_gettext=no CATOBJEXT=NONE XGETTEXT=: INTLLIBS= AC_CHECK_HEADER(libintl.h, [gt_cv_func_dgettext_libintl="no" libintl_extra_libs="" # # First check in libc # AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc, [AC_TRY_LINK([ #include ], [return !ngettext ("","", 1)], gt_cv_func_ngettext_libc=yes, gt_cv_func_ngettext_libc=no) ]) if test "$gt_cv_func_ngettext_libc" = "yes" ; then AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc, [AC_TRY_LINK([ #include ], [return !dgettext ("","")], gt_cv_func_dgettext_libc=yes, gt_cv_func_dgettext_libc=no) ]) fi if test "$gt_cv_func_ngettext_libc" = "yes" ; then AC_CHECK_FUNCS(bind_textdomain_codeset) fi # # If we don't have everything we want, check in libintl # if test "$gt_cv_func_dgettext_libc" != "yes" \ || test "$gt_cv_func_ngettext_libc" != "yes" \ || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then AC_CHECK_LIB(intl, bindtextdomain, [AC_CHECK_LIB(intl, ngettext, [AC_CHECK_LIB(intl, dgettext, gt_cv_func_dgettext_libintl=yes)])]) if test "$gt_cv_func_dgettext_libintl" != "yes" ; then AC_MSG_CHECKING([if -liconv is needed to use gettext]) AC_MSG_RESULT([]) AC_CHECK_LIB(intl, ngettext, [AC_CHECK_LIB(intl, dcgettext, [gt_cv_func_dgettext_libintl=yes libintl_extra_libs=-liconv], :,-liconv)], :,-liconv) fi # # If we found libintl, then check in it for bind_textdomain_codeset(); # we'll prefer libc if neither have bind_textdomain_codeset(), # and both have dgettext and ngettext # if test "$gt_cv_func_dgettext_libintl" = "yes" ; then glib_save_LIBS="$LIBS" LIBS="$LIBS -lintl $libintl_extra_libs" unset ac_cv_func_bind_textdomain_codeset AC_CHECK_FUNCS(bind_textdomain_codeset) LIBS="$glib_save_LIBS" if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then gt_cv_func_dgettext_libc=no else if test "$gt_cv_func_dgettext_libc" = "yes" \ && test "$gt_cv_func_ngettext_libc" = "yes"; then gt_cv_func_dgettext_libintl=no fi fi fi fi if test "$gt_cv_func_dgettext_libc" = "yes" \ || test "$gt_cv_func_dgettext_libintl" = "yes"; then gt_cv_have_gettext=yes fi if test "$gt_cv_func_dgettext_libintl" = "yes"; then INTLLIBS="-lintl $libintl_extra_libs" fi if test "$gt_cv_have_gettext" = "yes"; then AC_DEFINE(HAVE_GETTEXT,1, [Define if the GNU gettext() function is already present or preinstalled.]) GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl if test "$MSGFMT" != "no"; then glib_save_LIBS="$LIBS" LIBS="$LIBS $INTLLIBS" AC_CHECK_FUNCS(dcgettext) MSGFMT_OPTS= AC_MSG_CHECKING([if msgfmt accepts -c]) GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[ msgid "" msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Project-Id-Version: test 1.0\n" "PO-Revision-Date: 2007-02-15 12:01+0100\n" "Last-Translator: test \n" "Language-Team: C \n" "MIME-Version: 1.0\n" "Content-Transfer-Encoding: 8bit\n" ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])]) AC_SUBST(MSGFMT_OPTS) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr], [CATOBJEXT=.gmo DATADIRNAME=share], [case $host in *-*-solaris*) dnl On Solaris, if bind_textdomain_codeset is in libc, dnl GNU format message catalog is always supported, dnl since both are added to the libc all together. dnl Hence, we'd like to go with DATADIRNAME=share and dnl and CATOBJEXT=.gmo in this case. AC_CHECK_FUNC(bind_textdomain_codeset, [CATOBJEXT=.gmo DATADIRNAME=share], [CATOBJEXT=.mo DATADIRNAME=lib]) ;; *) CATOBJEXT=.mo DATADIRNAME=lib ;; esac]) LIBS="$glib_save_LIBS" INSTOBJEXT=.mo else gt_cv_have_gettext=no fi fi ]) if test "$gt_cv_have_gettext" = "yes" ; then AC_DEFINE(ENABLE_NLS, 1, [always defined to indicate that i18n is enabled]) fi dnl Test whether we really found GNU xgettext. if test "$XGETTEXT" != ":"; then dnl If it is not GNU xgettext we define it as : so that the dnl Makefiles still can work. if $XGETTEXT --omit-header /dev/null 2> /dev/null; then : ; else AC_MSG_RESULT( [found xgettext program is not GNU xgettext; ignore it]) XGETTEXT=":" fi fi # We need to process the po/ directory. POSUB=po AC_OUTPUT_COMMANDS( [case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile esac]) dnl These rules are solely for the distribution goal. While doing this dnl we only have to keep exactly one list of the available catalogs dnl in configure.ac. for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" done dnl Make all variables we use known to autoconf. AC_SUBST(CATALOGS) AC_SUBST(CATOBJEXT) AC_SUBST(DATADIRNAME) AC_SUBST(GMOFILES) AC_SUBST(INSTOBJEXT) AC_SUBST(INTLLIBS) AC_SUBST(PO_IN_DATADIR_TRUE) AC_SUBST(PO_IN_DATADIR_FALSE) AC_SUBST(POFILES) AC_SUBST(POSUB) ]) # AM_GLIB_GNU_GETTEXT # ------------------- # Do checks necessary for use of gettext. If a suitable implementation # of gettext is found in either in libintl or in the C library, # it will set INTLLIBS to the libraries needed for use of gettext # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST() # on various variables needed by the Makefile.in.in installed by # glib-gettextize. dnl glib_DEFUN([GLIB_GNU_GETTEXT], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_HEADER_STDC])dnl GLIB_LC_MESSAGES GLIB_WITH_NLS if test "$gt_cv_have_gettext" = "yes"; then if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else AC_MSG_CHECKING(for catalogs to be installed) NEW_LINGUAS= for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then NEW_LINGUAS="$NEW_LINGUAS $presentlang" fi done LINGUAS=$NEW_LINGUAS AC_MSG_RESULT($LINGUAS) fi dnl Construct list of names of catalog files to be constructed. if test -n "$LINGUAS"; then for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done fi fi dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly dnl find the mkinstalldirs script in another subdir but ($top_srcdir). dnl Try to locate is. MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi AC_SUBST(MKINSTALLDIRS) dnl Generate list of files to be processed by xgettext which will dnl be included in po/Makefile. test -d po || mkdir po if test "x$srcdir" != "x."; then if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then posrcprefix="$srcdir/" else posrcprefix="../$srcdir/" fi else posrcprefix="../" fi rm -f po/POTFILES sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ < $srcdir/po/POTFILES.in > po/POTFILES ]) # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE) # ------------------------------- # Define VARIABLE to the location where catalog files will # be installed by po/Makefile. glib_DEFUN([GLIB_DEFINE_LOCALEDIR], [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl glib_save_prefix="$prefix" glib_save_exec_prefix="$exec_prefix" glib_save_datarootdir="$datarootdir" test "x$prefix" = xNONE && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix=$prefix datarootdir=`eval echo "${datarootdir}"` if test "x$CATOBJEXT" = "x.mo" ; then localedir=`eval echo "${libdir}/locale"` else localedir=`eval echo "${datadir}/locale"` fi prefix="$glib_save_prefix" exec_prefix="$glib_save_exec_prefix" datarootdir="$glib_save_datarootdir" AC_DEFINE_UNQUOTED($1, "$localedir", [Define the location where the catalogs will be installed]) ]) dnl dnl Now the definitions that aclocal will find dnl ifdef(glib_configure_ac,[],[ AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)]) AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)]) ])dnl # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL]) # # Create a temporary file with TEST-FILE as its contents and pass the # file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with # 0 and perform ACTION-IF-FAIL for any other exit status. AC_DEFUN([GLIB_RUN_PROG], [cat >conftest.foo <<_ACEOF $2 _ACEOF if AC_RUN_LOG([$1 conftest.foo]); then m4_ifval([$3], [$3], [:]) m4_ifvaln([$4], [else $4])dnl echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD fi]) # iconv.m4 serial 11 (gettext-0.18.1) dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], [ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_LIB_LINKFLAGS_BODY([iconv]) ]) AC_DEFUN([AM_ICONV_LINK], [ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and dnl those with the standalone portable GNU libiconv installed). AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) dnl Add $INCICONV to CPPFLAGS before performing the following checks, dnl because if the user has installed libiconv and not disabled its use dnl via --without-libiconv-prefix, he wants to use it. The first dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. am_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [ am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no AC_TRY_LINK([#include #include ], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], [am_cv_func_iconv=yes]) if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" AC_TRY_LINK([#include #include ], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], [am_cv_lib_iconv=yes] [am_cv_func_iconv=yes]) LIBS="$am_save_LIBS" fi ]) if test "$am_cv_func_iconv" = yes; then AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10. am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi AC_TRY_RUN([ #include #include int main () { /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static const char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) return 1; } } /* Test against Solaris 10 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); if (cd_ascii_to_88591 != (iconv_t)(-1)) { static const char input[] = "\263"; char buf[10]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_ascii_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) return 1; } } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) return 1; } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ if (/* Try standardized names. */ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) /* Try IRIX, OSF/1 names. */ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) /* Try AIX names. */ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) /* Try HP-UX names. */ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) return 1; return 0; }], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no], [case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac]) LIBS="$am_save_LIBS" ]) case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then AC_DEFINE([HAVE_ICONV], [1], [Define if you have the iconv() function and it works.]) fi if test "$am_cv_lib_iconv" = yes; then AC_MSG_CHECKING([how to link with libiconv]) AC_MSG_RESULT([$LIBICONV]) else dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV dnl either. CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi AC_SUBST([LIBICONV]) AC_SUBST([LTLIBICONV]) ]) dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to dnl avoid warnings like dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". dnl This is tricky because of the way 'aclocal' is implemented: dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN. dnl Otherwise aclocal's initial scan pass would miss the macro definition. dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions. dnl Otherwise aclocal would emit many "Use of uninitialized value $1" dnl warnings. m4_define([gl_iconv_AC_DEFUN], m4_version_prereq([2.64], [[AC_DEFUN_ONCE( [$1], [$2])]], [[AC_DEFUN( [$1], [$2])]])) gl_iconv_AC_DEFUN([AM_ICONV], [ AM_ICONV_LINK if test "$am_cv_func_iconv" = yes; then AC_MSG_CHECKING([for iconv declaration]) AC_CACHE_VAL([am_cv_proto_iconv], [ AC_TRY_COMPILE([ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif ], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"]) am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` AC_MSG_RESULT([ $am_cv_proto_iconv]) AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], [Define as const if the declaration of iconv() needs const.]) fi ]) # lib-ld.m4 serial 4 (gettext-0.18) dnl Copyright (C) 1996-2003, 2009-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Subroutines of libtool.m4, dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision dnl with libtool.m4. dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. AC_DEFUN([AC_LIB_PROG_LD_GNU], [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld], [# I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by GCC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]* | [A-Za-z]:[\\/]*)] [re_direlt='/[^/][^/]*/\.\./'] # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL([acl_cv_path_LD], [if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) test "$with_gnu_ld" != no && break ;; *) test "$with_gnu_ld" != yes && break ;; esac fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi]) LD="$acl_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT([$LD]) else AC_MSG_RESULT([no]) fi test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) AC_LIB_PROG_LD_GNU ]) # lib-link.m4 serial 21 (gettext-0.18) dnl Copyright (C) 2001-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_PREREQ([2.54]) dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and dnl augments the CPPFLAGS variable. dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) pushdef([Name],[translit([$1],[./-], [___])]) pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ AC_LIB_LINKFLAGS_BODY([$1], [$2]) ac_cv_lib[]Name[]_libs="$LIB[]NAME" ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" ac_cv_lib[]Name[]_cppflags="$INC[]NAME" ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX" ]) LIB[]NAME="$ac_cv_lib[]Name[]_libs" LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" INC[]NAME="$ac_cv_lib[]Name[]_cppflags" LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) AC_SUBST([LIB]NAME[_PREFIX]) dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the dnl results of this search when this library appears as a dependency. HAVE_LIB[]NAME=yes popdef([NAME]) popdef([Name]) ]) dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message]) dnl searches for libname and the libraries corresponding to explicit and dnl implicit dependencies, together with the specified include files and dnl the ability to compile and link the specified testcode. The missing-message dnl defaults to 'no' and may contain additional hints for the user. dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) pushdef([Name],[translit([$1],[./-], [___])]) pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME dnl accordingly. AC_LIB_LINKFLAGS_BODY([$1], [$2]) dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, dnl because if the user has installed lib[]Name and not disabled its use dnl via --without-lib[]Name-prefix, he wants to use it. ac_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ ac_save_LIBS="$LIBS" dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS, dnl because these -l options might require -L options that are present in dnl LIBS. -l options benefit only from the -L options listed before it. dnl Otherwise, add it to the front of LIBS, because it may be a static dnl library that depends on another static library that is present in LIBS. dnl Static libraries benefit only from the static libraries listed after dnl it. case " $LIB[]NAME" in *" -l"*) LIBS="$LIBS $LIB[]NAME" ;; *) LIBS="$LIB[]NAME $LIBS" ;; esac AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])']) LIBS="$ac_save_LIBS" ]) if test "$ac_cv_lib[]Name" = yes; then HAVE_LIB[]NAME=yes AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.]) AC_MSG_CHECKING([how to link with lib[]$1]) AC_MSG_RESULT([$LIB[]NAME]) else HAVE_LIB[]NAME=no dnl If $LIB[]NAME didn't lead to a usable library, we don't need dnl $INC[]NAME either. CPPFLAGS="$ac_save_CPPFLAGS" LIB[]NAME= LTLIB[]NAME= LIB[]NAME[]_PREFIX= fi AC_SUBST([HAVE_LIB]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) AC_SUBST([LIB]NAME[_PREFIX]) popdef([NAME]) popdef([Name]) ]) dnl Determine the platform dependent parameters needed to use rpath: dnl acl_libext, dnl acl_shlibext, dnl acl_hardcode_libdir_flag_spec, dnl acl_hardcode_libdir_separator, dnl acl_hardcode_direct, dnl acl_hardcode_minus_L. AC_DEFUN([AC_LIB_RPATH], [ dnl Tell automake >= 1.10 to complain if config.rpath is missing. m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done ]) wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" dnl Determine whether the user wants rpath handling at all. AC_ARG_ENABLE([rpath], [ --disable-rpath do not hardcode runtime library paths], :, enable_rpath=yes) ]) dnl AC_LIB_FROMPACKAGE(name, package) dnl declares that libname comes from the given package. The configure file dnl will then not have a --with-libname-prefix option but a dnl --with-package-prefix option. Several libraries can come from the same dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar dnl macro call that searches for libname. AC_DEFUN([AC_LIB_FROMPACKAGE], [ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) define([acl_frompackage_]NAME, [$2]) popdef([NAME]) pushdef([PACK],[$2]) pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) define([acl_libsinpackage_]PACKUP, m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1]) popdef([PACKUP]) popdef([PACK]) ]) dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_LINKFLAGS_BODY], [ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) dnl Autoconf >= 2.61 supports dots in --with options. pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_ARG_WITH(P_A_C_K[-prefix], [[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" if test "$acl_libdirstem2" != "$acl_libdirstem" \ && ! test -d "$withval/$acl_libdirstem"; then additional_libdir="$withval/$acl_libdirstem2" fi fi fi ]) dnl Search the library and its dependencies in $additional_libdir and dnl $LDFLAGS. Using breadth-first-seach. LIB[]NAME= LTLIB[]NAME= INC[]NAME= LIB[]NAME[]_PREFIX= dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been dnl computed. So it has to be reset here. HAVE_LIB[]NAME= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='$1 $2' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" dnl See if it was already located by an earlier AC_LIB_LINKFLAGS dnl or AC_LIB_HAVE_LINKFLAGS call. uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" else dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined dnl that this library doesn't exist. So just drop it. : fi else dnl Search the library lib$name in $additional_libdir and $LDFLAGS dnl and the already constructed $LIBNAME/$LTLIBNAME. found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" dnl The same code as in the loop below: dnl First look for a shared library. if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi dnl Then look for a static library. if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` dnl First look for a shared library. if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi dnl Then look for a static library. if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then dnl Found the library. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then dnl Linking with a shared library. We attempt to hardcode its dnl directory into the executable's runpath, unless it's the dnl standard /usr/lib. if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then dnl No hardcoding is needed. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl Use an explicit option to hardcode DIR into the resulting dnl binary. dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi dnl The hardcoding into $LIBNAME is system dependent. if test "$acl_hardcode_direct" = yes; then dnl Using DIR/libNAME.so during linking hardcodes DIR into the dnl resulting binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then dnl Use an explicit option to hardcode DIR into the resulting dnl binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else dnl Rely on "-L$found_dir". dnl But don't add it if it's already contained in the LDFLAGS dnl or the already constructed $LIBNAME haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH dnl here, because this doesn't fit in flags passed to the dnl compiler. So give up. No hardcoding. This affects only dnl very old systems. dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then dnl Linking with a static library. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" else dnl We shouldn't come here, but anyway it's good to have a dnl fallback. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" fi fi dnl Assume the include files are nearby. additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` if test "$name" = '$1'; then LIB[]NAME[]_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem2 | */$acl_libdirstem2/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` if test "$name" = '$1'; then LIB[]NAME[]_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then dnl Potentially add $additional_includedir to $INCNAME. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's /usr/local/include and we are using GCC on Linux, dnl 3. if it's already present in $CPPFLAGS or the already dnl constructed $INCNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INC[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $INCNAME. INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" fi fi fi fi fi dnl Look for dependencies. if test -n "$found_la"; then dnl Read the .la file. It defines the variables dnl dlname, library_names, old_library, dependency_libs, current, dnl age, revision, installed, dlopen, dlpreopen, libdir. save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" dnl We use only dependency_libs. for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's /usr/local/lib and we are using GCC on Linux, dnl 3. if it's already present in $LDFLAGS or the already dnl constructed $LIBNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LIBNAME. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LTLIBNAME. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) dnl Handle this in the next round. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) dnl Handle this in the next round. Throw away the .la's dnl directory; it is already contained in a preceding -L dnl option. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) dnl Most likely an immediate library name. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" ;; esac done fi else dnl Didn't find the library; assume it is in the system directories dnl known to the linker and runtime loader. (All the system dnl directories known to the linker should also be known to the dnl runtime loader, otherwise the system is severely misconfigured.) LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user must dnl pass all path elements in one option. We can arrange that for a dnl single library, but not when more than one $LIBNAMEs are used. alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" else dnl The -rpath options are cumulative. for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then dnl When using libtool, the option that works for both libraries and dnl executables is -R. The -R options are cumulative. for found_dir in $ltrpathdirs; do LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" done fi popdef([P_A_C_K]) popdef([PACKLIBS]) popdef([PACKUP]) popdef([PACK]) popdef([NAME]) ]) dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, dnl unless already present in VAR. dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes dnl contains two or three consecutive elements that belong together. AC_DEFUN([AC_LIB_APPENDTOVAR], [ for element in [$2]; do haveit= for x in $[$1]; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then [$1]="${[$1]}${[$1]:+ }$element" fi done ]) dnl For those cases where a variable contains several -L and -l options dnl referring to unknown libraries and directories, this macro determines the dnl necessary additional linker options for the runtime path. dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) dnl sets LDADDVAR to linker options needed together with LIBSVALUE. dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, dnl otherwise linking without libtool is assumed. AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], [ AC_REQUIRE([AC_LIB_RPATH]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) $1= if test "$enable_rpath" != no; then if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then dnl Use an explicit option to hardcode directories into the resulting dnl binary. rpathdirs= next= for opt in $2; do if test -n "$next"; then dir="$next" dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem" \ && test "X$dir" != "X/usr/$acl_libdirstem2"; then rpathdirs="$rpathdirs $dir" fi next= else case $opt in -L) next=yes ;; -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem" \ && test "X$dir" != "X/usr/$acl_libdirstem2"; then rpathdirs="$rpathdirs $dir" fi next= ;; *) next= ;; esac fi done if test "X$rpathdirs" != "X"; then if test -n ""$3""; then dnl libtool is used for linking. Use -R options. for dir in $rpathdirs; do $1="${$1}${$1:+ }-R$dir" done else dnl The linker is used for linking directly. if test -n "$acl_hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user dnl must pass all path elements in one option. alldirs= for dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="$flag" else dnl The -rpath options are cumulative. for dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="${$1}${$1:+ }$flag" done fi fi fi fi fi AC_SUBST([$1]) ]) # lib-prefix.m4 serial 7 (gettext-0.18) dnl Copyright (C) 2001-2005, 2008-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't dnl require excessive bracketing. ifdef([AC_HELP_STRING], [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed dnl to access previously installed libraries. The basic assumption is that dnl a user will want packages to use other packages he previously installed dnl with the same --prefix option. dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate dnl libraries, but is otherwise very convenient. AC_DEFUN([AC_LIB_PREFIX], [ AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_LIB_ARG_WITH([lib-prefix], [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib --without-lib-prefix don't search for libraries in includedir and libdir], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi ]) if test $use_additional = yes; then dnl Potentially add $additional_includedir to $CPPFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's already present in $CPPFLAGS, dnl 3. if it's /usr/local/include and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= for x in $CPPFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $CPPFLAGS. CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" fi fi fi fi dnl Potentially add $additional_libdir to $LDFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's already present in $LDFLAGS, dnl 3. if it's /usr/local/lib and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= for x in $LDFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LDFLAGS. LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" fi fi fi fi fi ]) dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, dnl acl_final_exec_prefix, containing the values to which $prefix and dnl $exec_prefix will expand at the end of the configure script. AC_DEFUN([AC_LIB_PREPARE_PREFIX], [ dnl Unfortunately, prefix and exec_prefix get only finally determined dnl at the end of configure. if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" ]) dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the dnl variables prefix and exec_prefix bound to the values they will have dnl at the end of the configure script. AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], [ acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" $1 exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" ]) dnl AC_LIB_PREPARE_MULTILIB creates dnl - a variable acl_libdirstem, containing the basename of the libdir, either dnl "lib" or "lib64" or "lib/64", dnl - a variable acl_libdirstem2, as a secondary possible value for dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or dnl "lib/amd64". AC_DEFUN([AC_LIB_PREPARE_MULTILIB], [ dnl There is no formal standard regarding lib and lib64. dnl On glibc systems, the current practice is that on a system supporting dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine dnl the compiler's default mode by looking at the compiler's library search dnl path. If at least one of its elements ends in /lib64 or points to a dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI. dnl Otherwise we use the default, namely "lib". dnl On Solaris systems, the current practice is that on a system supporting dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. AC_REQUIRE([AC_CANONICAL_HOST]) acl_libdirstem=lib acl_libdirstem2= case "$host_os" in solaris*) dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment dnl . dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the dnl symlink is missing, so we set acl_libdirstem2 too. AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], [AC_EGREP_CPP([sixtyfour bits], [ #ifdef _LP64 sixtyfour bits #endif ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) ]) if test $gl_cv_solaris_64bit = yes; then acl_libdirstem=lib/64 case "$host_cpu" in sparc*) acl_libdirstem2=lib/sparcv9 ;; i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; esac fi ;; *) searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; */../ | */.. ) # Better ignore directories of this form. They are misleading. ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi ;; esac test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" ]) # nls.m4 serial 5 (gettext-0.18) dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2003. AC_PREREQ([2.50]) AC_DEFUN([AM_NLS], [ AC_MSG_CHECKING([whether NLS is requested]) dnl Default is enabled NLS AC_ARG_ENABLE([nls], [ --disable-nls do not use Native Language Support], USE_NLS=$enableval, USE_NLS=yes) AC_MSG_RESULT([$USE_NLS]) AC_SUBST([USE_NLS]) ]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # 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. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) # only at the first occurence in configure.ac, so if the first place # it's called might be skipped (such as if it is within an "if", you # have to call PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])# PKG_CHECK_MODULES # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file 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. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file 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. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file 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. # serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 # Free Software Foundation, Inc. # # This file 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. # serial 10 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file 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. #serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file 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. # serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file 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. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file 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. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. # # This file 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. # serial 4 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file 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. # serial 6 # AM_PROG_CC_C_O # -------------- # Like AC_PROG_CC_C_O, but changed for automake. AC_DEFUN([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC_C_O])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o if test "$am_t" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi dnl Make sure AC_PROG_CC is never called again, or it will override our dnl setting of CC. m4_define([AC_PROG_CC], [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file 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. # serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file 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. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file 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. # serial 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file 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. # serial 5 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file 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. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008 Free Software Foundation, Inc. # # This file 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. # serial 2 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file 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. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/ac_expand_dir.m4]) m4_include([m4/acx_pthread.m4]) m4_include([m4/intltool.m4]) m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) gnokii-0.6.31/common/0000755000175000017500000000000011666163462012504 5ustar leoleognokii-0.6.31/common/Makefile.am0000644000175000017500000000247411666163120014536 0ustar leoleoDEFS = -DLOCALEDIR=\"$(localedir)\" -DCOMPILING_LIBGNOKII if WIN32 DATA_DIR = else DATA_DIR = data endif lib_LTLIBRARIES = libgnokii.la SUBDIRS = phones \ links \ devices \ $(DATA_DIR) LIBS += $(LIBPCSCLITE_LIBS) $(GLIB_LIBS) pkgconfig_DATA = gnokii.pc pkgconfigdir = $(libdir)/pkgconfig libgnokii_la_CPPFLAGS = -DLIBDIR="\"$(libdir)\"" libgnokii_la_CFLAGS = -I$(top_srcdir)/include $(GLIB_CFLAGS) \ $(ICAL_CFLAGS) libgnokii_la_SOURCES = \ libfunctions.c \ gsm-api.c \ gsm-error.c \ gsm-statemachine.c \ cfgreader.c \ device.c \ vcard.c \ vcal.c \ gnvcal.c \ ldif.c \ gsm-networks.c \ gsm-filetypes.c \ readmidi.c \ gsm-ringtones.c \ gsm-bitmaps.c \ gsm-sms.c \ gsm-mms.c \ gsm-call.c \ gsm-encoding.c \ gsm-common.c \ sms-nokia.c \ nokia-decoding.c \ pkt.c \ compat.c \ misc.c \ snprintf.c \ localcharset.c \ map.c libgnokii_la_LIBADD = \ $(top_builddir)/common/phones/libPHONES.la \ $(top_builddir)/common/links/libLINKS.la \ $(top_builddir)/common/devices/libDEVICES.la \ $(XPM_LIBS) \ $(LTLIBICONV) \ $(INTLLIBS) \ $(BLUETOOTH_LIBS) \ $(USB_LIBS) \ $(TCP_LIBS) \ $(ICAL_LIBS) libgnokii_la_LDFLAGS = \ -version-info $(GNOKII_LT_VERSION) \ -no-undefined gnvcal.c: vcal.lx $(LEX) -ognvcal.c '$(srcdir)/vcal.lx' CLEANFILES = gnvcal.c EXTRA_DIST = gnokii.pc.in gnvcal.c vcal.lx gnokii-0.6.31/common/localcharset.c0000644000175000017500000003031611666163120015306 0ustar leoleo/* Determine a canonical name for the current locale's character encoding. Copyright (C) 2000-2006 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. 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. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Bruno Haible . */ #include /* Specification. */ #include "localcharset.h" #include #include #include #include #if defined _WIN32 || defined __WIN32__ # define WIN32_NATIVE #endif #if defined __EMX__ /* Assume EMX program runs on OS/2, even if compiled under DOS. */ # define OS2 #endif #if !defined WIN32_NATIVE # if HAVE_LANGINFO_CODESET # include # else # if 0 /* see comment below */ # include # endif # endif # ifdef __CYGWIN__ # define WIN32_LEAN_AND_MEAN # include # endif #elif defined WIN32_NATIVE # define WIN32_LEAN_AND_MEAN # include #endif #if defined OS2 # define INCL_DOS # include #endif #if ENABLE_RELOCATABLE # include "relocatable.h" #else # define relocate(pathname) (pathname) #endif /* Get LIBDIR. */ #ifndef LIBDIR //# include "configmake.h" #endif #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ /* Win32, Cygwin, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') #endif #ifndef DIRECTORY_SEPARATOR # define DIRECTORY_SEPARATOR '/' #endif #ifndef ISSLASH # define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR) #endif #if HAVE_DECL_GETC_UNLOCKED # undef getc # define getc getc_unlocked #endif /* The following static variable is declared 'volatile' to avoid a possible multithread problem in the function get_charset_aliases. If we are running in a threaded environment, and if two threads initialize 'charset_aliases' simultaneously, both will produce the same value, and everything will be ok if the two assignments to 'charset_aliases' are atomic. But I don't know what will happen if the two assignments mix. */ #if __STDC__ != 1 # define volatile /* empty */ #endif /* Pointer to the contents of the charset.alias file, if it has already been read, else NULL. Its format is: ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0' */ static const char * volatile charset_aliases; /* Return a pointer to the contents of the charset.alias file. */ static const char * get_charset_aliases (void) { const char *cp; cp = charset_aliases; if (cp == NULL) { #if !(defined VMS || defined WIN32_NATIVE || defined __CYGWIN__) FILE *fp; const char *dir; const char *base = "charset.alias"; char *file_name; /* Make it possible to override the charset.alias location. This is necessary for running the testsuite before "make install". */ dir = getenv ("CHARSETALIASDIR"); if (dir == NULL || dir[0] == '\0') dir = relocate (LIBDIR); /* Concatenate dir and base into freshly allocated file_name. */ { size_t dir_len = strlen (dir); size_t base_len = strlen (base); int add_slash = (dir_len > 0 && !ISSLASH (dir[dir_len - 1])); file_name = (char *) malloc (dir_len + add_slash + base_len + 1); if (file_name != NULL) { memcpy (file_name, dir, dir_len); if (add_slash) file_name[dir_len] = DIRECTORY_SEPARATOR; memcpy (file_name + dir_len + add_slash, base, base_len + 1); } } if (file_name == NULL || (fp = fopen (file_name, "r")) == NULL) /* Out of memory or file not found, treat it as empty. */ cp = ""; else { /* Parse the file's contents. */ char *res_ptr = NULL; size_t res_size = 0; for (;;) { int c; char buf1[50+1]; char buf2[50+1]; size_t l1, l2; char *old_res_ptr; c = getc (fp); if (c == EOF) break; if (c == '\n' || c == ' ' || c == '\t') continue; if (c == '#') { /* Skip comment, to end of line. */ do c = getc (fp); while (!(c == EOF || c == '\n')); if (c == EOF) break; continue; } ungetc (c, fp); if (fscanf (fp, "%50s %50s", buf1, buf2) < 2) break; l1 = strlen (buf1); l2 = strlen (buf2); old_res_ptr = res_ptr; if (res_size == 0) { res_size = l1 + 1 + l2 + 1; res_ptr = (char *) malloc (res_size + 1); } else { res_size += l1 + 1 + l2 + 1; res_ptr = (char *) realloc (res_ptr, res_size + 1); } if (res_ptr == NULL) { /* Out of memory. */ res_size = 0; if (old_res_ptr != NULL) free (old_res_ptr); break; } strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1); strcpy (res_ptr + res_size - (l2 + 1), buf2); } fclose (fp); if (res_size == 0) cp = ""; else { *(res_ptr + res_size) = '\0'; cp = res_ptr; } } if (file_name != NULL) free (file_name); #else # if defined VMS /* To avoid the troubles of an extra file charset.alias_vms in the sources of many GNU packages, simply inline the aliases here. */ /* The list of encodings is taken from the OpenVMS 7.3-1 documentation "Compaq C Run-Time Library Reference Manual for OpenVMS systems" section 10.7 "Handling Different Character Sets". */ cp = "ISO8859-1" "\0" "ISO-8859-1" "\0" "ISO8859-2" "\0" "ISO-8859-2" "\0" "ISO8859-5" "\0" "ISO-8859-5" "\0" "ISO8859-7" "\0" "ISO-8859-7" "\0" "ISO8859-8" "\0" "ISO-8859-8" "\0" "ISO8859-9" "\0" "ISO-8859-9" "\0" /* Japanese */ "eucJP" "\0" "EUC-JP" "\0" "SJIS" "\0" "SHIFT_JIS" "\0" "DECKANJI" "\0" "DEC-KANJI" "\0" "SDECKANJI" "\0" "EUC-JP" "\0" /* Chinese */ "eucTW" "\0" "EUC-TW" "\0" "DECHANYU" "\0" "DEC-HANYU" "\0" "DECHANZI" "\0" "GB2312" "\0" /* Korean */ "DECKOREAN" "\0" "EUC-KR" "\0"; # endif # if defined WIN32_NATIVE || defined __CYGWIN__ /* To avoid the troubles of installing a separate file in the same directory as the DLL and of retrieving the DLL's directory at runtime, simply inline the aliases here. */ cp = "CP936" "\0" "GBK" "\0" "CP1361" "\0" "JOHAB" "\0" "CP20127" "\0" "ASCII" "\0" "CP20866" "\0" "KOI8-R" "\0" "CP20936" "\0" "GB2312" "\0" "CP21866" "\0" "KOI8-RU" "\0" "CP28591" "\0" "ISO-8859-1" "\0" "CP28592" "\0" "ISO-8859-2" "\0" "CP28593" "\0" "ISO-8859-3" "\0" "CP28594" "\0" "ISO-8859-4" "\0" "CP28595" "\0" "ISO-8859-5" "\0" "CP28596" "\0" "ISO-8859-6" "\0" "CP28597" "\0" "ISO-8859-7" "\0" "CP28598" "\0" "ISO-8859-8" "\0" "CP28599" "\0" "ISO-8859-9" "\0" "CP28605" "\0" "ISO-8859-15" "\0" "CP38598" "\0" "ISO-8859-8" "\0" "CP51932" "\0" "EUC-JP" "\0" "CP51936" "\0" "GB2312" "\0" "CP51949" "\0" "EUC-KR" "\0" "CP51950" "\0" "EUC-TW" "\0" "CP54936" "\0" "GB18030" "\0" "CP65001" "\0" "UTF-8" "\0"; # endif #endif charset_aliases = cp; } return cp; } /* Determine the current locale's character encoding, and canonicalize it into one of the canonical names listed in config.charset. The result must not be freed; it is statically allocated. If the canonical name cannot be determined, the result is a non-canonical name. */ #ifdef STATIC STATIC #endif const char * locale_charset (void) { const char *codeset; const char *aliases; #if !(defined WIN32_NATIVE || defined OS2) # if HAVE_LANGINFO_CODESET /* Most systems support nl_langinfo (CODESET) nowadays. */ codeset = nl_langinfo (CODESET); # ifdef __CYGWIN__ /* Cygwin 2006 does not have locales. nl_langinfo (CODESET) always returns "US-ASCII". As long as this is not fixed, return the suffix of the locale name from the environment variables (if present) or the codepage as a number. */ if (codeset != NULL && strcmp (codeset, "US-ASCII") == 0) { const char *locale; static char buf[2 + 10 + 1]; locale = getenv ("LC_ALL"); if (locale == NULL || locale[0] == '\0') { locale = getenv ("LC_CTYPE"); if (locale == NULL || locale[0] == '\0') locale = getenv ("LANG"); } if (locale != NULL && locale[0] != '\0') { /* If the locale name contains an encoding after the dot, return it. */ const char *dot = strchr (locale, '.'); if (dot != NULL) { const char *modifier; dot++; /* Look for the possible @... trailer and remove it, if any. */ modifier = strchr (dot, '@'); if (modifier == NULL) return dot; if (modifier - dot < sizeof (buf)) { memcpy (buf, dot, modifier - dot); buf [modifier - dot] = '\0'; return buf; } } } /* Woe32 has a function returning the locale's codepage as a number. */ sprintf (buf, "CP%u", GetACP ()); codeset = buf; } # endif # else /* On old systems which lack it, use setlocale or getenv. */ const char *locale = NULL; /* But most old systems don't have a complete set of locales. Some (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't use setlocale here; it would return "C" when it doesn't support the locale name the user has set. */ # if 0 locale = setlocale (LC_CTYPE, NULL); # endif if (locale == NULL || locale[0] == '\0') { locale = getenv ("LC_ALL"); if (locale == NULL || locale[0] == '\0') { locale = getenv ("LC_CTYPE"); if (locale == NULL || locale[0] == '\0') locale = getenv ("LANG"); } } /* On some old systems, one used to set locale = "iso8859_1". On others, you set it to "language_COUNTRY.charset". In any case, we resolve it through the charset.alias file. */ codeset = locale; # endif #elif defined WIN32_NATIVE static char buf[2 + 10 + 1]; /* Woe32 has a function returning the locale's codepage as a number. */ sprintf (buf, "CP%u", GetACP ()); codeset = buf; #elif defined OS2 const char *locale; static char buf[2 + 10 + 1]; ULONG cp[3]; ULONG cplen; /* Allow user to override the codeset, as set in the operating system, with standard language environment variables. */ locale = getenv ("LC_ALL"); if (locale == NULL || locale[0] == '\0') { locale = getenv ("LC_CTYPE"); if (locale == NULL || locale[0] == '\0') locale = getenv ("LANG"); } if (locale != NULL && locale[0] != '\0') { /* If the locale name contains an encoding after the dot, return it. */ const char *dot = strchr (locale, '.'); if (dot != NULL) { const char *modifier; dot++; /* Look for the possible @... trailer and remove it, if any. */ modifier = strchr (dot, '@'); if (modifier == NULL) return dot; if (modifier - dot < sizeof (buf)) { memcpy (buf, dot, modifier - dot); buf [modifier - dot] = '\0'; return buf; } } /* Resolve through the charset.alias file. */ codeset = locale; } else { /* OS/2 has a function returning the locale's codepage as a number. */ if (DosQueryCp (sizeof (cp), cp, &cplen)) codeset = ""; else { sprintf (buf, "CP%u", cp[0]); codeset = buf; } } #endif if (codeset == NULL) /* The canonical name cannot be determined. */ codeset = ""; /* Resolve alias. */ for (aliases = get_charset_aliases (); *aliases != '\0'; aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1) if (strcmp (codeset, aliases) == 0 || (aliases[0] == '*' && aliases[1] == '\0')) { codeset = aliases + strlen (aliases) + 1; break; } /* Don't return an empty string. GNU libc and GNU libiconv interpret the empty string as denoting "the locale's character encoding", thus GNU libiconv would call this function a second time. */ if (codeset[0] == '\0') codeset = "ASCII"; return codeset; } gnokii-0.6.31/common/gsm-common.c0000644000175000017500000004760611666163120014730 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 2001-2004 Pawel Kot Copyright (C) 2001 Chris Kemp, Pavel Machek Copyright (C) 2002-2004 BORBELY Zoltan */ #include "config.h" #include #include "compat.h" #include "gnokii.h" gn_error unimplemented(void) { return GN_ERR_NOTIMPLEMENTED; } GNOKII_API gn_memory_type gn_str2memory_type(const char *s) { if (!s) return GN_MT_XX; #define X(a) if (!strcmp(s, #a)) return GN_MT_##a; X(ME); X(SM); X(FD); X(ON); X(EN); X(DC); X(RC); X(MC); X(LD); X(BD); X(SD); X(MT); X(TA); X(CB); X(IN); X(OU); X(AR); X(TE); X(SR); X(DR); X(OUS); X(F1); X(F2); X(F3); X(F4); X(F5); X(F6); X(F7); X(F8); X(F9); X(F10); X(F11); X(F12); X(F13); X(F14); X(F15); X(F16); X(F17); X(F18); X(F19); X(F20); X(BM); return GN_MT_XX; #undef X } /* Set of handy functions to print out localized name of the enum value */ GNOKII_API const char *gn_memory_type2str(gn_memory_type mt) { #define X(a) case GN_MT_##a: return #a; switch (mt) { X(ME); X(SM); X(FD); X(ON); X(EN); X(DC); X(RC); X(MC); X(LD); X(BD); X(SD); X(MT); X(TA); X(CB); X(IN); X(OU); X(AR); X(TE); X(SR); X(DR); X(OUS); X(F1); X(F2); X(F3); X(F4); X(F5); X(F6); X(F7); X(F8); X(F9); X(F10); X(F11); X(F12); X(F13); X(F14); X(F15); X(F16); X(F17); X(F18); X(F19); X(F20); X(BM); default: return NULL; } #undef X } GNOKII_API const char *gn_memory_type_print(gn_memory_type mt) { switch (mt) { case GN_MT_ME: return _("Internal memory"); case GN_MT_SM: return _("SIM card"); case GN_MT_FD: return _("Fixed dial numbers"); case GN_MT_ON: return _("Own numbers"); case GN_MT_EN: return _("Emergency numbers"); case GN_MT_DC: return _("Dialled numbers"); case GN_MT_RC: return _("Received numbers"); case GN_MT_MC: return _("Missed numbers"); case GN_MT_LD: return _("Last dialled"); case GN_MT_BD: return _("Barred dialling numbers"); case GN_MT_SD: return _("Service dialling numbers"); case GN_MT_MT: return _("Combined ME and SIM phonebook"); case GN_MT_TA: return _("Computer memory"); case GN_MT_CB: return _("Currently selected memory"); case GN_MT_IN: return _("SMS Inbox"); case GN_MT_OU: return _("SMS Outbox, sent items"); case GN_MT_AR: return _("SMS Archive"); case GN_MT_TE: return _("SMS Templates"); case GN_MT_SR: return _("SMS Status Reports"); case GN_MT_DR: return _("SMS Drafts"); case GN_MT_OUS: return _("SMS Outbox, items to be sent"); case GN_MT_F1: return _("SMS Folder 1"); case GN_MT_F2: return _("SMS Folder 2"); case GN_MT_F3: return _("SMS Folder 3"); case GN_MT_F4: return _("SMS Folder 4"); case GN_MT_F5: return _("SMS Folder 5"); case GN_MT_F6: return _("SMS Folder 6"); case GN_MT_F7: return _("SMS Folder 7"); case GN_MT_F8: return _("SMS Folder 8"); case GN_MT_F9: return _("SMS Folder 9"); case GN_MT_F10: return _("SMS Folder 10"); case GN_MT_F11: return _("SMS Folder 11"); case GN_MT_F12: return _("SMS Folder 12"); case GN_MT_F13: return _("SMS Folder 13"); case GN_MT_F14: return _("SMS Folder 14"); case GN_MT_F15: return _("SMS Folder 15"); case GN_MT_F16: return _("SMS Folder 16"); case GN_MT_F17: return _("SMS Folder 17"); case GN_MT_F18: return _("SMS Folder 18"); case GN_MT_F19: return _("SMS Folder 19"); case GN_MT_F20: return _("SMS Folder 20"); case GN_MT_BM: return _("Cell Broadcast"); default: return _("Unknown"); } } GNOKII_API const char *gn_connection_type2str(gn_connection_type t) { switch (t) { case GN_CT_NONE: return _("None"); case GN_CT_Serial: return _("Serial"); case GN_CT_DAU9P: return _("Serial DAU9P"); case GN_CT_DLR3P: return _("Serial DLR3P"); case GN_CT_Infrared: return _("Infrared (old Nokias)"); case GN_CT_Irda: return _("IrDA"); case GN_CT_Bluetooth: return _("Bluetooth"); case GN_CT_Tekram: return _("Tekram Ir-Dongle"); case GN_CT_TCP: return _("TCP"); case GN_CT_M2BUS: return _("M2BUS"); case GN_CT_DKU2: return _("DKU2 (kernel support)"); case GN_CT_DKU2LIBUSB: return _("DKU2 (libusb support)"); case GN_CT_PCSC: return _("Smart Card reader (libpcsclite support)"); case GN_CT_SOCKETPHONET: return _("Linux Phonet (kernel support)"); default: return _("Unknown"); } } GNOKII_API const char *gn_power_source2str(gn_power_source s) { switch (s) { case GN_PS_ACDC: return _("AC-DC"); case GN_PS_BATTERY: return _("Battery"); case GN_PS_NOBATTERY: return _("No battery"); case GN_PS_FAULT: return _("Power fault"); default: return _("Unknown"); } } GNOKII_API const char *gn_security_code_type2str(gn_security_code_type t) { switch (t) { case GN_SCT_SecurityCode: return _("Security code"); case GN_SCT_Pin: return _("PIN"); case GN_SCT_Pin2: return _("PIN2"); case GN_SCT_Puk: return _("PUK"); case GN_SCT_Puk2: return _("PUK2"); case GN_SCT_None: return _("None"); default: return _("Unknown"); } } /* Phonebook */ GNOKII_API const char *gn_phonebook_number_type2str(gn_phonebook_number_type t) { switch (t) { case GN_PHONEBOOK_NUMBER_None: return _("General number"); case GN_PHONEBOOK_NUMBER_Common: return _("General number"); case GN_PHONEBOOK_NUMBER_Home: return _("Home number"); case GN_PHONEBOOK_NUMBER_Mobile: return _("Mobile number"); case GN_PHONEBOOK_NUMBER_Fax: return _("Fax number"); case GN_PHONEBOOK_NUMBER_Work: return _("Work number"); case GN_PHONEBOOK_NUMBER_General: return _("General number"); default: return _("Unknown number"); } } GNOKII_API const char *gn_phonebook_entry_type2str(gn_phonebook_entry_type t) { switch (t) { case GN_PHONEBOOK_ENTRY_Name: return _("Name"); case GN_PHONEBOOK_ENTRY_Email: return _("Email"); case GN_PHONEBOOK_ENTRY_Postal: return _("Postal address"); case GN_PHONEBOOK_ENTRY_Note: return _("Note"); case GN_PHONEBOOK_ENTRY_Number: return _("Number"); case GN_PHONEBOOK_ENTRY_Ringtone: return _("Ringtone"); case GN_PHONEBOOK_ENTRY_Date: return _("Date"); case GN_PHONEBOOK_ENTRY_Pointer: return _("Pointer"); case GN_PHONEBOOK_ENTRY_Logo: return _("Logo"); case GN_PHONEBOOK_ENTRY_LogoSwitch: return _("Logo switch"); case GN_PHONEBOOK_ENTRY_Group: return _("Group"); case GN_PHONEBOOK_ENTRY_URL: return _("URL"); case GN_PHONEBOOK_ENTRY_Location: return _("Location"); case GN_PHONEBOOK_ENTRY_Image: return _("Image"); case GN_PHONEBOOK_ENTRY_RingtoneAdv: return _("Ringtone"); case GN_PHONEBOOK_ENTRY_UserID: return _("User ID"); case GN_PHONEBOOK_ENTRY_PTTAddress: return _("Push-To-Talk address"); case GN_PHONEBOOK_ENTRY_FirstName: return _("First name"); case GN_PHONEBOOK_ENTRY_LastName: return _("Last name"); case GN_PHONEBOOK_ENTRY_PostalAddress: return _("Postal address"); case GN_PHONEBOOK_ENTRY_ExtendedAddress: return _("Extended address"); case GN_PHONEBOOK_ENTRY_Street: return _("Street"); case GN_PHONEBOOK_ENTRY_City: return _("City"); case GN_PHONEBOOK_ENTRY_StateProvince: return _("State or province"); case GN_PHONEBOOK_ENTRY_ZipCode: return _("Zip code"); case GN_PHONEBOOK_ENTRY_Country: return _("Country"); case GN_PHONEBOOK_ENTRY_FormalName: return _("Formal name"); case GN_PHONEBOOK_ENTRY_JobTitle: return _("Job title"); case GN_PHONEBOOK_ENTRY_Company: return _("Company"); case GN_PHONEBOOK_ENTRY_Nickname: return _("Nickname"); case GN_PHONEBOOK_ENTRY_Birthday: return _("Birthday"); case GN_PHONEBOOK_ENTRY_ExtGroup: return _("Caller group id"); default: return _("Unknown"); } } GNOKII_API const char *gn_subentrytype2string(gn_phonebook_entry_type entry_type, gn_phonebook_number_type number_type) { switch (entry_type) { case GN_PHONEBOOK_ENTRY_Name: case GN_PHONEBOOK_ENTRY_Email: case GN_PHONEBOOK_ENTRY_Postal: case GN_PHONEBOOK_ENTRY_Note: case GN_PHONEBOOK_ENTRY_Ringtone: case GN_PHONEBOOK_ENTRY_Date: case GN_PHONEBOOK_ENTRY_Pointer: case GN_PHONEBOOK_ENTRY_Logo: case GN_PHONEBOOK_ENTRY_LogoSwitch: case GN_PHONEBOOK_ENTRY_Group: case GN_PHONEBOOK_ENTRY_URL: case GN_PHONEBOOK_ENTRY_Location: case GN_PHONEBOOK_ENTRY_Image: case GN_PHONEBOOK_ENTRY_RingtoneAdv: case GN_PHONEBOOK_ENTRY_UserID: case GN_PHONEBOOK_ENTRY_PTTAddress: case GN_PHONEBOOK_ENTRY_FirstName: case GN_PHONEBOOK_ENTRY_LastName: case GN_PHONEBOOK_ENTRY_PostalAddress: case GN_PHONEBOOK_ENTRY_ExtendedAddress: case GN_PHONEBOOK_ENTRY_Street: case GN_PHONEBOOK_ENTRY_City: case GN_PHONEBOOK_ENTRY_StateProvince: case GN_PHONEBOOK_ENTRY_ZipCode: case GN_PHONEBOOK_ENTRY_Country: case GN_PHONEBOOK_ENTRY_FormalName: case GN_PHONEBOOK_ENTRY_JobTitle: case GN_PHONEBOOK_ENTRY_Company: case GN_PHONEBOOK_ENTRY_Nickname: case GN_PHONEBOOK_ENTRY_Birthday: case GN_PHONEBOOK_ENTRY_ExtGroup: return gn_phonebook_entry_type2str(entry_type); case GN_PHONEBOOK_ENTRY_Number: switch (number_type) { case GN_PHONEBOOK_NUMBER_Home: case GN_PHONEBOOK_NUMBER_Mobile: case GN_PHONEBOOK_NUMBER_Fax: case GN_PHONEBOOK_NUMBER_Work: case GN_PHONEBOOK_NUMBER_None: case GN_PHONEBOOK_NUMBER_Common: case GN_PHONEBOOK_NUMBER_General: return gn_phonebook_number_type2str(number_type); default: return _("Unknown number"); } default: return _("Unknown"); } } GNOKII_API const char *gn_phonebook_group_type2str(gn_phonebook_group_type t) { switch (t) { case GN_PHONEBOOK_GROUP_Family: return _("Family"); case GN_PHONEBOOK_GROUP_Vips: return _("VIPs"); case GN_PHONEBOOK_GROUP_Friends:return _("Friends"); case GN_PHONEBOOK_GROUP_Work: return _("Work"); case GN_PHONEBOOK_GROUP_Others: return _("Others"); case GN_PHONEBOOK_GROUP_None: return _("None"); default: return _("Unknown"); } } /* SMS */ GNOKII_API const char *gn_sms_udh_type2str(gn_sms_udh_type t) { switch (t) { case GN_SMS_UDH_None: return _("Text"); case GN_SMS_UDH_ConcatenatedMessages: return _("Linked"); case GN_SMS_UDH_Ringtone: return _("Ringtone"); case GN_SMS_UDH_OpLogo: return _("GSM Operator Logo"); case GN_SMS_UDH_CallerIDLogo: return _("Logo"); case GN_SMS_UDH_MultipartMessage: return _("Multipart Message"); case GN_SMS_UDH_WAPvCard: return _("WAP vCard"); case GN_SMS_UDH_WAPvCalendar: return _("WAP vCalendar"); case GN_SMS_UDH_WAPvCardSecure: return _("WAP vCardSecure"); case GN_SMS_UDH_WAPvCalendarSecure: return _("WAP vCalendarSecure"); case GN_SMS_UDH_VoiceMessage: return _("Voice Message"); case GN_SMS_UDH_FaxMessage: return _("Fax Message"); case GN_SMS_UDH_EmailMessage: return _("Email Message"); case GN_SMS_UDH_WAPPush: return _("WAP Push"); case GN_SMS_UDH_OtherMessage: return _("Other Message"); case GN_SMS_UDH_Unknown: return _("Unknown"); default: return _("Unknown"); } } GNOKII_API const char *gn_sms_message_type2str(gn_sms_message_type t) { switch (t) { case GN_SMS_MT_Deliver: return _("Inbox Message"); case GN_SMS_MT_DeliveryReport: return _("Delivery Report"); case GN_SMS_MT_Submit: return _("MO Message"); case GN_SMS_MT_SubmitReport: return _("Submit Report"); case GN_SMS_MT_Command: return _("Command"); case GN_SMS_MT_StatusReport: return _("Status Report"); case GN_SMS_MT_Picture: return _("Picture Message"); case GN_SMS_MT_TextTemplate: return _("Template"); case GN_SMS_MT_PictureTemplate: return _("Picture Message Template"); case GN_SMS_MT_SubmitSent: return _("MO Message"); default: return _("Unknown"); } } GNOKII_API const char *gn_sms_message_status2str(gn_sms_message_status t) { switch (t) { case GN_SMS_Read: return _("Read"); case GN_SMS_Unread: return _("Unread"); case GN_SMS_Sent: return _("Sent"); case GN_SMS_Unsent: return _("Unsent"); default: return _("Unknown"); } } GNOKII_API const char *gn_sms_message_format2str(gn_sms_message_format t) { switch (t) { case GN_SMS_MF_Text: return _("Text"); case GN_SMS_MF_Fax: return _("Fax"); case GN_SMS_MF_Voice: return _("VoiceMail"); case GN_SMS_MF_ERMES: return _("ERMES"); case GN_SMS_MF_Paging: return _("Paging"); case GN_SMS_MF_UCI: return _("Email message in 8110i"); case GN_SMS_MF_Email: return _("Email"); case GN_SMS_MF_X400: return _("X.400"); default: return _("Unknown"); } } GNOKII_API const char *gn_sms_vp_time2str(gn_sms_vp_time t) { switch (t) { case GN_SMS_VP_1H: return _("1 hour"); case GN_SMS_VP_6H: return _("6 hours"); case GN_SMS_VP_24H: return _("24 hours"); case GN_SMS_VP_72H: return _("72 hours"); case GN_SMS_VP_1W: return _("1 week"); case GN_SMS_VP_Max: return _("Maximum time"); default: return _("Unknown"); } } /* Calendar and ToDo */ GNOKII_API const char *gn_calnote_type2str(gn_calnote_type t) { switch (t) { case GN_CALNOTE_MEETING: return _("Meeting"); case GN_CALNOTE_CALL: return _("Call"); case GN_CALNOTE_BIRTHDAY: return _("Birthday"); case GN_CALNOTE_REMINDER: return _("Reminder"); case GN_CALNOTE_MEMO: return _("Memo"); default: return _("Unknown"); } } GNOKII_API const char *gn_calnote_recurrence2str(gn_calnote_recurrence r) { switch (r) { case GN_CALNOTE_NEVER: return _("Never"); case GN_CALNOTE_DAILY: return _("Daily"); case GN_CALNOTE_WEEKLY: return _("Weekly"); case GN_CALNOTE_2WEEKLY:return _("Every 2 weeks"); case GN_CALNOTE_MONTHLY:return _("Monthly"); case GN_CALNOTE_YEARLY: return _("Yearly"); default: return _("Unknown"); } } GNOKII_API const char *gn_todo_priority2str(gn_todo_priority p) { switch (p) { case GN_TODO_LOW: return _("Low"); case GN_TODO_MEDIUM: return _("Medium"); case GN_TODO_HIGH: return _("High"); default: return _("Unknown"); } } /* WAP */ GNOKII_API const char *gn_wap_session2str(gn_wap_session p) { switch (p) { case GN_WAP_SESSION_TEMPORARY: return _("Temporary"); case GN_WAP_SESSION_PERMANENT: return _("Permanent"); default: return _("Unknown"); } } GNOKII_API const char *gn_wap_authentication2str(gn_wap_authentication p) { switch (p) { case GN_WAP_AUTH_NORMAL: return _("Normal"); case GN_WAP_AUTH_SECURE: return _("Secure"); default: return _("Unknown"); } } GNOKII_API const char *gn_wap_bearer2str(gn_wap_bearer p) { switch (p) { case GN_WAP_BEARER_GSMDATA: return _("GSM data"); case GN_WAP_BEARER_GPRS: return _("GPRS"); case GN_WAP_BEARER_SMS: return _("SMS"); case GN_WAP_BEARER_USSD: return _("USSD"); default: return _("Unknown"); } } GNOKII_API const char *gn_wap_call_type2str(gn_wap_call_type p) { switch (p) { case GN_WAP_CALL_ANALOGUE: return _("Analogue"); case GN_WAP_CALL_ISDN: return _("ISDN"); default: return _("Unknown"); } } GNOKII_API const char *gn_wap_call_speed2str(gn_wap_call_speed p) { switch (p) { case GN_WAP_CALL_AUTOMATIC: return _("Automatic"); case GN_WAP_CALL_9600: return _("9600"); case GN_WAP_CALL_14400: return _("14400"); default: return _("Unknown"); } } GNOKII_API const char *gn_wap_login2str(gn_wap_login p) { switch (p) { case GN_WAP_LOGIN_MANUAL: return _("Manual"); case GN_WAP_LOGIN_AUTOLOG: return _("Automatic"); default: return _("Unknown"); } } GNOKII_API const char *gn_wap_gprs2str(gn_wap_gprs p) { switch (p) { case GN_WAP_GPRS_ALWAYS: return _("Always"); case GN_WAP_GPRS_WHENNEEDED: return _("When needed"); default: return _("Unknown"); } } /* Profiles */ GNOKII_API const char *gn_profile_message_type2str(gn_profile_message_type p) { switch (p) { case GN_PROFILE_MESSAGE_NoTone: return _("No tone"); case GN_PROFILE_MESSAGE_Standard: return _("Standard"); case GN_PROFILE_MESSAGE_Special: return _("Special"); case GN_PROFILE_MESSAGE_BeepOnce: return _("Beep once"); case GN_PROFILE_MESSAGE_Ascending: return _("Ascending"); default: return _("Unknown"); } } GNOKII_API const char *gn_profile_warning_type2str(gn_profile_warning_type p) { switch (p) { case GN_PROFILE_WARNING_Off: return _("Off"); case GN_PROFILE_WARNING_On: return _("On"); default: return _("Unknown"); } } GNOKII_API const char *gn_profile_vibration_type2str(gn_profile_vibration_type p) { switch (p) { case GN_PROFILE_VIBRATION_Off: return _("Off"); case GN_PROFILE_VIBRATION_On: return _("On"); default: return _("Unknown"); } } GNOKII_API const char *gn_profile_callalert_type2str(gn_profile_callalert_type p) { switch (p) { case GN_PROFILE_CALLALERT_Ringing: return _("Ringing"); case GN_PROFILE_CALLALERT_BeepOnce: return _("Beep once"); case GN_PROFILE_CALLALERT_Off: return _("Off"); case GN_PROFILE_CALLALERT_RingOnce: return _("Ring once"); case GN_PROFILE_CALLALERT_Ascending: return _("Ascending"); case GN_PROFILE_CALLALERT_CallerGroups: return _("Caller groups"); default: return _("Unknown"); } } GNOKII_API const char *gn_profile_keyvol_type2str(gn_profile_keyvol_type p) { switch (p) { case GN_PROFILE_KEYVOL_Off: return _("Off"); case GN_PROFILE_KEYVOL_Level1: return _("Level 1"); case GN_PROFILE_KEYVOL_Level2: return _("Level 2"); case GN_PROFILE_KEYVOL_Level3: return _("Level 3"); default: return _("Unknown"); } } GNOKII_API const char *gn_profile_volume_type2str(gn_profile_volume_type p) { switch (p) { case GN_PROFILE_VOLUME_Level1: return _("Level 1"); case GN_PROFILE_VOLUME_Level2: return _("Level 2"); case GN_PROFILE_VOLUME_Level3: return _("Level 3"); case GN_PROFILE_VOLUME_Level4: return _("Level 4"); case GN_PROFILE_VOLUME_Level5: return _("Level 5"); default: return _("Unknown"); } } /* Call divert */ GNOKII_API const char *gn_call_divert_type2str(gn_call_divert_type p) { switch (p) { case GN_CDV_Busy: return _("Busy"); case GN_CDV_NoAnswer: return _("No answer"); case GN_CDV_OutOfReach: return _("Out of reach"); case GN_CDV_NotAvailable: return _("Not available"); case GN_CDV_AllTypes: return _("All"); default: return _("Unknown"); } } GNOKII_API const char *gn_call_divert_call_type2str(gn_call_divert_call_type p) { switch (p) { case GN_CDV_VoiceCalls: return _("Voice"); case GN_CDV_FaxCalls: return _("Fax"); case GN_CDV_DataCalls: return _("Data"); case GN_CDV_AllCalls: return _("All"); default: return _("Unknown"); } } GNOKII_API const char *gn_call_divert_operation2str(gn_call_divert_operation p) { switch (p) { case GN_CDV_Disable: return _("Disable"); case GN_CDV_Enable: return _("Enable"); case GN_CDV_Query: return _("Query"); case GN_CDV_Register: return _("Register"); case GN_CDV_Erasure: return _("Erasure"); default: return _("Unknown"); } } /** * gn_number_sanitize - Remove all white charactes from the string * @number: input/output number string * @maxlen: maximal number length * * Use this function to sanitize GSM phone number format. It changes * number argument. */ GNOKII_API void gn_number_sanitize(char *number, int maxlen) { char *iter, *e; iter = e = number; while (*iter && *e && (e - number < maxlen)) { *iter = *e; if (isspace(*iter)) { while (*e && isspace(*e) && (e - number < maxlen)) { e++; } } *iter = *e; iter++; e++; } *iter = 0; } /** * gn_phonebook_entry_sanitize - Remove all white charactes from the string * @entry: phonebook entry to sanitize * * Use this function before any attempt to write an entry to the phone. */ GNOKII_API void gn_phonebook_entry_sanitize(gn_phonebook_entry *entry) { int i; gn_number_sanitize(entry->number, GN_PHONEBOOK_NUMBER_MAX_LENGTH + 1); for (i = 0; i < entry->subentries_count; i++) { if (entry->subentries[i].entry_type == GN_PHONEBOOK_ENTRY_Number) gn_number_sanitize(entry->subentries[i].data.number, GN_PHONEBOOK_NUMBER_MAX_LENGTH + 1); } } /* * This very small function is just to make it easier to clear * the data struct every time one is created */ GNOKII_API void gn_data_clear(gn_data *data) { memset(data, 0, sizeof(gn_data)); } gnokii-0.6.31/common/data/0000755000175000017500000000000011666163464013417 5ustar leoleognokii-0.6.31/common/data/Makefile.am0000644000175000017500000000032111666163120015434 0ustar leoleoDEFS = -DCOMPILING_LIBGNOKII noinst_LTLIBRARIES = libDATA.la libDATA_la_SOURCES = \ at-emulator.c \ datapump.c \ rlp-common.c \ rlp-crc24.c \ virtmodem.c libDATA_la_CFLAGS = \ -I$(top_srcdir)/include gnokii-0.6.31/common/data/Makefile.in0000644000175000017500000005421311666163211015457 0ustar leoleo# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = common/data DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_expand_dir.m4 \ $(top_srcdir)/m4/acx_pthread.m4 $(top_srcdir)/m4/intltool.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libDATA_la_LIBADD = am_libDATA_la_OBJECTS = libDATA_la-at-emulator.lo \ libDATA_la-datapump.lo libDATA_la-rlp-common.lo \ libDATA_la-rlp-crc24.lo libDATA_la-virtmodem.lo libDATA_la_OBJECTS = $(am_libDATA_la_OBJECTS) libDATA_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libDATA_la_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libDATA_la_SOURCES) DIST_SOURCES = $(libDATA_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLUETOOTH_LIBS = @BLUETOOTH_LIBS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = -DCOMPILING_LIBGNOKII DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FIND = @FIND@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLDFLAGS = @GLDFLAGS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GMODULE_CFLAGS = @GMODULE_CFLAGS@ GMODULE_LIBS = @GMODULE_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GNOKII_LT_VERSION = @GNOKII_LT_VERSION@ GNOKII_LT_VERSION_AGE = @GNOKII_LT_VERSION_AGE@ GNOKII_LT_VERSION_CURRENT = @GNOKII_LT_VERSION_CURRENT@ GNOKII_LT_VERSION_REVISION = @GNOKII_LT_VERSION_REVISION@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_LIBICAL = @HAVE_LIBICAL@ HAVE_LIBUSB = @HAVE_LIBUSB@ HAVE_SOCKETPHONET = @HAVE_SOCKETPHONET@ HAVE_XGNOKII = @HAVE_XGNOKII@ ICAL_CFLAGS = @ICAL_CFLAGS@ ICAL_LIBS = @ICAL_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBGNOKII_VERSION_MAJOR = @LIBGNOKII_VERSION_MAJOR@ LIBGNOKII_VERSION_MINOR = @LIBGNOKII_VERSION_MINOR@ LIBGNOKII_VERSION_RELEASE = @LIBGNOKII_VERSION_RELEASE@ LIBGNOKII_VERSION_STRING = @LIBGNOKII_VERSION_STRING@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBPCSCLITE_CFLAGS = @LIBPCSCLITE_CFLAGS@ LIBPCSCLITE_LIBS = @LIBPCSCLITE_LIBS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKE = @MAKE@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ MYSQLCONFIG = @MYSQLCONFIG@ MYSQLCONFIG5 = @MYSQLCONFIG5@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_LIBS = @MYSQL_LIBS@ NEED_LOCALE_CHARSET = @NEED_LOCALE_CHARSET@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OWN_GETOPT = @OWN_GETOPT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PGCONFIG = @PGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSTGRES_CFLAGS = @POSTGRES_CFLAGS@ POSTGRES_LIBS = @POSTGRES_LIBS@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LIBS = @SQLITE3_LIBS@ SQLITE_CFLAGS = @SQLITE_CFLAGS@ SQLITE_LIBS = @SQLITE_LIBS@ STRIP = @STRIP@ TCP_LIBS = @TCP_LIBS@ TERMLDFLAGS = @TERMLDFLAGS@ TERMLIBS = @TERMLIBS@ USB_LIBS = @USB_LIBS@ USE_NLS = @USE_NLS@ USE_UNIX98PTYS = @USE_UNIX98PTYS@ VERSION = @VERSION@ WIN32 = @WIN32@ WIN32_CROSS = @WIN32_CROSS@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ XPACKAGE = @XPACKAGE@ XPM_CFLAGS = @XPM_CFLAGS@ XPM_LIBS = @XPM_LIBS@ XVERSION = @XVERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ acx_pthread_config = @acx_pthread_config@ 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@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libDATA.la libDATA_la_SOURCES = \ at-emulator.c \ datapump.c \ rlp-common.c \ rlp-crc24.c \ virtmodem.c libDATA_la_CFLAGS = \ -I$(top_srcdir)/include all: all-am .SUFFIXES: .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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu common/data/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu common/data/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 $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libDATA.la: $(libDATA_la_OBJECTS) $(libDATA_la_DEPENDENCIES) $(libDATA_la_LINK) $(libDATA_la_OBJECTS) $(libDATA_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDATA_la-at-emulator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDATA_la-datapump.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDATA_la-rlp-common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDATA_la-rlp-crc24.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDATA_la-virtmodem.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @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 $@ $< libDATA_la-at-emulator.lo: at-emulator.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDATA_la_CFLAGS) $(CFLAGS) -MT libDATA_la-at-emulator.lo -MD -MP -MF $(DEPDIR)/libDATA_la-at-emulator.Tpo -c -o libDATA_la-at-emulator.lo `test -f 'at-emulator.c' || echo '$(srcdir)/'`at-emulator.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDATA_la-at-emulator.Tpo $(DEPDIR)/libDATA_la-at-emulator.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='at-emulator.c' object='libDATA_la-at-emulator.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDATA_la_CFLAGS) $(CFLAGS) -c -o libDATA_la-at-emulator.lo `test -f 'at-emulator.c' || echo '$(srcdir)/'`at-emulator.c libDATA_la-datapump.lo: datapump.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDATA_la_CFLAGS) $(CFLAGS) -MT libDATA_la-datapump.lo -MD -MP -MF $(DEPDIR)/libDATA_la-datapump.Tpo -c -o libDATA_la-datapump.lo `test -f 'datapump.c' || echo '$(srcdir)/'`datapump.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDATA_la-datapump.Tpo $(DEPDIR)/libDATA_la-datapump.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='datapump.c' object='libDATA_la-datapump.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDATA_la_CFLAGS) $(CFLAGS) -c -o libDATA_la-datapump.lo `test -f 'datapump.c' || echo '$(srcdir)/'`datapump.c libDATA_la-rlp-common.lo: rlp-common.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDATA_la_CFLAGS) $(CFLAGS) -MT libDATA_la-rlp-common.lo -MD -MP -MF $(DEPDIR)/libDATA_la-rlp-common.Tpo -c -o libDATA_la-rlp-common.lo `test -f 'rlp-common.c' || echo '$(srcdir)/'`rlp-common.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDATA_la-rlp-common.Tpo $(DEPDIR)/libDATA_la-rlp-common.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rlp-common.c' object='libDATA_la-rlp-common.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDATA_la_CFLAGS) $(CFLAGS) -c -o libDATA_la-rlp-common.lo `test -f 'rlp-common.c' || echo '$(srcdir)/'`rlp-common.c libDATA_la-rlp-crc24.lo: rlp-crc24.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDATA_la_CFLAGS) $(CFLAGS) -MT libDATA_la-rlp-crc24.lo -MD -MP -MF $(DEPDIR)/libDATA_la-rlp-crc24.Tpo -c -o libDATA_la-rlp-crc24.lo `test -f 'rlp-crc24.c' || echo '$(srcdir)/'`rlp-crc24.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDATA_la-rlp-crc24.Tpo $(DEPDIR)/libDATA_la-rlp-crc24.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rlp-crc24.c' object='libDATA_la-rlp-crc24.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDATA_la_CFLAGS) $(CFLAGS) -c -o libDATA_la-rlp-crc24.lo `test -f 'rlp-crc24.c' || echo '$(srcdir)/'`rlp-crc24.c libDATA_la-virtmodem.lo: virtmodem.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDATA_la_CFLAGS) $(CFLAGS) -MT libDATA_la-virtmodem.lo -MD -MP -MF $(DEPDIR)/libDATA_la-virtmodem.Tpo -c -o libDATA_la-virtmodem.lo `test -f 'virtmodem.c' || echo '$(srcdir)/'`virtmodem.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDATA_la-virtmodem.Tpo $(DEPDIR)/libDATA_la-virtmodem.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='virtmodem.c' object='libDATA_la-virtmodem.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDATA_la_CFLAGS) $(CFLAGS) -c -o libDATA_la-virtmodem.lo `test -f 'virtmodem.c' || echo '$(srcdir)/'`virtmodem.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: 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-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES 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-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gnokii-0.6.31/common/data/datapump.c0000644000175000017500000001170211666163120015364 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 2001-2004 Pawel Kot Copyright (C) 2002-2004 BORBELY Zoltan This file provides routines to handle processing of data when connected in fax or data mode. Converts data from/to GSM phone to virtual modem interface. */ #define __data_datapump_c #include "config.h" #include #include #include #include #include #include #include #include #include #include #include "misc.h" #include "gnokii.h" #include "compat.h" #include "device.h" #include "data/at-emulator.h" #include "data/datapump.h" /* Prototypes */ static int DP_CallBack(rlp_user_inds ind, unsigned char *buffer, int length); static int DP_SendRLPFrame(gn_rlp_f96_frame *frame, int out_dtx); /* Global variables */ extern bool CommandMode; /* Local variables */ static int PtyRDFD; /* File descriptor for reading and writing to/from */ static int PtyWRFD; /* pty interface - only different in debug mode. */ u8 pluscount; bool connected; bool dp_Initialise(int read_fd, int write_fd) { PtyRDFD = read_fd; PtyWRFD = write_fd; rlp_initialise(DP_SendRLPFrame, DP_CallBack); rlp_user_request_set(Attach_Req, true); pluscount = 0; connected = false; data.rlp_rx_callback = rlp_f96_frame_display; gn_sm_functions(GN_OP_SetRLPRXCallback, &data, sm); return true; } static int DP_CallBack(rlp_user_inds ind, unsigned char *buffer, int length) { int i, temp; switch(ind) { case Data: if (CommandMode == false) write(PtyWRFD, buffer, length); break; case Conn_Ind: if (CommandMode == false) gn_atem_modem_result(MR_CARRIER); rlp_user_request_set(Conn_Req, true); break; case StatusChange: if (buffer[0] == 0) { connected = true; if (CommandMode == false) gn_atem_modem_result(MR_CONNECT); } break; case Disc_Ind: if (CommandMode == false) gn_atem_modem_result(MR_NOCARRIER); connected = false; /* Set the call passup back to the at emulator */ data.call_notification = gn_atem_call_passup; gn_sm_functions(GN_OP_SetCallNotification, &data, sm); CommandMode = true; break; case Reset_Ind: rlp_user_request_set(Reset_Resp, true); break; case GetData: if (queue.n > 0) { temp = queue.n < sizeof(buffer) ? queue.n : sizeof(buffer); for (i = 0; i < temp; i++) { buffer[i] = queue.buf[queue.head++]; queue.head %= sizeof(queue.buf); queue.n--; } /* This will only check +++ and the beginning of a read */ /* But there should be a pause before it anyway */ if (buffer[0] == '+') { pluscount++; if (temp > 1) { if (buffer[1] == '+') pluscount++; else pluscount = 0; if (temp > 2) { if (buffer[2] == '+') pluscount++; else pluscount = 0; if (temp > 3) pluscount = 0; } } } else pluscount = 0; if (pluscount == 3) { CommandMode = true; /* Set the call passup back to the at emulator */ data.call_notification = gn_atem_call_passup; gn_sm_functions(GN_OP_SetCallNotification, &data, sm); gn_atem_string_out("\r\n"); gn_atem_modem_result(MR_OK); break; } return temp; } break; default: break; } return 0; } void dp_CallPassup(gn_call_status CallStatus, gn_call_info *CallInfo, struct gn_statemachine *state, void *callback_data) { dprintf("dp_CallPassup called with %d\n", CallStatus); switch (CallStatus) { case GN_CALL_Established: if (CommandMode == false) gn_atem_modem_result(MR_CARRIER); rlp_user_request_set(Conn_Req, true); connected = true; break; case GN_CALL_LocalHangup: case GN_CALL_RemoteHangup: CommandMode = true; /* Set the call passup back to the at emulator */ data.call_notification = gn_atem_call_passup; gn_sm_functions(GN_OP_SetCallNotification, &data, sm); gn_atem_modem_result(MR_NOCARRIER); rlp_user_request_set(Disc_Req, true); connected = false; /* send the hangup event to the at emulator */ gn_atem_call_passup(CallStatus, CallInfo, state, NULL); break; default: break; } } static int DP_SendRLPFrame(gn_rlp_f96_frame *frame, int out_dtx) { data.rlp_frame = frame; data.rlp_out_dtx = out_dtx; return gn_sm_functions(GN_OP_SendRLPFrame, &data, sm); } gnokii-0.6.31/common/data/at-emulator.c0000644000175000017500000007127111666163120016012 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 2001-2004 Pawel Kot Copyright (C) 2002-2004 BORBELY Zoltan This file provides a virtual modem or "AT" interface to the GSM phone by calling code in gsm-api.c. Inspired by and in places copied from the Linux kernel AT Emulator IDSN code by Fritz Elfert and others. */ #include "config.h" #include #include #include #include #include #include #include #include #include #include #include #ifndef WIN32 # include #endif #include "misc.h" #include "gnokii.h" #include "compat.h" #include "data/at-emulator.h" #include "data/datapump.h" #define MAX_LINE_LENGTH 256 #define MAX_CMD_BUFFERS (2) #define CMD_BUFFER_LENGTH (100) /* Definition of some special Registers of AT-Emulator, pinched in part from ISDN driver in Linux kernel */ #define REG_RINGATA 0 #define REG_RINGCNT 1 #define REG_ESC 2 #define REG_CR 3 #define REG_LF 4 #define REG_BS 5 #define S22 22 #define S35 35 #define REG_CTRLZ 100 #define REG_ESCAPE 101 #define REG_QUIET 14 #define BIT_QUIET 4 #define REG_VERBOSE 14 #define BIT_VERBOSE 8 #define REG_ECHO 14 #define BIT_ECHO 2 #define MAX_MODEM_REGISTERS 102 /* Message format definitions */ #define PDU_MODE 0 #define TEXT_MODE 1 #define INTERACT_MODE 2 /* Global variables */ bool gn_atem_initialised = false; /* Set to true once initialised */ extern bool CommandMode; extern int ConnectCount; struct gn_statemachine *sm; gn_data data; static gn_sms sms; static gn_call_info callinfo; static char imei[GN_IMEI_MAX_LENGTH], model[GN_MODEL_MAX_LENGTH], revision[GN_REVISION_MAX_LENGTH], manufacturer[GN_MANUFACTURER_MAX_LENGTH]; /* Local variables */ static int PtyRDFD; /* File descriptor for reading and writing to/from */ static int PtyWRFD; /* pty interface - only different in debug mode. */ static u8 ModemRegisters[MAX_MODEM_REGISTERS]; static char CmdBuffer[MAX_CMD_BUFFERS][CMD_BUFFER_LENGTH]; static int CurrentCmdBuffer; static int CurrentCmdBufferIndex; static int IncomingCallNo; static int MessageFormat; /* Message Format (text or pdu) */ static int CallerIDMode; /* Current command parser */ static void (*Parser)(char *); /* Current command parser */ /* void (*Parser)(char *) = gn_atem_at_parse; */ static gn_memory_type SMSType; static int SMSNumber; /* If initialised in debug mode, stdin/out is used instead of ptys for interface. */ bool gn_atem_initialise(int read_fd, int write_fd, struct gn_statemachine *vmsm) { PtyRDFD = read_fd; PtyWRFD = write_fd; gn_data_clear(&data); memset(&sms, 0, sizeof(sms)); memset(&callinfo, 0, sizeof(callinfo)); data.sms = &sms; data.call_info = &callinfo; data.manufacturer = manufacturer; data.model = model; data.revision = revision; data.imei = imei; sm = vmsm; /* Initialise command buffer variables */ CurrentCmdBuffer = 0; CurrentCmdBufferIndex = 0; /* Initialise registers */ gn_atem_registers_init(); /* Initial parser is AT routine */ Parser = gn_atem_at_parse; /* Setup defaults for AT*C interpreter. */ SMSNumber = 1; SMSType = GN_MT_ME; /* Default message format is PDU */ MessageFormat = PDU_MODE; /* Set the call passup so that we get notified of incoming calls */ data.call_notification = gn_atem_call_passup; gn_sm_functions(GN_OP_SetCallNotification, &data, sm); /* query model, revision and imei */ if (gn_sm_functions(GN_OP_Identify, &data, sm) != GN_ERR_NONE) return false; /* We're ready to roll... */ gn_atem_initialised = true; return (true); } /* Initialise the "registers" used by the virtual modem. */ void gn_atem_registers_init(void) { memset(ModemRegisters, 0, sizeof(ModemRegisters)); ModemRegisters[REG_RINGATA] = 0; ModemRegisters[REG_RINGCNT] = 0; ModemRegisters[REG_ESC] = '+'; ModemRegisters[REG_CR] = 13; ModemRegisters[REG_LF] = 10; ModemRegisters[REG_BS] = 8; ModemRegisters[S35] = 7; ModemRegisters[REG_ECHO] |= BIT_ECHO; ModemRegisters[REG_VERBOSE] |= BIT_VERBOSE; ModemRegisters[REG_CTRLZ] = 26; ModemRegisters[REG_ESCAPE] = 27; CallerIDMode = 0; } static void gn_atem_hangup_phone(void) { if (IncomingCallNo > 0) { rlp_user_request_set(Disc_Req, true); gn_sm_loop(10, sm); } if (IncomingCallNo > 0) { data.call_info->call_id = IncomingCallNo; gn_sm_functions(GN_OP_CancelCall, &data, sm); IncomingCallNo = -1; } dp_Initialise(PtyRDFD, PtyWRFD); } static void gn_atem_answer_phone(void) { /* For now we'll also initialise the datapump + rlp code again */ dp_Initialise(PtyRDFD, PtyWRFD); data.call_notification = dp_CallPassup; gn_sm_functions(GN_OP_SetCallNotification, &data, sm); data.call_info->call_id = IncomingCallNo; gn_sm_functions(GN_OP_AnswerCall, &data, sm); CommandMode = false; } /* This gets called to indicate an incoming call */ void gn_atem_call_passup(gn_call_status CallStatus, gn_call_info *CallInfo, struct gn_statemachine *state, void *callback_data) { dprintf("gn_atem_call_passup called with %d\n", CallStatus); switch (CallStatus) { case GN_CALL_Incoming: gn_atem_modem_result(MR_RING); IncomingCallNo = CallInfo->call_id; ModemRegisters[REG_RINGCNT]++; gn_atem_cid_out(CallInfo); if (ModemRegisters[REG_RINGATA] != 0) gn_atem_answer_phone(); break; case GN_CALL_LocalHangup: case GN_CALL_RemoteHangup: IncomingCallNo = -1; break; default: break; } } /* This gets called to output caller id info of incoming call */ void gn_atem_cid_out(gn_call_info *CallInfo) { struct tm *now; time_t nowh; char buf[14]; /* 7 for "DATE = " + 4 digits + \n + \r + \0 */ nowh = time(NULL); now = localtime(&nowh); switch (CallerIDMode) { case 0: /* no output */ break; case 1: /* formatted CID */ snprintf(buf, sizeof(buf), "DATE = %02d%02d\r\n", now->tm_mon + 1, now->tm_mday); gn_atem_string_out(buf); snprintf(buf, sizeof(buf), "TIME = %02d%02d\r\n", now->tm_hour, now->tm_min); gn_atem_string_out(buf); /* TO DO: handle P and O numbers */ gn_atem_string_out("NMBR = "); gn_atem_string_out(1 + CallInfo->number); /* skip leading "+" */ gn_atem_string_out("\r\nNAME = "); gn_atem_string_out(CallInfo->name); gn_atem_string_out("\r\n"); /* FIX ME: do a real emulation of rings after the first one (at a lower level than this) */ gn_atem_modem_result(MR_RING); break; } } /* Handler called when characters received from serial port. calls state machine code to process it. */ void gn_atem_incoming_data_handle(char *buffer, int length) { int count; unsigned char out_buf[3]; for (count = 0; count < length ; count++) { /* If it's a command terminator character, parse what we have so far then go to next buffer. */ if (buffer[count] == ModemRegisters[REG_CR] || buffer[count] == ModemRegisters[REG_LF] || buffer[count] == ModemRegisters[REG_CTRLZ] || buffer[count] == ModemRegisters[REG_ESCAPE]) { /* Echo character if appropriate. */ if (buffer[count] == ModemRegisters[REG_CR] && (ModemRegisters[REG_ECHO] & BIT_ECHO)) { gn_atem_string_out("\r\n"); } /* Save CTRL-Z and ESCAPE for the parser */ if (buffer[count] == ModemRegisters[REG_CTRLZ] || buffer[count] == ModemRegisters[REG_ESCAPE]) CmdBuffer[CurrentCmdBuffer][CurrentCmdBufferIndex++] = buffer[count]; CmdBuffer[CurrentCmdBuffer][CurrentCmdBufferIndex] = 0x00; Parser(CmdBuffer[CurrentCmdBuffer]); CurrentCmdBuffer++; if (CurrentCmdBuffer >= MAX_CMD_BUFFERS) { CurrentCmdBuffer = 0; } CurrentCmdBufferIndex = 0; } else if (buffer[count] == ModemRegisters[REG_BS]) { if (CurrentCmdBufferIndex > 0) { /* Echo character if appropriate. */ if (ModemRegisters[REG_ECHO] & BIT_ECHO) { gn_atem_string_out("\b \b"); } CurrentCmdBufferIndex--; } } else { /* Echo character if appropriate. */ if (ModemRegisters[REG_ECHO] & BIT_ECHO) { out_buf[0] = buffer[count]; out_buf[1] = 0; gn_atem_string_out((char *)out_buf); } /* Collect it to command buffer */ CmdBuffer[CurrentCmdBuffer][CurrentCmdBufferIndex++] = buffer[count]; if (CurrentCmdBufferIndex >= CMD_BUFFER_LENGTH) { CurrentCmdBufferIndex = CMD_BUFFER_LENGTH; } } } } /* Parser for standard AT commands. cmd_buffer must be null terminated. */ void gn_atem_at_parse(char *cmd_buffer) { char *buf; int regno, val; char str[256]; if (!cmd_buffer[0]) return; if (strncasecmp (cmd_buffer, "AT", 2) != 0) { gn_atem_modem_result(MR_ERROR); return; } for (buf = &cmd_buffer[2]; *buf;) { switch (toupper(*buf)) { case 'Z': /* Reset modem */ buf++; switch (gn_atem_num_get(&buf)) { case -1: case 0: /* reset and load stored profile 0 */ case 1: /* reset and load stored profile 1 */ gn_atem_hangup_phone(); gn_atem_registers_init(); break; default: gn_atem_modem_result(MR_ERROR); return; } break; case 'A': /* Answer call */ buf++; gn_atem_answer_phone(); return; break; case 'D': /* Dial Data :-) */ /* FIXME - should parse this better */ /* For now we'll also initialise the datapump + rlp code again */ dp_Initialise(PtyRDFD, PtyWRFD); buf++; if (toupper(*buf) == 'T' || toupper(*buf) == 'P') buf++; while (*buf == ' ') buf++; data.call_notification = dp_CallPassup; gn_sm_functions(GN_OP_SetCallNotification, &data, sm); snprintf(data.call_info->number, sizeof(data.call_info->number), "%s", buf); if (ModemRegisters[S35] == 0) data.call_info->type = GN_CALL_DigitalData; else data.call_info->type = GN_CALL_NonDigitalData; data.call_info->send_number = GN_CALL_Default; CommandMode = false; if (gn_sm_functions(GN_OP_MakeCall, &data, sm) != GN_ERR_NONE) { CommandMode = true; dp_CallPassup(GN_CALL_RemoteHangup, NULL, NULL, NULL); } else { IncomingCallNo = data.call_info->call_id; gn_sm_loop(10, sm); } return; break; case 'H': /* Hang Up */ buf++; switch (gn_atem_num_get(&buf)) { case -1: case 0: /* hook off the phone */ gn_atem_hangup_phone(); break; case 1: /* hook on the phone */ break; default: gn_atem_modem_result(MR_ERROR); return; } break; case 'S': /* Change registers */ buf++; regno = gn_atem_num_get(&buf); if (regno < 0 || regno >= MAX_MODEM_REGISTERS) { gn_atem_modem_result(MR_ERROR); return; } if (*buf == '=') { buf++; val = gn_atem_num_get(&buf); if (val < 0 || val > 255) { gn_atem_modem_result(MR_ERROR); return; } ModemRegisters[regno] = val; } else if (*buf == '?') { buf++; snprintf(str, sizeof(str), "%d\r\n", ModemRegisters[regno]); gn_atem_string_out(str); } else { gn_atem_modem_result(MR_ERROR); return; } break; case 'E': /* E - Turn Echo on/off */ buf++; switch (gn_atem_num_get(&buf)) { case -1: case 0: ModemRegisters[REG_ECHO] &= ~BIT_ECHO; break; case 1: ModemRegisters[REG_ECHO] |= BIT_ECHO; break; default: gn_atem_modem_result(MR_ERROR); return; } break; case 'Q': /* Q - Turn Quiet on/off */ buf++; switch (gn_atem_num_get(&buf)) { case -1: case 0: ModemRegisters[REG_QUIET] &= ~BIT_QUIET; break; case 1: ModemRegisters[REG_QUIET] |= BIT_QUIET; break; default: gn_atem_modem_result(MR_ERROR); return; } break; case 'V': /* V - Turn Verbose on/off */ buf++; switch (gn_atem_num_get(&buf)) { case -1: case 0: ModemRegisters[REG_VERBOSE] &= ~BIT_VERBOSE; break; case 1: ModemRegisters[REG_VERBOSE] |= BIT_VERBOSE; break; default: gn_atem_modem_result(MR_ERROR); return; } break; case 'X': /* X - Set verbosity of the result messages */ buf++; switch (gn_atem_num_get(&buf)) { case -1: case 0: val = 0x00; break; case 1: val = 0x40; break; case 2: val = 0x50; break; case 3: val = 0x60; break; case 4: val = 0x70; break; case 5: val = 0x10; break; default: gn_atem_modem_result(MR_ERROR); return; } ModemRegisters[S22] = (ModemRegisters[S22] & 0x8f) | val; break; case 'I': /* I - info */ buf++; switch (gn_atem_num_get(&buf)) { case -1: case 0: /* terminal id */ snprintf(str, sizeof(str), "%d\r\n", ModemRegisters[39]); gn_atem_string_out(str); break; case 1: /* serial number (IMEI) */ snprintf(str, sizeof(str), "%s\r\n", imei); gn_atem_string_out(str); break; case 2: /* phone revision */ snprintf(str, sizeof(str), "%s\r\n", revision); gn_atem_string_out(str); break; case 3: /* modem revision */ gn_atem_string_out("gnokiid " VERSION "\r\n"); break; case 4: /* OEM string */ snprintf(str, sizeof(str), "%s %s\r\n", manufacturer, model); gn_atem_string_out(str); break; default: gn_atem_modem_result(MR_ERROR); return; } break; /* Handle AT* commands (Nokia proprietary I think) */ case '*': buf++; if (!strcasecmp(buf, "NOKIATEST")) { gn_atem_modem_result(MR_OK); /* FIXME? */ return; } else { if (!strcasecmp(buf, "C")) { gn_atem_modem_result(MR_OK); Parser = gn_atem_sms_parse; return; } } break; /* + is the precursor to another set of commands */ case '+': buf++; switch (toupper(*buf)) { case 'C': buf++; /* Returns true if error occured */ if (gn_atem_command_plusc(&buf) == true) { gn_atem_modem_result(MR_ERROR); return; } break; case 'G': buf++; /* Returns true if error occured */ if (gn_atem_command_plusg(&buf) == true) { gn_atem_modem_result(MR_ERROR); return; } break; default: gn_atem_modem_result(MR_ERROR); return; } break; /* # is the precursor to another set of commands */ case '#': buf++; /* Returns true if error occured */ if (gn_atem_command_diesis(&buf) == true) { gn_atem_modem_result(MR_ERROR); return; } break; default: gn_atem_modem_result(MR_ERROR); return; } } gn_atem_modem_result(MR_OK); } static void gn_atem_sms_print(char *line, gn_sms *message, int mode) { switch (mode) { case INTERACT_MODE: gsprintf(line, MAX_LINE_LENGTH, _("\r\nDate/time: %d/%d/%d %d:%02d:%02d Sender: %s Msg Center: %s\r\nText: %s\r\n"), message->smsc_time.day, message->smsc_time.month, message->smsc_time.year, message->smsc_time.hour, message->smsc_time.minute, message->smsc_time.second, message->remote.number, message->smsc.number, message->user_data[0].u.text); break; case TEXT_MODE: if ((message->dcs.type == GN_SMS_DCS_GeneralDataCoding) && (message->dcs.u.general.alphabet == GN_SMS_DCS_8bit)) gsprintf(line, MAX_LINE_LENGTH, _("\"%s\",\"%s\",,\"%02d/%02d/%02d,%02d:%02d:%02d+%02d\"\r\n%s"), (message->status ? _("REC READ") : _("REC UNREAD")), message->remote.number, message->smsc_time.year, message->smsc_time.month, message->smsc_time.day, message->smsc_time.hour, message->smsc_time.minute, message->smsc_time.second, message->time.timezone, _("")); else gsprintf(line, MAX_LINE_LENGTH, _("\"%s\",\"%s\",,\"%02d/%02d/%02d,%02d:%02d:%02d+%02d\"\r\n%s"), (message->status ? _("REC READ") : _("REC UNREAD")), message->remote.number, message->smsc_time.year, message->smsc_time.month, message->smsc_time.day, message->smsc_time.hour, message->smsc_time.minute, message->smsc_time.second, message->time.timezone, message->user_data[0].u.text); break; case PDU_MODE: gsprintf(line, MAX_LINE_LENGTH, _("0,")); break; default: gsprintf(line, MAX_LINE_LENGTH, _("")); break; } } static void gn_atem_sms_handle() { gn_error error; char buffer[MAX_LINE_LENGTH]; data.sms->memory_type = SMSType; data.sms->number = SMSNumber; error = gn_sms_get(&data, sm); switch (error) { case GN_ERR_NONE: gn_atem_sms_print(buffer, data.sms, INTERACT_MODE); gn_atem_string_out(buffer); break; default: gsprintf(buffer, MAX_LINE_LENGTH, _("\r\nNo message under number %d\r\n"), SMSNumber); gn_atem_string_out(buffer); break; } return; } /* Parser for SMS interactive mode */ void gn_atem_sms_parse(char *buff) { if (!strcasecmp(buff, "HELP")) { gn_atem_string_out(_("\r\nThe following commands work...\r\n")); gn_atem_string_out("DIR\r\n"); gn_atem_string_out("EXIT\r\n"); gn_atem_string_out("HELP\r\n"); return; } if (!strcasecmp(buff, "DIR")) { SMSNumber = 1; gn_atem_sms_handle(); Parser = gn_atem_dir_parse; return; } if (!strcasecmp(buff, "EXIT")) { Parser = gn_atem_at_parse; gn_atem_modem_result(MR_OK); return; } gn_atem_modem_result(MR_ERROR); } /* Parser for DIR sub mode of SMS interactive mode. */ void gn_atem_dir_parse(char *buff) { switch (toupper(*buff)) { case 'P': SMSNumber--; gn_atem_sms_handle(); return; case 'N': SMSNumber++; gn_atem_sms_handle(); return; case 'D': data.sms->memory_type = SMSType; data.sms->number = SMSNumber; if (gn_sm_functions(GN_OP_DeleteSMS, &data, sm) == GN_ERR_NONE) { gn_atem_modem_result(MR_OK); } else { gn_atem_modem_result(MR_ERROR); } return; case 'Q': Parser= gn_atem_sms_parse; gn_atem_modem_result(MR_OK); return; } gn_atem_modem_result(MR_ERROR); } /* Parser for entering message content (+CMGS) */ void gn_atem_sms_parseText(char *buff) { static int index = 0; int i, length; char buffer[MAX_LINE_LENGTH]; gn_error error; length = strlen(buff); sms.user_data[0].type = GN_SMS_DATA_Text; for (i = 0; i < length; i++) { if (buff[i] == ModemRegisters[REG_CTRLZ]) { /* Exit SMS text mode with sending */ sms.user_data[0].u.text[index] = 0; sms.user_data[0].length = index; index = 0; Parser = gn_atem_at_parse; dprintf("Sending SMS to %s (text: %s)\n", data.sms->remote.number, data.sms->user_data[0].u.text); /* FIXME: set more SMS fields before sending */ error = gn_sms_send(&data, sm); if (error == GN_ERR_NONE) { gsprintf(buffer, MAX_LINE_LENGTH, "+CMGS: %d\r\n", data.sms->number); gn_atem_string_out(buffer); gn_atem_modem_result(MR_OK); } else { gn_atem_modem_result(MR_ERROR); } return; } else if (buff[i] == ModemRegisters[REG_ESCAPE]) { /* Exit SMS text mode without sending */ sms.user_data[0].u.text[index] = 0; sms.user_data[0].length = index; index = 0; Parser = gn_atem_at_parse; gn_atem_modem_result(MR_OK); return; } else { /* Appent next char to message text */ sms.user_data[0].u.text[index++] = buff[i]; } } /* reached the end of line so insert \n and wait for more */ sms.user_data[0].u.text[index++] = '\n'; gn_atem_string_out("\r\n> "); } /* Handle AT+C commands, this is a quick hack together at this stage. */ bool gn_atem_command_plusc(char **buf) { float rflevel = -1; gn_rf_unit rfunits = GN_RF_CSQ; char buffer[MAX_LINE_LENGTH], buffer2[MAX_LINE_LENGTH]; int status, index; gn_error error; if (strncasecmp(*buf, "SQ", 2) == 0) { buf[0] += 2; data.rf_unit = &rfunits; data.rf_level = &rflevel; if (gn_sm_functions(GN_OP_GetRFLevel, &data, sm) == GN_ERR_NONE) { gsprintf(buffer, MAX_LINE_LENGTH, "+CSQ: %0.0f, 99\r\n", *(data.rf_level)); gn_atem_string_out(buffer); return (false); } else { return (true); } } /* AT+CGMI is Manufacturer information for the ME (phone) so it should be Nokia rather than gnokii... */ if (strncasecmp(*buf, "GMI", 3) == 0) { buf[0] += 3; gn_atem_string_out(_("Nokia Mobile Phones\r\n")); return (false); } /* AT+CGSN is IMEI */ if (strncasecmp(*buf, "GSN", 3) == 0) { buf[0] += 3; snprintf(data.imei, GN_IMEI_MAX_LENGTH, "+CME ERROR: 0"); if (gn_sm_functions(GN_OP_GetImei, &data, sm) == GN_ERR_NONE) { gsprintf(buffer, MAX_LINE_LENGTH, "%s\r\n", data.imei); gn_atem_string_out(buffer); return (false); } else { return (true); } } /* AT+CGMR is Revision (hardware) */ if (strncasecmp(*buf, "GMR", 3) == 0) { buf[0] += 3; snprintf(data.revision, GN_REVISION_MAX_LENGTH, "+CME ERROR: 0"); if (gn_sm_functions(GN_OP_GetRevision, &data, sm) == GN_ERR_NONE) { gsprintf(buffer, MAX_LINE_LENGTH, "%s\r\n", data.revision); gn_atem_string_out(buffer); return (false); } else { return (true); } } /* AT+CGMM is Model code */ if (strncasecmp(*buf, "GMM", 3) == 0) { buf[0] += 3; snprintf(data.model, GN_MODEL_MAX_LENGTH, "+CME ERROR: 0"); if (gn_sm_functions(GN_OP_GetModel, &data, sm) == GN_ERR_NONE) { gsprintf(buffer, MAX_LINE_LENGTH, "%s\r\n", data.model); gn_atem_string_out(buffer); return (false); } else { return (true); } } /* AT+CMGD is deleting a message */ if (strncasecmp(*buf, "MGD", 3) == 0) { buf[0] += 3; switch (**buf) { case '=': buf[0]++; index = atoi(*buf); buf[0] += strlen(*buf); data.sms->memory_type = SMSType; data.sms->number = index; error = gn_sm_functions(GN_OP_DeleteSMS, &data, sm); switch (error) { case GN_ERR_NONE: break; default: gsprintf(buffer, MAX_LINE_LENGTH, "\r\n+CMS ERROR: %d\r\n", error); gn_atem_string_out(buffer); return (true); } break; default: return (true); } return (false); } /* AT+CMGF is mode selection for message format */ if (strncasecmp(*buf, "MGF", 3) == 0) { buf[0] += 3; switch (**buf) { case '=': buf[0]++; switch (**buf) { case '0': buf[0]++; MessageFormat = PDU_MODE; break; case '1': buf[0]++; MessageFormat = TEXT_MODE; break; default: return (true); } break; case '?': buf[0]++; gsprintf(buffer, MAX_LINE_LENGTH, "+CMGF: %d\r\n", MessageFormat); gn_atem_string_out(buffer); break; default: return (true); } return (false); } /* AT+CMGR is reading a message */ if (strncasecmp(*buf, "MGR", 3) == 0) { buf[0] += 3; switch (**buf) { case '=': buf[0]++; index = atoi(*buf); buf[0] += strlen(*buf); data.sms->memory_type = SMSType; data.sms->number = index; error = gn_sms_get(&data, sm); switch (error) { case GN_ERR_NONE: gn_atem_sms_print(buffer2, data.sms, MessageFormat); gsprintf(buffer, MAX_LINE_LENGTH, "+CMGR: %s\r\n", buffer2); gn_atem_string_out(buffer); break; default: gsprintf(buffer, MAX_LINE_LENGTH, "\r\n+CMS ERROR: %d\r\n", error); gn_atem_string_out(buffer); return (true); } break; default: return (true); } return (false); } /* AT+CMGS is sending a message */ if (strncasecmp(*buf, "MGS", 3) == 0) { buf[0] += 3; switch (**buf) { case '=': buf[0]++; if (sscanf(*buf, "\"%[+0-9a-zA-Z ]\"", sms.remote.number)) { Parser = gn_atem_sms_parseText; buf[0] += strlen(*buf); gn_atem_string_out("\r\n> "); } return (true); default: return (true); } return (false); } /* AT+CMGL is listing messages */ if (strncasecmp(*buf, "MGL", 3) == 0) { buf[0] += 3; status = -1; switch (**buf) { case 0: case '=': buf[0]++; /* process parameter */ if (*(*buf-1) == 0 || /* i.e. no parameter given */ strcasecmp(*buf, "1") == 0 || strcasecmp(*buf, "3") == 0 || strcasecmp(*buf, "\"REC READ\"") == 0 || strcasecmp(*buf, "\"STO SENT\"") == 0) { status = GN_SMS_Sent; } else if (strcasecmp(*buf, "0") == 0 || strcasecmp(*buf, "2") == 0 || strcasecmp(*buf, "\"REC UNREAD\"") == 0 || strcasecmp(*buf, "\"STO UNSENT\"") == 0) { status = GN_SMS_Unsent; } else if (strcasecmp(*buf, "4") == 0 || strcasecmp(*buf, "\"ALL\"") == 0) { status = 4; /* ALL */ } else { return true; } buf[0] += strlen(*buf); /* check all message storages */ for (index = 1; index <= 20; index++) { data.sms->memory_type = SMSType; data.sms->number = index; error = gn_sms_get(&data, sm); switch (error) { case GN_ERR_NONE: /* print messsage if it has the required status */ if (data.sms->status == status || status == 4 /* ALL */) { gn_atem_sms_print(buffer2, data.sms, MessageFormat); gsprintf(buffer, MAX_LINE_LENGTH, "+CMGL: %d,%s\r\n", index, buffer2); gn_atem_string_out(buffer); } break; case GN_ERR_EMPTYLOCATION: /* don't care if this storage is empty */ break; default: /* print other error codes and quit */ gsprintf(buffer, MAX_LINE_LENGTH, "\r\n+CMS ERROR: %d\r\n", error); gn_atem_string_out(buffer); return (true); } } break; default: return (true); } return (false); } return (true); } /* AT+G commands. Some of these responses are a bit tongue in cheek... */ bool gn_atem_command_plusg(char **buf) { char buffer[MAX_LINE_LENGTH]; /* AT+GMI is Manufacturer information for the TA (Terminal Adaptor) */ if (strncasecmp(*buf, "MI", 3) == 0) { buf[0] += 2; gn_atem_string_out(_("Hugh Blemings, Pavel Janik ml. and others...\r\n")); return (false); } /* AT+GMR is Revision information for the TA (Terminal Adaptor) */ if (strncasecmp(*buf, "MR", 3) == 0) { buf[0] += 2; gsprintf(buffer, MAX_LINE_LENGTH, "%s %s %s\r\n", VERSION, __TIME__, __DATE__); gn_atem_string_out(buffer); return (false); } /* AT+GMM is Model information for the TA (Terminal Adaptor) */ if (strncasecmp(*buf, "MM", 3) == 0) { buf[0] += 2; gsprintf(buffer, MAX_LINE_LENGTH, _("gnokii configured on %s for models %s\r\n"), sm->config.port_device, sm->driver.phone.models); gn_atem_string_out(buffer); return (false); } /* AT+GSN is Serial number for the TA (Terminal Adaptor) */ if (strncasecmp(*buf, "SN", 3) == 0) { buf[0] += 2; gsprintf(buffer, MAX_LINE_LENGTH, _("none built in, choose your own\r\n")); gn_atem_string_out(buffer); return (false); } return (true); } /* Handle AT# commands */ bool gn_atem_command_diesis(char **buf) { int number; char buffer[MAX_LINE_LENGTH]; if (strncasecmp(*buf, "CID", 3) == 0) { buf[0] += 3; switch (**buf) { case '?': buf[0]++; gsprintf(buffer, MAX_LINE_LENGTH, "%d\r\n", CallerIDMode); gn_atem_string_out(buffer); return (false); case '=': buf[0]++; if (**buf == '?') { buf[0]++; gn_atem_string_out("0,1\r\n"); return (false); } else { number = gn_atem_num_get(buf); if ( number == 0 || number == 1 ) { CallerIDMode = number; return (false); } } } } return (true); } /* Send a result string back. There is much work to do here, see the code in the isdn driver for an idea of where it's heading... */ void gn_atem_modem_result(int code) { char buffer[16]; if (!(ModemRegisters[REG_VERBOSE] & BIT_VERBOSE)) { snprintf(buffer, sizeof(buffer), "%d\r\n", code); gn_atem_string_out(buffer); } else { switch (code) { case MR_OK: gn_atem_string_out("OK\r\n"); break; case MR_ERROR: gn_atem_string_out("ERROR\r\n"); break; case MR_CARRIER: gn_atem_string_out("CARRIER\r\n"); break; case MR_CONNECT: gn_atem_string_out("CONNECT\r\n"); break; case MR_NOCARRIER: gn_atem_string_out("NO CARRIER\r\n"); break; case MR_RING: gn_atem_string_out("RING\r\n"); break; default: gn_atem_string_out(_("\r\nUnknown Result Code!\r\n")); break; } } } /* Get integer from char-pointer, set pointer to end of number stolen basically verbatim from ISDN code. */ int gn_atem_num_get(char **p) { int v = -1; while (*p[0] >= '0' && *p[0] <= '9') { v = ((v < 0) ? 0 : (v * 10)) + (int) ((*p[0]++) - '0'); } return v; } /* Write string to virtual modem port, either pty or STDOUT as appropriate. This function is only used during command mode - data pump is used when connected. */ void gn_atem_string_out(char *buffer) { int count = 0; char out_char; while (count < strlen(buffer)) { /* Translate CR/LF/BS as appropriate */ switch (buffer[count]) { case '\r': out_char = ModemRegisters[REG_CR]; break; case '\n': out_char = ModemRegisters[REG_LF]; break; case '\b': out_char = ModemRegisters[REG_BS]; break; default: out_char = buffer[count]; break; } if (write(PtyWRFD, &out_char, 1) < 0) { fprintf(stderr, _("Failed to output string.\n")); perror("write"); return; } count++; } } gnokii-0.6.31/common/data/rlp-crc24.c0000644000175000017500000001176011666163120015265 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 2001-2004 Pawel Kot Copyright (C) 2002-2004 BORBELY Zoltan CRC24 (aka FCS) implementation in RLP. */ #include "config.h" #include "data/rlp-crc24.h" /* CRC-24 table is used for computation of RLP checksum. */ const u32 CRC24_Table[256] = { 0x00000000, 0x00D6A776, 0x00F64557, 0x0020E221, 0x00B78115, 0x00612663, 0x0041C442, 0x00976334, 0x00340991, 0x00E2AEE7, 0x00C24CC6, 0x0014EBB0, 0x00838884, 0x00552FF2, 0x0075CDD3, 0x00A36AA5, 0x00681322, 0x00BEB454, 0x009E5675, 0x0048F103, 0x00DF9237, 0x00093541, 0x0029D760, 0x00FF7016, 0x005C1AB3, 0x008ABDC5, 0x00AA5FE4, 0x007CF892, 0x00EB9BA6, 0x003D3CD0, 0x001DDEF1, 0x00CB7987, 0x00D02644, 0x00068132, 0x00266313, 0x00F0C465, 0x0067A751, 0x00B10027, 0x0091E206, 0x00474570, 0x00E42FD5, 0x003288A3, 0x00126A82, 0x00C4CDF4, 0x0053AEC0, 0x008509B6, 0x00A5EB97, 0x00734CE1, 0x00B83566, 0x006E9210, 0x004E7031, 0x0098D747, 0x000FB473, 0x00D91305, 0x00F9F124, 0x002F5652, 0x008C3CF7, 0x005A9B81, 0x007A79A0, 0x00ACDED6, 0x003BBDE2, 0x00ED1A94, 0x00CDF8B5, 0x001B5FC3, 0x00FB4733, 0x002DE045, 0x000D0264, 0x00DBA512, 0x004CC626, 0x009A6150, 0x00BA8371, 0x006C2407, 0x00CF4EA2, 0x0019E9D4, 0x00390BF5, 0x00EFAC83, 0x0078CFB7, 0x00AE68C1, 0x008E8AE0, 0x00582D96, 0x00935411, 0x0045F367, 0x00651146, 0x00B3B630, 0x0024D504, 0x00F27272, 0x00D29053, 0x00043725, 0x00A75D80, 0x0071FAF6, 0x005118D7, 0x0087BFA1, 0x0010DC95, 0x00C67BE3, 0x00E699C2, 0x00303EB4, 0x002B6177, 0x00FDC601, 0x00DD2420, 0x000B8356, 0x009CE062, 0x004A4714, 0x006AA535, 0x00BC0243, 0x001F68E6, 0x00C9CF90, 0x00E92DB1, 0x003F8AC7, 0x00A8E9F3, 0x007E4E85, 0x005EACA4, 0x00880BD2, 0x00437255, 0x0095D523, 0x00B53702, 0x00639074, 0x00F4F340, 0x00225436, 0x0002B617, 0x00D41161, 0x00777BC4, 0x00A1DCB2, 0x00813E93, 0x005799E5, 0x00C0FAD1, 0x00165DA7, 0x0036BF86, 0x00E018F0, 0x00AD85DD, 0x007B22AB, 0x005BC08A, 0x008D67FC, 0x001A04C8, 0x00CCA3BE, 0x00EC419F, 0x003AE6E9, 0x00998C4C, 0x004F2B3A, 0x006FC91B, 0x00B96E6D, 0x002E0D59, 0x00F8AA2F, 0x00D8480E, 0x000EEF78, 0x00C596FF, 0x00133189, 0x0033D3A8, 0x00E574DE, 0x007217EA, 0x00A4B09C, 0x008452BD, 0x0052F5CB, 0x00F19F6E, 0x00273818, 0x0007DA39, 0x00D17D4F, 0x00461E7B, 0x0090B90D, 0x00B05B2C, 0x0066FC5A, 0x007DA399, 0x00AB04EF, 0x008BE6CE, 0x005D41B8, 0x00CA228C, 0x001C85FA, 0x003C67DB, 0x00EAC0AD, 0x0049AA08, 0x009F0D7E, 0x00BFEF5F, 0x00694829, 0x00FE2B1D, 0x00288C6B, 0x00086E4A, 0x00DEC93C, 0x0015B0BB, 0x00C317CD, 0x00E3F5EC, 0x0035529A, 0x00A231AE, 0x007496D8, 0x005474F9, 0x0082D38F, 0x0021B92A, 0x00F71E5C, 0x00D7FC7D, 0x00015B0B, 0x0096383F, 0x00409F49, 0x00607D68, 0x00B6DA1E, 0x0056C2EE, 0x00806598, 0x00A087B9, 0x007620CF, 0x00E143FB, 0x0037E48D, 0x001706AC, 0x00C1A1DA, 0x0062CB7F, 0x00B46C09, 0x00948E28, 0x0042295E, 0x00D54A6A, 0x0003ED1C, 0x00230F3D, 0x00F5A84B, 0x003ED1CC, 0x00E876BA, 0x00C8949B, 0x001E33ED, 0x008950D9, 0x005FF7AF, 0x007F158E, 0x00A9B2F8, 0x000AD85D, 0x00DC7F2B, 0x00FC9D0A, 0x002A3A7C, 0x00BD5948, 0x006BFE3E, 0x004B1C1F, 0x009DBB69, 0x0086E4AA, 0x005043DC, 0x0070A1FD, 0x00A6068B, 0x003165BF, 0x00E7C2C9, 0x00C720E8, 0x0011879E, 0x00B2ED3B, 0x00644A4D, 0x0044A86C, 0x00920F1A, 0x00056C2E, 0x00D3CB58, 0x00F32979, 0x00258E0F, 0x00EEF788, 0x003850FE, 0x0018B2DF, 0x00CE15A9, 0x0059769D, 0x008FD1EB, 0x00AF33CA, 0x007994BC, 0x00DAFE19, 0x000C596F, 0x002CBB4E, 0x00FA1C38, 0x006D7F0C, 0x00BBD87A, 0x009B3A5B, 0x004D9D2D }; void rlp_crc24polinomial_calculate(u8 *data, int length, u32 *polinomial) { int i; u8 cur; *polinomial = 0x00ffffff; for (i = 0; i < length; i++) { cur = (*polinomial & 0x0000ffff) ^ data[i]; *polinomial = (*polinomial >> 8) ^ CRC24_Table[cur]; } *polinomial = ((~*polinomial) & 0x00ffffff); } void rlp_crc24checksum_calculate(u8 *data, int length, u8 *crc) { u32 polinomial; rlp_crc24polinomial_calculate(data, length, &polinomial); crc[0] = polinomial & 0x0000ffff; crc[1] = (polinomial >> 8) & 0x0000ffff; crc[2] = (polinomial >> 16) & 0x0000ffff; } bool rlp_crc24fcs_check(u8 *data, int length) { u8 crc[] = { 0x00, 0x00, 0x00 }; rlp_crc24checksum_calculate(data, length - 3, crc); if (((data[length - 3] == crc[0]) && (data[length - 2] == crc[1]) && (data[length - 1] == crc[2]))) { return (true); } return (false); } gnokii-0.6.31/common/data/rlp-common.c0000644000175000017500000011572711666163120015650 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 2001 Chris Kemp Copyright (C) 2002-2004 BORBELY Zoltan The development of RLP protocol is sponsored by SuSE CR, s.r.o. (Pavel uses the SIM card from SuSE for testing purposes). Actual implementation of RLP protocol. Based on GSM 04.22 version 7.1.0, downloadable from www.etsi.org (if you register with them) */ #include "config.h" #include #include #include #include #include "compat.h" #include "gnokii.h" #include "data/rlp-crc24.h" #include "misc.h" /* For u8, u32 etc. */ #ifdef WIN32 # define INLINE __inline #else # define INLINE inline #endif #ifndef RLP_DEBUG # define rlpprintf(a...) do { } while (0) #else # define rlpprintf(a...) do { gn_log_rlpdebug(a); } while (0) #endif /* Our state machine which handles all of nine possible states of RLP machine. */ void MAIN_STATE_MACHINE(gn_rlp_f96_frame *frame, rlp_f96_header *header); /* This is the type we are just handling. */ rlp_frame_types CurrentFrameType; /* Current state of RLP state machine. */ rlp_state CurrentState=RLP_S0; /* We start at ADM and Detached */ /* Next state of RLP state machine. */ rlp_state NextState; /* Pointer to Send function that sends frame to phone. */ int (*RLP_SendFunction)(gn_rlp_f96_frame *frame, int out_dtx); /* Pointer to Passup function which returns data/inds */ int (*RLP_Passup)(rlp_user_inds ind, unsigned char *buffer, int length); /* State variables - see GSM 04.22, Annex A, section A.1.2 */ rlp_state_variable UA_State; rlp_state_variable UI_State; rlp_state_variable Ackn_State; rlp_state_variable Poll_State; rlp_state_variable Poll_xchg; rlp_state_variable SABM_State; rlp_state_variable DISC_State; rlp_state_variable DM_State; /* FIXME - not handled */ rlp_state_variable XI_R_State; rlp_state_variable XID_C_State; rlp_state_variable XID_R_State; rlp_state_variable TEST_R_State; u8 VR=0; u8 VA=0; u8 VS=0; u8 VD=0; u8 DISC_Count; u8 DTX_VR; rlp_frame_types DTX_SF; #define RLP_M 62 rlp_data R[RLP_M]; rlp_data S[RLP_M]; rlp_state_variable SABM_State; int SABM_Count; rlp_user_request_store UserRequests; u8 Poll_Count = 0; /* For now timing is done based on a frame reception rate of 20ms */ /* Serge has measured it as 18.4ms */ #define RLP_T_Scaling 2 /* Timers - a value of -1 means not set */ /* To set, timer is loaded with RLP_Timeout1_Limit/RLP_T_Scaling. */ /* Each received frame (including NULLS / errors) any >0 timer is decrease */ int T; int T_RCVS[RLP_M]; bool UA_FBit = true; bool Ackn_FBit = false; bool DM_FBit = false; /* FIXME - not handled */ bool RRReady = false; bool LRReady = true; /* FIXME - not handled (as if we couldn't keep up with 9600bps :-) */ bool DISC_PBit = false; u8 LastStatus = 0xff; /* Last Status byte */ /* RLP Parameters. FIXME: Reset these - e.g. when entering state 0 */ u8 RLP_SEND_WS = RLP_M-1; u8 RLP_RCV_WS = RLP_M-1; u8 RLP_Timeout1_Limit = 55; u8 RLP_N2 = 15; /* Maximum number of retransmisions. GSM spec says 6 here, but Nokia will XID this. */ u8 RLP_T2 = 0; u8 RLP_VersionNumber = 0; /****** Externally called functions ********/ /*******************************************/ /* Function to initialise RLP code. Main purpose for now is to set the address of the RLP send function in the API code. */ void rlp_initialise(int (*rlp_send_function)(gn_rlp_f96_frame *frame, int out_dtx), int (*rlp_passup)(rlp_user_inds ind, unsigned char *buffer, int length)) { int i; RLP_SendFunction = rlp_send_function; RLP_Passup = rlp_passup; UserRequests.Conn_Req = false; UserRequests.Attach_Req = false; UserRequests.Conn_Req_Neg = false; UserRequests.Reset_Resp = false; UserRequests.Disc_Req = false; CurrentState = RLP_S0; T = -1; for (i = 0; i < RLP_M; i++) T_RCVS[i] = -1; UA_FBit = true; Ackn_FBit = false; DISC_PBit = false; LastStatus = 0xff; Poll_Count = 0; VR = 0; VA = 0; VS = 0; VD = 0; RLP_SEND_WS = RLP_M-1; RLP_RCV_WS = RLP_M-1; RLP_Timeout1_Limit = 55; RLP_N2 = 15; RLP_T2 = 0; RLP_VersionNumber = 0; } /* Set a user event */ /* Called by user program for now */ void rlp_user_request_set(rlp_user_requests type, int value) { switch (type) { case Conn_Req: UserRequests.Conn_Req = value; break; case Attach_Req: UserRequests.Attach_Req = value; break; case Conn_Req_Neg: UserRequests.Conn_Req_Neg = value; break; case Reset_Resp: UserRequests.Reset_Resp = value; break; case Disc_Req: UserRequests.Disc_Req = value; break; default: break; } } /***** Internal functions **********/ /***********************************/ /* Check whether a user event is set */ int rlp_user_request_get(rlp_user_requests type) { int result = false, *x; switch (type) { case Conn_Req: x = &UserRequests.Conn_Req; break; case Attach_Req: x = &UserRequests.Attach_Req; break; case Conn_Req_Neg: x = &UserRequests.Conn_Req_Neg; break; case Reset_Resp: x = &UserRequests.Reset_Resp; break; case Disc_Req: x = &UserRequests.Disc_Req; break; default: x = &result; break; } result = *x; return result; } void RLP_SetTimer(int *timer) { *timer = (int)(RLP_Timeout1_Limit/RLP_T_Scaling); } /* Previous sequence number. */ static INLINE u8 Decr(u8 x) { if (x == 0) return (RLP_M-1); else return (x-1); } /* Next sequence number. */ static INLINE u8 Incr(u8 x) { if (x == RLP_M-1) return 0; else return (x+1); } /* Difference between sequence numbers. */ /* FIXME: Not used now, so I have commented it out. PJ * static INLINE u8 Diff(u8 x, u8 y) * { * int result = x-y; * return (result >= 0) ? result : result + RLP_M; * } */ /* Check value is within range */ static bool InWindow(u8 val, u8 lower, u8 upper) { /* allow for one level of wrapping round */ if (lower >= RLP_M) lower -= RLP_M; if (upper >= RLP_M) upper -= RLP_M; if (val >= RLP_M) val -= RLP_M; /* .......L*****U....... */ if (lower <= upper) return (val >= lower) && (val <= upper); /* ******U.........L***** */ return (val <= upper) || (val >= lower); } void RLP_Init_link_vars(void) { int i; Ackn_State = _idle; Poll_State = _idle; Poll_Count = 0; Poll_xchg = _idle; SABM_State = _idle; DISC_State = _idle; RRReady = true; /* This seems a bit strange but it's what the spec says... */ VA = 0; VR = 0; VS = 0; VD = 0; LastStatus = 0xff; for (i = 0; i < RLP_M; i++) { R[i].State = _idle; S[i].State = _idle; } } void RLP_AddRingBufferDataToSlots(void) { u8 buffer[24]; int size; while ((S[VD].State == _idle) && ((size = RLP_Passup(GetData,buffer,24)) != 0)) { memset(S[VD].Data, 0xff, 25); /* FIXME - this isn't necessary - but makes debugging easier! */ if (size > 23) { S[VD].Data[0] = 0x1e; size = 24; } else S[VD].Data[0] = size; memcpy(&S[VD].Data[1], buffer, size); if (size != 24) S[VD].Data[size+1] = 0x1f; S[VD].State = _send; VD = Incr(VD); } } static void RLP_DumpF96Frame(gn_rlp_f96_frame *frame) { rlp_f96_header header; rlp_f96_header_decode(frame, &header); switch (header.Type) { case RLP_FT_U: /* Unnumbered frames. */ rlpprintf("Unnumbered Frame [$%02x%02x] M=%02x ", frame->Header[0], frame->Header[1], header.M); switch (header.M) { case RLP_U_SABM : rlpprintf("Set Asynchronous Balanced Mode (SABM) "); break; case RLP_U_UA: rlpprintf("Unnumbered Acknowledge (UA) "); break; case RLP_U_DISC: rlpprintf("Disconnect (DISC) "); break; case RLP_U_DM: rlpprintf("Disconnected Mode (DM) "); break; case RLP_U_UI: rlpprintf("Unnumbered Information (UI) "); break; case RLP_U_XID: rlpprintf("Exchange Information (XID) \n"); rlp_xid_display(frame->Data); break; case RLP_U_TEST: rlpprintf("Test (TEST) "); break; case RLP_U_NULL: rlpprintf("Null information (NULL) "); break; case RLP_U_REMAP: rlpprintf("Remap (REMAP) "); break; default: rlpprintf("Unknown!!! "); break; } break; case RLP_FT_S: /* Supervisory frames. */ rlpprintf("Supervisory Frame [$%02x%02x] S=0x%x N(R)=%d ", frame->Header[0], frame->Header[1], header.S, header.Nr); switch (header.S) { case RLP_S_RR: rlpprintf("RR"); break; case RLP_S_REJ: rlpprintf("REJ"); break; case RLP_S_RNR: rlpprintf("RNR"); break; case RLP_S_SREJ: rlpprintf("SREJ"); break; default: rlpprintf("BAD"); break; } break; default: rlpprintf("Info+Supervisory Frame [$%02x%02x] S=0x%x N(S)=%d N(R)=%d ", frame->Header[0], frame->Header[1], header.S, header.Ns, header.Nr); switch (header.S) { case RLP_S_RR: rlpprintf("RR"); break; case RLP_S_REJ: rlpprintf("REJ"); break; case RLP_S_RNR: rlpprintf("RNR"); break; case RLP_S_SREJ: rlpprintf("SREJ"); break; default: rlpprintf("BAD"); break; } break; } /* Command/Response and Poll/Final bits. */ rlpprintf(" C/R=%d P/F=%d", header.CR, header.PF); /* Information. */ /* if (CurrentFrameType != RLP_FT_U_NULL) { dprintf("\n"); for (count = 0; count < 25; count ++) { if (isprint(frame->Data[count])) dprintf("[%02x%c]", frame->Data[count], frame->Data[count]); else dprintf("[%02x ]", frame->Data[count]); if (count == 15) dprintf("\n"); } } */ /* FCS. */ rlpprintf(" FCS: %02x %02x %02x\n\n", frame->FCS[0], frame->FCS[1], frame->FCS[2]); } /* FIXME: Remove this after finishing. */ void X(gn_rlp_f96_frame *frame) { int i; for (i = 0; i < 30; i++) dprintf("byte[%2d]: %02x\n", i, *( (u8 *)frame + i)); } void ResetAllT_RCVS(void) { int i; for (i = 0; i < RLP_M; i++) T_RCVS[i] = -1; } /* This function is used for sending RLP frames to the phone. */ void RLP_SendF96Frame(rlp_frame_types FrameType, bool OutCR, bool OutPF, u8 OutNR, u8 OutNS, u8 *OutData, u8 OutDTX) { gn_rlp_f96_frame frame; int i; frame.Header[0] = 0; frame.Header[1] = 0; #define SetCRBit frame.Header[0] |= 0x01; #define SetPFBit frame.Header[1] |= 0x02; #define ClearCRBit frame.Header[0] &= (~0x01); #define ClearPFBit frame.Header[1] &= (~0x02); /* If Command/Response bit is set, set it in the header. */ if (OutCR) SetCRBit; /* If Poll/Final bit is set, set it in the header. */ if (OutPF) SetPFBit; /* If OutData is not specified (ie. is NULL) we want to clear frame.Data array for the user. */ if (!OutData) { frame.Data[0] = 0x00; /* 0x1f */ for (i = 1; i < 25; i++) frame.Data[i] = 0; } else { for (i = 0; i < 25; i++) frame.Data[i] = OutData[i]; } #define PackM(x) frame.Header[1] |= ((x) << 2); #define PackS(x) frame.Header[0]|=((x) << 1); #define PackNR frame.Header[1] |= (OutNR << 2); #define PackNS frame.Header[0] |= (OutNS << 3); frame.Header[1] |= (OutNS >> 5); switch (FrameType) { /* Unnumbered frames. Be careful - some commands are used as commands only, so we have to set C/R bit later. We should not allow user for example to send SABM as response because in the spec is: The SABM encoding is used as command only. */ case RLP_FT_U_SABM: frame.Header[0] |= 0xf8; /* See page 11 of the GSM 04.22 spec - 0 X X 1 1 1 1 1 */ frame.Header[1] |= 0x01; /* 1 P/F M1 M2 M3 M4 M5 X */ SetCRBit; /* The SABM encoding is used as a command only. */ SetPFBit; /* It is always used with the P-bit set to "1". */ PackM(RLP_U_SABM); break; case RLP_FT_U_UA: frame.Header[0] |= 0xf8; frame.Header[1] |= 0x01; ClearCRBit; /* The UA encoding is used as a response only. */ PackM(RLP_U_UA); break; case RLP_FT_U_DISC: frame.Header[0] |= 0xf8; frame.Header[1] |= 0x01; SetCRBit; /* The DISC encoding is used as a command only. */ PackM(RLP_U_DISC); break; case RLP_FT_U_DM: frame.Header[0] |= 0xf8; frame.Header[1] |= 0x01; ClearCRBit; /* The DM encoding is used as a response only. */ PackM(RLP_U_DM); break; case RLP_FT_U_NULL: frame.Header[0] |= 0xf8; frame.Header[1] |= 0x01; PackM(RLP_U_NULL); break; case RLP_FT_U_UI: frame.Header[0] |= 0xf8; frame.Header[1] |= 0x01; PackM(RLP_U_UI); break; case RLP_FT_U_XID: frame.Header[0] |= 0xf8; frame.Header[1] |= 0x01; SetPFBit; /* XID frames are always used with the P/F-bit set to "1". */ PackM(RLP_U_XID); break; case RLP_FT_U_TEST: frame.Header[0] |= 0xf8; frame.Header[1] |= 0x01; PackM(RLP_U_TEST); break; case RLP_FT_U_REMAP: frame.Header[0] |= 0xf8; frame.Header[1] |= 0x01; ClearPFBit; /* REMAP frames are always used with P/F-bit set to "0". */ PackM(RLP_U_REMAP); break; case RLP_FT_S_RR: frame.Header[0] |= 0xf0; /* See page 11 of the GSM 04.22 spec - 0 X X 1 1 1 1 1 */ frame.Header[1] |= 0x01; /* 1 P/F ...N(R)... */ PackNR; PackS(RLP_S_RR); break; case RLP_FT_S_REJ: frame.Header[0] |= 0xf0; frame.Header[1] |= 0x01; PackNR; PackS(RLP_S_REJ); break; case RLP_FT_S_RNR: frame.Header[0] |= 0xf0; frame.Header[1] |= 0x01; PackNR; PackS(RLP_S_RNR); break; case RLP_FT_S_SREJ: frame.Header[0] |= 0xf0; frame.Header[1] |= 0x01; PackNR; PackS(RLP_S_SREJ); break; case RLP_FT_SI_RR: PackNR; PackNS; PackS(RLP_S_RR); break; case RLP_FT_SI_REJ: PackNR; PackNS; PackS(RLP_S_REJ); break; case RLP_FT_SI_RNR: PackNR; PackNS; PackS(RLP_S_RNR); break; case RLP_FT_SI_SREJ: PackNR; PackNS; PackS(RLP_S_SREJ); break; default: break; } /* Store FCS in the frame. */ rlp_crc24checksum_calculate((u8 *)&frame, 27, frame.FCS); /* X(&frame); */ rlpprintf("S "); RLP_DumpF96Frame(&frame); if (RLP_SendFunction) RLP_SendFunction(&frame, OutDTX); } /* Check_input_PDU in Serge's code. */ void rlp_f96_frame_display(gn_rlp_f96_frame *frame) { int count; rlp_f96_header header; if (T >= 0) T--; for (count = 0; count < RLP_M; count++) if (T_RCVS[count] >= 0) T_RCVS[count]--; CurrentFrameType = RLP_FT_BAD; if (!frame) { /* no frame provided, drop through to state machine anyway */ } else if (rlp_crc24fcs_check((u8 *)frame, 30) == true) { /* Here we have correct RLP frame so we can parse the field of the header to out structure. */ rlpprintf("R "); RLP_DumpF96Frame(frame); rlp_f96_header_decode(frame, &header); switch (header.Type) { case RLP_FT_U: /* Unnumbered frames. */ switch (header.M) { case RLP_U_SABM : if (header.CR == 0 || header.PF == 0) break; CurrentFrameType = RLP_FT_U_SABM; break; case RLP_U_UA: if (header.CR == 1) break; CurrentFrameType = RLP_FT_U_UA; break; case RLP_U_DISC: if (header.CR == 0) break; CurrentFrameType = RLP_FT_U_DISC; break; case RLP_U_DM: if (header.CR == 1) break; CurrentFrameType = RLP_FT_U_DM; break; case RLP_U_UI: CurrentFrameType = RLP_FT_U_UI; break; case RLP_U_XID: CurrentFrameType = RLP_FT_U_XID; break; case RLP_U_TEST: CurrentFrameType = RLP_FT_U_TEST; break; case RLP_U_NULL: CurrentFrameType = RLP_FT_U_NULL; break; case RLP_U_REMAP: CurrentFrameType = RLP_FT_U_REMAP; break; default: CurrentFrameType = RLP_FT_BAD; break; } break; case RLP_FT_S: /* Supervisory frames. */ switch (header.S) { case RLP_S_RR: CurrentFrameType = RLP_FT_S_RR; break; case RLP_S_REJ: CurrentFrameType = RLP_FT_S_REJ; break; case RLP_S_RNR: CurrentFrameType = RLP_FT_S_RNR; break; case RLP_S_SREJ: CurrentFrameType = RLP_FT_S_SREJ; break; default: CurrentFrameType = RLP_FT_BAD; break; } break; default: switch (header.S) { case RLP_S_RR: CurrentFrameType = RLP_FT_SI_RR; break; case RLP_S_REJ: CurrentFrameType = RLP_FT_SI_REJ; break; case RLP_S_RNR: CurrentFrameType = RLP_FT_SI_RNR; break; case RLP_S_SREJ: CurrentFrameType = RLP_FT_SI_SREJ; break; default: CurrentFrameType = RLP_FT_BAD; break; } break; } } else { /* RLP Checksum failed - don't we need some statistics about these failures? Nothing is printed, because in the first stage of connection there are too many bad RLP frames... */ dprintf("Frame FCS is bad. Ignoring...\n"); } MAIN_STATE_MACHINE(frame, &header); /* Y:= outblock(); */ return; } /* FIXME: real TEST_Handling - we do not handle TEST yet. */ void TEST_Handling() { return; } /* FIXME: better XID_handling - but this will answer a XID command. */ bool XID_Handling (gn_rlp_f96_frame *frame, rlp_f96_header *header) { u8 count; u8 type; u8 length; if (CurrentFrameType == RLP_FT_U_XID) { count = 0; while (frame->Data[count] != 0) { type = frame->Data[count] >> 4; length = frame->Data[count] & 0x0f; count++; switch (type) { case 0x01: /* RLP Version Number */ RLP_VersionNumber = frame->Data[count]; count += length; break; case 0x02: /* Interworking Function (IWF) to Mobile Station (MS) window size */ if (frame->Data[count] >= 1 && frame->Data[count] < RLP_M) RLP_RCV_WS = frame->Data[count]; count += length; break; case 0x03: /* MS to IWF window size */ if (frame->Data[count] >= 1 && frame->Data[count] < RLP_M) RLP_SEND_WS = frame->Data[count]; count += length; break; case 0x04: /* Acknowledgement Timer (T1). */ RLP_Timeout1_Limit = frame->Data[count]; count += length; break; case 0x05: /* Retransmission attempts (N2). */ RLP_N2 = frame->Data[count]; count += length; break; case 0x06: /* Reply delay (T2). */ RLP_T2 = frame->Data[count]; count += length; break; case 0x07: /* Compression - not yet! */ break; default: count += length; break; } } /* Now reassemble a reply */ count = 0; memset(frame->Data, 0x00, 25); /* Makes debugging easier */ /* Version Number - force to 0 for now */ RLP_VersionNumber = 0; frame->Data[count++] = 0x11; frame->Data[count++] = RLP_VersionNumber; /* Window sizes */ frame->Data[count++] = 0x21; frame->Data[count++] = RLP_RCV_WS; frame->Data[count++] = 0x31; frame->Data[count++] = RLP_SEND_WS; /* Acknowledgement Timer (T1). */ frame->Data[count++] = 0x41; frame->Data[count++] = RLP_Timeout1_Limit; /* Retransmission attempts (N2). */ frame->Data[count++] = 0x51; frame->Data[count++] = RLP_N2; /* Reply delay (T2). */ frame->Data[count++] = 0x61; frame->Data[count++] = RLP_T2; XID_R_State = _send; return true; } return false; } bool Send_TXU(gn_rlp_f96_frame *frame, rlp_f96_header *header) { dprintf("Send_TXU()\n"); dprintf("XID_R_State=%d\n", XID_R_State); /* if (RLP_UserEvent(TEST_R_State)) { RLP_SendF96Frame(RLP_FT_U_TEST, false, TEST_R_FBit, 0, 0, TEST_R_Data, false); return true; } else */ if (XID_R_State == _send && frame) { RLP_SendF96Frame(RLP_FT_U_XID, false, true, 0, 0, frame->Data, false); XID_R_State = _idle; return true; } /* else if ((XID_C_State == _send ) && (Poll_xchg == _idle)) { RLP_SendF96Frame(RLP_FT_U_XID, true, true, 0, 0, XID_C_Data, false); XID_C_State = _wait; T_XID = 1; Poll_xchg = _wait; return true; } else if (RLP_UserEvent(UI_State)) { RLP_SendF96Frame(RLP_FT_U_UI, true, false, 0, 0, NULL, false); return true; } */ return false; } /* Deliver data */ void RLP_DeliverAllInSeqIF() { int i,j; do { if ((R[VR].Data[0] & 0xE0) != LastStatus) { LastStatus = (R[VR].Data[0] & 0xE0); RLP_Passup(StatusChange, &LastStatus, 0); } j = 0; i = R[VR].Data[0] & 0x1f; if (i == 0x1e) j = 24; if (i < 0x18) j = i; /* FIXME - should check for more data in the frame */ RLP_Passup(Data, R[VR].Data+1, j); R[VR].State = _idle; VR = Incr(VR); } while (R[VR].State == _rcvd); } /* Mark any missing information frames between VR and Ns */ void RLP_MarkMissingIF(u8 Ns) { u8 i; for (i = VR; i != Ns; i = Incr(i)) { if (R[i].State == _idle) R[i].State = _srej; /* bug in spec, fig A.23 */ } } /* Information frame handler */ bool RLP_I_Handler(gn_rlp_f96_frame *frame, rlp_f96_header *header) { if ((header->CR) && (header->PF)) return true; /* If the window size is 61, a received frame must have a sequence number between VR and VR+60 */ if (!InWindow(header->Ns, VR, VR + RLP_RCV_WS - 1)) return true; if (header->Ns == VR) { /* This is not in the spec but I think it is necessary */ if (R[header->Ns].State == _wait) T_RCVS[header->Ns] = -1; R[VR].State = _rcvd; memcpy(R[VR].Data, frame->Data, 25); RLP_DeliverAllInSeqIF(); Ackn_State = _send; } else { /* Out of sequence, cause a SREJ */ if (R[header->Ns].State == _wait) T_RCVS[header->Ns] = -1; R[header->Ns].State = _rcvd; memcpy(R[header->Ns].Data, frame->Data, 25); RLP_MarkMissingIF(header->Ns); } return false; } /* Mark acknowledged send frames */ void RLP_AdvanceVA(u8 Nr) { while (VA != Nr) { S[VA].State = _idle; VA = Incr(VA); } } /* Decrease VS back down to Nr since these have not been acknowledged */ void RLP_DecreaseVS(u8 Nr) { while (VS != Nr) { VS = Decr(VS); S[VS].State = _send; } } /* Supervisory frame handling */ void RLP_S_Handler(gn_rlp_f96_frame *frame, rlp_f96_header *header) { u8 i; if ((header->CR) && (header->PF)) { /* Special exchange (ie. error) - counter? */ rlpprintf("Got Poll command\n"); Ackn_State = _send; Ackn_FBit = true; for (i = 0; i < RLP_M; i++) R[i].State = _idle; ResetAllT_RCVS(); } if (Poll_State != _idle) { if (header->PF == 0) return; if ((CurrentFrameType == RLP_FT_S_SREJ) || (CurrentFrameType == RLP_FT_S_REJ) || (CurrentFrameType == RLP_FT_SI_SREJ) || (CurrentFrameType == RLP_FT_SI_REJ)) return; RLP_DecreaseVS(header->Nr); Poll_State = _idle; Poll_xchg = _idle; } switch (CurrentFrameType) { case RLP_FT_S_RR: case RLP_FT_SI_RR: RLP_AdvanceVA(header->Nr); RRReady = true; break; case RLP_FT_S_RNR: case RLP_FT_SI_RNR: RLP_AdvanceVA(header->Nr); RRReady = false; break; case RLP_FT_S_REJ: case RLP_FT_SI_REJ: RLP_AdvanceVA(header->Nr); RRReady = true; RLP_DecreaseVS(header->Nr); break; case RLP_FT_S_SREJ: case RLP_FT_SI_SREJ: S[header->Nr].State = _send; T = -1; return; default: break; } if (VA == VS) T = -1; } /* Find the first SREJ frame */ bool RLP_SREJSlot(u8 *x) { u8 i; for (i = Incr(VR); i != VR; i = Incr(i)) if (R[i].State == _srej) { *x = i; return true; } return false; } /* Check if any SREJ frames need sending, if not send the next in line */ bool RLP_PrepareDataToTransmit(u8 *p) { u8 i; for (i = VA; i != VS; i = Incr(i)) if (S[i].State == _send) { *p = i; S[i].State = _wait; return true; } if (S[VS].State != _send) return false; if (!InWindow(VS, VA, VA + RLP_SEND_WS - 1)) return false; *p = VS; S[VS].State = _wait; VS = Incr(VS); return true; } /* Send a SREJ command */ void RLP_SendSREJ(u8 x) { u8 k; if ((Poll_xchg == _idle) && (Poll_State == _send)) { rlpprintf("Sending SREJ with poll\n"); RLP_SendF96Frame(RLP_FT_S_SREJ, true, true, x, 0, NULL, false); R[x].State = _wait; RLP_SetTimer(&T_RCVS[x]); Poll_Count++; Poll_State = _wait; Poll_xchg = _wait; RLP_SetTimer(&T); } else if (RRReady && RLP_PrepareDataToTransmit(&k)) { rlpprintf("Sending SREJ for %d along with frame %d\n", x, k); RLP_SendF96Frame(RLP_FT_SI_SREJ, true, false, x , k , S[k].Data, false); R[x].State = _wait; RLP_SetTimer(&T_RCVS[x]); RLP_SetTimer(&T); } else { rlpprintf("Sending SREJ for %d\n",x); RLP_SendF96Frame(RLP_FT_S_SREJ, true, false, x, 0, NULL, false); R[x].State = _wait; RLP_SetTimer(&T_RCVS[x]); } } /* Send a command */ void RLP_Send_XX_Cmd(rlp_frame_types type) { u8 k; if ((Poll_xchg != _wait) && (Poll_State == _send)) { RLP_SendF96Frame(type, true, true, VR, 0, NULL, false); rlpprintf("Sending Comd %x with Poll\n",type); Ackn_State = _idle; Poll_Count++; Poll_State = _wait; Poll_xchg = _wait; RLP_SetTimer(&T); } else if (RRReady && RLP_PrepareDataToTransmit(&k)) { rlpprintf("Sending Comd %x with frame %d\n", type, k); RLP_SendF96Frame(type + 4, true, false, VR, k, S[k].Data, false); Ackn_State = _idle; RLP_SetTimer(&T); } else { if (type != 9) rlpprintf("Sending Comd %x\n",type); RLP_SendF96Frame(type, true, false, VR, 0, NULL, false); Ackn_State = _idle; DTX_SF = type; DTX_VR = VR; /* As v7.1.0 spec */ } } /* Send a Response */ void RLP_Send_XX_Resp(rlp_frame_types type) { u8 k; if (RRReady && RLP_PrepareDataToTransmit(&k)) { rlpprintf("Sending Resp %x with frame %d\n",type+4,k); RLP_SendF96Frame(type + 4, false, true, VR, k, S[k].Data, false); Ackn_State = _idle; Ackn_FBit = false; RLP_SetTimer(&T); } else { rlpprintf("Sending Resp %x\n",type); RLP_SendF96Frame(type, false, true, VR, 0, NULL, false); Ackn_State = _idle; Ackn_FBit = false; } } /* Decide which frame to use and send it - currently only used in state 4 */ void RLP_SendData() { u8 x; if (UA_State == _send) { RLP_SendF96Frame(RLP_FT_U_UA, false, UA_FBit, 0, 0, NULL, false); UA_State = _idle; } else if (Ackn_FBit == true) { rlpprintf("About to send Poll resp\n"); if (LRReady) RLP_Send_XX_Resp(RLP_FT_S_RR); else RLP_Send_XX_Resp(RLP_FT_S_RNR); } else if (RLP_SREJSlot(&x)) RLP_SendSREJ(x); else if (LRReady) RLP_Send_XX_Cmd(RLP_FT_S_RR); else RLP_Send_XX_Cmd(RLP_FT_S_RNR); } void MAIN_STATE_MACHINE(gn_rlp_f96_frame *frame, rlp_f96_header *header) { int i; switch (CurrentState) { /***** RLP State 0. *****/ /* ADM and Detached. This is the initial state after power on. As long as the RLP entity is "Detached", DISC(P) and/or SABM at the lower interface is acted upon by sending DM(P) or DM(1). Any other stimulus at the lower interface is ignored. This state can be exited only with Attach_Req. */ case RLP_S0: dprintf("RLP state 0.\n"); switch (CurrentFrameType) { case RLP_FT_U_DISC: RLP_SendF96Frame(RLP_FT_U_DM, false, header->PF, 0, 0, NULL, false); break; case RLP_FT_U_SABM: RLP_SendF96Frame(RLP_FT_U_DM, false, true, 0, 0, NULL, false); break; default: RLP_SendF96Frame(RLP_FT_U_NULL, false, false, 0, 0, NULL, false); if (rlp_user_request_get(Attach_Req)) { NextState = RLP_S1; UA_State = _idle; } break; } break; /***** RLP State 1. *****/ /* ADM and Attached. The RLP entity is ready to established a connection, either by initiating the connection itself (Conn_Req) or by responding to an incoming connection request (SABM). Upon receiving a DISC PDU, the handling of the UA response is initiated. */ case RLP_S1: dprintf("RLP state 1.\n"); if (!XID_Handling(frame, header)) { switch(CurrentFrameType) { case RLP_FT_U_TEST: TEST_Handling(); break; case RLP_FT_U_SABM: RLP_Passup(Conn_Ind, NULL, 0); NextState = RLP_S3; break; case RLP_FT_U_DISC: UA_State = _send; UA_FBit = header->PF; break; case RLP_FT_BAD: /* If we get a bad frame we can still respond with SABM */ default: if (rlp_user_request_get(Conn_Req)) { SABM_State = _send; SABM_Count = 0; NextState = RLP_S2; } break; } } if (!Send_TXU(frame, header)) { if (UA_State == _send) { RLP_SendF96Frame(RLP_FT_U_UA, false, UA_FBit, 0, 0, NULL, false); UA_State = _idle; } else RLP_SendF96Frame(RLP_FT_U_NULL, false, false, 0, 0, NULL, false); } break; /***** RLP State 2. *****/ case RLP_S2: dprintf("RLP state 2.\n"); if (!XID_Handling(frame, header)) { switch(CurrentFrameType) { case RLP_FT_U_TEST: TEST_Handling(); break; case RLP_FT_U_SABM: /* Conn_Conf = true; */ T = -1; UA_State = _send; UA_FBit = true; RLP_Init_link_vars(); NextState = RLP_S4; break; case RLP_FT_U_DISC: T = -1; RLP_Passup(Disc_Ind, NULL, 0); UA_State = _send; UA_FBit = header->PF; NextState = RLP_S1; break; case RLP_FT_U_UA: dprintf("UA received in RLP state 2.\n"); if (SABM_State == _wait && header->PF) { T = -1; /* Conn_Conf = true; */ RLP_Init_link_vars(); NextState = RLP_S4; } break; case RLP_FT_U_DM: if (SABM_State == _wait && header->PF) { Poll_xchg = _idle; /* Conn_Conf_Neg = true; */ NextState = RLP_S1; } break; default: if (T == RLP_Timeout1_Limit || T == 0) { Poll_xchg = _idle; if (SABM_Count > RLP_N2) NextState = RLP_S8; SABM_State = _send; } break; } } if (!Send_TXU(frame, header)) { if (SABM_State == _send && Poll_xchg == _idle) { RLP_SendF96Frame(RLP_FT_U_SABM, true, true, 0, 0, NULL, false); SABM_State = _wait; SABM_Count++; Poll_xchg = _wait; RLP_SetTimer(&T); } else RLP_SendF96Frame(RLP_FT_U_NULL, false, false, 0, 0, NULL, false); } if (rlp_user_request_get(Disc_Req)) { T = -1; DISC_State = _send; DISC_Count = 0; DISC_PBit = (Poll_xchg == _idle); NextState = 5; } break; /***** RLP State 3. *****/ case RLP_S3: dprintf("RLP state 3.\n"); if (!XID_Handling(frame, header)) { switch(CurrentFrameType) { case RLP_FT_U_TEST: TEST_Handling(); break; case RLP_FT_U_DISC: RLP_Passup(Disc_Ind, NULL, 0); UA_State = _send; UA_FBit = header->PF; NextState = RLP_S1; break; default: if (rlp_user_request_get(Conn_Req)) { UA_State = _send; UA_FBit = true; NextState = RLP_S4; RLP_Init_link_vars(); } else if (rlp_user_request_get(Conn_Req_Neg)) { DM_State = _send; /* FIXME - code to handle DM_State - missing from spec? */ DM_FBit = true; NextState = RLP_S1; } break; } } if (!Send_TXU(frame, header)) { if (UA_State == _send) { RLP_SendF96Frame(RLP_FT_U_UA, false, UA_FBit, 0, 0, NULL, false); UA_State = _idle; } else RLP_SendF96Frame(RLP_FT_U_NULL, false, false, 0, 0, NULL, false); } if (rlp_user_request_get(Disc_Req)) { T = -1; DISC_State = _send; DISC_Count = 0; DISC_PBit = (Poll_xchg == _idle); NextState = 5; } break; /***** RLP State 4. *****/ case RLP_S4: dprintf("RLP state 4.\n"); if (!XID_Handling(frame, header)) { switch (CurrentFrameType) { case RLP_FT_U_TEST: TEST_Handling(); break; case RLP_FT_U_DISC: T = -1; ResetAllT_RCVS(); RLP_Passup(Disc_Ind, NULL, 0); UA_State = _send; UA_FBit = header->PF; NextState = RLP_S1; break; case RLP_FT_U_SABM: T = -1; ResetAllT_RCVS(); RLP_Passup(Reset_Ind, NULL, 0); NextState = RLP_S7; break; case RLP_FT_S_RR: case RLP_FT_S_RNR: case RLP_FT_S_REJ: case RLP_FT_S_SREJ: /* Should check here for unsolicited Fbit */ /* Spec says: "Nr must be within the set of not yet acknowledged I-frames or it must be the next possible frame number." That's VA..VS-1 or VS, i.e. VA..VS */ if (!InWindow(header->Nr, VA, VS)) break; RLP_S_Handler(frame, header); break; case RLP_FT_SI_RR: case RLP_FT_SI_RNR: case RLP_FT_SI_REJ: case RLP_FT_SI_SREJ: /* Should check here for unsolicited Fbit */ if (!InWindow(header->Nr, VA, VS)) break; if (!RLP_I_Handler(frame, header)) RLP_S_Handler(frame, header); break; default: break; } } for (i = 0; i < RLP_M; i++) if (T_RCVS[i] == 0) { rlpprintf("T_RCVS[%d] Timeout in State 4\n", i); R[i].State = _srej; } if (T == 0) { T = -1; rlpprintf("T Timeout in State 4\n"); Poll_xchg = _idle; if (Poll_State == _idle) { Poll_State = _send; Poll_Count = 0; } else { if (Poll_Count > RLP_N2) rlpprintf("N2 Errors in State 4\n"); Poll_State = _send; Poll_Count++; } } if (!Send_TXU(frame, header)) { if (UA_State == _send) { RLP_SendF96Frame(RLP_FT_U_UA, false, UA_FBit, 0, 0, NULL, false); UA_State = _idle; } else RLP_SendData(); } /* Load any data from the Send ringbuffer into the send slots */ RLP_AddRingBufferDataToSlots(); rlpprintf("VD=%d, VA=%d, VS=%d, VR=%d\n", VD, VA, VS, VR); #ifdef RLP_DEBUG_STATE { int zzz; if (UA_State != _idle) rlpprintf("[UA_State %d]", UA_State); if (UI_State != _idle) rlpprintf("[UI_State %d]", UI_State); if (Ackn_State != _idle) rlpprintf("[Ackn_State %d]", Ackn_State); if (Poll_State != _idle) rlpprintf("[Poll_State %d]", Poll_State); if (Poll_xchg != _idle) rlpprintf("[Poll_xchg %d]", Poll_xchg); if (SABM_State != _idle) rlpprintf("[SABM_State %d]", SABM_State); if (DISC_State != _idle) rlpprintf("[DISC_State %d]", DISC_State); if (DM_State != _idle) rlpprintf("[DM_State %d]", DM_State); if (XI_R_State != _idle) rlpprintf("[XI_R_State %d]", XI_R_State); if (XID_C_State != _idle) rlpprintf("[XID_C_State %d]", XID_C_State); if (XID_R_State != _idle) rlpprintf("[XID_R_State %d]", XID_R_State); if (TEST_R_State != _idle) rlpprintf("[TEST_R_State %d]", TEST_R_State); rlpprintf("S: "); for (zzz = 0; zzz < RLP_M; zzz++) rlpprintf("%d ", S[zzz].State); rlpprintf("\nR: "); for (zzz = 0; zzz < RLP_M; zzz++) rlpprintf("%d ", R[zzz].State); rlpprintf("\nT: %d, T_RCVS: ", T); for (zzz = 0; zzz < RLP_M; zzz++) rlpprintf("%d ", T_RCVS[zzz]); rlpprintf("\n"); } #endif if (rlp_user_request_get(Disc_Req)) { T = -1; ResetAllT_RCVS(); DISC_State = _send; DISC_Count = 0; DISC_PBit = (Poll_xchg == _idle); NextState = 5; } break; /***** RLP State 5. *****/ case RLP_S5: dprintf("RLP state 5.\n"); if (!XID_Handling(frame, header)) { switch (CurrentFrameType) { case RLP_FT_U_UA: case RLP_FT_U_DM: if ((DISC_State == _wait) && (DISC_PBit == header->PF)) { if (DISC_PBit == true) Poll_xchg = _idle; T = -1; NextState = 1; } break; case RLP_FT_U_DISC: T = -1; UA_State = _send; UA_FBit = header->PF; NextState = 1; break; default: break; } } if (!Send_TXU(frame, header)) { if ((DISC_State != _wait) && !((DISC_PBit == true) && (Poll_xchg == _wait))) { RLP_SendF96Frame(RLP_FT_U_DISC, true, DISC_PBit, 0, 0, NULL, false); if (DISC_PBit == true) Poll_xchg = _wait; DISC_State = _wait; DISC_Count++; RLP_SetTimer(&T); } else RLP_SendF96Frame(RLP_FT_U_NULL, false, false, 0, 0, NULL, false); } if (T == 0) { if (DISC_PBit == 1) Poll_xchg = _idle; DISC_Count++; if (DISC_Count > RLP_N2) rlpprintf("N2 error in State 5!\n"); DISC_State = _send; } break; /***** RLP State 6. *****/ /* We should only get here after a Reset_Req which is not yet supported */ case RLP_S6: dprintf("RLP state 6 - not yet implemented!\n"); if (!XID_Handling(frame, header)) { switch (CurrentFrameType) { default: break; } } if (!Send_TXU(frame,header)) { } if (rlp_user_request_get(Disc_Req)) { T = -1; DISC_State = _send; DISC_Count = 0; DISC_PBit = (Poll_xchg == _idle); NextState = 5; } break; /***** RLP State 7. *****/ case RLP_S7: dprintf("RLP state 7.\n"); if (!XID_Handling(frame, header)) { switch (CurrentFrameType) { case RLP_FT_U_DISC: RLP_Passup(Disc_Ind, NULL, 0); UA_State = _send; UA_FBit = header->PF; NextState = RLP_S1; break; default: break; } } if (rlp_user_request_get(Reset_Resp)) { UA_State = _send; UA_FBit = 1; RLP_Init_link_vars(); NextState = RLP_S4; } if (!Send_TXU(frame, header)) { RLP_SendF96Frame(RLP_FT_U_NULL, false, false, 0, 0, NULL, false); } if (rlp_user_request_get(Disc_Req)) { T = -1; DISC_State = _send; DISC_Count = 0; DISC_PBit = (Poll_xchg == _idle); NextState = 5; } break; default: dprintf("DEBUG: Unknown RLP state!\n"); break; } CurrentState = NextState; } /* Given a pointer to an RLP XID frame, display contents in human readable form. Note for now only Version 0 and 1 are supported. Fields can appear in any order and are delimited by a zero type field. This function is the exact implementation of section 5.2.2.6, Exchange Identification, XID of the GSM specification 04.22. */ void rlp_xid_display(u8 *frame) { int count = 25; /* Sanity check */ u8 type, length; fprintf(stdout, "XID: "); while ((*frame != 0) && (count >= 0)) { type = *frame >> 4; length = *frame & 0x0f; switch (type) { case 0x01: /* RLP Version Number, probably 1 for Nokia. */ frame += length; fprintf(stdout, "Ver %d ", *frame); break; case 0x02: /* IWF to MS window size */ frame += length; fprintf(stdout, "IWF-MS %d ", *frame); break; case 0x03: /* MS to IWF window size. */ frame += length; fprintf(stdout, "MS-IWF %d ", *frame); break; case 0x04: /* Acknowledgement Timer (T1). */ frame += length; fprintf(stdout, "T1 %dms ", *frame * 10); break; case 0x05: /* Retransmission attempts (N2). */ frame += length; fprintf(stdout, "N2 %d ", *frame); break; case 0x06: /* Reply delay (T2). */ frame += length; fprintf(stdout, "T2 %dms ", *frame * 10); break; case 0x07: /* Compression. */ frame ++; fprintf(stdout, "Comp [Pt=%d ", (*frame >> 4) ); fprintf(stdout, "P0=%d ", (*frame & 0x03) ); frame ++; fprintf(stdout, "P1l=%d ", *frame); frame ++; fprintf(stdout, "P1h=%d ", *frame); frame ++; fprintf(stdout, "P2=%d] ", *frame); break; default: frame += length; fprintf(stdout, "Unknown! type=%02x, length=%02x", type, length); break; } count--; frame++; } fprintf(stdout, "\n"); return; } /* Given a pointer to an F9.6 Frame, split data out into component parts of header and determine frame type. */ void rlp_f96_header_decode(gn_rlp_f96_frame *frame, rlp_f96_header *header) { /* Poll/Final bit. */ if ((frame->Header[1] & 0x02)) header->PF = true; else header->PF = false; /* Command/Response bit. */ if ((frame->Header[0] & 0x01)) header->CR = true; else header->CR = false; /* Send Sequence Number. */ header->Ns = frame->Header[0] >> 3; if ((frame->Header[1] & 0x01)) header->Ns |= 0x20; /* Most significant bit. */ /* Determine frame type. See the section 5.2.1 in the GSM 04.22 specification. */ switch (header->Ns) { case 0x3f: /* Frames of type U, unnumbered frames. */ /* U frames have M1, ..., M5 stored in the place of N(R). */ header->Type = RLP_FT_U; header->M = (frame->Header[1] >> 2) & 0x1f; return; /* For U frames, we do not need N(R) and bits S1 and S2. */ case 0x3e: /* Frames of type S, supervisory frames. */ header->Type = RLP_FT_S; break; default: /* Frames of type I+S, numbered information transfer ans supervisory frames combined. */ header->Type = RLP_FT_IS; break; } /* Receive Sequence Number N(R). */ header->Nr = frame->Header[1] >> 2; /* Status bits (S1 and S2). */ header->S = (frame->Header[0] >> 1) & 0x03; return; } gnokii-0.6.31/common/data/virtmodem.c0000644000175000017500000002167411666163120015570 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janík ml. Copyright (C) 2002 Ladis Michl, Manfred Jonsson, Jan Kratochvil Copyright (C) 2001-2004 Pawel Kot Copyright (C) 2002-2003 BORBELY Zoltan This file provides a virtual modem interface to the GSM phone by calling code in gsm-api.c, at-emulator.c and datapump.c. The code here provides the overall framework and coordinates switching between command mode (AT-emulator) and "online" mode where the data pump code translates data from/to the GSM handset and the modem data/fax stream. */ #include "config.h" /* * BEWARE! UGLY HACK! * We will define _XOPEN_SOURCE but it will disable the u_char, u_short, * u_int and u_long types on OpenBSD. It seems only the OpenBSD is affected, * so this is the workaround - bozo */ #ifdef __OpenBSD__ # include # define HAVE_MSGHDR_MSG_CONTROL 1 #endif /* same for FreeBSD */ #ifdef __FreeBSD__ # include # undef __BSD_VISIBLE # define __BSD_VISIBLE 1 #endif /* same for NetBSD */ #ifdef __NetBSD__ # include #endif /* This is the correct way to include stdlib with _XOPEN_SOURCE = 500 defined. * Needed for clean unlockpt() declaration. * msghdr structure in Solaris depends on _XOPEN_SOURCE = 500 too. - bozo */ #define _XOPEN_SOURCE 500 #include #include #include #include #include #include #include #include #include #ifdef HAVE_SYS_TIME_H # include #endif #include #include #include #include #include "compat.h" #include "misc.h" #include "gnokii-internal.h" #include "data/at-emulator.h" #include "data/datapump.h" #include "device.h" /* Defines */ #ifndef AF_LOCAL # ifdef AF_UNIX # define AF_LOCAL AF_UNIX # else # error AF_LOCAL not defined # endif #endif /* Prototypes */ static int VM_PtySetup(const char *bindir); static gn_error VM_GSMInitialise(struct gn_statemachine *sm); /* Global variables */ extern bool GTerminateThread; int ConnectCount; bool CommandMode; /* Local variables */ static int PtyRDFD; /* File descriptor for reading and writing to/from */ static int PtyWRFD; /* pty interface - only different in debug mode. */ static bool UseSTDIO; /* Use STDIO for debugging purposes instead of pty */ struct vm_queue queue; /* If initialised in debug mode, stdin/out is used instead of ptys for interface. */ int gn_vm_initialise(const char *iname, const char *bindir, int debug_mode, int GSMInit) { static struct gn_statemachine State; sm = &State; queue.n = 0; queue.head = 0; queue.tail = 0; CommandMode = true; if (debug_mode == true) { UseSTDIO = true; } else { UseSTDIO = false; } if (GSMInit) { dprintf("Initialising GSM\n"); if (gn_cfg_phone_load(iname, sm) != GN_ERR_NONE) return false; if ((VM_GSMInitialise(sm) != GN_ERR_NONE)) { fprintf (stderr, _("gn_vm_initialise - VM_GSMInitialise failed!\n")); return (false); } } GSMInit = false; if (VM_PtySetup(bindir) < 0) { fprintf (stderr, _("gn_vm_initialise - VM_PtySetup failed!\n")); return (false); } if (gn_atem_initialise(PtyRDFD, PtyWRFD, sm) != true) { fprintf (stderr, _("gn_vm_initialise - gn_atem_initialise failed!\n")); return (false); } if (dp_Initialise(PtyRDFD, PtyWRFD) != true) { fprintf (stderr, _("gn_vm_initialise - dp_Initialise failed!\n")); return (false); } return (true); } void gn_vm_loop(void) { fd_set rfds; struct timeval tv; int res; int nfd, devfd; int i, n; char buf[256], *d; devfd = device_getfd(sm); nfd = (PtyRDFD > devfd) ? PtyRDFD + 1 : devfd + 1; while (!GTerminateThread) { if (CommandMode && gn_atem_initialised && queue.n > 0) { d = queue.buf + queue.head; queue.head = (queue.head + 1) % sizeof(queue.buf); queue.n--; gn_atem_incoming_data_handle(d, 1); continue; } FD_ZERO(&rfds); FD_SET(devfd, &rfds); if ( queue.n < sizeof(queue.buf) ) { FD_SET(PtyRDFD, &rfds); } tv.tv_sec = 0; tv.tv_usec = 500000; res = select(nfd, &rfds, NULL, NULL, &tv); switch (res) { case 0: /* Timeout */ continue; case -1: perror("gn_vm_loop - select"); exit (-1); default: break; } if (FD_ISSET(PtyRDFD, &rfds)) { n = sizeof(queue.buf) - queue.n < sizeof(buf) ? sizeof(queue.buf) - queue.n : sizeof(buf); if ( (n = read(PtyRDFD, buf, n)) <= 0 ) gn_vm_terminate(); for (i = 0; i < n; i++) { queue.buf[queue.tail++] = buf[i]; queue.tail %= sizeof(queue.buf); queue.n++; } } if (FD_ISSET(devfd, &rfds)) gn_sm_loop(1, sm); } } /* Application should call gn_vm_terminate to shut down the virtual modem thread */ void gn_vm_terminate(void) { /* Request termination of thread */ GTerminateThread = true; if (!UseSTDIO) { close (PtyRDFD); close (PtyWRFD); } /* Shutdown device */ gn_sm_functions(GN_OP_Terminate, NULL, sm); } /* The following two functions are based on the skeleton from * W. Richard Stevens' "UNIX Network Programming", Volume 1, Second Edition. */ static int gread(int fd, void *ptr, size_t nbytes, int *recvfd) { struct msghdr msg; struct iovec iov[1]; int n; #ifdef HAVE_MSGHDR_MSG_CONTROL union { struct cmsghdr cm; char control[CMSG_SPACE(sizeof(int))]; } control_un; struct cmsghdr *cmptr; msg.msg_control = control_un.control; msg.msg_controllen = sizeof(control_un.control); #else int newfd; msg.msg_accrights = (caddr_t) &newfd; msg.msg_accrightslen = sizeof(int); #endif /* HAVE_MSGHDR_MSG_CONTROL */ msg.msg_name = NULL; msg.msg_namelen = 0; iov[0].iov_base = ptr; iov[0].iov_len = nbytes; msg.msg_iov = iov; msg.msg_iovlen = 1; if ((n = recvmsg(fd, &msg, 0)) <= 0) return n; #ifdef HAVE_MSGHDR_MSG_CONTROL if ((cmptr = CMSG_FIRSTHDR(&msg)) != NULL && cmptr->cmsg_len == CMSG_LEN(sizeof(int))) { if (cmptr->cmsg_level != SOL_SOCKET) perror("control level != SOL_SOCKET"); if (cmptr->cmsg_type != SCM_RIGHTS) perror("control type != SCM_RIGHTS"); *recvfd = *((int *)CMSG_DATA(cmptr)); } else { *recvfd = -1; } #else if (msg.msg_accrightslen == sizeof(int)) *recvfd = newfd; else *recvfd = -1; #endif /* HAVE_MSGHDR_MSG_CONTROL */ return (n); } static int gopen(const char *command) { int fd = -1; int sockfd[2], status; pid_t childpid; char c, argsockfd[10]; if (socketpair(AF_LOCAL, SOCK_STREAM, 0, sockfd) < 0) return -1; switch (childpid = fork()) { case -1: /* Critical error */ return -1; case 0: /* Child */ close(sockfd[0]); snprintf(argsockfd, sizeof(argsockfd), "%d", sockfd[1]); execl(command, "mgnokiidev", argsockfd, NULL); perror("execl: "); default: /* Parent */ break; } close(sockfd[1]); waitpid(childpid, &status, 0); if (WIFEXITED(status) == 0) perror("wait: "); if ((status = WEXITSTATUS(status)) == 0) { gread(sockfd[0], &c, 1, &fd); } else { errno = status; fd = -1; } close(sockfd[0]); #ifdef USE_UNIX98PTYS /* * I don't know why but it's required to operate correctly. * bozo -- tested on: Linux 2.4.17 */ if (fd >= 0 && unlockpt(fd)) { close(fd); fd = -1; } #endif return(fd); } /* Open pseudo tty interface and (in due course create a symlink to be /dev/gnokii etc. ) */ static int VM_PtySetup(const char *bindir) { char mgnokiidev[200]; if (UseSTDIO) { PtyRDFD = STDIN_FILENO; PtyWRFD = STDOUT_FILENO; return (0); } if (bindir) { strncpy(mgnokiidev, bindir, sizeof(mgnokiidev)); strncat(mgnokiidev, "/", sizeof(mgnokiidev) - strlen(mgnokiidev)); } else { mgnokiidev[0] = 0; } strncat(mgnokiidev, "mgnokiidev", sizeof(mgnokiidev) - strlen(mgnokiidev)); if (access(mgnokiidev, X_OK) != 0) { fprintf(stderr, _("Cannot access %s, check the bindir in your config file!\n"), mgnokiidev); exit(1); } PtyRDFD = gopen(mgnokiidev); if (PtyRDFD < 0) { fprintf (stderr, _("Couldn't open pty!\n")); return(-1); } PtyWRFD = PtyRDFD; return (0); } /* Initialise GSM interface, returning gn_error as appropriate */ static gn_error VM_GSMInitialise(struct gn_statemachine *sm) { gn_error error; /* Initialise the code for the GSM interface. */ error = gn_gsm_initialise(sm); if (error != GN_ERR_NONE) fprintf(stderr, _("GSM/FBUS init failed! (Unknown model?). Quitting.\n")); return (error); } gnokii-0.6.31/common/Makefile.in0000644000175000017500000016351711666163211014556 0ustar leoleo# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = common DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/gnokii.pc.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_expand_dir.m4 \ $(top_srcdir)/m4/acx_pthread.m4 $(top_srcdir)/m4/intltool.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = gnokii.pc CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = libgnokii_la_DEPENDENCIES = \ $(top_builddir)/common/phones/libPHONES.la \ $(top_builddir)/common/links/libLINKS.la \ $(top_builddir)/common/devices/libDEVICES.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) am_libgnokii_la_OBJECTS = libgnokii_la-libfunctions.lo \ libgnokii_la-gsm-api.lo libgnokii_la-gsm-error.lo \ libgnokii_la-gsm-statemachine.lo libgnokii_la-cfgreader.lo \ libgnokii_la-device.lo libgnokii_la-vcard.lo \ libgnokii_la-vcal.lo libgnokii_la-gnvcal.lo \ libgnokii_la-ldif.lo libgnokii_la-gsm-networks.lo \ libgnokii_la-gsm-filetypes.lo libgnokii_la-readmidi.lo \ libgnokii_la-gsm-ringtones.lo libgnokii_la-gsm-bitmaps.lo \ libgnokii_la-gsm-sms.lo libgnokii_la-gsm-mms.lo \ libgnokii_la-gsm-call.lo libgnokii_la-gsm-encoding.lo \ libgnokii_la-gsm-common.lo libgnokii_la-sms-nokia.lo \ libgnokii_la-nokia-decoding.lo libgnokii_la-pkt.lo \ libgnokii_la-compat.lo libgnokii_la-misc.lo \ libgnokii_la-snprintf.lo libgnokii_la-localcharset.lo \ libgnokii_la-map.lo libgnokii_la_OBJECTS = $(am_libgnokii_la_OBJECTS) libgnokii_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libgnokii_la_CFLAGS) \ $(CFLAGS) $(libgnokii_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libgnokii_la_SOURCES) DIST_SOURCES = $(libgnokii_la_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive DATA = $(pkgconfig_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = phones links devices data DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLUETOOTH_LIBS = @BLUETOOTH_LIBS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = -DLOCALEDIR=\"$(localedir)\" -DCOMPILING_LIBGNOKII DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FIND = @FIND@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLDFLAGS = @GLDFLAGS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GMODULE_CFLAGS = @GMODULE_CFLAGS@ GMODULE_LIBS = @GMODULE_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GNOKII_LT_VERSION = @GNOKII_LT_VERSION@ GNOKII_LT_VERSION_AGE = @GNOKII_LT_VERSION_AGE@ GNOKII_LT_VERSION_CURRENT = @GNOKII_LT_VERSION_CURRENT@ GNOKII_LT_VERSION_REVISION = @GNOKII_LT_VERSION_REVISION@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_LIBICAL = @HAVE_LIBICAL@ HAVE_LIBUSB = @HAVE_LIBUSB@ HAVE_SOCKETPHONET = @HAVE_SOCKETPHONET@ HAVE_XGNOKII = @HAVE_XGNOKII@ ICAL_CFLAGS = @ICAL_CFLAGS@ ICAL_LIBS = @ICAL_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBGNOKII_VERSION_MAJOR = @LIBGNOKII_VERSION_MAJOR@ LIBGNOKII_VERSION_MINOR = @LIBGNOKII_VERSION_MINOR@ LIBGNOKII_VERSION_RELEASE = @LIBGNOKII_VERSION_RELEASE@ LIBGNOKII_VERSION_STRING = @LIBGNOKII_VERSION_STRING@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBPCSCLITE_CFLAGS = @LIBPCSCLITE_CFLAGS@ LIBPCSCLITE_LIBS = @LIBPCSCLITE_LIBS@ LIBS = @LIBS@ $(LIBPCSCLITE_LIBS) $(GLIB_LIBS) LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKE = @MAKE@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ MYSQLCONFIG = @MYSQLCONFIG@ MYSQLCONFIG5 = @MYSQLCONFIG5@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_LIBS = @MYSQL_LIBS@ NEED_LOCALE_CHARSET = @NEED_LOCALE_CHARSET@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OWN_GETOPT = @OWN_GETOPT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PGCONFIG = @PGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSTGRES_CFLAGS = @POSTGRES_CFLAGS@ POSTGRES_LIBS = @POSTGRES_LIBS@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LIBS = @SQLITE3_LIBS@ SQLITE_CFLAGS = @SQLITE_CFLAGS@ SQLITE_LIBS = @SQLITE_LIBS@ STRIP = @STRIP@ TCP_LIBS = @TCP_LIBS@ TERMLDFLAGS = @TERMLDFLAGS@ TERMLIBS = @TERMLIBS@ USB_LIBS = @USB_LIBS@ USE_NLS = @USE_NLS@ USE_UNIX98PTYS = @USE_UNIX98PTYS@ VERSION = @VERSION@ WIN32 = @WIN32@ WIN32_CROSS = @WIN32_CROSS@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ XPACKAGE = @XPACKAGE@ XPM_CFLAGS = @XPM_CFLAGS@ XPM_LIBS = @XPM_LIBS@ XVERSION = @XVERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ acx_pthread_config = @acx_pthread_config@ 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@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @WIN32_FALSE@DATA_DIR = data @WIN32_TRUE@DATA_DIR = lib_LTLIBRARIES = libgnokii.la SUBDIRS = phones \ links \ devices \ $(DATA_DIR) pkgconfig_DATA = gnokii.pc pkgconfigdir = $(libdir)/pkgconfig libgnokii_la_CPPFLAGS = -DLIBDIR="\"$(libdir)\"" libgnokii_la_CFLAGS = -I$(top_srcdir)/include $(GLIB_CFLAGS) \ $(ICAL_CFLAGS) libgnokii_la_SOURCES = \ libfunctions.c \ gsm-api.c \ gsm-error.c \ gsm-statemachine.c \ cfgreader.c \ device.c \ vcard.c \ vcal.c \ gnvcal.c \ ldif.c \ gsm-networks.c \ gsm-filetypes.c \ readmidi.c \ gsm-ringtones.c \ gsm-bitmaps.c \ gsm-sms.c \ gsm-mms.c \ gsm-call.c \ gsm-encoding.c \ gsm-common.c \ sms-nokia.c \ nokia-decoding.c \ pkt.c \ compat.c \ misc.c \ snprintf.c \ localcharset.c \ map.c libgnokii_la_LIBADD = \ $(top_builddir)/common/phones/libPHONES.la \ $(top_builddir)/common/links/libLINKS.la \ $(top_builddir)/common/devices/libDEVICES.la \ $(XPM_LIBS) \ $(LTLIBICONV) \ $(INTLLIBS) \ $(BLUETOOTH_LIBS) \ $(USB_LIBS) \ $(TCP_LIBS) \ $(ICAL_LIBS) libgnokii_la_LDFLAGS = \ -version-info $(GNOKII_LT_VERSION) \ -no-undefined CLEANFILES = gnvcal.c EXTRA_DIST = gnokii.pc.in gnvcal.c vcal.lx all: all-recursive .SUFFIXES: .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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu common/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu common/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 $(am__aclocal_m4_deps): gnokii.pc: $(top_builddir)/config.status $(srcdir)/gnokii.pc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libgnokii.la: $(libgnokii_la_OBJECTS) $(libgnokii_la_DEPENDENCIES) $(libgnokii_la_LINK) -rpath $(libdir) $(libgnokii_la_OBJECTS) $(libgnokii_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnokii_la-cfgreader.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnokii_la-compat.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnokii_la-device.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnokii_la-gnvcal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnokii_la-gsm-api.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnokii_la-gsm-bitmaps.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnokii_la-gsm-call.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnokii_la-gsm-common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnokii_la-gsm-encoding.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnokii_la-gsm-error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnokii_la-gsm-filetypes.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnokii_la-gsm-mms.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnokii_la-gsm-networks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnokii_la-gsm-ringtones.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnokii_la-gsm-sms.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnokii_la-gsm-statemachine.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnokii_la-ldif.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnokii_la-libfunctions.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnokii_la-localcharset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnokii_la-map.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnokii_la-misc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnokii_la-nokia-decoding.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnokii_la-pkt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnokii_la-readmidi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnokii_la-sms-nokia.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnokii_la-snprintf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnokii_la-vcal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnokii_la-vcard.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @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 $@ $< libgnokii_la-libfunctions.lo: libfunctions.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -MT libgnokii_la-libfunctions.lo -MD -MP -MF $(DEPDIR)/libgnokii_la-libfunctions.Tpo -c -o libgnokii_la-libfunctions.lo `test -f 'libfunctions.c' || echo '$(srcdir)/'`libfunctions.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libgnokii_la-libfunctions.Tpo $(DEPDIR)/libgnokii_la-libfunctions.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libfunctions.c' object='libgnokii_la-libfunctions.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -c -o libgnokii_la-libfunctions.lo `test -f 'libfunctions.c' || echo '$(srcdir)/'`libfunctions.c libgnokii_la-gsm-api.lo: gsm-api.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -MT libgnokii_la-gsm-api.lo -MD -MP -MF $(DEPDIR)/libgnokii_la-gsm-api.Tpo -c -o libgnokii_la-gsm-api.lo `test -f 'gsm-api.c' || echo '$(srcdir)/'`gsm-api.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libgnokii_la-gsm-api.Tpo $(DEPDIR)/libgnokii_la-gsm-api.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gsm-api.c' object='libgnokii_la-gsm-api.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -c -o libgnokii_la-gsm-api.lo `test -f 'gsm-api.c' || echo '$(srcdir)/'`gsm-api.c libgnokii_la-gsm-error.lo: gsm-error.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -MT libgnokii_la-gsm-error.lo -MD -MP -MF $(DEPDIR)/libgnokii_la-gsm-error.Tpo -c -o libgnokii_la-gsm-error.lo `test -f 'gsm-error.c' || echo '$(srcdir)/'`gsm-error.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libgnokii_la-gsm-error.Tpo $(DEPDIR)/libgnokii_la-gsm-error.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gsm-error.c' object='libgnokii_la-gsm-error.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -c -o libgnokii_la-gsm-error.lo `test -f 'gsm-error.c' || echo '$(srcdir)/'`gsm-error.c libgnokii_la-gsm-statemachine.lo: gsm-statemachine.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -MT libgnokii_la-gsm-statemachine.lo -MD -MP -MF $(DEPDIR)/libgnokii_la-gsm-statemachine.Tpo -c -o libgnokii_la-gsm-statemachine.lo `test -f 'gsm-statemachine.c' || echo '$(srcdir)/'`gsm-statemachine.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libgnokii_la-gsm-statemachine.Tpo $(DEPDIR)/libgnokii_la-gsm-statemachine.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gsm-statemachine.c' object='libgnokii_la-gsm-statemachine.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -c -o libgnokii_la-gsm-statemachine.lo `test -f 'gsm-statemachine.c' || echo '$(srcdir)/'`gsm-statemachine.c libgnokii_la-cfgreader.lo: cfgreader.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -MT libgnokii_la-cfgreader.lo -MD -MP -MF $(DEPDIR)/libgnokii_la-cfgreader.Tpo -c -o libgnokii_la-cfgreader.lo `test -f 'cfgreader.c' || echo '$(srcdir)/'`cfgreader.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libgnokii_la-cfgreader.Tpo $(DEPDIR)/libgnokii_la-cfgreader.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cfgreader.c' object='libgnokii_la-cfgreader.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -c -o libgnokii_la-cfgreader.lo `test -f 'cfgreader.c' || echo '$(srcdir)/'`cfgreader.c libgnokii_la-device.lo: device.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -MT libgnokii_la-device.lo -MD -MP -MF $(DEPDIR)/libgnokii_la-device.Tpo -c -o libgnokii_la-device.lo `test -f 'device.c' || echo '$(srcdir)/'`device.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libgnokii_la-device.Tpo $(DEPDIR)/libgnokii_la-device.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='device.c' object='libgnokii_la-device.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -c -o libgnokii_la-device.lo `test -f 'device.c' || echo '$(srcdir)/'`device.c libgnokii_la-vcard.lo: vcard.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -MT libgnokii_la-vcard.lo -MD -MP -MF $(DEPDIR)/libgnokii_la-vcard.Tpo -c -o libgnokii_la-vcard.lo `test -f 'vcard.c' || echo '$(srcdir)/'`vcard.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libgnokii_la-vcard.Tpo $(DEPDIR)/libgnokii_la-vcard.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='vcard.c' object='libgnokii_la-vcard.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -c -o libgnokii_la-vcard.lo `test -f 'vcard.c' || echo '$(srcdir)/'`vcard.c libgnokii_la-vcal.lo: vcal.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -MT libgnokii_la-vcal.lo -MD -MP -MF $(DEPDIR)/libgnokii_la-vcal.Tpo -c -o libgnokii_la-vcal.lo `test -f 'vcal.c' || echo '$(srcdir)/'`vcal.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libgnokii_la-vcal.Tpo $(DEPDIR)/libgnokii_la-vcal.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='vcal.c' object='libgnokii_la-vcal.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -c -o libgnokii_la-vcal.lo `test -f 'vcal.c' || echo '$(srcdir)/'`vcal.c libgnokii_la-gnvcal.lo: gnvcal.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -MT libgnokii_la-gnvcal.lo -MD -MP -MF $(DEPDIR)/libgnokii_la-gnvcal.Tpo -c -o libgnokii_la-gnvcal.lo `test -f 'gnvcal.c' || echo '$(srcdir)/'`gnvcal.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libgnokii_la-gnvcal.Tpo $(DEPDIR)/libgnokii_la-gnvcal.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnvcal.c' object='libgnokii_la-gnvcal.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -c -o libgnokii_la-gnvcal.lo `test -f 'gnvcal.c' || echo '$(srcdir)/'`gnvcal.c libgnokii_la-ldif.lo: ldif.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -MT libgnokii_la-ldif.lo -MD -MP -MF $(DEPDIR)/libgnokii_la-ldif.Tpo -c -o libgnokii_la-ldif.lo `test -f 'ldif.c' || echo '$(srcdir)/'`ldif.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libgnokii_la-ldif.Tpo $(DEPDIR)/libgnokii_la-ldif.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ldif.c' object='libgnokii_la-ldif.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -c -o libgnokii_la-ldif.lo `test -f 'ldif.c' || echo '$(srcdir)/'`ldif.c libgnokii_la-gsm-networks.lo: gsm-networks.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -MT libgnokii_la-gsm-networks.lo -MD -MP -MF $(DEPDIR)/libgnokii_la-gsm-networks.Tpo -c -o libgnokii_la-gsm-networks.lo `test -f 'gsm-networks.c' || echo '$(srcdir)/'`gsm-networks.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libgnokii_la-gsm-networks.Tpo $(DEPDIR)/libgnokii_la-gsm-networks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gsm-networks.c' object='libgnokii_la-gsm-networks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -c -o libgnokii_la-gsm-networks.lo `test -f 'gsm-networks.c' || echo '$(srcdir)/'`gsm-networks.c libgnokii_la-gsm-filetypes.lo: gsm-filetypes.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -MT libgnokii_la-gsm-filetypes.lo -MD -MP -MF $(DEPDIR)/libgnokii_la-gsm-filetypes.Tpo -c -o libgnokii_la-gsm-filetypes.lo `test -f 'gsm-filetypes.c' || echo '$(srcdir)/'`gsm-filetypes.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libgnokii_la-gsm-filetypes.Tpo $(DEPDIR)/libgnokii_la-gsm-filetypes.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gsm-filetypes.c' object='libgnokii_la-gsm-filetypes.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -c -o libgnokii_la-gsm-filetypes.lo `test -f 'gsm-filetypes.c' || echo '$(srcdir)/'`gsm-filetypes.c libgnokii_la-readmidi.lo: readmidi.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -MT libgnokii_la-readmidi.lo -MD -MP -MF $(DEPDIR)/libgnokii_la-readmidi.Tpo -c -o libgnokii_la-readmidi.lo `test -f 'readmidi.c' || echo '$(srcdir)/'`readmidi.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libgnokii_la-readmidi.Tpo $(DEPDIR)/libgnokii_la-readmidi.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='readmidi.c' object='libgnokii_la-readmidi.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -c -o libgnokii_la-readmidi.lo `test -f 'readmidi.c' || echo '$(srcdir)/'`readmidi.c libgnokii_la-gsm-ringtones.lo: gsm-ringtones.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -MT libgnokii_la-gsm-ringtones.lo -MD -MP -MF $(DEPDIR)/libgnokii_la-gsm-ringtones.Tpo -c -o libgnokii_la-gsm-ringtones.lo `test -f 'gsm-ringtones.c' || echo '$(srcdir)/'`gsm-ringtones.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libgnokii_la-gsm-ringtones.Tpo $(DEPDIR)/libgnokii_la-gsm-ringtones.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gsm-ringtones.c' object='libgnokii_la-gsm-ringtones.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -c -o libgnokii_la-gsm-ringtones.lo `test -f 'gsm-ringtones.c' || echo '$(srcdir)/'`gsm-ringtones.c libgnokii_la-gsm-bitmaps.lo: gsm-bitmaps.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -MT libgnokii_la-gsm-bitmaps.lo -MD -MP -MF $(DEPDIR)/libgnokii_la-gsm-bitmaps.Tpo -c -o libgnokii_la-gsm-bitmaps.lo `test -f 'gsm-bitmaps.c' || echo '$(srcdir)/'`gsm-bitmaps.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libgnokii_la-gsm-bitmaps.Tpo $(DEPDIR)/libgnokii_la-gsm-bitmaps.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gsm-bitmaps.c' object='libgnokii_la-gsm-bitmaps.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -c -o libgnokii_la-gsm-bitmaps.lo `test -f 'gsm-bitmaps.c' || echo '$(srcdir)/'`gsm-bitmaps.c libgnokii_la-gsm-sms.lo: gsm-sms.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -MT libgnokii_la-gsm-sms.lo -MD -MP -MF $(DEPDIR)/libgnokii_la-gsm-sms.Tpo -c -o libgnokii_la-gsm-sms.lo `test -f 'gsm-sms.c' || echo '$(srcdir)/'`gsm-sms.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libgnokii_la-gsm-sms.Tpo $(DEPDIR)/libgnokii_la-gsm-sms.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gsm-sms.c' object='libgnokii_la-gsm-sms.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -c -o libgnokii_la-gsm-sms.lo `test -f 'gsm-sms.c' || echo '$(srcdir)/'`gsm-sms.c libgnokii_la-gsm-mms.lo: gsm-mms.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -MT libgnokii_la-gsm-mms.lo -MD -MP -MF $(DEPDIR)/libgnokii_la-gsm-mms.Tpo -c -o libgnokii_la-gsm-mms.lo `test -f 'gsm-mms.c' || echo '$(srcdir)/'`gsm-mms.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libgnokii_la-gsm-mms.Tpo $(DEPDIR)/libgnokii_la-gsm-mms.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gsm-mms.c' object='libgnokii_la-gsm-mms.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -c -o libgnokii_la-gsm-mms.lo `test -f 'gsm-mms.c' || echo '$(srcdir)/'`gsm-mms.c libgnokii_la-gsm-call.lo: gsm-call.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -MT libgnokii_la-gsm-call.lo -MD -MP -MF $(DEPDIR)/libgnokii_la-gsm-call.Tpo -c -o libgnokii_la-gsm-call.lo `test -f 'gsm-call.c' || echo '$(srcdir)/'`gsm-call.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libgnokii_la-gsm-call.Tpo $(DEPDIR)/libgnokii_la-gsm-call.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gsm-call.c' object='libgnokii_la-gsm-call.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -c -o libgnokii_la-gsm-call.lo `test -f 'gsm-call.c' || echo '$(srcdir)/'`gsm-call.c libgnokii_la-gsm-encoding.lo: gsm-encoding.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -MT libgnokii_la-gsm-encoding.lo -MD -MP -MF $(DEPDIR)/libgnokii_la-gsm-encoding.Tpo -c -o libgnokii_la-gsm-encoding.lo `test -f 'gsm-encoding.c' || echo '$(srcdir)/'`gsm-encoding.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libgnokii_la-gsm-encoding.Tpo $(DEPDIR)/libgnokii_la-gsm-encoding.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gsm-encoding.c' object='libgnokii_la-gsm-encoding.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -c -o libgnokii_la-gsm-encoding.lo `test -f 'gsm-encoding.c' || echo '$(srcdir)/'`gsm-encoding.c libgnokii_la-gsm-common.lo: gsm-common.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -MT libgnokii_la-gsm-common.lo -MD -MP -MF $(DEPDIR)/libgnokii_la-gsm-common.Tpo -c -o libgnokii_la-gsm-common.lo `test -f 'gsm-common.c' || echo '$(srcdir)/'`gsm-common.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libgnokii_la-gsm-common.Tpo $(DEPDIR)/libgnokii_la-gsm-common.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gsm-common.c' object='libgnokii_la-gsm-common.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -c -o libgnokii_la-gsm-common.lo `test -f 'gsm-common.c' || echo '$(srcdir)/'`gsm-common.c libgnokii_la-sms-nokia.lo: sms-nokia.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -MT libgnokii_la-sms-nokia.lo -MD -MP -MF $(DEPDIR)/libgnokii_la-sms-nokia.Tpo -c -o libgnokii_la-sms-nokia.lo `test -f 'sms-nokia.c' || echo '$(srcdir)/'`sms-nokia.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libgnokii_la-sms-nokia.Tpo $(DEPDIR)/libgnokii_la-sms-nokia.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sms-nokia.c' object='libgnokii_la-sms-nokia.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -c -o libgnokii_la-sms-nokia.lo `test -f 'sms-nokia.c' || echo '$(srcdir)/'`sms-nokia.c libgnokii_la-nokia-decoding.lo: nokia-decoding.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -MT libgnokii_la-nokia-decoding.lo -MD -MP -MF $(DEPDIR)/libgnokii_la-nokia-decoding.Tpo -c -o libgnokii_la-nokia-decoding.lo `test -f 'nokia-decoding.c' || echo '$(srcdir)/'`nokia-decoding.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libgnokii_la-nokia-decoding.Tpo $(DEPDIR)/libgnokii_la-nokia-decoding.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nokia-decoding.c' object='libgnokii_la-nokia-decoding.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -c -o libgnokii_la-nokia-decoding.lo `test -f 'nokia-decoding.c' || echo '$(srcdir)/'`nokia-decoding.c libgnokii_la-pkt.lo: pkt.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -MT libgnokii_la-pkt.lo -MD -MP -MF $(DEPDIR)/libgnokii_la-pkt.Tpo -c -o libgnokii_la-pkt.lo `test -f 'pkt.c' || echo '$(srcdir)/'`pkt.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libgnokii_la-pkt.Tpo $(DEPDIR)/libgnokii_la-pkt.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pkt.c' object='libgnokii_la-pkt.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -c -o libgnokii_la-pkt.lo `test -f 'pkt.c' || echo '$(srcdir)/'`pkt.c libgnokii_la-compat.lo: compat.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -MT libgnokii_la-compat.lo -MD -MP -MF $(DEPDIR)/libgnokii_la-compat.Tpo -c -o libgnokii_la-compat.lo `test -f 'compat.c' || echo '$(srcdir)/'`compat.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libgnokii_la-compat.Tpo $(DEPDIR)/libgnokii_la-compat.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='compat.c' object='libgnokii_la-compat.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -c -o libgnokii_la-compat.lo `test -f 'compat.c' || echo '$(srcdir)/'`compat.c libgnokii_la-misc.lo: misc.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -MT libgnokii_la-misc.lo -MD -MP -MF $(DEPDIR)/libgnokii_la-misc.Tpo -c -o libgnokii_la-misc.lo `test -f 'misc.c' || echo '$(srcdir)/'`misc.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libgnokii_la-misc.Tpo $(DEPDIR)/libgnokii_la-misc.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='misc.c' object='libgnokii_la-misc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -c -o libgnokii_la-misc.lo `test -f 'misc.c' || echo '$(srcdir)/'`misc.c libgnokii_la-snprintf.lo: snprintf.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -MT libgnokii_la-snprintf.lo -MD -MP -MF $(DEPDIR)/libgnokii_la-snprintf.Tpo -c -o libgnokii_la-snprintf.lo `test -f 'snprintf.c' || echo '$(srcdir)/'`snprintf.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libgnokii_la-snprintf.Tpo $(DEPDIR)/libgnokii_la-snprintf.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='snprintf.c' object='libgnokii_la-snprintf.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -c -o libgnokii_la-snprintf.lo `test -f 'snprintf.c' || echo '$(srcdir)/'`snprintf.c libgnokii_la-localcharset.lo: localcharset.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -MT libgnokii_la-localcharset.lo -MD -MP -MF $(DEPDIR)/libgnokii_la-localcharset.Tpo -c -o libgnokii_la-localcharset.lo `test -f 'localcharset.c' || echo '$(srcdir)/'`localcharset.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libgnokii_la-localcharset.Tpo $(DEPDIR)/libgnokii_la-localcharset.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='localcharset.c' object='libgnokii_la-localcharset.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -c -o libgnokii_la-localcharset.lo `test -f 'localcharset.c' || echo '$(srcdir)/'`localcharset.c libgnokii_la-map.lo: map.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -MT libgnokii_la-map.lo -MD -MP -MF $(DEPDIR)/libgnokii_la-map.Tpo -c -o libgnokii_la-map.lo `test -f 'map.c' || echo '$(srcdir)/'`map.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libgnokii_la-map.Tpo $(DEPDIR)/libgnokii_la-map.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='map.c' object='libgnokii_la-map.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnokii_la_CPPFLAGS) $(CPPFLAGS) $(libgnokii_la_CFLAGS) $(CFLAGS) -c -o libgnokii_la-map.lo `test -f 'map.c' || echo '$(srcdir)/'`map.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-recursive clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-pkgconfigDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-libLTLIBRARIES uninstall-pkgconfigDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags ctags-recursive \ 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-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-libLTLIBRARIES install-man install-pdf \ install-pdf-am install-pkgconfigDATA install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-libLTLIBRARIES \ uninstall-pkgconfigDATA gnvcal.c: vcal.lx $(LEX) -ognvcal.c '$(srcdir)/vcal.lx' # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gnokii-0.6.31/common/pkt.c0000644000175000017500000001132511666163120013437 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2004 BORBELY Zoltan, Pawel Kot This file contains the encoding/decoding functions for the basic types. */ #include "config.h" #include "compat.h" #include #include #include #include #include "gnokii.h" #include "gnokii-internal.h" #include "pkt.h" void pkt_buffer_set(pkt_buffer *buf, void *addr, int32_t len) { buf->addr = addr; buf->size = len; buf->offs = 0; } static uint8_t *buffer_expand(pkt_buffer *buf, int32_t len) { uint8_t *a; assert(buf->size >= buf->offs + len); a = buf->addr + buf->offs; buf->offs += len; return a; } void pkt_put_int8(pkt_buffer *buf, int8_t x) { uint8_t *b = buffer_expand(buf, 1); b[0] = (uint8_t)x; } void pkt_put_int16(pkt_buffer *buf, int16_t x) { uint8_t *b = buffer_expand(buf, 2); b[0] = (uint8_t)((x >> 8) & 0xff); b[1] = (uint8_t)(x & 0xff); } void pkt_put_int32(pkt_buffer *buf, int32_t x) { uint8_t *b = buffer_expand(buf, 4); b[0] = (uint8_t)((x >> 24) & 0xff); b[1] = (uint8_t)((x >> 16) & 0xff); b[2] = (uint8_t)((x >> 8) & 0xff); b[3] = (uint8_t)(x & 0xff); } void pkt_put_uint8(pkt_buffer *buf, uint8_t x) { uint8_t *b = buffer_expand(buf, 1); b[0] = x; } void pkt_put_uint16(pkt_buffer *buf, uint16_t x) { uint8_t *b = buffer_expand(buf, 2); b[0] = ((x >> 8) & 0xff); b[1] = (x & 0xff); } void pkt_put_uint32(pkt_buffer *buf, uint32_t x) { uint8_t *b = buffer_expand(buf, 4); b[0] = ((x >> 24) & 0xff); b[1] = ((x >> 16) & 0xff); b[2] = ((x >> 8) & 0xff); b[3] = (x & 0xff); } void pkt_put_string(pkt_buffer *buf, const char *x) { uint16_t n = strlen(x); uint8_t *b; unsigned int len; char *aux = malloc(n); if (!aux) return; len = char_unicode_encode(aux, x, n); /* * gnapplet expects number of chars to be read. * char_unicode_encode() encodes every char on two bytes. * strlen() doesn't return correct values for utf8 strings. */ pkt_put_uint16(buf, len / 2); b = buffer_expand(buf, len); memcpy(b, aux, len); free(aux); } void pkt_put_timestamp(pkt_buffer *buf, const gn_timestamp *x) { pkt_put_uint16(buf, x->year); pkt_put_uint8(buf, x->month); pkt_put_uint8(buf, x->day); pkt_put_uint8(buf, x->hour); pkt_put_uint8(buf, x->minute); pkt_put_uint8(buf, x->second); } void pkt_put_bool(pkt_buffer *buf, int x) { pkt_put_uint8(buf, x ? 1 : 0); } void pkt_put_bytes(pkt_buffer *buf, const uint8_t *x, uint16_t n) { uint8_t *b; pkt_put_uint16(buf, n); b = buffer_expand(buf, n); memcpy(b, x, n); } int8_t pkt_get_int8(pkt_buffer *buf) { uint8_t *b = buffer_expand(buf, 1); return (int8_t)b[0]; } int16_t pkt_get_int16(pkt_buffer *buf) { uint8_t *b = buffer_expand(buf, 2); return (int16_t)((b[0] << 8) + b[1]); } int32_t pkt_get_int32(pkt_buffer *buf) { uint8_t *b = buffer_expand(buf, 4); return (int32_t)((b[0] << 24) + (b[1] << 16) + (b[2] << 8) + b[3]); } uint8_t pkt_get_uint8(pkt_buffer *buf) { uint8_t *b = buffer_expand(buf, 1); return b[0]; } uint16_t pkt_get_uint16(pkt_buffer *buf) { uint8_t *b = buffer_expand(buf, 2); return (b[0] << 8) + b[1]; } uint32_t pkt_get_uint32(pkt_buffer *buf) { uint8_t *b = buffer_expand(buf, 4); return (b[0] << 24) + (b[1] << 16) + (b[2] << 8) + b[3]; } char *pkt_get_string(char *s, int slen, pkt_buffer *buf) { uint16_t l; uint8_t *b; l = pkt_get_uint16(buf); b = buffer_expand(buf, 2 * l); char_unicode_decode(s, b, l < slen - 1 ? 2 * l : 2 * slen - 2); return s; } gn_timestamp *pkt_get_timestamp(gn_timestamp *t, pkt_buffer *buf) { t->year = pkt_get_uint16(buf); t->month = pkt_get_uint8(buf); t->day = pkt_get_uint8(buf); t->hour = pkt_get_uint8(buf); t->minute = pkt_get_uint8(buf); t->second = pkt_get_uint8(buf); t->timezone = 0; return t; } int pkt_get_bool(pkt_buffer *buf) { return pkt_get_uint8(buf) ? (1 == 1) : 0; } uint16_t pkt_get_bytes(uint8_t *s, int len, pkt_buffer *buf) { uint16_t l; uint8_t *b; l = pkt_get_uint16(buf); assert(l <= len); b = buffer_expand(buf, l); memcpy(s, b, l); return l; } gnokii-0.6.31/common/nokia-decoding.c0000644000175000017500000004010511666163120015512 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings, Pavel Janik Copyright (C) 2000 Chris Kemp Copyright (C) 2001 Marian Jancar Copyright (C) 2001-2002 Markus Plail Copyright (C) 2001-2003 Ladis Michl Copyright (C) 2001-2004 Pawel Kot Copyright (C) 2002-2004 BORBELY Zoltan Copyright (C) 2002 Marcin Wiacek This file provides decoding functions specific to the newer Nokia 7110/6510 series. */ #include "config.h" #include #include "gnokii-internal.h" #include "gnokii.h" #include "nokia-decoding.h" #include "compat.h" gn_error phonebook_decode(unsigned char *blockstart, int length, gn_data *data, int blocks, int memtype, int speeddial_pos) { int subblock_count = 0, i; gn_phonebook_entry *entry = data->phonebook_entry; gn_phonebook_subentry* subentry = NULL; dprintf("Parts: %d\n", blocks); for (i = 0; i < blocks; i++) { dprintf("[%d] Blockstart: 0x%02x\n", i, blockstart[0]); /* FIXME ? */ dprintf("seq: %d\n", blockstart[4]); if (blockstart[0] != GN_PHONEBOOK_ENTRY_Logo && blockstart[0] != GN_PHONEBOOK_ENTRY_Ringtone && blockstart[0] != GN_PHONEBOOK_ENTRY_LogoSwitch && blockstart[0] != GN_PHONEBOOK_ENTRY_Group && blockstart[0] != GN_PHONEBOOK_ENTRY_Pointer && blockstart[0] != GN_PHONEBOOK_ENTRY_RingtoneAdv && /* the last one can be the case of the bitmap name -- we * don't have phonebook entry allocated then, but a bitmap; * we handle this later on */ blockstart[0] != GN_PHONEBOOK_ENTRY_Name) { if (data->phonebook_entry) subentry = &data->phonebook_entry->subentries[subblock_count]; else dprintf("ERROR: no subentry allocated\n"); } switch ((gn_phonebook_entry_type)blockstart[0]) { case GN_PHONEBOOK_ENTRY_Pointer: /* Pointer */ switch (memtype) { /* Memory type */ case GN_NOKIA_MEMORY_SPEEDDIALS: /* Speed dial numbers */ if (data && data->speed_dial) { unsigned char *str; data->speed_dial->location = (((unsigned int)blockstart[6]) << 8) + blockstart[7]; switch(blockstart[speeddial_pos]) { case 0x05: data->speed_dial->memory_type = GN_MT_ME; str = "phone"; break; case 0x06: str = "SIM"; data->speed_dial->memory_type = GN_MT_SM; break; default: str = "unknown"; data->speed_dial->memory_type = GN_MT_XX; break; } dprintf("Speed dial pointer: %i in %s\n", data->speed_dial->location, str); } else { dprintf("NULL entry?\n"); } break; default: /* FIXME: is it possible? */ dprintf("Wrong memory type(?)\n"); break; } break; case GN_PHONEBOOK_ENTRY_Name: /* Name */ if (data->bitmap) { char_unicode_decode(data->bitmap->text, (blockstart + 6), blockstart[5]); dprintf(" Bitmap Name: %s\n", data->bitmap->text); } if (data->phonebook_entry) { char_unicode_decode(data->phonebook_entry->name, (blockstart + 6), blockstart[5]); data->phonebook_entry->empty = false; dprintf(" Name: %s\n", data->phonebook_entry->name); } break; case GN_PHONEBOOK_ENTRY_Location: dprintf("Location: %d\n", blockstart[7]); break; case GN_PHONEBOOK_ENTRY_Image: dprintf("Image\n"); dprintf(" Image id: %02x %02x %02x %02x %02x %02x\n", blockstart[6], blockstart[7], blockstart[8], blockstart[9], blockstart[10], blockstart[11]); memcpy(subentry->data.fileid, blockstart+6, 6); break; case GN_PHONEBOOK_ENTRY_Video: dprintf("Video\n"); dprintf(" Video id: %02x %02x %02x %02x %02x %02x\n", blockstart[6], blockstart[7], blockstart[8], blockstart[9], blockstart[10], blockstart[11]); memcpy(subentry->data.fileid, blockstart+6, 6); break; case GN_PHONEBOOK_ENTRY_PostalAddress: dprintf("Postal Address %d parts\n", blockstart[7]); blocks += blockstart[7]; break; /* person related entries */ case GN_PHONEBOOK_ENTRY_FirstName: entry->person.has_person = 1; char_unicode_decode(entry->person.given_name, (blockstart + 6), blockstart[5]); dprintf(" Type: First name\n"); dprintf(" Text: %s\n", entry->person.given_name); break; case GN_PHONEBOOK_ENTRY_LastName: entry->person.has_person = 1; char_unicode_decode(entry->person.family_name, (blockstart + 6), blockstart[5]); dprintf(" Type: Last name\n"); dprintf(" Text: %s\n", entry->person.family_name); break; case GN_PHONEBOOK_ENTRY_FormalName: entry->person.has_person = 1; char_unicode_decode(entry->person.honorific_prefixes, (blockstart + 6), blockstart[5]); dprintf(" Type: Formal name\n"); dprintf(" Text: %s\n", entry->person.honorific_prefixes); break; /* address related entries */ case GN_PHONEBOOK_ENTRY_Postal: entry->address.has_address = 1; char_unicode_decode(entry->address.post_office_box, (blockstart + 6), blockstart[5]); dprintf(" Type: Postal address\n"); dprintf(" Text: %s\n", entry->address.post_office_box); break; case GN_PHONEBOOK_ENTRY_ExtendedAddress: entry->address.has_address = 1; char_unicode_decode(entry->address.extended_address, (blockstart + 6), blockstart[5]); dprintf(" Type: Extended address\n"); dprintf(" Text: %s\n", entry->address.extended_address); break; case GN_PHONEBOOK_ENTRY_Street: entry->address.has_address = 1; char_unicode_decode(entry->address.street, (blockstart + 6), blockstart[5]); dprintf(" Type: Street\n"); dprintf(" Text: %s\n", entry->address.street); break; case GN_PHONEBOOK_ENTRY_City: entry->address.has_address = 1; char_unicode_decode(entry->address.city, (blockstart + 6), blockstart[5]); dprintf(" Type: City\n"); dprintf(" Text: %s\n", entry->address.city); break; case GN_PHONEBOOK_ENTRY_StateProvince: entry->address.has_address = 1; char_unicode_decode(entry->address.state_province, (blockstart + 6), blockstart[5]); dprintf(" Type: State or province\n"); dprintf(" Text: %s\n", entry->address.state_province); break; case GN_PHONEBOOK_ENTRY_ZipCode: entry->address.has_address = 1; char_unicode_decode(entry->address.zipcode, (blockstart + 6), blockstart[5]); dprintf(" Type: Zipcode\n"); dprintf(" Text: %s\n", entry->address.zipcode); break; case GN_PHONEBOOK_ENTRY_Country: entry->address.has_address = 1; char_unicode_decode(entry->address.country, (blockstart + 6), blockstart[5]); dprintf(" Type: Country\n"); dprintf(" Text: %s\n", entry->address.country); break; /* other entries */ case GN_PHONEBOOK_ENTRY_PTTAddress: case GN_PHONEBOOK_ENTRY_UserID: case GN_PHONEBOOK_ENTRY_JobTitle: case GN_PHONEBOOK_ENTRY_Company: case GN_PHONEBOOK_ENTRY_Nickname: case GN_PHONEBOOK_ENTRY_Email: case GN_PHONEBOOK_ENTRY_URL: case GN_PHONEBOOK_ENTRY_Note: if (!subentry) { dprintf("ERROR!!!"); break; } subentry->entry_type = blockstart[0]; subentry->number_type = 0; subentry->id = blockstart[4]; #ifdef DEBUG if (blockstart[5] > GN_PHONEBOOK_NAME_MAX_LENGTH * 2) { dprintf("Entry too long: truncated from %d to %d bytes\n", blockstart[5] / 2, GN_PHONEBOOK_NAME_MAX_LENGTH); } #endif char_unicode_decode(subentry->data.number, (blockstart + 6), GNOKII_MIN(blockstart[5], GN_PHONEBOOK_NAME_MAX_LENGTH * 2)); dprintf(" Type: %d (%02x)\n", subentry->entry_type, subentry->entry_type); dprintf(" Text: %s\n", subentry->data.number); subblock_count++; data->phonebook_entry->subentries_count++; break; case GN_PHONEBOOK_ENTRY_Number: if (!subentry) { dprintf("ERROR!!!"); break; } subentry->entry_type = blockstart[0]; subentry->number_type = blockstart[5]; subentry->id = blockstart[4]; char_unicode_decode(subentry->data.number, (blockstart + 10), blockstart[9]); if (!subblock_count) snprintf(data->phonebook_entry->number, sizeof(data->phonebook_entry->number), "%s", subentry->data.number); dprintf(" Type: %d (%02x)\n", subentry->number_type, subentry->number_type); dprintf(" Number: %s\n", subentry->data.number); subblock_count++; data->phonebook_entry->subentries_count++; data->phonebook_entry->empty = false; break; case GN_PHONEBOOK_ENTRY_Ringtone: /* Ringtone */ if (data->bitmap) { if (blockstart[5]) /* doesn't work on 6310 */ data->bitmap->ringtone = blockstart[5]; else data->bitmap->ringtone = 256 * blockstart[6] + blockstart[7]; dprintf(" Ringtone no. %d\n", data->bitmap->ringtone); } break; case GN_PHONEBOOK_ENTRY_Date: case GN_PHONEBOOK_ENTRY_Birthday: if (!subentry) { dprintf("ERROR!!!"); break; } subentry->entry_type = blockstart[0]; subentry->number_type = blockstart[5]; subentry->id = blockstart[4]; subentry->data.date.year = (blockstart[6] << 8) + blockstart[7]; subentry->data.date.month = blockstart[8]; subentry->data.date.day = blockstart[9]; subentry->data.date.hour = blockstart[10]; subentry->data.date.minute = blockstart[11]; subentry->data.date.second = 0; dprintf(" Date: %04u.%02u.%02u\n", subentry->data.date.year, subentry->data.date.month, subentry->data.date.day); dprintf(" Time: %02u:%02u:%02u\n", subentry->data.date.hour, subentry->data.date.minute, subentry->data.date.second); subblock_count++; data->phonebook_entry->subentries_count++; break; case GN_PHONEBOOK_ENTRY_Logo: /* Caller group logo */ if (data->bitmap) { dprintf(" Caller logo received (h: %i, w: %i)!\n", blockstart[5], blockstart[6]); data->bitmap->width = blockstart[5]; data->bitmap->height = blockstart[6]; data->bitmap->size = (data->bitmap->width * data->bitmap->height) / 8; memcpy(data->bitmap->bitmap, blockstart + 10, data->bitmap->size); dprintf(" Bitmap: width: %i, height: %i\n", blockstart[5], blockstart[6]); } break; case GN_PHONEBOOK_ENTRY_LogoSwitch: /* Logo on/off */ dprintf(" Logo on/off\n"); break; case GN_PHONEBOOK_ENTRY_Group: /* Caller group number */ if (data->phonebook_entry) data->phonebook_entry->caller_group = blockstart[5] - 1; if (data->bitmap) data->bitmap->number = blockstart[5] - 1; dprintf(" Group: %d\n", blockstart[5] - 1); break; case GN_PHONEBOOK_ENTRY_ExtGroup: /* Extended caller group number: in Series40 3rd Ed and later groups are defined by users */ if (!subentry) { dprintf("ERROR!!!"); break; } subentry->entry_type = blockstart[0]; subentry->number_type = 0; subentry->id = blockstart[4]; subentry->data.id = blockstart[7]; subblock_count++; data->phonebook_entry->subentries_count++; break; case GN_PHONEBOOK_ENTRY_RingtoneAdv: /* Newer ringtones */ switch(blockstart[15]) { case 0x01: dprintf(" Gallery ringtone id: %02x %02x %02x %02x %02x %02x\n", blockstart[6], blockstart[7], blockstart[8], blockstart[9], blockstart[10], blockstart[11]); if (data->bitmap) { memcpy(data->bitmap->ringtone_id, blockstart+6, 6); data->bitmap->ringtone = -1; } else { dprintf("WARNING: no bitmap allocated for the phonebook entry\n"); } break; case 0x07: dprintf(" Standard ringtone: %d\n", blockstart[11]); if (data->bitmap) data->bitmap->ringtone = blockstart[11]; else dprintf("WARNING: no bitmap allocated for the phonebook entry\n"); break; default: dprintf(" Unknown ringtone entry!\n"); break; } break; default: dprintf("Unknown phonebook block %02x\n", blockstart[0]); { int j; for (j = 0; j < blockstart[3]; j++) dprintf("%02x ", blockstart[j]); dprintf("\n"); } break; } blockstart += blockstart[3]; } if (data->bitmap && data->bitmap->text[0] == '\0') { switch (data->bitmap->number) { case 0: snprintf(data->bitmap->text, sizeof(data->bitmap->text), "%s", _("Family")); break; case 1: snprintf(data->bitmap->text, sizeof(data->bitmap->text), "%s", _("VIP")); break; case 2: snprintf(data->bitmap->text, sizeof(data->bitmap->text), "%s", _("Friends")); break; case 3: snprintf(data->bitmap->text, sizeof(data->bitmap->text), "%s", _("Colleagues")); break; case 4: snprintf(data->bitmap->text, sizeof(data->bitmap->text), "%s", _("Other")); break; default: break; } } return GN_ERR_NONE; } gn_error calnote_get_alarm(int alarmdiff, gn_timestamp *time, gn_timestamp *alarm) { struct tm tm_time; if (!time || !alarm) return GN_ERR_INTERNALERROR; memset(&tm_time, 0, sizeof(tm_time)); tm_time.tm_year = time->year - 1900; tm_time.tm_mon = time->month - 1; tm_time.tm_mday = time->day; tm_time.tm_hour = time->hour; tm_time.tm_min = time->minute; tm_time.tm_sec -= alarmdiff; timegm(&tm_time); alarm->year = tm_time.tm_year + 1900; alarm->month = tm_time.tm_mon + 1; alarm->day = tm_time.tm_mday; alarm->hour = tm_time.tm_hour; alarm->minute = tm_time.tm_min; alarm->second = tm_time.tm_sec; return GN_ERR_NONE; } static gn_error calnote_get_times(unsigned char *block, gn_calnote *c) { time_t alarmdiff; gn_error e = GN_ERR_NONE; if (!c) return GN_ERR_INTERNALERROR; c->time.hour = block[0]; c->time.minute = block[1]; c->recurrence = (block[4] * 256 + block[5]) * 60; alarmdiff = block[2] * 256 + block[3]; if (alarmdiff != 0xffff) { e = calnote_get_alarm(alarmdiff * 60, &(c->time), &(c->alarm.timestamp)); c->alarm.enabled = true; } else { c->alarm.enabled = false; } return e; } gn_error calnote_decode(unsigned char *message, int length, gn_data *data) { unsigned char *block; int alarm; gn_error e = GN_ERR_NONE; if (!data->calnote) return GN_ERR_INTERNALERROR; block = message + 12; data->calnote->location = message[4] * 256 + message[5]; data->calnote->time.year = message[8] * 256 + message[9]; data->calnote->time.month = message[10]; data->calnote->time.day = message[11]; data->calnote->time.second = 0; switch (data->calnote->type = message[6]) { case GN_CALNOTE_MEETING: e = calnote_get_times(block, data->calnote); data->calnote->recurrence = 256 * block[4] + block[5]; if (e != GN_ERR_NONE) return e; char_unicode_decode(data->calnote->text, (block + 8), block[6] << 1); break; case GN_CALNOTE_CALL: e = calnote_get_times(block, data->calnote); data->calnote->recurrence = 256 * block[4] + block[5]; if (e != GN_ERR_NONE) return e; char_unicode_decode(data->calnote->text, (block + 8), block[6] << 1); char_unicode_decode(data->calnote->phone_number, (block + 8 + block[6] * 2), block[7] << 1); break; case GN_CALNOTE_REMINDER: data->calnote->recurrence = 256 * block[0] + block[1]; char_unicode_decode(data->calnote->text, (block + 4), block[2] << 1); break; case GN_CALNOTE_BIRTHDAY: data->calnote->time.hour = 23; data->calnote->time.minute = 59; data->calnote->time.second = 58; alarm = ((unsigned int)block[2]) << 24; alarm += ((unsigned int)block[3]) << 16; alarm += ((unsigned int)block[4]) << 8; alarm += block[5]; dprintf("alarm: %i\n", alarm); if (alarm == 0xffff) { data->calnote->alarm.enabled = false; } else { data->calnote->alarm.enabled = true; } e = calnote_get_alarm(alarm, &(data->calnote->time), &(data->calnote->alarm.timestamp)); if (e != GN_ERR_NONE) return e; data->calnote->time.hour = 0; data->calnote->time.minute = 0; data->calnote->time.second = 0; data->calnote->time.year = (((unsigned int)block[6]) << 8) + block[7]; char_unicode_decode(data->calnote->text, (block + 10), block[9] << 1); break; default: return GN_ERR_UNKNOWN; } return GN_ERR_NONE; } gnokii-0.6.31/common/gsm-networks.c0000644000175000017500000012417011666163120015304 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 2002-2003 Pawel Kot, Ladis Michl Copyright (C) 2002 Feico de Boer This file implements GSM networks searching. */ #include "config.h" #include #include "compat.h" #include "misc.h" #include "gnokii.h" /* The following data is taken from: * http://en.wikipedia.org/wiki/Mobile_network_code */ static gn_country countries[] = { {"412", "Afghanistan"}, {"276", "Albania"}, {"603", "Algeria"}, {"213", "Andorra"}, {"631", "Angola"}, {"365", "Anguilla"}, {"344", "Antigua and Barbuda"}, {"722", "Argentina"}, {"283", "Armenia"}, {"363", "Aruba"}, {"505", "Australia"}, {"232", "Austria"}, {"400", "Azerbaijan"}, {"426", "Bahrain"}, {"880", "Bangladesh"}, {"338", "Barbados"}, {"342", "Barbados"}, {"257", "Belarus"}, {"206", "Belgium"}, {"702", "Belize"}, {"616", "Benin"}, {"350", "Bermuda"}, {"402", "Bhutan"}, {"218", "Bosnia and Herzegovina"}, {"652", "Botswana"}, {"724", "Brazil"}, {"348", "British Virgin Islands"}, {"528", "Brunei Darussalam"}, {"284", "Bulgaria"}, {"613", "Burkina Faso"}, {"642", "Burundi"}, {"456", "Cambodia"}, {"624", "Cameroon"}, {"302", "Canada"}, {"625", "Cape Verde"}, {"346", "Cayman Islands"}, {"623", "Central African Republic"}, {"622", "Chad"}, {"730", "Chile"}, {"460", "China"}, {"732", "Colombia"}, {"654", "Comoros"}, {"548", "Cook Islands"}, {"712", "Costa Rica"}, {"219", "Croatia"}, {"368", "Cuba"}, {"280", "Cyprus"}, {"230", "Czech Republic"}, {"630", "Democratic Republic of the Congo"}, {"238", "Denmark"}, {"638", "Djibouti"}, {"370", "Dominican Republic"}, {"740", "Ecuador"}, {"602", "Egypt"}, {"706", "El Salvador"}, {"248", "Estonia"}, {"636", "Ethiopia"}, {"288", "Faroe Islands"}, {"542", "Fiji"}, {"244", "Finland"}, {"208", "France"}, {"547", "French Polynesia"}, {"628", "Gabon"}, {"607", "Gambia"}, {"282", "Georgia"}, {"262", "Germany"}, {"620", "Ghana"}, {"266", "Gibraltar"}, {"202", "Greece"}, {"290", "Greenland"}, {"340", "Guadeloupe"}, {"704", "Guatemala"}, {"611", "Guinea"}, {"632", "Guinea-Bissau"}, {"738", "Guyana"}, {"708", "Honduras"}, {"454", "Hong Kong"}, {"216", "Hungary"}, {"274", "Iceland"}, {"404", "India"}, {"405", "India"}, {"510", "Indonesia"}, {"901", "International"}, {"432", "Iran"}, {"418", "Iraq"}, {"272", "Ireland"}, {"425", "Israel"}, {"222", "Italy"}, {"612", "Ivory Coast"}, {"338", "Jamaica"}, {"440", "Japan"}, {"416", "Jordan"}, {"401", "Kazakhstan"}, {"639", "Kenya"}, {"450", "Korea"}, {"212", "Kosovo"}, {"419", "Kuwait"}, {"437", "Kyrgyzstan"}, {"457", "Laos"}, {"247", "Latvia"}, {"415", "Lebanon"}, {"651", "Lesotho"}, {"618", "Liberia"}, {"606", "Libya"}, {"295", "Liechtenstein"}, {"246", "Lithuania"}, {"270", "Luxembourg"}, {"455", "Macao"}, {"646", "Madagascar"}, {"650", "Malawi"}, {"502", "Malaysia"}, {"472", "Maldives"}, {"610", "Mali"}, {"278", "Malta"}, {"609", "Mauritania"}, {"617", "Mauritius"}, {"334", "Mexico"}, {"550", "Micronesia"}, {"259", "Moldova"}, {"208", "Monaco"}, {"428", "Mongolia"}, {"297", "Montenegro"}, {"604", "Morocco"}, {"643", "Mozambique"}, {"414", "Myanmar"}, {"649", "Namibia"}, {"429", "Nepal"}, {"204", "Netherlands"}, {"362", "Netherlands Antilles"}, {"546", "New Caledonia"}, {"530", "New Zealand"}, {"710", "Nicaragua"}, {"614", "Niger"}, {"621", "Nigeria"}, {"242", "Norway"}, {"422", "Oman"}, {"410", "Pakistan"}, {"552", "Palau"}, {"714", "Panama"}, {"537", "Papua New Guinea"}, {"744", "Paraguay"}, {"716", "Peru"}, {"260", "Poland"}, {"268", "Portugal"}, {"427", "Qatar"}, {"629", "Republic of Congo"}, {"294", "Republic of Macedonia"}, {"647", "Reunion"}, {"226", "Romania"}, {"250", "Russian Federation"}, {"635", "Rwanda"}, {"308", "Saint Pierre and Miquelon"}, {"549", "Samoa"}, {"292", "San Marino"}, {"626", "Sao Tome and Principe"}, {"420", "Saudi Arabia"}, {"608", "Senegal"}, {"220", "Serbia"}, {"633", "Seychelles"}, {"619", "Sierra Leone"}, {"525", "Singapore"}, {"231", "Slovakia"}, {"293", "Slovenia"}, {"655", "South Africa"}, {"214", "Spain"}, {"413", "Sri Lanka"}, {"634", "Sudan"}, {"746", "Suriname"}, {"653", "Swaziland"}, {"240", "Sweden"}, {"228", "Switzerland"}, {"417", "Syria"}, {"466", "Taiwan"}, {"436", "Tajikistan"}, {"640", "Tanzania"}, {"520", "Thailand"}, {"615", "Togo"}, {"539", "Tonga"}, {"374", "Trinidad and Tobago"}, {"605", "Tunisia"}, {"286", "Turkey"}, {"438", "Turkmenistan"}, {"641", "Uganda"}, {"255", "Ukraine"}, {"424", "United Arab Emirates"}, {"234", "United Kingdom"}, {"310", "United States of America"}, {"311", "United States of America"}, {"316", "United States of America"}, {"748", "Uruguay"}, {"434", "Uzbekistan"}, {"541", "Vanuatu"}, {"225", "Vatican"}, {"734", "Venezuela"}, {"452", "Viet Nam"}, {"421", "Yemen"}, {"645", "Zambia"}, {"648", "Zimbabwe"}, { NULL, NULL } }; static gn_network networks[] = { {"202 01", "Cosmote"}, {"202 05", "Vodafone"}, {"202 09", "Q-telecom"}, {"202 10", "WIND"}, {"204 02", "Tele2 Netherlands"}, {"204 04", "Vodafone"}, {"204 08", "KPN"}, {"204 12", "Telfort / O2 (KPN)"}, {"204 16", "T-Mobile / Ben"}, {"204 20", "Orange / Dutchtone (T-mobile)"}, {"204 21", "NS Railinfrabeheer B.V."}, {"206 01", "Proximus"}, {"206 10", "Mobistar"}, {"206 20", "BASE"}, {"208 01", "France Telecom"}, {"208 02", "Orange"}, {"208 05", "Globalstar Europe"}, {"208 06", "Globalstar Europe"}, {"208 07", "Globalstar Europe"}, {"208 10", "SFR"}, {"208 11", "SFR (UMTS)"}, {"208 13", "SFR (Zones Blanches)"}, {"208 20", "Bouygues Telecom"}, {"208 21", "Bouygues Telecom"}, {"208 88", "Bouygues Telecom (Zones Blanches)"}, {"213 03", "Mobiland"}, {"214 01", "Vodafone / Airtel"}, {"214 03", "Orange / Amena"}, {"214 04", "Yoigo / Xfera"}, {"214 05", "Telefonica Moviles Espana (used by resellers)"}, {"214 06", "Vodafone (used by resellers)"}, {"214 07", "Telefonica Moviles Espana (Movistar)"}, {"214 08", "Euskaltel (MVNO)"}, {"214 09", "Orange (used by resellers)"}, {"216 01", "Pannon"}, {"216 30", "T-Mobile"}, {"216 70", "Vodafone"}, {"218 01", "Cronet"}, {"218 03", "Eronet Mobile Communications Ltd."}, {"218 05", "MOBI's (Mobilina Srpske)"}, {"218 19", "PTT Bosnia"}, {"218 90", "PE PTT BIH"}, {"219 01", "T-Mobile Croatia"}, {"219 02", "Tele2"}, {"219 10", "VIPnet"}, {"220 01", "Telenor"}, {"220 02", "ProMonte"}, {"220 03", "MTS - Telekom Srbija"}, {"220 04", "T-Mobile Montenegro"}, {"220 05", "VIP Mobile"}, {"222 01", "TIM"}, {"222 02", "Elsacom"}, {"222 10", "Vodafone"}, {"222 30", "RFI"}, {"222 77", "IPSE 2000"}, {"222 88", "Wind"}, {"222 98", "Blu"}, {"222 99", "H3G"}, {"226 01", "Vodafone"}, {"226 03", "Cosmote"}, {"226 05", "digi tel"}, {"226 10", "Orange"}, {"228 01", "Swisscom NATEL / Telecom FL A"}, {"228 02", "diAx mobile / Sunrise"}, {"228 03", "Orange"}, {"228 05", "Togewanet AG"}, {"228 06", "SBB AG"}, {"228 07", "IN&Phone SA"}, {"228 08", "Tele2 Telecommunications AG"}, {"228 12", "Sunrise UMTS"}, {"228 50", "3G Mobile AG"}, {"228 51", "BebbiCell"}, {"230 01", "T-Mobile Czech Republic"}, {"230 02", "Telefonica O2 Czech Republic"}, {"230 03", "Vodafone"}, {"230 98", "SZDC s.o."}, {"230 99", "Cesky Mobil a.s., R&D Centre"}, {"231 01", "Orange"}, {"231 02", "T-Mobile Slovensko"}, {"231 03", "Unient Communications"}, {"231 04", "T-Mobile Slovensko (UMTS)"}, {"231 05", "Mobile Entertainment Company (UMTS)"}, {"231 06", "Telefonica O2 Slovakia"}, {"231 99", "ZSR"}, {"232 01", "Mobilkom Austria / A1"}, {"232 03", "T-Mobile"}, {"232 05", "One / Orange Oesterreich"}, {"232 07", "T-Mobile Austria"}, {"232 09", "Tele2"}, {"232 10", "Hutchison 3G - '3'"}, {"234 00", "Virgin 3510i"}, {"234 02", "O2"}, {"234 03", "Jersey Telenet / Bharti / AirTel"}, {"234 10", "Cellnet / O2"}, {"234 11", "O2"}, {"234 12", "Railtrack"}, {"234 15", "Vodafone"}, {"234 18", "Cloud9"}, {"234 20", "3 / Hutchison 3G"}, {"234 30", "T-Mobile"}, {"234 31", "Virgin"}, {"234 32", "Virgin"}, {"234 33", "Orange"}, {"234 34", "Orange"}, {"234 50", "Jersey Telecom / Wave (Guernsey)"}, {"234 55", "Cable & Wireless Guernsey / Sure Mobile (Jersey)"}, {"234 58", "Manx Telecom"}, {"238 01", "TDC"}, {"238 02", "Sonofon"}, {"238 03", "MIGway A/S"}, {"238 04", "TetraStar"}, {"238 05", "Sonofon"}, {"238 06", "3"}, {"238 10", "TDC"}, {"238 20", "Telia"}, {"238 30", "Telia"}, {"238 77", "Tele2"}, {"240 01", "Telia"}, {"240 02", "3"}, {"240 03", "Nordisk Mobiltelefon"}, {"240 04", "3G Infrastructure Services"}, {"240 05", "Sweden 3G (Owned by Telia and Tele2)"}, {"240 06", "Telenor"}, {"240 07", "Tele2"}, {"240 08", "Telenor"}, {"240 09", "Telenor Mobile Sverige"}, {"240 10", "SpringMobil"}, {"240 20", "Wireless Maingate"}, {"240 21", "Banverket"}, {"242 01", "Telenor Mobil"}, {"242 02", "NetCom GSM"}, {"242 03", "Teletopia"}, {"242 04", "Tele2"}, {"242 05", "Network Norway"}, {"242 07", "Ventelo"}, {"242 56", "Chess Communication"}, {"244 03", "DNA ltd. (formerly: Telia)"}, {"244 04", "Finnet Networks Ltd."}, {"244 05", "Elisa"}, {"244 09", "Finnet Group / Lannen Puhelin / Helsingin Puhelin"}, {"244 12", "FinNet"}, {"244 14", "Alands Mobiltelefon AB"}, {"244 16", "Oy Finland Tele2 AB"}, {"244 21", "Elisa (formerly: Saunalahti Group Ltd.)"}, {"244 91", "TeliaSonera Corporation"}, {"246 01", "Omnitel"}, {"246 02", "UAB Bite GSM"}, {"246 03", "Tele 2"}, {"247 01", "Latvian Mobile Tel."}, {"247 02", "Tele 2 / BALTCOM GSM"}, {"247 03", "Telekom Baltija"}, {"247 04", "Beta Telecom"}, {"248 01", "Estonian Mobile Telecom"}, {"248 02", "Elisa"}, {"248 03", "Tele 2"}, {"248 04", "OY Top Connect"}, {"248 05", "AS Bravocom Mobiil"}, {"248 06", "OY ViaTel"}, {"250 01", "MTS"}, {"250 02", "Megafon"}, {"250 03", "NCC / Nizhegorodskaya Cellular Communications"}, {"250 04", "Sibchallenge"}, {"250 05", "ETK / Yeniseytelecom"}, {"250 07", "Zao SMARTS"}, {"250 10", "Dontelekom"}, {"250 11", "Orensot"}, {"250 12", "Baykal Westcom / New Telephone Company / Far Eastern Cellular"}, {"250 13", "Kuban GSM"}, {"250 14", "Di-ex / Teleset LTD"}, {"250 16", "NTC / New Telephone Company"}, {"250 17", "Ermak RMS"}, {"250 19", "Volgograd Mobile / INDIGO"}, {"250 20", "Tele2 / ECC"}, {"250 28", "Extel"}, {"250 39", "Uraltel / Uralsvyazinform"}, {"250 44", "Stavtelesot / North Caucasian GSM"}, {"250 92", "Primtelefon"}, {"250 93", "Telecom XXI"}, {"250 99", "Beeline"}, {"255 01", "MTS"}, {"255 02", "Beeline"}, {"255 03", "Kyivstar"}, {"255 04", "IT CDMA/InterTelecom"}, {"255 05", "Golden Telecom"}, {"255 06", "life:)/A-stelit"}, {"255 07", "Utel/UkrTelecom"}, {"255 21", "PEOPLEnet/Telesystems of Ukraine"}, {"255 23", "ITC CDMA Ukraine"}, {"257 01", "Velcom"}, {"257 02", "MTS"}, {"257 04", "BeST"}, {"259 01", "Orange"}, {"259 02", "Moldcell"}, {"259 03", "Unite"}, {"259 04", "Eventis"}, {"260 01", "Plus (Polkomtel)"}, {"260 02", "Era (PTC)"}, {"260 03", "Orange (PTK Centertel)"}, {"260 04", "Tele2 Polska"}, {"260 06", "Play (P4)"}, {"260 07", "Premium Internet"}, {"260 08", "E-Telko"}, {"260 09", "Telekomunikacja Kolejowa"}, {"260 10", "Telefonu Opalenickie"}, {"260 12", "Halo Polsat"}, {"262 01", "T-Mobile / D1 - DeTe Mobil"}, {"262 02", "Vodafone"}, {"262 03", "E-Plus"}, {"262 04", "Vodafone"}, {"262 05", "E-Plus"}, {"262 06", "T-Mobile"}, {"262 07", "O2"}, {"262 08", "O2"}, {"262 09", "Vodafone"}, {"262 10", "Arcor AG & Co"}, {"262 11", "O2"}, {"262 12", "Dolphin Telecom"}, {"262 13", "Mobilcom Multimedia"}, {"262 14", "Group 3G UMTS"}, {"262 15", "Airdata"}, {"262 16", "vistream (MVNO)"}, {"262 60", "DB Telematik"}, {"262 76", "Siemens AG"}, {"262 77", "E-Plus"}, {"266 01", "Gibraltar Telecoms GibTel"}, {"268 01", "Vodafone"}, {"268 03", "Optimus"}, {"268 06", "TMN"}, {"270 01", "P&T Luxembourg"}, {"270 77", "Tango"}, {"270 99", "Voxmobile"}, {"272 01", "Vodafone"}, {"272 02", "O2"}, {"272 03", "Meteor"}, {"272 04", "Access Telecom"}, {"272 07", "Eircom"}, {"272 09", "Clever Communications"}, {"274 01", "Iceland Telecom Siminn"}, {"274 02", "Vodafone"}, {"274 03", "Islandssimi ehf"}, {"274 04", "IMC Islande ehf"}, {"274 07", "IceCell ehf"}, {"276 01", "Albanian Mobile Communications"}, {"276 02", "Vodafone"}, {"278 01", "Vodafone"}, {"278 21", "go mobile"}, {"280 01", "Cytamobile-Vodafone"}, {"280 10", "Areeba"}, {"282 01", "Geocell Limited"}, {"282 02", "Magticom GSM"}, {"282 03", "Iberiatel Ltd."}, {"282 04", "Mobitel"}, {"283 01", "ArmenTel"}, {"283 05", "Vivacell"}, {"284 01", "M-Tel"}, {"284 03", "Vivatel"}, {"284 05", "GLOBUL"}, {"286 01", "Turkcell"}, {"286 02", "Vodafone (Formerly known as Telsim)"}, {"286 03", "Avea (Formerly known as Aria)"}, {"286 04", "Aycell (Merged into Aria to form Avea)"}, {"288 01", "Faroese Telecom"}, {"288 02", "Kell GSM"}, {"290 01", "Tele Greenland"}, {"292 01", "Prima (San Marino Telecom)"}, {"293 40", "Si Mobil"}, {"293 41", "Mobitel"}, {"293 70", "Vega"}, {"294 01", "Mobimak / T-Mobile Macedonia"}, {"294 02", "Cosmofon"}, {"295 02", "Viag Europlatform AG"}, {"295 05", "Mobilkom (Liechtenstein) AG"}, {"295 77", "Tele2 AG"}, {"297 03", "m:tel"}, {"302 360", "Telus Mobility"}, {"302 361", "Telus Mobility"}, {"302 370", "Fido brand Rogers wireless"}, {"302 620", "ICE Wireless"}, {"302 651", "Bell Mobility"}, {"302 652", "BC Tel Mobility"}, {"302 653", "Telus Mobility"}, {"302 654", "Sask Tel Mobility"}, {"302 655", "MTS Mobility"}, {"302 656", "Tbay Mobility"}, {"302 657", "Telus (Quebec) Mobility"}, {"302 701", "MB Tel Mobility"}, {"302 702", "MT&T Mobility"}, {"302 703", "New Tel Mobility"}, {"302 710", "Globalstar"}, {"302 720", "Rogers Wireless"}, {"308 01", "St. Pierre-et-Miquelon Telecom"}, {"310 000", "Mid-Tex Celular"}, {"310 010", "MCI"}, {"310 012", "Verizon Wireless"}, {"310 013", "MobileTel"}, {"310 014", "Testing"}, {"310 016", "Cricket Communications"}, {"310 017", "North Sight Communications Inc."}, {"310 020", "APC Sprint Spectrum / Union Telephone Company"}, {"310 030", "Centennial Communications"}, {"310 032", "IT&E Overseas, Inc."}, {"310 033", "Guam Telephone Authority"}, {"310 034", "Nevada Wireless LLC"}, {"310 040", "Concho Cellular Telephone Co., Inc."}, {"310 060", "Consolidated Telcom"}, {"310 070", "Highland Cellular, Inc."}, {"310 080", "Corr Wireless Communications LLC"}, {"310 090", "Edge Wireless"}, {"310 100", "New Mexico RSA 4 East Ltd. Partnership"}, {"310 110", "Wireless 2000 Telephone"}, {"310 150", "Cingular / Bell South / BellSouth Mobility DCS"}, {"310 160", "T-Mobile / Omnipoint Communications"}, {"310 170", "Cingular / Pacific Bell Wireless / T-Mobile"}, {"310 180", "Cingular / West Central Wireless"}, {"310 190", "Alaska Telecom Mobile / Alaska Wireless Communications"}, {"310 200", "T-Mobile / T-Mobile Idaho / Oregon / Washington State"}, {"310 210", "T-Mobile / T-Mobile Iowa"}, {"310 220", "T-Mobile / T-Mobile Kansas / Oklahoma"}, {"310 230", "T-Mobile / T-Mobile Utah"}, {"310 240", "T-Mobile / T-Mobile New Mexico / Texas / Arizona"}, {"310 250", "T-Mobile / T-Mobile Hawaii"}, {"310 260", "T-Mobile / Western Wireless / Voicestream"}, {"310 270", "T-Mobile / Powertel"}, {"310 280", "T-Mobile"}, {"310 290", "T-Mobile"}, {"310 300", "T-Mobile"}, {"310 310", "T-Mobile / T-Mobile Florida / Aerial Communications"}, {"310 340", "High Plains Midwest LLC (Westlink Communications)"}, {"310 380", "AT&T Wireless / Cingular"}, {"310 410", "AT&T"}, {"310 420", "Cincinnati Bell Wireless"}, {"310 430", "Alaska Digitel"}, {"310 450", "North East Cellular"}, {"310 460", "TMP Corporation"}, {"310 470", "Guam Wireless Telephone Company"}, {"310 480", "Choice Phone"}, {"310 490", "Triton PCS"}, {"310 500", "Public Service Cellular"}, {"310 510", "Airtel Wireless"}, {"310 520", "VeriSign"}, {"310 530", "West Virginia Wireless"}, {"310 540", "Oklahoma Western Telephone Company"}, {"310 560", "American Cellular Corporation"}, {"310 570", "MTPCS, LLC / Chinook Wireless"}, {"310 580", "PCS ONE"}, {"310 590", "Western Wireless Corporation / Alltel"}, {"310 610", "Elkhart Telephone Co. / Epic Touch Co."}, {"310 620", "Coleman County Telecommunications / Trans Texas PCS"}, {"310 630", "Comtel PCS Mainstreet LP"}, {"310 640", "Airadigm Communications"}, {"310 660", "T-Mobile"}, {"310 670", "Northstar"}, {"310 680", "Noverr Publishing, Inc. dba NPI Wireless"}, {"310 690", "Conestoga Wireless Company"}, {"310 730", "SeaMobile"}, {"310 740", "Telemetrix Technologies"}, {"310 760", "Panhandle Telecommunications Systems Inc."}, {"310 770", "Iowa Wireless Services"}, {"310 780", "Message Express Company dba Airlink PCS"}, {"310 790", "PinPoint Communications"}, {"310 800", "T-Mobile"}, {"310 830", "Caprock Cellular"}, {"310 850", "Aeris Communications"}, {"310 870", "Kaplan Telephone Company"}, {"310 880", "Advantage Cellular Systems"}, {"310 890", "Rural Cellular Corporation"}, {"310 900", "Taylor Telecommunications"}, {"310 910", "Southern IL RSA Partnership / First Cellular of Southern Illinois"}, {"310 940", "Poka Lambro Telecommunications"}, {"310 950", "Texas RSA 1 dba XIT Cellular (XIT Wireless)"}, {"310 970", "Globalstar"}, {"310 980", "AT&T Wireless Services"}, {"311 000", "Mid-Tex Cellular"}, {"311 010", "Chariton Valley Communications"}, {"311 020", "Missouri RSA 5 Partnership"}, {"311 030", "Indigo Wireless"}, {"311 040", "Commet Wireless"}, {"311 050", "Farmers Cellular Telephone"}, {"311 060", "Farmers Cellular Telephone"}, {"311 070", "Easterbrooke Cellular Corporation"}, {"311 080", "Pine Cellular / Pine Telephone Company"}, {"311 090", "Siouxland PCS"}, {"311 100", "High Plains Wireless"}, {"311 110", "High Plains Wireless"}, {"311 120", "Choice Phone"}, {"311 130", "Amarillo License"}, {"311 140", "MBO Wireless / Cross Telephone Company"}, {"311 150", "Wilkes Cellular"}, {"311 160", "Endless Mountains Wireless"}, {"311 180", "Cingular Wireless / Licensee Pacific Telesis Mobile Services"}, {"311 210", "Farmers Cellular Telephone"}, {"316 010", "Nextel Communications"}, {"316 011", "Southern Communications Services"}, {"334 01", "Nextel Mexico"}, {"334 02", "Telcel"}, {"334 03", "Telefonica Moviles Mexico (movistar)"}, {"338 020", "Cable & Wireless"}, {"338 05", "Digicel"}, {"338 050", "Mossel Digicel"}, {"338 070", "ODJ"}, {"338 180", "C&W"}, {"340 01", "Orange Caraibe Mobiles"}, {"340 02", "Outremer Telecom"}, {"340 03", "Saint Martin et Saint Barthelemy Telcell Sarl"}, {"340 20", "Digicel (ex-Bouygues Telecom Caraibes)"}, {"342 600", "Cable & Wireless (Barbados) Ltd."}, {"342 820", "Sunbeach Communications"}, {"344 030", "APUA"}, {"344 920", "bmobile"}, {"344 930", "Digicel"}, {"346 140", "Cable & Wireless (Cayman)"}, {"348 570", "Caribbean Cellular Telephone"}, {"362 51", "TELCELL GSM"}, {"362 69", "CT GSM"}, {"362 91", "SETEL GSM / CHIPP"}, {"363 01", "Setar"}, {"363 20", "Digicell"}, {"365 10", "Weblinks Limited"}, {"368 01", "Cubacel"}, {"370 01", "Orange Dominicana"}, {"370 02", "Compania Dominicana de Telefonos, C por A. (Claro)"}, {"370 03", "Tricom S.A."}, {"370 04", "Centennial Dominicana"}, {"374 12", "TSTT"}, {"374 13", "Digicel"}, {"400 01", "Azercell"}, {"400 02", "Bakcell"}, {"400 03", "Catel"}, {"400 04", "Nar Mobile"}, {"401 01", "K-Mobile/Beeline/ Kar-Tel"}, {"401 02", "K'Cell / JSC \"Kazakhtelecom\""}, {"401 07", "Dalacom / JSC \"Altel\""}, {"401 77", "NEO Telecom / JSC \"Kazakhtelecom\""}, {"402 17", "B-Mobile"}, {"404 01", "AirCell Digilink"}, {"404 02", "Airtel"}, {"404 03", "Airtel / Bharti Telenet"}, {"404 04", "Idea Cellular"}, {"404 05", "Hutch / Fascel"}, {"404 06", "Airtel"}, {"404 07", "TATA Cellular / Idea Cellular"}, {"404 09", "Reliance Telecom Private"}, {"404 10", "Airtel"}, {"404 11", "Essar / Sterling Cellular"}, {"404 12", "Escotel Mobile Comms"}, {"404 13", "Hutchison Essar South"}, {"404 14", "Spice Communications / Modi Telstra Modicom"}, {"404 15", "Aircell Digilink Essar Cellph."}, {"404 20", "Vodafone Mumbai (formerly Hutchison Maxtouch / Orange/ Hutch Mumbai)"}, {"404 21", "BPL Mobile Mumbai"}, {"404 22", "Idea Cellular Maharashtra & Goa"}, {"404 24", "Idea Cellular"}, {"404 27", "BPL USWest Cellular / Cellular Comms"}, {"404 30", "Usha Martin Tel. Command"}, {"404 31", "Airtel"}, {"404 34", "BSNL"}, {"404 36", "Reliance Telecom Private"}, {"404 38", "BSNL"}, {"404 40", "Airtel"}, {"404 41", "RPG MAA"}, {"404 42", "Srinivas Cellcom / Aircel"}, {"404 43", "BPL Mobile Cellular"}, {"404 44", "Spice"}, {"404 45", "Airtel"}, {"404 46", "BPL Cellular (Now vodafone)"}, {"404 49", "Airtel"}, {"404 50", "Reliance Telecom Private"}, {"404 51", "BSNL"}, {"404 52", "Reliance Telecom Private"}, {"404 53", "BSNL"}, {"404 54", "BSNL"}, {"404 55", "BSNL"}, {"404 56", "Escotel Mobile Communications Private"}, {"404 57", "BSNL"}, {"404 58", "BSNL"}, {"404 59", "BSNL"}, {"404 60", "Aircell Digilink"}, {"404 62", "BSNL"}, {"404 64", "BSNL"}, {"404 66", "BSNL"}, {"404 67", "Reliance Telecom Private"}, {"404 68", "Mahanagar Telephone Nigam"}, {"404 69", "DOLPHIN / Mahanagar Telephone Nigam"}, {"404 70", "Airtel"}, {"404 71", "BSNL"}, {"404 72", "BSNL Kerala"}, {"404 73", "BSNL"}, {"404 74", "BSNL"}, {"404 75", "BSNL / CellOne"}, {"404 76", "BSNL"}, {"404 77", "BSNL"}, {"404 78", "BTA Cellcom"}, {"404 80", "BSNL"}, {"404 81", "BSNL"}, {"404 82", "Escorts Telecom"}, {"404 83", "Reliable Internet Services"}, {"404 84", "Hutchison Essar South"}, {"404 85", "Reliance Telecom Private"}, {"404 86", "Hutchinson Essar South"}, {"404 87", "Escorts Telecom"}, {"404 88", "Escorts Telecom"}, {"404 89", "Escorts Telecom"}, {"404 90", "Airtel Maharashtra & Goa"}, {"404 92", "Airtel Mumbai"}, {"404 93", "Airtel Gujrat"}, {"404 94", "Airtel"}, {"404 95", "Airtel"}, {"404 96", "Airtel"}, {"404 97", "Airtel"}, {"404 98", "Airtel"}, {"405 51", "Airtel"}, {"405 52", "Airtel"}, {"405 66", "Hutch"}, {"410 01", "Mobilink"}, {"410 03", "UFONE"}, {"410 04", "Paktel"}, {"410 06", "Telenor"}, {"410 07", "Warid"}, {"412 01", "Afghan Wireless Communication Company"}, {"412 20", "Roshan"}, {"412 40", "Areeba"}, {"412 50", "Etisalat"}, {"413 01", "Mobitel Lanka Ltd."}, {"413 02", "Dialog Telekom PLC."}, {"413 03", "Celtel Lanka Ltd / Tigo."}, {"413 08", "Hutch Sri Lanka."}, {"414 01", "Myanmar Post and Telecommunication"}, {"415 01", "Alfa"}, {"415 03", "MTC Touch"}, {"416 01", "J.M.T.S. Fastlink"}, {"416 77", "MobCom"}, {"417 01", "SyriaTel"}, {"417 02", "Spacetel Syria"}, {"417 09", "Syrian Telecom Est. MOBILE"}, {"418 01", "Iraq Telecom"}, {"419 02", "Mobile Telecoms / MTCNet"}, {"419 03", "Wataniya"}, {"420 01", "Saudi Telecom / Ministry of PTT Al Jawal"}, {"420 07", "Electronics App' Est. / EAE"}, {"421 01", "SabaFon"}, {"421 02", "MTN"}, {"422 02", "General Telecoms"}, {"424 02", "Etisalat"}, {"424 03", "Emirates Integrated Telecommunications Company (du)"}, {"425 01", "Orange"}, {"425 02", "Cellcom"}, {"425 03", "Pelephone"}, {"425 77", "Mirs"}, {"426 01", "Batelco"}, {"426 02", "MTC-VFBH"}, {"427 01", "Q-Net / Q-Tel QATARNET"}, {"428 88", "Unitel"}, {"428 99", "Mobicom"}, {"429 01", "Nepal Telecommunications"}, {"429 02", "Spice Nepal Pvt. Ltd."}, {"429 03", "United Telecom Ltd."}, {"432 11", "Mobile Communications Company of Iran / IR-MCI"}, {"432 14", "Telecommunication Kish Co. (Kifzo)"}, {"432 19", "Mobile Telecommunications Company of Esfahan (MTCE)"}, {"432 32", "Taliya"}, {"432 35", "MTN Irancell"}, {"434 01", "Buztel"}, {"434 02", "Uzmacom"}, {"434 04", "Beeline"}, {"434 05", "Coscom"}, {"434 07", "MTS"}, {"436 01", "JC Somoncom"}, {"436 02", "CJSC Indigo Tajikistan"}, {"436 03", "TT mobile"}, {"436 04", "Josa Babilon-T"}, {"436 05", "CTJTHSC Tajik-tel"}, {"437 01", "Bitel"}, {"438 01", "Barash Communication Technologies (BCTI)"}, {"438 02", "TM-Cell"}, {"440 01", "NTT DoCoMo"}, {"440 02", "NTT DoCoMo Kansai"}, {"440 03", "NTT DoCoMo Hokuriku"}, {"440 04", "Vodafone"}, {"440 06", "Vodafone"}, {"440 07", "KDDI Corporation"}, {"440 08", "KDDI Corporation"}, {"440 09", "NTT DoCoMo Kansai"}, {"440 10", "NTT DoCoMo Kansai"}, {"440 11", "NTT DoCoMo Tokai"}, {"440 12", "NTT DoCoMo"}, {"440 13", "NTT DoCoMo"}, {"440 14", "NTT DoCoMo Tohoku"}, {"440 15", "NTT DoCoMo"}, {"440 16", "NTT DoCoMo"}, {"440 17", "NTT DoCoMo"}, {"440 18", "NTT DoCoMo Tokai"}, {"440 19", "NTT DoCoMo Hokkaido"}, {"440 20", "NTT DoCoMo Hokuriku"}, {"440 21", "NTT DoCoMo"}, {"440 22", "NTT DoCoMo Kansai"}, {"440 23", "NTT DoCoMo Tokai"}, {"440 24", "NTT DoCoMo Chugoku"}, {"440 25", "NTT DoCoMo Hokkaido"}, {"440 26", "NTT DoCoMo Kyushu"}, {"440 27", "NTT DoCoMoTohoku"}, {"440 28", "NTT DoCoMo Shikoku"}, {"440 29", "NTT DoCoMo"}, {"440 30", "NTT DoCoMo"}, {"440 31", "NTT DoCoMo Kansai"}, {"440 32", "NTT DoCoMo"}, {"440 33", "NTT DoCoMo Tokai"}, {"440 34", "NTT DoCoMo Kyushu"}, {"440 35", "NTT DoCoMo Kansai"}, {"440 36", "NTT DoCoMo"}, {"440 37", "NTT DoCoMo"}, {"440 38", "NTT DoCoMo"}, {"440 39", "NTT DoCoMo"}, {"440 40", "Vodafone"}, {"440 41", "Vodafone"}, {"440 42", "Vodafone"}, {"440 43", "Vodafone"}, {"440 44", "Vodafone"}, {"440 45", "Vodafone"}, {"440 46", "Vodafone"}, {"440 47", "Vodafone"}, {"440 48", "Vodafone"}, {"440 49", "NTT DoCoMo"}, {"440 50", "KDDI Corporation"}, {"440 51", "KDDI Corporation"}, {"440 52", "KDDI Corporation"}, {"440 53", "KDDI Corporation"}, {"440 54", "KDDI Corporation"}, {"440 55", "KDDI Corporation"}, {"440 56", "KDDI Corporation"}, {"440 58", "NTT DoCoMo Kansai"}, {"440 60", "NTT DoCoMo Kansai"}, {"440 61", "NTT DoCoMo Chugoku"}, {"440 62", "NTT DoCoMo Kyushu"}, {"440 63", "NTT DoCoMo"}, {"440 64", "NTT DoCoMo"}, {"440 65", "NTT DoCoMo Shikoku"}, {"440 66", "NTT DoCoMo"}, {"440 67", "NTT DoCoMo Tohoku"}, {"440 68", "NTT DoCoMo Kyushu"}, {"440 69", "NTT DoCoMo"}, {"440 70", "KDDI Corporation"}, {"440 71", "KDDI Corporation"}, {"440 72", "KDDI Corporation"}, {"440 73", "KDDI Corporation"}, {"440 74", "KDDI Corporation"}, {"440 75", "KDDI Corporation"}, {"440 76", "KDDI Corporation"}, {"440 77", "KDDI Corporation"}, {"440 78", "Okinawa Cellular Telephone"}, {"440 79", "KDDI Corporation"}, {"440 80", "TU-KA Cellular Tokyo"}, {"440 81", "TU-KA Cellular Tokyo"}, {"440 82", "TU-KA Phone Kansai"}, {"440 83", "TU-KA Cellular Tokai"}, {"440 84", "TU-KA Phone Kansai"}, {"440 85", "TU-KA Cellular Tokai"}, {"440 86", "TU-KA Cellular Tokyo"}, {"440 87", "NTT DoCoMo Chugoku"}, {"440 88", "KDDI Corporation"}, {"440 89", "KDDI Corporation"}, {"440 90", "Vodafone"}, {"440 92", "Vodafone"}, {"440 93", "Vodafone"}, {"440 94", "Vodafone"}, {"440 95", "Vodafone"}, {"440 96", "Vodafone"}, {"440 97", "Vodafone"}, {"440 98", "Vodafone"}, {"440 99", "NTT DoCoMo"}, {"450 02", "KTF CDMA"}, {"450 05", "SK Telecom"}, {"450 08", "KTF WCDMA"}, {"452 00", "Mobifone / MTSC"}, {"452 01", "Mobifone / MTSC"}, {"452 02", "Vinaphone / DGPT"}, {"452 03", "S-Phone / S-Telecom"}, {"452 98", "HT Mobile / Hanoi Telecom"}, {"452 99", "E-Phone / EVN Telecom"}, {"454 00", "CSL"}, {"454 01", "MVNO)"}, {"454 02", "CSL 3G"}, {"454 03", "Hutchison Telecom / 3 (3G)"}, {"454 04", "Hutchison Telecom / 3 (2G)"}, {"454 05", "Hutchison Telecom / 3 CDMA"}, {"454 06", "SmarTone Mobile Comms / Smartone-Vodafone"}, {"454 07", "MVNO)"}, {"454 08", "MVNO)"}, {"454 09", "MVNO)"}, {"454 10", "New World PCS"}, {"454 11", "MVNO)"}, {"454 12", "China Mobile Peoples Telephone Company"}, {"454 14", "Hutchison Telecom"}, {"454 15", "SMT (UMTS)"}, {"454 16", "PCCW Mobile (PCCW Ltd)"}, {"454 17", "SmarTone"}, {"454 18", "Hong Kong Telecom CSL / Pacific Link"}, {"454 19", "PCCW Mobile (PCCW Ltd)"}, {"455 00", "Smartone Mobile Communications (Macao) Ltd"}, {"455 01", "C.T.M. Telemovel+"}, {"455 03", "Hutchison Telecom / 3"}, {"456 01", "Mobitel / Cam GSM"}, {"456 02", "Samart / Casacom"}, {"456 03", "S Telecom"}, {"456 04", "Cadcomms"}, {"456 18", "Camshin / Shinawatra"}, {"457 01", "Lao Shinawatra Telecom"}, {"457 02", "ETL Mobile"}, {"457 08", "Millicom"}, {"460 00", "China Mobile"}, {"460 01", "China Unicom"}, {"466 01", "FarEasTone"}, {"466 06", "Tuntex Telecom"}, {"466 11", "Chunghwa"}, {"466 88", "KG Telecom"}, {"466 89", "VIBO Telecom"}, {"466 92", "LDTA"}, {"466 93", "Mobitai Communications"}, {"466 97", "Pacific Cellular TWN GSM"}, {"466 99", "TransAsia Telecoms"}, {"472 01", "DhiMobile"}, {"472 02", "Choq Mobile"}, {"502 00", "Art900"}, {"502 02", "My BSB"}, {"502 03", "Binariang"}, {"502 12", "Maxis / Binariang Communications"}, {"502 13", "Celcom TM / TM Touch"}, {"502 16", "DiGi Telecommunications"}, {"502 17", "TimeCel / Binariang Communications Maxis"}, {"502 19", "Celcom TM"}, {"505 01", "Telstra"}, {"505 02", "Optus"}, {"505 03", "Vodafone"}, {"505 038", "Crazy John's"}, {"505 04", "Department of Defence"}, {"505 05", "Ozitel"}, {"505 06", "Hutchison 3G (3)"}, {"505 07", "Vodafone"}, {"505 08", "One. Tel"}, {"505 09", "Airnet"}, {"505 11", "Telstra"}, {"505 12", "Hutchison 3G (3)"}, {"505 14", "AAPT"}, {"505 15", "3GIS"}, {"505 24", "Advanced Communications Technologies"}, {"505 71", "Telstra"}, {"505 72", "Telstra"}, {"505 88", "Localstar"}, {"505 90", "Optus"}, {"505 99", "One. Tel"}, {"510 00", "PSN"}, {"510 01", "PT Satelindo / PT Satelit Palapa / INDOSAT"}, {"510 08", "Natrindo (Lippo Telecom)"}, {"510 10", "Telkomsel"}, {"510 11", "PT Excelcomindo Excelcom / proXL"}, {"510 21", "IND IM3 / INDOSAT"}, {"510 28", "Komselindo"}, {"510 89", "Hutchinson Telecommunication Indonesia / HCPT"}, {"520 00", "CAT CDMA"}, {"520 01", "AIS / Advanced Info Service GSM"}, {"520 10", "WCS IQ"}, {"520 15", "Thai Mobile / ACT Mobile"}, {"520 18", "DTAC / Total Access Comms"}, {"520 23", "Digital Phone Hello"}, {"520 99", "True / Orange"}, {"525 01", "Singapore Telecom / SingTel"}, {"525 02", "Singapore Telecom / SingTel"}, {"525 03", "MobileOne Asia / SGP-M1-3GS"}, {"525 05", "StarHub"}, {"525 12", "Digital Trunked Radio Network"}, {"528 01", "Jabatan Telekom"}, {"528 02", "BRU-bmobile"}, {"528 11", "DST Communications"}, {"530 00", "Telecom New Zealand (AMPS MIN based IMSI's)"}, {"530 01", "Vodafone New Zealand"}, {"530 02", "Telecom New Zealand (CDMA Mobile Network)"}, {"530 03", "Woosh Wireless New Zealand"}, {"530 04", "TelstraClear New Zealand"}, {"530 28", "Econet Wireless New Zealand"}, {"537 01", "Pacific Mobile Comms"}, {"539 01", "Tonga Communications Corporation"}, {"539 43", "Shoreline Communication"}, {"541 01", "SMILE"}, {"542 01", "Vodafone"}, {"546 01", "OPT Mobilis"}, {"547 20", "Tikiphone"}, {"548 01", "Telecom Cook"}, {"549 01", "Telecom Samoa Cellular Ltd."}, {"550 01", "FSM Telecom"}, {"552 01", "Palau National Communications Corp. - PNCC"}, {"602 01", "Mobinil"}, {"602 02", "Vodafone"}, {"602 03", "Etisalat"}, {"603 01", "ATM Mobilis"}, {"603 02", "Djezzy"}, {"603 03", "Nedjma"}, {"604 00", "Meditel"}, {"604 01", "IAM / Ittissalat Al Maghrib / Maroc Telecom"}, {"605 02", "Tunicell / Tunisian PTT / Tunisie Telecom"}, {"605 03", "Orascom Telecom"}, {"606 00", "Libyana"}, {"606 01", "AlMadar"}, {"607 01", "Gamcel"}, {"607 02", "Africel"}, {"608 01", "Sonatel ALIZE"}, {"608 02", "Sentel GSM"}, {"609 01", "Mattel"}, {"610 01", "Malitel"}, {"611 01", "Spacetel"}, {"611 02", "Sotelgui Lagui"}, {"612 01", "Cora de Comstar"}, {"612 02", "Moov"}, {"612 03", "Orange"}, {"612 04", "KOZ de Comium"}, {"612 05", "MTN"}, {"613 01", "Onatel"}, {"613 02", "Celtel"}, {"613 03", "Telecel / Moov"}, {"614 01", "Sahel.Com"}, {"614 02", "Celtel"}, {"614 03", "Telecel"}, {"615 01", "Togo Telecom / TOGO CELL"}, {"616 01", "Libercom"}, {"616 02", "Telecel / Moov"}, {"616 03", "Spacetel Benin"}, {"617 01", "Cellplus"}, {"617 02", "Mahanagar Telephone (Mauritius) Ltd."}, {"617 10", "Emtel"}, {"618 01", "Omega Communications"}, {"618 04", "Comium Liberi"}, {"619 01", "Celtel"}, {"619 02", "Millicom"}, {"619 03", "Datatel"}, {"619 04", "Comium"}, {"619 05", "Africell"}, {"619 25", "Mobitel"}, {"620 01", "MTN - Areeba / ScanCom"}, {"620 02", "Onetouch / Ghana Telecom"}, {"620 03", "Tigo / Mobitel"}, {"621 20", "Celtel / V-Mobile / Econet Wireless Nigeria Ltd."}, {"621 30", "MTN"}, {"621 40", "Nigeria Telecommunications Ltd."}, {"621 50", "Glo"}, {"622 01", "Celtel"}, {"622 02", "Tchad Mobile"}, {"623 01", "Centrafrique Telecom Plus (CTP)"}, {"623 02", "Telecel Centrafrique (TC)"}, {"623 03", "Orange RCA"}, {"623 04", "Nationlink RCA"}, {"624 01", "Mobile Telephone Network"}, {"624 02", "Orange"}, {"625 01", "Cabo Verde Telecom"}, {"626 01", "Companhia Santomese de Telecomunicacoes (CSTmovel)"}, {"628 01", "Libertis S.A."}, {"628 02", "Moov (Telecel) Gabon S.A."}, {"628 03", "Celtel Gabon S.A."}, {"629 01", "Celtel"}, {"629 10", "Libertis Telecom"}, {"630 01", "Vodacom Congo RDC sprl"}, {"630 86", "Congo-Chine Telecom s.a.r.l."}, {"631 02", "UNITEL"}, {"632 02", "Spacetel Guine-Bissau S.A."}, {"633 01", "Cable & Wireless (Seychelles) Ltd."}, {"633 02", "Mediatech International Ltd."}, {"633 10", "Telecom Airtel"}, {"634 01", "Mobitel / Mobile Telephone Company"}, {"634 02", "MTN Sudan"}, {"635 10", "Rwandacell / MTN"}, {"636 01", "ETH MTN / Ethiopian Telecoms Auth."}, {"638 01", "Evatis"}, {"639 02", "Safaricom Ltd."}, {"639 03", "Kencell Communications Ltd."}, {"640 01", "Tritel"}, {"640 02", "MIC"}, {"640 03", "Zantel"}, {"640 04", "Vodacom"}, {"640 05", "Celtel"}, {"641 01", "Celtel Cellular"}, {"641 10", "MTN Uganda"}, {"641 11", "Uganda Telecom Ltd."}, {"642 01", "Spacetel Burundi"}, {"642 02", "Safaris"}, {"642 03", "Telecel Burundi Company"}, {"643 01", "Mocambique Celular S.A.R.L (mCel)"}, {"643 04", "VM, S.A.R.L. (Vodacom Mozambique)"}, {"645 01", "Celtel"}, {"645 02", "Telecel"}, {"645 03", "MTN"}, {"646 01", "Madacom"}, {"646 02", "Orange"}, {"646 03", "Sacel"}, {"647 00", "Orange La Reunion"}, {"647 02", "Outremer Telecom"}, {"647 10", "SRR / Societe Reunionnaise du Radiotelephone"}, {"648 01", "Net One"}, {"648 03", "Telecel"}, {"648 04", "Econet"}, {"649 01", "MTC"}, {"650 01", "TNL / Telecom Network Callpoint"}, {"650 10", "Celtel ltd."}, {"651 01", "Vodacom"}, {"651 02", "Econet Ezin-cel"}, {"652 01", "Mascom Wireless"}, {"652 02", "Orange Botswana"}, {"653 10", "Swazi MTN"}, {"654 01", "HURI - SNPT"}, {"655 01", "Vodacom"}, {"655 06", "Sentech (Pty) Ltd."}, {"655 07", "Cell C"}, {"655 10", "MTN / Mobile Telephone Networks"}, {"655 11", "SAPS Gauteng"}, {"655 21", "Cape Town Metropolitan Council"}, {"655 30", "Bokamoso Consortium"}, {"655 31", "Karabo Telecoms (Pty) Ltd."}, {"655 32", "Ilizwi Telecommunications"}, {"655 33", "Thinta Thinta Telecommunications"}, {"702 67", "Belize Telecommunications Ltd."}, {"702 68", "International Telecommunications Ltd."}, {"704 01", "SERCOM / PCS Digital / Claro"}, {"704 02", "Comcel / Tigo"}, {"704 03", "Telefonica Moviles Guatemala (movistar)"}, {"706 01", "Personal / Telecom / Claro"}, {"706 02", "Digicel Group (digicel)"}, {"706 03", "Telemovil (Millicom) / Tigo"}, {"706 04", "Telefonica Moviles El Salvador (movistar)"}, {"706 10", "Personal / Telecom / Claro"}, {"708 01", "Megatel / Alo / Claro"}, {"708 02", "Celtel / Tigo"}, {"708 30", "Hondutel"}, {"710 21", "Empresa Nicaraguense de Telecomunicaciones, S.A. (Claro)"}, {"710 30", "Telefonica Moviles Nicaragua (movistar)"}, {"710 73", "SERCOM / Servicios de Comunicaciones S.A. / Claro"}, {"712 01", "Instituto Costarricense de Electricidad (ICE)"}, {"712 02", "Instituto Costarricense de Electricidad (ICE)"}, {"714 01", "Cable & Wireless Panama S.A."}, {"714 02", "BSC de Panama S.A. (movistar)"}, {"716 07", "Telefonica Moviles Peru (movistar)"}, {"716 10", "TIM Peru / America Movil Peru / Claro"}, {"722 010", "Compania de Radiocomunicaciones Moviles S.A. (Movicom)"}, {"722 020", "Nextel Argentina srl"}, {"722 070", "Unifon"}, {"722 310", "CTI PCS S.A."}, {"722 320", "CTI Movil"}, {"722 330", "CTI Movil"}, {"722 340", "Telecom Personal"}, {"722 350", "Hutchinson (PORT HABLE)"}, {"724 00", "Telet"}, {"724 01", "CRT Celular"}, {"724 02", "TIM"}, {"724 03", "TIM"}, {"724 04", "TIM"}, {"724 05", "Claro"}, {"724 06", "Claro (former Tess)"}, {"724 07", "Sercontel Celular"}, {"724 08", "Maxitel"}, {"724 09", "Telepar Celular"}, {"724 10", "Vivo (SP)"}, {"724 11", "Vivo"}, {"724 12", "Claro (Former Americel)"}, {"724 13", "Vivo (Former Telesp Celular)"}, {"724 14", "Maxitel BA"}, {"724 15", "CTBC Celular"}, {"724 16", "Brasil Telecom"}, {"724 17", "Ceterp Celular"}, {"724 18", "Oi (also known as Telemar / Norte Brasil Telecom)"}, {"724 19", "Telemig Celular"}, {"724 21", "Telerj Celular"}, {"724 23", "Telest Celular"}, {"724 25", "Telebrasilia Celular"}, {"724 27", "Telegoias Celular"}, {"724 29", "Telemat Celular"}, {"724 31", "Oi"}, {"724 33", "Teleron Celular"}, {"724 35", "Telebahia Celular"}, {"724 37", "Telergipe Celular"}, {"724 39", "Telasa Celular"}, {"724 41", "Telpe Celular"}, {"724 43", "Telepisa Celular"}, {"724 45", "Telpa Celular"}, {"724 47", "Telem Celular"}, {"724 48", "Teleceara Celular"}, {"724 51", "Telma Celular"}, {"724 53", "Telepara Celular"}, {"724 55", "Teleamazon Celular"}, {"724 57", "Teleamapa Celular"}, {"724 59", "Telaima Celular"}, {"730 01", "Entel Telefonia Movil"}, {"730 02", "Movistar Chile"}, {"730 03", "Claro Chile"}, {"730 10", "Entel PCS Telecom"}, {"732 001", "Colombia Telecomunicaciones S.A. - Telecom"}, {"732 002", "Edatel S.A."}, {"732 101", "Comcel S.A. Occel S.A. / Celcaribe"}, {"732 102", "Bellsouth Colombia S.A. (movistar)"}, {"732 103", "Colombia Movil S.A."}, {"732 111", "Colombia Movil S.A."}, {"732 123", "Telefonica Moviles Colombia S.A. (movistar)"}, {"734 01", "Digitel / Infonet"}, {"734 02", "Digitel"}, {"734 03", "Digitel / Digicel"}, {"734 04", "Telefonica Moviles Venezuela (movistar)"}, {"738 01", "Cel*Star"}, {"740 00", "Otecel S.A. - (formerly Bellsouth) (Movistar)"}, {"740 01", "Porta GSM"}, {"740 02", "Telecsa S.A."}, {"744 01", "VOX / Hola Paraguay S.A."}, {"744 02", "Hutchison Telecom S.A. / America Movil Paraguay / CTI Movil"}, {"744 03", "Compania Privada de Comunicaciones S.A."}, {"744 04", "Telecel / Tigo"}, {"746 02", "Telesu"}, {"748 00", "Ancel"}, {"748 01", "Ancel"}, {"748 10", "America Movil Uruguay / CTI Movil"}, {"880 11", "CityCell"}, {"880 15", "TeleTalk"}, {"880 16", "Warid Tel"}, {"880 17", "GP (Grameen Phone)"}, {"880 18", "AKtel (A. Khan Telecom)"}, {"880 19", "BanglaLink"}, {"901 01", "ICO Global Communications"}, {"901 02", "Sense Communications International"}, {"901 03", "Iridium Satellite"}, {"901 04", "Globalstar (GMSS)"}, {"901 05", "Thuraya RMSS Network"}, {"901 06", "Thuraya Satellite Telecommunications Company"}, {"901 07", "Ellipso"}, {"901 08", "Reserved for station identification where the mobile does not have a subscription IMSI"}, {"901 09", "Tele1 Europe"}, {"901 10", "Asia Cellular Satellite (AceS)"}, {"901 11", "Inmarsat"}, {"901 12", "Maritime Communications Partner AS (MCP)"}, {"901 13", "Global Networks"}, {"901 14", "Telenor GSM - services in aircraft"}, {"901 15", "SITA GSM - services in aircraft"}, {"901 18", "Cingular Wireless"}, { NULL, NULL } }; GNOKII_API char *gn_network_name_get(char *network_code) { int index = 0; while (networks[index].code && strncmp(networks[index].code, network_code, 6)) index++; /* for now be compacrapatible ;) */ return networks[index].name ? networks[index].name : _("unknown"); } GNOKII_API char *gn_network_code_get(char *network_name) { int index = 0; while (networks[index].name && strcasecmp(networks[index].name, network_name)) index++; return networks[index].code ? networks[index].code : _("undefined"); } GNOKII_API char *gn_network_code_find(char *network_name, char *country_name) { int index = 0; char country_code[5]; snprintf(country_code, 4, "%3s ", gn_country_code_get(country_name)); country_code[4] = 0; while (networks[index].name && (!strstr(networks[index].code, country_code) || strcasecmp(networks[index].name, network_name))) index++; return networks[index].code ? networks[index].code : _("undefined"); } GNOKII_API char *gn_country_name_translate(char *country_name) { /* * Retrieve the translation of the given @country_name * if the iso-codes package is installed and NLS is enabled. * * Use this function only with gn_country_get() because * gn_country_name_get() and gn_network2country() alreadly * return translated names. */ return dgettext("iso_3166", country_name); } GNOKII_API char *gn_country_name_get(char *country_code) { int index = 0; while (countries[index].code && strncmp(countries[index].code, country_code, 3)) index++; return countries[index].name ? gn_country_name_translate(countries[index].name) : _("unknown"); } GNOKII_API char *gn_country_code_get(char *country_name) { /* * If the iso-codes package is installed and NLS is enabled * @country_name must be given in the current language. */ int index = 0; while (countries[index].name && strcasecmp(gn_country_name_translate(countries[index].name), country_name)) index++; return countries[index].code ? countries[index].code : _("undefined"); } GNOKII_API int gn_network_get(gn_network *network, int index) { if (index < 0 || index >= ARRAY_LEN(networks) - 1) return false; *network = networks[index]; return true; } GNOKII_API int gn_country_get(gn_country *country, int index) { if (index < 0 || index >= ARRAY_LEN(countries) - 1) return false; *country = countries[index]; return true; } GNOKII_API char *gn_network2country(char *network_code) { char ccode[4]; snprintf(ccode, sizeof(ccode), "%s", network_code); return gn_country_name_get(ccode); } gnokii-0.6.31/common/cfgreader.c0000644000175000017500000010503711666163120014567 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999 Tim Potter Copyright (C) 1999-2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 2000 Jan Derfinak Copyright (C) 2001 Jan Kratochvil Copyright (C) 2001-2011 Pawel Kot Copyright (C) 2002-2004 BORBELY Zoltan Copyright (C) 2005 Bastien Nocera Config reader. Modified from code by Tim Potter. */ #include "config.h" #include "compat.h" #include "misc.h" #include #include #include #include #include #include "cfgreader.h" #include "gnokii-internal.h" GNOKII_API struct gn_cfg_header *gn_cfg_info; static gn_config gn_config_default, gn_config_global; /* Handy macros */ #define FREE(x) do { free(x); (x) = NULL; } while (0) /* * Function to dump configuration pointed by @config * @config: configuration to be dumped */ static void cfg_dump(struct gn_cfg_header *config) { struct gn_cfg_header *hdr = config; dprintf("Dumping configuration.\n"); /* Loop over sections */ while (hdr) { struct gn_cfg_entry *entry = hdr->entries; dprintf("[%s]\n", hdr->section); /* Loop over entries */ while (entry) { dprintf("%s = %s\n", entry->key, entry->value); entry = entry->next; } hdr = hdr->next; } } /* * Function to allocate configuration header structure. * Structure is appended to @config. * @config: existing config structure * @name: section name; default (if name==NULL) is "global" */ static struct gn_cfg_header *cfg_header_allocate(struct gn_cfg_header *config, char *name) { struct gn_cfg_header *hdr; /* * Allocate memory for the header structure and assign name. * Default name is "global". */ hdr = calloc(sizeof(struct gn_cfg_header), 1); if (!hdr) { dprintf("Failed to allocate gn_cfg_header.\n"); return NULL; } if (name) hdr->section = strdup(name); else hdr->section = strdup("global"); if (!hdr->section) { dprintf("Failed to assign a name to gn_cfg_header.\n"); free(hdr); return NULL; } /* Add to cfg_info list */ hdr->prev = config; if (config) config->next = hdr; dprintf("Adding new section %s\n", hdr->section); return hdr; } /* * Function to find config section identified by @name. If name is not given * "global" section is returned. * @config: pointer to the configuration structure * @name: section name */ static struct gn_cfg_header *cfg_header_get(struct gn_cfg_header *config, char *name) { struct gn_cfg_header *hdr = config; if (!config) return NULL; if (!name) name = "global"; while (hdr) { if (!strcmp(name, hdr->section)) return hdr; hdr = hdr->next; } return NULL; } /* * Function to assign a variable in the given config section. * @config: given configuration section * @name: variable (key) name * @value: variable (key) value * @overwrite: overwrite existing keys? */ static struct gn_cfg_header *cfg_variable_set(struct gn_cfg_header *config, char *name, char *value, int overwrite) { struct gn_cfg_entry *oldentry, *entry; if (!name || !value) { dprintf("Neither name nor value can be NULL.\n"); return NULL; } /* Find a place in the section, where to add the new entry. */ oldentry = config->entries; while (oldentry) { if (!strcmp(name, oldentry->key)) break; oldentry = oldentry->next; } /* If found and instructed not to overwrite, return */ if (oldentry && !overwrite) { dprintf("Key %s already exists in section %s\n", name, config->section); return NULL; } /* Allocate new entry */ entry = calloc(sizeof(struct gn_cfg_entry), 1); if (!entry) { dprintf("Failed to allocate gn_cfg_entry.\n"); return NULL; } entry->key = strdup(name); entry->value = strdup(value); if (!entry->key || !entry->value) { dprintf("Failed to allocate key/value for the entry.\n"); FREE(entry->key); FREE(entry->value); free(entry); return NULL; } /* Add to existing variables in section. */ entry->next = config->entries; if (config->entries) config->entries->prev = entry; config->entries = entry; /* Remove the old entry */ if (oldentry) { if (oldentry->next) oldentry->next->prev = oldentry->prev; if (oldentry->prev) oldentry->prev->next = oldentry->next; free(oldentry->key); free(oldentry->value); free(oldentry); } dprintf("Added %s/%s to section %s.\n", entry->key, entry->value, config->section); return config; } /* * Function to assign a variable in the given section. If the section is not * found in the config structure, new section is created. * @config: configuration * @section: section name * @name: variable (key) name * @value: variable (key) value * @overwrite: overwrite existing keys? */ GNOKII_API struct gn_cfg_header *gn_cfg_variable_set(struct gn_cfg_header *config, char *section, char *name, char *value, int overwrite) { struct gn_cfg_header *hdr; /* Find the appropriate section */ hdr = cfg_header_get(config, section); if (!hdr) hdr = cfg_header_allocate(config, section); if (!hdr) { dprintf("Failed to set variable (%s %s %s).\n", section, name, value); return NULL; } return cfg_variable_set(hdr, name, value, overwrite); } /* * Function to create generic configuration section. Basic config consists of model, * connection and port variables. If no section name is given, global one is used. * Please note that valid section names for phone config are: global and phone_*. * @section: optional section name * @model: model to be set * @connection: connection to be set * @port: port to be set */ GNOKII_API struct gn_cfg_header *gn_cfg_section_create(char *section, char *model, char *connection, char *port) { char *sname; struct gn_cfg_header *hdr = NULL, *config = NULL; if (!model | !connection | !port) { dprintf("Neither model nor connection nor port can be NULL.\n"); return NULL; } sname = (section ? section : "global"); config = cfg_header_allocate(NULL, sname); if (!config) { dprintf("Failed to create config.\n"); return NULL; } hdr = gn_cfg_variable_set(config, sname, "model", model, 1); if (!hdr) { dprintf("Failed to create config.\n"); free(config); return NULL; } hdr = gn_cfg_variable_set(config, sname, "connection", connection, 1); if (!hdr) { dprintf("Failed to create config.\n"); free(config); return NULL; } hdr = gn_cfg_variable_set(config, sname, "port", port, 1); if (!hdr) { dprintf("Failed to create config.\n"); free(config); return NULL; } return config; } /* * Function to create generic config. Config is assigned to gn_cfg_info structure. * @model: model to be set * @connection: connection to be set * @port: port to be set */ GNOKII_API struct gn_cfg_header *gn_cfg_generic_create(char *model, char *connection, char *port) { struct gn_cfg_header *config; config = gn_cfg_section_create(NULL, model, connection, port); if (!config) return NULL; /* Dump config */ cfg_dump(config); /* Assign to gn_cfg_info. libgnokii needs it so far. */ gn_cfg_info = config; return config; } /* * Function to create basic config for bluetooth setup. Config is assigned to gn_cfg_info structure. * @model: model to be set * @connection: connection to be set * @port: port to be set */ GNOKII_API struct gn_cfg_header *gn_cfg_bluetooth_create(char *model, char *btmac, char *rfchannel) { struct gn_cfg_header *hdr, *config; if (!model | !btmac | !rfchannel) { dprintf("Neither model nor Bluetooth mac address nor rfcomm channel can be NULL.\n"); return NULL; } config = gn_cfg_section_create(NULL, model, "bluetooth", btmac); if (!config) return NULL; hdr = gn_cfg_variable_set(config, "global", "rfcomm_channel", rfchannel, 1); if (!hdr) { dprintf("Failed to create config.\n"); free(config); return NULL; } /* Dump config */ cfg_dump(config); /* Assign to gn_cfg_info. libgnokii needs it so far. */ gn_cfg_info = config; return config; } struct gn_cfg_header *cfg_memory_read(const char **lines) { char *line, *buf; struct gn_cfg_header *cfg_info = NULL, *cfg_head = NULL; int i; /* Check whether the given memory location is not null */ if (lines == NULL) { dprintf("cfg_memory_read - passed nil data\n"); return NULL; } else { dprintf("Opened configuration file from memory\n"); } /* Iterate over lines in the file */ for (i = 0; lines[i] != NULL; i++) { line = strdup (lines[i]); buf = line; /* Strip leading, trailing whitespace */ while (isspace((int) *line)) line++; while ((strlen(line) > 0) && isspace((int) line[strlen(line) - 1])) line[strlen(line) - 1] = '\0'; /* Ignore blank lines and comments */ if ((*line == '\n') || (*line == '\0') || (*line == '#')) { free(buf); continue; } /* Look for "headings" enclosed in square brackets */ if ((line[0] == '[') && (line[strlen(line) - 1] == ']')) { struct gn_cfg_header *heading; /* Allocate new heading entry */ if ((heading = (struct gn_cfg_header *)malloc(sizeof(*heading))) == NULL) { return NULL; } /* Fill in fields */ memset(heading, '\0', sizeof(*heading)); line++; line[strlen(line) - 1] = '\0'; /* FIXME: strdup is not ANSI C compliant. */ heading->section = strdup(line); /* Add to tail of list */ heading->prev = cfg_info; if (cfg_info != NULL) { cfg_info->next = heading; } else { /* Store copy of head of list for return value */ cfg_head = heading; } cfg_info = heading; dprintf("Added new section %s\n", heading->section); free(buf); /* Go on to next line */ continue; } /* Process key/value line */ if ((strchr(line, '=') != NULL) && cfg_info != NULL) { struct gn_cfg_entry *entry; char *value; /* Allocate new entry */ if ((entry = (struct gn_cfg_entry *)malloc(sizeof(*entry))) == NULL) { return NULL; } /* Fill in fields */ memset(entry, '\0', sizeof(*entry)); value = strchr(line, '='); *value = '\0'; /* Split string */ value++; while (isspace((int) *value)) { /* Remove leading white */ value++; } entry->value = strdup(value); while ((strlen(line) > 0) && isspace((int) line[strlen(line) - 1])) { line[strlen(line) - 1] = '\0'; /* Remove trailing white */ } /* FIXME: strdup is not ANSI C compliant. */ entry->key = strdup(line); /* Add to head of list */ entry->next = cfg_info->entries; if (cfg_info->entries != NULL) { cfg_info->entries->prev = entry; } cfg_info->entries = entry; dprintf("Adding key/value %s/%s\n", entry->key, entry->value); free(buf); /* Go on to next line */ continue; } /* Line not part of any heading */ fprintf(stderr, _("Orphaned line: %s\nIf in doubt place this line into [global] section.\n"), line); free(buf); } /* Return pointer to configuration information */ return cfg_head; } GNOKII_API void gn_cfg_free_default() { while (gn_cfg_info) { struct gn_cfg_header *next; struct gn_cfg_entry *entry; /* free section name */ free(gn_cfg_info->section); /* delete all entries */ entry = gn_cfg_info->entries; while (entry) { struct gn_cfg_entry *entry_next; free(entry->key); free(entry->value); entry_next = entry->next; free(entry); entry = entry_next; } /* proceed with next section */ next = gn_cfg_info->next; free(gn_cfg_info); gn_cfg_info = next; } } #define READ_CHUNK_SIZE 64 /* Read configuration information from a ".INI" style file */ struct gn_cfg_header *cfg_file_read(const char *filename) { FILE *handle; char *lines, *line_begin, *line_end, *pos; char **split_lines; int read, ret, num_lines, i, copied; struct gn_cfg_header *header = NULL; /* Open file */ if ((handle = fopen(filename, "r")) == NULL) { dprintf("cfg_file_read - open %s: %s\n", filename, strerror(errno)); goto out; } else { dprintf("Opened configuration file %s\n", filename); } /* Read the lines */ lines = NULL; read = 0; do { lines = realloc(lines, read + READ_CHUNK_SIZE); if (!lines) goto err_read; ret = fread(lines + read, 1, READ_CHUNK_SIZE, handle); /* Read error */ if (ret < 0 && feof(handle) == 0) goto err_read; /* Overflow */ if (read + ret < read) goto err_read; read += ret; } while (ret > 0); fclose(handle); /* Make sure there's '\n' after the last line and NULL-terminate. */ lines = realloc(lines, read + 2); lines[read] = '\n'; lines[read+1] = '\0'; /* Now split the lines */ split_lines = NULL; line_begin = lines; num_lines = 0; copied = 0; while ((pos = strchr(line_begin, '\n')) && copied < read) { char *buf, *hash, *tmp; int nonempty = 0; /* Strip comments from the current line */ hash = strchr(line_begin, '#'); if (hash && (hash < pos || !pos)) line_begin[hash-line_begin] = '\0'; else hash = NULL; if (!pos) { line_end = lines + read; } else { line_end = pos; } /* skip empty lines */ tmp = line_begin; nonempty = 0; while (*tmp && tmp < line_end && !nonempty) { if (!isspace(*tmp)) nonempty = 1; tmp++; } if (nonempty) { void *aux; num_lines++; buf = malloc((hash ? hash : line_end) - line_begin + 1); snprintf(buf, (hash ? hash : line_end) - line_begin + 1, "%s", line_begin); aux = realloc(split_lines, (num_lines + 1) * sizeof(char*)); if (aux) split_lines = aux; else { free(buf); goto err_alloc; } split_lines[num_lines - 1] = buf; } if (pos) { copied += (line_end + 1 - line_begin); line_begin = line_end + 1; } } if (split_lines == NULL) goto out; split_lines[num_lines] = NULL; /* Finally, load the configuration from the split lines */ header = cfg_memory_read((const char **)split_lines); err_alloc: free(lines); /* Free the split_lines */ for (i = 0; split_lines[i] != NULL; i++) { free(split_lines[i]); } free(split_lines); goto out; err_read: fclose(handle); free(lines); out: return header; } /* Write configuration information to a config file */ int cfg_file_write(struct gn_cfg_header *cfg, const char *filename) { /* Not implemented - tricky to do and preserve comments */ return 0; } /* * Find the value of a key in a config file. Return value associated * with key or NULL if no such key exists. */ GNOKII_API char *gn_cfg_get(struct gn_cfg_header *cfg, const char *section, const char *key) { struct gn_cfg_header *h; struct gn_cfg_entry *e; if ((cfg == NULL) || (section == NULL) || (key == NULL)) { return NULL; } /* Search for section name */ for (h = cfg; h != NULL; h = h->next) { if (strcmp(section, h->section) == 0) { /* Search for key within section */ for (e = h->entries; e != NULL; e = e->next) { if (strcmp(key, e->key) == 0) { /* Found! */ return e->value; } } } } /* Key not found in section */ return NULL; } int cfg_section_exists(struct gn_cfg_header *cfg, const char *section) { struct gn_cfg_header *h; if (!cfg || !section) return false; /* Search for section name */ for (h = cfg; h != NULL; h = h->next) if (!strcmp(section, h->section)) return true; return false; } /* * Return all the entries of the given section. */ void cfg_foreach(const char *section, cfg_foreach_func func) { struct gn_cfg_header *h; struct gn_cfg_entry *e; struct gn_cfg_header *cfg = gn_cfg_info; if ((cfg == NULL) || (section == NULL) || (func == NULL)) { return; } /* Search for section name */ for (h = cfg; h != NULL; h = h->next) { if (strcmp(section, h->section) == 0) { /* Search for key within section */ for (e = h->entries; e != NULL; e = e->next) (*func)(section, e->key, e->value); } } } /* Set the value of a key in a config file. Return the new value if the section/key can be found, else return NULL. */ char *cfg_set(struct gn_cfg_header *cfg, const char *section, const char *key, const char *value) { struct gn_cfg_header *h; struct gn_cfg_entry *e; if ((cfg == NULL) || (section == NULL) || (key == NULL) || (value == NULL)) { return NULL; } /* Search for section name */ for (h = cfg; h != NULL; h = h->next) { if (strcmp(section, h->section) == 0) { /* Search for key within section */ for (e = h->entries; e != NULL; e = e->next) { if ((e->key != NULL) && strcmp(key, e->key) == 0) { /* Found - set value */ free(e->key); /* FIXME: strdup is not ANSI C compliant. */ e->key = strdup(value); return e->value; } } } } /* Key not found in section */ return NULL; } static gn_error cfg_psection_load(gn_config *cfg, const char *section, const gn_config *def) { const char *val; char ch; memset(cfg, '\0', sizeof(gn_config)); if (!cfg_section_exists(gn_cfg_info, section)) { fprintf(stderr, _("No %s section in the config file.\n"), section); return GN_ERR_NOPHONE; } /* You need to specify at least model, port and connection in the phone section */ if (!(val = gn_cfg_get(gn_cfg_info, section, "model"))) { fprintf(stderr, _("You need to define '%s' in the config file.\n"), "model"); return GN_ERR_NOMODEL; } else snprintf(cfg->model, sizeof(cfg->model), "%s", val); if (!(val = gn_cfg_get(gn_cfg_info, section, "port"))) { fprintf(stderr, _("You need to define '%s' in the config file.\n"), "port"); return GN_ERR_NOPORT; } else snprintf(cfg->port_device, sizeof(cfg->port_device), "%s", val); if (!(val = gn_cfg_get(gn_cfg_info, section, "connection"))) { fprintf(stderr, _("You need to define '%s' in the config file.\n"), "connection"); return GN_ERR_NOCONNECTION; } else { cfg->connection_type = gn_get_connectiontype(val); if (cfg->connection_type == GN_CT_NONE) { fprintf(stderr, _("Unsupported [%s] %s value \"%s\"\n"), section, "connection", val); return GN_ERR_NOCONNECTION; } if (!strcmp("pcsc", val)) fprintf(stderr, "WARNING: %s=%s is deprecated and will soon be removed. Use %s=%s instead.\n", "connection", val, "connection", "libpcsclite"); } if (!(val = gn_cfg_get(gn_cfg_info, section, "initlength"))) cfg->init_length = def->init_length; else { if (!strcasecmp(val, "default")) cfg->init_length = 0; else if (sscanf(val, " %d %c", &cfg->init_length, &ch) != 1) { fprintf(stderr, _("Unsupported [%s] %s value \"%s\"\n"), section, "initlength", val); fprintf(stderr, _("Assuming: %d\n"), def->init_length); cfg->init_length = def->init_length; } } if (!(val = gn_cfg_get(gn_cfg_info, section, "serial_baudrate"))) cfg->serial_baudrate = def->serial_baudrate; else if (sscanf(val, " %d %c", &cfg->serial_baudrate, &ch) != 1) { fprintf(stderr, _("Unsupported [%s] %s value \"%s\"\n"), section, "serial_baudrate", val); fprintf(stderr, _("Assuming: %d\n"), def->serial_baudrate); cfg->serial_baudrate = def->serial_baudrate; } if (!(val = gn_cfg_get(gn_cfg_info, section, "serial_write_usleep"))) cfg->serial_write_usleep = def->serial_write_usleep; else if (sscanf(val, " %d %c", &cfg->serial_write_usleep, &ch) != 1) { fprintf(stderr, _("Unsupported [%s] %s value \"%s\"\n"), section, "serial_write_usleep", val); fprintf(stderr, _("Assuming: %d\n"), def->serial_write_usleep); cfg->serial_write_usleep = def->serial_write_usleep; } if (!(val = gn_cfg_get(gn_cfg_info, section, "handshake"))) cfg->hardware_handshake = def->hardware_handshake; else if (!strcasecmp(val, "software") || !strcasecmp(val, "rtscts")) cfg->hardware_handshake = false; else if (!strcasecmp(val, "hardware") || !strcasecmp(val, "xonxoff")) cfg->hardware_handshake = true; else { fprintf(stderr, _("Unsupported [%s] %s value \"%s\"\n"), section, "handshake", val); fprintf(stderr, _("Use either \"%s\" or \"%s\".\n"), "software", "hardware"); fprintf(stderr, _("Assuming: %s\n"), def->hardware_handshake ? "software" : "hardware"); cfg->hardware_handshake = def->hardware_handshake; } if (!(val = gn_cfg_get(gn_cfg_info, section, "require_dcd"))) cfg->require_dcd = def->require_dcd; else if (sscanf(val, " %d %c", &cfg->require_dcd, &ch) != 1) { fprintf(stderr, _("Unsupported [%s] %s value \"%s\"\n"), section, "require_dcd", val); fprintf(stderr, _("Assuming: %d\n"), def->require_dcd); cfg->require_dcd = def->require_dcd; } if (!(val = gn_cfg_get(gn_cfg_info, section, "set_dtr_rts"))) cfg->set_dtr_rts = def->set_dtr_rts; else if (sscanf(val, " %d %c", &cfg->set_dtr_rts, &ch) != 1) { fprintf(stderr, _("Unsupported [%s] %s value \"%s\"\n"), section, "set_dtr_rts", val); fprintf(stderr, _("Assuming: %d\n"), def->set_dtr_rts); cfg->set_dtr_rts = def->set_dtr_rts; } if (!(val = gn_cfg_get(gn_cfg_info, section, "smsc_timeout"))) cfg->smsc_timeout = def->smsc_timeout; else if (sscanf(val, " %d %c", &cfg->smsc_timeout, &ch) == 1) cfg->smsc_timeout *= 10; else { fprintf(stderr, _("Unsupported [%s] %s value \"%s\"\n"), section, "smsc_timeout", val); fprintf(stderr, _("Assuming: %d\n"), def->smsc_timeout); cfg->smsc_timeout = def->smsc_timeout; } if (!(val = gn_cfg_get(gn_cfg_info, section, "connect_script"))) snprintf(cfg->connect_script, sizeof(cfg->connect_script), "%s", def->connect_script); else snprintf(cfg->connect_script, sizeof(cfg->connect_script), "%s", val); if (!(val = gn_cfg_get(gn_cfg_info, section, "disconnect_script"))) snprintf(cfg->disconnect_script, sizeof(cfg->disconnect_script), "%s", def->disconnect_script); else snprintf(cfg->disconnect_script, sizeof(cfg->disconnect_script), "%s", val); if (!(val = gn_cfg_get(gn_cfg_info, section, "rfcomm_channel"))) cfg->rfcomm_cn = def->rfcomm_cn; else if (sscanf(val, " %hhu %c", &cfg->rfcomm_cn, &ch) != 1) { fprintf(stderr, _("Unsupported [%s] %s value \"%s\"\n"), section, "rfcomm_channel", val); fprintf(stderr, _("Assuming: %d\n"), def->rfcomm_cn); cfg->rfcomm_cn = def->rfcomm_cn; } if (!(val = gn_cfg_get(gn_cfg_info, section, "sm_retry"))) cfg->sm_retry = def->sm_retry; else if (sscanf(val, " %d %c", &cfg->sm_retry, &ch) != 1) { fprintf(stderr, _("Unsupported [%s] %s value \"%s\"\n"), section, "sm_retry", val); fprintf(stderr, _("Assuming: %d\n"), def->sm_retry); cfg->sm_retry = def->sm_retry; } /* There is no global setting. You need to set irda_string * in each section if you want it working */ if (!(val = gn_cfg_get(gn_cfg_info, section, "irda_string"))) cfg->irda_string[0] = 0; else { snprintf(cfg->irda_string, sizeof(cfg->irda_string), "%s", val); dprintf("Setting irda_string in section %s to %s\n", section, cfg->irda_string); } if (!(val = gn_cfg_get(gn_cfg_info, section, "use_locking"))) cfg->use_locking = def->use_locking; else if (!strcasecmp(val, "no")) cfg->use_locking = 0; else if (!strcasecmp(val, "yes")) cfg->use_locking = 1; else { fprintf(stderr, _("Unsupported [%s] %s value \"%s\"\n"), section, "use_locking", val); fprintf(stderr, _("Use either \"%s\" or \"%s\".\n"), "yes", "no"); fprintf(stderr, _("Assuming: %s\n"), def->use_locking ? "yes" : "no"); cfg->use_locking = def->use_locking; } return GN_ERR_NONE; } #define SETFLAG(f) \ if (!gnokii_strcmpsep(#f, val, ',')) {\ phone_model.flags |= PM_##f;\ dprintf("Flag PM_%s\n", #f);\ continue;\ } /* Load phone flags from config or fallback to the static array in misc.c */ gn_phone_model *gn_cfg_get_phone_model(struct gn_cfg_header *cfg, const char *product_name) { struct gn_cfg_header *hdr; char *val, *comma, *end, *section = "flags"; int count; static gn_phone_model phone_model = {NULL, NULL, 0}; gn_phone_model *found_phone_model; static char model[GN_MODEL_MAX_LENGTH] = ""; if (phone_model.model) return &phone_model; val = gn_cfg_get(gn_cfg_info, section, product_name); if (val) { phone_model.model = model; /* Ignore trailing whitespace (leading whitespace has been stripped when loading the config file) */ comma = val; while (*comma && *comma != ',') comma++; end = comma; while (end > val && (isspace(*end) || *end == ',')) end--; count = end - val + 1; snprintf(model, GN_MODEL_MAX_LENGTH, "%.*s", count, val); /* Check flags */ val = comma; for (;;) { while (*val && *val != ',') val++; /* This skips also empty fields */ while (*val && (*val == ',' || isspace(*val))) val++; if (!*val) break; SETFLAG(OLD_DEFAULT); SETFLAG(DEFAULT); SETFLAG(DEFAULT_S40_3RD); SETFLAG(CALLERGROUP); SETFLAG(NETMONITOR); SETFLAG(KEYBOARD); SETFLAG(SMS); SETFLAG(CALENDAR); SETFLAG(DTMF); SETFLAG(DATA); SETFLAG(SPEEDDIAL); SETFLAG(EXTPBK); SETFLAG(AUTHENTICATION); SETFLAG(FOLDERS); SETFLAG(FULLPBK); SETFLAG(SMSFILE); SETFLAG(EXTPBK2); SETFLAG(EXTCALENDAR); SETFLAG(XGNOKIIBREAKAGE); /* FIXME? duplicated code from above */ comma = val; while (*comma && *comma != ',') comma++; end = comma; while (end > val && (isspace(*end) || *end == ',')) end--; count = end - val + 1; dprintf("Unknown flag \"%.*s\"\n", count, val); } return &phone_model; } #undef SETFLAG found_phone_model = gn_phone_model_get(product_name); if (found_phone_model->model) return found_phone_model; /* Give the user some hint on why the product_name wasn't found */ hdr = cfg_header_get(cfg, (char *)section); if (!hdr) { fprintf(stderr, _("No %s section in the config file.\n"), section); } return &phone_model; } static bool cfg_get_log_target(gn_log_target *t, const char *opt) { char *val; if (!(val = gn_cfg_get(gn_cfg_info, "logging", opt))) val = "off"; if (!strcasecmp(val, "off")) *t = GN_LOG_T_NONE; else if (!strcasecmp(val, "on")) *t = GN_LOG_T_STDERR; else { fprintf(stderr, _("Unsupported [%s] %s value \"%s\"\n"), "logging", opt, val); fprintf(stderr, _("Use either \"%s\" or \"%s\".\n"), "off", "on"); fprintf(stderr, _("Assuming: %s\n"), "off"); *t = GN_LOG_T_NONE; } return true; } #define MAX_PATH_LEN 255 #define CHECK_SIZE() if (*retval >= size) { \ void *aux; \ size *= 2; \ aux = realloc(config_file_locations, size); \ if (aux) \ config_file_locations = aux; \ else {\ free(config_file_locations); \ config_file_locations = NULL; \ goto out; \ } \ } /* * get_locations() returns the list of possible config file locations that * may be used on the given system. It returns the array of paths to the * config files. @retval parameter denotes how many locations are returned. * The resulting array needs to be freed afterwards. */ #ifdef WIN32 /* Windows version */ static char **get_locations(int *retval) { char **config_file_locations; char *appdata, *homedrive, *homepath, *systemroot; /* env variables */ int size = 3; /* default size for config_file_locations */ char path[MAX_PATH_LEN]; const char *fname = "gnokii.ini"; *retval = size; config_file_locations = calloc(size, sizeof(char *)); appdata = getenv("APPDATA"); homedrive = getenv("HOMEDRIVE"); homepath = getenv("HOMEPATH"); systemroot = getenv("SYSTEMROOT"); /* 1. %APPDATA%\gnokii\gnokii.ini */ snprintf(path, MAX_PATH_LEN, "%s\\gnokii\\%s", appdata, fname); config_file_locations[0] = strdup(path); /* old gnokii behaviour */ /* 2. %HOMEDRIVE%\%HOMEPATH%\gnokii.ini */ snprintf(path, MAX_PATH_LEN, "%s\\%s\\%s", homedrive, homepath, fname); config_file_locations[1] = strdup(path); /* 3. %SYSTEMROOT%\gnokii.ini */ snprintf(path, MAX_PATH_LEN, "%s\\%s", systemroot, fname); config_file_locations[2] = strdup(path); return config_file_locations; } #else /* WIN32 */ # ifdef __MACH__ /* Mac OS X version */ static char **get_locations(int *retval) { char **config_file_locations; char *home; /* env variables */ int size = 3; /* default size for config_file_locations */ char path[MAX_PATH_LEN]; *retval = size; config_file_locations = calloc(size, sizeof(char *)); home = getenv("HOME"); /* 1. $HOME/Library/Preferences/gnokii/config */ snprintf(path, MAX_PATH_LEN, "%s/Library/Preferences/gnokii/config", home); config_file_locations[0] = strdup(path); /* old gnokii behaviour */ /* 2. $HOME/.gnokiirc */ snprintf(path, MAX_PATH_LEN, "%s/.gnokiirc", home); config_file_locations[1] = strdup(path); /* 3. /etc/gnokiirc */ snprintf(path, MAX_PATH_LEN, "/etc/gnokiirc"); config_file_locations[2] = strdup(path); return config_file_locations; } # else /* !__MACH__ */ /* freedesktop.org compliancy: http://standards.freedesktop.org/basedir-spec/latest/ar01s03.html */ #define XDG_CONFIG_HOME "/.config" /* $HOME/.config */ #define XDG_CONFIG_DIRS "/etc/xdg" static char **get_locations(int *retval) { char **config_file_locations = NULL; char *xdg_config_home, *xdg_config_dirs, *home; /* env variables */ char **xdg_config_dir; char *aux, *dirs; int j, i = 0; char path[MAX_PATH_LEN]; int size = 8; /* default size for config_file_locations */ int xcd_size = 4; /* default size for xdg_config_dir - number of elements */ int free_xdg_config_home = 0; *retval = 0; /* First, let's get all env variables we will need */ home = getenv("HOME"); xdg_config_home = getenv("XDG_CONFIG_HOME"); if (!xdg_config_home) { xdg_config_home = calloc(MAX_PATH_LEN, sizeof(char)); free_xdg_config_home = 1; snprintf(xdg_config_home, MAX_PATH_LEN, "%s%s", home, XDG_CONFIG_HOME); } aux = getenv("XDG_CONFIG_DIRS"); if (aux) xdg_config_dirs = strdup(aux); else xdg_config_dirs = strdup(XDG_CONFIG_DIRS); dirs = xdg_config_dirs; /* split out xdg_config_dirs into tokens separated by ':' */ xdg_config_dir = calloc(xcd_size, sizeof(char *)); while ((aux = strsep(&xdg_config_dirs, ":")) != NULL) { xdg_config_dir[i++] = strdup(aux); if (i >= xcd_size) { void *aux; xcd_size *= 2; aux = realloc(xdg_config_dir, xcd_size); if (aux) xdg_config_dir = aux; else { dprintf("Failed to allocate\n"); free(xdg_config_dirs); free(dirs); goto out; } } } free(dirs); /* 1. $XDG_CONFIG_HOME/gnokii/config ($HOME/.config) */ snprintf(path, MAX_PATH_LEN, "%s/gnokii/config", xdg_config_home); config_file_locations = calloc(size, sizeof(char *)); config_file_locations[(*retval)++] = strdup(path); /* old gnokii behaviour */ /* 2. $HOME/.gnokiirc */ snprintf(path, MAX_PATH_LEN, "%s/.gnokiirc", home); config_file_locations[(*retval)++] = strdup(path); CHECK_SIZE(); /* 3. $XDG_CONFIG_DIRS/gnokii/config (/etc/xdg) */ for (j = 0; j < i; j++) { snprintf(path, MAX_PATH_LEN, "%s/gnokii/config", xdg_config_dir[j]); config_file_locations[(*retval)++] = strdup(path); CHECK_SIZE(); free(xdg_config_dir[j]); } free(xdg_config_dir); /* old gnokii behaviour */ /* 4. /etc/gnokiirc */ snprintf(path, MAX_PATH_LEN, "/etc/gnokiirc"); config_file_locations[(*retval)++] = strdup(path); out: if (free_xdg_config_home) free(xdg_config_home); return config_file_locations; } # endif /* !__MACH__ */ #endif /* !WIN32 */ GNOKII_API gn_error gn_cfg_read_default() { gn_error error = GN_ERR_FAILED; char **config_file_locations = NULL; int num, i; config_file_locations = get_locations(&num); for (i = 0; i < num && error != GN_ERR_NONE; i++) { error = gn_cfg_file_read(config_file_locations[i]); } for (i = 0; i < num; i++) { /* If it couldn't read any config show all filenames tried */ if (error != GN_ERR_NONE) fprintf(stderr, _("Couldn't read %s config file.\n"), config_file_locations[i]); free(config_file_locations[i]); } free(config_file_locations); return error; } /* DEPRECATED */ static gn_error cfg_file_or_memory_read(const char *file, const char **lines) { char *val; gn_error error; error = gn_lib_init(); if (error != GN_ERR_NONE) { fprintf(stderr, _("Failed to initialize libgnokii.\n")); return error; } if (file == NULL && lines == NULL) { fprintf(stderr, _("Couldn't open a config file or memory.\n")); return GN_ERR_NOCONFIG; } /* I know that it doesn't belong here but currently there is now generic * application init function anywhere. */ setvbuf(stdout, NULL, _IONBF, 0); setvbuf(stderr, NULL, _IONBF, 0); /* * Try opening a given config file */ if (file != NULL) gn_cfg_info = cfg_file_read(file); else gn_cfg_info = cfg_memory_read(lines); if (gn_cfg_info == NULL) { /* this is bad, but the previous was much worse - bozo */ return GN_ERR_NOCONFIG; } gn_config_default.model[0] = 0; gn_config_default.port_device[0] = 0; gn_config_default.connection_type = GN_CT_Serial; gn_config_default.init_length = 0; gn_config_default.serial_baudrate = 19200; gn_config_default.serial_write_usleep = -1; gn_config_default.hardware_handshake = false; gn_config_default.require_dcd = false; gn_config_default.set_dtr_rts = true; gn_config_default.smsc_timeout = -1; gn_config_default.irda_string[0] = 0; gn_config_default.connect_script[0] = 0; gn_config_default.disconnect_script[0] = 0; gn_config_default.rfcomm_cn = 0; gn_config_default.sm_retry = 0; gn_config_default.use_locking = 0; if ((error = cfg_psection_load(&gn_config_global, "global", &gn_config_default)) != GN_ERR_NONE) return error; /* hack to support [sms] / smsc_timeout parameter */ if (gn_config_global.smsc_timeout < 0) { if (!(val = gn_cfg_get(gn_cfg_info, "sms", "timeout"))) gn_config_global.smsc_timeout = 100; else gn_config_global.smsc_timeout = 10 * atoi(val); } if (!cfg_get_log_target(&gn_log_debug_mask, "debug") || !cfg_get_log_target(&gn_log_rlpdebug_mask, "rlpdebug") || !cfg_get_log_target(&gn_log_xdebug_mask, "xdebug")) return GN_ERR_NOLOG; gn_log_debug("LOG: debug mask is 0x%x\n", gn_log_debug_mask); gn_log_rlpdebug("LOG: rlpdebug mask is 0x%x\n", gn_log_rlpdebug_mask); gn_log_xdebug("LOG: xdebug mask is 0x%x\n", gn_log_xdebug_mask); if (file) dprintf("Config read from file %s.\n", file); return GN_ERR_NONE; } GNOKII_API gn_error gn_cfg_file_read(const char *file) { return cfg_file_or_memory_read(file, NULL); } GNOKII_API gn_error gn_cfg_memory_read(const char **lines) { return cfg_file_or_memory_read(NULL, lines); } GNOKII_API gn_error gn_cfg_phone_load(const char *iname, struct gn_statemachine *state) { char section[256]; gn_error error; if (!state) return GN_ERR_INTERNALERROR; if (iname == NULL || *iname == '\0') { state->config = gn_config_global; } else { snprintf(section, sizeof(section), "phone_%s", iname); if ((error = cfg_psection_load(&state->config, section, &gn_config_global)) != GN_ERR_NONE) return error; } if (state->config.model[0] == '\0') { fprintf(stderr, _("Config error - no model specified.\n")); return GN_ERR_NOMODEL; } if (state->config.port_device[0] == '\0') { fprintf(stderr, _("Config error - no port specified.\n")); return GN_ERR_NOPORT; } return GN_ERR_NONE; } gnokii-0.6.31/common/gsm-sms.c0000644000175000017500000020665511666163120014243 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2001-2011 Pawel Kot Copyright (C) 2001-2002 Markus Plail, Pavel Machek Copyright (C) 2002-2003 Ladis Michl Copyright (C) 2003-2004 BORBELY Zoltan Copyright (C) 2006 Igor Popik Library for parsing and creating Short Messages (SMS). */ #include "config.h" #include #include #include #include #include "gnokii-internal.h" #include "gnokii.h" #include "sms-nokia.h" #ifdef ENABLE_NLS # include #endif #undef ERROR #define ERROR() do { if (error != GN_ERR_NONE) return error; } while (0) struct sms_udh_data { unsigned int length; char *header; }; #define MAX_SMS_PART 140 /* User data headers */ static struct sms_udh_data headers[] = { { 0x00, "" }, { 0x05, "\x00\x03\x01\x00\x00" }, /* Concatenated messages */ { 0x06, "\x05\x04\x15\x81\x00\x00" }, /* Ringtones */ { 0x06, "\x05\x04\x15\x82\x00\x00" }, /* Operator logos */ { 0x06, "\x05\x04\x15\x83\x00\x00" }, /* Caller logos */ { 0x06, "\x05\x04\x15\x8a\x00\x00" }, /* Multipart Message */ { 0x06, "\x05\x04\x23\xf4\x00\x00" }, /* WAP vCard */ { 0x06, "\x05\x04\x23\xf5\x00\x00" }, /* WAP vCalendar */ { 0x06, "\x05\x04\x23\xf6\x00\x00" }, /* WAP vCardSecure */ { 0x06, "\x05\x04\x23\xf7\x00\x00" }, /* WAP vCalendarSecure */ { 0x04, "\x01\x02\x00\x00" }, /* Voice Messages */ { 0x04, "\x01\x02\x01\x00" }, /* Fax Messages */ { 0x04, "\x01\x02\x02\x00" }, /* Email Messages */ { 0x06, "\x05\x04\x0b\x84\x23\xf0" }, /* WAP PUSH */ { 0x06, "\x05\x04\x0b\x84\x0b\x84" }, { 0x00, "" }, }; /** * sms_default - fills in SMS structure with the default values * @sms: pointer to a structure we need to fill in * * Default settings: * - no delivery report * - no Class Message * - no compression * - 7 bit data * - message validity for 3 days * - unsent status */ static void sms_default(gn_sms *sms) { memset(sms, 0, sizeof(gn_sms)); sms->type = GN_SMS_MT_Deliver; sms->delivery_report = false; sms->status = GN_SMS_Unsent; sms->validity = 4320; /* 4320 minutes == 72 hours */ sms->dcs.type = GN_SMS_DCS_GeneralDataCoding; sms->dcs.u.general.compressed = false; sms->dcs.u.general.alphabet = GN_SMS_DCS_DefaultAlphabet; sms->dcs.u.general.m_class = 0; } GNOKII_API void gn_sms_default_submit(gn_sms *sms) { sms_default(sms); sms->type = GN_SMS_MT_Submit; sms->memory_type = GN_MT_SM; } GNOKII_API void gn_sms_default_deliver(gn_sms *sms) { sms_default(sms); sms->type = GN_SMS_MT_Deliver; sms->memory_type = GN_MT_ME; } /*** *** Util functions ***/ /** * sms_timestamp_print - formats date and time in the human readable manner * @number: binary coded date and time * * The function converts binary date time into an easily readable form. * It is Y2K compliant. */ static char *sms_timestamp_print(u8 *number) { #ifdef DEBUG #define LOCAL_DATETIME_MAX_LENGTH 26 static char buffer[LOCAL_DATETIME_MAX_LENGTH]; char buf[5]; int i; if (!number) return NULL; memset(buffer, 0, LOCAL_DATETIME_MAX_LENGTH); /* Ugly hack, but according to the GSM specs, the year is stored * as the 2 digit number. */ if ((10*(number[0] & 0x0f) + (number[0] >> 4)) < 70) snprintf(buffer, sizeof(buffer), "20"); else snprintf(buffer, sizeof(buffer), "19"); for (i = 0; i < 6; i++) { int c; char buf2[4]; switch (i) { case 0: case 1: c = '-'; break; case 3: case 4: c = ':'; break; default: c = ' '; break; } snprintf(buf2, 4, "%d%d%c", number[i] & 0x0f, number[i] >> 4, c); strncat(buffer, buf2, sizeof(buffer) - strlen(buffer)); } /* The GSM spec is not clear what is the sign of the timezone when the * 6th bit is set. Some SMSCs are compatible with our interpretation, * some are not. If your operator does use incompatible SMSC and wrong * sign disturbs you, change the sign here. */ if (number[6] & 0x08) strncat(buffer, "-", sizeof(buffer) - strlen(buffer)); else strncat(buffer, "+", sizeof(buffer) - strlen(buffer)); /* The timezone is given in quarters. The base is GMT. */ snprintf(buf, sizeof(buf), "%02d00", (10 * (number[6] & 0x07) + (number[6] >> 4)) / 4); strncat(buffer, buf, sizeof(buffer) - strlen(buffer)); return buffer; #undef LOCAL_DATETIME_MAX_LENGTH #else return NULL; #endif /* DEBUG */ } /** * sms_timestamp_unpack - converts binary datetime to the gnokii's datetime struct * @number: binary coded date and time * @dt: datetime structure to be filled * * The function fills int gnokii datetime structure basing on the given datetime * in the binary format. It is Y2K compliant. */ gn_timestamp *sms_timestamp_unpack(unsigned char *number, gn_timestamp *dt) { if (!dt) return NULL; memset(dt, 0, sizeof(gn_timestamp)); if (!number) return dt; dt->year = 10 * (number[0] & 0x0f) + (number[0] >> 4); /* Ugly hack, but according to the GSM specs, the year is stored * as the 2 digit number. */ if (dt->year < 70) dt->year += 2000; else dt->year += 1900; dt->month = 10 * (number[1] & 0x0f) + (number[1] >> 4); dt->day = 10 * (number[2] & 0x0f) + (number[2] >> 4); dt->hour = 10 * (number[3] & 0x0f) + (number[3] >> 4); dt->minute = 10 * (number[4] & 0x0f) + (number[4] >> 4); dt->second = 10 * (number[5] & 0x0f) + (number[5] >> 4); /* The timezone is given in quarters. The base is GMT */ dt->timezone = (10 * (number[6] & 0x07) + (number[6] >> 4)) / 4; /* The GSM spec is not clear what is the sign of the timezone when the * 6th bit is set. Some SMSCs are compatible with our interpretation, * some are not. If your operator does use incompatible SMSC and wrong * sign disturbs you, change the sign here. */ if (number[6] & 0x08) dt->timezone = -dt->timezone; return dt; } /** * sms_timestamp_pack - converts gnokii's datetime struct to the binary datetime * @dt: datetime structure to be read * @number: binary variable to be filled * */ unsigned char *sms_timestamp_pack(gn_timestamp *dt, unsigned char *number) { if (!number) return NULL; memset(number, 0, GN_SMS_DATETIME_MAX_LENGTH); if (!dt) return number; /* Ugly hack, but according to the GSM specs, the year is stored * as the 2 digit number. */ if (dt->year < 2000) dt->year -= 1900; else dt->year -= 2000; number[0] = (dt->year / 10) | ((dt->year % 10) << 4); number[1] = (dt->month / 10) | ((dt->month % 10) << 4); number[2] = (dt->day / 10) | ((dt->day % 10) << 4); number[3] = (dt->hour / 10) | ((dt->hour % 10) << 4); number[4] = (dt->minute / 10) | ((dt->minute % 10) << 4); number[5] = (dt->second / 10) | ((dt->second % 10) << 4); /* The timezone is given in quarters. The base is GMT */ number[6] = (dt->timezone / 10) | ((dt->second % 10) << 4) * 4; /* The GSM spec is not clear what is the sign of the timezone when the * 6th bit is set. Some SMSCs are compatible with our interpretation, * some are not. If your operator does use incompatible SMSC and wrong * sign disturbs you, change the sign here. */ if (dt->timezone < 0) number[6] |= 0x08; return number; } /*** *** DECODING SMS ***/ /** * sms_status - decodes the error code contained in the delivery report. * @status: error code to decode * @sms: SMS struct to store the result * * This function checks for the error (or success) code contained in the * received SMS - delivery report and fills in the SMS structure with * the correct message according to the GSM specification. * This function only applies to the delivery reports. Delivery reports * contain only one part, so it is assumed all other parts except 0th are * NULL. */ static gn_error sms_status(unsigned char status, gn_sms *sms) { sms->user_data[0].type = GN_SMS_DATA_Text; sms->user_data[1].type = GN_SMS_DATA_None; if (status < 0x03) { sms->user_data[0].dr_status = GN_SMS_DR_Status_Delivered; snprintf(sms->user_data[0].u.text, sizeof(sms->user_data[0].u.text), "%s", _("Delivered")); switch (status) { case 0x00: dprintf("SM received by the SME"); break; case 0x01: dprintf("SM forwarded by the SC to the SME but the SC is unable to confirm delivery"); break; case 0x02: dprintf("SM replaced by the SC"); break; } } else if (status & 0x40) { snprintf(sms->user_data[0].u.text, sizeof(sms->user_data[0].u.text), "%s", _("Failed")); /* more detailed reason only for debug */ if (status & 0x20) { dprintf("Temporary error, SC is not making any more transfer attempts\n"); sms->user_data[0].dr_status = GN_SMS_DR_Status_Failed_Permanent; switch (status) { case 0x60: dprintf("Congestion"); break; case 0x61: dprintf("SME busy"); break; case 0x62: dprintf("No response from SME"); break; case 0x63: dprintf("Service rejected"); break; case 0x64: dprintf("Quality of service not available"); break; case 0x65: dprintf("Error in SME"); break; default: dprintf("Reserved/Specific to SC: %x", status); break; } } else { dprintf("Permanent error, SC is not making any more transfer attempts\n"); sms->user_data[0].dr_status = GN_SMS_DR_Status_Failed_Temporary; switch (status) { case 0x40: dprintf("Remote procedure error"); break; case 0x41: dprintf("Incompatibile destination"); break; case 0x42: dprintf("Connection rejected by SME"); break; case 0x43: dprintf("Not obtainable"); break; case 0x44: dprintf("Quality of service not available"); break; case 0x45: dprintf("No internetworking available"); break; case 0x46: dprintf("SM Validity Period Expired"); break; case 0x47: dprintf("SM deleted by originating SME"); break; case 0x48: dprintf("SM Deleted by SC Administration"); break; case 0x49: dprintf("SM does not exist"); break; default: dprintf("Reserved/Specific to SC: 0x%02x", status); break; } } } else if (status & 0x20) { sms->user_data[0].dr_status = GN_SMS_DR_Status_Pending; snprintf(sms->user_data[0].u.text, sizeof(sms->user_data[0].u.text), "%s", _("Pending")); /* more detailed reason only for debug */ dprintf("Temporary error, SC still trying to transfer SM\n"); switch (status) { case 0x20: dprintf("Congestion"); break; case 0x21: dprintf("SME busy"); break; case 0x22: dprintf("No response from SME"); break; case 0x23: dprintf("Service rejected"); break; case 0x24: dprintf("Quality of service not available"); break; case 0x25: dprintf("Error in SME"); break; default: dprintf("Reserved/Specific to SC: 0x%02x", status); break; } } else { sms->user_data[0].dr_status = GN_SMS_DR_Status_Invalid; snprintf(sms->user_data[0].u.text, sizeof(sms->user_data[0].u.text), "%s", _("Unknown")); /* more detailed reason only for debug */ dprintf("Reserved/Specific to SC: 0x%02x", status); } dprintf("\n"); sms->user_data[0].length = strlen(sms->user_data[0].u.text); return GN_ERR_NONE; } /** * sms_data_decode - decodes encoded text from the SMS. * @message: encoded text * @output: room for the encoded text * @length: decoded text length * @size: encoded text length * @udhlen: udh length * @dcs: data coding scheme * * This function decodes either 7bit or 8bit or Unicode text to the * readable text format according to the locale set. */ static gn_error sms_data_decode(unsigned char *message, unsigned char *output, unsigned int length, unsigned int size, unsigned int udhlen, gn_sms_dcs dcs) { /* Unicode */ if (dcs.type & 0x20) { dprintf("Compressed message\n"); return GN_ERR_NOTIMPLEMENTED; } if ((dcs.type & 0x08) == 0x08) { dprintf("Unicode message\n"); /* * length is rawsms->length which is number of characters in * the decoded text. 3rd argument of char_unicode_decode is * number of bytes. */ char_unicode_decode(output, message, 2 * length); } else { /* 8bit SMS */ if ((dcs.type & 0xf4) == 0xf4) { dprintf("8bit message\n"); memcpy(output, message + udhlen, length); /* 7bit SMS */ } else { char *aux; dprintf("Default Alphabet\n"); length = length - (udhlen * 8 + ((7-(udhlen%7))%7)) / 7; aux = calloc(length + 1, 1); char_7bit_unpack((7-udhlen)%7, size, length, message, aux); char_default_alphabet_decode(output, aux, length); free(aux); } } dprintf("%s\n", output); return GN_ERR_NONE; } /** * sms_udh_decode - interprets the User Data Header contents * @message: received UDH * @sms: SMS structure to fill in * * At this stage we already need to know that SMS has UDH. * This function decodes UDH as described in: * - GSM 03.40 version 6.1.0 Release 1997, section 9.2.3.24 * - Smart Messaging Specification, Revision 1.0.0, September 15, 1997 */ static gn_error sms_udh_decode(unsigned char *message, gn_sms_udh *udh) { unsigned char length, pos, nr; udh->length = length = message[0]; pos = 1; nr = 0; while (length > 1) { unsigned char udh_length; udh_length = message[pos+1]; switch (message[pos]) { case 0x00: /* Concatenated short messages */ dprintf("Concatenated messages\n"); udh->udh[nr].type = GN_SMS_UDH_ConcatenatedMessages; udh->udh[nr].u.concatenated_short_message.reference_number = message[pos + 2]; udh->udh[nr].u.concatenated_short_message.maximum_number = message[pos + 3]; udh->udh[nr].u.concatenated_short_message.current_number = message[pos + 4]; break; case 0x08: /* Concatenated short messages, 16-bit reference number */ dprintf("Concatenated messages, 16-bit reference number\n"); udh->udh[nr].type = GN_SMS_UDH_ConcatenatedMessages; udh->udh[nr].u.concatenated_short_message.reference_number = 256 * message[pos + 2] + message[pos + 3]; udh->udh[nr].u.concatenated_short_message.maximum_number = message[pos + 4]; udh->udh[nr].u.concatenated_short_message.current_number = message[pos + 5]; break; case 0x01: /* Special SMS Message Indication */ switch (message[pos + 2] & 0x03) { case 0x00: dprintf("Voice Message\n"); udh->udh[nr].type = GN_SMS_UDH_VoiceMessage; break; case 0x01: dprintf("Fax Message\n"); udh->udh[nr].type = GN_SMS_UDH_FaxMessage; break; case 0x02: dprintf("Email Message\n"); udh->udh[nr].type = GN_SMS_UDH_EmailMessage; break; default: dprintf("Unknown\n"); udh->udh[nr].type = GN_SMS_UDH_Unknown; break; } udh->udh[nr].u.special_sms_message_indication.store = (message[pos + 2] & 0x80) >> 7; udh->udh[nr].u.special_sms_message_indication.message_count = message[pos + 3]; break; case 0x05: /* Application port addressing scheme, 16 bit address */ switch (((0x00ff & message[pos + 2]) << 8) | (0x00ff & message[pos + 3])) { case 0x1581: dprintf("Ringtone\n"); udh->udh[nr].type = GN_SMS_UDH_Ringtone; break; case 0x1582: dprintf("Operator Logo\n"); udh->udh[nr].type = GN_SMS_UDH_OpLogo; break; case 0x1583: dprintf("Caller Icon\n"); udh->udh[nr].type = GN_SMS_UDH_CallerIDLogo; break; case 0x158a: dprintf("Multipart Message\n"); udh->udh[nr].type = GN_SMS_UDH_MultipartMessage; break; case 0x23f4: dprintf("WAP vCard\n"); udh->udh[nr].type = GN_SMS_UDH_WAPvCard; break; case 0x23f5: dprintf("WAP vCalendar\n"); udh->udh[nr].type = GN_SMS_UDH_WAPvCalendar; break; case 0x23f6: dprintf("WAP vCardSecure\n"); udh->udh[nr].type = GN_SMS_UDH_WAPvCardSecure; break; case 0x23f7: dprintf("WAP vCalendarSecure\n"); udh->udh[nr].type = GN_SMS_UDH_WAPvCalendarSecure; break; case 0x0b84: dprintf("WAP Push\n"); udh->udh[nr].type = GN_SMS_UDH_WAPPush; break; default: dprintf("Unknown\n"); udh->udh[nr].type = GN_SMS_UDH_Unknown; break; } break; case 0x04: /* Application port addressing scheme, 8 bit address */ case 0x06: /* SMSC Control Parameters */ case 0x07: /* UDH Source Indicator */ default: udh->udh[nr].type = GN_SMS_UDH_Unknown; dprintf("User Data Header type 0x%02x isn't supported\n", message[pos]); break; } length -= (udh_length + 2); pos += (udh_length + 2); nr++; } udh->number = nr; /* We need to add the length field itself */ udh->length++; return GN_ERR_NONE; } /** * sms_header_decode - Decodes PDU SMS header * @rawsms: * @sms: * @udh: * * This function parses received SMS header information and stores * them in higher level SMS struct. It also checks for the UDH and when * it's found calls the function to extract the UDH. */ static gn_error sms_header_decode(gn_sms_raw *rawsms, gn_sms *sms, gn_sms_udh *udh) { switch (sms->type = rawsms->type) { case GN_SMS_MT_Deliver: dprintf("Mobile Terminated message:\n"); break; case GN_SMS_MT_DeliveryReport: dprintf("Delivery Report:\n"); break; case GN_SMS_MT_Submit: dprintf("Mobile Originated (stored) message:\n"); break; case GN_SMS_MT_StatusReport: dprintf("Status Report message:\n"); break; case GN_SMS_MT_Picture: dprintf("Picture Message:\n"); break; case GN_SMS_MT_TextTemplate: dprintf("Text Template:\n"); break; case GN_SMS_MT_PictureTemplate: dprintf("Picture Template:\n"); break; case GN_SMS_MT_SubmitSent: dprintf("Mobile Originated (sent) message:\n"); break; default: dprintf("SMS message type 0x%02x isn't supported\n", sms->type); return GN_ERR_NOTSUPPORTED; } /* Sending date */ sms_timestamp_unpack(rawsms->smsc_time, &(sms->smsc_time)); dprintf("\tDate: %s\n", sms_timestamp_print(rawsms->smsc_time)); /* Remote number */ rawsms->remote_number[0] = (rawsms->remote_number[0] + 1) / 2 + 1; snprintf(sms->remote.number, sizeof(sms->remote.number), "%s", char_bcd_number_get(rawsms->remote_number)); dprintf("\tRemote number (recipient or sender): %s\n", sms->remote.number); /* Short Message Center */ snprintf(sms->smsc.number, sizeof(sms->smsc.number), "%s", char_bcd_number_get(rawsms->message_center)); dprintf("\tSMS center number: %s\n", sms->smsc.number); /* Delivery time */ if (sms->type == GN_SMS_MT_StatusReport) { sms_timestamp_unpack(rawsms->time, &(sms->time)); dprintf("\tDelivery date: %s\n", sms_timestamp_print(rawsms->time)); } /* Data Coding Scheme */ sms->dcs.type = rawsms->dcs; /* User Data Header */ if (rawsms->udh_indicator & 0x40) { /* UDH header available */ dprintf("UDH found\n"); return sms_udh_decode(rawsms->user_data, udh); } return GN_ERR_NONE; } /** * sms_pdu_decode - This function decodes the PDU SMS * @rawsms - SMS read by the phone driver * @sms - place to store the decoded message * * This function decodes SMS as described in GSM 03.40 version 6.1.0 * Release 1997, section 9 */ static gn_error sms_pdu_decode(gn_sms_raw *rawsms, gn_sms *sms) { unsigned int size = 0; gn_error error; error = sms_header_decode(rawsms, sms, &sms->udh); ERROR(); sms->user_data[0].dr_status = GN_SMS_DR_Status_None; switch (sms->type) { case GN_SMS_MT_DeliveryReport: case GN_SMS_MT_StatusReport: sms_status(rawsms->report_status, sms); break; case GN_SMS_MT_PictureTemplate: case GN_SMS_MT_Picture: /* This is incredible. Nokia violates it's own format in 6210 */ /* Indicate that it is Multipart Message. Remove it if not needed */ /* [I believe Nokia said in their manuals that any order is permitted --pavel] */ sms->udh.number = 1; sms->udh.udh[0].type = GN_SMS_UDH_MultipartMessage; if ((rawsms->user_data[0] == 0x48) && (rawsms->user_data[1] == 0x1c)) { dprintf("First picture then text!\n"); /* First part is a Picture */ sms->user_data[0].type = GN_SMS_DATA_Bitmap; gn_bmp_sms_read(GN_BMP_PictureMessage, rawsms->user_data, NULL, &sms->user_data[0].u.bitmap); #ifdef DEBUG gn_bmp_print(&sms->user_data[0].u.bitmap, stderr); #endif size = rawsms->user_data_length - 4 - sms->user_data[0].u.bitmap.size; /* Second part is a text */ sms->user_data[1].type = GN_SMS_DATA_NokiaText; sms_data_decode(rawsms->user_data + 5 + sms->user_data[0].u.bitmap.size, (unsigned char *)&(sms->user_data[1].u.text), rawsms->length - sms->user_data[0].u.bitmap.size - 4, size, 0, sms->dcs); } else { dprintf("First text then picture!\n"); /* First part is a text */ sms->user_data[1].type = GN_SMS_DATA_NokiaText; sms_data_decode(rawsms->user_data + 3, (unsigned char *)&(sms->user_data[1].u.text), rawsms->user_data[1], rawsms->user_data[0], 0, sms->dcs); /* Second part is a Picture */ sms->user_data[0].type = GN_SMS_DATA_Bitmap; gn_bmp_sms_read(GN_BMP_PictureMessage, rawsms->user_data + rawsms->user_data[0] + 7, NULL, &sms->user_data[0].u.bitmap); #ifdef DEBUG gn_bmp_print(&sms->user_data[0].u.bitmap, stderr); #endif } break; /* Plain text message */ default: return sms_data_decode(rawsms->user_data + sms->udh.length, /* Skip the UDH */ (unsigned char *)&sms->user_data[0].u.text, /* With a plain text message we have only 1 part */ rawsms->length, /* Length of the decoded text */ rawsms->user_data_length, /* Length of the encoded text (in full octets) without UDH */ sms->udh.length, /* To skip the certain number of bits when unpacking 7bit message */ sms->dcs); break; } return GN_ERR_NONE; } /** * gn_sms_parse - High-level function for the SMS parsing * @data: GSM data from the phone driver * * This function parses the SMS message from the lowlevel raw_sms to * the highlevel SMS. In data->raw_sms there's SMS read by the phone * driver, data->sms is the place for the parsed SMS. */ gn_error gn_sms_parse(gn_data *data) { if (!data->raw_sms || !data->sms) return GN_ERR_INTERNALERROR; /* Let's assume at the moment that all messages are PDU coded */ return sms_pdu_decode(data->raw_sms, data->sms); } /** * gn_sms_pdu2raw - Copy PDU data into gn_sms_raw structure * @rawsms: gn_sms_raw structure to be filled * @pdu: buffer containing PDU data * @pdu_len: length of buffer containing PDU data * @flags: GN_SMS_PDU_* flags to control copying * * This function fills a gn_sms_raw structure copying raw values from * a buffer containing PDU data. */ gn_error gn_sms_pdu2raw(gn_sms_raw *rawsms, unsigned char *pdu, int pdu_len, int flags) { #define COPY_REMOTE_NUMBER(pdu, offset) { \ l = (pdu[offset] % 2) ? pdu[offset] + 1 : pdu[offset]; \ l = l / 2 + 2; \ if (l + offset + extraoffset > pdu_len || l > GN_SMS_NUMBER_MAX_LENGTH) { \ dprintf("Invalid remote number length (%d)\n", l); \ ret = GN_ERR_INTERNALERROR; \ goto out; \ } \ memcpy(rawsms->remote_number, pdu + offset, l); \ offset += l; \ } #define COPY_USER_DATA(pdu, offset) { \ rawsms->length = pdu[offset++]; \ rawsms->user_data_length = rawsms->length; \ if (rawsms->length > 0) { \ if (rawsms->udh_indicator) \ rawsms->user_data_length -= pdu[offset] + 1; \ if (pdu_len - offset > GN_SMS_USER_DATA_MAX_LENGTH) { \ dprintf("Phone gave as poisonous (too short?) reply, either phone went crazy or communication went out of sync\n"); \ ret = GN_ERR_INTERNALERROR; \ goto out; \ } \ memcpy(rawsms->user_data, pdu + offset, pdu_len - offset); \ } \ } gn_error ret = GN_ERR_NONE; unsigned int l, extraoffset, offset = 0; int parameter_indicator; if (!flags & GN_SMS_PDU_NOSMSC) { l = pdu[offset] + 1; if (l > pdu_len || l > GN_SMS_SMSC_NUMBER_MAX_LENGTH) { dprintf("Invalid message center length (%d)\n", l); ret = GN_ERR_INTERNALERROR; goto out; } memcpy(rawsms->message_center, pdu, l); offset += l; } rawsms->reject_duplicates = 0; rawsms->report_status = 0; rawsms->reference = 0; rawsms->reply_via_same_smsc = 0; rawsms->report = 0; /* NOTE: offsets are taken from subclause 9.2.3 "Definition of the TPDU parameters" of 3GPP TS 23.040 version 7.0.1 Release 7 == ETSI TS 123 040 V7.0.1 (2007-03) *not* from the tables in subclause 9.2.2 "PDU Type repertoire at SM-TL" which ignore unused bits */ /* NOTE: this function handles only short messages received by the phone. Since the same TP-MTI value is used both for SC->MS and for MS->SC, it can't simply shift to get the enum value: (pdu[offset] & 0x03) << 1 */ /* TP-MTI TP-Message-Type-Indicator 9.2.3.1 */ switch (pdu[offset] & 0x03) { case 0x00: rawsms->type = GN_SMS_MT_Deliver; break; case 0x01: rawsms->type = GN_SMS_MT_Submit; break; case 0x02: rawsms->type = GN_SMS_MT_StatusReport; break; case 0x03: dprintf("Reserved TP-MTI found\n"); return GN_ERR_INTERNALERROR; } switch (rawsms->type) { case GN_SMS_MT_Deliver: dprintf("SMS-DELIVER found\n"); /* TP-MMS TP-More-Messages-to-Send */ rawsms->more_messages = pdu[offset] & 0x04; /* Bits 3 and 4 of the first octet are unused */ /* TP-SRI TP-Status-Report-Indication */ rawsms->report_status = pdu[offset] & 0x20; /* TP-UDHI TP-User-Data-Header-Indication */ rawsms->udh_indicator = pdu[offset] & 0x40; /* TP-RP TP-Reply-Path */ rawsms->reply_via_same_smsc = pdu[offset] & 0x80; offset++; /* TP-OA TP-Originating-Address */ extraoffset = 10; COPY_REMOTE_NUMBER(pdu, offset); /* TP-PID TP-Protocol-Identifier */ rawsms->pid = pdu[offset++]; /* TP-DCS TP-Data-Coding-Scheme */ rawsms->dcs = pdu[offset++]; /* TP-SCTS TP-Service-Centre-Time-Stamp */ memcpy(rawsms->smsc_time, pdu + offset, 7); offset += 7; /* TP-UDL TP-User-Data-Length */ /* TP-UD TP-User-Data */ COPY_USER_DATA(pdu, offset); break; case GN_SMS_MT_Submit: dprintf("SMS-SUBMIT found\n"); /* TP-RD TP-Reject-Duplicates */ rawsms->reject_duplicates = pdu[offset] & 0x04; /* TP-VPF TP-Validity-Period-Format */ rawsms->validity_indicator = (pdu[offset] & 0x18) >> 3; /* TP-SRR TP-Status-Report-Request */ rawsms->report = pdu[offset] & 0x20; /* TP-UDHI TP-User-Data-Header-Indication */ rawsms->udh_indicator = pdu[offset] & 0x40; /* TP-RP TP-Reply-Path */ rawsms->reply_via_same_smsc = pdu[offset] & 0x80; offset++; /* TP-MR TP-Message-Reference */ rawsms->reference = pdu[offset++]; /* TP-DA TP-Destination-Address */ extraoffset = 3; COPY_REMOTE_NUMBER(pdu, offset); /* TP-PID TP-Protocol-Identifier */ rawsms->pid = pdu[offset++]; /* TP-DCS TP-Data-Coding-Scheme */ rawsms->dcs = pdu[offset++]; /* TP-VP TP-Validity-Period */ switch (rawsms->validity_indicator) { case GN_SMS_VP_None: /* nothing to convert */ break; case GN_SMS_VP_RelativeFormat: rawsms->validity[0] = pdu[offset++]; break; case GN_SMS_VP_EnhancedFormat: /* FALL THROUGH */ case GN_SMS_VP_AbsoluteFormat: memcpy(rawsms->validity, pdu + offset, 7); offset += 7; break; default: dprintf("Unknown validity_indicator 0x%02x\n", rawsms->validity_indicator); return GN_ERR_INTERNALERROR; } /* TP-UDL TP-User-Data-Length */ /* TP-UD TP-User-Data */ COPY_USER_DATA(pdu, offset); break; case GN_SMS_MT_StatusReport: dprintf("SMS-STATUS-REPORT found\n"); /* TP-MMS TP-More-Messages-to-Send */ rawsms->more_messages = pdu[offset] & 0x04; /* TP-SRQ TP-Status-Report-Qualifier */ rawsms->report = pdu[offset] & 0x10; /* TP-UDHI TP-User-Data-Header-Indication */ rawsms->udh_indicator = pdu[offset] & 0x40; offset++; /* TP-MR TP-Message-Reference */ rawsms->reference = pdu[offset++]; /* TP-RA TP-Recipient-Address */ extraoffset = 0; COPY_REMOTE_NUMBER(pdu, offset); /* TP-SCTS TP-Service-Centre-Time-Stamp */ memcpy(rawsms->smsc_time, pdu + offset, 7); offset += 7; /* TP-DT TP-Discharge-Time */ memcpy(rawsms->time, pdu + offset, 7); offset += 7; /* TP-ST TP-Status */ rawsms->report_status = pdu[offset++]; /* TP-PI TP-Parameter-Indicator */ parameter_indicator = pdu[offset]; /* handle the "extension bit" skipping the following octects, if any (see 9.2.3.27 TP-Parameter-Indicator): * The most significant bit in octet 1 and any other TP-PI octets which may be added later is reserved as an extension bit * which when set to a 1 shall indicate that another TP-PI octet follows immediately afterwards. */ while ((offset < pdu_len) && (pdu[offset++] & 0x80)) ; if ((offset < pdu_len) && (parameter_indicator & 0x01)) { /* TP-PID TP-Protocol-Identifier */ rawsms->pid = pdu[offset++]; } if ((offset < pdu_len) && (parameter_indicator & 0x02)) { /* TP-DCS TP-Data-Coding-Scheme */ rawsms->dcs = pdu[offset++]; } if ((offset < pdu_len) && (parameter_indicator & 0x04)) { /* TP-UDL TP-User-Data-Length */ /* TP-UD TP-User-Data */ COPY_USER_DATA(pdu, offset); } break; case GN_SMS_MT_Command: #if 0 dprintf("SMS-COMMAND found\n"); /* TP-Message-Type-Indicator */ /** decoded above **/ offset = 5; /* TP-User-Data-Header-Indication */ rawsms->udh_indicator = pdu[offset] & 0x40; /* TP-Status-Report-Request */ rawsms->report_status = pdu[offset] & 0x08; offset++; /* TP-Message Reference */ rawsms->reference = pdu[offset++]; /* TP-Protocol-Identifier */ rawsms->pid = pdu[offset++]; /* TP-Command-Type */ dprintf("TP-Command-Type 0x%02x\n", pdu[offset++]); /* TP-Message-Number */ dprintf("TP-Message-Number 0x%02x\n", pdu[offset++]); /* TP-Destination-Address */ l = (pdu[offset] % 2) ? pdu[offset] + 1 : pdu[offset]; l = l / 2 + 2; memcpy(rawsms->remote_number, pdu + offset, l); offset += l; /* TP-Command-Data-Length */ dprintf("TP-Command-Data-Length 0x%02x\n", pdu[offset++]); /* TP-Command-Data */ dprintf("TP-Command-Data 0x%02x ...\n", pdu[offset++]); goto out; break; #endif /* FALL THROUGH */ default: dprintf("Unknown PDU type %d\n", rawsms->type); return GN_ERR_INTERNALERROR; } /* * Unicode message has length in octets. We need length in characters: see comment in sms_pdu_decode(). */ if ((rawsms->dcs & 0x08) == 0x08) rawsms->length /= 2; out: return ret; #undef COPY_USER_DATA #undef COPY_REMOTE_NUMBER } /** * gn_sms_request - High-level function for the explicit SMS reading from the phone * @data: GSM data for the phone driver * @state: current statemachine state * * This is the function for explicit requesting the SMS from the * phone driver. Note that raw_sms field in the gn_data structure must * be initialized */ gn_error gn_sms_request(gn_data *data, struct gn_statemachine *state) { if (!data->raw_sms) return GN_ERR_INTERNALERROR; return gn_sm_functions(GN_OP_GetSMS, data, state); } /** * gn_sms_get- High-level function for reading SMS * @data: GSM data for the phone driver * @state: current statemachine state * * This function is the frontend for reading SMS. Note that SMS field * in the gn_data structure must be initialized. */ GNOKII_API gn_error gn_sms_get(gn_data *data, struct gn_statemachine *state) { gn_error error; gn_sms_raw rawsms; if (!data->sms) return GN_ERR_INTERNALERROR; if (data->sms->number < 0) return GN_ERR_EMPTYLOCATION; if (data->sms->memory_type > GN_MT_LAST) return GN_ERR_INVALIDMEMORYTYPE; memset(&rawsms, 0, sizeof(gn_sms_raw)); rawsms.number = data->sms->number; rawsms.memory_type = data->sms->memory_type; data->raw_sms = &rawsms; error = gn_sms_request(data, state); ERROR(); data->sms->status = rawsms.status; return gn_sms_parse(data); } /** * gn_sms_delete - High-level function for deleting SMS * @data: GSM data for the phone driver * @state: current statemachine state * * This function is the frontend for deleting SMS. Note that SMS field * in the gn_data structure must be initialized. */ GNOKII_API gn_error gn_sms_delete(gn_data *data, struct gn_statemachine *state) { gn_sms_raw rawsms; if (!data->sms) return GN_ERR_INTERNALERROR; memset(&rawsms, 0, sizeof(gn_sms_raw)); rawsms.number = data->sms->number; rawsms.memory_type = data->sms->memory_type; data->raw_sms = &rawsms; return gn_sm_functions(GN_OP_DeleteSMS, data, state); } /*** *** OTHER FUNCTIONS ***/ static gn_error sms_request_no_validate(gn_data *data, struct gn_statemachine *state) { return gn_sm_functions(GN_OP_GetSMSnoValidate, data, state); } GNOKII_API gn_error gn_sms_get_no_validate(gn_data *data, struct gn_statemachine *state) { gn_error error; gn_sms_raw rawsms; if (!data->sms) return GN_ERR_INTERNALERROR; memset(&rawsms, 0, sizeof(gn_sms_raw)); rawsms.number = data->sms->number; rawsms.memory_type = data->sms->memory_type; data->raw_sms = &rawsms; error = sms_request_no_validate(data, state); ERROR(); data->sms->status = rawsms.status; return gn_sms_parse(data); } GNOKII_API gn_error gn_sms_delete_no_validate(gn_data *data, struct gn_statemachine *state) { gn_sms_raw rawsms; if (!data->sms) return GN_ERR_INTERNALERROR; memset(&rawsms, 0, sizeof(gn_sms_raw)); rawsms.number = data->sms->number; rawsms.memory_type = data->sms->memory_type; data->raw_sms = &rawsms; return gn_sm_functions(GN_OP_DeleteSMSnoValidate, data, state); } static gn_error sms_free_deleted(gn_data *data, int folder) { int i, j; if (!data->sms_status) return GN_ERR_INTERNALERROR; for (i = 0; i < data->folder_stats[folder]->used; i++) { /* for all previously found locations */ if (data->message_list[i][folder]->status == GN_SMS_FLD_ToBeRemoved) { /* previously deleted and read message */ dprintf("Found deleted message, which will now be freed! %i , %i\n", i, data->message_list[i][folder]->location); for (j = i; j < data->folder_stats[folder]->used; j++) { memcpy(data->message_list[j][folder], data->message_list[j + 1][folder], sizeof(gn_sms_message_list)); } data->folder_stats[folder]->used--; i--; } } return GN_ERR_NONE; } static gn_error sms_get_read(gn_data *data) { int i, j, found; if (!data->message_list || !data->folder_stats || !data->sms_folder) return GN_ERR_INTERNALERROR; for (i = 0; i < data->sms_folder->number; i++) { /* cycle through all messages in phone */ found = 0; for (j = 0; j < data->folder_stats[data->sms_folder->folder_id]->used; j++) { /* and compare them to those alread in list */ if (data->sms_folder->locations[i] == data->message_list[j][data->sms_folder->folder_id]->location) found = 1; } if (data->folder_stats[data->sms_folder->folder_id]->used >= GN_SMS_MESSAGE_MAX_NUMBER) { dprintf("Max messages number in folder exceeded (%d)\n", GN_SMS_MESSAGE_MAX_NUMBER); return GN_ERR_MEMORYFULL; } if (!found) { dprintf("Found new (read) message. Will store it at #%i!\n", data->folder_stats[data->sms_folder->folder_id]->used); dprintf("%i\n", data->sms_folder->locations[i]); data->message_list[data->folder_stats[data->sms_folder->folder_id]->used][data->sms_folder->folder_id]->location = data->sms_folder->locations[i]; data->message_list[data->folder_stats[data->sms_folder->folder_id]->used][data->sms_folder->folder_id]->status = GN_SMS_FLD_New; data->folder_stats[data->sms_folder->folder_id]->used++; data->folder_stats[data->sms_folder->folder_id]->changed++; data->sms_status->changed++; } } return GN_ERR_NONE; } static gn_error sms_get_deleted(gn_data *data) { int i, j, found = 0; for (i = 0; i < data->folder_stats[data->sms_folder->folder_id]->used; i++) { /* for all previously found locations in folder */ found = 0; for (j = 0; j < data->sms_folder->number; j++) { /* see if there is a corresponding message in phone */ if (data->message_list[i][data->sms_folder->folder_id]->location == data->sms_folder->locations[j]) found = 1; } if ((found == 0) && (data->message_list[i][data->sms_folder->folder_id]->status == GN_SMS_FLD_Old)) { /* we have found a deleted message */ dprintf("found a deleted message!!!! i: %i, loc: %i, MT: %i \n", i, data->message_list[i][data->sms_folder->folder_id]->location, data->sms_folder->folder_id); data->message_list[i][data->sms_folder->folder_id]->status = GN_SMS_FLD_Deleted; data->sms_status->changed++; data->folder_stats[data->sms_folder->folder_id]->changed++; } } return GN_ERR_NONE; } static gn_error sms_verify_status(gn_data *data) { int i, j; for (i = 0; i < data->folder_stats[data->sms_folder->folder_id]->used; i++) { /* Cycle through all messages we know of */ if ((data->message_list[i][data->sms_folder->folder_id]->status == GN_SMS_FLD_NotRead) || /* if it is a unread one, i.e. not in folderstatus */ (data->message_list[i][data->sms_folder->folder_id]->status == GN_SMS_FLD_NotReadHandled)) { for (j = 0; j < data->sms_folder->number; j++) { if (data->message_list[i][data->sms_folder->folder_id]->location == data->sms_folder->locations[j]) { /* We have found a formerly unread message which has been read in the meantime */ dprintf("Found a formerly unread message which has been read in the meantime: loc: %i\n", data->message_list[i][data->sms_folder->folder_id]->location); data->message_list[i][data->sms_folder->folder_id]->status = GN_SMS_FLD_Changed; data->sms_status->changed++; data->folder_stats[data->sms_folder->folder_id]->changed++; } } } } return GN_ERR_NONE; } GNOKII_API gn_error gn_sms_get_folder_changes(gn_data *data, struct gn_statemachine *state, int has_folders) { gn_error error; gn_sms_folder sms_folder; gn_sms_folder_list sms_folder_list; int i, previous_unread, previous_total; previous_total = data->sms_status->number; previous_unread = data->sms_status->unread; dprintf("GetFolderChanges: Old status: %d %d\n", data->sms_status->number, data->sms_status->unread); error = gn_sm_functions(GN_OP_GetSMSStatus, data, state); /* Check overall SMS Status */ ERROR(); dprintf("GetFolderChanges: Status: %d %d\n", data->sms_status->number, data->sms_status->unread); if (!has_folders) { if ((previous_total == data->sms_status->number) && (previous_unread == data->sms_status->unread)) data->sms_status->changed = 0; else data->sms_status->changed = 1; return GN_ERR_NONE; } data->sms_folder_list = &sms_folder_list; error = gn_sm_functions(GN_OP_GetSMSFolders, data, state); ERROR(); data->sms_status->folders_count = data->sms_folder_list->number; for (i = 0; i < data->sms_status->folders_count; i++) { dprintf("GetFolderChanges: Freeing deleted messages for folder #%i\n", i); error = sms_free_deleted(data, i); ERROR(); data->sms_folder = &sms_folder; data->sms_folder->folder_id = (gn_memory_type) i + 12; dprintf("GetFolderChanges: Getting folder status for folder #%i\n", i); error = gn_sm_functions(GN_OP_GetSMSFolderStatus, data, state); ERROR(); data->sms_folder->folder_id = i; /* so we don't need to do a modulo 8 each time */ dprintf("GetFolderChanges: Reading read messages (%i) for folder #%i\n", data->sms_folder->number, i); error = sms_get_read(data); ERROR(); dprintf("GetFolderChanges: Getting deleted messages for folder #%i\n", i); error = sms_get_deleted(data); ERROR(); dprintf("GetFolderChanges: Verifying messages for folder #%i\n", i); error = sms_verify_status(data); ERROR(); } return GN_ERR_NONE; } /*** *** ENCODING SMS ***/ /** * sms_udh_encode - encodes User Data Header * @sms: SMS structure with the data source * @type: * * returns pointer to data it added; * * This function encodes the UserDataHeader as described in: * o GSM 03.40 version 6.1.0 Release 1997, section 9.2.3.24 * o Smart Messaging Specification, Revision 1.0.0, September 15, 1997 * o Smart Messaging Specification, Revision 3.0.0 */ static char *sms_udh_encode(gn_sms_raw *rawsms, int type) { unsigned char pos; char *udh = rawsms->user_data; char *res = NULL; pos = udh[0]; switch (type) { case GN_SMS_UDH_None: break; case GN_SMS_UDH_VoiceMessage: case GN_SMS_UDH_FaxMessage: case GN_SMS_UDH_EmailMessage: return NULL; #if 0 udh[pos+4] = udhi.u.SpecialSMSMessageIndication.MessageCount; if (udhi.u.SpecialSMSMessageIndication.Store) udh[pos+3] |= 0x80; #endif case GN_SMS_UDH_ConcatenatedMessages: dprintf("Adding ConcatMsg header\n"); case GN_SMS_UDH_OpLogo: case GN_SMS_UDH_CallerIDLogo: case GN_SMS_UDH_Ringtone: case GN_SMS_UDH_MultipartMessage: case GN_SMS_UDH_WAPPush: udh[0] += headers[type].length; res = udh+pos+1; memcpy(res, headers[type].header, headers[type].length); rawsms->user_data_length += headers[type].length; rawsms->length += headers[type].length; break; default: dprintf("User Data Header type 0x%02x isn't supported\n", type); break; } if (!rawsms->udh_indicator) { rawsms->udh_indicator = 1; rawsms->length++; /* Length takes one byte, too */ rawsms->user_data_length++; } return res; } /** * sms_concat_header_encode - Adds concatenated messages header * @rawsms: processed SMS * @curr: current part number * @total: total parts number * * This function adds sequent part of the concatenated messages header. Note * that this header should be the first of all headers. */ static gn_error sms_concat_header_encode(gn_sms_raw *rawsms, int curr, int total) { char *header = sms_udh_encode(rawsms, GN_SMS_UDH_ConcatenatedMessages); if (!header) return GN_ERR_NOTSUPPORTED; header[2] = 0xce; /* Message serial number. Is 0xce value somehow special? -- pkot */ header[3] = total; header[4] = curr; return GN_ERR_NONE; } /** * sms_data_encode - Encodes the data from the SMS structure to the phone frame * * @sms: #gn_sms structure holding user provided data * @rawsms: #gn_sms_raw structure to be filled with encoded data * * This function converts values from libgnokii format to a format more similar * to the GSM standard. * This function is capable of creating only one frame at a time. */ static gn_error sms_data_encode(gn_sms *sms, gn_sms_raw *rawsms) { gn_sms_dcs_alphabet_type al = GN_SMS_DCS_DefaultAlphabet; unsigned int i, size = 0; gn_error error; /* Additional Headers */ switch (sms->dcs.type) { case GN_SMS_DCS_GeneralDataCoding: dprintf("General Data Coding\n"); switch (sms->dcs.u.general.m_class) { case 0: break; case 1: rawsms->dcs |= 0xf0; break; /* Class 0 */ case 2: rawsms->dcs |= 0xf1; break; /* Class 1 */ case 3: rawsms->dcs |= 0xf2; break; /* Class 2 */ case 4: rawsms->dcs |= 0xf3; break; /* Class 3 */ default: dprintf("General Data Coding class 0x%02x isn't supported\n", sms->dcs.u.general.m_class); break; } if (sms->dcs.u.general.compressed) { /* Compression not supported yet */ dprintf("SMS message compression isn't supported\n"); /* dcs[0] |= 0x20; */ } al = sms->dcs.u.general.alphabet; break; case GN_SMS_DCS_MessageWaiting: al = sms->dcs.u.message_waiting.alphabet; if (sms->dcs.u.message_waiting.discard) rawsms->dcs |= 0xc0; else if (sms->dcs.u.message_waiting.alphabet == GN_SMS_DCS_UCS2) rawsms->dcs |= 0xe0; else rawsms->dcs |= 0xd0; if (sms->dcs.u.message_waiting.active) rawsms->dcs |= 0x08; rawsms->dcs |= (sms->dcs.u.message_waiting.type & 0x03); break; default: dprintf("Data Coding Scheme type 0x%02x isn't supported\n", sms->dcs.type); return GN_ERR_WRONGDATAFORMAT; } for (i = 0; i < GN_SMS_PART_MAX_NUMBER; i++) { switch (sms->user_data[i].type) { case GN_SMS_DATA_Bitmap: switch (sms->user_data[i].u.bitmap.type) { case GN_BMP_PictureMessage: size = sms_nokia_bitmap_encode(&(sms->user_data[i].u.bitmap), rawsms->user_data + rawsms->user_data_length, (i == 0)); break; case GN_BMP_OperatorLogo: if (!sms_udh_encode(rawsms, GN_SMS_UDH_OpLogo)) return GN_ERR_NOTSUPPORTED; size = gn_bmp_sms_encode(&(sms->user_data[i].u.bitmap), rawsms->user_data + rawsms->user_data_length); break; case GN_BMP_CallerLogo: if (!sms_udh_encode(rawsms, GN_SMS_UDH_CallerIDLogo)) return GN_ERR_NOTSUPPORTED; size = gn_bmp_sms_encode(&(sms->user_data[i].u.bitmap), rawsms->user_data + rawsms->user_data_length); break; default: size = gn_bmp_sms_encode(&(sms->user_data[i].u.bitmap), rawsms->user_data + rawsms->user_data_length); break; } rawsms->length += size; rawsms->user_data_length += size; rawsms->dcs = 0xf5; rawsms->udh_indicator = 1; break; case GN_SMS_DATA_Animation: { int j; for (j = 0; j < 4; j++) { size = gn_bmp_sms_encode(&(sms->user_data[i].u.animation[j]), rawsms->user_data + rawsms->user_data_length); rawsms->length += size; rawsms->user_data_length += size; } rawsms->dcs = 0xf5; rawsms->udh_indicator = 1; break; } case GN_SMS_DATA_Text: { unsigned int length, udh_length, offset = rawsms->user_data_length; length = sms->user_data[i].length; if (sms->udh.length) udh_length = sms->udh.length + 1; else udh_length = 0; switch (al) { case GN_SMS_DCS_DefaultAlphabet: dprintf("Default Alphabet\n"); size = char_7bit_pack((7 - (udh_length % 7)) % 7, sms->user_data[i].u.text, rawsms->user_data + offset, &length); rawsms->length = length + (udh_length * 8 + 6) / 7; rawsms->user_data_length = size + offset; dprintf("\tsize: %d\n\toffset: %d\n", size, offset); dprintf("\tencoded size: %d\n\trawsms length: %d\n\trawsms user data length: %d\n", size, rawsms->length, rawsms->user_data_length); break; case GN_SMS_DCS_8bit: dprintf("8bit\n"); rawsms->dcs |= 0xf4; memcpy(rawsms->user_data + offset, sms->user_data[i].u.text, sms->user_data[i].u.text[0]); rawsms->user_data_length = rawsms->length = length + udh_length; break; case GN_SMS_DCS_UCS2: dprintf("UCS-2\n"); rawsms->dcs |= 0x08; length = ucs2_encode(rawsms->user_data + offset, GN_SMS_LONG_MAX_LENGTH, sms->user_data[i].u.text, length); if (length < 0) { dprintf("Failed to encode UCS2 message\n"); return GN_ERR_WRONGDATAFORMAT; } rawsms->user_data_length = rawsms->length = length + udh_length; break; default: return GN_ERR_WRONGDATAFORMAT; } break; } case GN_SMS_DATA_NokiaText: size = sms_nokia_text_encode(sms->user_data[i].u.text, rawsms->user_data + rawsms->user_data_length, (i == 0)); rawsms->length += size; rawsms->user_data_length += size; break; case GN_SMS_DATA_iMelody: size = imelody_sms_encode(sms->user_data[i].u.text, rawsms->user_data + rawsms->user_data_length); dprintf("Imelody, size %d\n", size); rawsms->length += size; rawsms->user_data_length += size; rawsms->dcs = 0xf5; rawsms->udh_indicator = 1; break; case GN_SMS_DATA_Multi: size = sms->user_data[0].length; if (!sms_udh_encode(rawsms, GN_SMS_UDH_MultipartMessage)) return GN_ERR_NOTSUPPORTED; error = sms_concat_header_encode(rawsms, sms->user_data[i].u.multi.curr, sms->user_data[i].u.multi.total); ERROR(); memcpy(rawsms->user_data + rawsms->user_data_length, sms->user_data[i].u.multi.binary, MAX_SMS_PART - 6); rawsms->length += size; rawsms->user_data_length += size; rawsms->dcs = 0xf5; break; case GN_SMS_DATA_Ringtone: if (!sms_udh_encode(rawsms, GN_SMS_UDH_Ringtone)) return GN_ERR_NOTSUPPORTED; size = ringtone_sms_encode(rawsms->user_data + rawsms->length, &sms->user_data[i].u.ringtone); rawsms->length += size; rawsms->user_data_length += size; rawsms->dcs = 0xf5; break; case GN_SMS_DATA_WAPPush: if (!sms_udh_encode(rawsms, GN_SMS_UDH_WAPPush)) return GN_ERR_NOTSUPPORTED; size = sms->user_data[i].length; memcpy(rawsms->user_data + rawsms->user_data_length, sms->user_data[i].u.text, size ); rawsms->length += size; rawsms->user_data_length += size; rawsms->dcs = 0xf5; break; case GN_SMS_DATA_Concat: al = GN_SMS_DCS_8bit; rawsms->dcs = 0xf5; sms_concat_header_encode(rawsms, sms->user_data[i].u.concat.curr, sms->user_data[i].u.concat.total); break; case GN_SMS_DATA_None: return GN_ERR_NONE; default: dprintf("User Data type 0x%02x isn't supported\n", sms->user_data[i].type); break; } } return GN_ERR_NONE; } gn_error sms_prepare(gn_sms *sms, gn_sms_raw *rawsms) { int i; switch (rawsms->type = sms->type) { case GN_SMS_MT_Submit: case GN_SMS_MT_Deliver: case GN_SMS_MT_Picture: break; case GN_SMS_MT_DeliveryReport: default: dprintf("Raw SMS message type 0x%02x isn't supported\n", rawsms->type); return GN_ERR_NOTSUPPORTED; } /* Encoding the header */ rawsms->report = sms->delivery_report; rawsms->remote_number[0] = char_semi_octet_pack(sms->remote.number, rawsms->remote_number + 1, sms->remote.type); if (rawsms->remote_number[0] > GN_SMS_NUMBER_MAX_LENGTH) { dprintf("Remote number length %d > %d\n", rawsms->remote_number[0], GN_SMS_NUMBER_MAX_LENGTH); return GN_ERR_ENTRYTOOLONG; } rawsms->validity_indicator = GN_SMS_VP_RelativeFormat; rawsms->validity[0] = GN_SMS_VP_72H; for (i = 0; i < sms->udh.number; i++) if (sms->udh.udh[i].type == GN_SMS_UDH_ConcatenatedMessages) sms_concat_header_encode(rawsms, sms->udh.udh[i].u.concatenated_short_message.current_number, sms->udh.udh[i].u.concatenated_short_message.maximum_number); return sms_data_encode(sms, rawsms); } static void sms_dump_raw(gn_sms_raw *rawsms) { #ifdef DEBUG char buf[10240]; memset(buf, 0, 10240); dprintf("dcs: 0x%02x\n", rawsms->dcs); dprintf("Length: 0x%02x\n", rawsms->length); dprintf("user_data_length: 0x%02x\n", rawsms->user_data_length); dprintf("ValidityIndicator: %d\n", rawsms->validity_indicator); bin2hex(buf, rawsms->user_data, rawsms->user_data_length); dprintf("user_data: %s\n", buf); #endif } GNOKII_API int gn_sms_udh_add(gn_sms *sms, gn_sms_udh_type type) { sms->udh.length += headers[type].length; sms->udh.udh[sms->udh.number].type = type; sms->udh.number++; return sms->udh.number - 1; } static gn_error sms_send_single(gn_data *data, struct gn_statemachine *state); static gn_error sms_send_long(gn_data *data, struct gn_statemachine *state, int octets); /** * gn_sms_send - The main function for the SMS sending * @data: GSM data for the phone driver * @state: current statemachine state * * The high level function to send SMS. You need to fill in data->sms * (gn_sms) in the higher level. This is converted to raw_sms here, * and then phone driver takes the fields it needs and sends it in the * phone specific way to the phone. * * In case of multipart message, sending is interrupted on the first * failure. It means that if message got split into 3 messages, and 2nd * part fails to send, the 3rd part is not attepted to get sent. There is * no interface to retry multipart message from the failed part. * * data->sms->parts indicates how many parts were (or supposed to be) sent. * * data->sms->reference contains data->sms->parts reference numbers from the * sent messages. They might be used to relate the delivery reports. If * given element has reference 0, sending this part, falied. */ GNOKII_API gn_error gn_sms_send(gn_data *data, struct gn_statemachine *state) { int i, total; int enc_chars, ext_chars; gn_error retval; gn_sms sms; gn_sms *orig_sms; dprintf("=====> ENTER gn_sms_send()\n"); /* * Make sure that we will not get any corruption if it was not * initialized properly by the app. Issue a warning that * application may leak the memory */ if (data->sms->reference) { dprintf("data->sms->reference was not set to NULL. The app may not initialize it\nproperly or leak memory.\n"); data->sms->reference = NULL; } /* * We need to work on data->sms->user_data; let's have a copy of the * original request so message could be resubmitted. * FIXME: use for that only additional user_data structure */ orig_sms = data->sms; memcpy(&sms, data->sms, sizeof(gn_sms)); data->sms = &sms; /* Convert all the input strings to UTF-8 */ if (data->sms->dcs.u.general.alphabet != GN_SMS_DCS_8bit) { i = 0; data->sms->dcs.u.general.alphabet = GN_SMS_DCS_DefaultAlphabet; while (data->sms->user_data[i].type != GN_SMS_DATA_None) { gchar *str; gsize inlen, outlen; gn_sms_dcs_alphabet_type enc; if (data->sms->user_data[i].type == GN_SMS_DATA_Text || data->sms->user_data[i].type == GN_SMS_DATA_NokiaText) { str = g_locale_to_utf8(data->sms->user_data[i].u.text, -1, &inlen, &outlen, NULL); data->sms->user_data[i].chars = g_utf8_strlen(str, outlen); memset(data->sms->user_data[i].u.text, 0, sizeof(data->sms->user_data[i].u.text)); g_utf8_strncpy(data->sms->user_data[i].u.text, str, data->sms->user_data[i].chars); g_free(str); /* Let's make sure the encoding is correct */ enc = char_def_alphabet_string_stats(data->sms->user_data[i].u.text, &enc_chars, &ext_chars); if (enc == GN_SMS_DCS_UCS2) data->sms->dcs.u.general.alphabet = enc; data->sms->user_data[i].chars = enc_chars; } else { /* FIXME: that's wrong for Nokia Multipart Picture Message, does anybody still use it? */ data->sms->dcs.u.general.alphabet = GN_SMS_DCS_8bit; } i++; } } dprintf("enc_chars: %d\next_chars: %d\n", enc_chars, ext_chars); /* Count the total length of the message text octets to be sent */ total = 0; i = 0; while (data->sms->user_data[i].type != GN_SMS_DATA_None) { switch (data->sms->dcs.u.general.alphabet) { case GN_SMS_DCS_DefaultAlphabet: /* * Extended alphabet chars are doubled on the input. */ total += ((enc_chars + ext_chars) * 7 + 7) / 8; break; case GN_SMS_DCS_UCS2: total += (enc_chars * 2); break; default: total += data->sms->user_data[i].length; break; } i++; } dprintf("total: %d\n", total); /* FIXME: from now on we handle only the user_data[0] */ dprintf("size of the input string: %d bytes\n", data->sms->user_data[0].length); dprintf("number of characters in the input string: %d chars\n", data->sms->user_data[0].chars); /* It will eventually get overwritten in sms_send_long() */ data->sms->parts = 1; if (total > MAX_SMS_PART) retval = sms_send_long(data, state, total); else retval = sms_send_single(data, state); data->sms = orig_sms; /* Let's put back information about sent messages */ data->sms->reference = sms.reference; data->sms->parts = sms.parts; return retval; } static gn_error sms_send_single(gn_data *data, struct gn_statemachine *state) { int i = 0; gn_error error = GN_ERR_NONE; gn_sms_raw rawsms; data->raw_sms = &rawsms; memset(&rawsms, 0, sizeof(rawsms)); if (!data->sms) return GN_ERR_INTERNALERROR; if (data->sms->remote.number[0] == 0) { dprintf("Recipient number cannot be NULL.\n"); return GN_ERR_WRONGDATAFORMAT; } dprintf("=====> ENTER sms_send_single()\n"); data->raw_sms->status = GN_SMS_Sent; data->raw_sms->message_center[0] = char_semi_octet_pack(data->sms->smsc.number, data->raw_sms->message_center + 1, data->sms->smsc.type); if (data->raw_sms->message_center[0] % 2) data->raw_sms->message_center[0]++; if (data->raw_sms->message_center[0]) data->raw_sms->message_center[0] = data->raw_sms->message_center[0] / 2 + 1; error = sms_prepare(data->sms, data->raw_sms); if (error != GN_ERR_NONE) return error; sms_dump_raw(data->raw_sms); dprintf("Input is %d bytes long\n", data->sms->user_data[0].length); dprintf("SMS is %d octets long\n", data->raw_sms->user_data_length); dprintf("Sending\n"); error = gn_sm_functions(GN_OP_SendSMS, data, state); /* If there was an error, let's not put the reference into data->sms */ if (error == GN_ERR_NONE) { /* In case of multipart message it is already allocated */ if (!data->sms->reference) data->sms->reference = calloc(data->sms->parts, sizeof(unsigned int)); /* We send SMS parts from the first part to last. */ i = 0; while (i < data->sms->parts-1 && data->sms->reference[i] != 0) i++; data->sms->reference[i] = data->raw_sms->reference; } return error; } /* * FIXME: we stop sending multipart message on first error. We may end up * with few messages send, and few failed. We're not able to resend only * failed ones. */ static gn_error sms_send_long(gn_data *data, struct gn_statemachine *state, int octets) { int i, j, k, count, size, start, copied, refnum, is_concat = -1, max_sms_len = MAX_SMS_PART; gn_sms_user_data ud[GN_SMS_PART_MAX_NUMBER]; gn_error error = GN_ERR_NONE; time_t t; start = 0; copied = 0; count = data->sms->parts; dprintf("=====> ENTER sms_send_long()\n"); dprintf("count: %d\n", count); /* If there's no concat header we need to add one */ for (i = 0; i < data->sms->number; i++) { if (data->sms->udh.udh[i].type == GN_SMS_UDH_ConcatenatedMessages) is_concat = i; } if (is_concat == -1) is_concat = gn_sms_udh_add(data->sms, GN_SMS_UDH_ConcatenatedMessages); /* We need to attach user data header to each part */ max_sms_len -= (data->sms->udh.length + 1); /* Count number of SMS to be sent */ count = (octets + max_sms_len - 1) / max_sms_len; dprintf("Will need %d sms-es\n", count); dprintf("SMS is %d octects long but we can only send %d octects in a single SMS after adding %d octects for udh\n", octets, max_sms_len, data->sms->udh.length + 1); data->sms->parts = count; data->sms->reference = calloc(count, sizeof(unsigned int)); /* Generate reference number */ time(&t); srand(t); refnum = (int)(255.0*rand()/(RAND_MAX+1.0)); /* have a copy of the original data */ i = 0; while (data->sms->user_data[i].type != GN_SMS_DATA_None) { memcpy(&ud[i], &data->sms->user_data[i], sizeof(gn_sms_user_data)); i++; } for (i = 0; i < count; i++) { dprintf("Sending sms #%d (refnum: %d)\n", i+1, refnum); data->sms->udh.udh[is_concat].u.concatenated_short_message.reference_number = refnum; data->sms->udh.udh[is_concat].u.concatenated_short_message.maximum_number = count; data->sms->udh.udh[is_concat].u.concatenated_short_message.current_number = i+1; switch (data->sms->dcs.u.general.alphabet) { case GN_SMS_DCS_DefaultAlphabet: start += copied; memset(&data->sms->user_data[0], 0, sizeof(gn_sms_user_data)); data->sms->user_data[0].type = ud[0].type; dprintf("%d %d %d\n", start, copied, max_sms_len); copied = char_def_alphabet_string_copy(data->sms->user_data[0].u.text, ud[0].u.text, max_sms_len * 8 / 7, start); dprintf("\tnumber of processed characters: %d\n", copied); break; case GN_SMS_DCS_UCS2: /* We need to copy precisely not to cut character in the middle */ start += copied; memset(&data->sms->user_data[0], 0, sizeof(gn_sms_user_data)); data->sms->user_data[0].type = ud[0].type; /* FIXME: We assume UTF8 input */ size = 1; #define C ud[0].u.text[start + j] for (j = 0, k = 0; start + j < ud[0].length && k < max_sms_len / 2; j++) { size--; if (!size) { /* Let's detect size of UTF8 char */ if (C >= 0 && C < 128) size = 1; else if (C >= 192 && C < 224) size = 2; else if (C >= 224 && C < 240) size = 3; else if (C >= 240 && C < 248) size = 4; else if (C >= 248 && C < 252) size = 5; else if (C >= 252 && C < 254) size = 6; else /* FIXME: handle it somehow */ dprintf("CHARACTER ENCODING ERROR\n"); k++; } /* Avoid cutting a character */ if (k < max_sms_len / 2) data->sms->user_data[0].u.text[j] = ud[0].u.text[start + j]; else j--; } #undef C data->sms->user_data[0].length = copied = j; dprintf("DEBUG: copied: %d\n", copied); break; default: start += copied; if (ud[0].length - start >= max_sms_len) { copied = max_sms_len; } else { copied = (ud[0].length - start) % (max_sms_len); } memset(&data->sms->user_data[0], 0, sizeof(gn_sms_user_data)); data->sms->user_data[0].type = ud[0].type; data->sms->user_data[0].length = copied; memcpy(data->sms->user_data[0].u.text, ud[0].u.text+start, copied); switch (ud[0].type) { case GN_SMS_DATA_Bitmap: break; case GN_SMS_DATA_Ringtone: break; default: break; } break; } dprintf("Text to be sent in this part: %s\n", data->sms->user_data[0].u.text); error = sms_send_single(data, state); ERROR(); } return GN_ERR_NONE; } GNOKII_API gn_error gn_sms_save(gn_data *data, struct gn_statemachine *state) { gn_error error = GN_ERR_NONE; gn_sms_raw rawsms; data->raw_sms = &rawsms; memset(&rawsms, 0, sizeof(rawsms)); data->raw_sms->number = data->sms->number; data->raw_sms->status = data->sms->status; data->raw_sms->memory_type = data->sms->memory_type; sms_timestamp_pack(&data->sms->smsc_time, data->raw_sms->smsc_time); dprintf("\tDate: %s\n", sms_timestamp_print(data->raw_sms->smsc_time)); if (data->sms->smsc.number[0] != '\0') { data->raw_sms->message_center[0] = char_semi_octet_pack(data->sms->smsc.number, data->raw_sms->message_center + 1, data->sms->smsc.type); if (data->raw_sms->message_center[0] % 2) data->raw_sms->message_center[0]++; if (data->raw_sms->message_center[0]) data->raw_sms->message_center[0] = data->raw_sms->message_center[0] / 2 + 1; } error = sms_prepare(data->sms, data->raw_sms); ERROR(); if (data->raw_sms->length > GN_SMS_MAX_LENGTH) { dprintf("SMS is too long? %d\n", data->raw_sms->length); goto cleanup; } error = gn_sm_functions(GN_OP_SaveSMS, data, state); /* the message was perhaps not stored at the specified location, but the phone driver probably knows where, so copy it over */ data->sms->number = data->raw_sms->number; cleanup: data->raw_sms = NULL; return error; } /* WAPPush functions */ char *encode_attr_inline_string(char token, char *string, int *data_len) { char *data = NULL; /* we need 3 extra bytes for tags */ *data_len = strlen(string) + 3; data = malloc(*data_len); if (!data) { return NULL; } data[0] = token; data[1] = TAG_INLINE; memcpy(data + 2, string, strlen(string)); data[*data_len - 1] = 0x00; return data; } char *encode_indication(gn_wap_push *wp, int *data_len) { char *data = NULL; char *attr = NULL; int attr_len = 0; int offset = 0; /* encode tag attribute */ attr = encode_attr_inline_string(ATTR_HREF, wp->url, &attr_len); if (!attr || !attr_len) { return NULL; } /* need 5 extra bytes for indication token & attributes */ *data_len = attr_len + strlen(wp->text) + 5; data = malloc(*data_len); if (!data) { free(attr); return NULL; } /* indication tag token */ data[offset++] = TOKEN_KNOWN_AC | TAG_INDICATION; /* attribute */ memcpy(data + offset, attr, attr_len); offset += attr_len; data[offset++] = TAG_END; /* wappush text */ data[offset++] = TAG_INLINE; memcpy(data + offset, wp->text, strlen(wp->text)); offset += strlen(wp->text); data[offset++] = 0x00; /* tag end */ data[offset++] = TAG_END; free(attr); return data; } char *encode_si(gn_wap_push *wp, int *data_len) { char *data = NULL; char *child = NULL; int child_len = 0; child = encode_indication(wp, &child_len); if (!child || !data_len) { return NULL; } /* we need extra 2 bytes for si token */ *data_len = child_len + 2; data = malloc(*data_len); if (!data) { free(child); return NULL; } data[0] = TOKEN_KNOWN_C | TAG_SI; memcpy(data + 1, child, child_len); data[*data_len - 1] = TAG_END; free(child); return data; } GNOKII_API gn_error gn_wap_push_encode(gn_wap_push *wp) { char *data = NULL; int data_len = 0; data = encode_si(wp, &data_len); if (!data || !data_len) { return GN_ERR_FAILED; } wp->data = malloc(data_len + sizeof(gn_wap_push_header)); if (!wp->data) { return GN_ERR_FAILED; } memcpy(wp->data, &wp->header, sizeof(gn_wap_push_header)); memcpy(wp->data + sizeof(gn_wap_push_header), data, data_len); wp->data_len = data_len + sizeof(gn_wap_push_header); return GN_ERR_NONE; } GNOKII_API void gn_wap_push_init(gn_wap_push *wp) { if (!wp) { return; } memset(wp, 0, sizeof(gn_wap_push)); wp->header.wsp_tid = 0x00; wp->header.wsp_pdu = PDU_TYPE_Push; wp->header.wsp_hlen = 0x01; wp->header.wsp_content_type = CONTENT_TYPE; wp->header.version = WBXML_VERSION; wp->header.public_id = TAG_SI; wp->header.charset = WAPPush_CHARSET; wp->header.stl = 0x00; /* string table length */ } static char *status2str(gn_sms_message_status status) { switch (status) { case GN_SMS_Unread: return "Unread"; case GN_SMS_Sent: return "Sent"; case GN_SMS_Unsent: return "Unsent"; default: return "Read"; } } #define MAX_TEXT_SUMMARY 20 #define MAX_SUBJECT_LENGTH 25 #define MAX_DATE_LENGTH 255 /* From snprintf(3) manual */ static char *allocate(char *fmt, ...) { char *str, *nstr; int len, size = 100; va_list ap; str = calloc(100, sizeof(char)); if (!str) return NULL; while (1) { va_start(ap, fmt); len = vsnprintf(str, size, fmt, ap); va_end(ap); if (len >= size) /* too small buffer */ size = len + 1; else if (len > -1) /* buffer OK */ return str; else /* let's try with larger buffer */ size *= 2; nstr = realloc(str, size); if (!nstr) { free(str); return NULL; } str = nstr; } } /* Here we allocate place for the line to append and we append it. * We free() the appended line. */ #define APPEND(dst, src, size) \ do { \ char *ndst; \ int old = size; \ size += strlen(src); \ ndst = realloc(dst, size + 1); \ if (!ndst) { \ free(dst); \ goto error; \ } \ dst = ndst; \ dst[old] = 0; \ strcat(dst, src); \ free(src); \ } while (0) #define CONCAT(dst, src, size, pattern, ...) \ do { \ src = allocate(pattern, __VA_ARGS__); \ if (!src) \ goto error; \ APPEND(dst, src, size); \ } while (0); /* Returns allocated space for mbox-compatible formatted SMS */ /* TODO: * o add encoding information * o support non-text SMS (MMS, EMS, delivery report, ...) */ GNOKII_API char *gn_sms2mbox(gn_sms *sms, char *from) { struct tm t, *loctime; time_t caltime; int size = 0; char *tmp; #ifdef ENABLE_NLS char *loc; #endif char *buf = NULL, *aux = NULL; t.tm_sec = sms->smsc_time.second; t.tm_min = sms->smsc_time.minute; t.tm_hour = sms->smsc_time.hour; t.tm_mday = sms->smsc_time.day; t.tm_mon = sms->smsc_time.month - 1; t.tm_year = sms->smsc_time.year - 1900; #ifdef HAVE_TM_GMTON if (sms->smsc_time.timezone) t.tm_gmtoff = sms->smsc_time.timezone * 3600; #endif caltime = mktime(&t); loctime = localtime(&caltime); #ifdef ENABLE_NLS loc = setlocale(LC_ALL, "C"); #endif switch (sms->status) { case GN_SMS_Sent: case GN_SMS_Unsent: CONCAT(buf, tmp, size, "From %s@%s %s", "+0", from, asctime(loctime)); break; case GN_SMS_Read: case GN_SMS_Unread: default: CONCAT(buf, tmp, size, "From %s@%s %s", sms->remote.number, from, asctime(loctime)); break; } tmp = calloc(MAX_DATE_LENGTH, sizeof(char)); if (!tmp) goto error; strftime(tmp, MAX_DATE_LENGTH - 1, "Date: %a, %d %b %Y %H:%M:%S %z (%Z)\n", loctime); #ifdef ENABLE_NLS setlocale(LC_ALL, loc); #endif APPEND(buf, tmp, size); switch (sms->status) { case GN_SMS_Sent: case GN_SMS_Unsent: CONCAT(buf, tmp, size, "To: %s@%s\n", sms->remote.number, from); break; case GN_SMS_Read: case GN_SMS_Unread: default: CONCAT(buf, tmp, size, "From: %s@%s\n", sms->remote.number, from); break; } CONCAT(buf, tmp, size, "X-GSM-SMSC: %s\n", sms->smsc.number); CONCAT(buf, tmp, size, "X-GSM-Status: %s\n", status2str(sms->status)); CONCAT(buf, tmp, size, "X-GSM-Memory: %s\n", gn_memory_type2str(sms->memory_type)); aux = calloc(16, sizeof(char)); /* assuming location will never have more than 15 digits */ if (!aux) goto error; snprintf(aux, 16, "%d", sms->number); CONCAT(buf, tmp, size, "X-GSM-Location: %s\n", aux); free(aux); if (strlen(sms->user_data[0].u.text) < MAX_SUBJECT_LENGTH) { CONCAT(buf, tmp, size, "Subject: %s\n\n", sms->user_data[0].u.text); } else { aux = calloc(MAX_TEXT_SUMMARY + 1, sizeof(char)); if (!aux) goto error; snprintf(aux, MAX_TEXT_SUMMARY, "%s", sms->user_data[0].u.text); CONCAT(buf, tmp, size, "Subject: %s...\n\n", aux); free(aux); } CONCAT(buf, tmp, size, "%s\n\n", sms->user_data[0].u.text); return buf; error: free(buf); free(aux); return NULL; } gnokii-0.6.31/common/misc.c0000644000175000017500000005372411666163120013605 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janík ml. Copyright (C) 2000 Jan Derfinak Copyright (C) 2000-2011 Pawel Kot Copyright (C) 2001 Jan Kratochvil, Ladis Michl, Chris Kemp Copyright (C) 2002-2004 BORBELY Zoltan Copyright (C) 2002 Manfred Jonsson, Markus Plail Some parts of the gn_lock_device() function are derived from minicom communications package, main.c file written by Miquel van Smoorenburg. These parts are copyrighted under GNU GPL version 2. Copyright 1991-1995 Miquel van Smoorenburg. */ #include "config.h" #include #include #include #include #include #include #include #include "compat.h" #include "misc.h" #include "gnokii.h" #include "gnokii-internal.h" GNOKII_API gn_log_target gn_log_debug_mask = GN_LOG_T_NONE; GNOKII_API gn_log_target gn_log_rlpdebug_mask = GN_LOG_T_NONE; GNOKII_API gn_log_target gn_log_xdebug_mask = GN_LOG_T_NONE; GNOKII_API void (*gn_elog_handler)(const char *fmt, va_list ap) = NULL; GNOKII_API int gn_line_get(FILE *file, char *line, int count) { char *ptr; if (fgets(line, count, file)) { ptr = line + strlen(line) - 1; while ((*ptr == '\n' || *ptr == '\r') && ptr >= line) *ptr-- = '\0'; return strlen(line); } else { return 0; } } static gn_phone_model models[] = { /* model, product_name, ... */ {"2711", "?????", PM_OLD_DEFAULT }, /* Dancall */ {"2731", "?????", PM_OLD_DEFAULT }, {"11", "TFF-3", PM_OLD_DEFAULT }, {"12", "RX-2", PM_OLD_DEFAULT }, {"20", "TME-2", PM_OLD_DEFAULT }, {"22", "TME-1", PM_OLD_DEFAULT }, {"30", "TME-3", PM_OLD_DEFAULT }, {"100", "THX-9L", PM_OLD_DEFAULT }, {"450", "THF-9", PM_OLD_DEFAULT }, {"505", "NHX-8", PM_OLD_DEFAULT }, {"540", "THF-11", PM_OLD_DEFAULT }, {"550", "THF-10", PM_OLD_DEFAULT }, {"640", "THF-13", PM_OLD_DEFAULT }, {"650", "THF-12", PM_OLD_DEFAULT }, {"810", "TFE-4R", PM_OLD_DEFAULT }, {"1011", "NHE-2", PM_OLD_DEFAULT }, {"1100", "RH-18", PM_OLD_DEFAULT }, {"1100", "RH-38", PM_OLD_DEFAULT }, {"1100b", "RH-36", PM_OLD_DEFAULT }, {"1101", "RH-75", PM_OLD_DEFAULT }, /* Yet another 1100 variant, untested */ {"1110", "RH-93", PM_DEFAULT_S30 }, {"1209", "RH-105", PM_DEFAULT_S30 }, {"1220", "NKC-1", PM_OLD_DEFAULT }, {"1260", "NKW-1", PM_OLD_DEFAULT }, {"1261", "NKW-1C", PM_OLD_DEFAULT }, {"1280", "RM-647", PM_DEFAULT_S30 }, {"1610", "NHE-5", PM_OLD_DEFAULT }, {"1610", "NHE-5NX", PM_OLD_DEFAULT }, {"1611", "NHE-5", PM_OLD_DEFAULT }, {"1630", "NHE-5NA", PM_OLD_DEFAULT }, {"1630", "NHE-5NX", PM_OLD_DEFAULT }, {"1631", "NHE-5SA", PM_OLD_DEFAULT }, {"2010", "NHE-3", PM_OLD_DEFAULT }, {"2100", "NAM-2", PM_OLD_DEFAULT }, {"2110", "NHE-1", PM_OLD_DEFAULT }, {"2110i", "NHE-4", PM_OLD_DEFAULT }, {"2118", "NHE-4", PM_OLD_DEFAULT }, {"2140", "NHK-1XA", PM_OLD_DEFAULT }, {"2148", "NHK-1", PM_OLD_DEFAULT }, {"2148i", "NHK-4", PM_OLD_DEFAULT }, {"2160", "NHC-4NE/HE", PM_OLD_DEFAULT }, {"2160i", "NHC-4NE/HE", PM_OLD_DEFAULT }, {"2170", "NHP-4", PM_OLD_DEFAULT }, {"2180", "NHD-4X", PM_OLD_DEFAULT }, {"2190", "NHB-3NB", PM_OLD_DEFAULT }, {"2220", "RH-40", PM_OLD_DEFAULT }, {"2220", "RH-42", PM_OLD_DEFAULT }, {"2260", "RH-39", PM_OLD_DEFAULT }, {"2260", "RH-41", PM_OLD_DEFAULT }, {"2270", "RH-3P", PM_OLD_DEFAULT }, {"2275", "RH-3DNG", PM_OLD_DEFAULT }, {"2280", "RH-17", PM_OLD_DEFAULT }, {"2285", "RH-3", PM_OLD_DEFAULT }, {"2300", "RM-4", PM_OLD_DEFAULT }, {"2300b", "RM-5", PM_OLD_DEFAULT }, {"2330 classic", "RM-512", PM_DEFAULT_S40_3RD }, /* Series 40 5th Edition FP 1 Lite */ {"2600", "RH-59", PM_DEFAULT | PM_XGNOKIIBREAKAGE }, {"2630", "RM-298", PM_DEFAULT }, {"2650", "RH-53", PM_DEFAULT | PM_XGNOKIIBREAKAGE }, {"2700 classic", "RM-561", PM_DEFAULT_S40_3RD }, {"2730 classic", "RM-578", PM_DEFAULT_S40_3RD }, /* Series 40 5th Edition FP 1 */ {"2760", "RM-258", PM_DEFAULT_S40_3RD }, /* Series 40 5th Edition */ {"3100", "RH-19", PM_DEFAULT | PM_XGNOKIIBREAKAGE }, {"3100b", "RH-50", PM_DEFAULT }, {"3105", "RH-48", PM_OLD_DEFAULT }, {"3108", "RH-6", PM_OLD_DEFAULT }, {"3109c", "RM-274", PM_DEFAULT_S40_3RD }, /* Nokia 3109 classic */ {"3110", "NHE-8", PM_OLD_DEFAULT | PM_DATA }, {"3110", "0310" , PM_OLD_DEFAULT | PM_DATA }, /* NHE-8 */ {"3110c", "RM-237", PM_DEFAULT_S40_3RD }, /* Nokia 3110 classic */ {"3120", "RH-19", PM_DEFAULT }, {"3120b", "RH-50", PM_DEFAULT }, {"3200", "RH-30", PM_DEFAULT | PM_XGNOKIIBREAKAGE }, {"3200", "RH-30/31", PM_DEFAULT }, {"3200b", "RH-31", PM_DEFAULT }, {"3210", "NSE-8", PM_OLD_DEFAULT | PM_NETMONITOR }, {"3210", "NSE-9", PM_OLD_DEFAULT }, {"3220", "RH-37", PM_DEFAULT }, {"3285", "NSD-1A", PM_OLD_DEFAULT }, {"3300", "NEM-1", PM_OLD_DEFAULT | PM_XGNOKIIBREAKAGE }, {"3300", "NEM-2", PM_OLD_DEFAULT | PM_XGNOKIIBREAKAGE }, {"3310", "NHM-5", PM_OLD_DEFAULT | PM_NETMONITOR }, {"3310", "NHM-5NX", PM_OLD_DEFAULT }, {"3315", "NHM-5NY", PM_OLD_DEFAULT }, {"3320", "NPC-1", PM_OLD_DEFAULT }, {"3330", "NHM-6", PM_OLD_DEFAULT | PM_NETMONITOR }, {"3350", "NHM-9", PM_OLD_DEFAULT }, {"3360", "NPW-6", PM_OLD_DEFAULT }, {"3360", "NPW-1", PM_OLD_DEFAULT }, {"3361", "NPW-1", PM_OLD_DEFAULT }, {"3390", "NPB-1", PM_OLD_DEFAULT }, {"3395", "NPB-1B", PM_OLD_DEFAULT }, {"3410", "NHM-2", PM_OLD_DEFAULT | PM_NETMONITOR }, {"3500c", "RM-272", PM_DEFAULT }, {"3510", "NHM-8", PM_DEFAULT }, {"3510i", "RH-9", PM_DEFAULT }, {"3520", "RH-21", PM_DEFAULT }, {"3530", "RH-9", PM_DEFAULT }, {"3560", "RH-14", PM_DEFAULT }, {"3570", "NPD-1FW", PM_OLD_DEFAULT }, {"3585", "NPD-1AW", PM_OLD_DEFAULT }, {"3585i", "NPD-4AW", PM_OLD_DEFAULT }, {"3586i", "RH-44", PM_OLD_DEFAULT }, {"3590", "NPM-8", PM_OLD_DEFAULT }, {"3595", "NPM-10", PM_OLD_DEFAULT }, {"3600", "NHM-10", PM_OLD_DEFAULT }, {"3610", "NAM-1", PM_OLD_DEFAULT }, {"3620", "NHM-10X", PM_OLD_DEFAULT }, {"3650", "NHL-8", PM_DEFAULT | PM_NETMONITOR }, {"3660", "NHL-8X", PM_DEFAULT | PM_NETMONITOR }, {"3810", "0305" , PM_OLD_DEFAULT | PM_DATA }, /* NHE-9 */ {"3810", "NHE-9", PM_OLD_DEFAULT | PM_DATA }, {"5100", "NPM-6", PM_DEFAULT }, {"5100", "NPM-6X", PM_DEFAULT | PM_XGNOKIIBREAKAGE }, {"5100", "NMP-6", PM_DEFAULT | PM_XGNOKIIBREAKAGE }, {"5110", "NSE-1", PM_OLD_DEFAULT | PM_NETMONITOR | PM_DATA | PM_AUTHENTICATION }, {"5110", "NSE-1NX", PM_OLD_DEFAULT | PM_NETMONITOR | PM_DATA | PM_AUTHENTICATION }, {"5110i", "NSE-1NY", PM_OLD_DEFAULT | PM_NETMONITOR | PM_DATA | PM_AUTHENTICATION }, {"5110i", "NSE-2NY", PM_OLD_DEFAULT | PM_NETMONITOR | PM_DATA | PM_AUTHENTICATION }, {"5120", "NSC-1", PM_OLD_DEFAULT }, {"5125", "NSC-1", PM_OLD_DEFAULT }, {"5130", "NSK-1", PM_OLD_DEFAULT | PM_NETMONITOR | PM_DATA | PM_AUTHENTICATION }, {"5130 XpressMusic", "RM-495", PM_DEFAULT_S40_3RD }, {"5140", "NPL-5", PM_DEFAULT | PM_XGNOKIIBREAKAGE }, {"5140i", "RM-104", PM_DEFAULT }, {"5160", "NSW-1", PM_OLD_DEFAULT | PM_NETMONITOR | PM_DATA | PM_AUTHENTICATION }, {"5170", "NSD-1F", PM_OLD_DEFAULT }, {"5180", "NSD-1G", PM_OLD_DEFAULT }, {"5185", "NSD-1A", PM_OLD_DEFAULT }, {"5190", "NSB-1", PM_OLD_DEFAULT | PM_NETMONITOR | PM_DATA | PM_AUTHENTICATION }, {"5210", "NSM-5", PM_DEFAULT }, {"5300 XpressMusic", "RM-146", PM_DEFAULT_S40_3RD }, {"5310 XpressMusic", "RM-303", PM_DEFAULT_S40_3RD }, {"5510", "NPM-5", PM_OLD_DEFAULT }, {"6010", "NPM-10", PM_OLD_DEFAULT }, {"6010", "NPM-10X", PM_OLD_DEFAULT }, {"6011", "RTE-2RH", PM_OLD_DEFAULT }, {"6015i", "RH-55", PM_DEFAULT }, {"6020", "RM-30", PM_DEFAULT }, {"6021", "RM-94", PM_DEFAULT | PM_XGNOKIIBREAKAGE}, {"6030", "RM-74", PM_DEFAULT }, {"6050", "NME-1", PM_OLD_DEFAULT }, {"6070", "RM-166", PM_DEFAULT }, {"6080", "NME-2", PM_OLD_DEFAULT }, {"6081", "NME-2A", PM_OLD_DEFAULT }, {"6081", "NME-2E", PM_OLD_DEFAULT }, {"6085", "RM-260", PM_DEFAULT }, {"6090", "NME-3", PM_OLD_DEFAULT }, {"6100", "NPL-2", PM_DEFAULT | PM_XGNOKIIBREAKAGE }, {"6108", "RH-4", PM_OLD_DEFAULT }, {"6110", "NSE-3", PM_OLD_DEFAULT | PM_NETMONITOR | PM_DATA | PM_AUTHENTICATION }, {"6120", "NSC-3", PM_OLD_DEFAULT | PM_NETMONITOR | PM_DATA | PM_AUTHENTICATION }, {"6130", "NSK-3", PM_OLD_DEFAULT | PM_NETMONITOR | PM_DATA | PM_AUTHENTICATION }, {"6133", "RM-126", PM_DEFAULT_S40_3RD }, {"6136", "RM-199", PM_DEFAULT | PM_FULLPBK }, {"6138", "NSK-3", PM_OLD_DEFAULT }, {"6150", "NSM-1", PM_OLD_DEFAULT | PM_NETMONITOR | PM_DATA | PM_AUTHENTICATION }, {"616x", "NSW-3", PM_OLD_DEFAULT | PM_NETMONITOR | PM_DATA | PM_AUTHENTICATION }, {"6160", "NSW-3AX", PM_OLD_DEFAULT }, {"6161", "NSW-3ND", PM_OLD_DEFAULT }, {"6162", "NSW-3AF", PM_OLD_DEFAULT }, {"6170", "RM47_-48", PM_DEFAULT }, {"6185", "NSD-3", PM_OLD_DEFAULT | PM_NETMONITOR | PM_DATA | PM_AUTHENTICATION }, {"6185i", "NSD-3AW", PM_OLD_DEFAULT }, {"6188", "NSD-3AX", PM_OLD_DEFAULT }, {"6190", "NSB-3", PM_OLD_DEFAULT | PM_NETMONITOR | PM_DATA | PM_AUTHENTICATION }, {"6200", "NPL-3", PM_DEFAULT | PM_XGNOKIIBREAKAGE }, {"6210", "NPE-3", PM_DEFAULT | PM_NETMONITOR }, {"6220", "RH-20", PM_DEFAULT | PM_XGNOKIIBREAKAGE }, {"6225", "RH-27", PM_OLD_DEFAULT }, {"6230", "RH-12_28_-", PM_DEFAULT }, {"6230", "RH12_28_-", PM_DEFAULT }, {"6230i", "RM72_73_-", PM_DEFAULT }, {"6233", "RM123_145_-", PM_DEFAULT }, {"6250", "NHM-3", PM_DEFAULT | PM_NETMONITOR }, {"6280", "RH-78", PM_DEFAULT }, {"6300", "RM-217", PM_DEFAULT_S40_3RD | PM_FULLPBK }, {"6303", "RM-443", PM_DEFAULT_S40_3RD | PM_FULLPBK }, /* Nokia 6303 classic */ {"6310", "NPE-4", PM_DEFAULT }, {"6310i", "NPL-1", PM_DEFAULT }, {"6340", "NPM-2", PM_OLD_DEFAULT }, {"6340i", "RH-13", PM_OLD_DEFAULT }, {"6360", "NPW-2", PM_DEFAULT }, {"6370", "NHP-2FX", PM_OLD_DEFAULT }, {"6385", "NHP-2AX", PM_OLD_DEFAULT }, {"6500", "NHM-7", PM_DEFAULT }, {"6500c", "RM-265", PM_DEFAULT_S40_3RD | PM_FULLPBK }, /* Series 40 5th Edition */ {"6510", "NPM-9", PM_DEFAULT }, {"6560", "RH-25", PM_OLD_DEFAULT }, {"6585", "RH-34", PM_OLD_DEFAULT }, {"6590", "NSM-9", PM_OLD_DEFAULT }, {"6590i", "NSM-9", PM_OLD_DEFAULT }, {"6600", "NHL-10", PM_DEFAULT | PM_NETMONITOR }, {"6610", "NHL-4U", PM_DEFAULT | PM_XGNOKIIBREAKAGE }, {"6610i", "RM-37", PM_DEFAULT | PM_XGNOKIIBREAKAGE }, {"6650", "NHM-1", PM_DEFAULT | PM_XGNOKIIBREAKAGE }, {"6680", "RM-36", PM_DEFAULT }, {"6700 classic", "RM-470", PM_DEFAULT_S40_3RD }, /* Series 40 6th Edition */ {"6800", "NHL-6", PM_DEFAULT | PM_XGNOKIIBREAKAGE }, {"6800", "NSB-9", PM_DEFAULT | PM_XGNOKIIBREAKAGE }, {"6810", "RM-2", PM_DEFAULT | PM_XGNOKIIBREAKAGE }, {"6820", "NHL-9", PM_DEFAULT | PM_XGNOKIIBREAKAGE }, {"6820b", "RH-26", PM_DEFAULT | PM_XGNOKIIBREAKAGE }, {"6822", "RM-69", PM_DEFAULT }, {"7110", "NSE-5", PM_DEFAULT | PM_NETMONITOR }, {"7160", "NSW-5", PM_OLD_DEFAULT }, {"7190", "NSB-5", PM_DEFAULT | PM_NETMONITOR }, {"7200", "RH-23", PM_DEFAULT | PM_XGNOKIIBREAKAGE }, {"7210", "NHL-4", PM_DEFAULT | PM_XGNOKIIBREAKAGE }, {"7250", "NHL-4J", PM_DEFAULT | PM_XGNOKIIBREAKAGE }, {"7250i", "NHL-4JX", PM_DEFAULT | PM_XGNOKIIBREAKAGE }, {"7260", "RM-17", PM_DEFAULT | PM_XGNOKIIBREAKAGE }, {"7270", "RM-8", PM_DEFAULT | PM_XGNOKIIBREAKAGE }, {"7280", "RM-14", PM_DEFAULT | PM_XGNOKIIBREAKAGE }, {"7373", "RM-209", PM_DEFAULT }, {"7600", "NMM-3", PM_DEFAULT | PM_XGNOKIIBREAKAGE }, {"7650", "NHL-2NA", PM_DEFAULT }, {"8110", "0423" , PM_OLD_DEFAULT | PM_DATA }, /* NHE-6BX */ {"8110", "2501", PM_OLD_DEFAULT | PM_DATA }, {"8110", "NHE-6", PM_OLD_DEFAULT | PM_DATA }, {"8110", "NHE-6BX", PM_OLD_DEFAULT | PM_DATA }, {"8110i", "0423", PM_OLD_DEFAULT | PM_DATA }, /* Guess for NHE-6 */ {"8110i", "NHE-6", PM_OLD_DEFAULT | PM_DATA }, {"8110i", "NHE-6BM", PM_OLD_DEFAULT | PM_DATA }, {"8146", "NHK-6", PM_OLD_DEFAULT | PM_DATA }, {"8148", "NHK-6", PM_OLD_DEFAULT | PM_DATA }, {"8148i", "NHK-6V", PM_OLD_DEFAULT | PM_DATA }, {"8210", "NSM-3", PM_OLD_DEFAULT | PM_NETMONITOR | PM_DATA }, {"8250", "NSM-3D", PM_OLD_DEFAULT | PM_NETMONITOR | PM_DATA }, {"8260", "NSW-4", PM_OLD_DEFAULT }, {"8265", "NPW-3", PM_OLD_DEFAULT }, {"8270", "NSD-5FX", PM_OLD_DEFAULT }, {"8280", "RH-10", PM_OLD_DEFAULT }, {"8290", "NSB-7", PM_OLD_DEFAULT | PM_NETMONITOR | PM_DATA }, {"8310", "NHM-7", PM_DEFAULT }, {"8390", "NSB-8", PM_OLD_DEFAULT }, {"8810", "NSE-6", PM_OLD_DEFAULT | PM_DATA }, {"8850", "NSM-2", PM_OLD_DEFAULT | PM_NETMONITOR | PM_DATA }, {"8855", "NSM-4", PM_OLD_DEFAULT }, {"8860", "NSW-6", PM_OLD_DEFAULT }, {"8890", "NSB-6", PM_OLD_DEFAULT }, {"8910", "NHM-4NX", PM_OLD_DEFAULT }, {"8910i", "NHM-4NX", PM_OLD_DEFAULT }, {"9000", "RAE-1", PM_OLD_DEFAULT }, {"9000i", "RAE-4", PM_OLD_DEFAULT }, {"9110", "RAE-2", PM_OLD_DEFAULT }, {"9110i", "RAE-2i", PM_OLD_DEFAULT }, {"9210", "RAE-2", PM_OLD_DEFAULT }, {"9210c", "RAE-3", PM_OLD_DEFAULT }, {"9210i", "RAE-5N", PM_OLD_DEFAULT }, {"9290", "RAE-3N", PM_OLD_DEFAULT }, {"N70", "RM-84", PM_DEFAULT }, {"N73", "RM-133", PM_DEFAULT }, {"RPM-1", "RPM-1", PM_OLD_DEFAULT | PM_DATA }, {"C1-01", "RM-607", PM_DEFAULT_S40_3RD }, /* Series 40 6th Edition Lite */ {"C2-03", "RM-70", PM_DEFAULT_S40_3RD }, {"Card Phone 1.0", "RPE-1", PM_OLD_DEFAULT | PM_DATA }, {"Card Phone 2.0", "RPM-1", PM_OLD_DEFAULT | PM_DATA }, {"C110 Wireless LAN Card", "DTN-10", PM_OLD_DEFAULT }, {"C111 Wireless LAN Card", "DTN-11", PM_OLD_DEFAULT }, {"D211", "DTE-1", PM_OLD_DEFAULT }, {"N-Gage", "NEM-4", PM_OLD_DEFAULT }, {"RinGo", "NHX-7", PM_OLD_DEFAULT }, {"sx1", "SX1", PM_DEFAULT }, {"SIM/USIM", "APDU", 0 }, {NULL, NULL, 0 } /* keep last one as NULL */ }; #define MODELS_NUM_ENTRIES (sizeof(models)/sizeof(models[0])) /* this should be in libfunctions - will move it there with next version of libgnokii */ GNOKII_API const char *gn_lib_get_supported_phone_model( const int num ) { if (num < 0 || num >= MODELS_NUM_ENTRIES) return NULL; return models[num].model; } GNOKII_API gn_phone_model *gn_phone_model_get(const char *product_name) { int i = 0; while (models[i].product_name != NULL) { if (strcmp(product_name, models[i].product_name) == 0) { dprintf("Found model \"%s\"\n", product_name); return (&models[i]); } i++; } return (&models[MODELS_NUM_ENTRIES-1]); /* NULL entry */ } GNOKII_API const char *gn_model_get(const char *product_name) { return gn_cfg_get_phone_model(gn_cfg_info, product_name)->model; } static void log_printf(gn_log_target mask, const char *fmt, va_list ap) { if (mask & GN_LOG_T_STDERR) { vfprintf(stderr, fmt, ap); fflush(stderr); } } GNOKII_API void gn_log_debug(const char *fmt, ...) { #ifdef DEBUG va_list ap; va_start(ap, fmt); log_printf(gn_log_debug_mask, fmt, ap); va_end(ap); #endif } GNOKII_API void gn_log_rlpdebug(const char *fmt, ...) { #ifdef RLP_DEBUG va_list ap; va_start(ap, fmt); log_printf(gn_log_rlpdebug_mask, fmt, ap); va_end(ap); #endif } GNOKII_API void gn_log_xdebug(const char *fmt, ...) { #ifdef XDEBUG va_list ap; va_start(ap, fmt); log_printf(gn_log_xdebug_mask, fmt, ap); va_end(ap); #endif } GNOKII_API void gn_elog_write(const char *fmt, ...) { va_list ap, ap1; va_start(ap, fmt); va_copy(ap1, ap); log_printf(gn_log_debug_mask, fmt, ap1); va_end(ap1); if (gn_elog_handler) { va_copy(ap1, ap); gn_elog_handler(fmt, ap1); va_end(ap1); } else { #ifndef DEBUG if (!(gn_log_debug_mask & GN_LOG_T_STDERR)) { va_copy(ap1, ap); log_printf(GN_LOG_T_STDERR, fmt, ap1); va_end(ap1); } #endif } va_end(ap); } #define BUFFER_MAX_LENGTH 128 #if defined (__svr4__) # define lock_path "/var/run/LCK.." #else # define lock_path "/var/lock/LCK.." #endif /* Lock the device. Return allocated string with a lock name */ GNOKII_API char *gn_device_lock(const char* port) { #ifndef WIN32 char *lock_file = NULL; char buffer[BUFFER_MAX_LENGTH]; const char *aux = strrchr(port, '/'); int fd, len; if (!port) { fprintf(stderr, _("Cannot lock NULL device. Set port config parameter correctly.\n")); return NULL; } /* Remove leading '/' */ if (aux) aux++; else aux = port; len = strlen(aux) + strlen(lock_path); memset(buffer, 0, sizeof(buffer)); lock_file = calloc(len + 1, 1); if (!lock_file) { fprintf(stderr, _("Out of memory error while locking device.\n")); return NULL; } /* * I think we don't need to use strncpy, as we should have enough * buffer due to strlen results, but it's safer to do so... */ strncpy(lock_file, lock_path, len); strncat(lock_file, aux, len - strlen(lock_file)); /* Check for the stale lockfile. * The code taken from minicom by Miquel van Smoorenburg */ if ((fd = open(lock_file, O_RDONLY)) >= 0) { char buf[BUFFER_MAX_LENGTH]; int pid, n = 0; n = read(fd, buf, sizeof(buf) - 1); close(fd); if (n > 0) { pid = -1; if (n == 4) /* Kermit-style lockfile. */ pid = *(int *)buf; else { /* Ascii lockfile. */ buf[n] = 0; sscanf(buf, "%d", &pid); } if (pid > 0 && kill((pid_t)pid, 0) < 0 && errno == ESRCH) { fprintf(stderr, _("Lockfile %s is stale. Overriding it...\n"), lock_file); sleep(1); if (unlink(lock_file) == -1) { fprintf(stderr, _("Overriding file %s failed, please check the permissions.\n"), lock_file); fprintf(stderr, _("Cannot lock device.\n")); goto failed; } } else { fprintf(stderr, _("Device already locked with %s.\n"), lock_file); goto failed; } } /* This must not happen. Because we could open the file */ /* no wrong permissions are set. Only reason could be */ /* flock/lockf or an empty lockfile due to a broken binary */ /* which is more likely (like gnokii 0.4.0pre11 ;-). */ if (n == 0) { fprintf(stderr, _("Unable to read lockfile %s.\n"), lock_file); fprintf(stderr, _("Please check for reason and remove the lockfile by hand.\n")); fprintf(stderr, _("Cannot lock device.\n")); goto failed; } } /* Try to create a new file, with 0644 mode */ fd = open(lock_file, O_CREAT | O_EXCL | O_WRONLY, 0644); if (fd == -1) { if (errno == EEXIST) fprintf(stderr, _("Device seems to be locked by unknown process.\n")); else if (errno == EACCES) fprintf(stderr, _("Please check permission on lock directory.\n")); else if (errno == ENOENT) fprintf(stderr, _("Cannot create lockfile %s. Please check for existence of the path.\n"), lock_file); goto failed; } snprintf(buffer, sizeof(buffer), "%10ld gnokii\n", (long)getpid()); if (write(fd, buffer, strlen(buffer)) < 0) { fprintf(stderr, _("Failed to write to the lockfile %s.\n"), lock_file); goto failed; } close(fd); return lock_file; failed: if (fd > -1) close(fd); free(lock_file); return NULL; #else return (char *)1; #endif /* WIN32 */ } /* Removes lock and frees memory */ GNOKII_API int gn_device_unlock(char *lock_file) { #ifndef WIN32 int err; if (lock_file) { err = unlink(lock_file); free(lock_file); if (err) { fprintf(stderr, _("Cannot unlock device: %s\n"), strerror(errno)); return false; } } return true; #else return true; #endif /* WIN32 */ } /* * Splits string into NULL-terminated string array */ char **gnokii_strsplit(const char *string, const char *delimiter, int tokens) { const char *left = string; char *tmp, *str; int count = 0; char **strings; if (!string || !delimiter || !tokens) return NULL; /* * Last two elements are: * - leftover from the input line * - NULL (required by gnokii_strfreev()) */ strings = calloc(tokens + 2, sizeof(char *)); while ((tmp = strstr(left, delimiter)) != NULL && (count < tokens)) { str = malloc((tmp - left) + 1); memset(str, 0, (tmp - left) + 1); memcpy(str, left, tmp - left); strings[count] = str; left = tmp + strlen(delimiter); count++; } strings[count] = strdup(left); /* * Make NULL termination explicit even if it is done via calloc(). * gnokii_strfreev() requires it to be NULL-terminated. */ strings[count + 1] = NULL; for (count = 0; count < tokens; count++) { dprintf("strings[%d] = %s\n", count, strings[count]); } return strings; } /* * frees NULL-terminated array of strings */ void gnokii_strfreev(char **str_array) { char **tmp = str_array; if (!str_array) return; while (*tmp) { free(*tmp); tmp++; } free(str_array); } /** * gnokii_strcmpsep: * @s1: a string, NUL terminated, may NOT contain @sep * @s2: a string, NUL terminated, may contain @sep * @sep: comparison stops if this char is found in @s2 * * Returns: < 0 if @s1 < @s2 * 0 if @s1 == @s2 * > 0 if @s1 > @s2 * * Compares two strings up to a NUL terminator or a separator char. * Leading and trailing white space in @s2 is ignored. */ int gnokii_strcmpsep(const char *s1, const char *s2, char sep) { while (isspace(*s2)) s2++; while (*s1 && *s1 == *s2) { s1++; s2++; } while (isspace(*s2)) s2++; if (!*s1 && *s2 == sep) return 0; return *s1 - *s2; } /* * check if the timestamp in dt has valid date and time */ GNOKII_API int gn_timestamp_isvalid(const gn_timestamp dt) { #define BETWEEN(a, x, y) ((a >= x) && (a <= y)) int daynum; /* assume that year is OK */ switch (dt.month) { case 2: if (((dt.year % 4) == 0) && (((dt.year % 100) != 0) || ((dt.year % 1000) == 0))) daynum = 29; else daynum = 28; break; case 1: case 3: case 5: case 7: case 8: case 10: case 12: daynum = 31; break; default: daynum = 30; break; } return (BETWEEN(dt.month, 1, 12) && BETWEEN(dt.day, 1, daynum) && BETWEEN(dt.hour, 0, 24) && BETWEEN(dt.minute, 0, 59) && BETWEEN(dt.second, 0, 59)); } gnokii-0.6.31/common/device.c0000644000175000017500000001573711666163120014113 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janík ml. Copyright (C) 2001 Chris Kemp Copyrught (C) 2001-2004 Pawel Kot Copyright (C) 2002-2003 BORBELY Zoltan Copyright (C) 2002 Pavel Machek, Marcin Wiacek */ #include "config.h" #include "compat.h" #include "misc.h" #include "gnokii.h" #include "device.h" #include "devices/irda.h" #include "devices/unixbluetooth.h" #include "devices/tcp.h" #include "devices/serial.h" #include "devices/tekram.h" #include "devices/dku2libusb.h" #include "devices/socketphonet.h" GNOKII_API int device_getfd(struct gn_statemachine *state) { return state->device.fd; } int device_open(const char *file, int with_odd_parity, int with_async, int with_hw_handshake, gn_connection_type device_type, struct gn_statemachine *state) { state->device.type = device_type; state->device.device_instance = NULL; dprintf("Serial device: opening device %s\n", (device_type == GN_CT_DKU2LIBUSB) ? "USB" : file); switch (state->device.type) { case GN_CT_DKU2: case GN_CT_Serial: case GN_CT_Infrared: state->device.fd = serial_opendevice(file, with_odd_parity, with_async, with_hw_handshake, state); break; case GN_CT_Irda: state->device.fd = irda_open(state); break; case GN_CT_Bluetooth: state->device.fd = bluetooth_open(state->config.port_device, state->config.rfcomm_cn, state); break; case GN_CT_Tekram: state->device.fd = tekram_open(file, state); break; case GN_CT_TCP: state->device.fd = tcp_opendevice(file, with_async, state); break; case GN_CT_DKU2LIBUSB: state->device.fd = fbusdku2usb_open(state); break; case GN_CT_SOCKETPHONET: state->device.fd = socketphonet_open(file, with_async, state); break; default: state->device.fd = -1; break; } return (state->device.fd >= 0); } void device_close(struct gn_statemachine *state) { dprintf("Serial device: closing device\n"); switch (state->device.type) { case GN_CT_DKU2: case GN_CT_Serial: case GN_CT_Infrared: serial_close(state->device.fd, state); break; case GN_CT_Irda: irda_close(state->device.fd, state); break; case GN_CT_Bluetooth: bluetooth_close(state->device.fd, state); break; case GN_CT_Tekram: tekram_close(state->device.fd, state); break; case GN_CT_TCP: tcp_close(state->device.fd, state); break; case GN_CT_DKU2LIBUSB: fbusdku2usb_close(state); break; case GN_CT_SOCKETPHONET: socketphonet_close(state); break; default: break; } free(state->device.device_instance); state->device.device_instance = NULL; } void device_reset(struct gn_statemachine *state) { return; } void device_setdtrrts(int dtr, int rts, struct gn_statemachine *state) { switch (state->device.type) { case GN_CT_DKU2: case GN_CT_Serial: case GN_CT_Infrared: dprintf("Serial device: setting RTS to %s and DTR to %s\n", rts ? "high" : "low", dtr ? "high" : "low"); serial_setdtrrts(state->device.fd, dtr, rts, state); break; case GN_CT_Irda: case GN_CT_Bluetooth: case GN_CT_Tekram: case GN_CT_TCP: case GN_CT_DKU2LIBUSB: case GN_CT_SOCKETPHONET: default: break; } } void device_changespeed(int speed, struct gn_statemachine *state) { switch (state->device.type) { case GN_CT_DKU2: case GN_CT_Serial: case GN_CT_Infrared: dprintf("Serial device: setting speed to %d\n", speed); serial_changespeed(state->device.fd, speed, state); break; case GN_CT_Tekram: dprintf("Serial device: setting speed to %d\n", speed); tekram_changespeed(state->device.fd, speed, state); break; case GN_CT_Irda: case GN_CT_Bluetooth: case GN_CT_TCP: case GN_CT_DKU2LIBUSB: case GN_CT_SOCKETPHONET: default: break; } } size_t device_read(__ptr_t buf, size_t nbytes, struct gn_statemachine *state) { switch (state->device.type) { case GN_CT_DKU2: case GN_CT_Serial: case GN_CT_Infrared: return serial_read(state->device.fd, buf, nbytes, state); case GN_CT_Irda: return irda_read(state->device.fd, buf, nbytes, state); case GN_CT_Bluetooth: return bluetooth_read(state->device.fd, buf, nbytes, state); case GN_CT_Tekram: return tekram_read(state->device.fd, buf, nbytes, state); case GN_CT_TCP: return tcp_read(state->device.fd, buf, nbytes, state); case GN_CT_DKU2LIBUSB: return fbusdku2usb_read(buf, nbytes, state); case GN_CT_SOCKETPHONET: return socketphonet_read(state->device.fd, buf, nbytes, state); default: break; } return 0; } size_t device_write(const __ptr_t buf, size_t n, struct gn_statemachine *state) { switch (state->device.type) { case GN_CT_DKU2: case GN_CT_Serial: case GN_CT_Infrared: return serial_write(state->device.fd, buf, n, state); case GN_CT_Irda: return irda_write(state->device.fd, buf, n, state); case GN_CT_Bluetooth: return bluetooth_write(state->device.fd, buf, n, state); case GN_CT_Tekram: return tekram_write(state->device.fd, buf, n, state); case GN_CT_TCP: return tcp_write(state->device.fd, buf, n, state); case GN_CT_DKU2LIBUSB: return fbusdku2usb_write(buf, n, state); case GN_CT_SOCKETPHONET: return socketphonet_write(state->device.fd, buf, n, state); default: break; } return 0; } int device_select(struct timeval *timeout, struct gn_statemachine *state) { switch (state->device.type) { case GN_CT_DKU2: case GN_CT_Serial: case GN_CT_Infrared: return serial_select(state->device.fd, timeout, state); case GN_CT_Irda: return irda_select(state->device.fd, timeout, state); case GN_CT_Bluetooth: return bluetooth_select(state->device.fd, timeout, state); case GN_CT_Tekram: return tekram_select(state->device.fd, timeout, state); case GN_CT_TCP: return tcp_select(state->device.fd, timeout, state); case GN_CT_DKU2LIBUSB: return fbusdku2usb_select(timeout, state); case GN_CT_SOCKETPHONET: return socketphonet_select(state->device.fd, timeout, state); default: break; } return -1; } gn_error device_nreceived(int *n, struct gn_statemachine *state) { *n = -1; switch (state->device.type) { case GN_CT_DKU2: case GN_CT_Serial: case GN_CT_Infrared: return serial_nreceived(state->device.fd, n, state); default: return GN_ERR_NOTSUPPORTED; } } gn_error device_flush(struct gn_statemachine *state) { switch (state->device.type) { case GN_CT_DKU2: case GN_CT_Serial: case GN_CT_Infrared: return serial_flush(state->device.fd, state); default: return GN_ERR_NOTSUPPORTED; } } gnokii-0.6.31/common/compat.c0000644000175000017500000001222311666163120014122 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2002 BORBELY Zoltan, Markus Plail Copyright (C) 2002-2009 Pawel Kot Various compatibility functions. */ #include "config.h" #include "compat.h" #ifdef WIN32 # include # include # include # define ftime _ftime # define timeb _timeb int setenv(const char *name, const char *value, int overwrite) { return (int)SetEnvironmentVariable(name, value); } int unsetenv(const char *name) { SetEnvironmentVariable(name, NULL); return 0; } #endif #ifndef HAVE_SETENV # include /* Implemented according to http://www.greenend.org.uk/rjk/2008/putenv.html and Linux manpage */ int setenv(const char *envname, const char *envvalue, int overwrite) { char *str; if (!overwrite && getenv(envname)) return 0; str = malloc(strlen(envname) + 1 + strlen(envvalue) + 1); if (str == NULL) return 1; sprintf(str, "%s=%s", envname, envvalue); if (putenv(str) != 0) { free(str); return 1; } return 0; } int unsetenv(const char *name) { return setenv(name, "", 1); } #endif #ifdef HAVE_SYS_TIME_H # include #endif #ifndef HAVE_GETTIMEOFDAY int gettimeofday(struct timeval *tv, void *tz) { struct timeb t; ftime(&t); if (tv) { tv->tv_sec = t.time; tv->tv_usec = 1000 * t.millitm; } return 0; } #endif #ifndef HAVE_STRSEP /* * strsep() implementation for systems that don't have it. * * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. * * 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 University 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 REGENTS 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 REGENTS 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 /* #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)strsep.c 8.1 (Berkeley) 6/4/93"; #endif */ /* LIBC_SCCS and not lint */ /* * Get next token from string *stringp, where tokens are possibly-empty * strings separated by characters from delim. * * Writes NULs into the string at *stringp to end tokens. * delim need not remain constant from call to call. * On return, *stringp points past the last NUL written (if there might * be further tokens), or is NULL (if there are definitely no more tokens). * * If *stringp is NULL, strsep returns NULL. */ char *strsep(char **stringp, const char *delim) { register char *s; register const char *spanp; register int c, sc; char *tok; if ((s = *stringp) == NULL) return (NULL); for (tok = s;;) { c = *s++; spanp = delim; do { if ((sc = *spanp++) == c) { if (c == 0) s = NULL; else s[-1] = 0; *stringp = s; return (tok); } } while (sc != 0); } } #endif #ifndef HAVE_TIMEGM #include #include time_t timegm(struct tm *tm) { time_t ret; char *tz; tz = getenv("TZ"); setenv("TZ", "", 1); tzset(); ret = mktime(tm); if (tz) setenv("TZ", tz, 1); else unsetenv("TZ"); tzset(); return ret; } #endif #ifndef HAVE_STRNDUP char *strndup(const char *src, size_t n) { char *dst = malloc(n + 1); if (!dst) return NULL; dst[n] = '\0'; return (char *)memcpy(dst, src, n); } #endif gnokii-0.6.31/common/vcal.c0000644000175000017500000006011611666163120013570 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2004 Martin Goldhahn Copyright (C) 2004 Pawel Kot, BORBELY Zoltan */ #include "config.h" #include #include "compat.h" #include "misc.h" #include "gnokii.h" #include "gsm-filetypes.h" /* We have to do this here since libical defines its own VERSION macro. * Define it unconditionally to have nicer code below. */ static const char gnokii_version[] = VERSION; #ifdef HAVE_LIBICAL /* needs gnokii-internal.h for string_base64() and utf8_encode() */ # include "gnokii-internal.h" # include /* mother's little helpers */ static int iterate_cal(icalcomponent *parent, int depth, int *count, icalcomponent **result, icalcomponent_kind kind); static const char *comp_get_category(icalcomponent *comp); /* This is a wrapper for fgets. icalparser_parse() requires a function * argument with different signature than fgets(). */ static char *ical_fgets(char *s, size_t size, void *d) { return fgets(s, size, (FILE *)d); } #endif /* HAVE_LIBICAL */ /* This string is used so often that we keep it as long as the program is * running. Due to VERSION being defined in both libical and gnokii we need * to use a static string instead of a pre-processor macro. */ static char vcal_prodid[64] = {0}; static inline const char *get_prodid() { if (!*vcal_prodid) { snprintf(vcal_prodid, sizeof(vcal_prodid), "//Gnokii.org//NONSGML v%s", gnokii_version); } return vcal_prodid; } typedef int (*print_func) (void *data, const char *fmt, ...); typedef struct { char *str; char *end; unsigned int len; } ical_string; static void ical_append_printf(ical_string *str, const char *fmt, ...) { char buf[1024]; va_list ap; int len; va_start(ap, fmt); vsnprintf(buf, sizeof(buf), fmt, ap); va_end(ap); if (str->str == NULL) { str->str = strdup (buf); str->len = strlen (buf) + 1; return; } len = strlen (buf); str->str = realloc(str->str, len + str->len); memcpy (str->str + str->len - 1, buf, len); str->len = str->len + len; str->end = str->str + str->len; /* NULL-terminate the string now */ *(str->end - 1) = '\0'; } /* ICALENDAR Reading functions */ GNOKII_API char *gn_calnote2icalstr(gn_calnote *calnote) { ical_string str; #ifdef HAVE_LIBICAL icalcomponent *pIcal = NULL, *vevent; struct icaltimetype stime, etime; char compuid[64]; memset(&str, 0, sizeof (str)); /* In at least some Nokia phones it is possible to skip the year of birth, in this case year == 0xffff, so we set it to the arbitrary value of 1800 */ stime = icaltime_null_time(); stime.year = (calnote->time.year == 0xffff ? 1800 : calnote->time.year); stime.month = calnote->time.month; stime.day = calnote->time.day; stime.hour = calnote->time.hour; stime.minute = calnote->time.minute; stime.second = calnote->time.second; stime.is_daylight = 1; snprintf(compuid, sizeof(compuid), "guid.gnokii.org_%d_%d", calnote->location, rand()); vevent = icalcomponent_vanew(ICAL_VEVENT_COMPONENT, icalproperty_new_uid(compuid), icalproperty_new_categories("GNOKII"), 0); if (!vevent) { dprintf("ERROR in icalcomponent_vanew() creating VEVENT\n"); return NULL; } if (calnote->end_time.year) { etime = icaltime_null_time(); etime.year = (calnote->end_time.year == 0xffff ? 1800 : calnote->end_time.year); etime.month = calnote->end_time.month; etime.day = calnote->end_time.day; etime.hour = calnote->end_time.hour; etime.minute = calnote->end_time.minute; etime.second = calnote->end_time.second; etime.is_daylight = 1; icalcomponent_add_property(vevent, icalproperty_new_dtend(etime)); } /* TODO: should the strings be configurable? */ switch(calnote->type) { case GN_CALNOTE_MEMO: icalcomponent_add_property(vevent, icalproperty_new_categories("MISCELLANEOUS")); icalcomponent_add_property(vevent, icalproperty_new_summary(calnote->text)); break; case GN_CALNOTE_REMINDER: icalcomponent_add_property(vevent, icalproperty_new_categories("REMINDER")); icalcomponent_add_property(vevent, icalproperty_new_summary(calnote->text)); break; case GN_CALNOTE_CALL: icalcomponent_add_property(vevent, icalproperty_new_categories("PHONE CALL")); icalcomponent_add_property(vevent, icalproperty_new_summary(calnote->phone_number)); icalcomponent_add_property(vevent, icalproperty_new_description(calnote->text)); break; case GN_CALNOTE_MEETING: icalcomponent_add_property(vevent, icalproperty_new_categories("MEETING")); icalcomponent_add_property(vevent, icalproperty_new_summary(calnote->text)); if (calnote->mlocation[0]) icalcomponent_add_property(vevent, icalproperty_new_location(calnote->mlocation)); break; case GN_CALNOTE_BIRTHDAY: icalcomponent_add_property(vevent, icalproperty_new_categories("ANNIVERSARY")); icalcomponent_add_property(vevent, icalproperty_new_summary(calnote->text)); stime.is_date = 1; calnote->recurrence = GN_CALNOTE_YEARLY; break; default: icalcomponent_add_property(vevent, icalproperty_new_categories("UNKNOWN")); icalcomponent_add_property(vevent, icalproperty_new_summary(calnote->text)); break; } icalcomponent_add_property(vevent, icalproperty_new_dtstart(stime)); if (calnote->recurrence) { char rrule[64]; char *freq; int interval = 1; switch (calnote->recurrence) { case GN_CALNOTE_NEVER: goto norecurrence; case GN_CALNOTE_DAILY: freq = "DAILY"; break; case GN_CALNOTE_WEEKLY: freq = "WEEKLY"; break; case GN_CALNOTE_2WEEKLY: freq = "WEEKLY"; interval = 2; break; case GN_CALNOTE_MONTHLY: freq = "MONTHLY"; break; case GN_CALNOTE_YEARLY: freq = "YEARLY"; break; default: freq = "HOURLY"; interval = calnote->recurrence; break; } if (calnote->type == GN_CALNOTE_BIRTHDAY) snprintf(rrule, sizeof(rrule), "FREQ=YEARLY;INTERVAL=1;BYMONTH=%d", stime.month); else if (calnote->occurrences == 0) snprintf(rrule, sizeof(rrule), "FREQ=%s;INTERVAL=%d", freq, interval); else snprintf(rrule, sizeof(rrule), "FREQ=%s;COUNT=%d;INTERVAL=%d", freq, calnote->occurrences, interval); icalcomponent_add_property(vevent, icalproperty_new_rrule(icalrecurrencetype_from_string(rrule))); } norecurrence: if (calnote->alarm.enabled) { icalcomponent *valarm; struct icaltriggertype trig; trig.time.year = (calnote->alarm.timestamp.year == 0xffff ? 1800 : calnote->alarm.timestamp.year); trig.time.month = calnote->alarm.timestamp.month; trig.time.day = calnote->alarm.timestamp.day; trig.time.hour = calnote->alarm.timestamp.hour; trig.time.minute = calnote->alarm.timestamp.minute; trig.time.second = calnote->alarm.timestamp.second; trig.time.is_daylight = 1; valarm = icalcomponent_new_valarm(); icalcomponent_add_property(valarm, icalproperty_new_trigger(trig)); /* With ICAL_ACTION_DISPLAY a DESCRIPTION property is mandatory */ if (calnote->alarm.tone) { icalcomponent_add_property(valarm, icalproperty_new_action(ICAL_ACTION_AUDIO)); } else { icalcomponent_add_property(valarm, icalproperty_new_action(ICAL_ACTION_DISPLAY)); icalcomponent_add_property(valarm, icalproperty_new_description(calnote->text)); } icalcomponent_add_component(vevent, valarm); } pIcal = icalcomponent_vanew(ICAL_VCALENDAR_COMPONENT, icalproperty_new_version("2.0"), icalproperty_new_prodid(get_prodid()), vevent, 0); if (pIcal) { char *icalstrbuf = NULL; const char *icalstr = icalcomponent_as_ical_string(pIcal); /* conversion to UTF-8 */ if (string_base64(icalstr)) { int icalstrlen = strlen(icalstr); icalstrbuf = malloc(icalstrlen * 2 + 1); utf8_encode(icalstrbuf, icalstrlen * 2, icalstr, icalstrlen); icalstr = icalstrbuf; } ical_append_printf(&str, "%s\n", icalstr); dprintf("%s\n", icalstr); free(icalstrbuf); icalcomponent_free(pIcal); pIcal = NULL; } else { dprintf("ERROR in icalcomponent_vanew() creating VCALENDAR\n"); } return str.str; #else memset(&str, 0, sizeof (str)); ical_append_printf(&str, "BEGIN:VCALENDAR\r\n"); ical_append_printf(&str, "VERSION:1.0\r\n"); ical_append_printf(&str, "BEGIN:VEVENT\r\n"); ical_append_printf(&str, "CATEGORIES:"); switch (calnote->type) { case GN_CALNOTE_MEMO: ical_append_printf(&str, "MISCELLANEOUS\r\n"); break; case GN_CALNOTE_REMINDER: ical_append_printf(&str, "REMINDER\r\n"); break; case GN_CALNOTE_CALL: ical_append_printf(&str, "PHONE CALL\r\n"); ical_append_printf(&str, "SUMMARY:%s\r\n", calnote->phone_number); ical_append_printf(&str, "DESCRIPTION:%s\r\n", calnote->text); break; case GN_CALNOTE_MEETING: ical_append_printf(&str, "MEETING\r\n"); if (calnote->mlocation[0]) ical_append_printf(&str, "LOCATION:%s\r\n", calnote->mlocation); break; case GN_CALNOTE_BIRTHDAY: ical_append_printf(&str, "SPECIAL OCCASION\r\n"); break; default: ical_append_printf(&str, "UNKNOWN\r\n"); break; } if (calnote->type != GN_CALNOTE_CALL) ical_append_printf(&str, "SUMMARY:%s\r\n", calnote->text); ical_append_printf(&str, "DTSTART:%04d%02d%02dT%02d%02d%02d\r\n", calnote->time.year, calnote->time.month, calnote->time.day, calnote->time.hour, calnote->time.minute, calnote->time.second); if (calnote->end_time.year) { ical_append_printf(&str, "DTEND:%04d%02d%02dT%02d%02d%02d\r\n", calnote->end_time.year, calnote->end_time.month, calnote->end_time.day, calnote->end_time.hour, calnote->end_time.minute, calnote->end_time.second); } if (calnote->alarm.enabled) { ical_append_printf(&str, "%sALARM:%04d%02d%02dT%02d%02d%02d\r\n", (calnote->alarm.tone ? "A" : "D"), calnote->alarm.timestamp.year, calnote->alarm.timestamp.month, calnote->alarm.timestamp.day, calnote->alarm.timestamp.hour, calnote->alarm.timestamp.minute, calnote->alarm.timestamp.second); } switch (calnote->recurrence) { case GN_CALNOTE_NEVER: break; case GN_CALNOTE_DAILY: calnote->occurrences ? ical_append_printf(&str, "RRULE:FREQ=DAILY\r\n") : ical_append_printf(&str, "RRULE:FREQ=DAILY;COUNT=%d\r\n", calnote->occurrences); break; case GN_CALNOTE_WEEKLY: calnote->occurrences ? ical_append_printf(&str, "RRULE:FREQ=WEEKLY\r\n") : ical_append_printf(&str, "RRULE:FREQ=WEEKLY;COUNT=%d\r\n", calnote->occurrences); break; case GN_CALNOTE_2WEEKLY: calnote->occurrences ? ical_append_printf(&str, "RRULE:FREQ=WEEKLY;INTERVAL=2\r\n") : ical_append_printf(&str, "RRULE:FREQ=WEEKLY;INTERVAL=2;COUNT=%d\r\n", calnote->occurrences); break; case GN_CALNOTE_MONTHLY: calnote->occurrences ? ical_append_printf(&str, "RRULE:FREQ=MONTHLY\r\n") : ical_append_printf(&str, "RRULE:FREQ=MONTHLY;COUNT=%d\r\n", calnote->occurrences); break; case GN_CALNOTE_YEARLY: calnote->occurrences ? ical_append_printf(&str, "RRULE:FREQ=YEARLY\r\n") : ical_append_printf(&str, "RRULE:FREQ=YEARLY;COUNT=%d\r\n", calnote->occurrences); break; default: calnote->occurrences ? ical_append_printf(&str, "RRULE:FREQ=HOURLY;INTERVAL=%d\r\n", calnote->recurrence) : ical_append_printf(&str, "RRULE:FREQ=HOURLY;INTERVAL=%d;COUNT=%d\r\n", calnote->recurrence, calnote->occurrences); break; } ical_append_printf(&str, "END:VEVENT\r\n"); ical_append_printf(&str, "END:VCALENDAR\r\n"); return str.str; #endif /* HAVE_LIBICAL */ } GNOKII_API int gn_calnote2ical(FILE *f, gn_calnote *calnote) { char *vcal; int retval; vcal = gn_calnote2icalstr(calnote); if (vcal == NULL) return -1; retval = fputs(vcal, f); free(vcal); return retval; } static inline gn_calnote_type str2calnote_type(const char *str) { if (!str) { return GN_CALNOTE_REMINDER; } else if (!strncasecmp("PHONE CALL", str, 10)) { return GN_CALNOTE_CALL; } else if (!strncasecmp("MEETING", str, 7)) { return GN_CALNOTE_MEETING; } else if (!strncasecmp("ANNIVERSARY", str, 11)) { return GN_CALNOTE_BIRTHDAY; } else if (!strncasecmp("MISCELLANEOUS", str, 13)) { return GN_CALNOTE_MEMO; } return GN_CALNOTE_REMINDER; } #ifdef HAVE_LIBICAL static int gn_ical2calnote_real(icalcomponent *comp, gn_calnote *calnote, int id) { int retval = GN_ERR_FAILED; struct icaltimetype dtstart = {0}, dtend = {0}; icalcomponent *compresult = NULL; if (id < 1) id = 1; /* iterate through the component */ iterate_cal(comp, 0, &id, &compresult, ICAL_VEVENT_COMPONENT); if (!compresult) { dprintf("No component found.\n"); retval = GN_ERR_EMPTYLOCATION; } else { const char *str; icalcomponent *alarm = {0}; icalproperty *rrule; struct icalrecurrencetype recur; retval = GN_ERR_NONE; calnote->phone_number[0] = 0; /* type */ str = comp_get_category(compresult); calnote->type = str2calnote_type(str); switch (calnote->type) { case GN_CALNOTE_CALL: /* description goes into text */ /* TODO: UTF8 --> ascii */ snprintf(calnote->phone_number, GN_CALNOTE_NUMBER_MAX_LENGTH-1, "%s", icalcomponent_get_summary(compresult)); str = icalcomponent_get_description(compresult); break; default: /* summary goes into text */ /* TODO: UTF8 --> ascii */ str = icalcomponent_get_summary(compresult); break; } if (str) { snprintf(calnote->text, GN_CALNOTE_MAX_LENGTH - 1, "%s", str); } /* start time */ dtstart = icalcomponent_get_dtstart(compresult); if (!icaltime_is_null_time(dtstart)) { calnote->time.year = dtstart.year; calnote->time.month = dtstart.month; calnote->time.day = dtstart.day; if (!icaltime_is_date(dtstart)) { calnote->time.hour = dtstart.hour; calnote->time.minute = dtstart.minute; calnote->time.second = dtstart.second; /* TODO: what about time zones? */ } } /* end time */ memset(&calnote->end_time, 0, sizeof(calnote->end_time)); dtend = icalcomponent_get_dtend(compresult); if (!icaltime_is_null_time(dtend)) { calnote->end_time.year = dtend.year; calnote->end_time.month = dtend.month; calnote->end_time.day = dtend.day; if (!icaltime_is_date(dtend)) { calnote->end_time.hour = dtend.hour; calnote->end_time.minute = dtend.minute; calnote->end_time.second = dtend.second; /* TODO: what about time zones? */ } } /* alarm */ alarm = icalcomponent_get_first_component(compresult, ICAL_VALARM_COMPONENT); if (alarm) { icalproperty *trigger = NULL; trigger = icalcomponent_get_first_property(alarm, ICAL_TRIGGER_PROPERTY); if (trigger) { struct icaltriggertype trigger_value; struct icaltimetype alarm_start; icalproperty *property; trigger_value = icalvalue_get_trigger(icalproperty_get_value(trigger)); if (icaltriggertype_is_bad_trigger(trigger_value)) { calnote->alarm.enabled = 0; } else { if (icaltime_is_null_time(trigger_value.time)) { memcpy(&alarm_start, &dtstart, sizeof(struct icaltimetype)); } else { memcpy(&alarm_start, &trigger_value.time, sizeof(struct icaltimetype)); } if (!(icaldurationtype_is_bad_duration(trigger_value.duration) || icaldurationtype_is_null_duration(trigger_value.duration))) { alarm_start = icaltime_add(alarm_start, trigger_value.duration); } calnote->alarm.enabled = 1; calnote->alarm.timestamp.year = alarm_start.year; calnote->alarm.timestamp.month = alarm_start.month; calnote->alarm.timestamp.day = alarm_start.day; calnote->alarm.timestamp.hour = alarm_start.hour; calnote->alarm.timestamp.minute = alarm_start.minute; calnote->alarm.timestamp.second = alarm_start.second; /* TODO: time zone? */ property = icalcomponent_get_first_property(alarm, ICAL_ACTION_PROPERTY); calnote->alarm.tone = icalproperty_get_action(property) == ICAL_ACTION_AUDIO ? 1 : 0; } } } /* recurrence */ rrule = icalcomponent_get_first_property(compresult, ICAL_RRULE_PROPERTY); if (rrule) { recur = icalproperty_get_rrule(rrule); calnote->occurrences = recur.count; switch (recur.freq) { case ICAL_SECONDLY_RECURRENCE: dprintf("Not supported recurrence type. Approximating recurrence\n"); calnote->recurrence = recur.interval / 3600; if (!calnote->recurrence) calnote->recurrence = 1; break; case ICAL_MINUTELY_RECURRENCE: dprintf("Not supported recurrence type. Approximating recurrence\n"); calnote->recurrence = recur.interval / 60; if (!calnote->recurrence) calnote->recurrence = 1; break; case ICAL_HOURLY_RECURRENCE: calnote->recurrence = recur.interval; break; case ICAL_DAILY_RECURRENCE: calnote->recurrence = recur.interval * 24; break; case ICAL_WEEKLY_RECURRENCE: calnote->recurrence = recur.interval * 24 * 7; break; case ICAL_MONTHLY_RECURRENCE: calnote->recurrence = GN_CALNOTE_MONTHLY; break; case ICAL_YEARLY_RECURRENCE: calnote->recurrence = GN_CALNOTE_YEARLY; break; case ICAL_NO_RECURRENCE: calnote->recurrence = GN_CALNOTE_NEVER; break; default: dprintf("Not supported recurrence type. Assuming never\n"); calnote->recurrence = GN_CALNOTE_NEVER; break; } } str = icalcomponent_get_location(compresult); if (!str) str = ""; snprintf(calnote->mlocation, sizeof(calnote->mlocation), "%s", str); } if (compresult) { #ifdef DEBUG char *temp; temp = icalcomponent_as_ical_string(compresult); dprintf("Component found\n%s\n", temp); free(temp); #endif icalcomponent_free(compresult); } return retval; } #endif /* HAVE_LIBICAL */ /* read a vcalendar event given by id from file f and store the data in calnote */ GNOKII_API gn_error gn_ical2calnote(FILE *f, gn_calnote *calnote, int id) { #ifdef HAVE_LIBICAL icalparser *parser = NULL; icalcomponent *comp = NULL; gn_error retval; parser = icalparser_new(); if (!parser) { return GN_ERR_FAILED; } icalparser_set_gen_data(parser, f); comp = icalparser_parse(parser, ical_fgets); if (!comp) { icalparser_free(parser); return GN_ERR_FAILED; } retval = gn_ical2calnote_real(comp, calnote, id); icalcomponent_free(comp); icalparser_free(parser); return retval; #else return GN_ERR_NOTIMPLEMENTED; #endif /* HAVE_LIBICAL */ } /* read a vcalendar event given by id from string ical and store the data in calnote */ GNOKII_API gn_error gn_icalstr2calnote(const char * ical, gn_calnote *calnote, int id) { #ifdef HAVE_LIBICAL icalparser *parser = NULL; icalcomponent *comp = NULL; gn_error retval; parser = icalparser_new(); if (!parser) { return GN_ERR_FAILED; } comp = icalparser_parse_string (ical); if (!comp) { icalparser_free(parser); return GN_ERR_FAILED; } retval = gn_ical2calnote_real(comp, calnote, id); icalcomponent_free(comp); icalparser_free(parser); return retval; #else return GN_ERR_NOTIMPLEMENTED; #endif /* HAVE_LIBICAL */ } GNOKII_API int gn_todo2ical(FILE *f, gn_todo *ctodo) { char *icalstr; icalstr = gn_todo2icalstr(ctodo); if (icalstr) { fprintf(f, "%s\n", icalstr); dprintf("%s\n", icalstr); free(icalstr); } return GN_ERR_NONE; } GNOKII_API char * gn_todo2icalstr(gn_todo *ctodo) { #ifdef HAVE_LIBICAL icalcomponent *pIcal = NULL; char compuid[64]; snprintf(compuid, sizeof(compuid), "guid.gnokii.org_%d_%d", ctodo->location, rand()); pIcal = icalcomponent_vanew(ICAL_VCALENDAR_COMPONENT, icalproperty_new_version("2.0"), icalproperty_new_prodid(get_prodid()), icalcomponent_vanew(ICAL_VTODO_COMPONENT, icalproperty_new_categories("GNOKII"), icalproperty_new_priority(ctodo->priority), icalproperty_new_summary(ctodo->text), 0), 0); if (pIcal) { char *icalstrbuf = NULL; const char *icalstr = icalcomponent_as_ical_string(pIcal); /* conversion to UTF-8 */ if (string_base64(icalstr)) { int icalstrlen = strlen(icalstr); icalstrbuf = malloc(icalstrlen * 2 + 1); utf8_encode(icalstrbuf, icalstrlen * 2, icalstr, icalstrlen); } else { icalstrbuf = strdup (icalstr); } icalcomponent_free(pIcal); return icalstrbuf; } return NULL; #else ical_string str; memset(&str, 0, sizeof(str)); ical_append_printf(&str, "BEGIN:VCALENDAR\r\n"); ical_append_printf(&str, "VERSION:1.0\r\n"); ical_append_printf(&str, "BEGIN:VTODO\r\n"); ical_append_printf(&str, "PRIORITY:%i\r\n", ctodo->priority); ical_append_printf(&str, "SUMMARY:%s\r\n", ctodo->text); ical_append_printf(&str, "END:VTODO\r\n"); ical_append_printf(&str, "END:VCALENDAR\r\n"); return str.str; #endif /* HAVE_LIBICAL */ } #ifdef HAVE_LIBICAL /* read the entry identified by id from the vcal file f and write it to the phone */ static int gn_ical2todo_real(icalcomponent *comp, gn_todo *ctodo, int id) { icalcomponent *compresult = NULL; if (id < 1) id = 1; /* iterate through the component */ iterate_cal(comp, 0, &id, &compresult, ICAL_VTODO_COMPONENT); if (!compresult) { dprintf("No component found.\n"); return GN_ERR_EMPTYLOCATION; } else { icalproperty *priority = icalcomponent_get_first_property(compresult, ICAL_PRIORITY_PROPERTY); /* summary goes into text */ /* TODO: UTF8 --> ascii */ snprintf(ctodo->text, GN_TODO_MAX_LENGTH-1, "%s", icalcomponent_get_summary(compresult)); /* priority */ ctodo->priority = icalproperty_get_priority((const icalproperty *)priority); dprintf("Component found\n%s\n", icalcomponent_as_ical_string(compresult)); } icalcomponent_free(compresult); return GN_ERR_NONE; } #endif /* HAVE_LIBICAL */ GNOKII_API int gn_ical2todo(FILE *f, gn_todo *ctodo, int id) { #ifdef HAVE_LIBICAL icalparser *parser = NULL; icalcomponent *comp = NULL; gn_error error; parser = icalparser_new(); if (!parser) { return GN_ERR_FAILED; } icalparser_set_gen_data(parser, f); comp = icalparser_parse(parser, ical_fgets); if (!comp) { icalparser_free(parser); return GN_ERR_FAILED; } error = gn_ical2todo_real(comp, ctodo, id); icalcomponent_free(comp); icalparser_free(parser); return error; #else return GN_ERR_NOTIMPLEMENTED; #endif /* HAVE_LIBICAL */ } GNOKII_API int gn_icalstr2todo(const char * ical, gn_todo *ctodo, int id) { #ifdef HAVE_LIBICAL icalparser *parser = NULL; icalcomponent *comp = NULL; gn_error error; parser = icalparser_new(); if (!parser) { return GN_ERR_FAILED; } comp = icalparser_parse_string (ical); if (!comp) { icalparser_free(parser); return GN_ERR_FAILED; } error = gn_ical2todo_real(comp, ctodo, id); icalcomponent_free(comp); icalparser_free(parser); return error; #else return GN_ERR_NOTIMPLEMENTED; #endif /* HAVE_LIBICAL */ } #ifdef HAVE_LIBICAL /* This function is called recursively, since objects may be embedded in a * single VCALENDAR component or each in its own. Returns 0 on an empty set, * 1 -- otherwise. */ static int iterate_cal(icalcomponent *parent, int depth, int *count, icalcomponent **result, icalcomponent_kind kind) { icalcomponent *comp = NULL; icalcompiter compiter; if (!parent) return 0; /* we need to use iterators because we're calling iterate_cal recursively */ compiter = icalcomponent_begin_component(parent, ICAL_ANY_COMPONENT); comp = icalcompiter_deref(&compiter); for (; comp && *count; comp = icalcompiter_next(&compiter)) { if (icalcomponent_isa(comp) == kind) { /* FIXME: should we only consider items with category GNOKII? */ (*count)--; } if (!*count) { *result = comp; dprintf("Found component at depth %d\n", depth); break; } iterate_cal(comp, depth+1, count, result, kind); } return 1; } /* Return the first category that is not equal to GNOKII */ static const char *comp_get_category(icalcomponent *comp) { icalproperty *cat = NULL; const char *str; for (cat = icalcomponent_get_first_property(comp, ICAL_CATEGORIES_PROPERTY); cat; cat = icalcomponent_get_next_property(comp, ICAL_CATEGORIES_PROPERTY)) { str = icalproperty_get_categories(cat); if (strncasecmp("GNOKII", str, 6) != 0) return str; } return NULL; } #endif /* HAVE_LIBICAL */ gnokii-0.6.31/common/gnvcal.c0000644000175000017500000017144311666163272014133 0ustar leoleo#line 2 "gnvcal.c" #line 4 "gnvcal.c" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #define YY_FLEX_SUBMINOR_VERSION 35 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ #include #include #include #include /* end standard C headers. */ /* flex integer type definitions */ #ifndef FLEXINT_H #define FLEXINT_H /* C99 systems have . Non-C99 systems may or may not. */ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN #define INT8_MIN (-128) #endif #ifndef INT16_MIN #define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN #define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX #define INT8_MAX (127) #endif #ifndef INT16_MAX #define INT16_MAX (32767) #endif #ifndef INT32_MAX #define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX #define UINT8_MAX (255U) #endif #ifndef UINT16_MAX #define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX #define UINT32_MAX (4294967295U) #endif #endif /* ! C99 */ #endif /* ! FLEXINT_H */ #ifdef __cplusplus /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ /* C99 requires __STDC__ to be defined as 1. */ #if defined (__STDC__) #define YY_USE_CONST #endif /* defined (__STDC__) */ #endif /* ! __cplusplus */ #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN (yy_start) = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START (((yy_start) - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE yyrestart(yyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k. * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. * Ditto for the __ia64__ case accordingly. */ #define YY_BUF_SIZE 32768 #else #define YY_BUF_SIZE 16384 #endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. */ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif extern int yyleng; extern FILE *yyin, *yyout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ *yy_cp = (yy_hold_char); \ YY_RESTORE_YY_MORE_OFFSET \ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, (yytext_ptr) ) #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef size_t yy_size_t; #endif #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via yyrestart()), so that the user can continue scanning by * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* Stack of input buffers. */ static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". * * Returns the top of the stack, or NULL. */ #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ int yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow yywrap()'s to do buffer switches * instead of setting up a fresh yyin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; void yyrestart (FILE *input_file ); void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); void yy_delete_buffer (YY_BUFFER_STATE b ); void yy_flush_buffer (YY_BUFFER_STATE b ); void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); void yypop_buffer_state (void ); static void yyensure_buffer_stack (void ); static void yy_load_buffer_state (void ); static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ); void *yyalloc (yy_size_t ); void *yyrealloc (void *,yy_size_t ); void yyfree (void * ); #define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ yy_create_buffer(yyin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ yy_create_buffer(yyin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ #define yywrap(n) 1 #define YY_SKIP_YYWRAP typedef unsigned char YY_CHAR; FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; typedef int yy_state_type; extern int yylineno; int yylineno = 1; extern char *yytext; #define yytext_ptr yytext static yy_state_type yy_get_previous_state (void ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); static int yy_get_next_buffer (void ); static void yy_fatal_error (yyconst char msg[] ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ yyleng = (size_t) (yy_cp - yy_bp); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; #define YY_NUM_RULES 26 #define YY_END_OF_BUFFER 27 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info { flex_int32_t yy_verify; flex_int32_t yy_nxt; }; static yyconst flex_int16_t yy_accept[231] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 9, 11, 5, 13, 25, 25, 25, 22, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 11, 5, 13, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 10, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 3, 0, 0, 8, 0, 0, 0, 0, 0, 2, 0, 0, 12, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 1, 15, 17, 20, 0 } ; static yyconst flex_int32_t yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 5, 5, 5, 5, 5, 5, 8, 9, 10, 11, 12, 5, 13, 5, 14, 5, 5, 15, 16, 17, 18, 19, 5, 20, 21, 22, 23, 24, 5, 5, 25, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 26, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; static yyconst flex_int32_t yy_meta[27] = { 0, 1, 2, 2, 3, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 } ; static yyconst flex_int16_t yy_base[252] = { 0, 280, 279, 0, 1, 6, 0, 1, 4, 0, 3, 27, 30, 33, 36, 39, 42, 281, 280, 279, 278, 277, 276, 45, 48, 275, 274, 279, 290, 266, 265, 259, 267, 266, 44, 256, 254, 248, 250, 246, 0, 0, 0, 0, 262, 261, 260, 0, 290, 252, 251, 252, 247, 239, 245, 238, 3, 247, 247, 240, 241, 238, 0, 0, 0, 0, 247, 246, 245, 0, 236, 235, 241, 239, 234, 237, 234, 226, 220, 234, 232, 223, 220, 221, 230, 229, 228, 216, 215, 207, 210, 216, 208, 207, 215, 217, 200, 201, 214, 201, 212, 213, 212, 211, 209, 208, 204, 197, 194, 195, 196, 202, 188, 195, 192, 185, 190, 183, 196, 195, 194, 175, 174, 189, 189, 175, 187, 174, 185, 290, 169, 166, 171, 163, 165, 161, 179, 178, 177, 172, 41, 166, 173, 290, 165, 171, 290, 155, 169, 163, 157, 166, 147, 164, 164, 163, 162, 159, 142, 147, 152, 151, 148, 154, 290, 143, 152, 151, 290, 150, 149, 290, 32, 33, 35, 140, 142, 142, 135, 130, 132, 127, 141, 290, 140, 290, 140, 139, 138, 131, 125, 123, 129, 132, 121, 290, 131, 130, 129, 117, 111, 290, 124, 124, 290, 123, 123, 122, 121, 115, 290, 105, 117, 290, 117, 116, 115, 57, 290, 58, 56, 54, 6, 5, 2, 1, 290, 290, 290, 290, 290, 66, 70, 74, 78, 82, 86, 88, 90, 92, 94, 96, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117 } ; static yyconst flex_int16_t yy_def[252] = { 0, 231, 231, 231, 231, 231, 5, 231, 231, 232, 232, 233, 233, 234, 234, 235, 235, 231, 231, 231, 231, 231, 231, 236, 236, 231, 231, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 237, 238, 239, 240, 230, 230, 230, 241, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 237, 238, 239, 240, 230, 230, 230, 241, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 242, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 243, 230, 244, 230, 242, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 243, 230, 230, 244, 230, 230, 245, 230, 230, 246, 230, 247, 230, 230, 230, 230, 230, 230, 230, 230, 230, 245, 230, 230, 248, 246, 230, 249, 247, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 248, 230, 249, 230, 230, 230, 230, 230, 230, 230, 230, 250, 230, 230, 230, 230, 230, 230, 230, 230, 230, 250, 230, 251, 230, 230, 230, 230, 230, 230, 251, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 0, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230 } ; static yyconst flex_int16_t yy_nxt[317] = { 0, 28, 28, 28, 28, 28, 28, 229, 228, 30, 30, 227, 31, 31, 32, 77, 33, 34, 35, 230, 38, 36, 39, 38, 78, 39, 226, 37, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 54, 158, 186, 187, 55, 188, 186, 187, 225, 188, 224, 159, 223, 222, 56, 28, 28, 28, 28, 40, 40, 40, 40, 41, 41, 41, 41, 42, 42, 42, 42, 43, 43, 43, 43, 47, 47, 47, 47, 62, 62, 63, 63, 64, 64, 65, 65, 69, 69, 128, 128, 142, 142, 145, 145, 163, 163, 167, 167, 170, 170, 182, 182, 184, 184, 203, 203, 212, 212, 221, 220, 219, 213, 218, 217, 216, 215, 214, 213, 204, 211, 210, 209, 208, 207, 206, 205, 204, 202, 201, 200, 199, 198, 197, 196, 185, 183, 195, 194, 193, 192, 191, 190, 189, 171, 185, 168, 183, 181, 164, 180, 179, 178, 177, 176, 175, 174, 173, 172, 171, 169, 168, 166, 165, 164, 162, 146, 161, 143, 160, 157, 156, 155, 154, 153, 152, 151, 150, 149, 148, 129, 147, 146, 144, 143, 141, 140, 139, 138, 137, 136, 135, 134, 133, 132, 131, 130, 129, 127, 126, 125, 124, 123, 122, 121, 120, 119, 118, 117, 116, 115, 114, 113, 112, 111, 110, 109, 108, 107, 106, 105, 104, 103, 102, 101, 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 76, 75, 74, 73, 72, 71, 70, 68, 67, 66, 61, 60, 59, 58, 57, 53, 52, 51, 50, 49, 230, 48, 48, 46, 46, 45, 45, 44, 44, 29, 29, 27, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230 } ; static yyconst flex_int16_t yy_chk[317] = { 0, 9, 9, 9, 10, 10, 10, 225, 224, 3, 4, 223, 3, 4, 5, 56, 5, 5, 5, 0, 7, 5, 7, 8, 56, 8, 222, 5, 11, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 16, 16, 16, 23, 23, 23, 24, 24, 24, 34, 140, 172, 173, 34, 174, 172, 173, 221, 174, 220, 140, 219, 217, 34, 231, 231, 231, 231, 232, 232, 232, 232, 233, 233, 233, 233, 234, 234, 234, 234, 235, 235, 235, 235, 236, 236, 236, 236, 237, 237, 238, 238, 239, 239, 240, 240, 241, 241, 242, 242, 243, 243, 244, 244, 245, 245, 246, 246, 247, 247, 248, 248, 249, 249, 250, 250, 251, 251, 216, 215, 214, 212, 211, 209, 208, 207, 206, 205, 203, 202, 200, 199, 198, 197, 196, 194, 193, 192, 191, 190, 189, 188, 187, 186, 184, 182, 181, 180, 179, 178, 177, 176, 175, 170, 169, 167, 166, 165, 163, 162, 161, 160, 159, 158, 157, 156, 155, 154, 153, 152, 151, 150, 149, 148, 147, 145, 144, 142, 141, 139, 138, 137, 136, 135, 134, 133, 132, 131, 130, 128, 127, 126, 125, 124, 123, 122, 121, 120, 119, 118, 117, 116, 115, 114, 113, 112, 111, 110, 109, 108, 107, 106, 105, 104, 103, 102, 101, 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 68, 67, 66, 61, 60, 59, 58, 57, 55, 54, 53, 52, 51, 50, 49, 46, 45, 44, 39, 38, 37, 36, 35, 33, 32, 31, 30, 29, 27, 26, 25, 22, 21, 20, 19, 18, 17, 2, 1, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230 } ; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; extern int yy_flex_debug; int yy_flex_debug = 0; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *yytext; #line 1 "./vcal.lx" /* $Id$ G N O K I I A Linux/Unix toolset and driver for Nokia mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janik ml. */ #line 30 "./vcal.lx" #include "config.h" #include #include "config.h" #include "compat.h" #include "misc.h" #include "gnokii.h" #include "gsm-filetypes.h" #define YY_DECL int yylex(char *type,char *text,char *meeting_location,char *desc,char *time,char *endtime,char *alarm,char *todo_priority,int lexnumber) int veventcounter = 0, vtodocounter = 0, alarmtone = 0; #line 663 "gnvcal.c" #define INITIAL 0 #define vcalendar 1 #define vevent 2 #define vtodo 3 #define category 4 #define summary 5 #define todosummary 6 #define description 7 #define ttime 8 #define etime 9 #define aalarm 10 #define loc 11 #define tpriority 12 #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. */ #include #endif #ifndef YY_EXTRA_TYPE #define YY_EXTRA_TYPE void * #endif static int yy_init_globals (void ); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ int yylex_destroy (void ); int yyget_debug (void ); void yyset_debug (int debug_flag ); YY_EXTRA_TYPE yyget_extra (void ); void yyset_extra (YY_EXTRA_TYPE user_defined ); FILE *yyget_in (void ); void yyset_in (FILE * in_str ); FILE *yyget_out (void ); void yyset_out (FILE * out_str ); int yyget_leng (void ); char *yyget_text (void ); int yyget_lineno (void ); void yyset_lineno (int line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int yywrap (void ); #else extern int yywrap (void ); #endif #endif #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * ); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void ); #else static int input (void ); #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k */ #define YY_READ_BUF_SIZE 16384 #else #define YY_READ_BUF_SIZE 8192 #endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ size_t n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else \ { \ errno=0; \ while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ { \ if( errno != EINTR) \ { \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ break; \ } \ errno=0; \ clearerr(yyin); \ } \ }\ \ #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif /* end tables serialization structures and prototypes */ /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 extern int yylex (void); #define YY_DECL int yylex (void) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK break; #endif #define YY_RULE_SETUP \ YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; #line 60 "./vcal.lx" #line 863 "gnvcal.c" if ( !(yy_init) ) { (yy_init) = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! (yy_start) ) (yy_start) = 1; /* first start state */ if ( ! yyin ) yyin = stdin; if ( ! yyout ) yyout = stdout; if ( ! YY_CURRENT_BUFFER ) { yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin,YY_BUF_SIZE ); } yy_load_buffer_state( ); } while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = (yy_c_buf_p); /* Support of yytext. */ *yy_cp = (yy_hold_char); /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = (yy_start); yy_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 231 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } while ( yy_base[yy_current_state] != 290 ); yy_find_action: yy_act = yy_accept[yy_current_state]; if ( yy_act == 0 ) { /* have to back up */ yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); yy_act = yy_accept[yy_current_state]; } YY_DO_BEFORE_ACTION; do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = (yy_hold_char); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); goto yy_find_action; case 1: YY_RULE_SETUP #line 62 "./vcal.lx" BEGIN(vcalendar); YY_BREAK case 2: YY_RULE_SETUP #line 64 "./vcal.lx" ++veventcounter; BEGIN(vevent); YY_BREAK case 3: YY_RULE_SETUP #line 66 "./vcal.lx" ++vtodocounter; BEGIN(vtodo); YY_BREAK case 4: /* rule 4 can match eol */ YY_RULE_SETUP #line 68 "./vcal.lx" BEGIN(todosummary); YY_BREAK case 5: YY_RULE_SETUP #line 70 "./vcal.lx" { if (vtodocounter == lexnumber) snprintf(text, 256, "%s", yytext); BEGIN(vtodo); } YY_BREAK case 6: /* rule 6 can match eol */ YY_RULE_SETUP #line 76 "./vcal.lx" BEGIN(tpriority); YY_BREAK case 7: YY_RULE_SETUP #line 78 "./vcal.lx" { if (vtodocounter == lexnumber) snprintf(todo_priority, 1, "%s", yytext); BEGIN(vtodo); } YY_BREAK case 8: /* rule 8 can match eol */ YY_RULE_SETUP #line 84 "./vcal.lx" BEGIN(category); YY_BREAK case 9: YY_RULE_SETUP #line 86 "./vcal.lx" { if (veventcounter == lexnumber) snprintf(type, 21, "%s", yytext); BEGIN(vevent); } YY_BREAK case 10: /* rule 10 can match eol */ YY_RULE_SETUP #line 92 "./vcal.lx" BEGIN(summary); YY_BREAK case 11: YY_RULE_SETUP #line 94 "./vcal.lx" { if (veventcounter == lexnumber) snprintf(text, 256, "%s", yytext); BEGIN(vevent); } YY_BREAK case 12: /* rule 12 can match eol */ YY_RULE_SETUP #line 100 "./vcal.lx" BEGIN(description); YY_BREAK case 13: YY_RULE_SETUP #line 102 "./vcal.lx" { if (veventcounter == lexnumber) snprintf(desc, 256, "%s", yytext); BEGIN(vevent); } YY_BREAK case 14: /* rule 14 can match eol */ YY_RULE_SETUP #line 108 "./vcal.lx" BEGIN(ttime); YY_BREAK case 15: YY_RULE_SETUP #line 110 "./vcal.lx" { if (veventcounter == lexnumber) snprintf(time, 16, "%s", yytext); BEGIN(vevent); } YY_BREAK case 16: /* rule 16 can match eol */ YY_RULE_SETUP #line 116 "./vcal.lx" BEGIN(etime); YY_BREAK case 17: YY_RULE_SETUP #line 118 "./vcal.lx" { if (veventcounter == lexnumber) snprintf(endtime, 16, "%s", yytext); BEGIN(vevent); } YY_BREAK case 18: /* rule 18 can match eol */ YY_RULE_SETUP #line 124 "./vcal.lx" { BEGIN(aalarm); dprintf("Alarm tone enabled\n"); alarmtone = 1; } YY_BREAK case 19: /* rule 19 can match eol */ YY_RULE_SETUP #line 130 "./vcal.lx" { BEGIN(aalarm); dprintf("Alarm tone disabled\n"); alarmtone = 0; } YY_BREAK case 20: YY_RULE_SETUP #line 136 "./vcal.lx" { if (veventcounter == lexnumber) strncpy(alarm, yytext, 16); BEGIN(vevent); } YY_BREAK case 21: /* rule 21 can match eol */ YY_RULE_SETUP #line 143 "./vcal.lx" BEGIN(loc); YY_BREAK case 22: YY_RULE_SETUP #line 145 "./vcal.lx" { if (veventcounter == lexnumber) snprintf(meeting_location, 64, "%s", yytext); BEGIN(vevent); } YY_BREAK case 23: YY_RULE_SETUP #line 151 "./vcal.lx" BEGIN(vcalendar); YY_BREAK case 24: YY_RULE_SETUP #line 153 "./vcal.lx" BEGIN(0); YY_BREAK case 25: /* rule 25 can match eol */ YY_RULE_SETUP #line 154 "./vcal.lx" YY_BREAK case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(vcalendar): case YY_STATE_EOF(vevent): case YY_STATE_EOF(vtodo): case YY_STATE_EOF(category): case YY_STATE_EOF(summary): case YY_STATE_EOF(todosummary): case YY_STATE_EOF(description): case YY_STATE_EOF(ttime): case YY_STATE_EOF(etime): case YY_STATE_EOF(aalarm): case YY_STATE_EOF(loc): case YY_STATE_EOF(tpriority): #line 155 "./vcal.lx" { if (((lexnumber > 0) && (lexnumber < veventcounter + 1)) || ((lexnumber > 0) && (lexnumber < vtodocounter + 1))) { return 0; } fprintf(stderr, _("Error: Invalid calendar note number!\n")); return -1; } YY_BREAK case 26: YY_RULE_SETUP #line 165 "./vcal.lx" ECHO; YY_BREAK #line 1155 "gnvcal.c" case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = (yy_hold_char); YY_RESTORE_YY_MORE_OFFSET if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed yyin at a new source and called * yylex(). If so, then we have to assure * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) { /* This was really a NUL. */ yy_state_type yy_next_state; (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = (yytext_ptr) + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++(yy_c_buf_p); yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = (yy_c_buf_p); goto yy_find_action; } } else switch ( yy_get_next_buffer( ) ) { case EOB_ACT_END_OF_FILE: { (yy_did_buffer_switch_on_eof) = 0; if ( yywrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * yytext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: (yy_c_buf_p) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer (void) { register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; register char *source = (yytext_ptr); register int number_to_move, i; int ret_val; if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; else { int num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = YY_CURRENT_BUFFER; int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), (yy_n_chars), (size_t) num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } if ( (yy_n_chars) == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; yyrestart(yyin ); } else { ret_val = EOB_ACT_LAST_MATCH; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); } (yy_n_chars) += number_to_move; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state (void) { register yy_state_type yy_current_state; register char *yy_cp; yy_current_state = (yy_start); for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 231 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) { register int yy_is_jam; register char *yy_cp = (yy_c_buf_p); register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 231 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 230); return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void) #else static int input (void) #endif { int c; *(yy_c_buf_p) = (yy_hold_char); if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) /* This was really a NUL. */ *(yy_c_buf_p) = '\0'; else { /* need more input */ int offset = (yy_c_buf_p) - (yytext_ptr); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ yyrestart(yyin ); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { if ( yywrap( ) ) return EOF; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); #else return input(); #endif } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + offset; break; } } } c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ *(yy_c_buf_p) = '\0'; /* preserve yytext */ (yy_hold_char) = *++(yy_c_buf_p); return c; } #endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * * @note This function does not reset the start condition to @c INITIAL . */ void yyrestart (FILE * input_file ) { if ( ! YY_CURRENT_BUFFER ){ yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin,YY_BUF_SIZE ); } yy_init_buffer(YY_CURRENT_BUFFER,input_file ); yy_load_buffer_state( ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * */ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) { /* TODO. We should be able to replace this entire function body * with * yypop_buffer_state(); * yypush_buffer_state(new_buffer); */ yyensure_buffer_stack (); if ( YY_CURRENT_BUFFER == new_buffer ) return; if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } YY_CURRENT_BUFFER_LVALUE = new_buffer; yy_load_buffer_state( ); /* We don't actually know whether we did this switch during * EOF (yywrap()) processing, but the only time this flag * is looked at is after yywrap() is called, so it's safe * to go ahead and always set it. */ (yy_did_buffer_switch_on_eof) = 1; } static void yy_load_buffer_state (void) { (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; (yy_hold_char) = *(yy_c_buf_p); } /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. * * @return the allocated buffer state. */ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_is_our_buffer = 1; yy_init_buffer(b,file ); return b; } /** Destroy the buffer. * @param b a buffer created with yy_create_buffer() * */ void yy_delete_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) yyfree((void *) b->yy_ch_buf ); yyfree((void *) b ); } #ifndef __cplusplus extern int isatty (int ); #endif /* __cplusplus */ /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. */ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) { int oerrno = errno; yy_flush_buffer(b ); b->yy_input_file = file; b->yy_fill_buffer = 1; /* If b is the current buffer, then yy_init_buffer was _probably_ * called from yyrestart() or through yy_get_next_buffer. * In that case, we don't want to reset the lineno or column. */ if (b != YY_CURRENT_BUFFER){ b->yy_bs_lineno = 1; b->yy_bs_column = 0; } b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * */ void yy_flush_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) yy_load_buffer_state( ); } /** Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. * */ void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) { if (new_buffer == NULL) return; yyensure_buffer_stack(); /* This block is copied from yy_switch_to_buffer. */ if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } /* Only push if top exists. Otherwise, replace top. */ if (YY_CURRENT_BUFFER) (yy_buffer_stack_top)++; YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from yy_switch_to_buffer. */ yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * */ void yypop_buffer_state (void) { if (!YY_CURRENT_BUFFER) return; yy_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; if ((yy_buffer_stack_top) > 0) --(yy_buffer_stack_top); if (YY_CURRENT_BUFFER) { yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ static void yyensure_buffer_stack (void) { int num_to_alloc; if (!(yy_buffer_stack)) { /* First allocation is just for 2 elements, since we don't know if this * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ num_to_alloc = 1; (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc (num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; (yy_buffer_stack_top) = 0; return; } if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ /* Increase the buffer to prepare for a possible push. */ int grow_size = 8 /* arbitrary grow size */; num_to_alloc = (yy_buffer_stack_max) + grow_size; (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc ((yy_buffer_stack), num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); /* zero only the new slots.*/ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; } } /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; yy_switch_to_buffer(b ); return b; } /** Setup the input buffer state to scan a string. The next call to yylex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) { return yy_scan_bytes(yystr,strlen(yystr) ); } /** Setup the input buffer state to scan the given bytes. The next call to yylex() will * scan from a @e copy of @a bytes. * @param yybytes the byte buffer to scan * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) { YY_BUFFER_STATE b; char *buf; yy_size_t n; int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) yyalloc(n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); for ( i = 0; i < _yybytes_len; ++i ) buf[i] = yybytes[i]; buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; b = yy_scan_buffer(buf,n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif static void yy_fatal_error (yyconst char* msg ) { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ yytext[yyleng] = (yy_hold_char); \ (yy_c_buf_p) = yytext + yyless_macro_arg; \ (yy_hold_char) = *(yy_c_buf_p); \ *(yy_c_buf_p) = '\0'; \ yyleng = yyless_macro_arg; \ } \ while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the current line number. * */ int yyget_lineno (void) { return yylineno; } /** Get the input stream. * */ FILE *yyget_in (void) { return yyin; } /** Get the output stream. * */ FILE *yyget_out (void) { return yyout; } /** Get the length of the current token. * */ int yyget_leng (void) { return yyleng; } /** Get the current token. * */ char *yyget_text (void) { return yytext; } /** Set the current line number. * @param line_number * */ void yyset_lineno (int line_number ) { yylineno = line_number; } /** Set the input stream. This does not discard the current * input buffer. * @param in_str A readable stream. * * @see yy_switch_to_buffer */ void yyset_in (FILE * in_str ) { yyin = in_str ; } void yyset_out (FILE * out_str ) { yyout = out_str ; } int yyget_debug (void) { return yy_flex_debug; } void yyset_debug (int bdebug ) { yy_flex_debug = bdebug ; } static int yy_init_globals (void) { /* Initialization is the same as for the non-reentrant scanner. * This function is called from yylex_destroy(), so don't allocate here. */ (yy_buffer_stack) = 0; (yy_buffer_stack_top) = 0; (yy_buffer_stack_max) = 0; (yy_c_buf_p) = (char *) 0; (yy_init) = 0; (yy_start) = 0; /* Defined in main.c */ #ifdef YY_STDINIT yyin = stdin; yyout = stdout; #else yyin = (FILE *) 0; yyout = (FILE *) 0; #endif /* For future reference: Set errno on error, since we are called by * yylex_init() */ return 0; } /* yylex_destroy is for both reentrant and non-reentrant scanners. */ int yylex_destroy (void) { /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ yy_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; yypop_buffer_state(); } /* Destroy the stack itself. */ yyfree((yy_buffer_stack) ); (yy_buffer_stack) = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time * yylex() is called, initialization will occur. */ yy_init_globals( ); return 0; } /* * Internal utility routines. */ #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * s ) { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif void *yyalloc (yy_size_t size ) { return (void *) malloc( size ); } void *yyrealloc (void * ptr, yy_size_t size ) { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter * because both ANSI C and C++ allow castless assignment from * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); } void yyfree (void * ptr ) { free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 165 "./vcal.lx" /** * vcal_time_get * * Fills vCalendar time string into gn_timestamp structure * * in: * dt: datetime structure * time: string in format yyyymmddThhmmss * out: * <>0 if error */ int vcal_time_get(gn_timestamp *dt, char *time) { char year[5] = "", month[3] = "", day[3] = "", hour[3] = "", minute[3] = "", second[3] = ""; dt->year = dt->month = dt->day = dt->hour = dt->minute = dt->second = dt->timezone = 0; snprintf(year, 5, "%s", time); snprintf(month, 3, "%s", time + 4); snprintf(day, 3, "%s", time + 6); snprintf(hour, 3, "%s", time + 9); snprintf(minute, 3, "%s", time + 11); snprintf(second, 3, "%s", time + 13); dprintf("\t%s-%s-%s %s:%s:%s\n", year, month, day, hour, minute, second); /* FIXME: Should check ranges... */ dt->year = atoi(year); dt->month = atoi(month); dt->day = atoi(day); dt->hour = atoi(hour); dt->minute = atoi(minute); dt->second = atoi(second); /* FIXME */ dt->timezone = 0; return 0; } /** * gn_calnote_fill * * Fills calendar data from strings into calendar note * * in: * note: calendar note structure * type: type of calendar note * text: text or phonenumber * time: string in format yyyymmddThhmmss * alarm: dito * out: * <>0 if error */ static int gn_calnote_fill(gn_calnote *note, char *type, char *text, char *meeting_location, char *desc, char *time, char *endtime, char *alarm) { dprintf("Start time (YYYY-MM-DD HH:MM:SS):\n"); vcal_time_get(¬e->time, time); dprintf("End time (YYYY-MM-DD HH:MM:SS):\n"); vcal_time_get(¬e->end_time, endtime); dprintf("Alarm time (YYYY-MM-DD HH:MM:SS):\n"); vcal_time_get(¬e->alarm.timestamp, alarm); if (note->alarm.timestamp.year) { note->alarm.enabled = 1; note->alarm.tone = alarmtone; } snprintf(note->text, 256, "%s", text); note->phone_number[0] = 0; dprintf("Text: %s\n", note->text); /* FIXME: Handle additional strings, maybe from configuration file */ if (!strcmp(type, "PHONE CALL")) { snprintf(note->phone_number, 48, "%s", text); dprintf("Phone: %s\n", note->phone_number); if (desc[0] != 0) { snprintf(note->text, 256, "%s", desc); dprintf("Desc: %s\n", note->text); } note->type = GN_CALNOTE_CALL; } else if (!strcmp(type, "MEETING")) { note->type = GN_CALNOTE_MEETING; if (meeting_location[0] != 0) { snprintf(note->mlocation, 64, "%s", meeting_location); dprintf("Location: %s\n", note->mlocation); } } else if (!strcmp(type, "SPECIAL OCCASION")) note->type = GN_CALNOTE_BIRTHDAY; else if (!strcmp(type, "REMINDER")) note->type = GN_CALNOTE_REMINDER; else note->type = GN_CALNOTE_MEMO; return 0; } /** * gn_vcal_file_event_read * * Reads vCalendar file and parses VEVENT entries * * in: * FileName: name of vCalendar file * cnote: pointer to calendar note * number: number in file of calendar note to read * out: * <>0 if error */ int gn_vcal_file_event_read(char *filename, gn_calnote *cnote, int number) { FILE *file; char type[21] = "", text[257] = "", desc[257] = "", meeting_location[64] = ""; char time[16] = "", endtime[16] = "", alarm[16] = ""; char todo_priority[2] = ""; /* translators: %s are replaced by function names */ fprintf(stderr, _("Function %s() is deprecated. Use %s() instead.\n"), __FUNCTION__, "gn_ical2calnote"); file = fopen(filename, "r"); if (!file) { fprintf(stderr, _("Can't open file %s for reading!\n"), filename); return -1; } yyin = file; memset(cnote, 0, sizeof(gn_calnote)); if (yylex(type,text,meeting_location,desc,time,endtime,alarm,todo_priority,number)) { fprintf(stderr, _("Error parsing vCalendar file!\n")); fclose(file); return -1; } gn_calnote_fill(cnote, type, text, meeting_location, desc, time, endtime, alarm); fclose(file); return 0; } /** * gn_todo_fill * * Fills todo data from strings into ToDo * * in: * note: todo structure * text: text or phonenumber * priority: GN_TODO_HIGH (highest), GN_TODO_MEDIUM, GN_TODO_LOW (lowest) * out: * <>0 if error */ static int gn_todo_fill(gn_todo *todonote, char *text, char *todo_priority) { snprintf(todonote->text, GN_TODO_MAX_LENGTH, "%s", text); todonote->priority = GN_TODO_MEDIUM; if (todo_priority) todonote->priority = atoi(todo_priority); return 0; } /** * gn_vcal_file_todo_read * * Reads vCalendar file and parses VTODO entries * * in: * FileName: name of vCalendar file * ctodo: pointer to calendar note * number: number in file of calendar note to read * out: * <>0 if error */ int gn_vcal_file_todo_read(char *filename, gn_todo *ctodo, int number) { FILE *file; char type[21] = "", text[258] = "", desc[258] = ""; char time[16] = "", endtime[16] = "", alarm[16] = ""; char todo_priority[3] = "", meeting_location[64] = ""; /* translators: %s are replaced by function names */ fprintf(stderr, _("Function %s() is deprecated. Use %s() instead.\n"), __FUNCTION__, "gn_ical2todo"); file = fopen(filename, "r"); if (!file) { fprintf(stderr, _("Can't open file %s for reading!\n"), filename); return -1; } yyin = file; memset(ctodo, 0, sizeof(gn_todo)); if (yylex(type,text,meeting_location,desc,time,endtime,alarm,todo_priority,number)) { fprintf(stderr, _("Error parsing vCalendar file!\n")); fclose(file); return -1; } gn_todo_fill(ctodo, text, todo_priority); fclose(file); return 0; } gnokii-0.6.31/common/vcal.lx0000644000175000017500000002164411666163120013774 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for Nokia mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janik ml. */ %{ #include "config.h" #include #include "config.h" #include "compat.h" #include "misc.h" #include "gnokii.h" #include "gsm-filetypes.h" #define YY_DECL int yylex(char *type, char *text, char *meeting_location, char *desc, char *time, char *endtime, char *alarm, char *todo_priority, int lexnumber) int veventcounter = 0, vtodocounter = 0, alarmtone = 0; %} %x vcalendar %x vevent %x vtodo %x category %x summary %x todosummary %x description %x ttime %x etime %x aalarm %x loc %x tpriority %option noyywrap %option nounput %% BEGIN:VCALENDAR BEGIN(vcalendar); BEGIN:VEVENT ++veventcounter; BEGIN(vevent); BEGIN:VTODO ++vtodocounter; BEGIN(vtodo); SUMMARY[ \t\n\r]*: BEGIN(todosummary); [[:print:]]+ { if (vtodocounter == lexnumber) snprintf(text, 256, "%s", yytext); BEGIN(vtodo); } PRIORITY[ \t\n\r]*: BEGIN(tpriority); [0-9]{1} { if (vtodocounter == lexnumber) snprintf(todo_priority, 1, "%s", yytext); BEGIN(vtodo); } CATEGORIES[ \t\n\r]*: BEGIN(category); [[:print:]]+ { if (veventcounter == lexnumber) snprintf(type, 21, "%s", yytext); BEGIN(vevent); } SUMMARY[ \t\n\r]*: BEGIN(summary); [[:print:]]+ { if (veventcounter == lexnumber) snprintf(text, 256, "%s", yytext); BEGIN(vevent); } DESCRIPTION[ \t\n\r]*: BEGIN(description); [[:print:]]+ { if (veventcounter == lexnumber) snprintf(desc, 256, "%s", yytext); BEGIN(vevent); } DTSTART[ \t\n\r]*: BEGIN(ttime); [0-9]{8}[tT][0-9]{6} { if (veventcounter == lexnumber) snprintf(time, 16, "%s", yytext); BEGIN(vevent); } DTEND[ \t\n\r]*: BEGIN(etime); [0-9]{8}[tT][0-9]{6} { if (veventcounter == lexnumber) snprintf(endtime, 16, "%s", yytext); BEGIN(vevent); } AALARM[ \t\n\r]*: { BEGIN(aalarm); dprintf("Alarm tone enabled\n"); alarmtone = 1; } DALARM[ \t\n\r]*: { BEGIN(aalarm); dprintf("Alarm tone disabled\n"); alarmtone = 0; } [0-9]{8}[tT][0-9]{6} { if (veventcounter == lexnumber) strncpy(alarm, yytext, 16); BEGIN(vevent); } LOCATION[ \t\n\r]*: BEGIN(loc); [[:print:]]+ { if (veventcounter == lexnumber) snprintf(meeting_location, 64, "%s", yytext); BEGIN(vevent); } END:VEVENT BEGIN(vcalendar); END:VCALENDAR BEGIN(0); <*>.|\n <*><> { if (((lexnumber > 0) && (lexnumber < veventcounter + 1)) || ((lexnumber > 0) && (lexnumber < vtodocounter + 1))) { return 0; } fprintf(stderr, _("Error: Invalid calendar note number!\n")); return -1; } %% /** * vcal_time_get * * Fills vCalendar time string into gn_timestamp structure * * in: * dt: datetime structure * time: string in format yyyymmddThhmmss * out: * <>0 if error */ int vcal_time_get(gn_timestamp *dt, char *time) { char year[5] = "", month[3] = "", day[3] = "", hour[3] = "", minute[3] = "", second[3] = ""; dt->year = dt->month = dt->day = dt->hour = dt->minute = dt->second = dt->timezone = 0; snprintf(year, 5, "%s", time); snprintf(month, 3, "%s", time + 4); snprintf(day, 3, "%s", time + 6); snprintf(hour, 3, "%s", time + 9); snprintf(minute, 3, "%s", time + 11); snprintf(second, 3, "%s", time + 13); dprintf("\t%s-%s-%s %s:%s:%s\n", year, month, day, hour, minute, second); /* FIXME: Should check ranges... */ dt->year = atoi(year); dt->month = atoi(month); dt->day = atoi(day); dt->hour = atoi(hour); dt->minute = atoi(minute); dt->second = atoi(second); /* FIXME */ dt->timezone = 0; return 0; } /** * gn_calnote_fill * * Fills calendar data from strings into calendar note * * in: * note: calendar note structure * type: type of calendar note * text: text or phonenumber * time: string in format yyyymmddThhmmss * alarm: dito * out: * <>0 if error */ static int gn_calnote_fill(gn_calnote *note, char *type, char *text, char *meeting_location, char *desc, char *time, char *endtime, char *alarm) { dprintf("Start time (YYYY-MM-DD HH:MM:SS):\n"); vcal_time_get(¬e->time, time); dprintf("End time (YYYY-MM-DD HH:MM:SS):\n"); vcal_time_get(¬e->end_time, endtime); dprintf("Alarm time (YYYY-MM-DD HH:MM:SS):\n"); vcal_time_get(¬e->alarm.timestamp, alarm); if (note->alarm.timestamp.year) { note->alarm.enabled = 1; note->alarm.tone = alarmtone; } snprintf(note->text, 256, "%s", text); note->phone_number[0] = 0; dprintf("Text: %s\n", note->text); /* FIXME: Handle additional strings, maybe from configuration file */ if (!strcmp(type, "PHONE CALL")) { snprintf(note->phone_number, 48, "%s", text); dprintf("Phone: %s\n", note->phone_number); if (desc[0] != 0) { snprintf(note->text, 256, "%s", desc); dprintf("Desc: %s\n", note->text); } note->type = GN_CALNOTE_CALL; } else if (!strcmp(type, "MEETING")) { note->type = GN_CALNOTE_MEETING; if (meeting_location[0] != 0) { snprintf(note->mlocation, 64, "%s", meeting_location); dprintf("Location: %s\n", note->mlocation); } } else if (!strcmp(type, "SPECIAL OCCASION")) note->type = GN_CALNOTE_BIRTHDAY; else if (!strcmp(type, "REMINDER")) note->type = GN_CALNOTE_REMINDER; else note->type = GN_CALNOTE_MEMO; return 0; } /** * gn_vcal_file_event_read * * Reads vCalendar file and parses VEVENT entries * * in: * FileName: name of vCalendar file * cnote: pointer to calendar note * number: number in file of calendar note to read * out: * <>0 if error */ int gn_vcal_file_event_read(char *filename, gn_calnote *cnote, int number) { FILE *file; char type[21] = "", text[257] = "", desc[257] = "", meeting_location[64] = ""; char time[16] = "", endtime[16] = "", alarm[16] = ""; char todo_priority[2] = ""; /* translators: %s are replaced by function names */ fprintf(stderr, _("Function %s() is deprecated. Use %s() instead.\n"), __FUNCTION__, "gn_ical2calnote"); file = fopen(filename, "r"); if (!file) { fprintf(stderr, _("Can't open file %s for reading!\n"), filename); return -1; } yyin = file; memset(cnote, 0, sizeof(gn_calnote)); if (yylex(type, text, meeting_location, desc, time, endtime, alarm, todo_priority, number)) { fprintf(stderr, _("Error parsing vCalendar file!\n")); fclose(file); return -1; } gn_calnote_fill(cnote, type, text, meeting_location, desc, time, endtime, alarm); fclose(file); return 0; } /** * gn_todo_fill * * Fills todo data from strings into ToDo * * in: * note: todo structure * text: text or phonenumber * priority: GN_TODO_HIGH (highest), GN_TODO_MEDIUM, GN_TODO_LOW (lowest) * out: * <>0 if error */ static int gn_todo_fill(gn_todo *todonote, char *text, char *todo_priority) { snprintf(todonote->text, GN_TODO_MAX_LENGTH, "%s", text); todonote->priority = GN_TODO_MEDIUM; if (todo_priority) todonote->priority = atoi(todo_priority); return 0; } /** * gn_vcal_file_todo_read * * Reads vCalendar file and parses VTODO entries * * in: * FileName: name of vCalendar file * ctodo: pointer to calendar note * number: number in file of calendar note to read * out: * <>0 if error */ int gn_vcal_file_todo_read(char *filename, gn_todo *ctodo, int number) { FILE *file; char type[21] = "", text[258] = "", desc[258] = ""; char time[16] = "", endtime[16] = "", alarm[16] = ""; char todo_priority[3] = "", meeting_location[64] = ""; /* translators: %s are replaced by function names */ fprintf(stderr, _("Function %s() is deprecated. Use %s() instead.\n"), __FUNCTION__, "gn_ical2todo"); file = fopen(filename, "r"); if (!file) { fprintf(stderr, _("Can't open file %s for reading!\n"), filename); return -1; } yyin = file; memset(ctodo, 0, sizeof(gn_todo)); if (yylex(type, text, meeting_location, desc, time, endtime, alarm, todo_priority, number)) { fprintf(stderr, _("Error parsing vCalendar file!\n")); fclose(file); return -1; } gn_todo_fill(ctodo, text, todo_priority); fclose(file); return 0; } gnokii-0.6.31/common/gsm-error.c0000644000175000017500000002047111666163120014560 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings, Pavel Janik Copyright (C) 2001-2003 Pawel Kot Copyright (C) 2002 Pavel Machek Copyright (C) 2002-2004 BORBELY Zoltan Error codes. */ #include "config.h" #include "compat.h" #include "misc.h" #include "gnokii.h" GNOKII_API char *gn_error_print(gn_error e) { switch (e) { case GN_ERR_NONE: return _("No error."); case GN_ERR_FAILED: return _("Command failed."); case GN_ERR_UNKNOWNMODEL: return _("Model specified isn't known/supported."); case GN_ERR_INVALIDSECURITYCODE: return _("Invalid Security code."); case GN_ERR_INTERNALERROR: return _("Problem occurred internal to model specific code."); case GN_ERR_NOTIMPLEMENTED: return _("Command called isn't implemented in model."); case GN_ERR_NOTSUPPORTED: return _("Function or connection type not supported by the phone or by the phone driver."); case GN_ERR_USERCANCELED: return _("User aborted the action."); case GN_ERR_UNKNOWN: return _("Unknown error - well better than nothing!!"); case GN_ERR_MEMORYFULL: return _("The specified memory is full."); case GN_ERR_NOLINK: return _("Couldn't establish link with phone."); case GN_ERR_TIMEOUT: return _("Command timed out."); case GN_ERR_TRYAGAIN: return _("Try again."); case GN_ERR_WAITING: return _("Waiting for the next part of the message."); case GN_ERR_NOTREADY: return _("Device not ready."); case GN_ERR_BUSY: return _("Command is still being executed."); case GN_ERR_INVALIDLOCATION: return _("The given memory location is invalid."); case GN_ERR_INVALIDMEMORYTYPE: return _("Invalid type of memory."); case GN_ERR_EMPTYLOCATION: return _("The given location is empty."); case GN_ERR_ENTRYTOOLONG: return _("The given entry is too long."); case GN_ERR_WRONGDATAFORMAT: return _("Data format is not valid."); case GN_ERR_INVALIDSIZE: return _("Wrong size of the object."); case GN_ERR_LINEBUSY: return _("Outgoing call requested reported line busy."); case GN_ERR_NOCARRIER: return _("No Carrier error during data call setup?"); case GN_ERR_UNHANDLEDFRAME: return _("The current frame isn't handled by the incoming function."); case GN_ERR_UNSOLICITED: return _("Unsolicited message received."); case GN_ERR_NONEWCBRECEIVED: return _("Attempt to read CB when no new CB received."); case GN_ERR_SIMPROBLEM: return _("SIM card missing or damaged."); case GN_ERR_CODEREQUIRED: return _("PIN or PUK code required."); case GN_ERR_NOTAVAILABLE: return _("The requested information is not available."); case GN_ERR_NOCONFIG: return _("Config file cannot be read."); case GN_ERR_NOPHONE: return _("Either global or given phone section cannot be found."); case GN_ERR_NOLOG: return _("Incorrect logging section configuration."); case GN_ERR_NOMODEL: return _("No phone model specified in the config file."); case GN_ERR_NOPORT: return _("No port specified in the config file."); case GN_ERR_NOCONNECTION: return _("No connection type specified in the config file."); case GN_ERR_LOCKED: return _("Device is locked and cannot be unlocked."); case GN_ERR_ASYNC: return _("The actual response will be sent asynchronously."); default: return _("Unknown error."); } } gn_error isdn_cause2gn_error(char **src, char **msg, unsigned char loc, unsigned char cause) { char *s, *m; gn_error err = GN_ERR_UNKNOWN; if (src == NULL) src = &s; if (msg == NULL) msg = &m; switch (loc) { case 0x00: *src = "user"; break; case 0x01: *src = "private network serving the local user"; break; case 0x02: *src = "public network serving the local user"; break; case 0x03: *src = "transit network"; break; case 0x04: *src = "public network serving the remote user"; break; case 0x05: *src = "private network serving the remote user"; break; case 0x07: *src = "international network"; break; case 0x0a: *src = "network beyond inter-working point"; break; default: *src = "unknown"; break; } switch (cause) { case 0x01: *msg = "Unallocated (unassigned) number"; break; case 0x02: *msg = "No route to specified transit network"; break; case 0x03: *msg = "No route to destination"; break; case 0x06: *msg = "Channel unacceptable"; break; case 0x07: *msg = "Call awarded and being delivered in an established channel"; break; case 0x10: *msg = "Normal call clearing"; break; case 0x11: *msg = "User busy"; break; case 0x12: *msg = "No user responding"; break; case 0x13: *msg = "No answer from user (user alerted)"; break; case 0x15: *msg = "Call rejected"; break; case 0x16: *msg = "Number changed"; break; case 0x1A: *msg = "Non-selected user clearing"; break; case 0x1B: *msg = "Destination out of order"; break; case 0x1C: *msg = "Invalid number format"; break; case 0x1D: *msg = "Facility rejected"; break; case 0x1E: *msg = "Response to status enquiry"; break; case 0x1F: *msg = "Normal, unspecified"; break; case 0x22: *msg = "No circuit or channel available"; break; case 0x26: *msg = "Network out of order"; break; case 0x29: *msg = "Temporary failure"; break; case 0x2A: *msg = "Switching equipment congestion"; break; case 0x2B: *msg = "Access information discarded"; break; case 0x2C: *msg = "Requested circuit or channel not available"; break; case 0x2F: *msg = "Resources unavailable, unspecified"; break; case 0x31: *msg = "Quality of service unavailable"; break; case 0x32: *msg = "Requested facility not subscribed"; break; case 0x39: *msg = "Bearer capability not authorised"; break; case 0x3A: *msg = "Bearer capability not presently available"; break; case 0x3F: *msg = "Service or option not available, unspecified"; break; case 0x41: *msg = "Bearer capability not implemented"; break; case 0x42: *msg = "Channel type not implemented"; break; case 0x45: *msg = "Requested facility not implemented"; break; case 0x46: *msg = "Only restricted digital information bearer"; break; case 0x4F: *msg = "Service or option not implemented, unspecified"; break; case 0x51: *msg = "Invalid call reference value"; break; case 0x52: *msg = "Identified channel does not exist"; break; case 0x53: *msg = "A suspended call exists, but this call identity does not"; break; case 0x54: *msg = "Call identity in use"; break; case 0x55: *msg = "No call suspended"; break; case 0x56: *msg = "Call having the requested call identity"; break; case 0x58: *msg = "Incompatible destination"; break; case 0x5B: *msg = "Invalid transit network selection"; break; case 0x5F: *msg = "Invalid message, unspecified"; break; case 0x60: *msg = "Mandatory information element is missing"; break; case 0x61: *msg = "Message type non-existent or not implemented"; break; case 0x62: *msg = "Message not compatible with call state or message or message type non existent or not implemented"; break; case 0x63: *msg = "Information element non-existent or not implemented"; break; case 0x64: *msg = "Invalid information element content"; break; case 0x65: *msg = "Message not compatible"; break; case 0x66: *msg = "Recovery on timer expiry"; break; case 0x6F: *msg = "Protocol error, unspecified"; break; case 0x7F: *msg = "Inter working, unspecified"; break; default: *msg = "Unknown"; break; } dprintf("\tISDN cause: %02x %02x\n", loc, cause); dprintf("\tlocation: %s\n", *src); dprintf("\tcause: %s\n", *msg); return err; } gnokii-0.6.31/common/phones/0000755000175000017500000000000011666163463014001 5ustar leoleognokii-0.6.31/common/phones/Makefile.am0000644000175000017500000000072411666163120016026 0ustar leoleoDEFS = -DCOMPILING_LIBGNOKII AM_CFLAGS = $(LIBPCSCLITE_CFLAGS) noinst_LTLIBRARIES = libPHONES.la libPHONES_la_SOURCES = \ generic.c \ nokia.c \ nk7110.c \ nk6510.c \ nk6160.c \ nk6100.c \ nk3110.c \ atgen.c \ atbosch.c \ ateric.c \ athuawei.c \ atmot.c \ atnok.c \ atsie.c \ atsoer.c \ atsam.c \ atsag.c \ atlg.c \ gnapplet.c \ fake.c \ pcsc.c libPHONES_la_CFLAGS = \ -I$(top_srcdir)/include \ $(AM_CFLAGS) EXTRA_DIST = nk2110.c dc2711.c gnokii-0.6.31/common/phones/Makefile.in0000644000175000017500000011571411666163211016046 0ustar leoleo# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = common/phones DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_expand_dir.m4 \ $(top_srcdir)/m4/acx_pthread.m4 $(top_srcdir)/m4/intltool.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libPHONES_la_LIBADD = am_libPHONES_la_OBJECTS = libPHONES_la-generic.lo \ libPHONES_la-nokia.lo libPHONES_la-nk7110.lo \ libPHONES_la-nk6510.lo libPHONES_la-nk6160.lo \ libPHONES_la-nk6100.lo libPHONES_la-nk3110.lo \ libPHONES_la-atgen.lo libPHONES_la-atbosch.lo \ libPHONES_la-ateric.lo libPHONES_la-athuawei.lo \ libPHONES_la-atmot.lo libPHONES_la-atnok.lo \ libPHONES_la-atsie.lo libPHONES_la-atsoer.lo \ libPHONES_la-atsam.lo libPHONES_la-atsag.lo \ libPHONES_la-atlg.lo libPHONES_la-gnapplet.lo \ libPHONES_la-fake.lo libPHONES_la-pcsc.lo libPHONES_la_OBJECTS = $(am_libPHONES_la_OBJECTS) libPHONES_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libPHONES_la_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libPHONES_la_SOURCES) DIST_SOURCES = $(libPHONES_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLUETOOTH_LIBS = @BLUETOOTH_LIBS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = -DCOMPILING_LIBGNOKII DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FIND = @FIND@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLDFLAGS = @GLDFLAGS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GMODULE_CFLAGS = @GMODULE_CFLAGS@ GMODULE_LIBS = @GMODULE_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GNOKII_LT_VERSION = @GNOKII_LT_VERSION@ GNOKII_LT_VERSION_AGE = @GNOKII_LT_VERSION_AGE@ GNOKII_LT_VERSION_CURRENT = @GNOKII_LT_VERSION_CURRENT@ GNOKII_LT_VERSION_REVISION = @GNOKII_LT_VERSION_REVISION@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_LIBICAL = @HAVE_LIBICAL@ HAVE_LIBUSB = @HAVE_LIBUSB@ HAVE_SOCKETPHONET = @HAVE_SOCKETPHONET@ HAVE_XGNOKII = @HAVE_XGNOKII@ ICAL_CFLAGS = @ICAL_CFLAGS@ ICAL_LIBS = @ICAL_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBGNOKII_VERSION_MAJOR = @LIBGNOKII_VERSION_MAJOR@ LIBGNOKII_VERSION_MINOR = @LIBGNOKII_VERSION_MINOR@ LIBGNOKII_VERSION_RELEASE = @LIBGNOKII_VERSION_RELEASE@ LIBGNOKII_VERSION_STRING = @LIBGNOKII_VERSION_STRING@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBPCSCLITE_CFLAGS = @LIBPCSCLITE_CFLAGS@ LIBPCSCLITE_LIBS = @LIBPCSCLITE_LIBS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKE = @MAKE@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ MYSQLCONFIG = @MYSQLCONFIG@ MYSQLCONFIG5 = @MYSQLCONFIG5@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_LIBS = @MYSQL_LIBS@ NEED_LOCALE_CHARSET = @NEED_LOCALE_CHARSET@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OWN_GETOPT = @OWN_GETOPT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PGCONFIG = @PGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSTGRES_CFLAGS = @POSTGRES_CFLAGS@ POSTGRES_LIBS = @POSTGRES_LIBS@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LIBS = @SQLITE3_LIBS@ SQLITE_CFLAGS = @SQLITE_CFLAGS@ SQLITE_LIBS = @SQLITE_LIBS@ STRIP = @STRIP@ TCP_LIBS = @TCP_LIBS@ TERMLDFLAGS = @TERMLDFLAGS@ TERMLIBS = @TERMLIBS@ USB_LIBS = @USB_LIBS@ USE_NLS = @USE_NLS@ USE_UNIX98PTYS = @USE_UNIX98PTYS@ VERSION = @VERSION@ WIN32 = @WIN32@ WIN32_CROSS = @WIN32_CROSS@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ XPACKAGE = @XPACKAGE@ XPM_CFLAGS = @XPM_CFLAGS@ XPM_LIBS = @XPM_LIBS@ XVERSION = @XVERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ acx_pthread_config = @acx_pthread_config@ 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@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CFLAGS = $(LIBPCSCLITE_CFLAGS) noinst_LTLIBRARIES = libPHONES.la libPHONES_la_SOURCES = \ generic.c \ nokia.c \ nk7110.c \ nk6510.c \ nk6160.c \ nk6100.c \ nk3110.c \ atgen.c \ atbosch.c \ ateric.c \ athuawei.c \ atmot.c \ atnok.c \ atsie.c \ atsoer.c \ atsam.c \ atsag.c \ atlg.c \ gnapplet.c \ fake.c \ pcsc.c libPHONES_la_CFLAGS = \ -I$(top_srcdir)/include \ $(AM_CFLAGS) EXTRA_DIST = nk2110.c dc2711.c all: all-am .SUFFIXES: .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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu common/phones/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu common/phones/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 $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libPHONES.la: $(libPHONES_la_OBJECTS) $(libPHONES_la_DEPENDENCIES) $(libPHONES_la_LINK) $(libPHONES_la_OBJECTS) $(libPHONES_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libPHONES_la-atbosch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libPHONES_la-ateric.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libPHONES_la-atgen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libPHONES_la-athuawei.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libPHONES_la-atlg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libPHONES_la-atmot.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libPHONES_la-atnok.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libPHONES_la-atsag.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libPHONES_la-atsam.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libPHONES_la-atsie.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libPHONES_la-atsoer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libPHONES_la-fake.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libPHONES_la-generic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libPHONES_la-gnapplet.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libPHONES_la-nk3110.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libPHONES_la-nk6100.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libPHONES_la-nk6160.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libPHONES_la-nk6510.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libPHONES_la-nk7110.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libPHONES_la-nokia.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libPHONES_la-pcsc.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @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 $@ $< libPHONES_la-generic.lo: generic.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPHONES_la_CFLAGS) $(CFLAGS) -MT libPHONES_la-generic.lo -MD -MP -MF $(DEPDIR)/libPHONES_la-generic.Tpo -c -o libPHONES_la-generic.lo `test -f 'generic.c' || echo '$(srcdir)/'`generic.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libPHONES_la-generic.Tpo $(DEPDIR)/libPHONES_la-generic.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generic.c' object='libPHONES_la-generic.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPHONES_la_CFLAGS) $(CFLAGS) -c -o libPHONES_la-generic.lo `test -f 'generic.c' || echo '$(srcdir)/'`generic.c libPHONES_la-nokia.lo: nokia.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPHONES_la_CFLAGS) $(CFLAGS) -MT libPHONES_la-nokia.lo -MD -MP -MF $(DEPDIR)/libPHONES_la-nokia.Tpo -c -o libPHONES_la-nokia.lo `test -f 'nokia.c' || echo '$(srcdir)/'`nokia.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libPHONES_la-nokia.Tpo $(DEPDIR)/libPHONES_la-nokia.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nokia.c' object='libPHONES_la-nokia.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPHONES_la_CFLAGS) $(CFLAGS) -c -o libPHONES_la-nokia.lo `test -f 'nokia.c' || echo '$(srcdir)/'`nokia.c libPHONES_la-nk7110.lo: nk7110.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPHONES_la_CFLAGS) $(CFLAGS) -MT libPHONES_la-nk7110.lo -MD -MP -MF $(DEPDIR)/libPHONES_la-nk7110.Tpo -c -o libPHONES_la-nk7110.lo `test -f 'nk7110.c' || echo '$(srcdir)/'`nk7110.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libPHONES_la-nk7110.Tpo $(DEPDIR)/libPHONES_la-nk7110.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nk7110.c' object='libPHONES_la-nk7110.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPHONES_la_CFLAGS) $(CFLAGS) -c -o libPHONES_la-nk7110.lo `test -f 'nk7110.c' || echo '$(srcdir)/'`nk7110.c libPHONES_la-nk6510.lo: nk6510.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPHONES_la_CFLAGS) $(CFLAGS) -MT libPHONES_la-nk6510.lo -MD -MP -MF $(DEPDIR)/libPHONES_la-nk6510.Tpo -c -o libPHONES_la-nk6510.lo `test -f 'nk6510.c' || echo '$(srcdir)/'`nk6510.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libPHONES_la-nk6510.Tpo $(DEPDIR)/libPHONES_la-nk6510.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nk6510.c' object='libPHONES_la-nk6510.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPHONES_la_CFLAGS) $(CFLAGS) -c -o libPHONES_la-nk6510.lo `test -f 'nk6510.c' || echo '$(srcdir)/'`nk6510.c libPHONES_la-nk6160.lo: nk6160.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPHONES_la_CFLAGS) $(CFLAGS) -MT libPHONES_la-nk6160.lo -MD -MP -MF $(DEPDIR)/libPHONES_la-nk6160.Tpo -c -o libPHONES_la-nk6160.lo `test -f 'nk6160.c' || echo '$(srcdir)/'`nk6160.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libPHONES_la-nk6160.Tpo $(DEPDIR)/libPHONES_la-nk6160.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nk6160.c' object='libPHONES_la-nk6160.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPHONES_la_CFLAGS) $(CFLAGS) -c -o libPHONES_la-nk6160.lo `test -f 'nk6160.c' || echo '$(srcdir)/'`nk6160.c libPHONES_la-nk6100.lo: nk6100.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPHONES_la_CFLAGS) $(CFLAGS) -MT libPHONES_la-nk6100.lo -MD -MP -MF $(DEPDIR)/libPHONES_la-nk6100.Tpo -c -o libPHONES_la-nk6100.lo `test -f 'nk6100.c' || echo '$(srcdir)/'`nk6100.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libPHONES_la-nk6100.Tpo $(DEPDIR)/libPHONES_la-nk6100.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nk6100.c' object='libPHONES_la-nk6100.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPHONES_la_CFLAGS) $(CFLAGS) -c -o libPHONES_la-nk6100.lo `test -f 'nk6100.c' || echo '$(srcdir)/'`nk6100.c libPHONES_la-nk3110.lo: nk3110.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPHONES_la_CFLAGS) $(CFLAGS) -MT libPHONES_la-nk3110.lo -MD -MP -MF $(DEPDIR)/libPHONES_la-nk3110.Tpo -c -o libPHONES_la-nk3110.lo `test -f 'nk3110.c' || echo '$(srcdir)/'`nk3110.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libPHONES_la-nk3110.Tpo $(DEPDIR)/libPHONES_la-nk3110.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nk3110.c' object='libPHONES_la-nk3110.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPHONES_la_CFLAGS) $(CFLAGS) -c -o libPHONES_la-nk3110.lo `test -f 'nk3110.c' || echo '$(srcdir)/'`nk3110.c libPHONES_la-atgen.lo: atgen.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPHONES_la_CFLAGS) $(CFLAGS) -MT libPHONES_la-atgen.lo -MD -MP -MF $(DEPDIR)/libPHONES_la-atgen.Tpo -c -o libPHONES_la-atgen.lo `test -f 'atgen.c' || echo '$(srcdir)/'`atgen.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libPHONES_la-atgen.Tpo $(DEPDIR)/libPHONES_la-atgen.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='atgen.c' object='libPHONES_la-atgen.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPHONES_la_CFLAGS) $(CFLAGS) -c -o libPHONES_la-atgen.lo `test -f 'atgen.c' || echo '$(srcdir)/'`atgen.c libPHONES_la-atbosch.lo: atbosch.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPHONES_la_CFLAGS) $(CFLAGS) -MT libPHONES_la-atbosch.lo -MD -MP -MF $(DEPDIR)/libPHONES_la-atbosch.Tpo -c -o libPHONES_la-atbosch.lo `test -f 'atbosch.c' || echo '$(srcdir)/'`atbosch.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libPHONES_la-atbosch.Tpo $(DEPDIR)/libPHONES_la-atbosch.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='atbosch.c' object='libPHONES_la-atbosch.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPHONES_la_CFLAGS) $(CFLAGS) -c -o libPHONES_la-atbosch.lo `test -f 'atbosch.c' || echo '$(srcdir)/'`atbosch.c libPHONES_la-ateric.lo: ateric.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPHONES_la_CFLAGS) $(CFLAGS) -MT libPHONES_la-ateric.lo -MD -MP -MF $(DEPDIR)/libPHONES_la-ateric.Tpo -c -o libPHONES_la-ateric.lo `test -f 'ateric.c' || echo '$(srcdir)/'`ateric.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libPHONES_la-ateric.Tpo $(DEPDIR)/libPHONES_la-ateric.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ateric.c' object='libPHONES_la-ateric.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPHONES_la_CFLAGS) $(CFLAGS) -c -o libPHONES_la-ateric.lo `test -f 'ateric.c' || echo '$(srcdir)/'`ateric.c libPHONES_la-athuawei.lo: athuawei.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPHONES_la_CFLAGS) $(CFLAGS) -MT libPHONES_la-athuawei.lo -MD -MP -MF $(DEPDIR)/libPHONES_la-athuawei.Tpo -c -o libPHONES_la-athuawei.lo `test -f 'athuawei.c' || echo '$(srcdir)/'`athuawei.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libPHONES_la-athuawei.Tpo $(DEPDIR)/libPHONES_la-athuawei.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='athuawei.c' object='libPHONES_la-athuawei.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPHONES_la_CFLAGS) $(CFLAGS) -c -o libPHONES_la-athuawei.lo `test -f 'athuawei.c' || echo '$(srcdir)/'`athuawei.c libPHONES_la-atmot.lo: atmot.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPHONES_la_CFLAGS) $(CFLAGS) -MT libPHONES_la-atmot.lo -MD -MP -MF $(DEPDIR)/libPHONES_la-atmot.Tpo -c -o libPHONES_la-atmot.lo `test -f 'atmot.c' || echo '$(srcdir)/'`atmot.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libPHONES_la-atmot.Tpo $(DEPDIR)/libPHONES_la-atmot.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='atmot.c' object='libPHONES_la-atmot.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPHONES_la_CFLAGS) $(CFLAGS) -c -o libPHONES_la-atmot.lo `test -f 'atmot.c' || echo '$(srcdir)/'`atmot.c libPHONES_la-atnok.lo: atnok.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPHONES_la_CFLAGS) $(CFLAGS) -MT libPHONES_la-atnok.lo -MD -MP -MF $(DEPDIR)/libPHONES_la-atnok.Tpo -c -o libPHONES_la-atnok.lo `test -f 'atnok.c' || echo '$(srcdir)/'`atnok.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libPHONES_la-atnok.Tpo $(DEPDIR)/libPHONES_la-atnok.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='atnok.c' object='libPHONES_la-atnok.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPHONES_la_CFLAGS) $(CFLAGS) -c -o libPHONES_la-atnok.lo `test -f 'atnok.c' || echo '$(srcdir)/'`atnok.c libPHONES_la-atsie.lo: atsie.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPHONES_la_CFLAGS) $(CFLAGS) -MT libPHONES_la-atsie.lo -MD -MP -MF $(DEPDIR)/libPHONES_la-atsie.Tpo -c -o libPHONES_la-atsie.lo `test -f 'atsie.c' || echo '$(srcdir)/'`atsie.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libPHONES_la-atsie.Tpo $(DEPDIR)/libPHONES_la-atsie.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='atsie.c' object='libPHONES_la-atsie.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPHONES_la_CFLAGS) $(CFLAGS) -c -o libPHONES_la-atsie.lo `test -f 'atsie.c' || echo '$(srcdir)/'`atsie.c libPHONES_la-atsoer.lo: atsoer.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPHONES_la_CFLAGS) $(CFLAGS) -MT libPHONES_la-atsoer.lo -MD -MP -MF $(DEPDIR)/libPHONES_la-atsoer.Tpo -c -o libPHONES_la-atsoer.lo `test -f 'atsoer.c' || echo '$(srcdir)/'`atsoer.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libPHONES_la-atsoer.Tpo $(DEPDIR)/libPHONES_la-atsoer.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='atsoer.c' object='libPHONES_la-atsoer.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPHONES_la_CFLAGS) $(CFLAGS) -c -o libPHONES_la-atsoer.lo `test -f 'atsoer.c' || echo '$(srcdir)/'`atsoer.c libPHONES_la-atsam.lo: atsam.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPHONES_la_CFLAGS) $(CFLAGS) -MT libPHONES_la-atsam.lo -MD -MP -MF $(DEPDIR)/libPHONES_la-atsam.Tpo -c -o libPHONES_la-atsam.lo `test -f 'atsam.c' || echo '$(srcdir)/'`atsam.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libPHONES_la-atsam.Tpo $(DEPDIR)/libPHONES_la-atsam.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='atsam.c' object='libPHONES_la-atsam.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPHONES_la_CFLAGS) $(CFLAGS) -c -o libPHONES_la-atsam.lo `test -f 'atsam.c' || echo '$(srcdir)/'`atsam.c libPHONES_la-atsag.lo: atsag.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPHONES_la_CFLAGS) $(CFLAGS) -MT libPHONES_la-atsag.lo -MD -MP -MF $(DEPDIR)/libPHONES_la-atsag.Tpo -c -o libPHONES_la-atsag.lo `test -f 'atsag.c' || echo '$(srcdir)/'`atsag.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libPHONES_la-atsag.Tpo $(DEPDIR)/libPHONES_la-atsag.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='atsag.c' object='libPHONES_la-atsag.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPHONES_la_CFLAGS) $(CFLAGS) -c -o libPHONES_la-atsag.lo `test -f 'atsag.c' || echo '$(srcdir)/'`atsag.c libPHONES_la-atlg.lo: atlg.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPHONES_la_CFLAGS) $(CFLAGS) -MT libPHONES_la-atlg.lo -MD -MP -MF $(DEPDIR)/libPHONES_la-atlg.Tpo -c -o libPHONES_la-atlg.lo `test -f 'atlg.c' || echo '$(srcdir)/'`atlg.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libPHONES_la-atlg.Tpo $(DEPDIR)/libPHONES_la-atlg.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='atlg.c' object='libPHONES_la-atlg.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPHONES_la_CFLAGS) $(CFLAGS) -c -o libPHONES_la-atlg.lo `test -f 'atlg.c' || echo '$(srcdir)/'`atlg.c libPHONES_la-gnapplet.lo: gnapplet.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPHONES_la_CFLAGS) $(CFLAGS) -MT libPHONES_la-gnapplet.lo -MD -MP -MF $(DEPDIR)/libPHONES_la-gnapplet.Tpo -c -o libPHONES_la-gnapplet.lo `test -f 'gnapplet.c' || echo '$(srcdir)/'`gnapplet.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libPHONES_la-gnapplet.Tpo $(DEPDIR)/libPHONES_la-gnapplet.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnapplet.c' object='libPHONES_la-gnapplet.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPHONES_la_CFLAGS) $(CFLAGS) -c -o libPHONES_la-gnapplet.lo `test -f 'gnapplet.c' || echo '$(srcdir)/'`gnapplet.c libPHONES_la-fake.lo: fake.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPHONES_la_CFLAGS) $(CFLAGS) -MT libPHONES_la-fake.lo -MD -MP -MF $(DEPDIR)/libPHONES_la-fake.Tpo -c -o libPHONES_la-fake.lo `test -f 'fake.c' || echo '$(srcdir)/'`fake.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libPHONES_la-fake.Tpo $(DEPDIR)/libPHONES_la-fake.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fake.c' object='libPHONES_la-fake.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPHONES_la_CFLAGS) $(CFLAGS) -c -o libPHONES_la-fake.lo `test -f 'fake.c' || echo '$(srcdir)/'`fake.c libPHONES_la-pcsc.lo: pcsc.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPHONES_la_CFLAGS) $(CFLAGS) -MT libPHONES_la-pcsc.lo -MD -MP -MF $(DEPDIR)/libPHONES_la-pcsc.Tpo -c -o libPHONES_la-pcsc.lo `test -f 'pcsc.c' || echo '$(srcdir)/'`pcsc.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libPHONES_la-pcsc.Tpo $(DEPDIR)/libPHONES_la-pcsc.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pcsc.c' object='libPHONES_la-pcsc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPHONES_la_CFLAGS) $(CFLAGS) -c -o libPHONES_la-pcsc.lo `test -f 'pcsc.c' || echo '$(srcdir)/'`pcsc.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: 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-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES 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-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gnokii-0.6.31/common/phones/nk2110.c0000644000175000017500000007432311666163120015060 0ustar leoleo/* -*- linux-c -*- G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2000-2002 Pavel Machek Copyright (C) 2001-2003 Pawel Kot Notice that this code was (partly) converted to "new" structure, but it does not have code for bus separated. I think that separating it would be waste of effort... --pavel */ #include "config.h" #ifndef WIN32 #include #include #include #include #include #include #include #include #include #include #include #include #include #undef DEBUG #include "compat.h" #include "misc.h" #include "gnokii.h" #include "device.h" #include "phones/generic.h" #include "phones/nk2110.h" #include "phones/nokia.h" #define MYID 0x78 #define ddprintf(x...) #define eprintf(x...) fprintf(stderr, x) #undef DEBUG static gn_error P2110_Functions(GSM_Operation op, GSM_Data *data, GSM_Statemachine *state); /* Global variables used by code in gsm-api.c to expose the functions supported by this model of phone. */ bool N2110_LinkOK; static char PortDevice[GSM_MAX_DEVICE_NAME_LENGTH]; static char *Revision = NULL, *RevisionDate = NULL, *Model = NULL, VersionInfo[64]; #define INFO \ { \ "2110|2140|6080", /* Models */ \ 100, /* Max RF Level */ \ 0, /* Min RF Level */ \ GRF_Percentage, /* RF level units */ \ 100, /* Max Battery Level */ \ 0, /* Min Battery Level */ \ GBU_Percentage, /* Battery level units */ \ GDT_None, /* No date/time support */ \ GDT_None, /* No alarm support */ \ 0, /* Max alarms = 0 */ \ 0, 0, /* Startup logo size */ \ 0, 0, /* Op logo size */ \ 0, 0 /* Caller logo size */ \ } static const SMSMessage_Layout nk2110_deliver = { true, /* Is the SMS type supported */ /* Last ASCIIZ string */ -1, false, false, /* SMSC */ -1, -1, -1, -1, -1, -1, -1, -1, 13, 5, -1, -1, -1, -1, /* Validity */ /* ASCIIZ second from the end */ -1, false, false, /* Remote Number */ 6, -1, /* Time */ 1, 3, 14, false /* Nonstandart fields, User Data */ }; GSM_Information N2110_Information = INFO; GSM_Phone phone_nokia_2110 = { NULL, NULL, INFO, P2110_Functions, NULL }; /* Local variables */ static volatile bool RequestTerminate; static u8 TXPacketNumber = 0x01; #define MAX_MODEL_LENGTH 16 static volatile unsigned char PacketData[10240]; static volatile bool ACKOK = false, PacketOK = false; static volatile int SMSpos = 0; static volatile unsigned char SMSData[10240]; static long long LastChar = 0; static long long GetTime(void) { struct timeval tv; gettimeofday(&tv, NULL); return (long long) tv.tv_sec * 1000000 + tv.tv_usec; } static void SigHandler(int status); #define POLLIT do { SigHandler(0); } while (0) static void yield(void) { usleep(5000); } static void Wait(long long from, int msec) { while (GetTime() < from + ((long long) msec)*1000) { yield(); POLLIT; } } static void Wait2(long long from, int msec) { while (GetTime() < from + ((long long) msec)*1000) { yield(); } } #define msleep(x) do { usleep(x*1000); } while (0) #define msleep_poll(x) do { Wait(GetTime(), x); } while (0) #define waitfor(condition, maxtime) \ do { \ long long limit = GetTime() + maxtime*1000; \ if (!maxtime) limit = 0x7fffffffffffffffULL; \ while ((!(condition)) && (limit > GetTime())) { \ yield(); \ POLLIT; \ } \ if (!(limit > GetTime())) dprintf("???? TIMEOUT!"); \ } while(0) /* Checksum calculation */ static u8 GetChecksum( u8 * packet, int len ) { u8 checksum = 0; unsigned int i; for( i = 0; i < len; i++ ) checksum ^= packet[i]; /* calculate checksum */ return checksum; } /* --------------- */ static int xread(unsigned char *d, int len) { int res; while (len) { res = device_read(d, len); if (res == -1) { if (errno != EAGAIN) { dprintf("I/O error : %m?!\n"); return -1; } else device_select(NULL); } else { d += res; len -= res; dprintf("(%d)", len); } } return 0; } static int xwrite(unsigned char *d, int len) { int res; while (len) { res = device_write(d, len); if (res == -1) { if (errno != EAGAIN) { dprintf("I/O error : %m?!\n"); return -1; } } else { d += res; len -= res; dprintf("<%d>", len); } } return 0; } /* --------------------------- */ static gn_error SendFrame( u8 *buffer, u8 command, u8 length ) { u8 pkt[10240], pkt2[10240]; int current = 0; pkt[current++] = 0x00; /* Construct the header. */ pkt[current++] = MYID; pkt[current++] = length; /* Set data size */ pkt[current++] = command; memcpy( pkt + current, buffer, length ); /* Copy in data. */ current += length; pkt[current++] = TXPacketNumber; /* Set packet number */ pkt[current++] = GetChecksum( pkt, current); /* Calculate and set checksum */ #ifdef DEBUG { int i; u8 b; dprintf( "PC : " ); for( i = 0; i < current; i++ ) { b = pkt[i]; dprintf( "[%02X %c]", b, b > 0x20 ? b : '.' ); } dprintf( "\n" ); } #endif /* DEBUG */ /* Send it out... */ ddprintf("("); Wait2(LastChar, 3); /* I should put my messages at least 2msec apart... */ ddprintf(")"); dprintf("writing..."); LastChar = GetTime(); if (xwrite(pkt, current) == -1) return GN_ERR_INTERNALERROR; if (xread(pkt2, current) == -1) return GN_ERR_INTERNALERROR; dprintf("echook"); if (memcmp(pkt, pkt2, current)) { dprintf("Bad echo?!"); msleep(1000); return GN_ERR_TIMEOUT; } return GN_ERR_NONE; } static gn_error SendCommand( u8 *buffer, u8 command, u8 length ) { int time, retries = 10; char pkt[10240]; // msleep(2); while ((time = device_read(pkt, 10240)) != -1) { int j; char b; dprintf("Spurious? (%d)", time); dprintf( "Phone: " ); for( j = 0; j < time; j++ ) { b = pkt[j]; dprintf( "[%02X %c]", b, b >= 0x20 ? b : '.' ); } msleep(2); } ACKOK = false; time = 30; while (retries--) { long long now; SendFrame(buffer, command, length); now = GetTime(); while ((GetTime() - now) < time*1000) { if (ACKOK) return GN_ERR_NONE; yield(); POLLIT; } time = 50; /* 5 seems to be enough */ dprintf("[resend]"); } dprintf("Command not okay after 10 retries!\n"); return GN_ERR_BUSY; } /* Applications should call Terminate to close the serial port. */ static void Terminate(void) { /* Request termination of thread */ RequestTerminate = true; device_close(); } static gn_error SMS(GSM_SMSMessage *message, int command) { u8 pkt[] = { 0x10, 0x02, 0, 0 }; SMSpos = 0; memset((void *) &SMSData[0], 0, 255); PacketOK = false; pkt[1] = command; pkt[2] = 1; /* == LM_SMS_MEM_TYPE_DEFAULT or LM_SMS_MEM_TYPE_SIM or LM_SMS_MEM_TYPE_ME */ pkt[3] = message->Number; SendCommand(pkt, LM_SMS_COMMAND, sizeof(pkt)); msleep_poll(300); /* We have to keep acknowledning phone's data */ waitfor(PacketOK, 1000); if (!PacketOK) { dprintf("SMS: No reply came within second!\n"); } if (PacketData[3] != LM_SMS_EVENT) { dprintf("Something is very wrong with SMS\n"); return GN_ERR_BUSY; /* FIXME */ } if ((SMSData[2]) && (SMSData[2] != message->Number)) { dprintf("Wanted message @%d, got message at @%d!\n", message->Number, SMSData[2]); return GN_ERR_BUSY; } SMSpos = 0; return GN_ERR_NONE; } static gn_error DecodeIncomingSMS(GSM_SMSMessage *m) { gn_error error; int len, i; error = GN_ERR_NONE; /* Should be moved to gsm-sms.c */ /* SMSData[0] == Memory type */ ddprintf("Status: " ); switch (SMSData[3]) { case 7: m->Type = SMS_Submit; /* m->Status = GSS_NOTSENTREAD; */ ddprintf("not sent\n"); break; case 5: m->Type = SMS_Submit; /* m->Status = GSS_SENTREAD; */ ddprintf("sent\n"); break; case 3: m->Type = SMS_Deliver; /* m->Status = GSS_NOTSENTREAD; */ ddprintf("not read\n"); break; case 1: m->Type = SMS_Deliver; /* m->Status = GSS_SENTREAD; */ ddprintf("read\n"); break; } UnpackDateTime((u8 *)SMSData+7, &m->Time); m->Length = len = SMSData[14]; ddprintf("%d bytes: ", len ); for (i = 0; i160) dprintf("Magic not allowed\n"); memset(m->UserData[0].u.Text, 0, 161); strncpy(m->UserData[0].u.Text, (void *) &SMSData[15], len); ddprintf("Text is %s\n", m->UserData[0].u.Text); /* Originator address is at 15+i, followed by message center addres (?) */ { char *s = (char *) &SMSData[15+i]; /* We discard volatile. Make compiler quiet. */ strcpy(m->RemoteNumber.number, s); s+=strlen(s)+1; strcpy(m->MessageCenter.Number, s); ddprintf("Sender = %s, MessageCenter = %s\n", m->Sender, m->MessageCenter.Name); } m->MessageCenter.No = 0; strcpy(m->MessageCenter.Name, "(unknown)"); m->UDH_No = 0; return error; } static gn_error GetSMSMessage(GSM_Data *data) { GSM_SMSMessage *m = data->SMSMessage; if (m->Number > 10) return GN_ERR_INVALIDSMSLOCATION; if (SMS(m, LM_SMS_READ_STORED_DATA) != GN_ERR_NONE) return GN_ERR_BUSY; /* FIXME */ ddprintf("Have message?\n"); if (SMSData[0] != LM_SMS_FORWARD_STORED_DATA) { ddprintf("No sms there? (%x/%d)\n", SMSData[0], SMSpos); return GN_ERR_EMPTYSMSLOCATION; } data->RawData->Length = 180; data->RawData->Data = calloc(data->RawData->Length, 1); memcpy(data->RawData->Data, (void *)SMSData+1, 180); if (ParseSMS(data, 0)) dprintf("Error in parsesms?\n"); msleep_poll(1000); /* If phone lost our ack, it might retransmit data */ return GN_ERR_NONE; } #if 0 static gn_error SendSMSMessage(GSM_SMSMessage *m) { if (m->Number > 10) return GN_ERR_INVALIDSMSLOCATION; if (SMSData[0] != 0x0b) { ddprintf("No sms there? (%x/%d)\n", SMSData[0], SMSpos); return GN_ERR_EMPTYSMSLOCATION; } ddprintf("Status: " ); switch (SMSData[3]) { case 7: m->Type = GST_MO; m->Status = GSS_NOTSENTREAD; ddprintf("not sent\n"); break; case 5: m->Type = GST_MO; m->Status = GSS_SENTREAD; ddprintf("sent\n"); break; case 3: m->Type = GST_MT; m->Status = GSS_NOTSENTREAD; ddprintf("not read\n"); break; case 1: m->Type = GST_MT; m->Status = GSS_SENTREAD; ddprintf("read\n"); break; } return GN_ERR_NONE); } #endif static gn_error DeleteSMSMessage(GSM_SMSMessage *message) { ddprintf("deleting..."); return SMS(message, 3); } /* GetRFLevel */ static int GetValue(u8 index, u8 type) { u8 pkt[] = {0x84, 2, 0}; /* Sending 4 at pkt[0] makes phone crash */ int val; pkt[0] = index; pkt[1] = type; PacketOK = false; ddprintf("\nRequesting value(%d)", index); SendCommand(pkt, 0xe5, 3); waitfor(PacketOK, 0); if ((PacketData[3] != 0xe6) || (PacketData[4] != index) || (PacketData[5] != type)) dprintf("Something is very wrong with GetValue\n"); val = PacketData[7]; ddprintf( "Value = %d\n", val ); return (val); } static gn_error GetRFLevel(GSM_RFUnits *units, float *level) { int val = GetValue(0x84, 2); float res; if (*units == GRF_Arbitrary) { res = (100* (float) val) / 60.0; /* This should be / 99.0 for some models other than nokia-2110 */ *level = 0; if (res > 10) *level = 1; if (res > 30) *level = 2; if (res > 50) *level = 3; if (res > 70) *level = 4; } else { *level = (100* (float) val) / 60.0; /* This should be / 99.0 for some models other than nokia-2110 */ *units = GRF_Percentage; } return GN_ERR_NONE; } static gn_error GetBatteryLevel(GSM_BatteryUnits *units, float *level) { int val = GetValue(0x85, 2); *level = 0; if (val >= 5) *level = 1; if (val >= 10) *level = 2; if (val >= 90) *level = 3; if (*units == GBU_Arbitrary) { } else { /* *level = (100 * (float) val) / 90.0;*/ /* 5..first bar, 10..second bar, 90..third bar */ *level = *level * 33; *units = GBU_Percentage; } return GN_ERR_NONE; } static gn_error GetVersionInfo(void) { char *s = VersionInfo; ddprintf("Getting version info...\n"); if (GetValue(0x11, 0x03) == -1) return GN_ERR_TIMEOUT; strncpy( s, (void *) &PacketData[6], sizeof(VersionInfo) ); for( Revision = s; *s != 0x0A; s++ ) if( !*s ) return GN_ERR_NONE; *s++ = 0; for( RevisionDate = s; *s != 0x0A; s++ ) if( !*s ) return GN_ERR_NONE; *s++ = 0; for( Model = s; *s != 0x0A; s++ ) if( !*s ) return GN_ERR_NONE; *s++ = 0; ddprintf("Revision %s, Date %s, Model %s\n", Revision, RevisionDate, Model ); return GN_ERR_NONE; } /* Our "Not implemented" functions */ static gn_error GetMemoryStatus(GSM_MemoryStatus *Status) { switch(Status->MemoryType) { case GMT_ME: Status->Used = 0; Status->Free = 150; break; case GMT_LD: Status->Used = 5; Status->Free = 0; break; case GMT_ON: Status->Used = 1; Status->Free = 0; break; case GMT_SM: Status->Used = 0; Status->Free = 150; break; default: return GN_ERR_NOTIMPLEMENTED; } return GN_ERR_NONE; } static bool SendRLPFrame(RLP_F96Frame *frame, bool out_dtx) { return false; } static char * Display(u8 b, int shift, char *s, char *buf) { b >>= shift; b &= 0x03; switch (b) { case 0: break; case 1: case 2: *buf++ = '!'; case 3: strcpy(buf, s); buf += strlen(s); *buf++ = ' '; } return buf; } static void (*OutputFn)(GSM_DrawMessage *DrawMessage); static gn_error (*OnSMSFn)(GSM_SMSMessage *m); int SMSReady = 0; static int CheckIncomingSMS(int at) { GSM_SMSMessage m; dprintf("Check message at %d\n", at); memset(&m, 0, sizeof(m)); m.Number = at; m.MemoryType = GMT_ME; #if 0 if (GetSMSMessage(&m) != GN_ERR_NONE) { return 0; } #endif #warning Need to do something with data... somehow. if (OnSMSFn) OnSMSFn(&m); DeleteSMSMessage(&m); return 1; } static int HandlePacket(void) { GSM_DrawMessage drawmsg; int i; int lsize[5] = {10, 10, 10, 3, 12}; char *t; dprintf("[%x]", PacketData[3]); switch(PacketData[3]) { case 0x12: { /* Text from display */ drawmsg.Command = GSM_Draw_ClearScreen; if (OutputFn) OutputFn(&drawmsg); t = (char *)&PacketData[8]; for (i = 0; i < 5; i++) { drawmsg.Command = GSM_Draw_DisplayText; drawmsg.Data.DisplayText.x = 0; drawmsg.Data.DisplayText.y = ((i+1)*48)/DRAW_MAX_SCREEN_HEIGHT; strncpy(drawmsg.Data.DisplayText.text, t, lsize[i]); drawmsg.Data.DisplayText.text[ lsize[i] ] = 0; if (OutputFn) OutputFn(&drawmsg); t += lsize[i]; } return 1; } case 0x2f: { /* Display lights */ #define COPYFLAG(x, y, z) if (PacketData[x] & (1 << (y))) drawmsg.Data.DisplayStatus |= (1 << (z)) drawmsg.Data.DisplayStatus = 0; drawmsg.Command = GSM_Draw_DisplayStatus; COPYFLAG(7, 2, DS_Unread_SMS); if (OutputFn) OutputFn(&drawmsg); #if 0 /* Please convert it. I didn't managed to convert the rest... :-( - bozo */ char buf[10240], *s = buf; #undef COPY #define COPY(x, y, z) s = Display(PacketData[x], y, z, s) /* Valid for 2110 */ COPY(4, 0, "d"); COPY(4, 2, "b"); COPY(4, 4, "a"); COPY(4, 6, "lights"); COPY(5, 0, "service"); COPY(5, 2, "scroll_up"); COPY(5, 4, "scroll_down"); COPY(5, 6, "ABC"); COPY(6, 0, "2.>"); COPY(6, 2, "1.>"); COPY(6, 4, "roam"); COPY(6, 6, "handset"); COPY(7, 0, "vmail"); COPY(7, 2, "envelope"); COPY(7, 4, "battbar"); COPY(7, 6, "3.>"); COPY(8, 0, "?1"); COPY(8, 2, "?2"); COPY(8, 4, "fieldbar"); COPY(8, 6, "ring"); *s++ = 0; if (OutputFn) (*OutputFn)(NULL, buf); return 1; #undef COPY #endif } case LM_SMS_EVENT: /* SMS Data */ /* copy bytes 5+ to smsbuf */ ddprintf("SMSdata:"); { int i; for (i=5; i= 0x20 ? b : '.' ); continue; } else { pkt[Index++] = b; if(Index == 3) { Length = b + 6; if (b == 0x7f) Length = 5; if (b == 0x7e) Length = 8; } if(Index >= Length) { if((pkt[0] == MYID || pkt[0]==0xf8) && pkt[1] == 0x00) /* packet from phone */ { ddprintf( "Phone: " ); for( j = 0; j < Length; j++ ) { b = pkt[j]; ddprintf( "[%02X %c]", b, b >= 0x20 ? b : '.' ); } ddprintf( "\n" ); /* ensure that we received valid packet */ if(pkt[Length - 1] != GetChecksum(pkt, Length-1)) { dprintf( "***bad checksum***"); } else { if((pkt[2] == 0x7F) || (pkt[2] == 0x7E)) /* acknowledge by phone */ { if (pkt[2] == 0x7F) { dprintf( "[ack]" ); /* Set ACKOK flag */ ACKOK = true; /* Increase TX packet number */ } else { dprintf( "[registration ack]" ); N2110_LinkOK = true; } TXPacketNumber++; } else { /* Copy packet data */ dprintf( "[data]" ); memcpy((void *) PacketData,pkt,Length); /* send acknowledge packet to phone */ msleep(10); ack[0] = 0x00; /* Construct the header. */ ack[1] = pkt[0]; /* Send back id */ ack[2] = 0x7F; /* Set special size value */ ack[3] = pkt[Length - 2]; /* Send back packet number */ ack[4] = GetChecksum( ack, 4); /* Set checksum */ ddprintf("PC : "); for( j = 0; j < 5; j++ ) { b = ack[j]; ddprintf( "[%02X %c]", b, b >= 0x20 ? b : '.' ); } ddprintf( "\n" ); LastChar = GetTime(); if( xwrite( ack, 5 ) == -1 ) perror( _("Write error!\n") ); if( xread( ack, 5 ) == -1 ) perror( _("Read ack error!\n") ); /* Set validity flag */ if (!HandlePacket()) PacketOK = true; } } } else dprintf("Got my own echo? That should not be possible!\n"); /* Look for new packet */ Index = 0; Length = 5; } } } if (SMSReady) { int at = SMSReady; SMSReady = 0; if (!CheckIncomingSMS(at)) dprintf("Could not find promissed message?\n"); } } /* Called by initialisation code to open comm port in asynchronous mode. */ bool OpenSerial(void) { int result; ddprintf("Setting MBUS communication with 2110...\n"); result = device_open(PortDevice, true, false, false, GCT_Serial); if (!result) { dprintf( "Failed to open %s ...\n", PortDevice); return false; } ddprintf("%s opened...\n", PortDevice); device_changespeed(9600); device_setdtrrts(1, 1); return true; } static gn_error SetKey(int c, int up) { u8 reg[] = { 0x7a /* RPC_UI_KEY_PRESS or RPC_UI_KEY_RELEASE */, 0, 1, 0 /* key code */ }; reg[0] += up; reg[3] = c; dprintf("\n Pressing %d\n", c ); PacketOK = false; SendCommand( reg, 0xe5, 4 ); waitfor(PacketOK, 0); return GN_ERR_NONE; } #define XCTRL(a) (a&0x1f) #define POWER XCTRL('o') #define SEND XCTRL('t') #define END XCTRL('s') #define CLR XCTRL('h') #define MENU XCTRL('d') #define ALPHA XCTRL('a') #define PLUS XCTRL('b') #define MINUS XCTRL('e') #define PREV XCTRL('p') #define NEXT XCTRL('n') #define SOFTA XCTRL('x') #define SOFTB XCTRL('q') static char lastkey; static void PressKey(char c, int i) { lastkey = c; #define X( a, b ) case a: SetKey(b, i); break; switch (c) { case '1' ... '9': SetKey(c-'0',i); break; X('0', 10) X('#', 11) X('*', 12) X(POWER, 13) X(SEND, 14) X(END, 15) X(PLUS, 16) X(MINUS, 17) X(CLR, 18) X(MENU, 21) X(ALPHA, 22) X(PREV, 23) X(NEXT, 24) X(SOFTA, 25) X(SOFTB, 26) #if 0 X(STO, 19) /* These are not present on 2110, so I can't test this. Enable once tested. */ X(RCL, 20) X(MUTE, 28) #endif default: dprintf("Unknown key %d\n", c); } #undef X } static void PressString(char *s, int upcase) { static int lastchar; static int lastupcase = 1; if (lastchar == *s) { dprintf("***collision"); PressKey(ALPHA, 0); PressKey(ALPHA, 0); lastupcase = 1; } while (*s) { lastchar = *s; PressKey(*s, 0); if (upcase != lastupcase) { dprintf("***size change"); msleep_poll(1500); PressKey(*s, 1); lastupcase = upcase; } s++; } } /* * This is able to press keys at 62letters/36seconds, tested on message * "Tohle je testovaci zprava schvalne za jak dlouho ji to napise" * Well, it is possible to write that message in 17seconds... */ static void HandleKey(char c) { switch(c) { #define X(a, b) case a: PressString(b, 0); break; X('-', "1"); X('?', "11"); X('!', "111"); X(',', "1111"); X('.', "11111"); X(':', "111111"); X('"', "1111111"); X('\'', "11111111"); X('&', "111111111"); X('$', "1111111111"); /* X('$', "11111111111"); libra, not in ascii */ X('(', "111111111111"); X(')', "1111111111111"); X('/', "11111111111111"); X('%', "111111111111111"); X('@', "1111111111111111"); X('_', "11111111111111111"); X('=', "111111111111111111"); X('a', "2"); X('b', "22"); X('c', "222"); X('d', "3"); X('e', "33"); X('f', "333"); X('g', "4"); X('h', "44"); X('i', "444"); X('j', "5"); X('k', "55"); X('l', "555"); X('m', "6"); X('n', "66"); X('o', "666"); X('p', "7"); X('q', "77"); X('r', "777"); X('s', "7777"); X('t', "8"); X('u', "88"); X('v', "888"); X('w', "9"); X('x', "99"); X('y', "999"); X('z', "9999"); #undef X #define X(a, b) case a: PressString(b, 1); break; X('A', "2"); X('B', "22"); X('C', "222"); X('D', "3"); X('E', "33"); X('F', "333"); X('G', "4"); X('H', "44"); X('I', "444"); X('J', "5"); X('K', "55"); X('L', "555"); X('M', "6"); X('N', "66"); X('O', "666"); X('P', "7"); X('Q', "77"); X('R', "777"); X('S', "7777"); X('T', "8"); X('U', "88"); X('V', "888"); X('W', "9"); X('X', "99"); X('Y', "999"); X('Z', "9999"); #undef X case ' ': PressKey('#', 0); break; case '+': PressKey(ALPHA, 0); PressKey('*', 0); PressKey('*', 0); PressKey(ALPHA, 0); break; case '*': case '#': case '0' ... '9': PressKey(ALPHA, 0); PressKey(c, 0); PressKey(ALPHA, 0); break; default: PressKey(c, 0); } } static gn_error HandleString(char *s) { while (*s) { HandleKey(*s); s++; } dprintf("***end of input"); PressKey(lastkey, 1); return GN_ERR_NONE; } static void Register(void) { u8 reg[] = { 1, 1, 0x0f, 1, 0x0f }; SendFrame( reg, 0xe9, 5 ); } static gn_error EnableDisplayOutput(GSM_Statemachine *sm) { /* LN_UC_SHARE, LN_UC_SHARE, LN_UC_RELEASE, LN_UC_RELEASE, LN_UC_KEEP */ u8 pkt[] = {3, 3, 0, 0, 1}; msleep_poll(500); dprintf("\nShould display output\n"); if (!OutputFn) { pkt[0] = 0; pkt[1] = 0; } PacketOK = false; SendCommand(pkt, 0x19, 5); dprintf("\nGrabbing display"); waitfor(PacketOK, 0); if ((PacketData[3] != 0xcd) || (PacketData[2] != 1) || (PacketData[4] != 1 /* LN_UC_REQUEST_OK */)) dprintf("Something is very wrong with GrabDisplay\n"); dprintf("Display grabbed okay (waiting)\n"); msleep_poll(500); dprintf("Okay\n"); return GN_ERR_NONE; } static gn_error SMS_Reserve(GSM_Statemachine *sm) { u8 pkt[] = { 0x10, LM_SMS_RESERVE_PP, LN_SMS_NORMAL_RESERVE }; PacketOK = false; msleep_poll(3000); SendCommand(pkt, LM_SMS_COMMAND, sizeof(pkt)); PacketOK = 0; waitfor(PacketOK, 100); if (!PacketOK) dprintf("No reply trying to reserve SMS-es\n"); if (PacketData[3] != LM_SMS_EVENT) dprintf("Bad reply trying to reserve SMS-es\n"); if (SMSData[0] != LM_SMS_PP_RESERVE_COMPLETE) dprintf("Not okay trying to reserve SMS-es (%d)\n", SMSData[0]); SMSpos = 0; return GN_ERR_NONE; } static gn_error SMS_UnReserve(GSM_Statemachine *sm) { u8 pkt[] = {0x10, LM_SMS_UNRESERVE_PP }; PacketOK = false; msleep_poll(3000); SendCommand(pkt, LM_SMS_COMMAND, sizeof(pkt)); SMSpos = 0; return GN_ERR_NONE; } /* This is the main loop for the MB21 functions. When N2110_Initialise is called a thread is created to run this loop. This loop is exited when the application calls the N2110_Terminate function. */ static void RegisterMe(void) { dprintf("Initializing... "); /* Do initialisation stuff */ LastChar = GetTime(); if (OpenSerial() != true) { N2110_LinkOK = false; return; } msleep(100); while(!N2110_LinkOK) { dprintf("registration... "); Register(); msleep_poll(100); } dprintf("okay\n"); } /* Initialise variables and state machine. */ static gn_error Initialise(GSM_Statemachine *state) { GSM_Data data; /* Copy in the phone info */ memcpy(&(state->Phone), &phone_nokia_2110, sizeof(GSM_Phone)); layout.Type = 8; layout.SendHeader = 6; layout.ReadHeader = 4; layout.Deliver = nk2110_deliver; RequestTerminate = false; N2110_LinkOK = false; setvbuf(stdout, NULL, _IONBF, 0); setvbuf(stderr, NULL, _IONBF, 0); memset(VersionInfo, 0, sizeof(VersionInfo)); strcpy(PortDevice, state->Link.PortDevice); switch (state->Link.ConnectionType) { case GCT_Serial: RegisterMe(); break; default: return GN_ERR_NOTSUPPORTED; break; } SM_Initialise(state); GSM_DataClear(&data); return GN_ERR_NONE; } /* Routine to get specifed phone book location. Designed to be called by application. Will block until location is retrieved or a timeout/error occurs. */ static gn_error GetPhonebookLocation(GSM_PhonebookEntry *entry) { u8 pkt[] = {0x1a, 0 /* 1 == phone */, 0}; int i; pkt[1] = 3 + (entry->MemoryType != GMT_ME); pkt[2] = entry->Location; PacketOK = false; SendCommand(pkt, LN_LOC_COMMAND, 3); waitfor(PacketOK, 0); if ((PacketData[3] != 0xc9) || (PacketData[4] != 0x1a)) { dprintf("Something is very wrong with GetPhonebookLocation\n"); return GN_ERR_BUSY; } ddprintf("type= %x\n", PacketData[5]); ddprintf("location= %x\n", PacketData[6]); ddprintf("status= %x\n", PacketData[7]); for (i=8; PacketData[i]; i++) { ddprintf("%c", PacketData[i]); } strcpy(entry->Name, (void *)&PacketData[8]); i++; strcpy(entry->Number, (void *)&PacketData[i]); for (; PacketData[i]; i++) { ddprintf("%c", PacketData[i]); } ddprintf("\n"); entry->Empty = false; entry->Group = 0; return GN_ERR_NONE; } /* Routine to write phonebook location in phone. Designed to be called by application code. Will block until location is written or timeout occurs. */ static gn_error WritePhonebookLocation(GSM_PhonebookEntry *entry) { u8 pkt[999] = {0x1b, 0 /* 1 == phone */, 0}; pkt[1] = 3 + (entry->MemoryType != GMT_ME); pkt[2] = entry->Location; strcpy(&pkt[3], entry->Name); strcpy(&pkt[3+strlen(entry->Name)+1], entry->Number); PacketOK = false; SendCommand(pkt, LN_LOC_COMMAND, 3+strlen(entry->Number)+strlen(entry->Name)+2); waitfor(PacketOK, 0); printf("okay?\n"); if ((PacketData[3] != 0xc9) || (PacketData[4] != 0x1b)) { dprintf("Something is very wrong with WritePhonebookLocation\n"); return GN_ERR_BUSY; } printf("type= %x\n", PacketData[5]); printf("location= %x\n", PacketData[6]); printf("status= %x\n", PacketData[7]); return GN_ERR_NONE; } static gn_error GetSMSStatus(GSM_SMSMemoryStatus *Status) { Status->Unread = 0; Status->Number = 5; return GN_ERR_NONE; } static gn_error link_Loop(struct timeval *tm) { POLLIT; return GN_ERR_NONE; } gn_error P2110_Functions(GSM_Operation op, GSM_Data *data, GSM_Statemachine *state) { gn_error err = GN_ERR_NONE; // printf("Asked for %d\n", op); switch (op) { case GOP_Init: state->Link.Loop = link_Loop; err = Initialise(state); break; case GOP_Terminate: /* Request termination of thread */ RequestTerminate = true; return PGEN_Terminate(data, state); case GOP_Identify: case GOP_GetModel: case GOP_GetRevision: if (!Model) err = GetVersionInfo(); if (err) break; if (data->Model) strncpy(data->Model, Model, 64); if (data->Revision) strncpy(data->Revision, Revision, 64); break; case GOP_GetBatteryLevel: err = GetBatteryLevel(data->BatteryUnits, data->BatteryLevel); break; case GOP_GetRFLevel: err = GetRFLevel(data->RFUnits, data->RFLevel); break; #if 0 case GOP_GetMemoryStatus: err = N2110_GetMemoryStatus(data, state); break; #endif case GOP_DisplayOutput: OutputFn = data->DisplayOutput->OutputFn; err = EnableDisplayOutput(state); break; case GOP_GetSMS: msleep(100); err = GetSMSMessage(data); break; case GOP_DeleteSMS: err = SMS(data->SMSMessage, 3); break; case GOP_ReadPhonebook: err = GetPhonebookLocation(data->PhonebookEntry); break; case GOP_WritePhonebook: err = WritePhonebookLocation(data->PhonebookEntry); break; case GOP_OnSMS: OnSMSFn = data->OnSMS; if (OnSMSFn) { CheckIncomingSMS(1); CheckIncomingSMS(2); CheckIncomingSMS(3); CheckIncomingSMS(4); CheckIncomingSMS(5); err = SMS_Reserve(state); } else err = SMS_UnReserve(state); break; case GOP_PollSMS: /* Our phone is able to notify us... but we do not want to burn 100% CPU polling */ { struct timeval tm; static long long lastpoll = 0; tm.tv_sec = 0; tm.tv_usec = 50000; device_select(&tm); if (lastpoll + 10000000 < GetTime()) { dprintf("Trying to capture leftover messages\n"); CheckIncomingSMS(1); CheckIncomingSMS(2); CheckIncomingSMS(3); CheckIncomingSMS(4); CheckIncomingSMS(5); } sleep(4); } break; case GOP_PollDisplay: break; default: err = GN_ERR_NOTIMPLEMENTED; } return err; } #endif /* WIN32 */ gnokii-0.6.31/common/phones/athuawei.c0000644000175000017500000000257111666163120015747 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2009 Daniele Forsi This file provides functions specific to at commands on Huawei phones. See README for more details on supported mobile phones. */ #include "config.h" #include "phones/atgen.h" #include "phones/athuawei.h" void at_huawei_init(char* foundmodel, char* setupmodel, struct gn_statemachine *state) { /* * Affected phones: Huawei E172 (E17X according to --identify) * * AT+CNMI=2,1 is supported but +CMTI notifications are sent only with * AT+CNMI=1,1 and only on the second port (eg. /dev/ttyUSB1 not /dev/ttyUSB0) */ AT_DRVINST(state)->cnmi_mode = 1; } gnokii-0.6.31/common/phones/atmot.c0000644000175000017500000000506311666163120015263 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2006, 2007 Bastien Nocera This file provides functions specific to at commands on motorola phones. See README for more details on supported mobile phones. */ #include "config.h" #include #include #include #include "compat.h" #include "misc.h" #include "gnokii.h" #include "phones/generic.h" #include "phones/atgen.h" #include "phones/atmot.h" static at_recv_function_type identify; static gn_error ReplyIdentify(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state) { at_line_buffer buf; gn_error error; char *model; /* If we got incorrect answer, fallback to the default handler; * we got error handling in there. * strlen(buffer) < 2 is to avoid overflow with buffer + 1 */ if (strlen(buffer) < 2 || strncmp(buffer + 1, "AT+CGMM", 7) != 0) { return (*identify)(messagetype, buffer, length, data, state); } if ((error = at_error_get(buffer, state)) != GN_ERR_NONE) return error; buf.line1 = buffer + 1; buf.length = length; splitlines(&buf); /* The line usually looks like: * +CGMM: "GSM900","GSM1800","GSM1900","GSM850","MODEL=V547" */ model = strstr(buf.line2, "MODEL="); if (!model) { snprintf(data->model, GN_MODEL_MAX_LENGTH, "%s", strip_quotes(buf.line2 + 1 + strlen("+CGMM: "))); } else { snprintf(data->model, GN_MODEL_MAX_LENGTH, "%s", strip_quotes(model + strlen("MODEL="))); model = strchr(data->model, '"'); if (model) *model = '\0'; } return GN_ERR_NONE; } void at_motorola_init(char* foundmodel, char* setupmodel, struct gn_statemachine *state) { /* Motorolas support mode 3 and 0, but mode 0 is pretty useless */ AT_DRVINST(state)->cnmi_mode = 3; identify = at_insert_recv_function(GN_OP_Identify, ReplyIdentify, state); } gnokii-0.6.31/common/phones/nk6510.c0000644000175000017500000063260711666163120015075 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2002 Markus Plail Copyright (C) 2002-2006 BORBELY Zoltan Copyright (C) 2002-2011 Pawel Kot This file provides functions specific to the Nokia 6510 series. See README for more details on supported mobile phones. The various routines are called nk6510_(whatever). */ #include "config.h" #include #include #include #include "compat.h" #include "misc.h" #include "gnokii-internal.h" #include "nokia-decoding.h" #include "phones/generic.h" #include "phones/nk6510.h" #include "links/fbus.h" #include "links/fbus-phonet.h" #include "phones/nokia.h" #include "map.h" #define DRVINSTANCE(s) (*((nk6510_driver_instance **)(&(s)->driver.driver_instance))) #define FREE(p) do { free(p); (p) = NULL; } while (0) #define SEND_MESSAGE_BLOCK(type, length) \ do { \ if (sm_message_send(length, type, req, state)) return GN_ERR_NOTREADY; \ return sm_block(type, data, state); \ } while (0) #define SEND_MESSAGE_WAITFOR(type, length) \ do { \ if (sm_message_send(length, type, req, state)) return GN_ERR_NOTREADY; \ return sm_wait_for(type, data, state); \ } while (0) /* This is for Series40 3rd Edition and later */ /* Mapping from path to memory type */ typedef struct { gn_memory_type type; char *path; } path2mt_t; static struct map *file_cache_map = NULL; static struct map *location_map = NULL; static path2mt_t s40_30_mt_mappings[] = { { GN_MT_IN, "C:\\predefmessages\\1\\" }, { GN_MT_OUS, "C:\\predefmessages\\2\\" }, { GN_MT_OU, "C:\\predefmessages\\3\\" }, { GN_MT_AR, "C:\\predefmessages\\4\\" }, { GN_MT_DR, "C:\\predefmessages\\5\\" }, { GN_MT_TE, "C:\\predefmessages\\6\\" }, { GN_MT_F1, "C:\\predefmessages\\20\\" }, { GN_MT_F2, "C:\\predefmessages\\21\\" }, { GN_MT_F3, "C:\\predefmessages\\22\\" }, { GN_MT_F4, "C:\\predefmessages\\23\\" }, { GN_MT_F5, "C:\\predefmessages\\24\\" }, { GN_MT_F6, "C:\\predefmessages\\25\\" }, { GN_MT_F7, "C:\\predefmessages\\26\\" }, { GN_MT_F8, "C:\\predefmessages\\27\\" }, { GN_MT_F9, "C:\\predefmessages\\28\\" }, { GN_MT_F10, "C:\\predefmessages\\29\\" }, { GN_MT_F11, "C:\\predefmessages\\2A\\" }, { GN_MT_F12, "C:\\predefmessages\\2B\\" }, { GN_MT_F13, "C:\\predefmessages\\2C\\" }, { GN_MT_F14, "C:\\predefmessages\\2D\\" }, { GN_MT_F15, "C:\\predefmessages\\2E\\" }, { GN_MT_F16, "C:\\predefmessages\\2F\\" }, { GN_MT_F17, "C:\\predefmessages\\30\\" }, { GN_MT_F18, "C:\\predefmessages\\31\\" }, { GN_MT_F19, "C:\\predefmessages\\32\\" }, { GN_MT_F20, "C:\\predefmessages\\33\\" }, { -1, NULL } }; static int match_sms_folder_mt(gn_memory_type mt) { int i; for (i = 0; (s40_30_mt_mappings[i].type != mt) && (s40_30_mt_mappings[i].path != NULL); i++); if (s40_30_mt_mappings[i].path == NULL) return -1; else return i; } static int match_sms_folder_str(const char *str) { int i; char path[128]; sprintf(path, "C:\\predefmessages\\%s\\", str); for (i = 0; (s40_30_mt_mappings[i].path != NULL) && strcmp(path, s40_30_mt_mappings[i].path); i++) { #if 0 dprintf("comparing %s and %s\n", path, s40_30_mt_mappings[i].path); #endif } if (s40_30_mt_mappings[i].path == NULL) return -1; else return i; } static gn_sms_message_status GetMessageStatus_S40_30(const char *filename) { if (!filename || strlen(filename) < 27) return GN_SMS_Unknown; switch (filename[26]) { case '1': case '3': /* SMS sending failed */ case '6': return GN_SMS_Unsent; case '2': return GN_SMS_Sent; case '4': return GN_SMS_Unread; case '5': return GN_SMS_Read; case 'A': /* MMS is being downloaded */ return GN_SMS_Unread; default: dprintf("Unknown message status '%c'\n", filename[26]); return GN_SMS_Unknown; } } #define ALLOC_CHUNK 128 /* * Helper function for file list operations. * When adding a new file to a file list, we need to allocate additional * memory for the file structure. Not to waste too much time for that, * initially allocate space for 128 files, if it is not enough increase * to 256 files, if it is not enough -- 512 files, ... * FIXME: add a name of this algorithm. */ static void inc_filecount(gn_file_list *fl) { fl->file_count++; /* First initialization */ if (!fl->files) { fl->size = ALLOC_CHUNK; fl->files = calloc(fl->size, sizeof(char *)); return; } /* * If we're out of space, allocate twice as much memory as we have * right now. */ if (fl->file_count >= fl->size) { fl->size *= 2; fl->files = realloc(fl->files, fl->size * sizeof(char *)); return; } return; } /* Functions prototypes */ static gn_error NK6510_Functions(gn_operation op, gn_data *data, struct gn_statemachine *state); static gn_error NK6510_Initialise(struct gn_statemachine *state); static gn_error NK6510_Terminate(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_GetModel(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_GetRevision(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_GetIMEI(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_Identify(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_GetBatteryLevel(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_GetRFLevel(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_SetBitmap(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_GetBitmap(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_WritePhonebookLocation(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_ReadPhonebook(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_DeletePhonebookLocation(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_GetSpeedDial(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_SetSpeedDial(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_GetMemoryStatus(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_GetNetworkInfo(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_GetSMSCenter(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_GetDateTime(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_GetAlarm(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_SetDateTime(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_SetAlarm(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_GetCalendarNote(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_WriteCalendarNote(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_WriteCalendarNote_S40_30(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_DeleteCalendarNote(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_DeleteWAPBookmark(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_GetWAPBookmark(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_WriteWAPBookmark(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_GetWAPSetting(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_ActivateWAPSetting(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_WriteWAPSetting(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_SendSMS(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_SaveSMS(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_GetSMS(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_GetSMS_S40_30(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_GetSMSnoValidate(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_CreateSMSFolder(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_DeleteSMSFolder(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_GetSMSFolders(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_GetSMSFolderStatus(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_GetSMSStatus(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_DeleteSMS(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_DeleteSMS_S40_30(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_DeleteSMSnoValidate(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_GetMMS(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_GetMMS_S40_30(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_GetMMSList_S40_30(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_DeleteMMS(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_DeleteMMS_S40_30(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_GetRingtoneList(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_GetRawRingtone(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_SetRawRingtone(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_GetRingtone(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_SetRingtone(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_DeleteRingtone(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_PlayTone(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_GetProfile(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_SetProfile(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_PressOrReleaseKey(gn_data *data, struct gn_statemachine *state, bool press); static gn_error NK6510_Subscribe(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_GetActiveCalls(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_MakeCall(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_CancelCall(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_AnswerCall(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_Reset(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_GetFileListCache(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_GetFileList(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_GetFileId(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_GetFile(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_GetFileById(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_PutFile(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_DeleteFile(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_DeleteFileById(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_GetFileDetailsById(gn_data *data, struct gn_statemachine *state); #ifdef SECURITY static gn_error NK6510_GetSecurityCodeStatus(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_EnterSecurityCode(gn_data *data, struct gn_statemachine *state); #endif static gn_error NK6510_GetToDo(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_DeleteAllToDoLocations(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_WriteToDo(gn_data *data, struct gn_statemachine *state); static gn_error NK6510_IncomingIdentify(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error NK6510_IncomingPhonebook(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error NK6510_IncomingNetwork(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error NK6510_IncomingBattLevel(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error NK6510_IncomingStartup(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error NK6510_IncomingSMS(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error NK6510_IncomingFolder(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error NK6510_IncomingClock(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error NK6510_IncomingCalendar(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error NK6510_IncomingRingtone(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error NK6510_IncomingProfile(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error NK6510_IncomingKeypress(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error NK6510_IncomingSubscribe(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error NK6510_IncomingCommStatus(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error NK6510_IncomingWAP(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error NK6510_IncomingToDo(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error NK6510_IncomingSound(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error NK6510_IncomingReset(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error NK6510_IncomingRadio(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error NK6510_IncomingFile(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); #ifdef SECURITY static gn_error NK6510_IncomingSecurity(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); #endif static int sms_encode(gn_data *data, struct gn_statemachine *state, unsigned char *req); static int get_memory_type(gn_memory_type memory_type); static gn_memory_type get_gn_memory_type(int memory_type); /* Some globals */ static gn_incoming_function_type nk6510_incoming_functions[] = { { NK6510_MSG_RESET, NK6510_IncomingReset }, { NK6510_MSG_FOLDER, NK6510_IncomingFolder }, { NK6510_MSG_SMS, NK6510_IncomingSMS }, { NK6510_MSG_PHONEBOOK, NK6510_IncomingPhonebook }, { NK6510_MSG_NETSTATUS, NK6510_IncomingNetwork }, { NK6510_MSG_CALENDAR, NK6510_IncomingCalendar }, { NK6510_MSG_BATTERY, NK6510_IncomingBattLevel }, { NK6510_MSG_CLOCK, NK6510_IncomingClock }, { NK6510_MSG_IDENTITY, NK6510_IncomingIdentify }, { NK6510_MSG_STLOGO, NK6510_IncomingStartup }, { NK6510_MSG_PROFILE, NK6510_IncomingProfile }, { NK6510_MSG_RINGTONE, NK6510_IncomingRingtone }, { NK6510_MSG_KEYPRESS, NK6510_IncomingKeypress }, #ifdef SECURITY { NK6510_MSG_SECURITY, NK6510_IncomingSecurity }, #endif { NK6510_MSG_SUBSCRIBE, NK6510_IncomingSubscribe }, { NK6510_MSG_COMMSTATUS, NK6510_IncomingCommStatus }, { NK6510_MSG_WAP, NK6510_IncomingWAP }, { NK6510_MSG_TODO, NK6510_IncomingToDo }, { NK6510_MSG_SOUND, NK6510_IncomingSound }, { NK6510_MSG_RADIO, NK6510_IncomingRadio }, { NK6510_MSG_FILE, NK6510_IncomingFile }, { 0, NULL } }; gn_driver driver_nokia_6510 = { nk6510_incoming_functions, pgen_incoming_default, /* Mobile phone information */ { "6510|6310|8310|6310i|6360|6610|6100|5100|3510|3510i|3595|6800|6810|6820|6820b|6610i|6230|6650|7210|7250|7250i|7600|6170|6020|6230i|5140|5140i|6021|6500|6220|3120b|3100|3120|6015i|6101|6680|6280|3220|6136|6233|6822|6300|6030|3110c|series60|series40", /* Supported models */ 7, /* Max RF Level */ 0, /* Min RF Level */ GN_RF_Percentage, /* RF level units */ 7, /* Max Battery Level */ 0, /* Min Battery Level */ GN_BU_Percentage, /* Battery level units */ GN_DT_DateTime, /* Have date/time support */ GN_DT_TimeOnly, /* Alarm supports time only */ 1, /* Alarms available - FIXME */ 65, 96, /* Startup logo size */ 21, 78, /* Op logo size */ 14, 72 /* Caller logo size */ }, NK6510_Functions, NULL }; /* FIXME - a little macro would help here... */ static gn_error NK6510_Functions(gn_operation op, gn_data *data, struct gn_statemachine *state) { if (!DRVINSTANCE(state) && op != GN_OP_Init) return GN_ERR_INTERNALERROR; switch (op) { case GN_OP_Init: return NK6510_Initialise(state); case GN_OP_Terminate: return NK6510_Terminate(data, state); case GN_OP_GetModel: return NK6510_GetModel(data, state); case GN_OP_GetRevision: return NK6510_GetRevision(data, state); case GN_OP_GetImei: return NK6510_GetIMEI(data, state); case GN_OP_Identify: return NK6510_Identify(data, state); case GN_OP_GetBatteryLevel: return NK6510_GetBatteryLevel(data, state); case GN_OP_GetRFLevel: return NK6510_GetRFLevel(data, state); case GN_OP_GetMemoryStatus: return NK6510_GetMemoryStatus(data, state); case GN_OP_GetBitmap: return NK6510_GetBitmap(data, state); case GN_OP_SetBitmap: return NK6510_SetBitmap(data, state); case GN_OP_ReadPhonebook: return NK6510_ReadPhonebook(data, state); case GN_OP_WritePhonebook: return NK6510_WritePhonebookLocation(data, state); case GN_OP_DeletePhonebook: return NK6510_DeletePhonebookLocation(data, state); case GN_OP_GetNetworkInfo: return NK6510_GetNetworkInfo(data, state); case GN_OP_GetSpeedDial: return NK6510_GetSpeedDial(data, state); case GN_OP_SetSpeedDial: return NK6510_SetSpeedDial(data, state); case GN_OP_GetSMSCenter: return NK6510_GetSMSCenter(data, state); case GN_OP_GetDateTime: return NK6510_GetDateTime(data, state); case GN_OP_GetAlarm: return NK6510_GetAlarm(data, state); case GN_OP_SetDateTime: return NK6510_SetDateTime(data, state); case GN_OP_SetAlarm: return NK6510_SetAlarm(data, state); case GN_OP_GetToDo: return NK6510_GetToDo(data, state); case GN_OP_WriteToDo: return NK6510_WriteToDo(data, state); case GN_OP_DeleteAllToDos: return NK6510_DeleteAllToDoLocations(data, state); case GN_OP_GetCalendarNote: return NK6510_GetCalendarNote(data, state); case GN_OP_WriteCalendarNote: return NK6510_WriteCalendarNote(data, state); case GN_OP_DeleteCalendarNote: return NK6510_DeleteCalendarNote(data, state); case GN_OP_DeleteWAPBookmark: return NK6510_DeleteWAPBookmark(data, state); case GN_OP_GetWAPBookmark: return NK6510_GetWAPBookmark(data, state); case GN_OP_WriteWAPBookmark: return NK6510_WriteWAPBookmark(data, state); case GN_OP_GetWAPSetting: return NK6510_GetWAPSetting(data, state); case GN_OP_ActivateWAPSetting: return NK6510_ActivateWAPSetting(data, state); case GN_OP_WriteWAPSetting: return NK6510_WriteWAPSetting(data, state); case GN_OP_OnSMS: DRVINSTANCE(state)->on_sms = data->on_sms; DRVINSTANCE(state)->sms_callback_data = data->callback_data; return NK6510_Subscribe(data, state); case GN_OP_SetCallNotification: DRVINSTANCE(state)->call_notification = data->call_notification; DRVINSTANCE(state)->call_callback_data = data->callback_data; return NK6510_Subscribe(data, state); case GN_OP_DeleteSMS: return NK6510_DeleteSMS(data, state); case GN_OP_DeleteSMSnoValidate: return NK6510_DeleteSMSnoValidate(data, state); case GN_OP_GetSMSStatus: return NK6510_GetSMSStatus(data, state); case GN_OP_SaveSMS: return NK6510_SaveSMS(data, state); case GN_OP_SendSMS: return NK6510_SendSMS(data, state); case GN_OP_GetSMSFolderStatus: return NK6510_GetSMSFolderStatus(data, state); case GN_OP_GetSMS: return NK6510_GetSMS(data, state); case GN_OP_GetSMSnoValidate: return NK6510_GetSMSnoValidate(data, state); case GN_OP_GetUnreadMessages: return GN_ERR_NONE; case GN_OP_GetSMSFolders: return NK6510_GetSMSFolders(data, state); case GN_OP_CreateSMSFolder: return NK6510_CreateSMSFolder(data, state); case GN_OP_DeleteSMSFolder: return NK6510_DeleteSMSFolder(data, state); case GN_OP_GetProfile: return NK6510_GetProfile(data, state); case GN_OP_SetProfile: return NK6510_SetProfile(data, state); case GN_OP_PressPhoneKey: return NK6510_PressOrReleaseKey(data, state, true); case GN_OP_ReleasePhoneKey: return NK6510_PressOrReleaseKey(data, state, false); case GN_OP_GetActiveCalls: return NK6510_GetActiveCalls(data, state); case GN_OP_MakeCall: return NK6510_MakeCall(data, state); case GN_OP_CancelCall: return NK6510_CancelCall(data, state); case GN_OP_AnswerCall: return NK6510_AnswerCall(data, state); #ifdef SECURITY case GN_OP_GetSecurityCodeStatus: return NK6510_GetSecurityCodeStatus(data, state); case GN_OP_EnterSecurityCode: return NK6510_EnterSecurityCode(data, state); #endif case GN_OP_Subscribe: return NK6510_Subscribe(data, state); case GN_OP_GetRawRingtone: return NK6510_GetRawRingtone(data, state); case GN_OP_SetRawRingtone: return NK6510_SetRawRingtone(data, state); case GN_OP_GetRingtone: return NK6510_GetRingtone(data, state); case GN_OP_SetRingtone: return NK6510_SetRingtone(data, state); case GN_OP_GetRingtoneList: return NK6510_GetRingtoneList(data, state); case GN_OP_DeleteRingtone: return NK6510_DeleteRingtone(data, state); case GN_OP_PlayTone: return NK6510_PlayTone(data, state); case GN_OP_Reset: return NK6510_Reset(data, state); case GN_OP_GetFileList: return NK6510_GetFileList(data, state); case GN_OP_GetFileId: return NK6510_GetFileId(data, state); case GN_OP_GetFile: return NK6510_GetFile(data, state); case GN_OP_GetFileById: return NK6510_GetFileById(data, state); case GN_OP_PutFile: return NK6510_PutFile(data, state); case GN_OP_DeleteFile: return NK6510_DeleteFile(data, state); case GN_OP_DeleteFileById: return NK6510_DeleteFileById(data, state); case GN_OP_GetFileDetailsById: return NK6510_GetFileDetailsById(data, state); case GN_OP_GetMMS: return NK6510_GetMMS(data, state); case GN_OP_DeleteMMS: return NK6510_DeleteMMS(data, state); default: return GN_ERR_NOTIMPLEMENTED; } return GN_ERR_NONE; } /* Initialise is the only function allowed to 'use' state */ static gn_error NK6510_Initialise(struct gn_statemachine *state) { gn_data data; char model[GN_MODEL_MAX_LENGTH+1]; gn_error err = GN_ERR_NONE; bool connected = false; unsigned int attempt = 0; memset(model, 0, GN_MODEL_MAX_LENGTH+1); /* Copy in the phone info */ memcpy(&(state->driver), &driver_nokia_6510, sizeof(gn_driver)); if (!(DRVINSTANCE(state) = calloc(1, sizeof(nk6510_driver_instance)))) return GN_ERR_INTERNALERROR; dprintf("Connecting\n"); while (!connected) { if (attempt > 2) break; switch (state->config.connection_type) { case GN_CT_DAU9P: attempt++; case GN_CT_DLR3P: if (attempt > 1) { attempt = 3; break; } case GN_CT_Serial: case GN_CT_TCP: err = fbus_initialise(attempt++, state); break; case GN_CT_Bluetooth: /* Quoting Marcel Holtmann from gnokii-ml: * "I discovered some secrets of the Nokia Bluetooth support in the 6310 * generation. They use a special SDP entry, which is not in the public * browse group of their SDP database. And here it is: * * Attribute Identifier : 0x0 - ServiceRecordHandle * Integer : 0x10006 * Attribute Identifier : 0x1 - ServiceClassIDList * Data Sequence * UUID128 : 0x00005002-0000-1000-8000-0002ee00-0001 * Attribute Identifier : 0x4 - ProtocolDescriptorList * Data Sequence * Data Sequence * UUID16 : 0x0100 - L2CAP * Data Sequence * UUID16 : 0x0003 - RFCOMM * Channel/Port (Integer) : 0xe * * The main secret of this is that they use RFCOMM channel 14 for their * communication protocol." */ dprintf("Forcing rfcomm_channel = 14 for FBUS connection\n"); state->config.rfcomm_cn = 14; case GN_CT_Infrared: case GN_CT_DKU2: case GN_CT_DKU2LIBUSB: case GN_CT_Irda: case GN_CT_SOCKETPHONET: err = phonet_initialise(state); /* Don't loop forever */ attempt = 3; break; default: return GN_ERR_NOTSUPPORTED; } if (err != GN_ERR_NONE) { dprintf("Error in link initialisation: %d\n", err); continue; } sm_initialise(state); /* Now test the link and get the model */ gn_data_clear(&data); data.model = model; err = state->driver.functions(GN_OP_GetModel, &data, state); if (err != GN_ERR_NONE) { /* We could call GN_OP_Terminate here, but it frees driver instance * which would be needed in the sequent tries */ pgen_terminate(&data, state); } else { connected = true; } } if (!connected) { FREE(DRVINSTANCE(state)); return err; } /* Assign phone capabilities config */ DRVINSTANCE(state)->pm = gn_phone_model_get(data.model); /* Change the defaults for Nokia 8310 */ if (!strncmp(data.model, "NHM-7", 5)) { state->driver.phone.operator_logo_width = 72; state->driver.phone.operator_logo_height = 14; state->driver.phone.startup_logo_width = 84; state->driver.phone.startup_logo_height = 48; state->driver.phone.max_battery_level = 4; } if (!strncmp(data.model, "NMM-3", 5)) { state->driver.phone.operator_logo_width = 0; state->driver.phone.operator_logo_height = 0; state->driver.phone.startup_logo_width = 0; state->driver.phone.startup_logo_height = 0; state->driver.phone.max_battery_level = 4; } return GN_ERR_NONE; } static gn_error NK6510_Terminate(gn_data *data, struct gn_statemachine *state) { FREE(DRVINSTANCE(state)); map_free(&file_cache_map); map_free(&location_map); return pgen_terminate(data, state); } /**********************/ /* IDENTIFY FUNCTIONS */ /**********************/ static gn_error NK6510_IncomingIdentify(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { int pos, string_length; switch (message[3]) { case 0x01: if (data->imei) { snprintf(data->imei, GNOKII_MIN(message[9], GN_IMEI_MAX_LENGTH), "%s", message + 10); dprintf("Received imei %s\n", data->imei); } break; case 0x08: if (data->revision) { pos = 10; string_length = 0; while (message[pos + string_length] != 0x0a) string_length++; snprintf(data->revision, GNOKII_MIN(string_length + 1, GN_REVISION_MAX_LENGTH), "%s", message + pos); dprintf("Received revision %s\n", data->revision); } if (data->model) { pos = 10; string_length = 0; while (message[pos++] != 0x0a) ; /* skip revision */ pos++; while (message[pos++] != 0x0a) ; /* skip date */ string_length = 0; while (message[pos + string_length] != 0x0a) string_length++; /* find model length */ dprintf("model length: %i\n", string_length); snprintf(data->model, GNOKII_MIN(string_length + 1, GN_MODEL_MAX_LENGTH), "%s", message + pos); dprintf("Received model %s\n", data->model); } break; default: dprintf("Unknown subtype of type 0x2b (%d)\n", message[3]); return GN_ERR_UNHANDLEDFRAME; } return GN_ERR_NONE; } /* Just as an example.... */ /* But note that both requests are the same type which isn't very 'proper' */ static gn_error NK6510_Identify(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x00, 0x41}; unsigned char req2[] = {FBUS_FRAME_HEADER, 0x07, 0x01, 0x00}; gn_error err; dprintf("Identifying...\n"); pnok_manufacturer_get(data->manufacturer); if (sm_message_send(5, 0x1b, req, state)) return GN_ERR_NOTREADY; if (sm_message_send(6, 0x1b, req2, state)) return GN_ERR_NOTREADY; sm_wait_for(0x1b, data, state); sm_block(0x1b, data, state); /* waits for all requests - returns req2 error */ err = sm_error_get(0x1b, state); if (err != GN_ERR_NONE) return err; /* Check that we are back at state Initialised */ if (gn_sm_loop(0, state) != GN_SM_Initialised) return GN_ERR_UNKNOWN; return GN_ERR_NONE; } static gn_error NK6510_GetIMEI(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x00, 0x41}; dprintf("Getting imei...\n"); SEND_MESSAGE_BLOCK(0x1b, 5); } static gn_error NK6510_GetModel(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x07, 0x01, 0x00}; dprintf("Getting model...\n"); SEND_MESSAGE_BLOCK(0x1b, 6); } static gn_error NK6510_GetRevision(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x07, 0x01, 0x00}; dprintf("Getting revision...\n"); SEND_MESSAGE_BLOCK(0x1b, 6); } /*******************************/ /* SMS/PICTURE/FOLDER HANDLING */ /*******************************/ static void ResetLayout(unsigned char *message, gn_data *data) { /* reset everything */ data->raw_sms->more_messages = 0; data->raw_sms->reply_via_same_smsc = 0; data->raw_sms->reject_duplicates = 0; data->raw_sms->report = 0; data->raw_sms->reference = 0; data->raw_sms->pid = 0; data->raw_sms->report_status = 0; memset(data->raw_sms->smsc_time, 0, sizeof(data->raw_sms->smsc_time)); memset(data->raw_sms->time, 0, sizeof(data->raw_sms->time)); memset(data->raw_sms->remote_number, 0, sizeof(data->raw_sms->remote_number)); memset(data->raw_sms->message_center, 0, sizeof(data->raw_sms->message_center)); data->raw_sms->udh_indicator = 0; data->raw_sms->dcs = 0; data->raw_sms->length = 0; memset(data->raw_sms->user_data, 0, sizeof(data->raw_sms->user_data)); data->raw_sms->validity_indicator = 0; memset(data->raw_sms->validity, 0, sizeof(data->raw_sms->validity)); } static void ParseLayout(unsigned char *message, gn_data *data) { int i, j, subblocks, year; unsigned char *block = message; ResetLayout(message, data); dprintf("Trying to parse message....\n"); dprintf("Type: %i\n", message[1]); dprintf("Length: %i\n", message[2]); data->raw_sms->udh_indicator = message[3]; data->raw_sms->dcs = message[5]; data->raw_sms->reference = message[4]; switch (message[1]) { case 0x00: /* deliver */ dprintf("Type: Deliver\n"); data->raw_sms->type = GN_SMS_MT_Deliver; block = message + 16; memcpy(data->raw_sms->smsc_time, message + 6, 7); break; case 0x01: /* status report */ dprintf("Type: Status Report\n"); data->raw_sms->type = GN_SMS_MT_StatusReport; dprintf("Reference id: %d\n", data->raw_sms->reference); block = message + 20; memcpy(data->raw_sms->smsc_time, message + 6, 7); memcpy(data->raw_sms->time, message + 13, 7); break; case 0x02: /* submit, templates */ data->raw_sms->dcs = message[6]; if (data->raw_sms->memory_type == 5) { dprintf("Type: TextTemplate\n"); data->raw_sms->type = GN_SMS_MT_TextTemplate; break; } switch (data->raw_sms->status) { case GN_SMS_Sent: dprintf("Type: SubmitSent\n"); data->raw_sms->type = GN_SMS_MT_SubmitSent; break; case GN_SMS_Unsent: dprintf("Type: Submit\n"); data->raw_sms->type = GN_SMS_MT_Submit; break; default: dprintf("Wrong type\n"); break; } block = message + 8; break; case 0x80: dprintf("Type: Picture\n"); data->raw_sms->type = GN_SMS_MT_Picture; break; case 0xa0: /* pictures, still ugly */ switch (message[2]) { case 0x01: dprintf("Type: PictureTemplate\n"); data->raw_sms->type = GN_SMS_MT_PictureTemplate; data->raw_sms->length = 256; memcpy(data->raw_sms->user_data, message + 13, data->raw_sms->length); return; case 0x02: dprintf("Type: Picture\n"); data->raw_sms->type = GN_SMS_MT_Picture; block = message + 20; memcpy(data->raw_sms->smsc_time, message + 10, 7); data->raw_sms->length = 256; memcpy(data->raw_sms->user_data, message + 50, data->raw_sms->length); break; default: dprintf("Unknown picture message!\n"); break; } break; default: dprintf("Type %02x not yet handled!\n", message[1]); break; } subblocks = block[0]; /* dprintf("Subblocks: %i\n", subblocks); */ block = block + 1; for (i = 0; i < subblocks; i++) { /* dprintf(" Type of subblock %i: %02x\n", i, block[0]); dprintf(" Length of subblock %i: %i\n", i, block[1]); */ switch (block[0]) { case 0x82: /* number */ switch (block[2]) { case 0x01: memcpy(data->raw_sms->remote_number, block + 4, block[3]); break; case 0x02: memcpy(data->raw_sms->message_center, block + 4, block[3]); break; default: break; } break; case 0x80: /* User Data */ if ((data->raw_sms->type != GN_SMS_MT_Picture) && (data->raw_sms->type != GN_SMS_MT_PictureTemplate)) { /* Ignore the found user_data block for pictures */ data->raw_sms->length = block[3]; data->raw_sms->user_data_length = block[2]; memcpy(data->raw_sms->user_data, block + 4, block[2]); } break; case 0x08: /* Time blocks (mainly at the end of submit sent messages */ memcpy(data->raw_sms->smsc_time, block + 3, block[2]); break; case 0x84: /* Time blocks (not BCD encoded) */ /* Make it BCD format then ;-) */ year = ((block[2] << 8) + block[3]) % 100; data->raw_sms->smsc_time[0] = (year / 10) + ((year % 10) << 4); for (j = 1; j < GN_SMS_DATETIME_MAX_LENGTH; j++) { data->raw_sms->smsc_time[j] = (block[j+3] / 10) + ((block[j+3] % 10) << 4); } break; default: dprintf("Unknown block of type: %02x!\n", block[0]); break; } block = block + block[1]; } return; } /* handle messages of type 0x14 (SMS Handling, Folders, Logos.. */ static gn_error NK6510_IncomingFolder(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { int i, j, status; switch (message[3]) { /* savesms */ case 0x01: switch (message[4]) { case 0x00: dprintf("SMS successfully saved\n"); dprintf("Saved in folder %i at location %i\n", message[8], message[6] * 256 + message[7]); data->raw_sms->number = message[6] * 256 + message[7]; break; case 0x02: dprintf("SMS saving failed: Invalid location\n"); return GN_ERR_INVALIDLOCATION; case 0x05: dprintf("SMS saving failed: Incorrect folder\n"); return GN_ERR_INVALIDMEMORYTYPE; default: dprintf("ERROR: unknown (%02x)\n",message[4]); return GN_ERR_UNHANDLEDFRAME; } break; /* getsms */ case 0x03: dprintf("Trying to get message #%i in folder #%i\n", message[8] * 256 + message[9], message[7]); if (!data->raw_sms) return GN_ERR_INTERNALERROR; /* * When we're reading from 0 location we usually get response in the form: * 01 56 00 03 02 00 00 00 00 00 00 00 00 00 * Treat is as the invalid location. Frame cannot be that short anyway. */ if (length < 15) return GN_ERR_INVALIDLOCATION; status = data->raw_sms->status; memset(data->raw_sms, 0, sizeof(gn_sms_raw)); data->raw_sms->status = status; ParseLayout(message + 13, data); /* Number of SMS in folder */ data->raw_sms->number = message[8] * 256 + message[9]; dprintf("Location of SMS in current folder: %d\n", data->raw_sms->number); /* MessageType/folder_id */ data->raw_sms->memory_type = message[7]; dprintf("Memory type/folder id: %d\n", data->raw_sms->memory_type); break; /* delete sms */ case 0x05: switch (message[4]) { case 0x00: dprintf("SMS successfully deleted\n"); break; case 0x02: case 0x0a: dprintf("SMS deleting failed: Invalid location?\n"); return GN_ERR_INVALIDLOCATION; case 0x05: dprintf("SMS saving failed: Incorrect folder\n"); return GN_ERR_INVALIDLOCATION; default: dprintf("ERROR: unknown %i\n",message[4]); return GN_ERR_UNHANDLEDFRAME; } break; /* delete sms failed */ case 0x06: switch (message[4]) { case 0x02: dprintf("Invalid location\n"); return GN_ERR_INVALIDLOCATION; default: dprintf("Unknown reason.\n"); return GN_ERR_UNHANDLEDFRAME; } /* sms status */ case 0x09: dprintf("SMS Status received\n"); if (!data->sms_status) return GN_ERR_INTERNALERROR; data->sms_status->number = (message[12] * 256 + message[13]) + (message[24] * 256 + message[25]) + data->sms_folder->number; data->sms_status->unread = (message[14] * 256 + message[15]) + (message[26] * 256 + message[27]); break; /* getfolderstatus */ case 0x0b: /* * Reponse: * 01 78 00 0b 00 00 01 00 00 00 * apparently means "empty folder" */ dprintf("Empty folder?\n"); if (!data->sms_folder) return GN_ERR_INTERNALERROR; data->sms_folder->sms_data = 0; memset(data->sms_folder->locations, 0, sizeof(data->sms_folder->locations)); data->sms_folder->number = 0; break; /* getfolderstatus */ case 0x0d: dprintf("Message: SMS Folder status received\n" ); if (!data->sms_folder) return GN_ERR_INTERNALERROR; data->sms_folder->sms_data = 0; memset(data->sms_folder->locations, 0, sizeof(data->sms_folder->locations)); data->sms_folder->number = message[6] * 256 + message[7]; dprintf("Message: Number of Entries: %i\n" , data->sms_folder->number); if (data->sms_folder->number > GN_SMS_MESSAGE_MAX_NUMBER) { dprintf("Shrinking to %d entries. File bug for gnokii.\n", GN_SMS_MESSAGE_MAX_NUMBER); data->sms_folder->number = GN_SMS_MESSAGE_MAX_NUMBER; } if (data->sms_folder->number > 0) { dprintf("Message: IDs of Entries : "); for (i = 0; i < data->sms_folder->number; i++) { data->sms_folder->locations[i] = message[(i * 2) + 8] * 256 + message[(i * 2) + 9]; dprintf("%d, ", data->sms_folder->locations[i]); } dprintf("\n"); } break; /* get message status */ case 0x0f: if (!data->raw_sms) return GN_ERR_INTERNALERROR; if (length >= 14) { dprintf("Message: SMS message (#%i in folder #%i) status received: %i\n", message[10] * 256 + message[11], message[12], message[13]); dprintf("Trying to get message #%i from folder #%i\n", data->raw_sms->number, data->raw_sms->memory_type); /* Short Message status */ data->raw_sms->status = message[13]; } else { dprintf("status not supported?\n"); } break; /* create folder */ case 0x11: dprintf("Create SMS folder status received..\n"); if (!data->sms_folder) return GN_ERR_INTERNALERROR; memset(data->sms_folder, 0, sizeof(gn_sms_folder)); switch (message[4]) { case 0x00: dprintf("SMS Folder successfully created!\n"); data->sms_folder->folder_id = message[8]; char_unicode_decode(data->sms_folder->name, message + 10, length - 11); dprintf(" Folder ID: %i\n", data->sms_folder->folder_id); dprintf(" Name: %s\n", data->sms_folder->name); break; default: dprintf("Failed to create SMS Folder! Reason unknown (%02x)!\n", message[4]); return GN_ERR_UNKNOWN; break; } break; /* getfolders */ case 0x13: if (!data->sms_folder_list) return GN_ERR_INTERNALERROR; memset(data->sms_folder_list, 0, sizeof(gn_sms_folder_list)); data->sms_folder_list->number = message[5]; dprintf("Message: %d SMS Folders received:\n", data->sms_folder_list->number); i = 6; for (j = 0; j < data->sms_folder_list->number; j++) { int len; snprintf(data->sms_folder_list->folder[j].name, sizeof(data->sms_folder_list->folder[j].name), "%s", " "); if (message[i] != 0x01) return GN_ERR_UNHANDLEDFRAME; data->sms_folder_list->folder_id[j] = get_gn_memory_type(message[i + 2]); dprintf("folder_id[%d]=%d\n", j, data->sms_folder_list->folder_id[j]); data->sms_folder_list->folder[j].folder_id = data->sms_folder_list->folder_id[j]; dprintf("folder_id[%d]=%d\n", j, data->sms_folder_list->folder[j].folder_id); dprintf("Folder(%i) name: ", message[i + 2]); len = message[i + 3] << 1; char_unicode_decode(data->sms_folder_list->folder[j].name, message + i + 4, len); dprintf("%s\n", data->sms_folder_list->folder[j].name); i += message[i + 1]; } break; /* delete folder */ case 0x15: switch (message[4]) { case 0x00: dprintf("SMS Folder successfully deleted!\n"); break; case 0x68: dprintf("SMS Folder could not be deleted! Not existant?\n"); return GN_ERR_INVALIDLOCATION; case 0x6b: dprintf("SMS Folder could not be deleted! Not empty?\n"); return GN_ERR_FAILED; default: dprintf("SMS Folder could not be deleted! Reason unknown (%02x)\n", message[4]); return GN_ERR_FAILED; } break; case 0x17: break; /* get list of SMS pictures */ case 0x97: dprintf("Getting list of SMS pictures...\n"); break; /* Some errors */ case 0xc9: dprintf("Unknown command???\n"); return GN_ERR_UNHANDLEDFRAME; case 0xca: dprintf("Phone not ready???\n"); return GN_ERR_UNHANDLEDFRAME; /* * The phone doesn't support folder list messages. * Let's fallback to the 'file' mode. */ case 0xf0: dprintf("Falling back to file mode.\n"); if (!data->sms_folder_list) return GN_ERR_INTERNALERROR; return GN_ERR_NOTSUPPORTED; default: dprintf("Message: Unknown message of type 14 : %02x length: %d\n", message[3], length); return GN_ERR_UNHANDLEDFRAME; } return GN_ERR_NONE; } static gn_error NK6510_GetSMSStatus(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x08, 0x00, 0x00, 0x01}; gn_sms_folder status_fld, *old_fld; gn_error error; dprintf("Getting SMS Status...\n"); /* Nokia 6510 and family does not show not "fixed" messages from the * Templates folder, ie. when you save a message to the Templates folder, * SMSStatus does not change! Workaround: get Templates folder status, which * does show these messages. */ old_fld = data->sms_folder; data->sms_folder = &status_fld; data->sms_folder->folder_id = GN_MT_TE; error = NK6510_GetSMSFolderStatus(data, state); if (error) goto out; error = sm_message_send(7, NK6510_MSG_FOLDER, req, state); if (error) goto out; error = sm_block(NK6510_MSG_FOLDER, data, state); out: data->sms_folder = old_fld; return error; } static gn_error NK6510_GetSMSFolders_S40_30(gn_data *data, struct gn_statemachine *state) { gn_file_list fl; gn_error error; int j, i; if (!data->sms_folder_list) return GN_ERR_INTERNALERROR; dprintf("Using GetSMSFolders for Series40 3rd Ed\n"); memset(&fl, 0, sizeof(fl)); snprintf(fl.path, sizeof(fl.path), "c:\\predefmessages\\*.*"); data->file_list = &fl; error = NK6510_GetFileListCache(data, state); if (error) return error; for (i = 0, j = 0; i < fl.file_count; i++) { int k = match_sms_folder_str(fl.files[i]->name); if (k >= 0) { #if 0 dprintf("%s %d\n", s40_30_mt_mappings[k].path, s40_30_mt_mappings[k].type); #endif data->sms_folder_list->folder_id[j] = s40_30_mt_mappings[k].type; data->sms_folder_list->folder[j].folder_id = s40_30_mt_mappings[k].type; sprintf(data->sms_folder_list->folder[j].name, "%s", gn_memory_type_print(s40_30_mt_mappings[k].type)); j++; } } data->sms_folder_list->number = j; return error; } static gn_error NK6510_GetSMSFolders(gn_data *data, struct gn_statemachine *state) { gn_error error; unsigned char req[] = {FBUS_FRAME_HEADER, 0x12, 0x00, 0x00}; dprintf("Getting SMS Folders...\n"); if (!data->sms_folder_list) return GN_ERR_INTERNALERROR; memset(data->sms_folder_list, 0, sizeof(gn_sms_folder_list)); if (DRVINSTANCE(state)->pm->flags & PM_SMSFILE) return NK6510_GetSMSFolders_S40_30(data, state); if (sm_message_send(6, NK6510_MSG_FOLDER, req, state)) return GN_ERR_NOTREADY; error = sm_block(NK6510_MSG_FOLDER, data, state); if (DRVINSTANCE(state)->pm->flags & PM_SMSFILE || error == GN_ERR_NOTSUPPORTED) { dprintf("NK6510_GetSMSFolders: before switch to S40_30\nerror: %s (%d)\n", gn_error_print(error), error); /* Try file approach */ error = NK6510_GetSMSFolders_S40_30(data, state); if (error == GN_ERR_NONE) { dprintf("Misconfiguration in the phone table detected.\nPlease report to gnokii ml (gnokii-users@nongnu.org).\n"); dprintf("Model %s (%s) is series40 3rd+ Edition.\n", DRVINSTANCE(state)->pm->product_name, DRVINSTANCE(state)->pm->model); DRVINSTANCE(state)->pm->flags |= PM_DEFAULT_S40_3RD; } } return error; } static gn_error NK6510_DeleteSMSFolder(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x14, 0x06, /* Folder ID */ 0x00}; dprintf("Deleting SMS Folder...\n"); req[4] = data->sms_folder->folder_id + 5; if (req[4] < 6) return GN_ERR_INVALIDMEMORYTYPE; SEND_MESSAGE_BLOCK(NK6510_MSG_FOLDER, 6); } static gn_error NK6510_CreateSMSFolder(gn_data *data, struct gn_statemachine *state) { unsigned char req[50] = {FBUS_FRAME_HEADER, 0x10, 0x01, 0x00, 0x01, 0x00, /* length */ 0x00, 0x00 }; int len; dprintf("Creating SMS Folder...\n"); len = char_unicode_encode(req + 10, data->sms_folder->name, strlen(data->sms_folder->name)); req[7] = len + 6; SEND_MESSAGE_BLOCK(NK6510_MSG_FOLDER, req[7] + 6); } static gn_error NK6510_GetSMSFolderStatus_S40_30(gn_data *data, struct gn_statemachine *state) { gn_file_list fl; gn_error error; int j, k; if (!data->sms_folder) return GN_ERR_INTERNALERROR; dprintf("Using GetSMSFolderStatus for Series40 3rd Ed\n"); k = match_sms_folder_mt(data->sms_folder->folder_id); if (k < 0) return GN_ERR_INVALIDMEMORYTYPE; memset(&fl, 0, sizeof(fl)); snprintf(fl.path, sizeof(fl.path), "%s*.*", s40_30_mt_mappings[k].path); /* Get file list */ data->file_list = &fl; error = NK6510_GetFileListCache(data, state); if (error) return error; data->sms_folder->number = 0; /* Extract just SMS */ for (j = 0; j < fl.file_count; j++) { if (!strncmp("2010", fl.files[j]->name+20, 4) /* standard SMS */ || !strncmp("4030", fl.files[j]->name+20, 4) /* SMS in Templates */ ) data->sms_folder->number++; } dprintf("%d out of %d are SMS\n", data->sms_folder->number, fl.file_count); if (data->sms_folder->number > GN_SMS_MESSAGE_MAX_NUMBER) { dprintf("Shrinking to %d entries. File a bug for gnokii.\n", GN_SMS_MESSAGE_MAX_NUMBER); data->sms_folder->number = GN_SMS_MESSAGE_MAX_NUMBER; } return error; } static gn_error NK6510_GetSMSFolderStatus(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x0C, 0x02, /* 0x01 SIM, 0x02 ME*/ 0x00, /* Folder ID */ 0x0F, 0x55, 0x55, 0x55}; gn_error error; int i; gn_sms_folder phone; if (!data->sms_folder) return GN_ERR_INTERNALERROR; /* Let's avoid suprises */ data->sms_folder->number = 0; if (DRVINSTANCE(state)->pm->flags & PM_SMSFILE) return NK6510_GetSMSFolderStatus_S40_30(data, state); req[5] = get_memory_type(data->sms_folder->folder_id); dprintf("Getting SMS Folder (%i) status (%i)...\n", req[5], req[4]); /* * Inbox and outbox messages can be either in SIM or phone memory. * Other folders are just in the phone memory. */ if ((req[5] == NK6510_MEMORY_IN) || (req[5] == NK6510_MEMORY_OU)) { /* special case IN/OUTBOX */ dprintf("Special case IN/OUTBOX in GetSMSFolderStatus!\n"); /* Get ME folder list */ dprintf("Get message list from ME\n"); if (sm_message_send(10, NK6510_MSG_FOLDER, req, state)) return GN_ERR_NOTREADY; error = sm_block(NK6510_MSG_FOLDER, data, state); if (error) return error; memcpy(&phone, data->sms_folder, sizeof(gn_sms_folder)); /* Get SM folder list */ dprintf("Get message list from SM\n"); req[4] = 0x01; if (sm_message_send(10, NK6510_MSG_FOLDER, req, state)) return GN_ERR_NOTREADY; error = sm_block(NK6510_MSG_FOLDER, data, state); /* FIXME: make it dynamic buffer */ if (phone.number + data->sms_folder->number > GN_SMS_MESSAGE_MAX_NUMBER) { dprintf("Shrinking to %d entries. File a bug for gnokii.\n", GN_SMS_MESSAGE_MAX_NUMBER); phone.number = GN_SMS_MESSAGE_MAX_NUMBER - data->sms_folder->number; /* This shouldn't happen. But let's be safe. */ if (phone.number < 0) phone.number = 0; } /* Append messages from ME to SM */ for (i = 0; i < phone.number; i++) { data->sms_folder->locations[data->sms_folder->number] = phone.locations[i] + 1024; data->sms_folder->number++; } dprintf("Total number of messages in the folder: %d\n", data->sms_folder->number); return GN_ERR_NONE; } dprintf("Get message list from the folder (ME)\n"); SEND_MESSAGE_BLOCK(NK6510_MSG_FOLDER, 10); } static gn_error NK6510_GetSMSMessageStatus(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x0E, 0x02, /* 0x01 SIM, 0x02 phone*/ 0x00, /* Folder ID */ 0x00, /* Location Hi */ 0x00, /* Location Lo */ 0x55, 0x55}; if ((data->raw_sms->memory_type == GN_MT_IN) || (data->raw_sms->memory_type == GN_MT_OU)) { if (data->raw_sms->number > 1024) { /* Do nothing */ } else { req[4] = 0x01; } } dprintf("Getting SMS message (%i in folder %i) status...\n", data->raw_sms->number, data->raw_sms->memory_type); req[5] = get_memory_type(data->raw_sms->memory_type); req[6] = data->raw_sms->number / 256; req[7] = data->raw_sms->number % 256; SEND_MESSAGE_BLOCK(NK6510_MSG_FOLDER, 10); } static gn_error NK6510_GetSMSnoValidate(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x02, 0x02, /* 0x01 for INBOX, 0x02 for others */ 0x00, /* folder_id */ 0x00, /* Location Hi */ 0x02, /* Location Lo */ 0x01, 0x00}; gn_error error; dprintf("Getting SMS (no validate) ...\n"); error = NK6510_GetSMSMessageStatus(data, state); if (error) return error; if ((data->raw_sms->memory_type == GN_MT_IN) || (data->raw_sms->memory_type == GN_MT_OU)) { if (data->raw_sms->number > 1024) { data->raw_sms->number -= 1024; } else { req[4] = 0x01; } } req[5] = get_memory_type(data->raw_sms->memory_type); req[6] = data->raw_sms->number / 256; req[7] = data->raw_sms->number % 256; SEND_MESSAGE_BLOCK(NK6510_MSG_FOLDER, 10); } static gn_error ValidateSMS(gn_data *data, struct gn_statemachine *state) { gn_error error; /* Handle memory_type = 0 explicitely, because sms_folder->folder_id = 0 by default */ if (data->raw_sms->memory_type == 0) return GN_ERR_INVALIDMEMORYTYPE; /* see if the message we want is from the last read folder, i.e. */ /* we don't have to get folder status again */ if ((!data->sms_folder) || (!data->sms_folder_list)) return GN_ERR_INTERNALERROR; if (data->raw_sms->memory_type != data->sms_folder->folder_id) { if ((error = NK6510_GetSMSFolders(data, state)) != GN_ERR_NONE) return error; if ((get_memory_type(data->raw_sms->memory_type) > data->sms_folder_list->folder_id[data->sms_folder_list->number - 1]) || (data->raw_sms->memory_type < 12)) return GN_ERR_INVALIDMEMORYTYPE; data->sms_folder->folder_id = data->raw_sms->memory_type; dprintf("Folder id: %d\n", data->sms_folder->folder_id); if ((error = NK6510_GetSMSFolderStatus(data, state)) != GN_ERR_NONE) return error; } if (data->sms_folder->number < data->raw_sms->number) { if (data->raw_sms->number < GN_SMS_MESSAGE_MAX_NUMBER) return GN_ERR_EMPTYLOCATION; else return GN_ERR_INVALIDLOCATION; } return GN_ERR_NONE; } static gn_error NK6510_DeleteSMS(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x04, 0x02, /* 0x01 for SM, 0x02 for ME */ 0x00, /* folder_id */ 0x00, /* Location Hi */ 0x00, /* Location Lo */ 0x0F, 0x55}; gn_error error; dprintf("Deleting SMS...\n"); if (DRVINSTANCE(state)->pm->flags & PM_SMSFILE) return NK6510_DeleteSMS_S40_30(data, state); error = ValidateSMS(data, state); if (DRVINSTANCE(state)->pm->flags & PM_SMSFILE || error == GN_ERR_NOTSUPPORTED) { dprintf("NK6510_DeleteSMS: before switch to S40_30\nerror: %s (%d)\n", gn_error_print(error), error); /* Try file method */ error = NK6510_DeleteSMS_S40_30(data, state); if (error != GN_ERR_NONE) dprintf("%s\n", gn_error_print(error)); else { dprintf("Misconfiguration in the phone table detected.\nPlease report to gnokii ml (gnokii-users@nongnu.org).\n"); dprintf("Model %s (%s) is series40 3rd+ Edition.\n", DRVINSTANCE(state)->pm->product_name, DRVINSTANCE(state)->pm->model); DRVINSTANCE(state)->pm->flags |= PM_DEFAULT_S40_3RD; } return error; } if (data->raw_sms->number < 1) return GN_ERR_EMPTYLOCATION; data->raw_sms->number = data->sms_folder->locations[data->raw_sms->number - 1]; if ((data->raw_sms->memory_type == GN_MT_IN) || (data->raw_sms->memory_type == GN_MT_OU)) { if (data->raw_sms->number > 1024) { data->raw_sms->number -= 1024; } else { req[4] = 0x01; } } req[5] = get_memory_type(data->raw_sms->memory_type); req[6] = data->raw_sms->number / 256; req[7] = data->raw_sms->number % 256; SEND_MESSAGE_BLOCK(NK6510_MSG_FOLDER, 10); } static gn_error NK6510_DeleteSMSnoValidate(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x04, 0x02, /* 0x01 for SM, 0x02 for ME */ 0x00, /* folder_id */ 0x00, /* Location Hi */ 0x00, /* Location Lo */ 0x0F, 0x55}; dprintf("Deleting SMS (noValidate)...\n"); if ((data->raw_sms->memory_type == GN_MT_IN) || (data->raw_sms->memory_type == GN_MT_OU)) { if (data->raw_sms->number > 1024) { data->raw_sms->number -= 1024; } else { req[4] = 0x01; } } req[5] = get_memory_type(data->raw_sms->memory_type); req[6] = data->raw_sms->number / 256; req[7] = data->raw_sms->number % 256; SEND_MESSAGE_BLOCK(NK6510_MSG_FOLDER, 10); } static gn_error NK6510_GetSMS(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x02, 0x02, /* 0x01 for SM, 0x02 for ME */ 0x00, /* folder_id */ 0x00, /* Location Hi */ 0x00, /* Location Lo */ 0x01, 0x00}; gn_error error; dprintf("Getting SMS #%d...\n", data->raw_sms->number); if (DRVINSTANCE(state)->pm->flags & PM_SMSFILE) return NK6510_GetSMS_S40_30(data, state); error = ValidateSMS(data, state); if (DRVINSTANCE(state)->pm->flags & PM_SMSFILE || error == GN_ERR_NOTSUPPORTED) { dprintf("NK6510_GetSMS: before switch to S40_30\nerror: %s (%d)\n", gn_error_print(error), error); /* Try file method */ error = NK6510_GetSMS_S40_30(data, state); if (error != GN_ERR_NONE) dprintf("%s\n", gn_error_print(error)); else { dprintf("Misconfiguration in the phone table detected.\nPlease report to gnokii ml (gnokii-users@nongnu.org).\n"); dprintf("Model %s (%s) is series40 3rd+ Edition.\n", DRVINSTANCE(state)->pm->product_name, DRVINSTANCE(state)->pm->model); DRVINSTANCE(state)->pm->flags |= PM_DEFAULT_S40_3RD; } return error; } data->raw_sms->number = data->sms_folder->locations[data->raw_sms->number - 1]; dprintf("Getting SMS from location %d\n", data->raw_sms->number); error = NK6510_GetSMSMessageStatus(data, state); if ((data->raw_sms->memory_type == GN_MT_IN) || (data->raw_sms->memory_type == GN_MT_OU)) { if (data->raw_sms->number > 1024) { dprintf("Subtracting 1024 from memory location number\n"); data->raw_sms->number -= 1024; } else { req[4] = 0x01; } } dprintf("Getting SMS from location %d\n", data->raw_sms->number); req[5] = get_memory_type(data->raw_sms->memory_type); req[6] = data->raw_sms->number / 256; req[7] = data->raw_sms->number % 256; SEND_MESSAGE_BLOCK(NK6510_MSG_FOLDER, 10); } static gn_error NK6510_GetSMS_S40_30(gn_data *data, struct gn_statemachine *state) { gn_file_list fl, fl2; gn_file fi; gn_error error; int j, i, cont_len, tota_len, offset; unsigned char *bin; if (!data->raw_sms) return GN_ERR_INTERNALERROR; if (data->raw_sms->number < 1) { dprintf("Getting SMS %d\n", data->raw_sms->number); return GN_ERR_INVALIDLOCATION; } dprintf("Using GetSMS for Series40 3rd Ed\n"); /* Find path */ for (i = 0; (s40_30_mt_mappings[i].type != data->raw_sms->memory_type) && (s40_30_mt_mappings[i].path != NULL); i++); if (s40_30_mt_mappings[i].path != NULL) { memset(&fl, 0, sizeof(fl)); snprintf(fl.path, sizeof(fl.path), "%s*.*", s40_30_mt_mappings[i].path); } else return GN_ERR_INVALIDMEMORYTYPE; /* Get file list */ data->file_list = &fl; data->file = NULL; error = NK6510_GetFileListCache(data, state); if (error) return error; /* Extract just SMS */ memset(&fl2, 0, sizeof(fl2)); for (j = 0; j < fl.file_count; j++) { if (!strncmp("2010", fl.files[j]->name+20, 4) /* standard SMS */ || !strncmp("4030", fl.files[j]->name+20, 4) /* SMS in Templates */ ) { strcpy(fl2.path, fl.path); inc_filecount(&fl2); fl2.files[fl2.file_count-1] = fl.files[j]; } } dprintf("%d out of %d are SMS\n", fl2.file_count, fl.file_count); /* Assign filename */ dprintf("Getting #%d out of %d messages\n", data->raw_sms->number, fl2.file_count); if (fl2.file_count >= data->raw_sms->number) { memset(&fi, 0, sizeof(fi)); dprintf("Getting SMS #%d (path: %s, file: %s)\n", data->raw_sms->number, s40_30_mt_mappings[i].path, fl2.files[data->raw_sms->number-1]->name); snprintf(fi.name, sizeof(fi.name), "%s%s", s40_30_mt_mappings[i].path, fl2.files[data->raw_sms->number - 1]->name); } else /* Needs to be INVALID not EMPTY for --getsms IN 1 end to work */ return GN_ERR_INVALIDLOCATION; data->file = &fi; /* Get file */ error = NK6510_GetFile(data, state); if (error) return error; data->raw_sms->status = GetMessageStatus_S40_30(fl2.files[data->raw_sms->number - 1]->name); #define HEADER_LEN 0xb0 /* 176 */ bin = fi.file; offset = HEADER_LEN; /* content length */ cont_len = (bin[4] << 24) + (bin[5] << 16) + (bin[6] << 8) + bin[7]; /* total length */ tota_len = (bin[8] << 24) + (bin[9] << 16) + (bin[10] << 8) + bin[11]; error = gn_sms_pdu2raw(data->raw_sms, bin + offset, cont_len, GN_SMS_PDU_NOSMSC); offset += data->raw_sms->length; /* TODO: decode data in the footer? (e.g. SMSC, multiple recipients numbers */ return error; } static gn_error NK6510_DeleteSMS_S40_30(gn_data *data, struct gn_statemachine *state) { gn_file_list fl, fl2; gn_file fi; gn_error error; int j, i; if (!data->raw_sms) return GN_ERR_INTERNALERROR; if (data->raw_sms->number < 1) { dprintf("Deleting SMS %d\n", data->raw_sms->number); return GN_ERR_INVALIDLOCATION; } dprintf("Using DeleteSMS for Series40 3rd Ed\n"); /* Find path */ for (i = 0; (s40_30_mt_mappings[i].type != data->raw_sms->memory_type) && (s40_30_mt_mappings[i].path != NULL); i++); if (s40_30_mt_mappings[i].path != NULL) { memset(&fl, 0, sizeof(fl)); snprintf(fl.path, sizeof(fl.path), "%s*.*", s40_30_mt_mappings[i].path); } else return GN_ERR_INVALIDMEMORYTYPE; /* Get file list */ data->file_list = &fl; data->file = NULL; error = NK6510_GetFileListCache(data, state); if (error) return error; /* Extract just SMS */ memset(&fl2, 0, sizeof(fl2)); for (j = 0; j < fl.file_count; j++) { if (!strncmp("2010", fl.files[j]->name+20, 4) /* standard SMS */ || !strncmp("4030", fl.files[j]->name+20, 4) /* SMS in Templates */ ) { strcpy(fl2.path, fl.path); inc_filecount(&fl2); fl2.files[fl2.file_count-1] = fl.files[j]; } } dprintf("%d out of %d are SMS\n", fl2.file_count, fl.file_count); /* Assign filename */ dprintf("Deleting #%d out of %d messages\n", data->raw_sms->number, fl2.file_count); if (fl2.file_count >= data->raw_sms->number) { memset(&fi, 0, sizeof(fi)); dprintf("Deleting SMS #%d (path: %s, file: %s)\n", data->raw_sms->number, s40_30_mt_mappings[i].path, fl2.files[data->raw_sms->number-1]->name); snprintf(fi.name, sizeof(fi.name), "%s%s", s40_30_mt_mappings[i].path, fl2.files[data->raw_sms->number - 1]->name); } else /* Needs to be INVALID not EMPTY for --deletesms IN 1 end to work */ return GN_ERR_INVALIDLOCATION; data->file = &fi; /* Delete file */ error = NK6510_DeleteFile(data, state); return error; } static gn_error NK6510_SaveSMS(gn_data *data, struct gn_statemachine *state) { unsigned char req[256] = { FBUS_FRAME_HEADER, 0x00, 0x02, /* 1 = SIM, 2 = ME */ 0x02, /* Folder */ 0x00, 0x00, /* Location */ 0x03 }; /* SMS state */ #if 0 unsigned char req2[200] = { FBUS_FRAME_HEADER, 0x16, 0x02, /* 1 = SIM, 2 = ME */ 0x02, /* Folder */ 0x00, 0x01}; /* Location */ unsigned char desc[10]; #endif gn_error error = GN_ERR_NONE; int len = 9; unsigned char ans[5]; /* int i; */ dprintf("Saving sms\n"); if (data->raw_sms->memory_type == GN_MT_IN && data->raw_sms->type == GN_SMS_MT_Submit) return GN_ERR_INVALIDMEMORYTYPE; if (data->raw_sms->memory_type != GN_MT_IN && data->raw_sms->type == GN_SMS_MT_Deliver && data->raw_sms->status != GN_SMS_Sent) return GN_ERR_INVALIDMEMORYTYPE; if (data->raw_sms->memory_type == GN_MT_TE || data->raw_sms->memory_type == GN_MT_SM || data->raw_sms->memory_type == GN_MT_ME) return GN_ERR_INVALIDMEMORYTYPE; req[5] = get_memory_type(data->raw_sms->memory_type); req[6] = data->raw_sms->number / 256; req[7] = data->raw_sms->number % 256; if (data->raw_sms->type == GN_SMS_MT_Submit) req[8] = 0x07; if (data->raw_sms->status == GN_SMS_Sent) req[8] -= 2; memset(req + 15, 0x00, sizeof(req) - 15); len += sms_encode(data, state, req + 9); #if 0 for (i = 0; i < len; i++) dprintf("%02x ", req[i]); dprintf("\n"); #endif fprintf(stdout, _("6510 series phones seem to be quite sensitive to malformed SMS messages\n" "It may have to be sent to Nokia Service if something fails!\n" "Do you really want to continue? ")); fprintf(stdout, _("(yes/no) ")); gn_line_get(stdin, ans, 4); if (strcmp(ans, _("yes"))) return GN_ERR_USERCANCELED; if (sm_message_send(len, NK6510_MSG_FOLDER, req, state)) return GN_ERR_NOTREADY; error = sm_block(NK6510_MSG_FOLDER, data, state); #if 0 if (error == GN_ERR_NONE) { req2[5] = get_memory_type(data->raw_sms->memory_type); if (req2[5] == 0x05) req2[5] = 0x03; req2[6] = data->raw_sms->number / 256; req2[7] = data->raw_sms->number % 256; len = 8; memcpy(req2 + len, "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", 16); len += 16; req2[len++] = 0; req2[len++] = 0; if (sm_message_send(len, NK6510_MSG_FOLDER, req2, state)) return GN_ERR_NOTREADY; return sm_block(NK6510_MSG_FOLDER, data, state); } #endif return error; } /****************/ /* SMS HANDLING */ /****************/ static gn_error NK6510_IncomingSMS(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { gn_error e = GN_ERR_NONE; unsigned int parts_no, offset, i; dprintf("Frame of type 0x02 (SMS handling) received!\n"); if (!data) return GN_ERR_INTERNALERROR; switch (message[3]) { case 0x2c: case NK6510_SUBSMS_INCOMING: { /* 0x04 */ int freerawsms = 0, freesms = 0; dprintf("Incoming SMS notification\n"); if (!data->raw_sms) { freerawsms = 1; data->raw_sms = calloc(1, sizeof(gn_sms_raw)); } if (!data->sms) { freesms = 1; data->sms = calloc(1, sizeof(gn_sms)); } if (!data->raw_sms || !data->sms) { e = GN_ERR_INTERNALERROR; goto err; } ParseLayout(message + 9, data); e = gn_sms_parse(data); if ((e == GN_ERR_NONE) && DRVINSTANCE(state)->on_sms) e = DRVINSTANCE(state)->on_sms(data->sms, state, DRVINSTANCE(state)->sms_callback_data); err: if (freerawsms && data->raw_sms) free(data->raw_sms); if (freesms && data->sms) free(data->sms); break; } case NK6510_SUBSMS_SMSC_RCV: /* 0x15 */ switch (message[4]) { case 0x00: dprintf("SMSC Received\n"); break; case 0x02: dprintf("SMSC reception failed\n"); e = GN_ERR_EMPTYLOCATION; break; default: dprintf("Unknown response subtype: %02x\n", message[4]); e = GN_ERR_UNHANDLEDFRAME; break; } if (e != GN_ERR_NONE) break; if (!data->message_center) { dprintf("SMSC received but not expected\n"); e = GN_ERR_INTERNALERROR; } data->message_center->id = message[8]; data->message_center->format = message[10]; data->message_center->validity = message[12]; /* due to changes in format */ data->message_center->name[0] = '\0'; parts_no = message[13]; offset = 14; for (i = 0; i < parts_no; i++) { switch (message[offset]) { case 0x82: /* Number */ switch (message[offset + 2]) { case 0x01: /* Default number */ if (message[offset + 4] % 2) message[offset + 4]++; message[offset + 4] = message[offset + 4] / 2 + 1; snprintf(data->message_center->recipient.number, GN_SMS_NUMBER_MAX_LENGTH + 1, "%s", char_bcd_number_get(message + offset + 4)); data->message_center->recipient.type = message[offset + 5]; break; case 0x02: /* SMSC number */ snprintf(data->message_center->smsc.number, GN_SMS_NUMBER_MAX_LENGTH + 1, "%s", char_bcd_number_get(message + offset + 4)); data->message_center->smsc.type = message[offset + 5]; break; default: dprintf("Unknown subtype %02x. Ignoring\n", message[offset + 1]); break; } break; case 0x81: /* SMSC name */ char_unicode_decode(data->message_center->name, message + offset + 4, message[offset + 2]); data->message_center->default_name = -1; break; default: dprintf("Unknown subtype %02x. Ignoring\n", message[offset]); break; } offset += message[offset + 1]; } /* Set a default SMSC name if none was received */ if (!data->message_center->name[0]) { snprintf(data->message_center->name, sizeof(data->message_center->name), _("Set %d"), data->message_center->id); data->message_center->default_name = data->message_center->id; } break; case NK6510_SUBSMS_SMS_SEND_STATUS: /* 0x03 */ switch (message[8]) { case NK6510_SUBSMS_SMS_SEND_OK: /* 0x00 */ dprintf("SMS sent (reference: %d)\n", message[10]); if (data->raw_sms) data->raw_sms->reference = message[10]; else dprintf("Warning: no data->raw_sms allocated and got send_sms() response\n"); e = GN_ERR_NONE; break; case NK6510_SUBSMS_SMS_SEND_FAIL: /* 0x01 */ dprintf("SMS sending failed\n"); e = GN_ERR_FAILED; break; default: dprintf("Unknown status of the SMS sending -- assuming failure\n"); e = GN_ERR_FAILED; break; } break; case 0x0e: dprintf("Ack for request on Incoming SMS\n"); break; case 0x11: dprintf("SMS received\n"); break; case 0x22: dprintf("SMS has been delivered to the phone and the phone is trying to send it.\n"); dprintf("No information about sending status yet\n"); dprintf("SMS sending status will be transmitted asynchronously\n"); dprintf("Message reference: %d\n", message[5]); if (data->raw_sms) data->raw_sms->reference = message[5]; else dprintf("Warning: no data->raw_sms allocated and got response for send_sms()\n"); e = GN_ERR_ASYNC; break; case NK6510_SUBSMS_SMS_RCVD: /* 0x10 */ case NK6510_SUBSMS_CELLBRD_OK: /* 0x21 */ case NK6510_SUBSMS_READ_CELLBRD: /* 0x23 */ case NK6510_SUBSMS_SMSC_OK: /* 0x31 */ case NK6510_SUBSMS_SMSC_FAIL: /* 0x32 */ dprintf("Subtype 0x%02x of type 0x%02x (SMS handling) not implemented\n", message[3], NK6510_MSG_SMS); return GN_ERR_NOTIMPLEMENTED; default: dprintf("Unknown subtype of type 0x%02x (SMS handling): 0x%02x\n", NK6510_MSG_SMS, message[3]); return GN_ERR_UNHANDLEDFRAME; } return e; } static gn_error NK6510_GetSMSCenter(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, NK6510_SUBSMS_GET_SMSC, 0x01, 0x00}; req[4] = data->message_center->id; SEND_MESSAGE_BLOCK(NK6510_MSG_SMS, 6); } /** * NK6510_SendSMS - low level SMS sending function for 6310/6510 phones * @data: gsm data * @state: statemachine * * Nokia changed the format of the SMS frame completly. Currently there are * here some magic numbers (well, many) but hopefully we'll get their meaning * soon. * 10.07.2002: Almost all frames should be known know :-) (Markus) */ static gn_error NK6510_SendSMS(gn_data *data, struct gn_statemachine *state) { unsigned char req[256] = {FBUS_FRAME_HEADER, 0x02, 0x00, 0x00, 0x00, 0x55, 0x55}; /* What's this? */ gn_error error; unsigned int pos; memset(req + 9, 0, 244); pos = sms_encode(data, state, req + 9); dprintf("Sending SMS...(%d)\n", pos + 9); if (sm_message_send(pos + 9, NK6510_MSG_SMS, req, state)) return GN_ERR_NOTREADY; do { error = sm_block_no_retry_timeout(NK6510_MSG_SMS, state->config.smsc_timeout, data, state); } while (!state->config.smsc_timeout && error == GN_ERR_TIMEOUT); return error; } /*****************/ /* MMS HANDLING */ /*****************/ static gn_error NK6510_GetMMSList_S40_30(gn_data *data, struct gn_statemachine *state) { gn_error error; gn_data private_data; gn_file_list fl; int j, i; if (!data->raw_mms || !data->file_list) return GN_ERR_INTERNALERROR; /* Find path */ for (i = 0; (s40_30_mt_mappings[i].type != data->raw_mms->memory_type) && (s40_30_mt_mappings[i].path != NULL); i++); if (s40_30_mt_mappings[i].path != NULL) { memset(&fl, 0, sizeof(fl)); snprintf(fl.path, sizeof(fl.path), "%s*.*", s40_30_mt_mappings[i].path); } else return GN_ERR_INVALIDMEMORYTYPE; /* Get file list */ gn_data_clear(&private_data); private_data.file_list = &fl; private_data.file = NULL; error = NK6510_GetFileListCache(&private_data, state); if (error) return error; /* Extract just MMS */ memset(data->file_list, 0, sizeof(*data->file_list)); for (j = 0; j < fl.file_count; j++) { if (!strncmp("1012", fl.files[j]->name+20, 4) /* standard MMS */ || !strncmp("1022", fl.files[j]->name+20, 4) /* MMS Plus */ || !strncmp("4012", fl.files[j]->name+20, 4) /* standard MMS in Templates */ || !strncmp("4020", fl.files[j]->name+20, 4) /* MMS Plus in Templates */ ) { inc_filecount(data->file_list); data->file_list->files[data->file_list->file_count-1] = fl.files[j]; } } if (data->file_list->file_count) strncpy(data->file_list->path, s40_30_mt_mappings[i].path, sizeof(data->file_list->path)); dprintf("%d out of %d are MMS\n", data->file_list->file_count, fl.file_count); /* Do not free fl.files and all fl.files[i] pointers because they are owned and shared by the cache */ return error; } static gn_error NK6510_GetMMS(gn_data *data, struct gn_statemachine *state) { return NK6510_GetMMS_S40_30(data, state); } static gn_error NK6510_GetMMS_S40_30(gn_data *data, struct gn_statemachine *state) { gn_error error; gn_data private_data; gn_file_list fl; gn_file fi; dprintf("Using GetMMS for Series40 3rd Ed\n"); if (!data->raw_mms) return GN_ERR_INTERNALERROR; if (data->raw_mms->number < 1) return GN_ERR_INVALIDLOCATION; gn_data_clear(&private_data); memset(&fl, 0, sizeof(fl)); private_data.file_list = &fl; private_data.raw_mms = data->raw_mms; error = NK6510_GetMMSList_S40_30(&private_data, state); if (error != GN_ERR_NONE) return error; if (fl.file_count < data->raw_mms->number) { /* Needs to be INVALID not EMPTY for --getmms IN 1 end to work */ error = GN_ERR_INVALIDLOCATION; } else { memset(&fi, 0, sizeof(fi)); snprintf(fi.name, sizeof(fi.name), "%s%s", fl.path, fl.files[private_data.raw_mms->number - 1]->name); dprintf("Getting MMS #%d (filename: %s)\n", private_data.raw_mms->number, fi.name); private_data.file = &fi; error = NK6510_GetFile(&private_data, state); data->raw_mms->status = GetMessageStatus_S40_30(fl.files[private_data.raw_mms->number - 1]->name); data->raw_mms->buffer_length = fi.file_length; data->raw_mms->buffer = fi.file; free(fi.id); } /* Do not free all fl.files[i] pointers because they are owned and shared by the cache */ free(fl.files); return error; } static gn_error NK6510_DeleteMMS(gn_data *data, struct gn_statemachine *state) { return NK6510_DeleteMMS_S40_30(data, state); } static gn_error NK6510_DeleteMMS_S40_30(gn_data *data, struct gn_statemachine *state) { gn_error error; gn_file_list fl; gn_file fi; dprintf("Using DeleteMMS for Series40 3rd Ed\n"); if (!data->raw_mms) return GN_ERR_INTERNALERROR; if (data->raw_mms->number < 1) return GN_ERR_INVALIDLOCATION; memset(&fl, 0, sizeof(fl)); data->file_list = &fl; error = NK6510_GetMMSList_S40_30(data, state); if (error != GN_ERR_NONE) return error; if (data->file_list->file_count < data->raw_mms->number) { /* Needs to be INVALID not EMPTY for --deletemms IN 1 end to work */ return GN_ERR_INVALIDLOCATION; } memset(&fi, 0, sizeof(fi)); snprintf(fi.name, sizeof(fi.name), "%s%s", fl.path, fl.files[data->raw_mms->number - 1]->name); dprintf("Deleting MMS #%d (path: %s, file: %s)\n", data->raw_mms->number, fl.path, fl.files[data->raw_mms->number - 1]->name); data->file = &fi; error = NK6510_DeleteFile(data, state); return error; } /*****************/ /* FILE HANDLING */ /*****************/ /* * This is a wrapper function over NK6510_GetFileList. Intended usage is * just internal. Quite a few functions use filesystem operations and when * folder contains many files (>1000) operation is pretty slow. Let's cache * it so the subsequent operations don't take that much time. * Especially useful for GetSMS in Nokia Series40 3rd Ed and later (*S40_30 functions) */ static gn_error NK6510_GetFileListCache(gn_data *data, struct gn_statemachine *state) { gn_error error = GN_ERR_NONE; gn_file_list *fl; int count = NK6510_FILE_CACHE_TIMEOUT; dprintf("Trying to retrieve filelist of %s from cache\n", data->file_list->path); /* * We call here map_get() twice. First time it is to ensure that we * use proper timeout: the more files are in the folder the longer * it takes to get the file list. */ fl = map_get(&file_cache_map, data->file_list->path, 0); /* * A fl->file_count value of zero would give a timeout of zero which * means "no timeout", so keep the default value in that case. */ if (fl && fl->file_count) count *= fl->file_count; fl = map_get(&file_cache_map, data->file_list->path, count); if (!fl) { dprintf("Cache empty or expired\n"); error = NK6510_GetFileList(data, state); if (error == GN_ERR_NONE) { char *path = strdup(data->file_list->path); fl = calloc(1, sizeof(gn_file_list)); memcpy(fl, data->file_list, sizeof(gn_file_list)); map_add(&file_cache_map, path, fl); } } else { memcpy(data->file_list, fl, sizeof(gn_file_list)); } return error; } static gn_error NK6510_GetFileList(gn_data *data, struct gn_statemachine *state) { unsigned char req[512] = {FBUS_FRAME_HEADER, 0x68, 0x00}; int i, timeout = NK6510_GETFILELIST_TIMEOUT; if (!data->file_list) return GN_ERR_INTERNALERROR; data->file_list->file_count = 0; i = strlen(data->file_list->path); req[5] = char_unicode_encode(req+6, data->file_list->path, i); if (data->file_list->file_count) timeout = NK6510_FILE_CACHE_TIMEOUT * data->file_list->file_count; dprintf("Timeout for getting file list: %d\n", timeout); if (sm_message_send(req[5]+9, NK6510_MSG_FILE, req, state)) return GN_ERR_NOTREADY; return sm_block_no_retry_timeout(NK6510_MSG_FILE, timeout, data, state); } static gn_error NK6510_GetFileDetailsById(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x14, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00 }; /* Location */ int length, i; if (!data->file) return GN_ERR_INTERNALERROR; length = data->file->id[0]; for (i = 0; i < length; i++) { req[8 + i] = data->file->id[i+1]; } length /= 2; req[6] = (length & 0xff00) >> 8; req[7] = (length & 0x00ff); dprintf("Sending: %d %d %d %d\n", req[6], req[7], req[8], req[9]); if (sm_message_send(8 + 2 * length, NK6510_MSG_FILE, req, state)) return GN_ERR_NOTREADY; return sm_block(NK6510_MSG_FILE, data, state); } static gn_error NK6510_GetFileId(gn_data *data, struct gn_statemachine *state) { unsigned char req[512] = {FBUS_FRAME_HEADER, 0x82, 0x00}; int i; if (!data->file) return GN_ERR_INTERNALERROR; i = strlen(data->file->name); req[5] = char_unicode_encode(req+6, data->file->name, i); if (sm_message_send(req[5]+9, NK6510_MSG_FILE, req, state)) return GN_ERR_NOTREADY; return sm_block(NK6510_MSG_FILE, data, state); } static gn_error NK6510_GetFile(gn_data *data, struct gn_statemachine *state) { unsigned char req[512] = {FBUS_FRAME_HEADER, 0x68, 0x00}; unsigned char req2[512] = {FBUS_FRAME_HEADER, 0x72, 0x00, 0x00, 0x00}; unsigned char req3[] = {FBUS_FRAME_HEADER, 0x5e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, /* Start position */ 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00}; /* Size */ unsigned char req4[] = {FBUS_FRAME_HEADER, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03}; gn_error err; int i; /* Register callback */ if (data->progress_indication) { DRVINSTANCE(state)->progress_indication = data->progress_indication; DRVINSTANCE(state)->progress_callback_data = data->callback_data; } if (!data->file) return GN_ERR_INTERNALERROR; i = strlen(data->file->name); /* Get the file size */ req[5] = char_unicode_encode(req+6, data->file->name, i); if (sm_message_send(req[5] + 9, NK6510_MSG_FILE, req, state)) return GN_ERR_NOTREADY; err = sm_block(NK6510_MSG_FILE, data, state); if (err != GN_ERR_NONE) return err; data->file->file = malloc(data->file->file_length); if (!data->file->file) return GN_ERR_INTERNALERROR; /* Start the transfer */ req2[7] = char_unicode_encode(req2 + 8, data->file->name, i); data->file->togo = 0; if (sm_message_send(req2[7] + 12, NK6510_MSG_FILE, req2, state)) return GN_ERR_NOTREADY; err = sm_block(NK6510_MSG_FILE, data, state); if (err != GN_ERR_NONE) return err; if (data->file->togo != data->file->file_length) return GN_ERR_INTERNALERROR; /* Get the data */ while (data->file->togo > 0) { int progress; memcpy(req3+4, data->file->id, NK6510_FILE_ID_LENGTH); i = data->file->file_length - data->file->togo; req3[11] = (i & 0xff0000) >> 16; req3[12] = (i & 0xff00) >> 8; req3[13] = i & 0xff; if (data->file->togo > 0x100) { req3[20] = 0x01; } else { req3[19] = (data->file->togo & 0xff0000) >> 16; req3[20] = (data->file->togo & 0xff00) >> 8; req3[21] = data->file->togo & 0xff; } if (sm_message_send(sizeof(req3), NK6510_MSG_FILE, req3, state)) return GN_ERR_NOTREADY; err = sm_block(NK6510_MSG_FILE, data, state); if (err != GN_ERR_NONE) return err; progress = 100 * (data->file->file_length - data->file->togo) / data->file->file_length; if (!DRVINSTANCE(state)->progress_indication) { fprintf(stderr, _("Progress: %3d%% completed"), progress); /* It's separated for the translators convenience */ fprintf(stderr, "\r"); } else DRVINSTANCE(state)->progress_indication(progress, DRVINSTANCE(state)->progress_callback_data); } if (!DRVINSTANCE(state)->progress_indication) fprintf(stderr, "\n"); /* Finish the transfer */ memcpy(req4+4, data->file->id, NK6510_FILE_ID_LENGTH); if (sm_message_send(sizeof(req4), NK6510_MSG_FILE, req4, state)) return GN_ERR_NOTREADY; return sm_block(NK6510_MSG_FILE, data, state); } static gn_error NK6510_GetFileById(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x0e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, /* Location */ 0x00, 0x00, 0x00, 0x00, /* Start position */ 0x00, 0x00, 0x00, 0x00}; /* Size */ gn_error err = GN_ERR_NONE; int i, length; /* Register callback */ if (data->progress_indication) { DRVINSTANCE(state)->progress_indication = data->progress_indication; DRVINSTANCE(state)->progress_callback_data = data->callback_data; } if (!data->file) return GN_ERR_INTERNALERROR; length = data->file->id[0]; for (i = 0; i < length; i++) { req[8 + i] = data->file->id[i+1]; } length /= 2; req[6] = (length & 0xff00) >> 8; req[7] = (length & 0x00ff); /* Get the data */ while (data->file->togo > 0) { int progress, offset; offset = 9 + 2 * length; i = data->file->file_length - data->file->togo; req[offset] = (i & 0xff0000) >> 16; req[offset + 1] = (i & 0xff00) >> 8; req[offset + 2] = i & 0xff; if (data->file->togo > 0x100) { req[offset + 5] = 0x01; } else { req[offset + 4] = (data->file->togo & 0xff0000) >> 16; req[offset + 5] = (data->file->togo & 0xff00) >> 8; req[offset + 6] = data->file->togo & 0xff; } if (sm_message_send(sizeof(req), NK6510_MSG_FILE, req, state)) return GN_ERR_NOTREADY; err = sm_block(NK6510_MSG_FILE, data, state); if (err != GN_ERR_NONE) return err; progress = 100 * (data->file->file_length - data->file->togo) / data->file->file_length; if (!DRVINSTANCE(state)->progress_indication) { fprintf(stderr, _("Progress: %3d%% completed"), progress); /* It's separated for the translators convenience */ fprintf(stderr, "\r"); } else DRVINSTANCE(state)->progress_indication(progress, DRVINSTANCE(state)->progress_callback_data); } if (!DRVINSTANCE(state)->progress_indication) fprintf(stderr, "\n"); return err; } static gn_error NK6510_PutFile(gn_data *data, struct gn_statemachine *state) { unsigned char req1[512] = {FBUS_FRAME_HEADER, 0x72, 0x11, 0x00, 0x00}; unsigned char req2[512] = {FBUS_FRAME_HEADER, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00}; /* Size */ unsigned char req3[] = {FBUS_FRAME_HEADER, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03}; gn_error err; int i; if (!data->file) return GN_ERR_INTERNALERROR; i = strlen(data->file->name); /* Start the transfer */ req1[7] = char_unicode_encode(req1+8, data->file->name, i); data->file->togo = 0; if (sm_message_send(req1[7]+12, NK6510_MSG_FILE, req1, state)) return GN_ERR_NOTREADY; err = sm_block(NK6510_MSG_FILE, data, state); if (err != GN_ERR_NONE) return err; if (data->file->togo != data->file->file_length) return GN_ERR_INTERNALERROR; /* Put the data */ while (data->file->togo > 0) { memcpy(req2+4, data->file->id, NK6510_FILE_ID_LENGTH); i = data->file->togo; if (data->file->togo > 0x100) { req2[12] = 0x01; data->file->just_sent = 0x100; } else { req2[11] = (data->file->togo & 0xff0000) >> 16; req2[12] = (data->file->togo & 0xff00) >> 8; req2[13] = (data->file->togo & 0xff); data->file->just_sent = data->file->togo; } memcpy(req2+14, data->file->file + data->file->file_length - data->file->togo, data->file->just_sent); if (sm_message_send(14+data->file->just_sent, NK6510_MSG_FILE, req2, state)) return GN_ERR_NOTREADY; err = sm_block(NK6510_MSG_FILE, data, state); if (err != GN_ERR_NONE) return err; if (data->file->togo!=i-data->file->just_sent) return GN_ERR_INTERNALERROR; } /* Finish the transfer */ memcpy(req3+4, data->file->id, NK6510_FILE_ID_LENGTH); if (sm_message_send(sizeof(req3), NK6510_MSG_FILE, req3, state)) return GN_ERR_NOTREADY; return sm_block(NK6510_MSG_FILE, data, state); } static gn_error NK6510_DeleteFile(gn_data *data, struct gn_statemachine *state) { unsigned char req[512] = {FBUS_FRAME_HEADER, 0x62, 0x00}; int i; if (!data->file) return GN_ERR_INTERNALERROR; i = strlen(data->file->name); req[5] = char_unicode_encode(req+6, data->file->name, i); if (sm_message_send(req[5]+9, NK6510_MSG_FILE, req, state)) return GN_ERR_NOTREADY; return sm_block(NK6510_MSG_FILE, data, state); } static gn_error NK6510_DeleteFileById(gn_data *data, struct gn_statemachine *state) { unsigned char req[10] = {FBUS_FRAME_HEADER, 0x1E, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00}; /* file identifier */ int i, length; if (!data->file) return GN_ERR_INTERNALERROR; length = data->file->id[0]; for (i = 0; i < length; i++) { req[8 + i] = data->file->id[i+1]; } length /= 2; req[6] = (length & 0xff00) >> 8; req[7] = (length & 0x00ff); if (sm_message_send(8 + length / 2, NK6510_MSG_FILE, req, state)) return GN_ERR_NOTREADY; return sm_block(NK6510_MSG_FILE, data, state); } static gn_error NK6510_IncomingFile(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { int i, j, frame_length; gn_file *file = NULL; gn_error error = GN_ERR_NONE; switch (message[3]) { case 0x0f: /* Recv a block of file */ if (data->file) { i = (message[8] << 8) + message[9]; memcpy(data->file->file + data->file->file_length - data->file->togo, message+10, i); data->file->togo -= i; } break; case 0x15: /* Answer for GetFileDetailsById */ if (!data->file || !data->file_list) { error = GN_ERR_INTERNALERROR; dprintf("error!\n"); goto out; } switch (message[4]) { case 0x04: error = GN_ERR_EMPTYLOCATION; goto out; case 0x01: /* OK */ break; default: error = GN_ERR_UNKNOWN; dprintf("error!\n"); goto out; } if (!data->file) { error = GN_ERR_INTERNALERROR; dprintf("error!\n"); goto out; } /* frame length */ frame_length = 256 * message[8] + message[9]; file = data->file; char_unicode_decode(file->name, message + 10, 184); dprintf("Filename: %s\n", file->name); if (message[196] != 0xff) { /* read timestamp */ file->year = (message[210]<<8) + message[211]; file->month = message[212]; file->day = message[213]; file->hour = message[214]; file->minute = message[215]; file->second = message[216]; dprintf("Timestamp: %04d-%02d-%02d %02d:%02d:%02d\n", file->year, file->month, file->day, file->hour, file->minute, file->second); } file->togo = file->file_length = 256 * message[220] + message[221]; dprintf("Filesize: %d bytes\n", file->file_length); switch (message[227]) { case 0x00: dprintf("directory\n"); break; case 0x01: dprintf("java jad file\n"); break; case 0x02: dprintf("image\n"); break; case 0x04: dprintf("ringtone\n"); break; case 0x10: dprintf("java jar file\n"); break; case 0x20: dprintf("java rms file\n"); break; default: dprintf("unknown file\n"); } data->file_list->file_count = 0; j = 0; if (length > 0xe8) { /* first 4 octets are for the length */ /* next 4 octets are for the type (?) */ /* then pairs (len, location) */ for (i = 250; i + 4 < length ;) { int k, len = 2 * (message[i] * 256 + message[i+1]); inc_filecount(data->file_list); data->file_list->files[j] = calloc(1, sizeof(gn_file)); data->file_list->files[j]->id = calloc(len + 1, sizeof(char)); data->file_list->files[j]->id[0] = len; for (k = 0; k < len; k++) { data->file_list->files[j]->id[k+1] = message[i + 2 + k]; } i += (len + 2); j++; } } dprintf("%d subentries\n", data->file_list->file_count); break; case 0x1f: /* file deleted */ break; case 0x59: /* Sent a block of file ok */ if (data->file) { data->file->togo -= data->file->just_sent; } break; case 0x5f: /* Recv a block of file */ if (data->file) { i = (message[8] << 8) + message[9]; memcpy(data->file->file + data->file->file_length - data->file->togo, message+10, i); data->file->togo -= i; } break; case 0x63: /* Deleted ok */ if (message[4] == 0x06) { dprintf("Invalid path\n"); error = GN_ERR_INVALIDLOCATION; goto out; } break; case 0x6d: case 0x69: if (message[4] == 0x06) { dprintf("Invalid path\n"); error = GN_ERR_INVALIDLOCATION; goto out; } if (data->file) { if (message[4] == 0x0e) { dprintf("File not found\n"); error = GN_ERR_INVALIDLOCATION; goto out; } file = data->file; } else if (data->file_list) { if (message[4] == 0x0e) { dprintf("Empty directory\n"); goto out; } inc_filecount(data->file_list); data->file_list->files[data->file_list->file_count - 1] = calloc(1, sizeof(gn_file)); file = data->file_list->files[data->file_list->file_count - 1]; i = message[31] * 2; char_unicode_decode(file->name, message + 32, i); } if (!file) { dprintf("Internal error\n"); error = GN_ERR_INTERNALERROR; goto out; } dprintf("Filename: %s\n", file->name); dprintf(" Status bytes: %02x %02x %02x\n", message[8], message[9], message[29]); file->file_length = (message[11] << 16) + (message[12] << 8) + message[13]; dprintf(" Filesize: %d\n", file->file_length); file->year = (message[14]<<8) + message[15]; file->month = message[16]; file->day = message[17]; file->hour = message[18]; file->minute = message[19]; file->second = message[20]; dprintf(" Date: %04u.%02u.%02u\n", file->year, file->month, file->day); dprintf(" Time: %02u:%02u:%02u\n", file->hour, file->minute, file->second); if (message[4] == 0x0d) error = GN_ERR_WAITING; break; case 0x73: if (data->file) { int i; if (message[4] == 0x0c) { data->file->togo = -1; } else if (message[4] == 0x00) { data->file->togo = data->file->file_length; } data->file->id = calloc(NK6510_FILE_ID_LENGTH+1, sizeof(char)); for (i = 0; i < NK6510_FILE_ID_LENGTH; i++) { data->file->id[i] = message[4 + i]; } } break; case 0x75: /* file transfer complete ok */ break; case 0x83: if (data->file) { int i; data->file->id = calloc(NK6510_FILE_ID_LENGTH+1 , sizeof(char)); for (i = 0; i < NK6510_FILE_ID_LENGTH; i++) { data->file->id[i] = message[4 + i]; } } break; default: error = GN_ERR_UNKNOWN; break; } out: return error; } /**********************/ /* PHONEBOOK HANDLING */ /**********************/ static gn_error NK6510_IncomingPhonebook(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { unsigned char blocks; int memtype; char *req = state->last_msg; switch (message[3]) { case 0x04: /* Get status response */ if (data->memory_status) { if (message[5] != 0xff) { data->memory_status->used = (message[20] << 8) + message[21]; data->memory_status->free = ((message[18] << 8) + message[19]) - data->memory_status->used; dprintf("Memory status - location = %d, Capacity: %d \n", (message[4] << 8) + message[5], (message[18] << 8) + message[19]); } else { return GN_ERR_INVALIDMEMORYTYPE; } } break; case 0x08: /* Read Memory response */ /* Check if it is a response to read request */ if (req && req[3] != 0x7) { dprintf("Got read memory response back at unexpected time\n"); return GN_ERR_UNSOLICITED; } if (data->phonebook_entry) { data->phonebook_entry->empty = true; data->phonebook_entry->caller_group = GN_PHONEBOOK_GROUP_None; data->phonebook_entry->name[0] = '\0'; data->phonebook_entry->number[0] = '\0'; data->phonebook_entry->subentries_count = 0; data->phonebook_entry->date.year = 0; data->phonebook_entry->date.month = 0; data->phonebook_entry->date.day = 0; data->phonebook_entry->date.hour = 0; data->phonebook_entry->date.minute = 0; data->phonebook_entry->date.second = 0; } if (data->bitmap) { data->bitmap->text[0] = '\0'; } if (message[6] == 0x0f) { /* not found */ switch (message[10]) { case 0x30: if (data->phonebook_entry) memtype = data->phonebook_entry->memory_type; else memtype = GN_MT_XX; /* * this message has two meanings: "invalid * location" and "memory is empty" */ switch (memtype) { case GN_MT_SM: case GN_MT_ME: return GN_ERR_EMPTYLOCATION; default: break; } return GN_ERR_INVALIDMEMORYTYPE; case 0x33: return GN_ERR_EMPTYLOCATION; case 0x34: return GN_ERR_INVALIDLOCATION; case 0x31: return GN_ERR_INVALIDMEMORYTYPE; default: return GN_ERR_UNKNOWN; } } dprintf("Received phonebook info\n"); blocks = message[21]; return phonebook_decode(message + 22, length - 21, data, blocks, message[11], 12); case 0x0c: /* Write memory location */ if (message[6] == 0x0f) { dprintf("response 0x10 error 0x%x\n", message[10]); switch (message[10]) { case 0x0f: return GN_ERR_WRONGDATAFORMAT; /* I got this when sending incorrect block (with 0 length) */ case 0x23: return GN_ERR_WRONGDATAFORMAT; /* block size does not match a definition */ case 0x36: return GN_ERR_WRONGDATAFORMAT; /* name block is too long */ case 0x3d: return GN_ERR_FAILED; case 0x3e: return GN_ERR_FAILED; case 0x43: return GN_ERR_WRONGDATAFORMAT; /* Probably there are incorrect characters to be saved */ default: return GN_ERR_UNHANDLEDFRAME; } } break; case 0x10: if (message[6] == 0x0f) { dprintf("response 0x10 error 0x%x\n", message[10]); switch (message[10]) { case 0x33: return GN_ERR_WRONGDATAFORMAT; case 0x34: return GN_ERR_INVALIDLOCATION; case 0x3b: return GN_ERR_EMPTYLOCATION; default: return GN_ERR_UNHANDLEDFRAME; } } break; default: dprintf("Unknown subtype of type 0x03 (0x%02x)\n", message[3]); return GN_ERR_UNHANDLEDFRAME; } return GN_ERR_NONE; } static gn_error NK6510_GetMemoryStatus(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x03, 0x01, 0x00, 0x55, 0x55, 0x55, 0x00}; dprintf("Getting memory status...\n"); req[5] = get_memory_type(data->memory_status->memory_type); SEND_MESSAGE_BLOCK(NK6510_MSG_PHONEBOOK, 10); } static gn_error NK6510_ReadPhonebookLocation(gn_data *data, struct gn_statemachine *state, int memtype, int location) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x07, 0x01, 0x01, 0x00, 0x01, 0x02, 0x05, /* memory type */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, /*location */ 0x00, 0x00}; dprintf("Reading phonebook location %d from memory 0x%02x\n", location, memtype); req[9] = memtype; req[14] = location >> 8; req[15] = location & 0xff; SEND_MESSAGE_BLOCK(NK6510_MSG_PHONEBOOK, 18); } static gn_error NK6510_GetSpeedDial(gn_data *data, struct gn_statemachine *state) { return NK6510_ReadPhonebookLocation(data, state, NK6510_MEMORY_SPEEDDIALS, data->speed_dial->number); } static unsigned char PackBlock(u8 id, u8 size, int *no, u8 *buf, u8 *block, unsigned int maxsize) { if (size + 5 > maxsize) { dprintf("Block packing failure -- not enough space\n"); return 0; } *(block++) = id; *(block++) = 0; *(block++) = 0; *(block++) = size + 5; *(block++) = 0xff; /* no; */ memcpy(block, buf, size); ++*no; return (size + 5); } static gn_error NK6510_SetSpeedDial(gn_data *data, struct gn_statemachine *state) { unsigned char req[40] = {FBUS_FRAME_HEADER, 0x0B, 0x00, 0x01, 0x01, 0x00, 0x00, 0x10, 0xFF, 0x0E, 0x00, 0x06, /* number */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}; /* blocks */ char string[40]; int block = 0; dprintf("Setting speeddial...\n"); req[13] = (data->speed_dial->number >> 8); req[13] = data->speed_dial->number & 0xff; string[0] = 0xff; string[1] = data->speed_dial->location >> 8; string[2] = data->speed_dial->location & 0xff; memcpy(string + 3, "\x00\x00\x00\x00", 4); if (data->speed_dial->memory_type == GN_MT_SM) string[7] = 0x06; else string[7] = 0x05; memcpy(string + 8, "\x0B\x02", 2); PackBlock(0x1a, 10, &block, string, req + 22, 40 - 22); SEND_MESSAGE_BLOCK(NK6510_MSG_PHONEBOOK, 38); } static gn_error SetCallerBitmap(gn_data *data, struct gn_statemachine *state) { unsigned char req[400] = {FBUS_FRAME_HEADER, 0x0B, 0x00, 0x01, 0x01, 0x00, 0x00, 0x10, 0xFF, 0x10, 0x00, 0x06, /* number */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}; /* blocks */ unsigned int count = 22, block = 0; char string[150]; int i; /* 00 01 00 0B 00 01 01 00 00 10 FE 10 00 02 00 00 00 00 00 00 00 04 1C 00 00 08 01 01 00 00 1E 00 00 08 02 02 00 00 1B 00 00 88 03 48 0E 00 00 7E CE A4 01 7D E0 ..... 07 00 00 0E 04 08 00 56 00 49 00 50 00 00 */ if (!data->bitmap) return GN_ERR_INTERNALERROR; req[13] = data->bitmap->number + 1; /* Group */ string[0] = data->bitmap->number + 1; string[1] = 0; string[2] = 0x55; count += PackBlock(0x1e, 3, &block, string, req + count, 400 - count); /* Logo */ string[0] = data->bitmap->width; string[1] = data->bitmap->height; string[2] = string[3] = 0x00; string[4] = 0x7e; memcpy(string + 5, data->bitmap->bitmap, data->bitmap->size); count += PackBlock(0x1b, data->bitmap->size + 5, &block, string, req + count, 400 - count); /* Name */ i = strlen(data->bitmap->text); i = char_unicode_encode((string + 1), data->bitmap->text, i); string[0] = i; count += PackBlock(0x07, i + 1, &block, string, req + count, 400 - count); /* Ringtone */ if(data->bitmap->ringtone<0) { string[0] = 0x00; string[7] = 0x00; string[8] = 0x00; string[9] = 0x00; string[10] = 0x01; memcpy(string+1, data->bitmap->ringtone_id, 6); } else { string[0] = 0x00; string[1] = 0x00; string[2] = 0x00; string[3] = 0x00; string[4] = 0x00; string[5] = (data->bitmap->ringtone&0xff00) >> 8; string[6] = (data->bitmap->ringtone&0x00ff); string[7] = 0x00; string[8] = 0x00; string[9] = 0x00; string[10] = 0x07; } count += PackBlock(0x37, 11, &block, string, req + count, 400-count); req[21] = block; SEND_MESSAGE_BLOCK(NK6510_MSG_PHONEBOOK, count); } static gn_error NK6510_ReadPhonebook(gn_data *data, struct gn_statemachine *state) { int memtype = get_memory_type(data->phonebook_entry->memory_type); return NK6510_ReadPhonebookLocation(data, state, memtype, data->phonebook_entry->location); } static gn_error GetCallerBitmap(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x07, 0x01, 0x01, 0x00, 0x01, 0xFE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, /* location */ 0x00, 0x00}; /* You can only get logos which have been altered, */ /* the standard logos can't be read!! */ if (data->bitmap->number >= GN_PHONEBOOK_CALLER_GROUPS_MAX_NUMBER) return GN_ERR_INVALIDLOCATION; req[15] = data->bitmap->number + 1; dprintf("Getting caller(%d) logo...\n", req[15]); SEND_MESSAGE_BLOCK(NK6510_MSG_PHONEBOOK, 18); } static gn_error NK6510_DeletePhonebookLocation(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x0f, 0x55, 0x01, 0x04, 0x55, 0x00, 0x10, 0xFF, 0x02, 0x00, 0x08, /* location */ 0x00, 0x00, 0x00, 0x00, 0x05, /* memory type */ 0x55, 0x55, 0x55}; gn_phonebook_entry *entry; if (data->phonebook_entry) entry = data->phonebook_entry; else return GN_ERR_TRYAGAIN; req[12] = (entry->location >> 8); req[13] = entry->location & 0xff; req[18] = get_memory_type(entry->memory_type); SEND_MESSAGE_BLOCK(NK6510_MSG_PHONEBOOK, 22); } static gn_error NK6510_WritePhonebookLocation(gn_data *data, struct gn_statemachine *state) { unsigned char req[GN_PHONEBOOK_ENTRY_MAX_LENGTH] = { FBUS_FRAME_HEADER, 0x0b, 0x00, 0x01, 0x01, 0x00, 0x00, 0x10, 0x02, 0x00, /* memory type */ 0x00, 0x00, /* location */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; /* blocks */ char string[GN_PHONEBOOK_ENTRY_MAX_LENGTH]; int block, i, j, defaultn; unsigned int count; gn_phonebook_entry *entry; unsigned int postal_count; int postal_block = 0; gn_error error = GN_ERR_NONE; if (data->phonebook_entry) entry = data->phonebook_entry; else return GN_ERR_TRYAGAIN; req[11] = get_memory_type(entry->memory_type); req[12] = (entry->location >> 8); req[13] = entry->location & 0xff; retry: count = 22; block = 1; if (!entry->empty) { /* * Nokia Series40 3rd Ed and later fails on writing caller group block 0x1e. * In that case, let's not write it and let's use First Name, Last Name * not to loose the information. */ if (DRVINSTANCE(state)->pm->flags & PM_EXTPBK2) { int found = 0; for (i = 0; i < entry->subentries_count; i++) { switch (entry->subentries[i].entry_type) { case GN_PHONEBOOK_ENTRY_LastName: /* Last name */ j = char_unicode_encode((string + 1), entry->subentries[i].data.number, strlen(entry->subentries[i].data.number)); string[0] = j; count += PackBlock(0x47, j + 1, &block, string, req + count, GN_PHONEBOOK_ENTRY_MAX_LENGTH - count); found = 1; break; case GN_PHONEBOOK_ENTRY_FirstName: /* First name */ j = char_unicode_encode((string + 1), entry->subentries[i].data.number, strlen(entry->subentries[i].data.number)); string[0] = j; count += PackBlock(0x46, j + 1, &block, string, req + count, GN_PHONEBOOK_ENTRY_MAX_LENGTH - count); found = 1; break; default: break; } } if (!found) { /* Use Name as Last Name */ j = char_unicode_encode((string + 1), entry->name, strlen(entry->name)); string[0] = j; count += PackBlock(0x47, j + 1, &block, string, req + count, GN_PHONEBOOK_ENTRY_MAX_LENGTH - count); } } else { /* Name */ j = char_unicode_encode((string + 1), entry->name, strlen(entry->name)); string[0] = j; count += PackBlock(0x07, j + 1, &block, string, req + count, GN_PHONEBOOK_ENTRY_MAX_LENGTH - count); /* Group */ string[0] = entry->caller_group + 1; string[1] = 0; string[2] = 0x55; count += PackBlock(0x1e, 3, &block, string, req + count, GN_PHONEBOOK_ENTRY_MAX_LENGTH - count); } /* We don't require the application to fill in any subentry. * if it is not filled in, let's take just one number we have. */ if (!entry->subentries_count) { string[0] = GN_PHONEBOOK_NUMBER_General; string[1] = string[2] = string[3] = 0; j = strlen(entry->number); j = char_unicode_encode((string + 5), entry->number, j); string[j + 1] = 0; string[4] = j; count += PackBlock(0x0b, j + 5, &block, string, req + count, GN_PHONEBOOK_ENTRY_MAX_LENGTH - count); } else { /* Default Number */ defaultn = 999; for (i = 0; i < entry->subentries_count; i++) if (entry->subentries[i].entry_type == GN_PHONEBOOK_ENTRY_Number) if (!strcmp(entry->number, entry->subentries[i].data.number)) defaultn = i; if (defaultn < i) { string[0] = entry->subentries[defaultn].number_type; string[1] = string[2] = string[3] = 0; j = strlen(entry->subentries[defaultn].data.number); j = char_unicode_encode((string + 5), entry->subentries[defaultn].data.number, j); string[j + 1] = 0; string[4] = j; count += PackBlock(0x0b, j + 5, &block, string, req + count, GN_PHONEBOOK_ENTRY_MAX_LENGTH - count); } /* Rest of the numbers */ for (i = 0; i < entry->subentries_count; i++) { int duplicate = 0; /* Ignore duplicates */ for (j = 0; j < i; j++) { if (entry->subentries[i].entry_type == entry->subentries[j].entry_type && entry->subentries[i].number_type == entry->subentries[j].number_type && !strcmp(entry->subentries[i].data.number, entry->subentries[j].data.number)) { dprintf("duplicate subentry!\n"); duplicate = 1; break; } } if (duplicate) break; switch (entry->subentries[i].entry_type) { case GN_PHONEBOOK_ENTRY_ExtendedAddress: case GN_PHONEBOOK_ENTRY_Postal: case GN_PHONEBOOK_ENTRY_Street: case GN_PHONEBOOK_ENTRY_City: case GN_PHONEBOOK_ENTRY_StateProvince: case GN_PHONEBOOK_ENTRY_ZipCode: case GN_PHONEBOOK_ENTRY_Country: case GN_PHONEBOOK_ENTRY_LastName: case GN_PHONEBOOK_ENTRY_FirstName: break; case GN_PHONEBOOK_ENTRY_Number: if (j < i) break; if (i != defaultn) { string[0] = entry->subentries[i].number_type; string[1] = string[2] = string[3] = 0; j = strlen(entry->subentries[i].data.number); j = char_unicode_encode((string + 5), entry->subentries[i].data.number, j); string[j + 1] = 0; string[4] = j; count += PackBlock(0x0b, j + 5, &block, string, req + count, GN_PHONEBOOK_ENTRY_MAX_LENGTH - count); } break; case GN_PHONEBOOK_ENTRY_ExtGroup: string[0] = 0; string[1] = 0; string[2] = entry->subentries[i].data.id; count += PackBlock(0x43, 3, &block, string, req + count, GN_PHONEBOOK_ENTRY_MAX_LENGTH - count); break; case GN_PHONEBOOK_ENTRY_Date: case GN_PHONEBOOK_ENTRY_Birthday: if (GN_PHONEBOOK_ENTRY_MAX_LENGTH - count < 12) /* 12 is size of date/birthday record */ break; req[count++] = entry->subentries[i].entry_type; req[count++] = 0x00; req[count++] = 0x00; req[count++] = 0x0c; req[count++] = 0xff; req[count++] = 0x00; req[count++] = entry->subentries[i].data.date.year / 256; req[count++] = entry->subentries[i].data.date.year % 256; req[count++] = entry->subentries[i].data.date.month; req[count++] = entry->subentries[i].data.date.day; req[count++] = entry->subentries[i].data.date.hour; req[count++] = entry->subentries[i].data.date.minute; block++; break; default: j = strlen(entry->subentries[i].data.number); j = char_unicode_encode((string + 1), entry->subentries[i].data.number, j); string[j + 1] = 0; string[0] = j; count += PackBlock(entry->subentries[i].entry_type, j + 1, &block, string, req + count, GN_PHONEBOOK_ENTRY_MAX_LENGTH - count); break; } } /* Addresses */ if (GN_PHONEBOOK_ENTRY_MAX_LENGTH - count > 13) { /* 13 is size of base address main part */ postal_count = count; req[count++] = GN_PHONEBOOK_ENTRY_PostalAddress; req[count++] = 0x00; req[count++] = 0x00; req[count++] = 0x08; req[count++] = 0xff; req[count++] = 0x00; req[count++] = 0x00; req[count++] = 0x00; for (i = 0; i < entry->subentries_count; i++) { int duplicate = 0; /* Ignore duplicates */ for (j = 0; j < i; j++) { if (entry->subentries[i].entry_type == entry->subentries[j].entry_type && entry->subentries[i].number_type == entry->subentries[j].number_type && !strcmp(entry->subentries[i].data.number, entry->subentries[j].data.number)) { duplicate = 1; break; } } if (duplicate) break; switch (entry->subentries[i].entry_type) { case GN_PHONEBOOK_ENTRY_ExtendedAddress: case GN_PHONEBOOK_ENTRY_Postal: case GN_PHONEBOOK_ENTRY_Street: case GN_PHONEBOOK_ENTRY_City: case GN_PHONEBOOK_ENTRY_StateProvince: case GN_PHONEBOOK_ENTRY_ZipCode: case GN_PHONEBOOK_ENTRY_Country: j = strlen(entry->subentries[i].data.number); j = char_unicode_encode((string + 1), entry->subentries[i].data.number, j); string[j + 1] = 0; string[0] = j; count += PackBlock(entry->subentries[i].entry_type, j + 1, &postal_block, string, req + count, GN_PHONEBOOK_ENTRY_MAX_LENGTH - count); break; default: break; } } if (postal_block > 0) { req[postal_count + 7] = postal_block; block++; } else { count = postal_count; } } } req[21] = block - 1; dprintf("Writing phonebook entry %s...\n",entry->name); } else { return NK6510_DeletePhonebookLocation(data, state); } if (sm_message_send(count, NK6510_MSG_PHONEBOOK, req, state)) return GN_ERR_NOTREADY; error = sm_block(NK6510_MSG_PHONEBOOK, data, state); if (error == GN_ERR_FAILED && !(DRVINSTANCE(state)->pm->flags & PM_EXTPBK2)) { dprintf("Writing failed. Falling back to a new method.\n"); dprintf("Misconfiguration in the phone table detected.\nPlease report to gnokii ml (gnokii-users@nongnu.org).\n"); dprintf("Model %s (%s) is series40 3rd+ Edition.\n", DRVINSTANCE(state)->pm->product_name, DRVINSTANCE(state)->pm->model); DRVINSTANCE(state)->pm->flags |= PM_DEFAULT_S40_3RD; goto retry; } return error; } /******************/ /* CLOCK HANDLING */ /******************/ static gn_error NK6510_IncomingClock(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { gn_error error = GN_ERR_NONE; /* Unknown subtype of type 0x19 (clock handling): 0x1c UNHANDLED FRAME RECEIVED request: 0x19 / 0x0004 00 01 00 1b | reply: 0x19 / 0x0012 01 23 00 1c 06 01 ff ff ff ff 00 00 49 4c 01 3e | 01 56 */ dprintf("Incoming clock!\n"); if (!data) return GN_ERR_INTERNALERROR; switch (message[3]) { case NK6510_SUBCLO_SET_DATE_RCVD: dprintf("Date/Time successfully set!\n"); break; case NK6510_SUBCLO_SET_ALARM_RCVD: dprintf("Alarm successfully set!\n"); break; case NK6510_SUBCLO_DATE_RCVD: if (!data->datetime) return GN_ERR_INTERNALERROR; dprintf("Date/Time received!\n"); data->datetime->year = (((unsigned int)message[10]) << 8) + message[11]; data->datetime->month = message[12]; data->datetime->day = message[13]; data->datetime->hour = message[14]; data->datetime->minute = message[15]; data->datetime->second = message[16]; break; case NK6510_SUBCLO_ALARM_TIME_RCVD: if (!data->alarm) return GN_ERR_INTERNALERROR; data->alarm->timestamp.hour = message[14]; data->alarm->timestamp.minute = message[15]; break; case NK6510_SUBCLO_ALARM_STATE_RCVD: if (!data->alarm) return GN_ERR_INTERNALERROR; switch(message[37]) { case NK6510_ALARM_ENABLED: data->alarm->enabled = true; break; case NK6510_ALARM_DISABLED: data->alarm->enabled = false; break; default: data->alarm->enabled = false; dprintf("Unknown value of alarm enable byte: 0x%02x\n", message[8]); error = GN_ERR_UNKNOWN; break; } break; default: dprintf("Unknown subtype of type 0x%02x (clock handling): 0x%02x\n", NK6510_MSG_CLOCK, message[3]); error = GN_ERR_UNHANDLEDFRAME; break; } return error; } static gn_error NK6510_GetDateTime(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, NK6510_SUBCLO_GET_DATE, 0x00, 0x00}; SEND_MESSAGE_BLOCK(NK6510_MSG_CLOCK, 6); } static gn_error NK6510_SetDateTime(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x01, 0x00, 0x01, 0x01, 0x0c, 0x01, 0x03, 0x07, 0xd2, /* Year */ 0x08, 0x01, /* Month & Day */ 0x15, 0x1f, /* Hours & Minutes */ 0x00, /* Seconds */ 0x00}; req[10] = data->datetime->year / 256; req[11] = data->datetime->year % 256; req[12] = data->datetime->month; req[13] = data->datetime->day; req[14] = data->datetime->hour; req[15] = data->datetime->minute; req[16] = data->datetime->second; SEND_MESSAGE_BLOCK(NK6510_MSG_CLOCK, 18); } static gn_error NK6510_GetAlarmTime(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x19, 0x00, 0x02}; SEND_MESSAGE_BLOCK(NK6510_MSG_CLOCK, 6); } static gn_error NK6510_GetAlarmState(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x1f, 0x01, 0x00}; SEND_MESSAGE_BLOCK(NK6510_MSG_CLOCK, 6); } static gn_error NK6510_GetAlarm(gn_data *data, struct gn_statemachine *state) { gn_error error = GN_ERR_NONE; if ((error = NK6510_GetAlarmState(data, state)) != GN_ERR_NONE) return error; return NK6510_GetAlarmTime(data, state); } static gn_error NK6510_SetAlarm(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x11, 0x00, 0x01, 0x01, 0x0c, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Hours, Minutes */ 0x00, 0x00, 0x00 }; dprintf("Setting alarm\n"); if (data->alarm->enabled != 1) return GN_ERR_NOTSUPPORTED; req[14] = data->alarm->timestamp.hour; req[15] = data->alarm->timestamp.minute; SEND_MESSAGE_BLOCK(NK6510_MSG_CLOCK, 19); } /*********************/ /* CALENDAR HANDLING */ /********************/ static int calnote_type_map(int type) { switch (type) { case NK6510_NOTE_MEETING: return GN_CALNOTE_MEETING; case NK6510_NOTE_CALL: return GN_CALNOTE_CALL; case NK6510_NOTE_BIRTHDAY: return GN_CALNOTE_BIRTHDAY; case NK6510_NOTE_MEMO: return GN_CALNOTE_MEMO; case NK6510_NOTE_REMINDER: return GN_CALNOTE_REMINDER; default: return type; } } /* Calendar note new frame description: * [00 - 03] xx xx xx xx FBUS specific (type, etc) * [04 - 04] 00 unknown (1 octet) * [05 - 05] xx type (1 octet): 0x00 - calendar, 0x01 - todo, 0x02 - note * [06 - 07] 00 00 unknown (2 octets) * [08 - 11] 00 00 00 00 unknown (4 octets) * [12 - 13] xx xx location (2 octets) * [14 - 17] xx xx xx xx alarm (4 octets): ff ff ff ff - no alarm, * 00 00 00 00 - alarm at event time * 00 00 00 05 - 5 minuted before * ... * [18 - 20] 80 00 00 unknown (3 octets) * [21 - 21] xx icon id (1 octet) * [22 - 25] xx xx xx xx tone (4 octets): ff ff ff ff - tone * 00 00 00 00 - no tone * [26 - 26] xx unknown (1 octet) * [27 - 27] xx note type (1 octet): 01 * 02 * 04 * 08 * [28 - 33] xx xx xx xx xx xx start date (6 octets): YY YY MM DD HH MM * [34 - 39] xx xx xx xx xx xx end date (6 octets): YY YY MM DD HH MM * [40 - 41] xx xx recurrence (2 octets): 00 - no recurrence * 18 - every day * a8 - every week * ... * [42 - 43] xx xx in case of Birthday: year of birth; otherwise unknown (ff ff) * [44 - 44] xx priority (1 octet): 0x30 - high, 0x20 - medium, 0x10 - low (used in TODO) * [45 - 45] xx status (1 octet): 0x00 - not done, 0x01 - done (used in TODO) * [46 - 47] xx xx occurrences (2 octets) * [48 - 49] 00 00 unknown (2 octets) * [50 - 51] xx xx first text field length (2 octets) [L1] * [52 - 52] xx second text field length (1 octet) [L2] * [53 - 53] 00 unknown (1 octet) * [54 - AA] xx xx xx ... first text field (unicode) * [BB - CC] xx xx xx ... second text field (unicode) * * AA = 54 + 2 * L1 - 1 * BB = AA + 1 * CC = BB + 2 * L2 - 1 */ static gn_error calnote2_decode(unsigned char *message, int length, gn_data *data) { gn_error e = GN_ERR_NONE; int alarm_mark, alarm; int len1, len2; int tone1, tone2; if (!data->calnote) { e = GN_ERR_INTERNALERROR; goto out; } /* Type */ data->calnote->type = calnote_type_map(message[27]); dprintf("type: %d\n", message[27]); /* Location */ data->calnote->location = message[12] * 256 + message[13]; /* Start time */ data->calnote->time.year = message[28] * 256 + message[29]; data->calnote->time.month = message[30]; data->calnote->time.day = message[31]; data->calnote->time.hour = message[32]; data->calnote->time.minute = message[33]; data->calnote->time.second = 0; /* End time */ data->calnote->end_time.year = message[34] * 256 + message[35]; data->calnote->end_time.month = message[36]; data->calnote->end_time.day = message[37]; data->calnote->end_time.hour = message[38]; data->calnote->end_time.minute = message[39]; data->calnote->end_time.second = 0; /* Recurrence */ data->calnote->recurrence = 256 * message[40] + message[41]; /* Occurrence */ data->calnote->occurrences = 256 * message[46] + message[47]; /* Alarm */ alarm_mark = 256 * message[14] + message[15]; alarm = 256 * message[16] + message[17]; if (alarm_mark == 0xffff && alarm == 0xffff) { data->calnote->alarm.enabled = false; } else { data->calnote->alarm.enabled = true; e = calnote_get_alarm(60 * (alarm + 65536 * alarm_mark), &(data->calnote->time), &(data->calnote->alarm.timestamp)); if (e != GN_ERR_NONE) goto out; } /* For Birthday and Call types end date does not have sense. * And you cannot set it in the phone. */ switch (data->calnote->type) { case GN_CALNOTE_BIRTHDAY: data->calnote->time.year = message[42] * 256 + message[43]; case GN_CALNOTE_CALL: case GN_CALNOTE_REMINDER: data->calnote->end_time.year = 0; break; default: break; } /* Alarm tone */ tone1 = 256 * message[22] + message[23]; tone2 = 256 * message[24] + message[25]; switch (65536 * tone1 + tone2) { case 0x00: data->calnote->alarm.tone = 0; break; case 0xffffffff: data->calnote->alarm.tone = 1; break; default: data->calnote->alarm.tone = 1; break; } /* Main text */ len1 = 256 * message[50] + message[51]; char_unicode_decode(data->calnote->text, message + 54, len1 * 2); /* Additional text: location or number */ len2 = message[52]; if (len2) { switch (data->calnote->type) { case GN_CALNOTE_MEETING: char_unicode_decode(data->calnote->mlocation, message + 54 + len1 * 2, len2 * 2); break; case GN_CALNOTE_CALL: char_unicode_decode(data->calnote->phone_number, message + 54 + len1 * 2, len2 * 2); break; default: /* Not sure about this one */ /* ignore */ dprintf("some extra text here\n"); break; } } out: return e; } /* * FIXME * TODO should handle also * - start time and date * - end time and data * - alarm * - task status */ static gn_error todo_decode(unsigned char *message, int length, gn_data *data) { gn_error e = GN_ERR_NONE; int len; if (!data->todo) { e = GN_ERR_INTERNALERROR; goto out; } /* Location */ data->todo->location = message[12] * 256 + message[13]; dprintf("location: %d\n", data->todo->location); /* Priority */ switch (message[44]) { case 0x10: data->todo->priority = GN_TODO_LOW; break; case 0x20: data->todo->priority = GN_TODO_MEDIUM; break; case 0x30: data->todo->priority = GN_TODO_HIGH; break; default: dprintf("Unknown priority (%d), assuming medium\n", message[44]); data->todo->priority = GN_TODO_MEDIUM; break; } dprintf("priority: %d\n", data->todo->priority); /* Main text */ len = 256 * message[50] + message[51]; char_unicode_decode(data->todo->text, message + 54, len * 2); dprintf("text: %s\n", data->todo->text); out: return e; } #define NEXT_CALNOTE data->calnote_list->location[data->calnote_list->last+i] static gn_error NK6510_IncomingCalendar(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { gn_error e = GN_ERR_NONE; int i; if (!data || !data->calnote) return GN_ERR_INTERNALERROR; dprintf("Incoming Calendar\n"); switch (message[3]) { case NK6510_SUBCAL_NOTE_RCVD: /* 0x1a */ e = calnote_decode(message, length, data); break; case NK6510_SUBCAL_NOTE2_RCVD: /* 0x7e */ switch (message[5]) { case 0x00: /* calendar */ e = calnote2_decode(message, length, data); break; case 0x01: /* todo */ e = todo_decode(message, length, data); break; case 0x02: /* note */ e = GN_ERR_NOTSUPPORTED; break; default: e = GN_ERR_INTERNALERROR; break; } break; case NK6510_SUBCAL_INFO2_RCVD: /* 0x9f */ /* message[4] - number of notes locations in this frame * message[5] - 0x07 * message[6-7] - 0x00 0x00 * message[8-9] - number of all notes * ... - notes location (each is 4 octets) */ dprintf("Calendar Notes Info received!\n Total count: %i\n", message[8] * 256 + message[9]); data->calnote_list->number = message[8] * 256 + message[9]; dprintf("Location of Notes: "); for (i = 0; i < message[4]; i++) { if (10 + 4 * i >= length) break; NEXT_CALNOTE = message[12 + 4 * i] * 256 + message[13 + 4 * i]; dprintf("%i ", NEXT_CALNOTE); } dprintf("\n"); data->calnote_list->last += i; if (message[4] == 0) data->calnote_list->number = data->calnote_list->last; break; case NK6510_SUBCAL_INFO_RCVD: /* 0x3b */ dprintf("Calendar Notes Info received!\n Total count: %i\n", message[4] * 256 + message[5]); data->calnote_list->number = message[4] * 256 + message[5]; dprintf("Location of Notes: "); for (i = 0; i < message[6]; i++) { if (8 + 2 * i >= length) break; NEXT_CALNOTE = message[8 + 2 * i] * 256 + message[9 + 2 * i]; dprintf("%i ", NEXT_CALNOTE); } dprintf("\n"); data->calnote_list->last += i; if (message[7] != 0) data->calnote_list->number = data->calnote_list->last; break; case NK6510_SUBCAL_FREEPOS_RCVD: /* 0x32 */ dprintf("First free position received: %i!\n", message[4] * 256 + message[5]); data->calnote->location = (((unsigned int)message[4]) << 8) + message[5]; break; case NK6510_SUBCAL_FREEPOS2_RCVD: /* 0x96 */ dprintf("First free position received: %i!\n", message[8] * 256 + message[9]); data->calnote->location = (((unsigned int)message[8]) << 8) + message[9]; break; case NK6510_SUBCAL_DEL_NOTE_RESP: /* 0x0c */ dprintf("Succesfully deleted calendar note: %i!\n", message[4] * 256 + message[5]); break; case NK6510_SUBCAL_DEL_NOTE2_RESP: /* 0x70 */ dprintf("Succesfully deleted calendar note: %i!\n", message[8] * 256 + message[9]); break; case NK6510_SUBCAL_ADD_MEETING_RESP: /* 0x02 */ case NK6510_SUBCAL_ADD_CALL_RESP: /* 0x04 */ case NK6510_SUBCAL_ADD_BIRTHDAY_RESP: /* 0x06 */ case NK6510_SUBCAL_ADD_REMINDER_RESP: /* 0x08 */ if (message[6]) e = GN_ERR_FAILED; dprintf("Attempt to write calendar note at %i. Status: %i\n", message[4] * 256 + message[5], 1 - message[6]); break; case NK6510_SUBCAL_ADD_NOTE_RESP: /* 0x66 */ switch (message[4]) { case 0x00: dprintf("Calendar note written at %d location\n", message[8] * 256 + message[9]); break; case 0x04: dprintf("Incorrect icon type\n"); e = GN_ERR_FAILED; break; default: dprintf("Unknown error\n"); e = GN_ERR_FAILED; break; } break; case NK6510_SUBCAL_UNSUPPORTED: /* 0xf0 */ e = GN_ERR_NOTSUPPORTED; break; default: dprintf("Unknown subtype of type 0x%02x (calendar handling): 0x%02x\n", NK6510_MSG_CALENDAR, message[3]); e = GN_ERR_UNHANDLEDFRAME; break; } return e; } #define LAST_INDEX (data->calnote_list->last > 0 ? data->calnote_list->last - 1 : 0) static gn_error NK6510_GetCalendarNotesInfo(gn_data *data, struct gn_statemachine *state, int type) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x9e, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, /* start looking with this position */ 0x00}; gn_error error; gn_calnote_list *cl; char *str; req[10] = type; if (!data->calnote_list->last) data->calnote_list->location[0] = 0; do { dprintf("Read %d of %d calendar entries\n", data->calnote_list->last, data->calnote_list->number); req[8] = data->calnote_list->location[LAST_INDEX] / 256; req[9] = data->calnote_list->location[LAST_INDEX] % 256; if (sm_message_send(11, NK6510_MSG_CALENDAR, req, state)) return GN_ERR_NOTREADY; dprintf("Message sent.\n"); error = sm_block(NK6510_MSG_CALENDAR, data, state); if (error != GN_ERR_NONE) return error; dprintf("Message received\n"); } while (data->calnote_list->last < data->calnote_list->number); dprintf("Loop exited\n"); cl = calloc(1, sizeof(gn_calnote_list)); memcpy(cl, data->calnote_list, sizeof(gn_calnote_list)); str = strdup("calendar"); map_add(&location_map, str, cl); return error; } #undef LAST_INDEX /* * To get fresh information from the phone * set data->calnote_list->list to 0 */ static gn_error NK6510_GetCalToDo_S40_30(gn_data *data, struct gn_statemachine *state, int type) { gn_error error = GN_ERR_NONE; unsigned char req[] = { FBUS_FRAME_HEADER, 0x7d, 0x00, /* category: 0x00 calendar, 0x01 todo, 0x02 note */ 0x00, 0x00, 0x00, 0x00, 0x00, /* Location */ 0xff, 0xff, 0xff, 0xff }; unsigned char date[] = { FBUS_FRAME_HEADER, NK6510_SUBCLO_GET_DATE }; gn_data tmpdata; gn_timestamp tmptime; gn_calnote_list *cl; if (type != 0x00 && type != 0x01 && type != 0x02) return GN_ERR_INTERNALERROR; req[4] = type; dprintf("Getting calendar note...\n"); if (data->calnote->location < 1) { error = GN_ERR_INVALIDLOCATION; } else { tmpdata.datetime = &tmptime; cl = map_get(&location_map, "calendar", 0); if (!cl) { dprintf("Getting notes info\n"); error = NK6510_GetCalendarNotesInfo(data, state, type); dprintf("Got calendar info\n"); } else { memcpy(data->calnote_list, cl, sizeof(gn_calnote_list)); } if (error == GN_ERR_NONE) { if (!data->calnote_list->number || data->calnote->location > data->calnote_list->number) { error = GN_ERR_EMPTYLOCATION; } else { error = sm_message_send(4, NK6510_MSG_CLOCK, date, state); if (error == GN_ERR_NONE) { sm_block(NK6510_MSG_CLOCK, &tmpdata, state); req[8] = data->calnote_list->location[data->calnote->location - 1] >> 8; req[9] = data->calnote_list->location[data->calnote->location - 1] & 0xff; data->calnote->time.year = tmptime.year; error = sm_message_send(14, NK6510_MSG_CALENDAR, req, state); if (error == GN_ERR_NONE) { error = sm_block(NK6510_MSG_CALENDAR, data, state); } } } } } return error; } static gn_error NK6510_GetCalendarNote(gn_data *data, struct gn_statemachine *state) { return NK6510_GetCalToDo_S40_30(data, state, 0x00); } long NK6510_GetNoteAlarmDiff(gn_timestamp *time, gn_timestamp *alarm) { time_t t_alarm; time_t t_time; struct tm tm_alarm; struct tm tm_time; tzset(); tm_alarm.tm_year = alarm->year-1900; tm_alarm.tm_mon = alarm->month-1; tm_alarm.tm_mday = alarm->day; tm_alarm.tm_hour = alarm->hour; tm_alarm.tm_min = alarm->minute; tm_alarm.tm_sec = alarm->second; tm_alarm.tm_isdst = 0; t_alarm = mktime(&tm_alarm); tm_time.tm_year = time->year-1900; tm_time.tm_mon = time->month-1; tm_time.tm_mday = time->day; tm_time.tm_hour = time->hour; tm_time.tm_min = time->minute; tm_time.tm_sec = time->second; tm_time.tm_isdst = 0; t_time = mktime(&tm_time); dprintf("\tAlarm: %02i-%02i-%04i %02i:%02i:%02i\n", alarm->day, alarm->month, alarm->year, alarm->hour, alarm->minute, alarm->second); dprintf("\tDate: %02i-%02i-%04i %02i:%02i:%02i\n", time->day, time->month, time->year, time->hour, time->minute, time->second); dprintf("Difference in alarm time is %f\n", difftime(t_time, t_alarm)); return difftime(t_time, t_alarm); } static gn_error NK6510_FirstCalendarFreePos(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = { FBUS_FRAME_HEADER, 0x31 }; SEND_MESSAGE_BLOCK(NK6510_MSG_CALENDAR, 4); } static gn_error NK6510_FirstCalendarFreePos_S40_30(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = { FBUS_FRAME_HEADER, 0x95, 0x00 }; SEND_MESSAGE_BLOCK(NK6510_MSG_CALENDAR, 5); } static gn_error NK6510_WriteCalTodo_S40_30(gn_data *data, struct gn_statemachine *state, int type) { gn_error error = GN_ERR_NONE; gn_calnote *calnote; int len, count = 54; unsigned char req[1024] = { FBUS_FRAME_HEADER, 0x65, 0x00, /* category: 0x00 calendar, 0x01 todo, 0x02 note */ 0x00, 0x00, 0x00, 0x00, 0x00, /* location */ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* alarm */ 0x00, 0x00, 0x00, 0x00, /* note icon */ 0xff, 0xff, 0xff, 0xff, /* alarm tone */ 0x00, /* 0x02 for reminder */ 0x00, /* note type: 0x00 - reminder 0x01 - meeting 0x02 - call 0x04 - birthday 0x08 - memo */ 0x07, 0xd0, 0x01, 0x12, 0x0c, 0x00, /* start datetime */ 0x07, 0xd0, 0x01, 0x12, 0x0c, 0x00, /* end datetime */ 0x00, 0x00, /* recurrence */ 0xff, 0xff, /* birth year */ 0x20, /* todo priority */ 0x00, /* todo completed */ 0x00, 0x00, /* number of occurrences */ 0x00, 0x00, /* text length */ 0x00, /* phone length/meeting location */ 0x00, 0x00, 0x00}; dprintf("WriteCalTodo_S40_30\n"); if (!data->calnote) return GN_ERR_INTERNALERROR; if (type != 0x00 && type != 0x01 && type != 0x02) return GN_ERR_INTERNALERROR; req[4] = type; calnote = data->calnote; /* 6510 needs to seek the first free pos to inhabit with next note */ error = NK6510_FirstCalendarFreePos_S40_30(data, state); if (error != GN_ERR_NONE) return error; /* Set location */ req[8] = calnote->location / 256; req[9] = calnote->location % 256; /* text */ req[49] = char_mblen(calnote->text); len = char_unicode_encode(req + 54, calnote->text, strlen(calnote->text)); count += len; /* Set calnote types */ switch (calnote->type) { case GN_CALNOTE_REMINDER: req[26] = 0x02; /* end date == start date */ memcpy(&(calnote->end_time), &(calnote->time), sizeof(calnote->time)); break; case GN_CALNOTE_MEETING: req[27] = 0x01; req[50] = char_mblen(calnote->mlocation); count += char_unicode_encode(req + 54 + len, calnote->mlocation, strlen(calnote->mlocation)); break; case GN_CALNOTE_CALL: req[27] = 0x02; req[50] = strlen(calnote->phone_number); count += char_unicode_encode(req + 54 + len, calnote->phone_number, strlen(calnote->phone_number)); break; case GN_CALNOTE_BIRTHDAY: req[27] = 0x04; /* Birthday year */ req[42] = calnote->time.year / 256; req[43] = calnote->time.year % 256; /* Event time: 2005 */ calnote->time.year = 2005; /* end date == start date */ memcpy(&(calnote->end_time), &(calnote->time), sizeof(calnote->time)); break; case GN_CALNOTE_MEMO: req[27] = 0x08; break; } /* Recurrence */ if (calnote->recurrence >= 8760) calnote->recurrence = 0xffff; /* setting 1 year repeat */ req[40] = calnote->recurrence / 256; req[41] = calnote->recurrence % 256; /* Occurrences */ /* FIXME: it doesn't work if (calnote->recurrence) { req[46] = calnote->occurrences / 256; req[47] = calnote->occurrences % 256; }*/ /* Set start time and end time */ req[28] = calnote->time.year / 256; req[29] = calnote->time.year % 256; req[30] = calnote->time.month; req[31] = calnote->time.day; req[32] = calnote->time.hour; req[33] = calnote->time.minute; req[34] = calnote->end_time.year / 256; req[35] = calnote->end_time.year % 256; req[36] = calnote->end_time.month; req[37] = calnote->end_time.day; req[38] = calnote->end_time.hour; req[39] = calnote->end_time.minute; /* Alarm */ if (calnote->alarm.enabled) { long seconds; /* Alarm for birthday is special. We need to set for the same * year we set the start date. */ if (calnote->type == GN_CALNOTE_BIRTHDAY) calnote->time.year = calnote->alarm.timestamp.year; seconds = NK6510_GetNoteAlarmDiff(&calnote->time, &calnote->alarm.timestamp); if (seconds >= 0) { /* Otherwise it's an error condition.... */ req[14] = (seconds / 60) >> 24; req[15] = (seconds / 60) >> 16; req[16] = (seconds / 60) >> 8; req[17] = (seconds / 60); } if (!calnote->alarm.tone) { req[22] = req[23] = req[24] = req[25] = 0; } } map_del(&location_map, "calendar"); SEND_MESSAGE_BLOCK(NK6510_MSG_CALENDAR, count); } static gn_error NK6510_WriteCalendarNote_S40_30(gn_data *data, struct gn_statemachine *state) { return NK6510_WriteCalTodo_S40_30(data, state, 0x00); } static gn_error NK6510_WriteCalendarNote(gn_data *data, struct gn_statemachine *state) { unsigned char req[350] = { FBUS_FRAME_HEADER, 0x01, /* note type ... */ 0x00, 0x00, /* location */ 0x00, /* entry type */ 0x00, /* fixed */ 0x00, 0x00, 0x00, 0x00, /* Year(2bytes), Month, Day */ /* here starts block */ 0x00, 0x00, 0x00, 0x00,0x00, 0x00}; /* ... depends on note type ... */ gn_calnote *calnote; int count = 0; int len = 0; long seconds, minutes; gn_error error; if (DRVINSTANCE(state)->pm->flags & PM_EXTCALENDAR) return NK6510_WriteCalendarNote_S40_30(data, state); dprintf("WriteCalendarNote\n"); if (!data->calnote) return GN_ERR_INTERNALERROR; calnote = data->calnote; /* 6510 needs to seek the first free pos to inhabit with next note */ error = NK6510_FirstCalendarFreePos(data, state); if (error != GN_ERR_NONE) { if (error == GN_ERR_NOTSUPPORTED) { /* * GN_ERR_NOTSUPPORTED most likely means 0xf0 frame. Experience shows that * with high probability we have series40 3rd+ Ed phone. */ error = NK6510_WriteCalendarNote_S40_30(data, state); if (error == GN_ERR_NONE) { dprintf("Misconfiguration in the phone table detected.\nPlease report to gnokii ml (gnokii-users@nongnu.org).\n"); dprintf("Model %s (%s) is series40 3rd+ Edition.\n", DRVINSTANCE(state)->pm->product_name, DRVINSTANCE(state)->pm->model); DRVINSTANCE(state)->pm->flags |= PM_DEFAULT_S40_3RD; } return error; } return error; } /* Location */ req[4] = calnote->location >> 8; req[5] = calnote->location & 0xff; switch (calnote->type) { case GN_CALNOTE_MEETING: req[6] = 0x01; req[3] = 0x01; break; case GN_CALNOTE_CALL: req[6] = 0x02; req[3] = 0x03; break; case GN_CALNOTE_BIRTHDAY: req[6] = 0x04; req[3] = 0x05; break; case GN_CALNOTE_REMINDER: req[6] = 0x08; req[3] = 0x07; break; case GN_CALNOTE_MEMO: return GN_ERR_INTERNALERROR; /* not yet implemented! */ } req[8] = calnote->time.year >> 8; req[9] = calnote->time.year & 0xff; req[10] = calnote->time.month; req[11] = calnote->time.day; /* From here starts BLOCK */ count = 12; switch (calnote->type) { case GN_CALNOTE_MEETING: req[count++] = calnote->time.hour; /* Field 12 */ req[count++] = calnote->time.minute; /* Field 13 */ /* Alarm .. */ req[count++] = 0xff; /* Field 14 */ req[count++] = 0xff; /* Field 15 */ if (calnote->alarm.timestamp.year) { seconds = NK6510_GetNoteAlarmDiff(&calnote->time, &calnote->alarm.timestamp); if (seconds >= 0L) { /* Otherwise it's an error condition.... */ minutes = seconds / 60L; count -= 2; req[count++] = minutes >> 8; req[count++] = minutes & 0xff; } } /* recurrence */ if (calnote->recurrence >= 8760) calnote->recurrence = 0xffff; /* setting 1 Year repeat */ req[count++] = calnote->recurrence >> 8; /* Field 16 */ req[count++] = calnote->recurrence & 0xff; /* Field 17 */ /* len of the text */ req[count++] = strlen(calnote->text); /* Field 18 */ /* fixed 0x00 */ req[count++] = 0x00; /* Field 19 */ /* Text */ dprintf("Count before encode = %d\n", count); dprintf("Meeting Text is = \"%s\"\n", calnote->text); len = char_unicode_encode(req + count, calnote->text, strlen(calnote->text)); /* Fields 20->N */ count += len; break; case GN_CALNOTE_CALL: req[count++] = calnote->time.hour; /* Field 12 */ req[count++] = calnote->time.minute; /* Field 13 */ /* Alarm .. */ req[count++] = 0xff; /* Field 14 */ req[count++] = 0xff; /* Field 15 */ if (calnote->alarm.timestamp.year) { seconds = NK6510_GetNoteAlarmDiff(&calnote->time, &calnote->alarm.timestamp); if (seconds >= 0L) { /* Otherwise it's an error condition.... */ minutes = seconds / 60L; count -= 2; req[count++] = minutes >> 8; req[count++] = minutes & 0xff; } } /* recurrence */ if (calnote->recurrence >= 8760) calnote->recurrence = 0xffff; /* setting 1 Year repeat */ req[count++] = calnote->recurrence >> 8; /* Field 16 */ req[count++] = calnote->recurrence & 0xff; /* Field 17 */ /* len of text */ req[count++] = strlen(calnote->text); /* Field 18 */ /* fixed 0x00 */ req[count++] = strlen(calnote->phone_number); /* Field 19 */ /* Text */ len = char_unicode_encode(req + count, calnote->text, strlen(calnote->text)); /* Fields 20->N */ count += len; len = char_unicode_encode(req + count, calnote->phone_number, strlen(calnote->phone_number)); /* Fields (N+1)->n */ count += len; break; case GN_CALNOTE_BIRTHDAY: req[count++] = 0x00; /* Field 12 Fixed */ req[count++] = 0x00; /* Field 13 Fixed */ /* Alarm .. */ req[count++] = 0x00; req[count++] = 0x00; /* Fields 14, 15 */ req[count++] = 0xff; /* Field 16 */ req[count++] = 0xff; /* Field 17 */ if (calnote->alarm.timestamp.year) { /* First I try Time.year = Alarm.year. If negative, I increase year by one, but only once! This is because I may have alarm period across the year border, eg. birthday on 2001-01-10 and alarm on 2000-12-27 */ calnote->time.year = calnote->alarm.timestamp.year; if ((seconds= NK6510_GetNoteAlarmDiff(&calnote->time, &calnote->alarm.timestamp)) < 0L) { calnote->time.year++; seconds = NK6510_GetNoteAlarmDiff(&calnote->time, &calnote->alarm.timestamp); } if (seconds >= 0L) { /* Otherwise it's an error condition.... */ count -= 4; req[count++] = seconds >> 24; /* Field 14 */ req[count++] = (seconds >> 16) & 0xff; /* Field 15 */ req[count++] = (seconds >> 8) & 0xff; /* Field 16 */ req[count++] = seconds & 0xff; /* Field 17 */ } } req[count++] = 0x00; /* FIXME: calnote->AlarmType; 0x00 tone, 0x01 silent 18 */ /* len of text */ req[count++] = strlen(calnote->text); /* Field 19 */ /* Text */ dprintf("Count before encode = %d\n", count); len = char_unicode_encode(req + count, calnote->text, strlen(calnote->text)); /* Fields 22->N */ count += len; break; case GN_CALNOTE_REMINDER: /* recurrence */ if (calnote->recurrence >= 8760) calnote->recurrence = 0xffff; /* setting 1 Year repeat */ req[count++] = calnote->recurrence >> 8; /* Field 12 */ req[count++] = calnote->recurrence & 0xff; /* Field 13 */ /* len of text */ req[count++] = strlen(calnote->text); /* Field 14 */ /* fixed 0x00 */ req[count++] = 0x00; /* Field 15 */ /* Text */ len = char_unicode_encode(req + count, calnote->text, strlen(calnote->text)); /* Fields 16->N */ count += len; break; case GN_CALNOTE_MEMO: return GN_ERR_INTERNALERROR; /* not yet implemented! */ } /* padding */ req[count] = 0x00; dprintf("Count after padding = %d\n", count); map_del(&location_map, "calendar"); SEND_MESSAGE_BLOCK(NK6510_MSG_CALENDAR, count); } static gn_error NK6510_DeleteCalTodo_S40_30(gn_data *data, struct gn_statemachine *state, int type) { unsigned char req[] = { FBUS_FRAME_HEADER, 0x6f, /* delete calendar note */ 0x00, /* 0x00 - calendar, 0x01 - todo, 0x02 - note */ 0x00, 0x00, 0x00, 0x00, 0x00}; /*location */ gn_calnote_list list; bool own_list = true; if (type != 0x00 && type != 0x01 && type != 0x02) return GN_ERR_INTERNALERROR; req[4] = type; if (data->calnote_list) own_list = false; else { memset(&list, 0, sizeof(gn_calnote_list)); data->calnote_list = &list; } if (data->calnote_list->number == 0) NK6510_GetCalendarNotesInfo(data, state, type); if (data->calnote->location < data->calnote_list->number + 1 && data->calnote->location > 0) { req[8] = data->calnote_list->location[data->calnote->location - 1] >> 8; req[9] = data->calnote_list->location[data->calnote->location - 1] & 0xff; } else { return GN_ERR_INVALIDLOCATION; } if (own_list) data->calnote_list = NULL; map_del(&location_map, "calendar"); SEND_MESSAGE_BLOCK(NK6510_MSG_CALENDAR, 10); } static gn_error NK6510_DeleteCalendarNote_S40_30(gn_data *data, struct gn_statemachine *state) { return NK6510_DeleteCalTodo_S40_30(data, state, 0x00); } static gn_error NK6510_DeleteCalendarNote(gn_data *data, struct gn_statemachine *state) { gn_error error; unsigned char req[] = { FBUS_FRAME_HEADER, 0x0b, /* delete calendar note */ 0x00, 0x00}; /*location */ gn_calnote_list list; bool own_list = true; if (DRVINSTANCE(state)->pm->flags & PM_EXTCALENDAR) return NK6510_DeleteCalendarNote_S40_30(data, state); if (data->calnote_list) own_list = false; else { memset(&list, 0, sizeof(gn_calnote_list)); data->calnote_list = &list; } if (data->calnote_list->number == 0) NK6510_GetCalendarNotesInfo(data, state, 0x00); if (data->calnote->location < data->calnote_list->number + 1 && data->calnote->location > 0) { req[4] = data->calnote_list->location[data->calnote->location - 1] >> 8; req[5] = data->calnote_list->location[data->calnote->location - 1] & 0xff; } else { return GN_ERR_INVALIDLOCATION; } if (own_list) data->calnote_list = NULL; if (sm_message_send(8, NK6510_MSG_CALENDAR, req, state)) return GN_ERR_NOTREADY; error = sm_block(NK6510_MSG_CALENDAR, data, state); dprintf("%s\n", gn_error_print(error)); if (error == GN_ERR_NOTSUPPORTED) { dprintf("Rollback to S40_30\n"); /* * GN_ERR_NOTSUPPORTED most likely means 0xf0 frame. Experience shows that * with high probability we have series40 3rd+ Ed phone. */ error = NK6510_DeleteCalendarNote_S40_30(data, state); if (error == GN_ERR_NONE) { dprintf("Misconfiguration in the phone table detected.\nPlease report to gnokii ml (gnokii-users@nongnu.org).\n"); dprintf("Model %s (%s) is series40 3rd+ Edition.\n", DRVINSTANCE(state)->pm->product_name, DRVINSTANCE(state)->pm->model); DRVINSTANCE(state)->pm->flags |= PM_DEFAULT_S40_3RD; } } if (error == GN_ERR_NONE) map_del(&location_map, "calendar"); return error; } /********************/ /* INCOMING NETWORK */ /********************/ static gn_error NK6510_IncomingNetwork(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { unsigned char *blockstart, *operatorname; int i; switch (message[3]) { case 0x01: case 0x02: blockstart = message + 6; for (i = 0; i < message[5]; i++) { dprintf("Blockstart: %i, ", blockstart[0]); switch (blockstart[0]) { case 0x00: dprintf("Network status\n"); switch (blockstart[2]) { case 0x00: dprintf("Logged into home network.\n"); break; case 0x01: dprintf("Logged into a roaming network.\n"); break; case 0x04: case 0x09: dprintf("Not logged in any network.\n"); break; case 0x06: case 0x0b: dprintf("Inactive SIM.\n"); break; case 0x08: dprintf("Flight mode.\n"); break; default: dprintf("Unknown network status 0x%02x!\n", blockstart[2]); break; } operatorname = malloc(blockstart[5] + 1); char_unicode_decode(operatorname, blockstart + 6, blockstart[5] << 1); dprintf("Operator Name: %s\n", operatorname); free(operatorname); break; case 0x09: /* Operator details */ dprintf("Operator details\n"); /* Network code is stored as 0xBA 0xXC 0xED ("ABC DE"). */ if (data->network_info) { data->network_info->cell_id[0] = blockstart[6]; data->network_info->cell_id[1] = blockstart[7]; data->network_info->LAC[0] = blockstart[2]; data->network_info->LAC[1] = blockstart[3]; data->network_info->network_code[0] = '0' + (blockstart[8] & 0x0f); data->network_info->network_code[1] = '0' + (blockstart[8] >> 4); data->network_info->network_code[2] = '0' + (blockstart[9] & 0x0f); data->network_info->network_code[3] = ' '; data->network_info->network_code[4] = '0' + (blockstart[10] & 0x0f); data->network_info->network_code[5] = '0' + (blockstart[10] >> 4); data->network_info->network_code[6] = 0; } break; default: dprintf("Unknown operator block\n"); break; } blockstart += blockstart[1]; } break; case 0x0b: /* no idea what this is about 00 01 00 0b 00 02 00 00 00 */ break; case 0x0c: /* RF Level */ dprintf("RF level: %f\n", message[8]); if (data->rf_level) { *(data->rf_unit) = GN_RF_Percentage; *(data->rf_level) = message[8]; } break; case 0x1e: /* RF Level change notify */ /* 01 56 00 1E 0D 65 01 56 00 1E 0C 65 01 56 00 1E 0B 65 01 56 00 1E 09 66 01 56 00 1E 08 66 01 56 00 1E 0A 66 */ dprintf("RF level: %f\n", message[4]); if (data->rf_level) { *(data->rf_unit) = GN_RF_Percentage; *(data->rf_level) = message[4]; } break; case 0x20: dprintf("Incoming call(?)\n"); /* no idea what this is about 01 56 00 20 02 00 55 01 56 00 20 01 00 55 */ break; case 0x24: if (length == 18) return GN_ERR_EMPTYLOCATION; if (data->bitmap) { data->bitmap->netcode[0] = '0' + (message[12] & 0x0f); data->bitmap->netcode[1] = '0' + (message[12] >> 4); data->bitmap->netcode[2] = '0' + (message[13] & 0x0f); data->bitmap->netcode[3] = ' '; data->bitmap->netcode[4] = '0' + (message[14] & 0x0f); data->bitmap->netcode[5] = '0' + (message[14] >> 4); data->bitmap->netcode[6] = 0; dprintf("Operator %s \n",data->bitmap->netcode); data->bitmap->type = GN_BMP_NewOperatorLogo; data->bitmap->height = message[21]; data->bitmap->width = message[20]; data->bitmap->size = message[25]; dprintf("size: %i\n", data->bitmap->size); memcpy(data->bitmap->bitmap, message + 26, data->bitmap->size); dprintf("Logo (%dx%d) \n", data->bitmap->height, data->bitmap->width); } else return GN_ERR_INTERNALERROR; break; case 0x26: dprintf("Op Logo Set OK\n"); break; default: dprintf("Unknown subtype of type 0x0a (%d)\n", message[3]); return GN_ERR_UNHANDLEDFRAME; } return GN_ERR_NONE; } static gn_error NK6510_GetNetworkInfo(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x00, 0x00}; dprintf("Getting network info ...\n"); SEND_MESSAGE_BLOCK(NK6510_MSG_NETSTATUS, 5); } static gn_error NK6510_GetRFLevel(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x0B, 0x00, 0x02, 0x00, 0x00, 0x00}; dprintf("Getting network info ...\n"); SEND_MESSAGE_BLOCK(NK6510_MSG_NETSTATUS, 9); } static gn_error GetOperatorBitmap(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x23, 0x00, 0x00, 0x55, 0x55, 0x55}; dprintf("Getting op logo...\n"); SEND_MESSAGE_BLOCK(NK6510_MSG_NETSTATUS, 9); } static gn_error SetOperatorBitmap(gn_data *data, struct gn_statemachine *state) { /* unsigned char req[1000] = {FBUS_FRAME_HEADER, 0x25, 0x01, 0x55, 0x00, 0x00, 0x55, */ unsigned char req[1000] = {FBUS_FRAME_HEADER, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, /* Blocks */ 0x0c, 0x08, /* type, length */ /* 0x62, 0xf2, 0x20, 0x03, 0x55, 0x55, */ 0x62, 0xf2, 0x20, 0x03, 0x00, 0x00, 0x1a}; memset(req + 19, 0, 881); /* 00 01 00 25 01 55 00 00 55 02 0C 08 62 F2 20 03 55 55 1A F4 4E 15 00 EA 00 EA 5F 91 4E 80 5F 95 51 80 DF C2 DF 7D E0 4E 11 0E 80 55 20 E0 E0 F0 EA 7D E0 E0 7D E0 E */ if ((data->bitmap->width != state->driver.phone.operator_logo_width) || (data->bitmap->height != state->driver.phone.operator_logo_height)) { dprintf("Invalid image size - expecting (%dx%d) got (%dx%d)\n", state->driver.phone.operator_logo_height, state->driver.phone.operator_logo_width, data->bitmap->height, data->bitmap->width); return GN_ERR_INVALIDSIZE; } if (strcmp(data->bitmap->netcode, "000 00")) { /* set logo */ req[12] = ((data->bitmap->netcode[1] & 0x0f) << 4) | (data->bitmap->netcode[0] & 0x0f); req[13] = 0xf0 | (data->bitmap->netcode[2] & 0x0f); req[14] = ((data->bitmap->netcode[5] & 0x0f) << 4) | (data->bitmap->netcode[4] & 0x0f); req[19] = data->bitmap->size + 8; req[20] = data->bitmap->width; req[21] = data->bitmap->height; req[23] = req[25] = data->bitmap->size; memcpy(req + 26, data->bitmap->bitmap, data->bitmap->size); } dprintf("Setting op logo...\n"); SEND_MESSAGE_BLOCK(NK6510_MSG_NETSTATUS, req[19] + req[11] + 14); } /*********************/ /* INCOMING BATTERY */ /*********************/ static gn_error NK6510_IncomingBattLevel(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { switch (message[3]) { case 0x0B: if (!data->battery_level) return GN_ERR_INTERNALERROR; *(data->battery_unit) = GN_BU_Percentage; *(data->battery_level) = message[9] * 100 / state->driver.phone.max_battery_level; dprintf("Battery level %f\n\n", *(data->battery_level)); break; default: dprintf("Unknown subtype of type 0x17 (%d)\n", message[3]); return GN_ERR_UNKNOWN; } return GN_ERR_NONE; } static gn_error NK6510_GetBatteryLevel(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x0A, 0x02, 0x00}; dprintf("Getting battery level...\n"); SEND_MESSAGE_BLOCK(NK6510_MSG_BATTERY, 6); } /*************/ /* RINGTONES */ /*************/ static gn_error NK6510_IncomingRingtone(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { int i, j, n; unsigned char *pos; gn_ringtone_list *rl = data->ringtone_list; switch (message[3]) { case 0x08: dprintf("List of ringtones received!\n"); if (!rl) return GN_ERR_INTERNALERROR; rl->count = 256 * message[4] + message[5]; rl->userdef_location = NK6510_RINGTONE_USERDEF_LOCATION; rl->userdef_count = 10; if (rl->count > GN_RINGTONE_MAX_COUNT) rl->count = GN_RINGTONE_MAX_COUNT; i = 6; for (j = 0; j < rl->count; j++) { if ((message[i + 4] != 0x01 && message[i + 4] != 0x02) || message[i + 6] != 0x00) return GN_ERR_UNHANDLEDFRAME; rl->ringtone[j].location = 256 * message[i + 2] + message[i + 3]; rl->ringtone[j].user_defined = (message[i + 5] == 0x02); rl->ringtone[j].readable = 1; rl->ringtone[j].writable = rl->ringtone[j].user_defined; n = message[i + 7]; if (n >= sizeof(rl->ringtone[0].name)) n = sizeof(rl->ringtone[0].name) - 1; char_unicode_decode(rl->ringtone[j].name, message + i + 8, 2 * n); i += 256 * message[i] + message[i + 1]; dprintf("Ringtone (#%03i) name: %s\n", rl->ringtone[j].location, rl->ringtone[j].name); } break; /* set raw ringtone result */ case 0x0f: if (message[5] != 0x00) return GN_ERR_UNHANDLEDFRAME; switch (message[4]) { case 0x00: break; case 0x03: dprintf("Invalid location\n"); return GN_ERR_INVALIDLOCATION; case 0x0e: dprintf("Ringtone too long. Max is 69 notes.\n"); return GN_ERR_ENTRYTOOLONG; default: return GN_ERR_UNHANDLEDFRAME; } break; /* delete ringtone result */ case 0x11: if (message[5] != 0x00) return GN_ERR_UNHANDLEDFRAME; switch (message[4]) { case 0x00: break; case 0x03: return GN_ERR_INVALIDLOCATION; case 0x0a: return GN_ERR_EMPTYLOCATION; default: return GN_ERR_UNHANDLEDFRAME; } break; /* get raw ringtone result */ case 0x13: if (!data->ringtone || !data->raw_data) return GN_ERR_INTERNALERROR; pos = message + 8; char_unicode_decode(data->ringtone->name, pos, 2 * message[7]); dprintf("Got ringtone %d: %s\n", (message[4] << 8) + message[5], data->ringtone->name); pos += 2 * message[7]; i = (pos[0] << 8) + pos[1]; pos += 2; dprintf("Ringtone size: %d\n", i); if (data->raw_data->length < i) { dprintf("Expected max %d bytes, got %d bytes\n", data->raw_data->length, i); return GN_ERR_INVALIDSIZE; } data->raw_data->length = i; memcpy(data->raw_data->data, pos, i); break; /* get raw ringtone failed */ case 0x14: return GN_ERR_INVALIDLOCATION; default: dprintf("Unknown subtype of type 0x1f (%d)\n", message[3]); return GN_ERR_UNHANDLEDFRAME; } return GN_ERR_NONE; } static gn_error NK6510_GetRingtoneList(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x07, 0x00, 0x00, 0xFE, 0x00, 0x7D}; dprintf("Getting list of ringtones...\n"); SEND_MESSAGE_BLOCK(NK6510_MSG_RINGTONE, 9); } static gn_error NK6510_GetRawRingtone(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x12, 0x00, 0x00}; if (!data->ringtone || !data->raw_data) return GN_ERR_INTERNALERROR; dprintf("Getting raw ringtone %d...\n", data->ringtone->location); req[4] = data->ringtone->location / 256; req[5] = data->ringtone->location % 256; SEND_MESSAGE_BLOCK(NK6510_MSG_RINGTONE, 6); } static gn_error NK6510_SetRawRingtone(gn_data *data, struct gn_statemachine *state) { unsigned char req[32768] = {FBUS_FRAME_HEADER, 0x0e, 0x00, 0x00, 0xfe}; unsigned char *pos; int len; if (!data->ringtone || !data->raw_data) return GN_ERR_INTERNALERROR; dprintf("Setting raw ringtone %d...\n", data->ringtone->location); pos = req + 4; if (data->ringtone->location < 0) { *pos++ = 0x7f; *pos++ = 0xff; } else { *pos++ = data->ringtone->location / 256; *pos++ = data->ringtone->location % 256; } pos++; *pos = strlen(data->ringtone->name); len = char_unicode_encode(pos + 1, data->ringtone->name, *pos); pos += 1 + len; *pos++ = data->raw_data->length / 256; *pos++ = data->raw_data->length % 256; if (pos - req + data->raw_data->length + 2 > sizeof(req)) return GN_ERR_INVALIDSIZE; memcpy(pos, data->raw_data->data, data->raw_data->length); pos += data->raw_data->length; *pos++ = 0; *pos++ = 0; SEND_MESSAGE_BLOCK(NK6510_MSG_RINGTONE, pos - req); } static gn_error NK6510_GetRingtone(gn_data *data, struct gn_statemachine *state) { gn_data d; gn_error err; gn_raw_data rawdata; char buf[4096]; if (!data->ringtone) return GN_ERR_INTERNALERROR; memset(&rawdata, 0, sizeof(gn_raw_data)); rawdata.data = buf; rawdata.length = sizeof(buf); gn_data_clear(&d); d.ringtone = data->ringtone; d.raw_data = &rawdata; if ((err = NK6510_GetRawRingtone(&d, state)) != GN_ERR_NONE) return err; return pnok_ringtone_from_raw(data->ringtone, rawdata.data, rawdata.length); } static gn_error NK6510_SetRingtone(gn_data *data, struct gn_statemachine *state) { gn_data d; gn_error err; gn_raw_data rawdata; char buf[4096]; if (!data->ringtone) return GN_ERR_INTERNALERROR; memset(&rawdata, 0, sizeof(gn_raw_data)); rawdata.data = buf; rawdata.length = sizeof(buf); gn_data_clear(&d); d.ringtone = data->ringtone; d.raw_data = &rawdata; if ((err = pnok_ringtone_to_raw(rawdata.data, &rawdata.length, data->ringtone, 1)) != GN_ERR_NONE) return err; return NK6510_SetRawRingtone(&d, state); } static gn_error NK6510_DeleteRingtone(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x10, 0x00, 0x00}; if (!data->ringtone) return GN_ERR_INTERNALERROR; if (data->ringtone->location < 0) { req[4] = 0x7f; req[5] = 0xfe; } else { req[4] = data->ringtone->location / 256; req[5] = data->ringtone->location % 255; } SEND_MESSAGE_BLOCK(NK6510_MSG_RINGTONE, 6); } /*************/ /* START UP */ /*************/ static gn_error NK6510_IncomingStartup(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { /* UNHANDLED FRAME RECEIVED request: 0x7a / 0x0005 00 01 00 02 0b | reply: 0x7a / 0x0036 01 44 00 03 0b 00 00 00 01 38 00 00 00 00 00 00 | D 8 35 5f 00 00 00 00 00 00 00 3e 00 00 00 00 00 00 | 5_ > 36 97 00 00 00 00 01 55 55 55 55 55 55 55 55 55 | 6 UUUUUUUUU 55 55 55 55 55 55 | UUUUUU */ switch (message[3]) { case 0x03: switch (message[4]) { case 0x01: dprintf("Greeting text received\n"); char_unicode_decode(data->bitmap->text, message + 6, length - 7); return GN_ERR_NONE; break; case 0x05: if (message[6] == 0) dprintf("Anykey answer not set!\n"); else dprintf("Anykey answer set!\n"); return GN_ERR_NONE; break; case 0x0f: if (!data->bitmap) return GN_ERR_INTERNALERROR; /* I'm sure there are blocks here but never mind! */ /* yes there are: c0 02 00 41 height c0 03 00 60 width c0 04 03 60 size */ data->bitmap->type = GN_BMP_StartupLogo; data->bitmap->height = message[13]; data->bitmap->width = message[17]; data->bitmap->size = message[20] * 256 + message[21]; memcpy(data->bitmap->bitmap, message + 22, data->bitmap->size); dprintf("Startup logo got ok - height(%d) width(%d)\n", data->bitmap->height, data->bitmap->width); return GN_ERR_NONE; break; default: dprintf("Unknown sub-subtype of type 0x7a subtype 0x03(%d)\n", message[4]); return GN_ERR_UNHANDLEDFRAME; break; } case 0x05: switch (message[4]) { case 0x0f: if (message[5] == 0) dprintf("Operator logo successfully set!\n"); else dprintf("Setting operator logo failed!\n"); return GN_ERR_NONE; break; default: dprintf("Unknown sub-subtype of type 0x7a subtype 0x05 (%d)\n", message[4]); return GN_ERR_UNHANDLEDFRAME; break; } default: dprintf("Unknown subtype of type 0x7a (%d)\n", message[3]); return GN_ERR_UNHANDLEDFRAME; break; } } static gn_error SetStartupBitmap(gn_data *data, struct gn_statemachine *state) { unsigned char req[1000] = {FBUS_FRAME_HEADER, 0x04, 0x0f, 0x00, 0x00, 0x00, 0x04, 0xc0, 0x02, 0x00, 0x00, /* Height */ 0xc0, 0x03, 0x00, 0x00, /* Width */ 0xc0, 0x04, 0x03, 0x60 }; /* size */ int count = 21; if ((data->bitmap->width != state->driver.phone.startup_logo_width) || (data->bitmap->height != state->driver.phone.startup_logo_height)) { dprintf("Invalid image size - expecting (%dx%d) got (%dx%d)\n", state->driver.phone.startup_logo_height, state->driver.phone.startup_logo_width, data->bitmap->height, data->bitmap->width); return GN_ERR_INVALIDSIZE; } req[12] = data->bitmap->height; req[16] = data->bitmap->width; memcpy(req + count, data->bitmap->bitmap, data->bitmap->size); count += data->bitmap->size; dprintf("Setting startup logo...\n"); SEND_MESSAGE_BLOCK(NK6510_MSG_STLOGO, count); } static gn_error GetWelcomeNoteText(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x02, 0x01, 0x00}; dprintf("Getting startup greeting...\n"); SEND_MESSAGE_BLOCK(NK6510_MSG_STLOGO, 6); } #if 0 static gn_error NK6510_GetAnykeyAnswer(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x02, 0x05, 0x00, 0x7d}; dprintf("See if anykey answer is set...\n"); SEND_MESSAGE_BLOCK(NK6510_MSG_STLOGO, 7); } #endif static gn_error GetStartupBitmap(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x02, 0x0f}; dprintf("Getting startup logo...\n"); SEND_MESSAGE_BLOCK(NK6510_MSG_STLOGO, 5); } /***************/ /* PROFILES **/ /***************/ static gn_error NK6510_IncomingProfile(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { unsigned char *blockstart; int i; switch (message[3]) { case 0x02: if (!data->profile) return GN_ERR_INTERNALERROR; blockstart = message + 7; for (i = 0; i < 11; i++) { switch (blockstart[1]) { case 0x00: dprintf("type: %02x, keypad tone level: %i\n", blockstart[1], blockstart[7]); switch (blockstart[7]) { case 0x00: data->profile->keypad_tone = 0xff; break; case 0x01: data->profile->keypad_tone = 0x00; break; case 0x02: data->profile->keypad_tone = 0x01; break; case 0x03: data->profile->keypad_tone = 0x02; break; default: dprintf("Unknown keypad tone volume!\n"); break; } break; case 0x02: dprintf("type: %02x, call alert: %i\n", blockstart[1], blockstart[7]); data->profile->call_alert = blockstart[7]; break; case 0x03: dprintf("type: %02x, ringtone: %i\n", blockstart[1], blockstart[7]); data->profile->ringtone = blockstart[7]; break; case 0x04: dprintf("type: %02x, ringtone volume: %i\n", blockstart[1], blockstart[7]); data->profile->volume = blockstart[7] + 6; break; case 0x05: dprintf("type: %02x, message tone: %i\n", blockstart[1], blockstart[7]); data->profile->message_tone = blockstart[7]; break; case 0x06: dprintf("type: %02x, vibration: %i\n", blockstart[1], blockstart[7]); data->profile->vibration = blockstart[7]; break; case 0x07: dprintf("type: %02x, warning tone: %i\n", blockstart[1], blockstart[7]); data->profile->warning_tone = blockstart[7]; break; case 0x08: dprintf("type: %02x, caller groups: %i\n", blockstart[1], blockstart[7]); data->profile->caller_groups = blockstart[7]; break; case 0x0c: char_unicode_decode(data->profile->name, blockstart + 7, blockstart[6] << 1); dprintf("Profile Name: %s\n", data->profile->name); break; default: dprintf("Unknown profile subblock type %02x!\n", blockstart[1]); break; } blockstart = blockstart + blockstart[0]; } return GN_ERR_NONE; break; case 0x04: dprintf("Response to profile writing received!\n"); blockstart = message + 6; for (i = 0; i < message[5]; i++) { switch (blockstart[2]) { case 0x00: if (message[4] == 0x00) dprintf("keypad tone level successfully set!\n"); else dprintf("failed to set keypad tone level! error: %i\n", message[4]); break; case 0x02: if (message[4] == 0x00) dprintf("call alert successfully set!\n"); else dprintf("failed to set call alert! error: %i\n", message[4]); break; case 0x03: if (message[4] == 0x00) dprintf("ringtone successfully set!\n"); else dprintf("failed to set ringtone! error: %i\n", message[4]); break; case 0x04: if (message[4] == 0x00) dprintf("ringtone volume successfully set!\n"); else dprintf("failed to set ringtone volume! error: %i\n", message[4]); break; case 0x05: if (message[4] == 0x00) dprintf("message tone successfully set!\n"); else dprintf("failed to set message tone! error: %i\n", message[4]); break; case 0x06: if (message[4] == 0x00) dprintf("vibration successfully set!\n"); else dprintf("failed to set vibration! error: %i\n", message[4]); break; case 0x07: if (message[4] == 0x00) dprintf("warning tone level successfully set!\n"); else dprintf("failed to set warning tone level! error: %i\n", message[4]); break; case 0x08: if (message[4] == 0x00) dprintf("caller groups successfully set!\n"); else dprintf("failed to set caller groups! error: %i\n", message[4]); break; case 0x0c: if (message[4] == 0x00) dprintf("name successfully set!\n"); else dprintf("failed to set name! error: %i\n", message[4]); break; default: dprintf("Unknown profile subblock type %02x!\n", blockstart[1]); break; } blockstart = blockstart + blockstart[1]; } return GN_ERR_NONE; break; default: dprintf("Unknown subtype of type 0x39 (%d)\n", message[3]); return GN_ERR_UNHANDLEDFRAME; break; } } static gn_error NK6510_GetProfile(gn_data *data, struct gn_statemachine *state) { unsigned char req[150] = {FBUS_FRAME_HEADER, 0x01, 0x01, 0x0C, 0x01}; int i, length = 7; for (i = 0; i < 0x0a; i++) { req[length] = 0x04; req[length + 1] = data->profile->number; req[length + 2] = i; req[length + 3] = 0x01; length += 4; } req[length] = 0x04; req[length + 1] = data->profile->number; req[length + 2] = 0x0c; req[length + 3] = 0x01; length += 4; req[length] = 0x04; dprintf("Getting profile #%i...\n", data->profile->number); NK6510_GetRingtoneList(data, state); SEND_MESSAGE_BLOCK(NK6510_MSG_PROFILE, length + 1); } static gn_error NK6510_SetProfile(gn_data *data, struct gn_statemachine *state) { unsigned char req[150] = {FBUS_FRAME_HEADER, 0x03, 0x01, 0x06, 0x03}; int i, j, blocks = 0, length = 7; for (i = 0; i < 0x07; i++) { switch (i) { case 0x00: req[length] = 0x09; req[length + 1] = i; req[length + 2] = data->profile->number; memcpy(req + length + 4, "\x00\x00\x01", 3); req[length + 8] = 0x03; switch (data->profile->keypad_tone) { case 0xff: req[length + 3] = req[length + 7] = 0x00; break; case 0x00: req[length + 3] = req[length + 7] = 0x01; break; case 0x01: req[length + 3] = req[length + 7] = 0x02; break; case 0x02: req[length + 3] = req[length + 7] = 0x03; break; default: dprintf("Unknown keypad tone volume!\n"); break; } blocks++; length += 9; break; case 0x02: req[length] = 0x09; req[length + 1] = i; req[length + 2] = data->profile->number; memcpy(req + length + 4, "\x00\x00\x01", 3); req[length + 8] = 0x03; req[length + 3] = req[length + 7] = data->profile->call_alert; blocks++; length += 9; break; case 0x03: req[length] = 0x09; req[length + 1] = i; req[length + 2] = data->profile->number; memcpy(req + length + 4, "\x00\x00\x01", 3); req[length + 8] = 0x03; req[length + 3] = req[length + 7] = data->profile->ringtone; blocks++; length += 9; break; case 0x04: req[length] = 0x09; req[length + 1] = i; req[length + 2] = data->profile->number; memcpy(req + length + 4, "\x00\x00\x01", 3); req[length + 8] = 0x03; req[length + 3] = req[length + 7] = data->profile->volume - 6; blocks++; length += 9; break; case 0x05: req[length] = 0x09; req[length + 1] = i; req[length + 2] = data->profile->number; memcpy(req + length + 4, "\x00\x00\x01", 3); req[length + 8] = 0x03; req[length + 3] = req[length + 7] = data->profile->message_tone; blocks++; length += 9; break; case 0x06: req[length] = 0x09; req[length + 1] = i; req[length + 2] = data->profile->number; memcpy(req + length + 4, "\x00\x00\x01", 3); req[length + 8] = 0x03; req[length + 3] = req[length + 7] = data->profile->vibration; blocks++; length += 9; break; } } req[length + 1] = 0x0c; req[length + 2] = data->profile->number; memcpy(req + length + 3, "\xcc\xad\xff", 3); /* Name */ j = strlen(data->profile->name); j = char_unicode_encode((req + length + 7), data->profile->name, j); /* Terminating 0 */ req[j + 1] = 0; /* Length of the string + length field + terminating 0 */ req[length + 6] = j + 1; req[length] = j + 9; length += j + 9; blocks++; req[length] = 0x09; req[length + 1] = 0x07; req[length + 2] = data->profile->number; memcpy(req + length + 4, "\x00\x00\x01", 3); req[length + 3] = req[length + 7] = data->profile->warning_tone; length += 8; blocks++; req[5] = blocks; dprintf("length: %i\n", length); SEND_MESSAGE_BLOCK(NK6510_MSG_PROFILE, length + 1); } /*************/ /*** RADIO **/ /*************/ static gn_error NK6510_IncomingRadio(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { /* 00 01 00 0D 00 00 00 0E 00 03 01 00 00 1C 00 14 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 01 00 00 08 00 00 01 00 01 00 00 0C 00 01 02 00 FF 30 30 30 00 01 00 05 00 00 00 2C 00 02 00 00 00 01 00 00 01 1F 00 06 00 00 00 2C 00 02 00 00 00 01 00 00 00 00 01 00 01 00 05 00 00 00 2C 00 01 00 00 00 2A 00 A8 01 1F 00 06 00 00 00 2C 00 01 00 00 00 2A 00 A8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 05 00 00 00 2C 00 00 00 00 00 CA 03 28 01 1F 00 06 00 00 00 2C 00 00 00 00 00 CA 03 28 00 00 00 many more 00 00 01 00 05 00 00 00 2C 00 02 00 00 00 01 00 00 */ switch (message[3]) { case 0x02: /* Hard reset ok */ return GN_ERR_NONE; break; default: break; } return GN_ERR_NOTIMPLEMENTED; } /*****************/ /*** KEYPRESS ***/ /*****************/ static gn_error NK6510_IncomingKeypress(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { switch (message[3]) { case 0x12: if (length != 6 || message[5] != 0x00) return GN_ERR_UNHANDLEDFRAME; if (message[4] == 0x00) break; if (message[4] == 0x01) return GN_ERR_UNKNOWN; return GN_ERR_UNHANDLEDFRAME; break; default: dprintf("Unknown subtype of type 0x3c (%d)\n", message[4]); return GN_ERR_UNHANDLEDFRAME; break; } return GN_ERR_NONE; } static gn_error NK6510_PressOrReleaseKey(gn_data *data, struct gn_statemachine *state, bool press) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x11, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01}; req[6] = press ? 0x00 : 0x01; switch (data->key_code) { case GN_KEY_UP: req[8] = 0x01; break; case GN_KEY_DOWN: req[8] = 0x02; break; default: return GN_ERR_NOTSUPPORTED; } SEND_MESSAGE_BLOCK(NK6510_MSG_KEYPRESS, 10); } #ifdef SECURITY /*****************/ /*** SECURITY ***/ /*****************/ static gn_error NK6510_IncomingSecurity(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { /* 01 4e 00 12 05 12 02 00 00 00 01 4e 00 09 06 00 */ switch (message[3]) { case 0x08: dprintf("Security Code OK!\n"); break; case 0x09: switch (message[4]) { case 0x06: dprintf("PIN wrong!\n"); break; case 0x09: dprintf("PUK wrong!\n"); break; default: dprintf(" unknown security Code wrong!\n"); break; } return GN_ERR_INVALIDSECURITYCODE; break; case 0x12: dprintf("Security Code status received: "); if (!data->security_code) return GN_ERR_INTERNALERROR; switch (message[4]) { case 0x01: dprintf("waiting for Security Code.\n"); data->security_code->type = GN_SCT_SecurityCode; break; case 0x07: case 0x02: dprintf("waiting for PIN.\n"); data->security_code->type = GN_SCT_Pin; break; case 0x03: dprintf("waiting for PUK.\n"); data->security_code->type = GN_SCT_Puk; break; case 0x05: dprintf("PIN ok, SIM ok\n"); data->security_code->type = GN_SCT_None; break; case 0x06: dprintf("No input status\n"); data->security_code->type = GN_SCT_None; break; case 0x16: dprintf("No SIM!\n"); data->security_code->type = GN_SCT_None; break; case 0x1A: dprintf("SIM rejected!\n"); data->security_code->type = GN_SCT_None; break; default: dprintf("Unknown!\n"); return GN_ERR_UNHANDLEDFRAME; } break; default: dprintf("Unknown subtype of type 0x08 (%d)\n", message[3]); return GN_ERR_NONE; break; } return GN_ERR_NONE; } static gn_error NK6510_GetSecurityCodeStatus(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x11, 0x00}; if (!data->security_code) return GN_ERR_INTERNALERROR; SEND_MESSAGE_BLOCK(NK6510_MSG_SECURITY, 5); } static gn_error NK6510_EnterSecurityCode(gn_data *data, struct gn_statemachine *state) { unsigned char req[35] = {FBUS_FRAME_HEADER, 0x07, 0x02 }; /* 0x02 PIN, 0x03 PUK */ int len ; if (!data->security_code) return GN_ERR_INTERNALERROR; switch (data->security_code->type) { case GN_SCT_SecurityCode: req[4] = 0x01; break; case GN_SCT_Pin: req[4] = 0x02; break; default: dprintf("Unhandled security code type %d\n", data->security_code->type); return GN_ERR_NOTSUPPORTED; } len = strlen(data->security_code->code); memcpy(req + 5, data->security_code->code, len); req[5 + len] = '\0'; SEND_MESSAGE_BLOCK(NK6510_MSG_SECURITY, 6 + len); } #endif /*****************/ /*** SUBSCRIBE ***/ /*****************/ static gn_error NK6510_IncomingSubscribe(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { switch (message[3]) { default: dprintf("Unknown subtype of type 0x3c (%d)\n", message[3]); return GN_ERR_UNHANDLEDFRAME; } return GN_ERR_NONE; } /* FIXME: make it configurable */ static gn_error NK6510_Subscribe(gn_data *data, struct gn_statemachine *state) { unsigned char req[100] = {FBUS_FRAME_HEADER, 0x10, 0x06, /* number of groups */ NK6510_MSG_COMMSTATUS, NK6510_MSG_SMS, NK6510_MSG_NETSTATUS, NK6510_MSG_FOLDER, NK6510_MSG_RESET, NK6510_MSG_BATTERY}; dprintf("Subscribing to various channels!\n"); if (sm_message_send(11, NK6510_MSG_SUBSCRIBE, req, state)) return GN_ERR_NOTREADY; return sm_block_ack(state); } /*************/ /*** RESET ***/ /*************/ static gn_error NK6510_IncomingReset(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { switch (message[3]) { default: dprintf("Incoming Reset\n"); return GN_ERR_UNHANDLEDFRAME; break; } return GN_ERR_NONE; } static gn_error NK6510_Reset(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER,0x05,0x80,0x00}; unsigned char req2[] = {FBUS_FRAME_HEADER,0x01,0,0,0,0,0,0x01}; if (data->reset_type == 0x03) { printf("Soft resetting....\n"); SEND_MESSAGE_BLOCK(NK6510_MSG_RESET, 6); } else if (data->reset_type == 0x04) { printf("Hard resetting....\n"); if (sm_message_send(10, NK6510_MSG_RADIO, req2, state)) return GN_ERR_NOTREADY; return sm_block(NK6510_MSG_RADIO, data, state); } else return GN_ERR_INTERNALERROR; } /******************/ /*** COMMSTATUS ***/ /******************/ static gn_call_status NK6510_GetCallStatus_S40_30(unsigned char state) { switch (state) { case 1: return GN_CALL_Held; case 3: return GN_CALL_Incoming; case 4: return GN_CALL_Dialing; case 5: return GN_CALL_Ringing; default: dprintf("Unknown call status %d\n", state); return GN_CALL_Idle; } } static gn_error NK6510_IncomingCommStatus(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { gn_error error = GN_ERR_NONE; unsigned char *pos; int i; gn_call_active *ca; gn_call_info cinfo; /* Please note that most of the meaning is wild guess */ switch (message[3]) { case 0x02: /* Call estabilished */ dprintf("Call estabilished\n"); break; case 0x03: /* Call status */ /* fall through */ case 0x0f: /* Call status */ dprintf("Call status 0x%02x\n", message[3]); memset(&cinfo, 0, sizeof(gn_call_info)); cinfo.type = GN_CALL_Voice; /* FIXME how to actually detect type? */ cinfo.call_id = message[4]; for (i = 6; i < length && message[i]; i += message[i + 1]) { switch (message[i]) { case 0x01: /* Phone number of incoming call */ case 0x03: /* Phone number of outgoing call */ /* message[i + 2] is type of number? 0x10 international? 0x01 network specific? */ char_unicode_decode(cinfo.number, message + i + 6, 2 * message[i + 5]); break; case 0x0e: char_unicode_decode(cinfo.name, message + i + 8, 2 * message[i + 7]); break; default: dprintf(" Unknown call block type 0x%02x length %d\n", message[i], message[i + 1]); } } if (DRVINSTANCE(state)->call_notification) DRVINSTANCE(state)->call_notification(NK6510_GetCallStatus_S40_30(message[5]), &cinfo, state, DRVINSTANCE(state)->call_callback_data); break; case 0x04: /* Call hangup */ dprintf("Call hangup (remote)\n"); dprintf("Call ID: %i\n", message[4]); dprintf("Cause Type: %i\n", message[5]); dprintf("Cause ID: %i\n", message[6]); break; case 0x05: /* Incoming call */ dprintf("Incoming call\n"); break; case 0x07: /* Call answer initiated */ dprintf("Call answer initiated\n"); break; case 0x09: /* Call hangup */ dprintf("Call hangup (local)\n"); break; case 0x0a: /* Hanguping */ dprintf("Hanguping call (locally)\n"); break; case 0x0c: /* Dialling */ dprintf("Dialling\n"); break; case 0x10: /* Indicator whether the make call request was successful (?) */ switch (message[4]) { case 0x00: dprintf("Make call succeeded.\n"); break; /* Some of dct4 phones respond with this to NK6510_MakeCall() * frames. Let's repond with the error code to retry with * NK6510_MakeCall_S40_30(). The exact meaning is not known. */ case 0x01: dprintf("Make call failed.\n"); error = GN_ERR_NOTSUPPORTED; break; } break; case 0x21: /* Call status */ if (!data->call_active) { error = GN_ERR_INTERNALERROR; break; } if (message[5] != 0xff) { error = GN_ERR_UNHANDLEDFRAME; break; } pos = message + 6; ca = data->call_active; memset(ca, 0x00, 2 * sizeof(gn_call_active)); for (i = 0; i < message[4]; i++) { if (pos[0] != 0x64) { error = GN_ERR_UNHANDLEDFRAME; goto out; } ca[i].call_id = pos[2]; ca[i].channel = pos[3]; switch (pos[4]) { case 0x00: ca[i].state = GN_CALL_Idle; break; /* missing number, wait a little */ case 0x02: ca[i].state = GN_CALL_Dialing; break; case 0x03: ca[i].state = GN_CALL_Ringing; break; case 0x04: ca[i].state = GN_CALL_Incoming; break; case 0x05: ca[i].state = GN_CALL_Established; break; case 0x06: ca[i].state = GN_CALL_Held; break; case 0x07: ca[i].state = GN_CALL_RemoteHangup; break; default: dprintf("Unknown call state in frame: %d\n", pos[4]); error = GN_ERR_UNHANDLEDFRAME; goto out; } switch (pos[5]) { case 0x00: ca[i].prev_state = GN_CALL_Idle; break; /* missing number, wait a little */ case 0x02: ca[i].prev_state = GN_CALL_Dialing; break; case 0x03: ca[i].prev_state = GN_CALL_Ringing; break; case 0x04: ca[i].prev_state = GN_CALL_Incoming; break; case 0x05: ca[i].prev_state = GN_CALL_Established; break; case 0x06: ca[i].prev_state = GN_CALL_Held; break; case 0x07: ca[i].prev_state = GN_CALL_RemoteHangup; break; default: dprintf("Unknown previous call state in frame: %d\n", pos[5]); error = GN_ERR_UNHANDLEDFRAME; goto out; } char_unicode_decode(ca[i].name, pos + 12, 2 * pos[10]); char_unicode_decode(ca[i].number, pos + 112, 2 * pos[11]); pos += pos[1]; } dprintf("Call status:\n"); for (i = 0; i < 2; i++) { if (ca[i].state == GN_CALL_Idle) continue; dprintf("ch#%d: id#%d st#%d pst#%d %s (%s)\n", ca[i].channel, ca[i].call_id, ca[i].state, ca[i].prev_state, ca[i].number, ca[i].name); } break; case 0x23: /* Call on hold */ dprintf("Call on hold\n"); break; case 0x25: /* Call resumed */ dprintf("Call resumed\n"); break; case 0x27: /* Call switched */ dprintf("Call switched\n"); break; case 0x53: /* Outgoing call */ dprintf("Outgoing call\n"); break; case 0x32: case 0xd2: dprintf("Unknown\n"); break; case 0xf0: error = GN_ERR_NOTSUPPORTED; break; default: dprintf("Unknown subtype of type 0x01 (0x%02x)\n", message[3]); error = GN_ERR_UNHANDLEDFRAME; break; } out: return error; } static gn_error NK6510_GetActiveCalls(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x20}; if (!data->call_active) return GN_ERR_INTERNALERROR; SEND_MESSAGE_BLOCK(NK6510_MSG_COMMSTATUS, 4); } static gn_error NK6510_MakeCall_S40_30(gn_data *data, struct gn_statemachine *state) { gn_error error = GN_ERR_NONE; unsigned char req[100] = {FBUS_FRAME_HEADER, 0x01, 0x00, 0x02, 0x07, 0x04, 0x01, /* 0x01 voice, 0x02 data */ 0x00, 0x03, 0x00, /* Length of the block*/ 0x00, 0x00, 0x00}; /* Next fields are number length and number itself */ int len; if (!data->call_info) { error = GN_ERR_INTERNALERROR; goto out; } len = strlen(data->call_info->number); if (len > GN_PHONEBOOK_NUMBER_MAX_LENGTH) { dprintf("number too long\n"); error = GN_ERR_ENTRYTOOLONG; goto out; } len = char_unicode_encode(req + 16, data->call_info->number, len); req[11] = len + 6; req[15] = len / 2; if (sm_message_send(16 + len, NK6510_MSG_COMMSTATUS, req, state)) { error = GN_ERR_NOTREADY; goto out; } error = sm_block(NK6510_MSG_COMMSTATUS, data, state); out: return error; } static gn_error NK6510_MakeCall(gn_data *data, struct gn_statemachine *state) { gn_error error = GN_ERR_NONE; unsigned char req[100] = {FBUS_FRAME_HEADER, 0x01}; unsigned char voice_end[] = {0x05, 0x01, 0x05, 0x00, 0x02, 0x00, 0x00, 0x00}; int pos = 4, len; gn_call_active active[2]; gn_data d; if (!data->call_info) { error = GN_ERR_INTERNALERROR; goto out; } /* We need to subscribe to the call channel */ error = NK6510_Subscribe(data, state); if (error != GN_ERR_NONE) goto out; switch (data->call_info->type) { case GN_CALL_Voice: break; case GN_CALL_NonDigitalData: case GN_CALL_DigitalData: dprintf("Unsupported call type %d\n", data->call_info->type); error = GN_ERR_NOTSUPPORTED; goto out; default: dprintf("Invalid call type %d\n", data->call_info->type); error = GN_ERR_INTERNALERROR; goto out; } len = strlen(data->call_info->number); if (len > GN_PHONEBOOK_NUMBER_MAX_LENGTH) { dprintf("number too long\n"); error = GN_ERR_ENTRYTOOLONG; goto out; } len = char_unicode_encode(req + pos + 1, data->call_info->number, len); req[pos++] = len / 2; pos += len; switch (data->call_info->send_number) { case GN_CALL_Never: voice_end[5] = 0x01; break; case GN_CALL_Always: voice_end[5] = 0x00; break; case GN_CALL_Default: voice_end[5] = 0x00; break; default: error = GN_ERR_INTERNALERROR; goto out; } memcpy(req + pos, voice_end, sizeof(voice_end)); pos += sizeof(voice_end); /* Reported by kam on IRC channel. Nokia 7600 does not work with * the above frame. Return GN_ERR_NOTSUPPORTED to retry with * another frame. * FIXME: do the per-model configuration which frame should * be used. */ if (sm_message_send(pos, NK6510_MSG_COMMSTATUS, req, state)) { error = GN_ERR_NOTREADY; goto out; } error = sm_block(NK6510_MSG_COMMSTATUS, data, state); if (error == GN_ERR_NOTSUPPORTED) error = NK6510_MakeCall_S40_30(data, state); if (error != GN_ERR_NONE) { goto out; } /* Get active calls detais */ memset(active, 0, sizeof(*active)); gn_data_clear(&d); d.call_active = active; error = NK6510_GetActiveCalls(&d, state); if (error != GN_ERR_NONE) goto out; data->call_info->call_id = active[0].call_id; out: return error; } static gn_error NK6510_CancelCall(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x08, 0x00}; if (!data->call_info) return GN_ERR_INTERNALERROR; req[4] = data->call_info->call_id; if (sm_message_send(5, NK6510_MSG_COMMSTATUS, req, state)) return GN_ERR_NOTREADY; return sm_block_ack(state); } static gn_error NK6510_AnswerCall(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x06, 0x00}; if (!data->call_info) return GN_ERR_INTERNALERROR; req[4] = data->call_info->call_id; if (sm_message_send(5, NK6510_MSG_COMMSTATUS, req, state)) return GN_ERR_NOTREADY; return sm_block_ack(state); } /*****************/ /****** WAP ******/ /*****************/ static gn_error NK6510_IncomingWAP(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { int string_length, pos, pad = 0; switch (message[3]) { case 0x02: case 0x05: case 0x08: case 0x0b: case 0x0e: case 0x11: case 0x14: case 0x17: case 0x1a: switch (message[4]) { case 0x00: dprintf("WAP not activated?\n"); return GN_ERR_UNKNOWN; case 0x01: dprintf("Security error. Inside WAP bookmarks menu\n"); return GN_ERR_UNKNOWN; case 0x02: dprintf("Invalid or empty\n"); return GN_ERR_INVALIDLOCATION; default: dprintf("ERROR: unknown %i\n",message[4]); return GN_ERR_UNHANDLEDFRAME; } break; case 0x01: case 0x04: case 0x10: break; case 0x07: if (!data->wap_bookmark) return GN_ERR_INTERNALERROR; dprintf("WAP bookmark received\n"); string_length = (message[6] << 8 | message[7]) << 1; char_unicode_decode(data->wap_bookmark->name, message + 8, string_length); dprintf("Name: %s\n", data->wap_bookmark->name); pos = string_length + 8; string_length = message[pos++] << 8; string_length |= message[pos++]; char_unicode_decode(data->wap_bookmark->URL, message + pos, string_length << 1); dprintf("URL: %s\n", data->wap_bookmark->URL); break; case 0x0a: dprintf("WAP bookmark successfully set!\n"); break; case 0x0d: dprintf("WAP bookmark successfully deleted!\n"); break; case 0x13: dprintf("WAP setting successfully activated!\n"); break; case 0x16: if (!data->wap_setting) return GN_ERR_INTERNALERROR; dprintf("WAP setting received\n"); string_length = (message[4] << 8 | message[5]) << 1; char_unicode_decode(data->wap_setting->name, message + 6, string_length); dprintf("Name: %s\n", data->wap_setting->name); pos = string_length + 6; if (!(string_length % 2)) pad = 1; string_length = message[pos++] << 8; string_length = (string_length | message[pos++]) << 1; char_unicode_decode(data->wap_setting->home, message + pos, string_length); dprintf("Home: %s\n", data->wap_setting->home); pos += string_length; if (!((string_length + pad) % 2)) pad = 2; else pad = 0; data->wap_setting->session = message[pos++]; if (message[pos++] == 0x01) data->wap_setting->security = true; else data->wap_setting->security = false; data->wap_setting->bearer = message[pos++]; while ((message[pos] != 0x01) || (message[pos + 1] != 0x00)) pos++; pos += 4; data->wap_setting->gsm_data_authentication = message[pos++]; data->wap_setting->call_type = message[pos++]; pos++; data->wap_setting->call_speed = message[pos++]; data->wap_setting->gsm_data_login = message[pos++]; dprintf("GSM data:\n"); string_length = message[pos++] << 1; char_unicode_decode(data->wap_setting->gsm_data_ip, message + pos, string_length); dprintf(" IP: %s\n", data->wap_setting->gsm_data_ip); pos += string_length; string_length = message[pos++] << 8; string_length = (string_length | message[pos++]) << 1; char_unicode_decode(data->wap_setting->number, message + pos, string_length); dprintf(" Number: %s\n", data->wap_setting->number); pos += string_length; string_length = message[pos++] << 8; string_length = (string_length | message[pos++]) << 1; char_unicode_decode(data->wap_setting->gsm_data_username, message + pos, string_length); dprintf(" Username: %s\n", data->wap_setting->gsm_data_username); pos += string_length; string_length = message[pos++] << 8; string_length = (string_length | message[pos++]) << 1; char_unicode_decode(data->wap_setting->gsm_data_password, message + pos, string_length); dprintf(" Password: %s\n", data->wap_setting->gsm_data_password); pos += string_length; while (message[pos] != 0x03) pos++; pos += 4; dprintf("GPRS:\n"); data->wap_setting->gprs_authentication = message[pos++]; data->wap_setting->gprs_connection = message[pos++]; data->wap_setting->gprs_login = message[pos++]; string_length = message[pos++] << 1; char_unicode_decode(data->wap_setting->access_point_name, message + pos, string_length); dprintf(" Access point: %s\n", data->wap_setting->access_point_name); pos += string_length; string_length = message[pos++] << 8; string_length = (string_length | message[pos++]) << 1; char_unicode_decode(data->wap_setting->gprs_ip, message + pos, string_length); dprintf(" IP: %s\n", data->wap_setting->gprs_ip); pos += string_length; string_length = message[pos++] << 8; string_length = (string_length | message[pos++]) << 1; char_unicode_decode(data->wap_setting->gprs_username, message + pos, string_length); dprintf(" Username: %s\n", data->wap_setting->gprs_username); pos += string_length; if (message[pos] != 0x80) { string_length = message[pos++] << 8; string_length |= message[pos++]; char_unicode_decode(data->wap_setting->gprs_password, message + pos, string_length); dprintf(" Password: %s\n", data->wap_setting->gprs_password); pos += string_length; } else pos += 2; break; case 0x19: dprintf("WAP setting successfully written!\n"); break; default: dprintf("Unknown subtype of type 0x3f (%d)\n", message[3]); return GN_ERR_UNHANDLEDFRAME; break; } return GN_ERR_NONE; } static gn_error SendWAPFrame(gn_data *data, struct gn_statemachine *state, int frame) { unsigned char req[] = { FBUS_FRAME_HEADER, 0x00 }; dprintf("Sending WAP frame\n"); req[3] = frame; SEND_MESSAGE_BLOCK(NK6510_MSG_WAP, 4); } static gn_error PrepareWAP(gn_data *data, struct gn_statemachine *state) { dprintf("Preparing WAP\n"); return SendWAPFrame(data, state, 0x00); } static gn_error FinishWAP(gn_data *data, struct gn_statemachine *state) { gn_error error; dprintf("Finishing WAP\n"); error = SendWAPFrame(data, state, 0x03); if (error != GN_ERR_NONE) return error; error = SendWAPFrame(data, state, 0x00); if (error != GN_ERR_NONE) return error; error = SendWAPFrame(data, state, 0x0f); if (error != GN_ERR_NONE) return error; return SendWAPFrame(data, state, 0x03); } static int PackWAPString(unsigned char *dest, unsigned char *string, int length_size) { int length; length = strlen(string); if (length_size == 2) { dest[0] = length / 256; dest[1] = length % 256; } else { dest[0] = length % 256; } length = char_unicode_encode(dest + length_size, string, length); return length + length_size; } static gn_error NK6510_WriteWAPSetting(gn_data *data, struct gn_statemachine *state) { unsigned char req[1000] = { FBUS_FRAME_HEADER, 0x18, 0x00 }; /* Location */ gn_error error; int pad = 0, length, pos = 5; dprintf("Writing WAP setting\n"); memset(req + pos, 0, 1000 - pos); req[4] = data->wap_setting->location; if (PrepareWAP(data, state) != GN_ERR_NONE) { SendWAPFrame(data, state, 0x03); if ((error = PrepareWAP(data, state)) != GN_ERR_NONE) return error; } /* Name */ length = strlen(data->wap_setting->name); if (!(length % 2)) pad = 1; pos += PackWAPString(req + pos, data->wap_setting->name, 1); /* Home */ length = strlen(data->wap_setting->home); if (((length + pad) % 2)) pad = 2; else pad = 0; pos += PackWAPString(req + pos, data->wap_setting->home, 2); req[pos++] = data->wap_setting->session; pos++; if (data->wap_setting->security) req[pos] = 0x01; req[pos++] = data->wap_setting->bearer; /* How many parts do we send? */ req[pos++] = 0x02; pos += pad; /* GSM data */ memcpy(req + pos, "\x01\x00", 2); pos += 2; length = ((strlen(data->wap_setting->gsm_data_ip) + strlen(data->wap_setting->gsm_data_username) + strlen(data->wap_setting->gsm_data_password) + strlen(data->wap_setting->number)) << 1) + 18; req[pos++] = length / 256; req[pos++] = length % 256; req[pos++] = data->wap_setting->gsm_data_authentication; req[pos++] = data->wap_setting->call_type; pos++; req[pos++] = data->wap_setting->call_speed; req[pos++] = data->wap_setting->gsm_data_login; /* IP */ pos += PackWAPString(req + pos, data->wap_setting->gsm_data_ip, 1); /* Number */ pos += PackWAPString(req + pos, data->wap_setting->number, 2); /* Username */ pos += PackWAPString(req + pos, data->wap_setting->gsm_data_username, 2); /* Password */ pos += PackWAPString(req + pos, data->wap_setting->gsm_data_password, 2); /* Padding */ if (length % 2) pos++; /* GPRS block */ memcpy(req + pos, "\x03\x00", 2); pos += 2; length = ((strlen(data->wap_setting->gprs_ip) + strlen(data->wap_setting->gprs_username) + strlen(data->wap_setting->gprs_password) + strlen(data->wap_setting->access_point_name)) << 1) + 14; req[pos++] = length / 256; req[pos++] = length % 256; req[pos++] = 0x00; /* data->wap_setting->gprs_authentication; */ req[pos++] = data->wap_setting->gprs_connection; req[pos++] = data->wap_setting->gprs_login; /* Access point */ pos += PackWAPString(req + pos, data->wap_setting->access_point_name, 1); /* IP */ pos += PackWAPString(req + pos, data->wap_setting->gprs_ip, 2); /* Username */ pos += PackWAPString(req + pos, data->wap_setting->gprs_username, 2); /* Password */ pos += PackWAPString(req + pos, data->wap_setting->gprs_password, 2); /* end of block ? */ memcpy(req + pos, "\x80\x00", 2); pos += 2; /* no idea what this is about, seems to be some kind of 'end of message' */ memcpy(req + pos, "\x00\x0c\x07\x6B\x0C\x1E\x00\x00\x00\x55", 10); pos += 10; if (sm_message_send(pos, NK6510_MSG_WAP, req, state)) return GN_ERR_NOTREADY; error = sm_block(NK6510_MSG_WAP, data, state); if (error) return error; return FinishWAP(data, state); } static gn_error NK6510_DeleteWAPBookmark(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = { FBUS_FRAME_HEADER, 0x0C, 0x00, 0x00}; /* Location */ gn_error error; dprintf("Deleting WAP bookmark\n"); req[5] = data->wap_bookmark->location + 1; if (PrepareWAP(data, state) != GN_ERR_NONE) { FinishWAP(data, state); if ((error = PrepareWAP(data, state))) return error; } if (sm_message_send(6, NK6510_MSG_WAP, req, state)) return GN_ERR_NOTREADY; error = sm_block(NK6510_MSG_WAP, data, state); if (error) return error; return FinishWAP(data, state); } static gn_error NK6510_GetWAPBookmark(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = { FBUS_FRAME_HEADER, 0x06, 0x00, 0x00}; /* Location */ gn_error error; dprintf("Getting WAP bookmark\n"); req[5] = data->wap_bookmark->location; if (PrepareWAP(data, state) != GN_ERR_NONE) { FinishWAP(data, state); if ((error = PrepareWAP(data, state))) return error; } if (sm_message_send(6, NK6510_MSG_WAP, req, state)) return GN_ERR_NOTREADY; error = sm_block(NK6510_MSG_WAP, data, state); if (error) return error; return FinishWAP(data, state); } static gn_error NK6510_WriteWAPBookmark(gn_data *data, struct gn_statemachine *state) { unsigned char req[350] = { FBUS_FRAME_HEADER, 0x09, 0xFF, 0xFF}; /* Location */ gn_error error; int pos = 6; dprintf("Writing WAP bookmark\n"); if (PrepareWAP(data, state) != GN_ERR_NONE) { FinishWAP(data, state); if ((error = PrepareWAP(data, state))) return error; } pos += PackWAPString(req + pos, data->wap_bookmark->name, 2); pos += PackWAPString(req + pos, data->wap_bookmark->URL, 2); if (sm_message_send(pos, NK6510_MSG_WAP, req, state)) return GN_ERR_NOTREADY; error = sm_block(NK6510_MSG_WAP, data, state); if (error) return error; return FinishWAP(data, state); } static gn_error NK6510_GetWAPSetting(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = { FBUS_FRAME_HEADER, 0x15, 0x00 }; /* Location */ gn_error error; dprintf("Getting WAP setting\n"); req[4] = data->wap_setting->location; if (PrepareWAP(data, state) != GN_ERR_NONE) { FinishWAP(data, state); if ((error = PrepareWAP(data, state))) return error; } if (sm_message_send(5, NK6510_MSG_WAP, req, state)) return GN_ERR_NOTREADY; error = sm_block(NK6510_MSG_WAP, data, state); if (error) return error; return FinishWAP(data, state); } static gn_error NK6510_ActivateWAPSetting(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = { FBUS_FRAME_HEADER, 0x12, 0x00 }; /* Location */ gn_error error; dprintf("Activating WAP setting\n"); req[4] = data->wap_setting->location; if (PrepareWAP(data, state) != GN_ERR_NONE) { FinishWAP(data, state); if ((error = PrepareWAP(data, state))) return error; } if (sm_message_send(5, NK6510_MSG_WAP, req, state)) return GN_ERR_NOTREADY; error = sm_block(NK6510_MSG_WAP, data, state); if (error) return error; return FinishWAP(data, state); } /********************/ /***** ToDo *********/ /********************/ static gn_error NK6510_GetToDo_Internal(gn_data *data, struct gn_statemachine *state, int location) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x03, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01}; /* Location */ req[8] = location / 256; req[9] = location % 256; dprintf("Getting ToDo\n"); SEND_MESSAGE_BLOCK(NK6510_MSG_TODO, 10); } static gn_error NK6510_IncomingToDo(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { int i; gn_error error = GN_ERR_NONE; switch (message[3]) { case 0x02: if (!data->todo) { error = GN_ERR_INTERNALERROR; break; } switch (message[4]) { case 0x00: dprintf("ToDo set!\n"); data->todo->location = message[8] * 256 + message[9]; break; case 0x04: dprintf("Invalid priority?\n"); default: dprintf("ToDo setting failed\n"); error = GN_ERR_FAILED; } break; case 0x04: dprintf("ToDo received!\n"); if (!data->todo) { error = GN_ERR_INTERNALERROR; break; } if (message[5] == 0x08) { error = GN_ERR_INVALIDLOCATION; break; } if ((message[4] > 0) && (message[4] < 4)) { data->todo->priority = message[4]; } dprintf("Priority: %i\n", message[4]); char_unicode_decode(data->todo->text, message + 14, length - 16); dprintf("Text: \"%s\"\n", data->todo->text); break; case 0x10: dprintf("Next free ToDo location received!\n"); if (!data->todo) { error = GN_ERR_INTERNALERROR; break; } data->todo->location = message[8] * 256 + message[9]; dprintf(" location: %i\n", data->todo->location); break; case 0x12: dprintf("All ToDo locations deleted!\n"); break; case 0x16: dprintf("ToDo locations received!\n"); if (!data->todo) { error = GN_ERR_INTERNALERROR; break; } data->todo_list->number = message[6] * 256 + message[7]; dprintf("Number of Entries: %i\n", data->todo_list->number); dprintf("Locations: "); for (i = 0; i < data->todo_list->number; i++) { data->todo_list->location[i] = message[12 + (i * 4)] * 256 + message[(i * 4) + 13]; dprintf("%i ", data->todo_list->location[i]); } dprintf("\n"); break; case 0xf0: error = GN_ERR_NOTSUPPORTED; break; default: dprintf("Unknown subtype of type 0x01 (%d)\n", message[3]); error = GN_ERR_UNHANDLEDFRAME; break; } return error; } static gn_error NK6510_GetToDoLocations(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = { FBUS_FRAME_HEADER, 0x15, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00}; SEND_MESSAGE_BLOCK(NK6510_MSG_TODO, 10); } #if 0 static gn_error NK6510_GetToDoLocations_S40_30(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = { FBUS_FRAME_HEADER, 0x79, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00}; SEND_MESSAGE_BLOCK(NK6510_MSG_TODO, 10); } #endif static gn_error NK6510_DeleteAllToDoLocations(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = { FBUS_FRAME_HEADER, 0x11 }; SEND_MESSAGE_BLOCK(NK6510_MSG_TODO, 4); } static gn_error GetNextFreeToDoLocation(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = { FBUS_FRAME_HEADER, 0x0f }; SEND_MESSAGE_BLOCK(NK6510_MSG_TODO, 4); } static gn_error NK6510_GetToDo_S40_30(gn_data *data, struct gn_statemachine *state) { gn_calnote_list cl; gn_calnote cn; memset(&cn, 0, sizeof(cn)); memset(&cl, 0, sizeof(cl)); cn.location = data->todo->location; data->calnote = &cn; data->calnote_list = &cl; return NK6510_GetCalToDo_S40_30(data, state, 0x01); } static gn_error NK6510_GetToDo(gn_data *data, struct gn_statemachine *state) { gn_error error; if (DRVINSTANCE(state)->pm->flags & PM_EXTCALENDAR) return NK6510_GetToDo_S40_30(data, state); if (data->todo->location < 1) { error = GN_ERR_INVALIDLOCATION; } else { error = NK6510_GetToDoLocations(data, state); if (error == GN_ERR_NONE) { if (!data->todo_list->number || data->todo->location > data->todo_list->number) { error = GN_ERR_EMPTYLOCATION; } else { return NK6510_GetToDo_Internal(data, state, data->todo_list->location[data->todo->location - 1]); } } } return error; } static gn_error NK6510_WriteToDo(gn_data *data, struct gn_statemachine *state) { unsigned char req[300] = {FBUS_FRAME_HEADER, 0x01, 0x02, /* prority */ 0x0E, /* length of the text + 1 */ 0x80, 0x00, 0x00, 0x01}; /* Location */ unsigned char text[257]; int length; gn_error error; error = GetNextFreeToDoLocation(data, state); if (error != GN_ERR_NONE) return error; length = char_unicode_encode(text, data->todo->text, strlen(data->todo->text)); if (length > GN_TODO_MAX_LENGTH) return GN_ERR_ENTRYTOOLONG; /* priority */ req[4] = data->todo->priority; /* length */ req[5] = length + 1; /* location */ req[8] = data->todo->location / 256; req[9] = data->todo->location % 256; /* text */ memcpy(req + 10, text, length); /* 0-terminated string */ req[10+length] = req[10+length+1] = 0; dprintf("Setting ToDo\n"); if (sm_message_send(length + 12, NK6510_MSG_TODO, req, state)) return GN_ERR_NOTREADY; error = sm_block(NK6510_MSG_TODO, data, state); if (error == GN_ERR_NONE) { error = NK6510_GetToDo_Internal(data, state, data->todo->location); } return error; } /********************/ /****** SOUND *******/ /********************/ static gn_error NK6510_IncomingSound(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { switch (message[3]) { /* response to init1 - meaning unknown */ case 0x01: case 0x02: break; /* buzzer on/off - meaning unknown */ case 0x14: case 0x15: case 0x16: break; default: return GN_ERR_UNHANDLEDFRAME; } return GN_ERR_NONE; } static gn_error NK6510_PlayTone(gn_data *data, struct gn_statemachine *state) { unsigned char init1[] = {0x00, 0x06, 0x01, 0x00, 0x07, 0x00}; unsigned char init2[] = {0x00, 0x06, 0x01, 0x14, 0x05, 0x05, 0x00, 0x00, 0x00, 0x01, 0x03, 0x08, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00}; unsigned char req[] = {0x00, 0x06, 0x01, 0x14, 0x05, 0x04, 0x00, 0x00, 0x00, 0x03, 0x03, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x03, 0x08, 0x01, 0x00, 0x00, 0x00, /* frequency */ 0x00, 0x00, 0x03, 0x08, 0x02, 0x00, 0x00, 0x05, /* volume */ 0x00, 0x00}; gn_error err; if (!data->tone) return GN_ERR_INTERNALERROR; if (sm_message_send(6, 0x0b, init1, state)) return GN_ERR_NOTREADY; if ((err = sm_block(NK6510_MSG_SOUND, data, state)) != GN_ERR_NONE) return err; if (sm_message_send(18, 0x0b, init2, state)) return GN_ERR_NOTREADY; if ((err = sm_block(NK6510_MSG_SOUND, data, state)) != GN_ERR_NONE) return err; req[31] = data->tone->volume; req[22] = data->tone->frequency / 256; req[23] = data->tone->frequency % 255; dprintf("Playing tone\n"); SEND_MESSAGE_BLOCK(NK6510_MSG_SOUND, 34); } /********************************/ /* NOT FRAME SPECIFIC FUNCTIONS */ /********************************/ static gn_error NK6510_GetBitmap(gn_data *data, struct gn_statemachine *state) { switch(data->bitmap->type) { case GN_BMP_WelcomeNoteText: return GetWelcomeNoteText(data, state); case GN_BMP_CallerLogo: return GetCallerBitmap(data, state); case GN_BMP_NewOperatorLogo: case GN_BMP_OperatorLogo: return GetOperatorBitmap(data, state); case GN_BMP_StartupLogo: return GetStartupBitmap(data, state); default: return GN_ERR_NOTIMPLEMENTED; } } static gn_error NK6510_SetBitmap(gn_data *data, struct gn_statemachine *state) { switch(data->bitmap->type) { case GN_BMP_StartupLogo: return SetStartupBitmap(data, state); case GN_BMP_CallerLogo: return SetCallerBitmap(data, state); case GN_BMP_OperatorLogo: case GN_BMP_NewOperatorLogo: return SetOperatorBitmap(data, state); default: return GN_ERR_NOTIMPLEMENTED; } } static int get_memory_type(gn_memory_type memory_type) { int result; switch (memory_type) { case GN_MT_MT: result = NK6510_MEMORY_MT; break; case GN_MT_ME: result = NK6510_MEMORY_ME; break; case GN_MT_SM: result = NK6510_MEMORY_SM; break; case GN_MT_FD: result = NK6510_MEMORY_FD; break; case GN_MT_ON: result = NK6510_MEMORY_ON; break; case GN_MT_EN: result = NK6510_MEMORY_EN; break; case GN_MT_DC: result = NK6510_MEMORY_DC; break; case GN_MT_RC: result = NK6510_MEMORY_RC; break; case GN_MT_MC: result = NK6510_MEMORY_MC; break; case GN_MT_IN: result = NK6510_MEMORY_IN; break; case GN_MT_OU: result = NK6510_MEMORY_OU; break; case GN_MT_OUS: result = NK6510_MEMORY_OUS; break; case GN_MT_AR: result = NK6510_MEMORY_AR; break; case GN_MT_TE: result = NK6510_MEMORY_TE; break; case GN_MT_F1: result = NK6510_MEMORY_F1; break; case GN_MT_F2: result = NK6510_MEMORY_F2; break; case GN_MT_F3: result = NK6510_MEMORY_F3; break; case GN_MT_F4: result = NK6510_MEMORY_F4; break; case GN_MT_F5: result = NK6510_MEMORY_F5; break; case GN_MT_F6: result = NK6510_MEMORY_F6; break; case GN_MT_F7: result = NK6510_MEMORY_F7; break; case GN_MT_F8: result = NK6510_MEMORY_F8; break; case GN_MT_F9: result = NK6510_MEMORY_F9; break; case GN_MT_F10: result = NK6510_MEMORY_F10; break; case GN_MT_F11: result = NK6510_MEMORY_F11; break; case GN_MT_F12: result = NK6510_MEMORY_F12; break; case GN_MT_F13: result = NK6510_MEMORY_F13; break; case GN_MT_F14: result = NK6510_MEMORY_F14; break; case GN_MT_F15: result = NK6510_MEMORY_F15; break; case GN_MT_F16: result = NK6510_MEMORY_F16; break; case GN_MT_F17: result = NK6510_MEMORY_F17; break; case GN_MT_F18: result = NK6510_MEMORY_F18; break; case GN_MT_F19: result = NK6510_MEMORY_F19; break; case GN_MT_F20: result = NK6510_MEMORY_F20; break; default: result = NK6510_MEMORY_XX; break; } return (result); } static gn_memory_type get_gn_memory_type(int memory_type) { int result; switch (memory_type) { case NK6510_MEMORY_IN: result = GN_MT_IN; break; case NK6510_MEMORY_OU: result = GN_MT_OU; break; case NK6510_MEMORY_OUS: result = GN_MT_OUS; break; case NK6510_MEMORY_AR: result = GN_MT_AR; break; case NK6510_MEMORY_TE: result = GN_MT_TE; break; case NK6510_MEMORY_F1: result = GN_MT_F1; break; case NK6510_MEMORY_F2: result = GN_MT_F2; break; case NK6510_MEMORY_F3: result = GN_MT_F3; break; case NK6510_MEMORY_F4: result = GN_MT_F4; break; case NK6510_MEMORY_F5: result = GN_MT_F5; break; case NK6510_MEMORY_F6: result = GN_MT_F6; break; case NK6510_MEMORY_F7: result = GN_MT_F7; break; case NK6510_MEMORY_F8: result = GN_MT_F8; break; case NK6510_MEMORY_F9: result = GN_MT_F9; break; case NK6510_MEMORY_F10: result = GN_MT_F10; break; case NK6510_MEMORY_F11: result = GN_MT_F11; break; case NK6510_MEMORY_F12: result = GN_MT_F12; break; case NK6510_MEMORY_F13: result = GN_MT_F13; break; case NK6510_MEMORY_F14: result = GN_MT_F14; break; case NK6510_MEMORY_F15: result = GN_MT_F15; break; case NK6510_MEMORY_F16: result = GN_MT_F16; break; case NK6510_MEMORY_F17: result = GN_MT_F17; break; case NK6510_MEMORY_F18: result = GN_MT_F18; break; case NK6510_MEMORY_F19: result = GN_MT_F19; break; case NK6510_MEMORY_F20: result = GN_MT_F20; break; default: result = GN_MT_XX; break; } return (result); } /* 01 33 00 17 05 01 05 08 04 00 01 00 00 00 01 33 00 17 05 01 05 08 04 00 01 00 00 00 0x0b / 0x000e 01 33 00 17 05 01 05 08 05 00 01 00 00 00 0x0b / 0x000e 01 33 00 17 05 01 05 08 04 00 01 00 00 00 0x0b / 0x000e 01 33 00 17 05 01 05 08 04 00 01 00 00 00 0x0b / 0x000e 01 33 00 17 05 01 05 08 05 00 01 00 00 00 0x0e / 0x000e 01 42 00 68 55 01 01 08 00 32 01 55 55 55 0x0e / 0x000e 01 42 00 68 55 01 01 08 00 32 01 55 55 55 */ static int sms_encode(gn_data *data, struct gn_statemachine *state, unsigned char *req) { int pos = 0, udh_length_pos, len; req[pos++] = 0x01; /* one big block */ if (data->raw_sms->type == GN_SMS_MT_Deliver) req[pos++] = 0x00; /* message type: deliver */ else req[pos++] = 0x02; /* message type: submit */ req[pos++] = 0x00; /* will be set at the end */ /* is supposed to be the length of the whole message starting from req[10], which is the message type */ if (data->raw_sms->type == GN_SMS_MT_Deliver) { req[pos++] = 0x04; /* SMS Deliver */ } else { req[pos] = 0x01; /* SMS Submit */ if (data->raw_sms->reply_via_same_smsc) req[pos] |= 0x80; if (data->raw_sms->reject_duplicates) req[pos] |= 0x04; if (data->raw_sms->report) req[pos] |= 0x20; if (data->raw_sms->udh_indicator) req[pos] |= 0x40; if (data->raw_sms->validity_indicator) req[pos] |= 0x10; pos++; req[pos++] = data->raw_sms->reference; req[pos++] = data->raw_sms->pid; } req[pos++] = data->raw_sms->dcs; req[pos++] = 0x00; /* FIXME: real date/time */ if (data->raw_sms->type == GN_SMS_MT_Deliver) { memcpy(req + pos, data->raw_sms->smsc_time, 7); pos += 7; memcpy(req + pos, "\x55\x55\x55", 3); pos += 3; /* Magic. Nokia new ideas: coding SMS in the sequent blocks */ req[pos++] = 0x03; /* total blocks */ } else { req[pos++] = 0x04; /* total blocks */ } /* FIXME. Do it in the loop */ /* Block 1. Remote Number */ if (data->raw_sms->type == GN_SMS_MT_Submit && data->raw_sms->status != GN_SMS_Sent) { memcpy(req + pos, "\x82\x10\x01\x0C\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", 16); pos += 16; } else { len = data->raw_sms->remote_number[0] + 4; if (len % 2) len++; len /= 2; req[pos] = 0x82; /* type: number */ req[pos + 1] = (len + 4 > 0x0c) ? (len + 4) : 0x0c; /* offset to next block starting from start of block (req[18]) */ req[pos + 2] = 0x01; /* first number field => remote_number */ req[pos + 3] = len; /* actual data length in this block */ memcpy(req + pos + 4, data->raw_sms->remote_number, len); pos += ((len + 4 > 0x0c) ? (len + 4) : 0x0c); } /* Block 2. SMSC Number */ if (data->raw_sms->type == GN_SMS_MT_Submit && data->raw_sms->status != GN_SMS_Sent) { memcpy(req + pos, "\x82\x10\x02\x0C\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", 16); pos += 16; } else { len = data->raw_sms->message_center[0] + 1; req[pos] = 0x82; /* type: number */ req[pos + 1] = (len + 4 > 0x0c) ? (len + 4) : 0x0c; /* offset to next block starting from start of block (req[18]) */ req[pos + 2] = 0x02; /* first number field => remote_number */ req[pos + 3] = len; memcpy(req + pos + 4, data->raw_sms->message_center, len); pos += ((len + 4 > 0x0c) ? (len + 4) : 0x0c); } /* Block 3. User Data */ req[pos++] = 0x80; /* type: User Data */ req[pos++] = data->raw_sms->user_data_length + 4; /* same as req[11] but starting from req[42] */ req[pos++] = data->raw_sms->user_data_length; req[pos++] = data->raw_sms->length; memcpy(req + pos, data->raw_sms->user_data, data->raw_sms->user_data_length); pos += data->raw_sms->user_data_length; /* padding */ udh_length_pos = pos - data->raw_sms->user_data_length - 3; if (req[udh_length_pos] % 8 != 0) { memcpy(req + pos, "\x55\x55\x55\x55\x55\x55\x55\x55", 8 - req[udh_length_pos] % 8); pos += 8 - req[udh_length_pos] % 8; req[udh_length_pos] += 8 - req[udh_length_pos] % 8; } if (data->raw_sms->type == GN_SMS_MT_Submit) { /* Block 4. Validity Period */ req[pos++] = 0x08; /* type: validity */ req[pos++] = 0x04; /* block length */ req[pos++] = 0x01; /* data length */ req[pos++] = data->raw_sms->validity[0]; } req[2] = pos - 1; return pos; } gnokii-0.6.31/common/phones/nk7110.c0000644000175000017500000032410311666163120015057 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 2000 Chris Kemp Copyright (C) 2001 Ladis Michl, Marian Jancar Copyright (C) 2001-2002 Markus Plail Copyright (C) 2001-2004 Pawel Kot Copyright (C) 2002-2003 BORBELY Zoltan Copyright (C) 2002-2003 Ladis Michl Copyright (C) 2002 Marcin Wiacek This file provides functions specific to the Nokia 7110 series. See README for more details on supported mobile phones. The various routines are called NK7110_(whatever). */ #include "config.h" #include #include #include #include "compat.h" #include "gnokii.h" #include "nokia-decoding.h" #include "phones/nk7110.h" #include "phones/generic.h" #include "phones/nokia.h" #include "links/fbus.h" #include "links/fbus-phonet.h" #include "links/m2bus.h" #include "gnokii-internal.h" #define DRVINSTANCE(s) (*((nk7110_driver_instance **)(&(s)->driver.driver_instance))) #define FREE(p) do { free(p); (p) = NULL; } while (0) #define SEND_MESSAGE_BLOCK(type, length) \ do { \ if (sm_message_send(length, type, req, state)) return GN_ERR_NOTREADY; \ return sm_block(type, data, state); \ } while (0) #define SEND_MESSAGE_WAITFOR(type, length) \ do { \ if (sm_message_send(length, type, req, state)) return GN_ERR_NOTREADY; \ return sm_wait_for(type, data, state); \ } while (0) /* Functions prototypes */ static gn_error NK7110_Functions(gn_operation op, gn_data *data, struct gn_statemachine *state); static gn_error NK7110_Initialise(struct gn_statemachine *state); static gn_error NK7110_GetModel(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_GetRevision(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_GetIMEI(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_Identify(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_GetBatteryLevel(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_GetRFLevel(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_GetMemoryStatus(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_SetBitmap(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_GetBitmap(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_WritePhonebookLocation(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_ReadPhonebook(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_DeletePhonebookLocation(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_GetNetworkInfo(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_GetSpeedDial(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_GetSMSCenter(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_GetClock(char req_type, gn_data *data, struct gn_statemachine *state); static gn_error NK7110_SetClock(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_SetAlarm(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_GetCalendarNote(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_WriteCalendarNote(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_DeleteCalendarNote(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_SendSMS(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_SaveSMS(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_GetSMS(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_GetSMSnoValidate(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_DeleteSMS(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_DeleteSMSnoValidate(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_GetPictureList(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_GetSMSFolders(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_GetSMSFolderStatus(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_GetSMSStatus(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_GetSecurityCode(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_PressOrReleaseKey(gn_data *data, struct gn_statemachine *state, bool press); static gn_error NK7110_GetRawRingtone(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_SetRawRingtone(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_GetRingtone(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_SetRingtone(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_GetRingtoneList(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_GetProfile(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_SetProfile(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_GetActiveCalls(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_MakeCall(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_CancelCall(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_AnswerCall(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_DeleteWAPBookmark(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_GetWAPBookmark(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_WriteWAPBookmark(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_GetWAPSetting(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_ActivateWAPSetting(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_WriteWAPSetting(gn_data *data, struct gn_statemachine *state); static gn_error NK7110_IncomingIdentify(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error NK7110_IncomingPhonebook(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error NK7110_IncomingNetwork(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error NK7110_IncomingBattLevel(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error NK7110_IncomingStartup(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error NK7110_IncomingSMS(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error NK7110_IncomingFolder(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error NK7110_IncomingClock(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error NK7110_IncomingCalendar(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error NK7110_IncomingSecurity(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error NK7110_IncomingWAP(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error NK7110_IncomingKeypress(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error NK7110_IncomingProfile(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error NK7110_IncomingRingtone(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error NK7110_IncomingCommstatus(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static int get_memory_type(gn_memory_type memory_type); static gn_memory_type get_gn_memory_type(int memory_type); static gn_incoming_function_type nk7110_incoming_functions[] = { { NK7110_MSG_FOLDER, NK7110_IncomingFolder }, { NK7110_MSG_SMS, NK7110_IncomingSMS }, { NK7110_MSG_PHONEBOOK, NK7110_IncomingPhonebook }, { NK7110_MSG_NETSTATUS, NK7110_IncomingNetwork }, { NK7110_MSG_CALENDAR, NK7110_IncomingCalendar }, { NK7110_MSG_BATTERY, NK7110_IncomingBattLevel }, { NK7110_MSG_CLOCK, NK7110_IncomingClock }, { NK7110_MSG_IDENTITY, NK7110_IncomingIdentify }, { NK7110_MSG_STLOGO, NK7110_IncomingStartup }, { NK7110_MSG_DIVERT, pnok_call_divert_incoming }, { NK7110_MSG_SECURITY, NK7110_IncomingSecurity }, { NK7110_MSG_WAP, NK7110_IncomingWAP }, { NK7110_MSG_KEYPRESS_RESP, NK7110_IncomingKeypress }, { NK7110_MSG_PROFILE, NK7110_IncomingProfile }, { NK7110_MSG_RINGTONE, NK7110_IncomingRingtone }, { NK7110_MSG_COMMSTATUS, NK7110_IncomingCommstatus }, { 0, NULL } }; gn_driver driver_nokia_7110 = { nk7110_incoming_functions, pgen_incoming_default, /* Mobile phone information */ { "7110|6210|6250|7190", /* Supported models */ 7, /* Max RF Level */ 0, /* Min RF Level */ GN_RF_Percentage, /* RF level units */ 7, /* Max Battery Level */ 0, /* Min Battery Level */ GN_BU_Percentage, /* Battery level units */ GN_DT_DateTime, /* Have date/time support */ GN_DT_TimeOnly, /* Alarm supports time only */ 1, /* Alarms available - FIXME */ 60, 96, /* Startup logo size - 7110 is fixed at init */ 21, 78, /* Op logo size */ 14, 72 /* Caller logo size */ }, NK7110_Functions, NULL }; /* FIXME - a little macro would help here... */ static gn_error NK7110_Functions(gn_operation op, gn_data *data, struct gn_statemachine *state) { if (!DRVINSTANCE(state) && op != GN_OP_Init) return GN_ERR_INTERNALERROR; switch (op) { case GN_OP_Init: return NK7110_Initialise(state); case GN_OP_Terminate: FREE(DRVINSTANCE(state)); return pgen_terminate(data, state); case GN_OP_GetModel: return NK7110_GetModel(data, state); case GN_OP_GetRevision: return NK7110_GetRevision(data, state); case GN_OP_GetImei: return NK7110_GetIMEI(data, state); case GN_OP_Identify: return NK7110_Identify(data, state); case GN_OP_GetBatteryLevel: return NK7110_GetBatteryLevel(data, state); case GN_OP_GetRFLevel: return NK7110_GetRFLevel(data, state); case GN_OP_GetMemoryStatus: return NK7110_GetMemoryStatus(data, state); case GN_OP_GetBitmap: return NK7110_GetBitmap(data, state); case GN_OP_SetBitmap: return NK7110_SetBitmap(data, state); case GN_OP_ReadPhonebook: return NK7110_ReadPhonebook(data, state); case GN_OP_WritePhonebook: return NK7110_WritePhonebookLocation(data, state); case GN_OP_DeletePhonebook: return NK7110_DeletePhonebookLocation(data, state); case GN_OP_GetNetworkInfo: return NK7110_GetNetworkInfo(data, state); case GN_OP_GetSpeedDial: return NK7110_GetSpeedDial(data, state); case GN_OP_GetSMSCenter: return NK7110_GetSMSCenter(data, state); case GN_OP_GetDateTime: return NK7110_GetClock(NK7110_SUBCLO_GET_DATE, data, state); case GN_OP_SetDateTime: return NK7110_SetClock(data, state); case GN_OP_GetAlarm: return NK7110_GetClock(NK7110_SUBCLO_GET_ALARM, data, state); case GN_OP_SetAlarm: return NK7110_SetAlarm(data, state); case GN_OP_GetCalendarNote: return NK7110_GetCalendarNote(data, state); case GN_OP_WriteCalendarNote: return NK7110_WriteCalendarNote(data, state); case GN_OP_DeleteCalendarNote: return NK7110_DeleteCalendarNote(data, state); case GN_OP_GetSMS: dprintf("Getting SMS (validating)...\n"); return NK7110_GetSMS(data, state); case GN_OP_GetSMSnoValidate: dprintf("Getting SMS (no validating)...\n"); return NK7110_GetSMSnoValidate(data, state); case GN_OP_OnSMS: DRVINSTANCE(state)->on_sms = data->on_sms; DRVINSTANCE(state)->sms_callback_data = data->callback_data; /* Register notify when running for the first time */ if (data->on_sms) { DRVINSTANCE(state)->new_sms = true; return GN_ERR_NONE; /* FIXME NK7110_GetIncomingSMS(data, state); */ } break; case GN_OP_PollSMS: if (DRVINSTANCE(state)->new_sms) return GN_ERR_NONE; /* FIXME NK7110_GetIncomingSMS(data, state); */ break; case GN_OP_SendSMS: return NK7110_SendSMS(data, state); case GN_OP_SaveSMS: return NK7110_SaveSMS(data, state); case GN_OP_DeleteSMSnoValidate: return NK7110_DeleteSMSnoValidate(data, state); case GN_OP_DeleteSMS: return NK7110_DeleteSMS(data, state); case GN_OP_GetSMSStatus: return NK7110_GetSMSStatus(data, state); case GN_OP_CallDivert: return pnok_call_divert(data, state); case GN_OP_NetMonitor: return pnok_netmonitor(data, state); case GN_OP_GetActiveCalls: return NK7110_GetActiveCalls(data, state); case GN_OP_MakeCall: return NK7110_MakeCall(data, state); case GN_OP_AnswerCall: return NK7110_AnswerCall(data, state); case GN_OP_CancelCall: return NK7110_CancelCall(data, state); case GN_OP_GetSecurityCode: return NK7110_GetSecurityCode(data, state); case GN_OP_GetSMSFolders: return NK7110_GetSMSFolders(data, state); case GN_OP_GetSMSFolderStatus: return NK7110_GetSMSFolderStatus(data, state); case GN_OP_NK7110_GetPictureList: return NK7110_GetPictureList(data, state); case GN_OP_DeleteWAPBookmark: return NK7110_DeleteWAPBookmark(data, state); case GN_OP_GetWAPBookmark: return NK7110_GetWAPBookmark(data, state); case GN_OP_WriteWAPBookmark: return NK7110_WriteWAPBookmark(data, state); case GN_OP_GetWAPSetting: return NK7110_GetWAPSetting(data, state); case GN_OP_ActivateWAPSetting: return NK7110_ActivateWAPSetting(data, state); case GN_OP_WriteWAPSetting: return NK7110_WriteWAPSetting(data, state); case GN_OP_PressPhoneKey: return NK7110_PressOrReleaseKey(data, state, true); case GN_OP_ReleasePhoneKey: return NK7110_PressOrReleaseKey(data, state, false); case GN_OP_GetRawRingtone: return NK7110_GetRawRingtone(data, state); case GN_OP_SetRawRingtone: return NK7110_SetRawRingtone(data, state); case GN_OP_GetRingtone: return NK7110_GetRingtone(data, state); case GN_OP_SetRingtone: return NK7110_SetRingtone(data, state); case GN_OP_GetRingtoneList: return NK7110_GetRingtoneList(data, state); case GN_OP_PlayTone: return pnok_play_tone(data, state); case GN_OP_GetLocksInfo: return pnok_get_locks_info(data, state); case GN_OP_GetProfile: return NK7110_GetProfile(data, state); case GN_OP_SetProfile: return NK7110_SetProfile(data, state); default: return GN_ERR_NOTIMPLEMENTED; } return GN_ERR_NONE; } /* Initialise is the only function allowed to 'use' state */ static gn_error NK7110_Initialise(struct gn_statemachine *state) { gn_data data; char model[GN_MODEL_MAX_LENGTH+1]; gn_error err = GN_ERR_NONE; bool connected = false; unsigned int attempt = 0; /* Copy in the phone info */ memcpy(&(state->driver), &driver_nokia_7110, sizeof(gn_driver)); if (!(DRVINSTANCE(state) = calloc(1, sizeof(nk7110_driver_instance)))) return GN_ERR_INTERNALERROR; dprintf("Connecting\n"); while (!connected) { if (attempt > 2) break; switch (state->config.connection_type) { case GN_CT_Bluetooth: case GN_CT_DAU9P: attempt++; case GN_CT_DLR3P: if (attempt > 1) { attempt = 3; break; } case GN_CT_Serial: case GN_CT_TCP: err = fbus_initialise(attempt++, state); break; case GN_CT_Infrared: case GN_CT_Irda: err = phonet_initialise(state); attempt = 3; break; case GN_CT_M2BUS: err = m2bus_initialise(state); break; default: FREE(DRVINSTANCE(state)); return GN_ERR_NOTSUPPORTED; } if (err != GN_ERR_NONE) { dprintf("Error in link initialisation: %d\n", err); continue; } sm_initialise(state); /* Now test the link and get the model */ gn_data_clear(&data); data.model = model; err = state->driver.functions(GN_OP_GetModel, &data, state); if (err == GN_ERR_NONE) { connected = true; } else { /* ignore return value from pgen_terminate(), will use previous error code instead */ pgen_terminate(&data, state); } } if (!connected) { FREE(DRVINSTANCE(state)); return err; } /* Check for 7110 and alter the startup logo size */ if (strcmp(model, "NSE-5") == 0) { state->driver.phone.startup_logo_height = 65; dprintf("7110 detected - startup logo height set to 65\n"); DRVINSTANCE(state)->userdef_location = 0x75; } else { DRVINSTANCE(state)->userdef_location = 0x8a; } pnok_extended_cmds_enable(0x01, &data, state); return GN_ERR_NONE; } /*****************************/ /********* IDENTIFY **********/ /*****************************/ static gn_error NK7110_IncomingIdentify(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { switch (message[3]) { case 0x02: if (data->imei) { int n; unsigned char *s = strchr(message + 4, '\n'); if (s) n = s - message - 3; else n = GN_IMEI_MAX_LENGTH; snprintf(data->imei, GNOKII_MIN(n, GN_IMEI_MAX_LENGTH), "%s", message + 4); dprintf("Received imei %s\n", data->imei); } break; case 0x04: if (data->model) { int n; unsigned char *s = strchr(message + 22, '\n'); n = s ? s - message - 21 : GN_MODEL_MAX_LENGTH; snprintf(data->model, GNOKII_MIN(n, GN_MODEL_MAX_LENGTH), "%s", message + 22); dprintf("Received model %s\n", data->model); } if (data->revision) { int n; unsigned char *s = strchr(message + 7, '\n'); n = s ? s - message - 6 : GN_REVISION_MAX_LENGTH; snprintf(data->revision, GNOKII_MIN(n, GN_REVISION_MAX_LENGTH), "%s", message + 7); dprintf("Received revision %s\n", data->revision); } break; default: dprintf("Unknown subtype of type 0x1b (%d)\n", message[3]); return GN_ERR_UNHANDLEDFRAME; } return GN_ERR_NONE; } /* Just as an example.... */ /* But note that both requests are the same type which isn't very 'proper' */ static gn_error NK7110_Identify(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x01}; unsigned char req2[] = {FBUS_FRAME_HEADER, 0x03, 0x01, 0x32}; dprintf("Identifying...\n"); pnok_manufacturer_get(data->manufacturer); if (sm_message_send(4, NK7110_MSG_IDENTITY, req, state)) return GN_ERR_NOTREADY; if (sm_message_send(6, NK7110_MSG_IDENTITY, req2, state)) return GN_ERR_NOTREADY; sm_wait_for(NK7110_MSG_IDENTITY, data, state); sm_block(NK7110_MSG_IDENTITY, data, state); /* waits for all requests - returns req2 error */ sm_error_get(NK7110_MSG_IDENTITY, state); /* Check that we are back at state Initialised */ if (gn_sm_loop(0, state) != GN_SM_Initialised) return GN_ERR_UNKNOWN; return GN_ERR_NONE; } static gn_error NK7110_GetModel(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x03, 0x01, 0x32}; dprintf("Getting model...\n"); SEND_MESSAGE_BLOCK(NK7110_MSG_IDENTITY, 6); } static gn_error NK7110_GetRevision(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x03, 0x01, 0x32}; dprintf("Getting revision...\n"); SEND_MESSAGE_BLOCK(NK7110_MSG_IDENTITY, 6); } static gn_error NK7110_GetIMEI(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x01}; dprintf("Getting imei...\n"); SEND_MESSAGE_BLOCK(NK7110_MSG_IDENTITY, 4); } /*****************************/ /********** BATTERY **********/ /*****************************/ static gn_error NK7110_IncomingBattLevel(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { switch (message[3]) { case 0x03: if (data->battery_level) { *(data->battery_unit) = GN_BU_Percentage; *(data->battery_level) = message[5]; dprintf("Battery level %f\n",*(data->battery_level)); } break; default: dprintf("Unknown subtype of type 0x17 (%d)\n", message[3]); return GN_ERR_UNKNOWN; } return GN_ERR_NONE; } static gn_error NK7110_GetBatteryLevel(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x02}; dprintf("Getting battery level...\n"); SEND_MESSAGE_BLOCK(NK7110_MSG_BATTERY, 4); } /*****************************/ /********** NETWORK **********/ /*****************************/ static gn_error NK7110_IncomingNetwork(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { unsigned char *blockstart; gn_error error = GN_ERR_NONE; int i; switch (message[3]) { case 0x71: blockstart = message + 6; for (i = 0; i < message[4]; i++) { switch (blockstart[0]) { case 0x01: /* Operator details */ /* Network code is stored as 0xBA 0xXC 0xED ("ABC DE"). */ if (data->network_info) { /* Is this correct? */ data->network_info->cell_id[0] = blockstart[4]; data->network_info->cell_id[1] = blockstart[5]; data->network_info->LAC[0] = blockstart[6]; data->network_info->LAC[1] = blockstart[7]; data->network_info->network_code[0] = '0' + (blockstart[8] & 0x0f); data->network_info->network_code[1] = '0' + (blockstart[8] >> 4); data->network_info->network_code[2] = '0' + (blockstart[9] & 0x0f); data->network_info->network_code[3] = ' '; data->network_info->network_code[4] = '0' + (blockstart[10] & 0x0f); data->network_info->network_code[5] = '0' + (blockstart[10] >> 4); data->network_info->network_code[6] = 0; } if (data->bitmap) { data->bitmap->netcode[0] = '0' + (blockstart[8] & 0x0f); data->bitmap->netcode[1] = '0' + (blockstart[8] >> 4); data->bitmap->netcode[2] = '0' + (blockstart[9] & 0x0f); data->bitmap->netcode[3] = ' '; data->bitmap->netcode[4] = '0' + (blockstart[10] & 0x0f); data->bitmap->netcode[5] = '0' + (blockstart[10] >> 4); data->bitmap->netcode[6] = 0; dprintf("Operator %s\n", data->bitmap->netcode); } break; case 0x04: /* Logo */ if (data->bitmap) { dprintf("Op logo received ok\n"); data->bitmap->type = GN_BMP_OperatorLogo; data->bitmap->size = blockstart[5]; /* Probably + [4]<<8 */ data->bitmap->height = blockstart[3]; data->bitmap->width = blockstart[2]; memcpy(data->bitmap->bitmap, blockstart + 8, data->bitmap->size); dprintf("Logo (%dx%d)\n", data->bitmap->height, data->bitmap->width); } break; default: dprintf("Unknown operator block %d\n", blockstart[0]); break; } blockstart += blockstart[1]; } break; case 0x82: if (data->rf_level) { *(data->rf_unit) = GN_RF_Percentage; *(data->rf_level) = message[4]; dprintf("RF level %f\n", *(data->rf_level)); } break; case 0xa4: dprintf("Op Logo Set OK\n"); break; case 0xa5: dprintf("Op Logo Set failed\n"); /* Perhaps this should be WRONGFORMAT */ error = GN_ERR_FAILED; break; default: dprintf("Unknown subtype of type 0x0a (%d)\n", message[3]); error = GN_ERR_UNHANDLEDFRAME; } return error; } static gn_error NK7110_GetRFLevel(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x81}; dprintf("Getting rf level...\n"); SEND_MESSAGE_BLOCK(NK7110_MSG_NETSTATUS, 4); } static gn_error NK7110_GetNetworkInfo(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x70}; dprintf("Getting Network Info...\n"); SEND_MESSAGE_BLOCK(NK7110_MSG_NETSTATUS, 4); } static gn_error SetOperatorBitmap(gn_data *data, struct gn_statemachine *state) { unsigned char req[500] = { FBUS_FRAME_HEADER, 0xa3, 0x01, 0x00, /* logo enabled */ 0x00, 0xf0, 0x00, /* network code (000 00) */ 0x00 ,0x04, 0x08, /* length of rest */ 0x00, 0x00, /* Bitmap width / height */ 0x00, 0x00, /* Bitmap size */ 0x00, 0x00 }; int count = 18; if ((data->bitmap->width != state->driver.phone.operator_logo_width) || (data->bitmap->height != state->driver.phone.operator_logo_height)) { dprintf("Invalid image size - expecting (%dx%d) got (%dx%d)\n", state->driver.phone.operator_logo_height, state->driver.phone.operator_logo_width, data->bitmap->height, data->bitmap->width); return GN_ERR_INVALIDSIZE; } if (strcmp(data->bitmap->netcode, "000 00")) { /* set logo */ req[5] = 0x01; /* Logo enabled */ req[6] = ((data->bitmap->netcode[1] & 0x0f) << 4) | (data->bitmap->netcode[0] & 0x0f); req[7] = 0xf0 | (data->bitmap->netcode[2] & 0x0f); req[8] = ((data->bitmap->netcode[5] & 0x0f) << 4) | (data->bitmap->netcode[4] & 0x0f); req[11] = 8 + data->bitmap->size; req[12] = data->bitmap->width; req[13] = data->bitmap->height; req[15] = data->bitmap->size; memcpy(req + count, data->bitmap->bitmap, data->bitmap->size); count += data->bitmap->size; } dprintf("Setting op logo...\n"); SEND_MESSAGE_BLOCK(NK7110_MSG_NETSTATUS, count); } static gn_error GetOperatorBitmap(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x70}; dprintf("Getting op logo...\n"); SEND_MESSAGE_BLOCK(NK7110_MSG_NETSTATUS, 4); } /*****************************/ /********* PHONEBOOK *********/ /*****************************/ static gn_error NK7110_IncomingPhonebook(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { nk7110_driver_instance *drvinst = DRVINSTANCE(state); unsigned char *blockstart; unsigned char blocks; int memtype, location, memtype_req; switch (message[3]) { case 0x04: /* Get status response */ if (data->memory_status) { if (message[5] != 0xff) { data->memory_status->used = (message[16] << 8) + message[17]; data->memory_status->free = ((message[14] << 8) + message[15]) - data->memory_status->used; dprintf("Memory status - location = %d\n", (message[8] << 8) + message[9]); } else { dprintf("Unknown error getting mem status\n"); return GN_ERR_NOTIMPLEMENTED; } } break; case 0x08: /* Read Memory response */ memtype = message[11]; location = (message[12] << 8) + message[13]; if (data->phonebook_entry) { data->phonebook_entry->empty = true; data->phonebook_entry->caller_group = 5; /* no group */ data->phonebook_entry->name[0] = '\0'; data->phonebook_entry->number[0] = '\0'; data->phonebook_entry->subentries_count = 0; data->phonebook_entry->date.year = 0; data->phonebook_entry->date.month = 0; data->phonebook_entry->date.day = 0; data->phonebook_entry->date.hour = 0; data->phonebook_entry->date.minute = 0; data->phonebook_entry->date.second = 0; } if (data->bitmap) { data->bitmap->text[0] = '\0'; } if (message[6] == 0x0f) { /* not found */ switch (message[10]) { case 0x30: if (data->phonebook_entry) memtype_req = data->phonebook_entry->memory_type; else memtype_req = GN_MT_XX; /* * this message has two meanings: "invalid * location" and "memory is empty" */ switch (memtype_req) { case GN_MT_SM: case GN_MT_ME: return GN_ERR_EMPTYLOCATION; default: break; } return GN_ERR_INVALIDMEMORYTYPE; case 0x33: return GN_ERR_EMPTYLOCATION; case 0x34: return GN_ERR_INVALIDLOCATION; default: return GN_ERR_NOTIMPLEMENTED; } } if (drvinst->ll_memtype != memtype || drvinst->ll_location != location) { dprintf("skipping entry: ll_memtype: %d, memtype: %d, ll_location: %d, location: %d\n", drvinst->ll_memtype, memtype, drvinst->ll_location, location); return GN_ERR_UNSOLICITED; } dprintf("Received phonebook info\n"); blocks = message[17]; blockstart = message + 18; return phonebook_decode(blockstart, length - 17, data, blocks, message[11], 8); case 0x0c: if (message[6] == 0x0f) { switch (message[10]) { case 0x34: return GN_ERR_FAILED; /* invalid location ? */ case 0x3d: return GN_ERR_FAILED; case 0x3e: return GN_ERR_FAILED; default: return GN_ERR_UNHANDLEDFRAME; } } break; case 0x10: dprintf("Entry successfully deleted!\n"); break; default: dprintf("Unknown subtype of type 0x03 (%d)\n", message[3]); return GN_ERR_UNHANDLEDFRAME; } return GN_ERR_NONE; } static gn_error NK7110_GetMemoryStatus(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x03, 0x00, 0x00}; dprintf("Getting memory status...\n"); req[5] = get_memory_type(data->memory_status->memory_type); SEND_MESSAGE_BLOCK(NK7110_MSG_PHONEBOOK, 6); } static gn_error GetCallerBitmap(gn_data *data, struct gn_statemachine *state) { nk7110_driver_instance *drvinst = DRVINSTANCE(state); unsigned char req[] = {FBUS_FRAME_HEADER, 0x07, 0x01, 0x01, 0x00, 0x01, 0x00, 0x10 , /* memory type */ 0x00, 0x00, /* location */ 0x00, 0x00}; req[11] = GNOKII_MIN(data->bitmap->number + 1, GN_PHONEBOOK_CALLER_GROUPS_MAX_NUMBER); drvinst->ll_memtype = 0x10; drvinst->ll_location = req[11]; dprintf("Getting caller(%d) logo...\n", req[11]); SEND_MESSAGE_BLOCK(NK7110_MSG_PHONEBOOK, 14); } static unsigned char PackBlock(u8 id, u8 size, u8 no, u8 *buf, u8 *block) { *(block++) = id; *(block++) = 0; *(block++) = 0; *(block++) = size + 6; *(block++) = no; memcpy(block, buf, size); block += size; *(block++) = 0; return (size + 6); } static gn_error SetCallerBitmap(gn_data *data, struct gn_statemachine *state) { unsigned char req[500] = {FBUS_FRAME_HEADER, 0x0b, 0x00, 0x01, 0x01, 0x00, 0x00, 0x0c, 0x00, 0x10, /* memory type */ 0x00, 0x00, /* location */ 0x00, 0x00, 0x00}; char string[500]; int block, i; unsigned int count = 18; if ((data->bitmap->width != state->driver.phone.caller_logo_width) || (data->bitmap->height != state->driver.phone.caller_logo_height)) { dprintf("Invalid image size - expecting (%dx%d) got (%dx%d)\n",state->driver.phone.caller_logo_height, state->driver.phone.caller_logo_width, data->bitmap->height, data->bitmap->width); return GN_ERR_INVALIDSIZE; } req[13] = data->bitmap->number + 1; dprintf("Setting caller(%d) bitmap...\n",data->bitmap->number); block = 1; /* Name */ i = strlen(data->bitmap->text); i = char_unicode_encode((string + 1), data->bitmap->text, i); string[0] = i; count += PackBlock(0x07, i + 1, block++, string, req + count); /* Ringtone */ string[0] = data->bitmap->ringtone; string[1] = 0; count += PackBlock(0x0c, 2, block++, string, req + count); /* Number */ string[0] = data->bitmap->number+1; string[1] = 0; count += PackBlock(0x1e, 2, block++, string, req + count); /* Logo on/off - assume on for now */ string[0] = 1; string[1] = 0; count += PackBlock(0x1c, 2, block++, string, req + count); /* Logo */ string[0] = data->bitmap->width; string[1] = data->bitmap->height; string[2] = 0; string[3] = 0; string[4] = 0x7e; /* Size */ memcpy(string + 5, data->bitmap->bitmap, data->bitmap->size); count += PackBlock(0x1b, data->bitmap->size + 5, block++, string, req + count); req[17] = block - 1; SEND_MESSAGE_BLOCK(NK7110_MSG_PHONEBOOK, count); } static gn_error NK7110_DeletePhonebookLocation(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x0f, 0x00, 0x01, 0x04, 0x00, 0x00, 0x0c, 0x01, 0xff, 0x00, 0x00, /* location */ 0x00, /* memory type */ 0x00, 0x00, 0x00}; gn_phonebook_entry *entry; if (data->phonebook_entry) entry = data->phonebook_entry; else return GN_ERR_TRYAGAIN; /* Two octets for the memory location */ req[12] = (entry->location >> 8); req[13] = entry->location & 0xff; req[14] = get_memory_type(entry->memory_type); SEND_MESSAGE_BLOCK(NK7110_MSG_PHONEBOOK, 18); } static gn_error NK7110_WritePhonebookLocation(gn_data *data, struct gn_statemachine *state) { unsigned char req[500] = {FBUS_FRAME_HEADER, 0x0b, 0x00, 0x01, 0x01, 0x00, 0x00, 0x0c, 0x00, 0x00, /* memory type */ 0x00, 0x00, /* location */ 0x00, 0x00, 0x00, 0x00}; char string[500]; int block, i, j, defaultn; unsigned int count = 18; gn_phonebook_entry *entry; if (data->phonebook_entry) entry = data->phonebook_entry; else return GN_ERR_TRYAGAIN; req[11] = get_memory_type(entry->memory_type); /* Two octets for the memory location */ req[12] = (entry->location >> 8); req[13] = entry->location & 0xff; block = 1; if (!entry->empty) { /* Name */ i = strlen(entry->name); i = char_unicode_encode((string + 1), entry->name, i); /* Length of the string + length field + terminating 0 */ string[0] = i + 2; count += PackBlock(0x07, i + 2, block++, string, req + count); /* Group */ string[0] = entry->caller_group + 1; string[1] = 0; count += PackBlock(0x1e, 2, block++, string, req + count); /* We don't require the application to fill in any subentry. * if it is not filled in, let's take just one number we have. */ if (!entry->subentries_count) { string[0] = GN_PHONEBOOK_ENTRY_Number; string[1] = string[2] = string[3] = 0; j = strlen(entry->number); j = char_unicode_encode((string + 5), entry->number, j); string[j + 1] = 0; string[4] = j; count += PackBlock(0x0b, j + 6, block++, string, req + count); } else { /* Default Number */ defaultn = 999; for (i = 0; i < entry->subentries_count; i++) if (entry->subentries[i].entry_type == GN_PHONEBOOK_ENTRY_Number) if (!strcmp(entry->number, entry->subentries[i].data.number)) defaultn = i; if (defaultn < i) { string[0] = entry->subentries[defaultn].number_type; string[1] = string[2] = string[3] = 0; j = strlen(entry->subentries[defaultn].data.number); j = char_unicode_encode((string + 5), entry->subentries[defaultn].data.number, j); string[j + 1] = 0; string[4] = j; count += PackBlock(0x0b, j + 6, block++, string, req + count); } /* Rest of the numbers */ for (i = 0; i < entry->subentries_count; i++) if (entry->subentries[i].entry_type == GN_PHONEBOOK_ENTRY_Number) { if (i != defaultn) { string[0] = entry->subentries[i].number_type; string[1] = string[2] = string[3] = 0; j = strlen(entry->subentries[i].data.number); j = char_unicode_encode((string + 5), entry->subentries[i].data.number, j); string[j + 1] = 0; string[4] = j; count += PackBlock(0x0b, j + 6, block++, string, req + count); } } else { j = strlen(entry->subentries[i].data.number); j = char_unicode_encode((string + 1), entry->subentries[i].data.number, j); string[j + 1] = 0; string[0] = j; count += PackBlock(entry->subentries[i].entry_type, j + 2, block++, string, req + count); } } req[17] = block - 1; dprintf("Writing phonebook entry %s...\n", entry->name); } else { return NK7110_DeletePhonebookLocation(data, state); } SEND_MESSAGE_BLOCK(NK7110_MSG_PHONEBOOK, count); } static gn_error NK7110_ReadPhonebookLL(gn_data *data, struct gn_statemachine *state) { nk7110_driver_instance *drvinst = DRVINSTANCE(state); unsigned char req[2000] = {FBUS_FRAME_HEADER, 0x07, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, /* memory type; was: 0x02, 0x05 */ 0x00, 0x00, /* location */ 0x00, 0x00}; dprintf("Reading phonebook location (%d)\n", drvinst->ll_location); req[9] = drvinst->ll_memtype; req[10] = drvinst->ll_location >> 8; req[11] = drvinst->ll_location & 0xff; SEND_MESSAGE_BLOCK(NK7110_MSG_PHONEBOOK, 14); } static gn_error NK7110_ReadPhonebook(gn_data *data, struct gn_statemachine *state) { nk7110_driver_instance *drvinst = DRVINSTANCE(state); drvinst->ll_memtype = get_memory_type(data->phonebook_entry->memory_type); drvinst->ll_location = data->phonebook_entry->location; return NK7110_ReadPhonebookLL(data, state); } static gn_error NK7110_GetSpeedDial(gn_data *data, struct gn_statemachine *state) { nk7110_driver_instance *drvinst = DRVINSTANCE(state); drvinst->ll_memtype = NK7110_MEMORY_SPEEDDIALS; drvinst->ll_location = data->speed_dial->number; return NK7110_ReadPhonebookLL(data, state); } /*****************************/ /********** FOLDER ***********/ /*****************************/ static inline unsigned int get_data(gn_sms_message_type t, unsigned int a, unsigned int b, unsigned int c, unsigned int d) { switch (t) { case GN_SMS_MT_Deliver: return a; case GN_SMS_MT_Submit: return b; case GN_SMS_MT_StatusReport: return c; case GN_SMS_MT_Picture: return d; default: return 0; } } /** * NK7110_IncomingFolder - handle SMS and folder related messages (0x14 type) * @messagetype: message type, 0x14 (NK7110_MSG_FOLDER) * @message: a pointer to the raw message returned by the statemachine * @length: length of the received message * @data: gn_data structure where the handler saves parsed data * * This function parses all incoming events of the 0x14 type. This type is * known as the answer to the SMS and folder relates requests. Subtypes * handled by this function contain: * o GetSMS (0x08, 0x09) * o DeleteSMS (0x0b, 0x0c) * o SMSStatus (0x37) * o FolderStatus (0x6c) * o FolderList (0x7b) * o PictureMessagesList (0x97) * Unknown but reported errors: * o 0xc9 -- unknown command? * o 0xca -- phone not ready? */ static gn_error NK7110_IncomingFolder(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { unsigned int i, j, T, offset = 47; int nextfolder = 0x10; /* Message subtype */ switch (message[3]) { /* save sms succeeded */ case 0x05: dprintf("Message stored in folder %i at location %i\n", message[4], (message[5] << 8) | message[6]); if (data->raw_sms) data->raw_sms->number = (message[5] << 8) | message[6]; break; /* save sms failed */ case 0x06: dprintf("SMS saving failed:\n"); switch (message[4]) { case 0x02: dprintf("\tAll locations busy.\n"); return GN_ERR_MEMORYFULL; case 0x03: dprintf("\tInvalid location!\n"); return GN_ERR_INVALIDLOCATION; default: dprintf("\tUnknown reason.\n"); return GN_ERR_UNHANDLEDFRAME; } case NK7110_SUBSMS_READ_OK: /* GetSMS OK, 0x08 */ dprintf("Trying to get message # %i from the folder # %i\n", (message[6] << 8) | message[7], message[5]); if (!data->raw_sms) return GN_ERR_INTERNALERROR; memset(data->raw_sms, 0, sizeof(gn_sms_raw)); T = data->raw_sms->type = message[8]; data->raw_sms->number = (message[6] << 8) | message[7]; data->raw_sms->memory_type = message[5]; data->raw_sms->status = message[4]; data->raw_sms->more_messages = 0; data->raw_sms->reply_via_same_smsc = message[21]; data->raw_sms->reject_duplicates = 0; data->raw_sms->report = 0; data->raw_sms->reference = 0; data->raw_sms->pid = 0; data->raw_sms->report_status = 0; if (T != GN_SMS_MT_Submit) { memcpy(data->raw_sms->smsc_time, message + get_data(T, 37, 38, 36, 34), 7); memcpy(data->raw_sms->message_center, message + 9, 12); memcpy(data->raw_sms->remote_number, message + get_data(T, 25, 26, 24, 22), 12); } if (T == GN_SMS_MT_StatusReport) memcpy(data->raw_sms->time, message + 43, 7); data->raw_sms->dcs = message[23]; /* This is ugly hack. But the picture message format in 6210 * is the real pain in the ass. */ if (T == GN_SMS_MT_Picture && (message[47] == 0x48) && (message[48] == 0x1c)) /* 47 (User Data offset) + 256 (72 * 28 / 8 + 4) = 303 */ offset = 303; data->raw_sms->length = message[get_data(T, 24, 25, 0, offset)]; if (T == GN_SMS_MT_Picture) data->raw_sms->length += 256; data->raw_sms->udh_indicator = message[get_data(T, 21, 23, 0, 21)]; memcpy(data->raw_sms->user_data, message + get_data(T, 44, 45, 0, 47), data->raw_sms->length); data->raw_sms->user_data_length = length - get_data(T, 44, 45, 0, 47); data->raw_sms->validity_indicator = 0; memset(data->raw_sms->validity, 0, sizeof(data->raw_sms->validity)); break; case NK7110_SUBSMS_READ_FAIL: /* GetSMS FAIL, 0x09 */ dprintf("SMS reading failed:\n"); switch (message[4]) { case 0x02: dprintf("\tInvalid location!\n"); return GN_ERR_INVALIDLOCATION; case 0x07: dprintf("\tEmpty SMS location.\n"); return GN_ERR_EMPTYLOCATION; default: dprintf("\tUnknown reason.\n"); return GN_ERR_UNHANDLEDFRAME; } case NK7110_SUBSMS_DELETE_OK: /* DeleteSMS OK, 0x0b */ dprintf("SMS deleted\n"); break; case NK7110_SUBSMS_DELETE_FAIL: /* DeleteSMS FAIL, 0x0c */ switch (message[4]) { case 0x02: dprintf("Invalid location\n"); return GN_ERR_INVALIDLOCATION; default: dprintf("Unknown reason.\n"); return GN_ERR_UNHANDLEDFRAME; } case NK7110_SUBSMS_SMS_STATUS_OK: /* SMS status received, 0x37 */ dprintf("SMS Status received\n"); /* FIXME: Don't count messages in fixed locations together with other */ data->sms_status->number = ((message[10] << 8) | message[11]) + ((message[14] << 8) | message[15]) + (data->sms_folder->number); data->sms_status->unread = ((message[12] << 8) | message[13]) + ((message[16] << 8) | message[17]); break; case NK7110_SUBSMS_FOLDER_STATUS_OK: /* Folder status OK, 0x6C */ dprintf("Message: SMS Folder status received\n"); if (!data->sms_folder) return GN_ERR_INTERNALERROR; data->sms_folder->sms_data = 0; memset(data->sms_folder->locations, 0, sizeof(data->sms_folder->locations)); data->sms_folder->number = (message[4] << 8) | message[5]; dprintf("Message: Number of Entries: %i\n" , data->sms_folder->number); dprintf("Message: IDs of Entries : "); for (i = 0; i < data->sms_folder->number; i++) { data->sms_folder->locations[i] = (message[(i * 2) + 6] << 8) | message[(i * 2) + 7]; dprintf("%d, ", data->sms_folder->locations[i]); } dprintf("\n"); break; case NK7110_SUBSMS_FOLDER_LIST_OK: /* Folder list OK, 0x7B */ if (!data->sms_folder_list) return GN_ERR_INTERNALERROR; i = 5; memset(data->sms_folder_list, 0, sizeof(gn_sms_folder_list)); dprintf("Message: %d SMS Folders received:\n", message[4]); snprintf(data->sms_folder_list->folder[1].name, sizeof(data->sms_folder_list->folder[1].name), "%s", " "); data->sms_folder_list->number = message[4]; for (j = 0; j < message[4]; j++) { int len; snprintf(data->sms_folder_list->folder[j].name, sizeof(data->sms_folder_list->folder[j].name), "%s", " "); data->sms_folder_list->folder_id[j] = get_gn_memory_type(message[i]); data->sms_folder_list->folder[j].folder_id = data->sms_folder_list->folder_id[j]; dprintf("Folder Index: %d", data->sms_folder_list->folder_id[j]); i += 2; dprintf("\tFolder name: "); len = 0; /* search for the next folder's index number, i.e. length of the folder name */ while (i + 1 < length && message[i + 1] != nextfolder) { i += 2; len += 2; } /* see Docs/protocol/nk7110.txt */ nextfolder += 0x08; if (nextfolder == 0x28) nextfolder++; i -= len + 1; char_unicode_decode(data->sms_folder_list->folder[j].name, message + i, len); dprintf("%s\n", data->sms_folder_list->folder[j].name); i += len + 2; } break; case NK7110_SUBSMS_PICTURE_LIST_OK: /* Picture messages list OK, 0x97 */ dprintf("Getting list of SMS pictures...\n"); break; /* Some errors */ case 0xc9: dprintf("Unknown command???\n"); return GN_ERR_UNHANDLEDFRAME; case 0xca: dprintf("Phone not ready???\n"); return GN_ERR_UNHANDLEDFRAME; default: dprintf("Message: Unknown message of type 14 : %02x length: %d\n", message[3], length); return GN_ERR_UNHANDLEDFRAME; } return GN_ERR_NONE; } static gn_error NK7110_GetSMSnoValidate(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x07, 0x08, /* FolderID */ 0x00, 0x01, /* Location */ 0x01, 0x65, 0x01}; req[4] = get_memory_type(data->raw_sms->memory_type); req[5] = (data->raw_sms->number & 0xff00) >> 8; req[6] = data->raw_sms->number & 0x00ff; SEND_MESSAGE_BLOCK(NK7110_MSG_FOLDER, 10); } static gn_error ValidateSMS(gn_data *data, struct gn_statemachine *state) { gn_error error; if (data->raw_sms->number < 1) return GN_ERR_INVALIDLOCATION; /* Handle memory_type = 0 explicitely, because sms_folder->folder_id = 0 by default */ if (data->raw_sms->memory_type == 0) return GN_ERR_INVALIDMEMORYTYPE; /* see if the message we want is from the last read folder, i.e. */ /* we don't have to get folder status again */ if ((!data->sms_folder) || (!data->sms_folder_list)) return GN_ERR_INTERNALERROR; if (data->raw_sms->memory_type != data->sms_folder->folder_id) { if ((error = NK7110_GetSMSFolders(data, state)) != GN_ERR_NONE) return error; if ((data->raw_sms->memory_type > data->sms_folder_list->folder_id[data->sms_folder_list->number - 1]) || (data->raw_sms->memory_type < 12)) return GN_ERR_INVALIDMEMORYTYPE; data->sms_folder->folder_id = data->raw_sms->memory_type; if ((error = NK7110_GetSMSFolderStatus(data, state)) != GN_ERR_NONE) return error; } if (data->sms_folder->number + 2 < data->raw_sms->number) { if (data->raw_sms->number > GN_SMS_MESSAGE_MAX_NUMBER) return GN_ERR_INVALIDLOCATION; else return GN_ERR_EMPTYLOCATION; } else { data->raw_sms->number = data->sms_folder->locations[data->raw_sms->number - 1]; } return GN_ERR_NONE; } static gn_error NK7110_GetSMS(gn_data *data, struct gn_statemachine *state) { gn_error error; error = ValidateSMS(data, state); if (error != GN_ERR_NONE) return error; return NK7110_GetSMSnoValidate(data, state); } static gn_error NK7110_DeleteSMS(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x0a, 0x00, 0x00, 0x00, 0x01}; gn_error error; if (!data->raw_sms) return GN_ERR_INTERNALERROR; dprintf("Removing SMS %d\n", data->raw_sms->number); error = ValidateSMS(data, state); if (error != GN_ERR_NONE) return error; req[4] = get_memory_type(data->raw_sms->memory_type); req[5] = (data->raw_sms->number & 0xff00) >> 8; req[6] = data->raw_sms->number & 0x00ff; SEND_MESSAGE_BLOCK(NK7110_MSG_FOLDER, 8); } static gn_error NK7110_DeleteSMSnoValidate(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x0a, 0x00, 0x00, 0x00, 0x01}; if (!data->raw_sms) return GN_ERR_INTERNALERROR; dprintf("Removing SMS (no validate) %d\n", data->raw_sms->number); req[4] = get_memory_type(data->raw_sms->memory_type); req[5] = (data->raw_sms->number & 0xff00) >> 8; req[6] = data->raw_sms->number & 0x00ff; SEND_MESSAGE_BLOCK(NK7110_MSG_FOLDER, 8); } static gn_error NK7110_GetPictureList(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x96, 0x09, /* location */ 0x0f, 0x07}; dprintf("Getting picture messages list...\n"); SEND_MESSAGE_BLOCK(NK7110_MSG_FOLDER, 7); } static gn_error NK7110_GetSMSFolders(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x7a, 0x00, 0x00}; dprintf("Getting SMS Folders...\n"); SEND_MESSAGE_BLOCK(NK7110_MSG_FOLDER, 6); } static gn_error NK7110_GetSMSStatus(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x36, 0x64}; gn_sms_folder status_fld, *old_fld; gn_error error; dprintf("Getting SMS Status...\n"); /* Nokia 6210 and family does not show not "fixed" messages from the * Templates folder, ie. when you save a message to the Templates folder, * SMSStatus does not change! Workaround: get Templates folder status, which * does show these messages. */ old_fld = data->sms_folder; data->sms_folder = &status_fld; data->sms_folder->folder_id = GN_MT_TE; error = NK7110_GetSMSFolderStatus(data, state); if (error) goto out; error = sm_message_send(6, NK7110_MSG_FOLDER, req, state); if (error) goto out; error = sm_block(NK7110_MSG_FOLDER, data, state); out: data->sms_folder = old_fld; return error; } static gn_error NK7110_GetSMSFolderStatus(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x6B, 0x08, /* Folder ID */ 0x0F, 0x01}; gn_error error; gn_sms_folder read; int i; req[4] = get_memory_type(data->sms_folder->folder_id); dprintf("Getting SMS Folder (%i) status ...\n", req[4]); if (req[4] == NK7110_MEMORY_IN) { /* special case INBOX */ dprintf("Special case INBOX in GetSMSFolderStatus!\n"); if (sm_message_send(7, NK7110_MSG_FOLDER, req, state)) return GN_ERR_NOTREADY; error = sm_block(NK7110_MSG_FOLDER, data, state); if (error) return error; memcpy(&read, data->sms_folder, sizeof(gn_sms_folder)); req[4] = 0xf8; /* unread messages from INBOX */ if (sm_message_send(7, NK7110_MSG_FOLDER, req, state)) return GN_ERR_NOTREADY; error = sm_block(NK7110_MSG_FOLDER, data, state); for (i = 0; i < read.number; i++) { data->sms_folder->locations[data->sms_folder->number] = read.locations[i]; data->sms_folder->number++; } return GN_ERR_NONE; } SEND_MESSAGE_BLOCK(NK7110_MSG_FOLDER, 7); } static gn_error NK7110_SaveSMS(gn_data *data, struct gn_statemachine *state) { unsigned char req[256] = { FBUS_FRAME_HEADER, 0x04, 0x07, /* sms state */ 0x10, /* folder */ 0x00,0x00, /* location */ 0x00 }; /* type */ int len; dprintf("Saving sms\n"); switch (data->raw_sms->type) { case GN_SMS_MT_Submit: if (data->raw_sms->status == GN_SMS_Sent) req[4] = 0x05; else req[4] = 0x07; req[8] = 0x02; break; case GN_SMS_MT_Deliver: if (data->raw_sms->status == GN_SMS_Sent) req[4] = 0x01; else req[4] = 0x03; req[8] = 0x00; break; default: req[4] = 0x07; req[8] = 0x00; break; } if ((data->raw_sms->memory_type != GN_MT_ME) && (data->raw_sms->memory_type != GN_MT_SM)) req[5] = get_memory_type(data->raw_sms->memory_type); else req[5] = NK7110_MEMORY_OU; req[6] = data->raw_sms->number / 256; req[7] = data->raw_sms->number % 256; if (req[5] == NK7110_MEMORY_TE) return GN_ERR_INVALIDLOCATION; len = pnok_fbus_sms_encode(req + 9, data, state); len += 9; SEND_MESSAGE_BLOCK(NK7110_MSG_FOLDER, len); } /*****************************/ /*********** S M S *********/ /*****************************/ static gn_error NK7110_IncomingSMS(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { gn_error e = GN_ERR_NONE; if (!data) return GN_ERR_INTERNALERROR; switch (message[3]) { case NK7110_SUBSMS_SMSC_RCVD: /* 0x34 */ dprintf("SMSC Received\n"); data->message_center->id = message[4]; data->message_center->format = message[6]; data->message_center->validity = message[8]; /* due to changes in format */ snprintf(data->message_center->name, sizeof(data->message_center->name), "%s", message + 33); data->message_center->default_name = -1; if (message[9] % 2) message[9]++; message[9] = message[9] / 2 + 1; dprintf("%d\n", message[9]); snprintf(data->message_center->recipient.number, sizeof(data->message_center->recipient.number), "%s", char_bcd_number_get(message + 9)); data->message_center->recipient.type = message[10]; snprintf(data->message_center->smsc.number, sizeof(data->message_center->smsc.number), "%s", char_bcd_number_get(message + 21)); data->message_center->smsc.type = message[22]; /* Set a default SMSC name if none was received */ if (!data->message_center->name[0]) { snprintf(data->message_center->name, sizeof(data->message_center->name), _("Set %d"), data->message_center->id); data->message_center->default_name = data->message_center->id; } break; case NK7110_SUBSMS_SEND_OK: /* 0x02 */ dprintf("SMS sent\n"); e = GN_ERR_NONE; break; case NK7110_SUBSMS_SEND_FAIL: /* 0x03 */ dprintf("SMS sending failed\n"); e = GN_ERR_FAILED; break; case 0x0e: dprintf("Ack for request on Incoming SMS\n"); break; case 0x11: dprintf("SMS received\n"); /* We got here the whole SMS */ DRVINSTANCE(state)->new_sms = true; break; case NK7110_SUBSMS_SMS_RCVD: /* 0x10 */ case NK7110_SUBSMS_CELLBRD_OK: /* 0x21 */ case NK7110_SUBSMS_CELLBRD_FAIL: /* 0x22 */ case NK7110_SUBSMS_READ_CELLBRD: /* 0x23 */ case NK7110_SUBSMS_SMSC_OK: /* 0x31 */ case NK7110_SUBSMS_SMSC_FAIL: /* 0x32 */ case NK7110_SUBSMS_SMSC_RCVFAIL: /* 0x35 */ dprintf("Subtype 0x%02x of type 0x%02x (SMS handling) not implemented\n", message[3], NK7110_MSG_SMS); return GN_ERR_NOTIMPLEMENTED; default: dprintf("Unknown subtype of type 0x%02x (SMS handling): 0x%02x\n", NK7110_MSG_SMS, message[3]); return GN_ERR_UNHANDLEDFRAME; } return e; } static gn_error NK7110_GetSMSCenter(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, NK7110_SUBSMS_GET_SMSC, 0x64, 0x00}; req[5] = data->message_center->id; SEND_MESSAGE_BLOCK(NK7110_MSG_SMS, 6); } #if 0 static gn_error NK7110_PollSMS(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x0d, 0x00, 0x00, 0x02}; dprintf("Requesting for the notify of the incoming SMS\n"); SEND_MESSAGE_BLOCK(NK7110_MSG_SMS, 8); } #endif static gn_error NK7110_SendSMS(gn_data *data, struct gn_statemachine *state) { unsigned char req[256] = {FBUS_FRAME_HEADER, 0x01, 0x02, 0x00}; gn_error error; int len; len = pnok_fbus_sms_encode(req + 6, data, state); len += 6; if (sm_message_send(len, PNOK_MSG_ID_SMS, req, state)) return GN_ERR_NOTREADY; do { error = sm_block_no_retry_timeout(PNOK_MSG_ID_SMS, state->config.smsc_timeout, data, state); } while (!state->config.smsc_timeout && error == GN_ERR_TIMEOUT); return error; } /**********************************/ /************* CLOCK **************/ /**********************************/ static gn_error NK7110_IncomingClock(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { gn_error e = GN_ERR_NONE; if (!data) return GN_ERR_INTERNALERROR; switch (message[3]) { case NK7110_SUBCLO_DATE_RCVD: if (!data->datetime) return GN_ERR_INTERNALERROR; data->datetime->year = (((unsigned int)message[8]) << 8) + message[9]; data->datetime->month = message[10]; data->datetime->day = message[11]; data->datetime->hour = message[12]; data->datetime->minute = message[13]; data->datetime->second = message[14]; break; case NK7110_SUBCLO_DATE_SET: break; case NK7110_SUBCLO_ALARM_RCVD: if (!data->alarm) return GN_ERR_INTERNALERROR; switch(message[8]) { case NK7110_ALARM_ENABLED: data->alarm->enabled = true; break; case NK7110_ALARM_DISABLED: data->alarm->enabled = false; break; default: data->alarm->enabled = false; dprintf("Unknown value of alarm enable byte: 0x%02x\n", message[8]); e = GN_ERR_UNKNOWN; break; } data->alarm->timestamp.hour = message[9]; data->alarm->timestamp.minute = message[10]; break; case NK7110_SUBCLO_ALARM_SET: break; default: dprintf("Unknown subtype of type 0x%02x (clock handling): 0x%02x\n", NK7110_MSG_CLOCK, message[3]); e = GN_ERR_UNHANDLEDFRAME; break; } return e; } static gn_error NK7110_GetClock(char req_type, gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, req_type}; SEND_MESSAGE_BLOCK(NK7110_MSG_CLOCK, 4); } static gn_error NK7110_SetClock(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x60, 0x01, 0x01, 0x07, 0x00, 0x00, /* year hi/lo */ 0x00, 0x00, /* month, day */ 0x00, 0x00, /* hour, minute */ 0x00}; if (!data->datetime) return GN_ERR_INTERNALERROR; req[7] = data->datetime->year >> 8; req[8] = data->datetime->year & 0xff; req[9] = data->datetime->month; req[10] = data->datetime->day; req[11] = data->datetime->hour; req[12] = data->datetime->minute; SEND_MESSAGE_BLOCK(NK7110_MSG_CLOCK, 14); } static gn_error NK7110_SetAlarm(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x6b, 0x01, 0x20, 0x03, 0x02, /* should be alarm on/off */ 0x00, 0x00, /* hours, minutes */ 0x00}; if (!data->alarm) return GN_ERR_INTERNALERROR; if (data->alarm->enabled) { req[7] = NK7110_ALARM_ENABLED; req[8] = data->alarm->timestamp.hour; req[9] = data->alarm->timestamp.minute; } else { req[7] = NK7110_ALARM_DISABLED; } SEND_MESSAGE_BLOCK(NK7110_MSG_CLOCK, 11); } /**********************************/ /*********** CALENDAR *************/ /**********************************/ static gn_error NK7110_IncomingCalendar(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { gn_error e = GN_ERR_NONE; int i; if (!data || !data->calnote) return GN_ERR_INTERNALERROR; switch (message[3]) { case NK7110_SUBCAL_NOTE_RCVD: calnote_decode(message, length, data); break; case NK7110_SUBCAL_INFO_RCVD: if (!data->calnote_list) return GN_ERR_INTERNALERROR; dprintf("Calendar Notes Info received! %i\n", message[4] * 256 + message[5]); data->calnote_list->number = message[4] * 256 + message[5]; dprintf("Location of Notes: "); for (i = 0; i < data->calnote_list->number; i++) { if (8 + 2 * i >= length) break; data->calnote_list->location[data->calnote_list->last+i] = message[8 + 2 * i] * 256 + message[9 + 2 * i]; dprintf("%i ", data->calnote_list->location[data->calnote_list->last+i]); } data->calnote_list->last += i; dprintf("\n"); break; case NK7110_SUBCAL_FREEPOS_RCVD: dprintf("First free position received: %i!\n", message[4] * 256 + message[5]); data->calnote->location = (((unsigned int)message[4]) << 8) + message[5]; break; case NK7110_SUBCAL_DEL_NOTE_RESP: dprintf("Succesfully deleted calendar note: %i!\n", message[4] * 256 + message[5]); for (i = 0; i < length; i++) dprintf("%02x ", message[i]); dprintf("\n"); break; case NK7110_SUBCAL_ADD_MEETING_RESP: case NK7110_SUBCAL_ADD_CALL_RESP: case NK7110_SUBCAL_ADD_BIRTHDAY_RESP: case NK7110_SUBCAL_ADD_REMINDER_RESP: if (message[6]) e = GN_ERR_FAILED; dprintf("Attempt to write calendar note at %i. Status: %i\n", (message[4] << 8) | message[5], 1 - message[6]); break; default: dprintf("Unknown subtype of type 0x%02x (calendar handling): 0x%02x\n", NK7110_MSG_CALENDAR, message[3]); e = GN_ERR_UNHANDLEDFRAME; break; } return e; } long NK7110_GetNoteAlarmDiff(gn_timestamp *time, gn_timestamp *alarm) { time_t t_alarm; time_t t_time; struct tm tm_alarm; struct tm tm_time; tzset(); tm_alarm.tm_year = alarm->year-1900; tm_alarm.tm_mon = alarm->month-1; tm_alarm.tm_mday = alarm->day; tm_alarm.tm_hour = alarm->hour; tm_alarm.tm_min = alarm->minute; tm_alarm.tm_sec = alarm->second; tm_alarm.tm_isdst = 0; t_alarm = mktime(&tm_alarm); tm_time.tm_year = time->year-1900; tm_time.tm_mon = time->month-1; tm_time.tm_mday = time->day; tm_time.tm_hour = time->hour; tm_time.tm_min = time->minute; tm_time.tm_sec = time->second; tm_time.tm_isdst = 0; t_time = mktime(&tm_time); dprintf("\tAlarm: %02i-%02i-%04i %02i:%02i:%02i\n", alarm->day, alarm->month, alarm->year, alarm->hour, alarm->minute, alarm->second); dprintf("\tDate: %02i-%02i-%04i %02i:%02i:%02i\n", time->day, time->month, time->year, time->hour, time->minute, time->second); dprintf("Difference in alarm time is %f\n", difftime(t_time, t_alarm) + 3600); return difftime(t_time, t_alarm) + 3600; } static gn_error NK7110_FirstCalendarFreePos(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = { FBUS_FRAME_HEADER, 0x31 }; SEND_MESSAGE_BLOCK(NK7110_MSG_CALENDAR, 4); } static gn_error NK7110_WriteCalendarNote(gn_data *data, struct gn_statemachine *state) { unsigned char req[512] = { FBUS_FRAME_HEADER, 0x01, /* note type ... */ 0x00, 0x00, /* location */ 0x00, /* entry type */ 0x00, /* fixed */ 0x00, 0x00, 0x00, 0x00, /* year(2bytes), month, day */ /* here starts block */ 0x00, 0x00, 0x00, 0x00,0x00, 0x00}; /* ... depends on note type ... */ gn_calnote *calnote; int count = 0; long seconds, minutes; int len = 0; gn_error error; if (!data->calnote) return GN_ERR_INTERNALERROR; calnote = data->calnote; /* 6210/7110 needs to seek the first free pos to inhabit with next note */ error = NK7110_FirstCalendarFreePos(data, state); if (error != GN_ERR_NONE) return error; /* Location */ req[4] = calnote->location >> 8; req[5] = calnote->location & 0xff; dprintf("Location: %d\n", calnote->location); switch (calnote->type) { case GN_CALNOTE_MEETING: dprintf("Type: meeting\n"); req[6] = 0x01; req[3] = 0x01; break; case GN_CALNOTE_CALL: dprintf("Type: call\n"); req[6] = 0x02; req[3] = 0x03; break; case GN_CALNOTE_BIRTHDAY: dprintf("Type: birthday\n"); req[6] = 0x04; req[3] = 0x05; break; case GN_CALNOTE_REMINDER: dprintf("Type: reminder\n"); req[6] = 0x08; req[3] = 0x07; break; default: return GN_ERR_NOTIMPLEMENTED; } req[8] = calnote->time.year >> 8; req[9] = calnote->time.year & 0xff; req[10] = calnote->time.month; req[11] = calnote->time.day; /* From here starts BLOCK */ count = 12; switch (calnote->type) { case GN_CALNOTE_MEETING: req[count++] = calnote->time.hour; /* Field 12 */ req[count++] = calnote->time.minute; /* Field 13 */ /* Alarm .. */ req[count++] = 0xff; /* Field 14 */ req[count++] = 0xff; /* Field 15 */ if (calnote->alarm.timestamp.year) { seconds = NK7110_GetNoteAlarmDiff(&calnote->time, &calnote->alarm.timestamp); if (seconds >= 0L) { /* Otherwise it's an error condition.... */ minutes = seconds / 60L; count -= 2; req[count++] = minutes >> 8; req[count++] = minutes & 0xff; } } /* Recurrence */ if (calnote->recurrence >= 8760) calnote->recurrence = 0xffff; /* setting 1 year repeat */ req[count++] = calnote->recurrence >> 8; /* Field 16 */ req[count++] = calnote->recurrence & 0xff; /* Field 17 */ /* len of the text */ req[count++] = strlen(calnote->text); /* Field 18 */ /* fixed 0x00 */ req[count++] = 0x00; /* Field 19 */ /* Text */ dprintf("Count before encode = %d\n", count); dprintf("Meeting Text is = \"%s\"\n", calnote->text); len = char_unicode_encode(req + count, calnote->text, strlen(calnote->text)); /* Fields 20->N */ count += len; break; case GN_CALNOTE_CALL: req[count++] = calnote->time.hour; /* Field 12 */ req[count++] = calnote->time.minute; /* Field 13 */ /* Alarm .. */ req[count++] = 0xff; /* Field 14 */ req[count++] = 0xff; /* Field 15 */ if (calnote->alarm.timestamp.year) { seconds = NK7110_GetNoteAlarmDiff(&calnote->time, &calnote->alarm.timestamp); if (seconds >= 0L) { /* Otherwise it's an error condition.... */ minutes = seconds / 60L; count -= 2; req[count++] = minutes >> 8; req[count++] = minutes & 0xff; } } /* Recurrence */ if (calnote->recurrence >= 8760) calnote->recurrence = 0xffff; /* setting 1 year repeat */ req[count++] = calnote->recurrence >> 8; /* Field 16 */ req[count++] = calnote->recurrence & 0xff; /* Field 17 */ /* len of text */ req[count++] = strlen(calnote->text); /* Field 18 */ /* fixed 0x00 */ req[count++] = strlen(calnote->phone_number); /* Field 19 */ /* Text */ len = char_unicode_encode(req + count, calnote->text, strlen(calnote->text)); /* Fields 20->N */ count += len; len = char_unicode_encode(req + count, calnote->phone_number, strlen(calnote->phone_number)); /* Fields (N+1)->n */ count += len; break; case GN_CALNOTE_BIRTHDAY: req[count++] = 0x00; /* Field 12 Fixed */ req[count++] = 0x00; /* Field 13 Fixed */ /* Alarm .. */ req[count++] = 0x00; req[count++] = 0x00; /* Fields 14, 15 */ req[count++] = 0xff; /* Field 16 */ req[count++] = 0xff; /* Field 17 */ if (calnote->alarm.timestamp.year) { /* First I try time.year = alarm.year. If negative, I increase year by one, but only once! This is because I may have alarm period across the year border, eg. birthday on 2001-01-10 and alarm on 2000-12-27 */ calnote->time.year = calnote->alarm.timestamp.year; if ((seconds= NK7110_GetNoteAlarmDiff(&calnote->time, &calnote->alarm.timestamp)) < 0L) { calnote->time.year++; seconds = NK7110_GetNoteAlarmDiff(&calnote->time, &calnote->alarm.timestamp); } if (seconds >= 0L) { /* Otherwise it's an error condition.... */ count -= 4; req[count++] = seconds >> 24; /* Field 14 */ req[count++] = (seconds >> 16) & 0xff; /* Field 15 */ req[count++] = (seconds >> 8) & 0xff; /* Field 16 */ req[count++] = seconds & 0xff; /* Field 17 */ } } req[count++] = 0x00; /* FIXME: calnote->AlarmType; 0x00 tone, 0x01 silent 18 */ /* len of text */ req[count++] = strlen(calnote->text); /* Field 19 */ /* Text */ dprintf("Count before encode = %d\n", count); len = char_unicode_encode(req + count, calnote->text, strlen(calnote->text)); /* Fields 22->N */ count += len; break; case GN_CALNOTE_REMINDER: /* Recurrence */ if (calnote->recurrence >= 8760) calnote->recurrence = 0xffff; /* setting 1 year repeat */ req[count++] = calnote->recurrence >> 8; /* Field 12 */ req[count++] = calnote->recurrence & 0xff; /* Field 13 */ /* len of text */ req[count++] = strlen(calnote->text); /* Field 14 */ /* fixed 0x00 */ req[count++] = 0x00; /* Field 15 */ dprintf("Count before encode = %d\n", count); dprintf("Reminder Text is = \"%s\"\n", calnote->text); /* Text */ len = char_unicode_encode(req + count, calnote->text, strlen(calnote->text)); /* Fields 16->N */ count += len; break; default: return GN_ERR_NOTIMPLEMENTED; } /* padding */ req[count] = 0x00; dprintf("Count after padding = %d\n", count); SEND_MESSAGE_BLOCK(NK7110_MSG_CALENDAR, count); } #define LAST_INDEX (data->calnote_list->last > 0 ? data->calnote_list->last - 1 : 0) static gn_error NK7110_GetCalendarNotesInfo(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, NK7110_SUBCAL_GET_INFO, 0xff, 0xfe}; gn_error error; /* Some magic: we need to set req[4-5] to {0xff, 0xfe} with the first loop */ data->calnote_list->location[0] = 0xff * 256 + 0xfe; /* Be sure it is 0 */ data->calnote_list->last = 0; do { dprintf("Read %d of %d calendar entries\n", data->calnote_list->last, data->calnote_list->number); req[4] = data->calnote_list->location[LAST_INDEX] / 256; req[5] = data->calnote_list->location[LAST_INDEX] % 256; if (sm_message_send(6, NK7110_MSG_CALENDAR, req, state)) return GN_ERR_NOTREADY; error = sm_block(NK7110_MSG_CALENDAR, data, state); if (error != GN_ERR_NONE) return error; } while (data->calnote_list->last < data->calnote_list->number); return error; } #undef LAST_INDEX static gn_error NK7110_GetCalendarNote(gn_data *data, struct gn_statemachine *state) { gn_error error = GN_ERR_NOTREADY; unsigned char req[] = {FBUS_FRAME_HEADER, NK7110_SUBCAL_GET_NOTE, 0x00, 0x00}; unsigned char date[] = {FBUS_FRAME_HEADER, NK7110_SUBCLO_GET_DATE}; gn_data tmpdata; gn_timestamp tmptime; gn_calnote_list list; dprintf("Getting calendar note...\n"); if (data->calnote->location < 1) { error = GN_ERR_INVALIDLOCATION; } else { data->calnote_list = &list; tmpdata.datetime = &tmptime; error = NK7110_GetCalendarNotesInfo(data, state); if (error == GN_ERR_NONE) { if (!data->calnote_list->number || data->calnote->location > data->calnote_list->number) { error = GN_ERR_EMPTYLOCATION; } else { error = sm_message_send(4, NK7110_MSG_CLOCK, date, state); if (error == GN_ERR_NONE) { sm_block(NK7110_MSG_CLOCK, &tmpdata, state); req[4] = data->calnote_list->location[data->calnote->location - 1] >> 8; req[5] = data->calnote_list->location[data->calnote->location - 1] & 0xff; data->calnote->time.year = tmptime.year; error = sm_message_send(6, NK7110_MSG_CALENDAR, req, state); if (error == GN_ERR_NONE) { error = sm_block(NK7110_MSG_CALENDAR, data, state); } } } } } return error; } static gn_error NK7110_DeleteCalendarNote(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = { FBUS_FRAME_HEADER, 0x0b, /* delete calendar note */ 0x00, 0x00}; /*location */ gn_calnote_list list; bool own_list = true; if (data->calnote_list) own_list = false; else { memset(&list, 0, sizeof(gn_calnote_list)); data->calnote_list = &list; } if (data->calnote_list->number == 0) NK7110_GetCalendarNotesInfo(data, state); if (data->calnote->location < data->calnote_list->number + 1 && data->calnote->location > 0) { req[4] = data->calnote_list->location[data->calnote->location - 1] >> 8; req[5] = data->calnote_list->location[data->calnote->location - 1] & 0xff; } else { return GN_ERR_INVALIDLOCATION; } if (own_list) data->calnote_list = NULL; SEND_MESSAGE_BLOCK(NK7110_MSG_CALENDAR, 6); } #if 0 static gn_error NK7110_DialVoice(char *Number) { /* Doesn't work (yet) */ /* 3 2 1 5 2 30 35 */ unsigned char req0[100] = { 0x00, 0x01, 0x64, 0x01 }; unsigned char req[] = {FBUS_FRAME_HEADER, 0x01, 0x01, 0x01, 0x01, 0x05, 0x00, 0x01, 0x03, 0x02, 0x91, 0x00, 0x031, 0x32, 0x00}; /* unsigned char req[100]={0x00, 0x01, 0x7c, 0x01, 0x31, 0x37, 0x30, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01}; unsigned char req[100] = {FBUS_FRAME_HEADER, 0x01, 0x00, 0x20, 0x01, 0x46}; unsigned char req_end[] = {0x05, 0x01, 0x01, 0x05, 0x81, 0x01, 0x00, 0x00, 0x01}; */ int len = 0; req[4] = strlen(Number); for(i = 0; i < strlen(Number); i++) req[5+i] = Number[i]; memcpy(req + 5 + strlen(Number), req_end, 10); len = 6 + strlen(Number); len = 4; PGEN_CommandResponse(&link, req0, &len, 0x40, 0x40, 100); len = 17; if (PGEN_CommandResponse(&link, req, &len, 0x01, 0x01, 100) == GN_ERR_NONE) return GN_ERR_NONE; else return GN_ERR_NOTIMPLEMENTED; while(1) link.Loop(NULL); return GN_ERR_NOTIMPLEMENTED; } #endif /*****************************/ /********* STARTUP ***********/ /*****************************/ static gn_error NK7110_IncomingStartup(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { /* 01 13 00 ed 1c 00 39 35 32 37 32 00 01 13 00 ed 15 00 00 00 00 04 c0 02 00 3c c0 03 */ switch (message[4]) { case 0x02: dprintf("Startup logo set ok\n"); return GN_ERR_NONE; break; case 0x15: if (data->bitmap) { /* I'm sure there are blocks here but never mind! */ data->bitmap->type = GN_BMP_StartupLogo; data->bitmap->height = message[13]; data->bitmap->width = message[17]; data->bitmap->size = ((data->bitmap->height / 8) + (data->bitmap->height % 8 > 0)) * data->bitmap->width; /* Can't see this coded anywhere */ memcpy(data->bitmap->bitmap, message + 22, data->bitmap->size); dprintf("Startup logo got ok - height(%d) width(%d)\n", data->bitmap->height, data->bitmap->width); } return GN_ERR_NONE; break; case 0x1c: dprintf("Succesfully got security code: "); memcpy(data->security_code->code, message + 6, 5); dprintf("%s \n", data->security_code->code); return GN_ERR_NONE; break; default: dprintf("Unknown subtype of type 0x7a (%d)\n", message[3]); return GN_ERR_UNHANDLEDFRAME; break; } } static gn_error GetStartupBitmap(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0xee, 0x15}; dprintf("Getting startup logo...\n"); SEND_MESSAGE_BLOCK(NK7110_MSG_STLOGO, 5); } static gn_error NK7110_GetSecurityCode(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0xEE, 0x1c}; /* SecurityCode */ SEND_MESSAGE_BLOCK(NK7110_MSG_STLOGO, 5); } static gn_error SetStartupBitmap(gn_data *data, struct gn_statemachine *state) { unsigned char req[1000] = {FBUS_FRAME_HEADER, 0xec, 0x15, 0x00, 0x00, 0x00, 0x04, 0xc0, 0x02, 0x00, 0x00, /* Height */ 0xc0, 0x03, 0x00, 0x00, /* Width */ 0xc0, 0x04, 0x03, 0x00 }; int count = 21; if ((data->bitmap->width != state->driver.phone.startup_logo_width) || (data->bitmap->height != state->driver.phone.startup_logo_height)) { dprintf("Invalid image size - expecting (%dx%d) got (%dx%d)\n", state->driver.phone.startup_logo_height, state->driver.phone.startup_logo_width, data->bitmap->height, data->bitmap->width); return GN_ERR_INVALIDSIZE; } req[12] = data->bitmap->height; req[16] = data->bitmap->width; memcpy(req + count, data->bitmap->bitmap, data->bitmap->size); count += data->bitmap->size; dprintf("Setting startup logo...\n"); SEND_MESSAGE_BLOCK(NK7110_MSG_STLOGO, count); } /*****************************/ /********* SECURITY **********/ /*****************************/ static gn_error NK7110_IncomingSecurity(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { switch(message[2]) { default: dprintf("Unknown security command\n"); return pnok_security_incoming(messagetype, message, length, data, state); } return GN_ERR_NONE; } /*****************/ /****** WAP ******/ /*****************/ static gn_error NK7110_IncomingWAP(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { int string_length, pos; switch (message[3]) { case 0x02: case 0x05: case 0x08: case 0x0b: case 0x0e: case 0x11: case 0x14: case 0x17: case 0x1a: case 0x20: switch (message[4]) { case 0x00: dprintf("WAP not activated?\n"); return GN_ERR_UNKNOWN; case 0x01: dprintf("Security error. Inside WAP bookmarks menu\n"); return GN_ERR_UNKNOWN; case 0x02: dprintf("Invalid or empty\n"); return GN_ERR_INVALIDLOCATION; default: dprintf("ERROR: unknown %i\n",message[4]); return GN_ERR_UNHANDLEDFRAME; } break; case 0x01: case 0x04: case 0x10: break; case 0x07: if (!data->wap_bookmark) return GN_ERR_INTERNALERROR; dprintf("WAP bookmark received\n"); string_length = message[6] << 1; char_unicode_decode(data->wap_bookmark->name, message + 7, string_length); dprintf("Name: %s\n", data->wap_bookmark->name); pos = string_length + 7; string_length = message[pos++] << 1; char_unicode_decode(data->wap_bookmark->URL, message + pos, string_length); dprintf("URL: %s\n", data->wap_bookmark->URL); break; case 0x0a: dprintf("WAP bookmark successfully set!\n"); data->wap_bookmark->location = message[5]; break; case 0x0d: dprintf("WAP bookmark successfully deleted!\n"); break; case 0x13: dprintf("WAP setting successfully activated!\n"); break; case 0x16: if (!data->wap_setting) return GN_ERR_INTERNALERROR; dprintf("WAP setting received\n"); /* If ReadBeforeWrite is set we only want the successors */ string_length = message[4] << 1; if (!data->wap_setting->read_before_write) char_unicode_decode(data->wap_setting->name, message + 5, string_length); dprintf("Name: %s\n", data->wap_setting->name); pos = string_length + 5; string_length = message[pos++] << 1; if (!data->wap_setting->read_before_write) char_unicode_decode(data->wap_setting->home, message + pos, string_length); dprintf("Home: %s\n", data->wap_setting->home); pos += string_length; if (!data->wap_setting->read_before_write) { data->wap_setting->session = message[pos++]; switch (message[pos]) { case 0x06: data->wap_setting->bearer = GN_WAP_BEARER_GSMDATA; break; case 0x07: data->wap_setting->bearer = GN_WAP_BEARER_SMS; break; default: data->wap_setting->bearer = GN_WAP_BEARER_USSD; break; } if (message[pos + 12] == 0x01) data->wap_setting->security = true; else data->wap_setting->security = false; } else pos ++; data->wap_setting->successors[0] = message[pos + 2]; data->wap_setting->successors[1] = message[pos + 3]; data->wap_setting->successors[2] = message[pos + 8]; data->wap_setting->successors[3] = message[pos + 9]; break; case 0x1c: switch (message[5]) { case 0x00: dprintf("SMS:\n"); pos = 6; string_length = message[pos++] << 1; char_unicode_decode(data->wap_setting->sms_service_number, message + pos, string_length); dprintf(" Service number: %s\n", data->wap_setting->sms_service_number); pos += string_length; string_length = message[pos++] << 1; char_unicode_decode(data->wap_setting->sms_server_number, message + pos, string_length); dprintf(" Server number: %s\n", data->wap_setting->sms_server_number); pos += string_length; break; case 0x01: dprintf("GSM data:\n"); pos = 6; data->wap_setting->gsm_data_authentication = message[pos++]; data->wap_setting->call_type = message[pos++]; data->wap_setting->call_speed = message[pos++]; pos++; string_length = message[pos++] << 1; char_unicode_decode(data->wap_setting->gsm_data_ip, message + pos, string_length); dprintf(" IP: %s\n", data->wap_setting->gsm_data_ip); pos += string_length; string_length = message[pos++] << 1; char_unicode_decode(data->wap_setting->number, message + pos, string_length); dprintf(" Number: %s\n", data->wap_setting->number); pos += string_length; string_length = message[pos++] << 1; char_unicode_decode(data->wap_setting->gsm_data_username, message + pos, string_length); dprintf(" Username: %s\n", data->wap_setting->gsm_data_username); pos += string_length; string_length = message[pos++] << 1; char_unicode_decode(data->wap_setting->gsm_data_password, message + pos, string_length); dprintf(" Password: %s\n", data->wap_setting->gsm_data_password); pos += string_length; break; default: break; } break; case 0x1f: case 0x19: dprintf("WAP setting successfully written!\n"); break; default: dprintf("Unknown subtype of type 0x3f (%d)\n", message[3]); return GN_ERR_UNHANDLEDFRAME; break; } return GN_ERR_NONE; } static gn_error SendWAPFrame(gn_data *data, struct gn_statemachine *state, int frame) { unsigned char req[] = { FBUS_FRAME_HEADER, 0x00 }; dprintf("Sending WAP frame\n"); req[3] = frame; SEND_MESSAGE_BLOCK(NK7110_MSG_WAP, 4); } static gn_error PrepareWAP(gn_data *data, struct gn_statemachine *state) { dprintf("Preparing WAP\n"); return SendWAPFrame(data, state, 0x00); } static gn_error FinishWAP(gn_data *data, struct gn_statemachine *state) { gn_error error; dprintf("Finishing WAP\n"); error = SendWAPFrame(data, state, 0x03); if (error != GN_ERR_NONE) return error; error = SendWAPFrame(data, state, 0x00); if (error != GN_ERR_NONE) return error; error = SendWAPFrame(data, state, 0x0f); if (error != GN_ERR_NONE) return error; return SendWAPFrame(data, state, 0x03); } static int PackWAPString(unsigned char *dest, unsigned char *string, int length_size) { int length; length = strlen(string); if (length_size == 2) { dest[0] = length / 256; dest[1] = length % 256; } else { dest[0] = length % 256; } length = char_unicode_encode(dest + length_size, string, length); return length + length_size; } static gn_error NK7110_WriteWAPSetting(gn_data *data, struct gn_statemachine *state) { unsigned char req[200] = { FBUS_FRAME_HEADER, 0x18, 0x00 }; /* Location */ unsigned char req1[200] = { FBUS_FRAME_HEADER, 0x1e, 0x00 }; /* Location */ unsigned char req2[] = { FBUS_FRAME_HEADER, 0x15, 0x00 }; /* Location */ gn_error error; int i = 0, pos = 5; dprintf("Writing WAP setting\n"); memset(req + pos, 0, 200 - pos); req[4] = data->wap_setting->location; if (PrepareWAP(data, state) != GN_ERR_NONE) { SendWAPFrame(data, state, 0x03); if ((error = PrepareWAP(data, state))) return error; } /* First we need to get WAP setting from the location we want to write to because we need wap_setting->successors */ req2[4] = data->wap_setting->location; data->wap_setting->read_before_write = true; if (sm_message_send(5, NK7110_MSG_WAP, req2, state)) return GN_ERR_NOTREADY; error = sm_block(NK7110_MSG_WAP, data, state); if (error != GN_ERR_NONE) return error; /* Name */ pos += PackWAPString(req + pos, data->wap_setting->name, 1); /* Home */ pos += PackWAPString(req + pos, data->wap_setting->home, 1); req[pos++] = data->wap_setting->session; req[pos++] = data->wap_setting->bearer; req[pos++] = 0x0a; if (data->wap_setting->security) req[pos] = 0x01; pos++; memcpy(req + pos, "\x00\x80\x00\x00\x00\x00\x00\x00\x00", 9); pos += 9; if (sm_message_send(pos, NK7110_MSG_WAP, req, state)) return GN_ERR_NOTREADY; error = sm_block(NK7110_MSG_WAP, data, state); if (error) return error; for (i = 0; i < 4; i++) { pos = 4; memset(req1 + pos, 0, 200 - pos); if (i == 0 || i== 2) { /* SMS/USSD */ req1[pos++] = data->wap_setting->successors[i]; req1[pos++] = 0x02; req1[pos++] = 0x00; /* SMS */ /* SMS Service */ pos += PackWAPString(req1 + pos, data->wap_setting->sms_service_number, 1); /* SMS Server */ pos += PackWAPString(req1 + pos, data->wap_setting->sms_server_number, 1); } else { /* GSMdata */ req1[pos++] = data->wap_setting->successors[i]; req1[pos++] = 0x02; req1[pos++] = 0x01; /* GSMdata */ req1[pos++] = data->wap_setting->gsm_data_authentication; req1[pos++] = data->wap_setting->call_type; req1[pos++] = data->wap_setting->call_speed; req1[pos++] = 0x01; /* IP */ pos += PackWAPString(req1 + pos, data->wap_setting->gsm_data_ip, 1); /* Number */ pos += PackWAPString(req1 + pos, data->wap_setting->number, 1); /* Username */ pos += PackWAPString(req1 + pos, data->wap_setting->gsm_data_username, 1); /* Password */ pos += PackWAPString(req1 + pos, data->wap_setting->gsm_data_password, 1); } memcpy(req1 + pos, "\x80\x00\x00\x00\x00\x00\x00\x00", 8); pos += 8; if (sm_message_send(pos, NK7110_MSG_WAP, req1, state)) return GN_ERR_NOTREADY; error = sm_block(NK7110_MSG_WAP, data, state); if (error) return error; } return FinishWAP(data, state); } static gn_error NK7110_DeleteWAPBookmark(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = { FBUS_FRAME_HEADER, 0x0C, 0x00, 0x00}; /* Location */ gn_error error; dprintf("Deleting WAP bookmark\n"); req[5] = data->wap_bookmark->location + 1; if (PrepareWAP(data, state) != GN_ERR_NONE) { FinishWAP(data, state); if ((error = PrepareWAP(data, state))) return error; } if (sm_message_send(6, NK7110_MSG_WAP, req, state)) return GN_ERR_NOTREADY; error = sm_block(NK7110_MSG_WAP, data, state); if (error) return error; return FinishWAP(data, state); } static gn_error NK7110_GetWAPBookmark(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = { FBUS_FRAME_HEADER, 0x06, 0x00, 0x00}; /* Location */ gn_error error; dprintf("Getting WAP bookmark\n"); req[5] = data->wap_bookmark->location; if (PrepareWAP(data, state) != GN_ERR_NONE) { FinishWAP(data, state); if ((error = PrepareWAP(data, state))) return error; } if (sm_message_send(6, NK7110_MSG_WAP, req, state)) return GN_ERR_NOTREADY; error = sm_block(NK7110_MSG_WAP, data, state); if (error) return error; return FinishWAP(data, state); } static gn_error NK7110_WriteWAPBookmark(gn_data *data, struct gn_statemachine *state) { unsigned char req[350] = { FBUS_FRAME_HEADER, 0x09, 0xFF, 0xFF}; /* Location */ gn_error error; int pos = 6; dprintf("Writing WAP bookmark\n"); if (PrepareWAP(data, state) != GN_ERR_NONE) { FinishWAP(data, state); if ((error = PrepareWAP(data, state))) return error; } pos += PackWAPString(req + pos, data->wap_bookmark->name, 1); pos += PackWAPString(req + pos, data->wap_bookmark->URL, 1); if (sm_message_send(pos, NK7110_MSG_WAP, req, state)) return GN_ERR_NOTREADY; error = sm_block(NK7110_MSG_WAP, data, state); if (error) return error; return FinishWAP(data, state); } static gn_error NK7110_GetWAPSetting(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = { FBUS_FRAME_HEADER, 0x15, 0x00 }; /* location */ unsigned char req2[] = { FBUS_FRAME_HEADER, 0x1b, 0x00 }; /* location */ gn_error error; int i; dprintf("Getting WAP setting\n"); if (!data->wap_setting) return GN_ERR_INTERNALERROR; req[4] = data->wap_setting->location; memset(data->wap_setting, 0, sizeof(gn_wap_setting)); data->wap_setting->location = req[4]; if (PrepareWAP(data, state) != GN_ERR_NONE) { FinishWAP(data, state); if ((error = PrepareWAP(data, state))) return error; } if (sm_message_send(5, NK7110_MSG_WAP, req, state)) return GN_ERR_NOTREADY; error = sm_block(NK7110_MSG_WAP, data, state); if (error) return error; for (i = 0; i < 4; i++) { req2[4] = data->wap_setting->successors[i]; if (sm_message_send(5, NK7110_MSG_WAP, req2, state)) return GN_ERR_NOTREADY; error = sm_block(NK7110_MSG_WAP, data, state); if (error) return error; } return FinishWAP(data, state); } static gn_error NK7110_ActivateWAPSetting(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = { FBUS_FRAME_HEADER, 0x12, 0x00 }; /* Location */ gn_error error; dprintf("Activating WAP setting\n"); req[4] = data->wap_setting->location; if (PrepareWAP(data, state) != GN_ERR_NONE) { FinishWAP(data, state); if ((error = PrepareWAP(data, state))) return error; } if (sm_message_send(5, NK7110_MSG_WAP, req, state)) return GN_ERR_NOTREADY; error = sm_block(NK7110_MSG_WAP, data, state); if (error) return error; return FinishWAP(data, state); } /*****************************/ /********** KEYPRESS *********/ /*****************************/ static gn_error NK7110_IncomingKeypress(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { switch(message[2]) { case 0x46: dprintf("Key successfully pressed\n"); break; case 0x47: dprintf("Key successfully released\n"); break; default: dprintf("Unknown keypress command\n"); return GN_ERR_UNHANDLEDFRAME; } return GN_ERR_NONE; } static gn_error NK7110_PressKey(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {0x00, 0x01, 0x46, 0x00, 0x01, 0x0a}; /* keycode */ dprintf("Pressing key...\n"); req[5] = data->key_code; if (sm_message_send(6, NK7110_MSG_KEYPRESS, req, state)) return GN_ERR_NOTREADY; return sm_block(NK7110_MSG_KEYPRESS_RESP, data, state); } static gn_error NK7110_ReleaseKey(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {0x00, 0x01, 0x47, 0x00, 0x01, 0x0c}; dprintf("Releasing key...\n"); if (sm_message_send(6, NK7110_MSG_KEYPRESS, req, state)) return GN_ERR_NOTREADY; return sm_block(NK7110_MSG_KEYPRESS_RESP, data, state); } static gn_error NK7110_PressOrReleaseKey(gn_data *data, struct gn_statemachine *state, bool press) { if (press) return NK7110_PressKey(data, state); else return NK7110_ReleaseKey(data, state); } /*****************************/ /********** PROFILE **********/ /*****************************/ static gn_error NK7110_IncomingProfile(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { switch (message[3]) { case 0x02: if (!data->profile) return GN_ERR_INTERNALERROR; switch (message[6]) { case 0xff: char_unicode_decode(data->profile->name, message + 10, message[9]); data->profile->default_name = -1; //!!!FIXME break; case 0x00: data->profile->keypad_tone = (unsigned char)(message[10] - 1); break; case 0x01: //!!!FIXME data->profile->lights = message[10]; break; case 0x02: switch (message[10]) { case 0x00: data->profile->call_alert = GN_PROFILE_CALLALERT_Ringing; break; case 0x01: data->profile->call_alert = GN_PROFILE_CALLALERT_Ascending; break; case 0x02: data->profile->call_alert = GN_PROFILE_CALLALERT_RingOnce; break; case 0x03: data->profile->call_alert = GN_PROFILE_CALLALERT_BeepOnce; break; case 0x04: data->profile->call_alert = GN_PROFILE_CALLALERT_CallerGroups; break; case 0x05: data->profile->call_alert = GN_PROFILE_CALLALERT_Off; break; default: return GN_ERR_UNHANDLEDFRAME; break; } break; case 0x03: //!!!FIXME: check it! data->profile->ringtone = message[10]; break; case 0x04: data->profile->volume = message[10] + 6; break; case 0x05: data->profile->message_tone = message[10]; break; case 0x06: data->profile->vibration = message[10]; break; case 0x07: data->profile->warning_tone = message[10] ? GN_PROFILE_WARNING_On : GN_PROFILE_WARNING_Off; break; case 0x08: data->profile->caller_groups = message[10]; break; case 0x09: data->profile->automatic_answer = message[10]; break; default: return GN_ERR_UNHANDLEDFRAME; break; } break; default: dprintf("Unknown subtype of type 0x39 (%d)\n", message[3]); return GN_ERR_UNHANDLEDFRAME; break; } return GN_ERR_NONE; } static gn_error NK7110_GetProfile(gn_data *data, struct gn_statemachine *state) { char req[] = {FBUS_FRAME_HEADER, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00}; unsigned char i; gn_error err; if (!data->profile) return GN_ERR_INTERNALERROR; req[7] = data->profile->number + 1; for (i = 0xff; i != 0x0a; i++) { req[8] = i; if (sm_message_send(9, NK7110_MSG_PROFILE, req, state)) return GN_ERR_NOTREADY; if ((err = sm_block(NK7110_MSG_PROFILE, data, state)) != GN_ERR_NONE) return err; } return GN_ERR_NONE; } static gn_error NK7110_SetProfileFeature(gn_data *data, struct gn_statemachine *state, int id, unsigned char value) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x03, 0x01, 0x01, 0x03, 0x00, 0x00, 0x01, 0x00}; if (!data->profile) return GN_ERR_INTERNALERROR; req[7] = id; req[8] = data->profile->number; req[10] = value; if (sm_message_send(11, NK7110_MSG_PROFILE, req, state)) return GN_ERR_NOTREADY; return sm_block(NK7110_MSG_PROFILE, data, state); } static gn_error NK7110_SetProfile(gn_data *data, struct gn_statemachine *state) { gn_profile *p; gn_error err; if (!(p = data->profile)) return GN_ERR_INTERNALERROR; dprintf("Setting profile %d (%s)\n", p->number, p->name); if (p->default_name < 0 ) { /* FIXME: set profile name */ } if ((err = NK7110_SetProfileFeature(data, state, 0x00, p->keypad_tone + 1)) != GN_ERR_NONE) return err; if ((err = NK7110_SetProfileFeature(data, state, 0x01, p->lights)) != GN_ERR_NONE) return err; switch (p->call_alert) { case GN_PROFILE_CALLALERT_Ringing: err = NK7110_SetProfileFeature(data, state, 0x02, 0x00); break; case GN_PROFILE_CALLALERT_Ascending: err = NK7110_SetProfileFeature(data, state, 0x02, 0x01); break; case GN_PROFILE_CALLALERT_RingOnce: err = NK7110_SetProfileFeature(data, state, 0x02, 0x02); break; case GN_PROFILE_CALLALERT_BeepOnce: err = NK7110_SetProfileFeature(data, state, 0x02, 0x03); break; case GN_PROFILE_CALLALERT_CallerGroups: err = NK7110_SetProfileFeature(data, state, 0x02, 0x04); break; case GN_PROFILE_CALLALERT_Off: err = NK7110_SetProfileFeature(data, state, 0x02, 0x05); break; default: return GN_ERR_UNKNOWN; } if (err != GN_ERR_NONE) return err; if ((err = NK7110_SetProfileFeature(data, state, 0x03, p->ringtone)) != GN_ERR_NONE) return err; if ((err = NK7110_SetProfileFeature(data, state, 0x04, p->volume - 6)) != GN_ERR_NONE) return err; if ((err = NK7110_SetProfileFeature(data, state, 0x05, p->message_tone)) != GN_ERR_NONE) return err; if ((err = NK7110_SetProfileFeature(data, state, 0x06, p->vibration)) != GN_ERR_NONE) return err; switch (p->warning_tone) { case GN_PROFILE_WARNING_Off: err = NK7110_SetProfileFeature(data, state, 0x07, 0x00); break; case GN_PROFILE_WARNING_On: err = NK7110_SetProfileFeature(data, state, 0x07, 0x01); break; default: return GN_ERR_UNKNOWN; } if (err != GN_ERR_NONE) return err; if ((err = NK7110_SetProfileFeature(data, state, 0x08, p->caller_groups)) != GN_ERR_NONE) return err; if ((err = NK7110_SetProfileFeature(data, state, 0x09, p->automatic_answer)) != GN_ERR_NONE) return err; return GN_ERR_NONE; } /*****************************/ /********* RINGTONE **********/ /*****************************/ static gn_error NK7110_IncomingRingtone(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { switch (message[3]) { case 0x23: if (!data->ringtone || !data->raw_data) return GN_ERR_INTERNALERROR; data->ringtone->location = message[5]; char_unicode_decode(data->ringtone->name, message + 6, 2 * 15); if (data->raw_data->length < length - 36) return GN_ERR_MEMORYFULL; if (data->raw_data && data->raw_data->data) { memcpy(data->raw_data->data, message + 36, length - 36); data->raw_data->length = length - 35; } break; case 0x24: return GN_ERR_INVALIDLOCATION; default: return GN_ERR_UNHANDLEDFRAME; } return GN_ERR_NONE; } static gn_error NK7110_GetRawRingtone(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x22, 0x00, 0x00}; if (!data || !data->ringtone || !data->raw_data) return GN_ERR_INTERNALERROR; if (data->ringtone->location < 0) return GN_ERR_INVALIDLOCATION; req[5] = data->ringtone->location; SEND_MESSAGE_BLOCK(NK7110_MSG_RINGTONE, 6); } static gn_error NK7110_SetRawRingtone(gn_data *data, struct gn_statemachine *state) { unsigned char req[512] = {FBUS_FRAME_HEADER, 0x1f, 0x00, 0x00}; int len; if (!data || !data->ringtone || !data->raw_data || !data->raw_data->data) return GN_ERR_INTERNALERROR; if (sizeof(req) < 36 + data->raw_data->length) return GN_ERR_MEMORYFULL; if (data->ringtone->location < 0) { /* FIXME: search first free location */ data->ringtone->location = DRVINSTANCE(state)->userdef_location; } req[5] = data->ringtone->location; char_unicode_encode(req + 6, data->ringtone->name, strlen(data->ringtone->name)); memcpy(req + 36, data->raw_data->data, data->raw_data->length); len = 36 + data->raw_data->length; if (sm_message_send(len, NK7110_MSG_RINGTONE, req, state)) return GN_ERR_NOTREADY; return sm_block_ack(state); } static gn_error NK7110_GetRingtone(gn_data *data, struct gn_statemachine *state) { gn_data d; gn_error err; gn_raw_data rawdata; char buf[4096]; if (!data->ringtone) return GN_ERR_INTERNALERROR; memset(&rawdata, 0, sizeof(gn_raw_data)); rawdata.data = buf; rawdata.length = sizeof(buf); gn_data_clear(&d); d.ringtone = data->ringtone; d.raw_data = &rawdata; if ((err = NK7110_GetRawRingtone(&d, state)) != GN_ERR_NONE) return err; return pnok_ringtone_from_raw(data->ringtone, rawdata.data, rawdata.length); } static gn_error NK7110_SetRingtone(gn_data *data, struct gn_statemachine *state) { gn_data d; gn_error err; gn_raw_data rawdata; char buf[4096]; if (!data->ringtone) return GN_ERR_INTERNALERROR; memset(&rawdata, 0, sizeof(gn_raw_data)); rawdata.data = buf; rawdata.length = sizeof(buf); gn_data_clear(&d); d.ringtone = data->ringtone; d.raw_data = &rawdata; if ((err = pnok_ringtone_to_raw(rawdata.data, &rawdata.length, data->ringtone, 0)) != GN_ERR_NONE) return err; return NK7110_SetRawRingtone(&d, state); } static gn_error NK7110_GetRingtoneList(gn_data *data, struct gn_statemachine *state) { gn_ringtone_list *rl; gn_ringtone ringtone; gn_data d; int i; #define ADDRINGTONE(id, str) \ rl->ringtone[rl->count].location = (id); \ snprintf(rl->ringtone[rl->count].name, sizeof(rl->ringtone[rl->count].name), "%s", (str)); \ rl->ringtone[rl->count].user_defined = 0; \ rl->ringtone[rl->count].readable = 0; \ rl->ringtone[rl->count].writable = 0; \ rl->count++; if (!(rl = data->ringtone_list)) return GN_ERR_INTERNALERROR; rl->count = 0; rl->userdef_location = DRVINSTANCE(state)->userdef_location; rl->userdef_count = 5; /* tested on 6210 -- bozo */ ADDRINGTONE(65, "Ring ring"); ADDRINGTONE(66, "Low"); ADDRINGTONE(67, "Do-mi-so"); ADDRINGTONE(68, "Bee"); ADDRINGTONE(69, "Cicada"); ADDRINGTONE(70, "Trio"); ADDRINGTONE(71, "Intro"); ADDRINGTONE(72, "Persuasion"); ADDRINGTONE(73, "Attraction"); ADDRINGTONE(74, "Playground"); ADDRINGTONE(75, "Mosquito"); ADDRINGTONE(76, "Circles"); ADDRINGTONE(77, "Nokia tune"); ADDRINGTONE(78, "Sunny walks"); ADDRINGTONE(79, "Samba"); ADDRINGTONE(80, "Basic rock"); ADDRINGTONE(81, "Reveille"); ADDRINGTONE(82, "Groovy Blue"); ADDRINGTONE(83, "Brave Scotland"); ADDRINGTONE(84, "Matilda"); ADDRINGTONE(85, "Bumblebee"); ADDRINGTONE(86, "Menuet"); ADDRINGTONE(87, "Elise"); ADDRINGTONE(88, "William Tell"); ADDRINGTONE(89, "Charleston"); ADDRINGTONE(90, "Fuga"); ADDRINGTONE(91, "Etude"); ADDRINGTONE(92, "Hungarian"); ADDRINGTONE(93, "Valkyrie"); ADDRINGTONE(94, "Badinerie"); ADDRINGTONE(95, "Bach #3"); ADDRINGTONE(96, "Toreador"); ADDRINGTONE(97, "9th Symphony"); ADDRINGTONE(98, "WalzeBrilliant"); memset(&ringtone, 0, sizeof(ringtone)); gn_data_clear(&d); d.ringtone = &ringtone; for (i = 0; i < rl->userdef_count; i++) { ringtone.location = rl->userdef_location + i; if (NK7110_GetRingtone(&d, state) == GN_ERR_NONE) { rl->ringtone[rl->count].location = ringtone.location; snprintf(rl->ringtone[rl->count].name, sizeof(rl->ringtone[rl->count].name), "%s", ringtone.name); rl->ringtone[rl->count].user_defined = 1; rl->ringtone[rl->count].readable = 1; rl->ringtone[rl->count].writable = 1; rl->count++; } } #undef ADDRINGTONE return GN_ERR_NONE; } /*****************************/ /********** OTHERS ***********/ /*****************************/ static gn_error NK7110_GetBitmap(gn_data *data, struct gn_statemachine *state) { switch(data->bitmap->type) { case GN_BMP_CallerLogo: return GetCallerBitmap(data, state); case GN_BMP_StartupLogo: return GetStartupBitmap(data, state); case GN_BMP_OperatorLogo: return GetOperatorBitmap(data, state); default: return GN_ERR_NOTIMPLEMENTED; } } static gn_error NK7110_SetBitmap(gn_data *data, struct gn_statemachine *state) { switch(data->bitmap->type) { case GN_BMP_CallerLogo: return SetCallerBitmap(data, state); case GN_BMP_StartupLogo: return SetStartupBitmap(data, state); case GN_BMP_OperatorLogo: return SetOperatorBitmap(data, state); default: return GN_ERR_NOTIMPLEMENTED; } } static int get_memory_type(gn_memory_type memory_type) { int result; switch (memory_type) { case GN_MT_MT: result = NK7110_MEMORY_MT; break; case GN_MT_ME: result = NK7110_MEMORY_ME; break; case GN_MT_SM: result = NK7110_MEMORY_SM; break; case GN_MT_FD: result = NK7110_MEMORY_FD; break; case GN_MT_ON: result = NK7110_MEMORY_ON; break; case GN_MT_EN: result = NK7110_MEMORY_EN; break; case GN_MT_DC: result = NK7110_MEMORY_DC; break; case GN_MT_RC: result = NK7110_MEMORY_RC; break; case GN_MT_MC: result = NK7110_MEMORY_MC; break; case GN_MT_IN: result = NK7110_MEMORY_IN; break; case GN_MT_OU: result = NK7110_MEMORY_OU; break; case GN_MT_AR: result = NK7110_MEMORY_AR; break; case GN_MT_TE: result = NK7110_MEMORY_TE; break; case GN_MT_F1: result = NK7110_MEMORY_F1; break; case GN_MT_F2: result = NK7110_MEMORY_F2; break; case GN_MT_F3: result = NK7110_MEMORY_F3; break; case GN_MT_F4: result = NK7110_MEMORY_F4; break; case GN_MT_F5: result = NK7110_MEMORY_F5; break; case GN_MT_F6: result = NK7110_MEMORY_F6; break; case GN_MT_F7: result = NK7110_MEMORY_F7; break; case GN_MT_F8: result = NK7110_MEMORY_F8; break; case GN_MT_F9: result = NK7110_MEMORY_F9; break; case GN_MT_F10: result = NK7110_MEMORY_F10; break; case GN_MT_F11: result = NK7110_MEMORY_F11; break; case GN_MT_F12: result = NK7110_MEMORY_F12; break; case GN_MT_F13: result = NK7110_MEMORY_F13; break; case GN_MT_F14: result = NK7110_MEMORY_F14; break; case GN_MT_F15: result = NK7110_MEMORY_F15; break; case GN_MT_F16: result = NK7110_MEMORY_F16; break; case GN_MT_F17: result = NK7110_MEMORY_F17; break; case GN_MT_F18: result = NK7110_MEMORY_F18; break; case GN_MT_F19: result = NK7110_MEMORY_F19; break; case GN_MT_F20: result = NK7110_MEMORY_F20; break; default: result = NK7110_MEMORY_XX; break; } return result; } static gn_memory_type get_gn_memory_type(int memory_type) { int result; switch (memory_type) { case NK7110_MEMORY_MT: result = GN_MT_MT; break; case NK7110_MEMORY_ME: result = GN_MT_ME; break; case NK7110_MEMORY_SM: result = GN_MT_SM; break; case NK7110_MEMORY_FD: result = GN_MT_FD; break; case NK7110_MEMORY_ON: result = GN_MT_ON; break; case NK7110_MEMORY_DC: result = GN_MT_DC; break; case NK7110_MEMORY_RC: result = GN_MT_RC; break; case NK7110_MEMORY_MC: result = GN_MT_MC; break; case NK7110_MEMORY_IN: result = GN_MT_IN; break; case NK7110_MEMORY_OU: result = GN_MT_OU; break; case NK7110_MEMORY_AR: result = GN_MT_AR; break; case NK7110_MEMORY_TE: result = GN_MT_TE; break; case NK7110_MEMORY_F1: result = GN_MT_F1; break; case NK7110_MEMORY_F2: result = GN_MT_F2; break; case NK7110_MEMORY_F3: result = GN_MT_F3; break; case NK7110_MEMORY_F4: result = GN_MT_F4; break; case NK7110_MEMORY_F5: result = GN_MT_F5; break; case NK7110_MEMORY_F6: result = GN_MT_F6; break; case NK7110_MEMORY_F7: result = GN_MT_F7; break; case NK7110_MEMORY_F8: result = GN_MT_F8; break; case NK7110_MEMORY_F9: result = GN_MT_F9; break; case NK7110_MEMORY_F10: result = GN_MT_F10; break; case NK7110_MEMORY_F11: result = GN_MT_F11; break; case NK7110_MEMORY_F12: result = GN_MT_F12; break; case NK7110_MEMORY_F13: result = GN_MT_F13; break; case NK7110_MEMORY_F14: result = GN_MT_F14; break; case NK7110_MEMORY_F15: result = GN_MT_F15; break; case NK7110_MEMORY_F16: result = GN_MT_F16; break; case NK7110_MEMORY_F17: result = GN_MT_F17; break; case NK7110_MEMORY_F18: result = GN_MT_F18; break; case NK7110_MEMORY_F19: result = GN_MT_F19; break; case NK7110_MEMORY_F20: result = GN_MT_F20; break; default: result = GN_MT_XX; break; } return result; } #if 0 static gn_error NBSUpload(gn_data *data, struct gn_statemachine *state, gn_sms_data_type type) { unsigned char req[512] = {0x7c, 0x01, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; gn_sms sms; gn_sms_raw rawsms; gn_error err; int n; gn_sms_default_submit(&sms); sms.user_data[0].type = type; sms.user_data[1].type = GN_SMS_DATA_None; switch (type) { case GN_SMS_DATA_Ringtone: memcpy(&sms.user_data[0].u.ringtone, data->ringtone, sizeof(gn_ringtone)); break; default: return GN_ERR_INTERNALERROR; } memset(&rawsms, 0, sizeof(rawsms)); if ((err = sms_prepare(&sms, &rawsms)) != GN_ERR_NONE) return err; req[10] = rawsms.user_data_length; n = 11 + rawsms.user_data_length; if (n > sizeof(req)) return GN_ERR_INTERNALERROR; memcpy(req + 11, rawsms.user_data, rawsms.user_data_length); return sm_message_send(n, 0x00, req, state); } #endif /*****************************/ /******* COMM STATUS *********/ /*****************************/ static gn_error NK7110_IncomingCommstatus(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { unsigned char *pos; int i; gn_call_active *ca; switch (message[3]) { /* get call status */ case 0x21: if (!data->call_active) return GN_ERR_INTERNALERROR; if (message[5] != 0xff) return GN_ERR_UNHANDLEDFRAME; pos = message + 6; ca = data->call_active; memset(ca, 0x00, 2 * sizeof(gn_call_active)); for (i = 0; i < message[4]; i++) { if (pos[0] != 0x64) return GN_ERR_UNHANDLEDFRAME; ca[i].call_id = pos[2]; ca[i].channel = pos[3]; switch (pos[4]) { case 0x00: ca[i].state = GN_CALL_Idle; break; /* missing number, wait a little */ case 0x02: ca[i].state = GN_CALL_Dialing; break; case 0x03: ca[i].state = GN_CALL_Ringing; break; case 0x04: ca[i].state = GN_CALL_Incoming; break; case 0x05: ca[i].state = GN_CALL_Established; break; case 0x06: ca[i].state = GN_CALL_Held; break; case 0x07: ca[i].state = GN_CALL_RemoteHangup; break; default: return GN_ERR_UNHANDLEDFRAME; } switch (pos[5]) { case 0x00: ca[i].prev_state = GN_CALL_Idle; break; /* missing number, wait a little */ case 0x02: ca[i].prev_state = GN_CALL_Dialing; break; case 0x03: ca[i].prev_state = GN_CALL_Ringing; break; case 0x04: ca[i].prev_state = GN_CALL_Incoming; break; case 0x05: ca[i].prev_state = GN_CALL_Established; break; case 0x06: ca[i].prev_state = GN_CALL_Held; break; case 0x07: ca[i].prev_state = GN_CALL_RemoteHangup; break; default: return GN_ERR_UNHANDLEDFRAME; } char_unicode_decode(ca[i].name, pos + 12, 2 * pos[10]); char_unicode_decode(ca[i].number, pos + 112, 2 * pos[11]); pos += pos[1]; } dprintf("Call status:\n"); for (i = 0; i < 2; i++) { if (ca[i].state == GN_CALL_Idle) continue; dprintf("ch#%d: id#%d st#%d pst#%d %s (%s)\n", ca[i].channel, ca[i].call_id, ca[i].state, ca[i].prev_state, ca[i].number, ca[i].name); } break; /* hangup */ case 0x04: dprintf("Hangup!\n"); dprintf("Call ID: %i\n", message[4]); dprintf("Cause Type: %i\n", message[5]); dprintf("Cause ID: %i\n", message[6]); return GN_ERR_UNKNOWN; default: return GN_ERR_UNHANDLEDFRAME; } return GN_ERR_NONE; } static gn_error NK7110_GetActiveCalls(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x20}; if (!data->call_active) return GN_ERR_INTERNALERROR; if (sm_message_send(4, NK7110_MSG_COMMSTATUS, req, state)) return GN_ERR_NOTREADY; return sm_block(NK7110_MSG_COMMSTATUS, data, state); } static gn_error NK7110_MakeCall(gn_data *data, struct gn_statemachine *state) { unsigned char req[100] = {FBUS_FRAME_HEADER, 0x01}; unsigned char voice_end[] = {0x05, 0x01, 0x05, 0x00, 0x02, 0x00, 0x00, 0x00}; int pos = 4, len; gn_call_active active[2]; gn_data d; if (!data->call_info) return GN_ERR_INTERNALERROR; switch (data->call_info->type) { case GN_CALL_Voice: break; case GN_CALL_NonDigitalData: case GN_CALL_DigitalData: dprintf("Unsupported call type %d\n", data->call_info->type); return GN_ERR_NOTSUPPORTED; default: dprintf("Invalid call type %d\n", data->call_info->type); return GN_ERR_INTERNALERROR; } len = strlen(data->call_info->number); if (len > GN_PHONEBOOK_NUMBER_MAX_LENGTH) { dprintf("number too long\n"); return GN_ERR_ENTRYTOOLONG; } len = char_unicode_encode(req + pos + 1, data->call_info->number, len); req[pos++] = len / 2; pos += len; switch (data->call_info->send_number) { case GN_CALL_Never: voice_end[5] = 0x01; break; case GN_CALL_Always: voice_end[5] = 0x00; break; case GN_CALL_Default: voice_end[5] = 0x00; break; default: return GN_ERR_INTERNALERROR; } memcpy(req + pos, voice_end, sizeof(voice_end)); pos += sizeof(voice_end); if (sm_message_send(pos, NK7110_MSG_COMMSTATUS, req, state)) return GN_ERR_NOTREADY; if (sm_block_ack(state) != GN_ERR_NONE) return GN_ERR_NOTREADY; memset(active, 0, sizeof(*active)); gn_data_clear(&d); d.call_active = active; if (NK7110_GetActiveCalls(&d, state) != GN_ERR_NONE) return GN_ERR_NOTREADY; data->call_info->call_id = active[0].call_id; return GN_ERR_NONE; } static gn_error NK7110_CancelCall(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x08, 0x00}; if (!data->call_info) return GN_ERR_INTERNALERROR; req[4] = data->call_info->call_id; if (sm_message_send(5, NK7110_MSG_COMMSTATUS, req, state)) return GN_ERR_NOTREADY; return sm_block_ack(state); } static gn_error NK7110_AnswerCall(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x06, 0x00}; if (!data->call_info) return GN_ERR_INTERNALERROR; req[4] = data->call_info->call_id; if (sm_message_send(5, NK7110_MSG_COMMSTATUS, req, state)) return GN_ERR_NOTREADY; return sm_block_ack(state); } gnokii-0.6.31/common/phones/atgen.c0000644000175000017500000032527211666163120015244 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2001 Manfred Jonsson Copyright (C) 2002 Pavel Machek, Petr Cech Copyright (C) 2002-2011 Pawel Kot Copyright (C) 2002-2003 Ladis Michl Copyright (C) 2002-2004 BORBELY Zoltan Copyright (C) 2003-2004 Igor Popik Copyright (C) 2004 Hugo Hass, Ron Yorston Copyright (C) 2007 Jeremy Laine This file provides functions specific to generic AT command compatible phones. See README for more details on supported mobile phones. */ #include "config.h" #include #include #include #include "gnokii-internal.h" #include "gnokii.h" #include "phones/generic.h" #include "phones/atgen.h" #include "phones/atbosch.h" #include "phones/ateric.h" #include "phones/athuawei.h" #include "phones/atmot.h" #include "phones/atnok.h" #include "phones/atsie.h" #include "phones/atsoer.h" #include "phones/atsam.h" #include "phones/atsag.h" #include "phones/atlg.h" #include "links/atbus.h" static gn_error Initialise(gn_data *setupdata, struct gn_statemachine *state); static gn_error Terminate(gn_data *data, struct gn_statemachine *state); static gn_error Functions(gn_operation op, gn_data *data, struct gn_statemachine *state); static gn_error Reply(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error ReplyIdentify(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error ReplyGetRFLevel(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error ReplyGetBattery(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error Parse_ReplyGetBattery(gn_data *data, struct gn_statemachine *state); static gn_error ReplyReadPhonebook(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error ReplyReadPhonebookExt(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error ReplyMemoryStatus(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error ReplyMemoryRange(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error Parse_ReplyMemoryRange(gn_data *data, struct gn_statemachine *state); static gn_error ReplyCallDivert(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error ReplyGetPrompt(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error ReplyGetSMSFolders(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error ReplyGetSMSStatus(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error ReplySendSMS(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error ReplyGetSMS(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); /* static gn_error ReplyDeleteSMS(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); */ static gn_error ReplyGetCharset(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error ReplyGetSMSCenter(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); #ifdef SECURITY static gn_error ReplyGetSecurityCodeStatus(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); #endif static gn_error ReplyGetNetworkInfo(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error ReplyRing(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error ReplyGetDateTime(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error ReplyGetActiveCalls(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error ReplyIncomingSMS(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error ReplyGetSMSMemorySize(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error AT_Identify(gn_data *data, struct gn_statemachine *state); static gn_error AT_GetModel(gn_data *data, struct gn_statemachine *state); static gn_error AT_GetRevision(gn_data *data, struct gn_statemachine *state); static gn_error AT_GetIMEI(gn_data *data, struct gn_statemachine *state); static gn_error AT_GetManufacturer(gn_data *data, struct gn_statemachine *state); static gn_error AT_GetBattery(gn_data *data, struct gn_statemachine *state); static gn_error AT_GetRFLevel(gn_data *data, struct gn_statemachine *state); static gn_error AT_GetMemoryStatus(gn_data *data, struct gn_statemachine *state); static gn_error AT_GetMemoryRange(gn_data *data, struct gn_statemachine *state); static gn_error AT_ReadPhonebook(gn_data *data, struct gn_statemachine *state); static gn_error AT_WritePhonebook(gn_data *data, struct gn_statemachine *state); static gn_error AT_DeletePhonebook(gn_data *data, struct gn_statemachine *state); static gn_error AT_ReadPhonebookExt(gn_data *data, struct gn_statemachine *state); static gn_error AT_WritePhonebookExt(gn_data *data, struct gn_statemachine *state); static gn_error AT_DeletePhonebookExt(gn_data *data, struct gn_statemachine *state); static gn_error AT_CallDivert(gn_data *data, struct gn_statemachine *state); static gn_error AT_SetPDUMode(gn_data *data, struct gn_statemachine *state); static gn_error AT_GetSMSFolders(gn_data *data, struct gn_statemachine *state); static gn_error AT_GetSMSFolderStatus(gn_data *data, struct gn_statemachine *state); static gn_error AT_GetSMSStatus(gn_data *data, struct gn_statemachine *state); static gn_error AT_SendSMS(gn_data *data, struct gn_statemachine *state); static gn_error AT_SaveSMS(gn_data *data, struct gn_statemachine *state); static gn_error AT_WriteSMS(gn_data *data, struct gn_statemachine *state, unsigned char *cmd); static gn_error AT_GetSMS(gn_data *data, struct gn_statemachine *state); static gn_error AT_DeleteSMS(gn_data *data, struct gn_statemachine *state); static gn_error AT_GetCharset(gn_data *data, struct gn_statemachine *state); static gn_error AT_SetCharset(gn_data *data, struct gn_statemachine *state); static gn_error AT_GetSMSCenter(gn_data *data, struct gn_statemachine *state); #ifdef SECURITY static gn_error AT_EnterSecurityCode(gn_data *data, struct gn_statemachine *state); static gn_error AT_GetSecurityCodeStatus(gn_data *data, struct gn_statemachine *state); #endif static gn_error AT_DialVoice(gn_data *data, struct gn_statemachine *state); static gn_error AT_GetNetworkInfo(gn_data *data, struct gn_statemachine *state); static gn_error AT_AnswerCall(gn_data *data, struct gn_statemachine *state); static gn_error AT_CancelCall(gn_data *data, struct gn_statemachine *state); static gn_error AT_SetCallNotification(gn_data *data, struct gn_statemachine *state); static gn_error AT_SetDateTime(gn_data *data, struct gn_statemachine *state); static gn_error AT_GetDateTime(gn_data *data, struct gn_statemachine *state); static gn_error AT_PrepareDateTime(gn_data *data, struct gn_statemachine *state); static gn_error AT_SendDTMF(gn_data *data, struct gn_statemachine *state); static gn_error AT_GetActiveCalls(gn_data *data, struct gn_statemachine *state); static gn_error AT_OnSMS(gn_data *data, struct gn_statemachine *state); static gn_error AT_GetSMSMemorySize(gn_data *data, struct gn_statemachine *state); typedef struct { int gop; at_send_function_type sfunc; at_recv_function_type rfunc; } at_function_init_type; /* Mobile phone information */ static at_function_init_type at_function_init[] = { { GN_OP_Init, NULL, Reply }, { GN_OP_Terminate, Terminate, Reply }, { GN_OP_GetModel, AT_GetModel, ReplyIdentify }, { GN_OP_GetRevision, AT_GetRevision, ReplyIdentify }, { GN_OP_GetImei, AT_GetIMEI, ReplyIdentify }, { GN_OP_GetManufacturer, AT_GetManufacturer, ReplyIdentify }, { GN_OP_Identify, AT_Identify, ReplyIdentify }, { GN_OP_GetBatteryLevel, AT_GetBattery, ReplyGetBattery }, { GN_OP_GetPowersource, AT_GetBattery, ReplyGetBattery }, { GN_OP_GetRFLevel, AT_GetRFLevel, ReplyGetRFLevel }, { GN_OP_GetMemoryStatus, AT_GetMemoryStatus, ReplyMemoryStatus }, { GN_OP_AT_GetMemoryRange, AT_GetMemoryRange, ReplyMemoryRange }, { GN_OP_ReadPhonebook, AT_ReadPhonebook, ReplyReadPhonebook }, { GN_OP_WritePhonebook, AT_WritePhonebook, Reply }, { GN_OP_DeletePhonebook, AT_DeletePhonebook, Reply }, { GN_OP_CallDivert, AT_CallDivert, ReplyCallDivert }, { GN_OP_AT_SetPDUMode, AT_SetPDUMode, Reply }, { GN_OP_AT_Prompt, NULL, ReplyGetPrompt }, { GN_OP_GetSMSFolders, AT_GetSMSFolders, ReplyGetSMSFolders }, { GN_OP_GetSMSFolderStatus, AT_GetSMSFolderStatus, Reply }, { GN_OP_GetSMSStatus, AT_GetSMSStatus, ReplyGetSMSStatus }, { GN_OP_SendSMS, AT_SendSMS, ReplySendSMS }, { GN_OP_SaveSMS, AT_SaveSMS, ReplySendSMS }, { GN_OP_GetSMS, AT_GetSMS, ReplyGetSMS }, { GN_OP_DeleteSMS, AT_DeleteSMS, Reply }, { GN_OP_AT_GetCharset, AT_GetCharset, ReplyGetCharset }, { GN_OP_AT_SetCharset, AT_SetCharset, Reply }, { GN_OP_GetSMSCenter, AT_GetSMSCenter, ReplyGetSMSCenter }, #ifdef SECURITY { GN_OP_GetSecurityCodeStatus, AT_GetSecurityCodeStatus, ReplyGetSecurityCodeStatus }, { GN_OP_EnterSecurityCode, AT_EnterSecurityCode, Reply }, #endif { GN_OP_MakeCall, AT_DialVoice, Reply }, { GN_OP_AnswerCall, AT_AnswerCall, Reply }, { GN_OP_CancelCall, AT_CancelCall, Reply }, { GN_OP_AT_Ring, NULL, ReplyRing }, { GN_OP_SetCallNotification, AT_SetCallNotification, Reply }, { GN_OP_GetNetworkInfo, AT_GetNetworkInfo, ReplyGetNetworkInfo }, { GN_OP_SetDateTime, AT_SetDateTime, Reply }, { GN_OP_GetDateTime, AT_GetDateTime, ReplyGetDateTime }, { GN_OP_AT_PrepareDateTime, AT_PrepareDateTime, Reply }, { GN_OP_SendDTMF, AT_SendDTMF, Reply }, { GN_OP_GetActiveCalls, AT_GetActiveCalls, ReplyGetActiveCalls }, { GN_OP_OnSMS, AT_OnSMS, Reply }, { GN_OP_AT_IncomingSMS, NULL, ReplyIncomingSMS }, { GN_OP_AT_GetSMSMemorySize, AT_GetSMSMemorySize, ReplyGetSMSMemorySize }, }; /* * Various functions that change default function registration. */ static void register_extended_phonebook(struct gn_statemachine *state) { at_insert_send_function(GN_OP_ReadPhonebook, AT_ReadPhonebookExt, state); at_insert_recv_function(GN_OP_ReadPhonebook, ReplyReadPhonebookExt, state); at_insert_send_function(GN_OP_WritePhonebook, AT_WritePhonebookExt, state); at_insert_send_function(GN_OP_DeletePhonebook, AT_DeletePhonebookExt, state); } char *strip_quotes(char *s) { char *t; if (*s == '"') { if ((t = strrchr(++s, '"'))) { *t = '\0'; } } return s; } static char *strip_brackets(char *s) { char *t ; if (*s == '(') { if ((t = strrchr(++s, ')'))) { *t = '\0'; } } return s; } /* * Compare the string passed in @tmpl with the echoed command passed in @req * without the leading "AT" chars and the response passed in @resp and copy * the response from @resp to @dest if one of the comparisons is successful, * stripping the command prefix if present. * * Comparing both strings is needed to workaround some firmwares that reply * to AT+GMM with +CGMM: or to AT+CGMM with +GMM: * * 1 is returned when tmpl matches req or resp. 0 is returned otherwise. */ static int reply_simpletext(char *req, char *resp, const char *tmpl, char *dest, size_t maxlength) { int i, n; if (dest == NULL) return 0; n = strlen(tmpl); /* Subtract 2 to skip the trailing ": " (eg to match "+GMM" and "+GMM: ") */ if ((strncmp(req, tmpl, n - 2) == 0) || (strncmp(resp, tmpl, n) == 0)) { /* Skip the prefix indicating to which command this response is responding, if present */ i = 0; if (resp[i] == '+') { while (resp[i] && resp[i++] != ':') ; } while (isspace(resp[i])) i++; snprintf(dest, maxlength, "%s", strip_quotes(resp + i)); return 1; } return 0; } gn_driver driver_at = { NULL, pgen_incoming_default, { "AT|AT-HW", /* Supported models */ 99, /* Max RF Level */ 0, /* Min RF Level */ GN_RF_CSQ, /* RF level units */ 100, /* Max Battery Level */ 0, /* Min Battery Level */ GN_BU_Percentage, /* Battery level units */ 0, /* Have date/time support */ 0, /* Alarm supports time only */ 0, /* Alarms available - FIXME */ 0, 0, /* Startup logo size - FIXME */ 0, 0, /* Op logo size */ 0, 0 /* Caller logo size */ }, Functions, NULL }; typedef struct { const char *str; at_charset charset; } at_charset_map_t; static at_charset_map_t atcharsets[] = { { "GSM", AT_CHAR_GSM }, { "HEX", AT_CHAR_HEXGSM }, { "UCS2", AT_CHAR_UCS2 }, { NULL, AT_CHAR_UNKNOWN }, }; /* * Help functions for extended phonebook handling. */ static char *extpb_scan_entry(at_driver_instance *drvinst, char *buffer, gn_phonebook_entry *entry, gn_phonebook_entry_type type, gn_phonebook_number_type number_type, int ext_str) { char *pos, *endpos; size_t len; int ix; if (!buffer) return NULL; if (!(pos = strstr(buffer, ",\""))) return NULL; pos += 2; if (ext_str) { if (!(endpos = strchr(pos, ','))) return NULL; *endpos = 0; len = atoi(pos); pos = endpos + 1; endpos = pos + len; *endpos = 0; } else { if (!(endpos = strstr(pos, "\","))) return NULL; *endpos = 0; len = strlen(pos); } if (len > 0) { ix = entry->subentries_count++; entry->subentries[ix].entry_type = type; entry->subentries[ix].number_type = number_type; at_decode(drvinst->charset, entry->subentries[ix].data.number, pos, len, drvinst->ucs2_as_utf8); if (entry->number[0] == 0 && type == GN_PHONEBOOK_ENTRY_Number) snprintf(entry->number, sizeof(entry->number), "%s", entry->subentries[ix].data.number); } return endpos + 1; } static char *extpb_find_subentry(gn_phonebook_entry *entry, gn_phonebook_entry_type type) { int i; for (i = 0; i < entry->subentries_count; ++i) if (entry->subentries[i].entry_type == type) return entry->subentries[i].data.number; return NULL; } static char *extpb_find_number_subentry(gn_phonebook_entry *entry, gn_phonebook_number_type type) { int i; for (i = 0; i < entry->subentries_count; ++i) if (entry->subentries[i].entry_type == GN_PHONEBOOK_ENTRY_Number && entry->subentries[i].number_type == type) return entry->subentries[i].data.number; return NULL; } static gn_error Functions(gn_operation op, gn_data *data, struct gn_statemachine *state) { at_driver_instance *drvinst = AT_DRVINST(state); if (op == GN_OP_Init) return Initialise(data, state); if (drvinst && op == GN_OP_Terminate) return Terminate(data, state); if (!drvinst) return GN_ERR_INTERNALERROR; if ((op > GN_OP_Init) && (op < GN_OP_AT_Max)) if (drvinst->functions[op]) return (*(drvinst->functions[op]))(data, state); return GN_ERR_NOTIMPLEMENTED; } /* Functions to encode and decode strings */ size_t at_encode(at_charset charset, char *dst, size_t dst_len, const char *src, size_t len) { size_t ret; switch (charset) { case AT_CHAR_GSM: ret = char_ascii_encode(dst, dst_len, src, len); break; case AT_CHAR_HEXGSM: ret = char_hex_encode(dst, dst_len, src, len); break; case AT_CHAR_UCS2: ret = char_ucs2_encode(dst, dst_len, src, len); break; default: memcpy(dst, src, dst_len >= len ? len : dst_len); ret = len; break; } if (ret < dst_len) dst[ret] = '\0'; return ret+1; } void at_decode(int charset, char *dst, char *src, int len, int ucs2_as_utf8) { switch (charset) { /* char_*_decode() functions null terminate the strings */ case AT_CHAR_GSM: char_default_alphabet_decode(dst, src, len); break; case AT_CHAR_HEXGSM: char_hex_decode(dst, src, len); break; case AT_CHAR_UCS2: if (ucs2_as_utf8) /* This function is defined in atsam.c */ decode_ucs2_as_utf8(dst, src, len); else char_ucs2_decode(dst, src, len); break; default: memcpy(dst, src, len); dst[len] = 0; break; } } /* Return the string representing the charset */ static const char *at_charset2str(at_charset charset) { int i; for (i = 0; atcharsets[i].str != NULL; i++) { if (atcharsets[i].charset == charset) return atcharsets[i].str; } return NULL; } /* Set the requested charset as the current charset */ gn_error at_set_charset(gn_data *data, struct gn_statemachine *state, at_charset charset) { at_driver_instance *drvinst = AT_DRVINST(state); gn_data tmpdata; gn_error error; if (drvinst->charset == charset) return GN_ERR_NONE; /* load the available charsets if they're not already set */ if (drvinst->availcharsets == 0) { error = sm_message_send(10, GN_OP_AT_GetCharset, "AT+CSCS=?\r", state); if (error) return error; gn_data_clear(&tmpdata); error = sm_block_no_retry(GN_OP_AT_GetCharset, &tmpdata, state); } /* Try to set the requested charset if it's available */ if (drvinst->availcharsets & charset) { const char *charset_s; char req[32]; charset_s = at_charset2str(charset); if (drvinst->encode_memory_type) { char charset_enc[16]; at_encode(drvinst->charset, charset_enc, sizeof(charset_enc), charset_s, strlen(charset_s)); snprintf(req, sizeof(req), "AT+CSCS=\"%s\"\r", charset_enc); } else snprintf(req, sizeof(req), "AT+CSCS=\"%s\"\r", charset_s); error = sm_message_send(strlen(req), GN_OP_Init, req, state); if (error) return error; error = sm_block_no_retry(GN_OP_Init, &tmpdata, state); if (error) return error; drvinst->charset = charset; } else { error = GN_ERR_NOTSUPPORTED; } return error; } at_recv_function_type at_insert_recv_function(int type, at_recv_function_type func, struct gn_statemachine *state) { at_driver_instance *drvinst = AT_DRVINST(state); at_recv_function_type oldfunc; int i; if (type >= GN_OP_AT_Max) { return (at_recv_function_type) -1; } if (drvinst->if_pos == 0) { drvinst->incoming_functions[0].message_type = type; drvinst->incoming_functions[0].functions = func; drvinst->if_pos++; return NULL; } for (i = 0; i < drvinst->if_pos; i++) { if (drvinst->incoming_functions[i].message_type == type) { oldfunc = drvinst->incoming_functions[i].functions; drvinst->incoming_functions[i].functions = func; return oldfunc; } } if (drvinst->if_pos < GN_OP_AT_Max-1) { drvinst->incoming_functions[drvinst->if_pos].message_type = type; drvinst->incoming_functions[drvinst->if_pos].functions = func; drvinst->if_pos++; } return NULL; } at_send_function_type at_insert_send_function(int type, at_send_function_type func, struct gn_statemachine *state) { at_driver_instance *drvinst = AT_DRVINST(state); at_send_function_type f; f = drvinst->functions[type]; drvinst->functions[type] = func; return f; } at_error_function_type at_insert_manufacturer_error_function(at_error_function_type func, struct gn_statemachine *state) { at_driver_instance *drvinst = AT_DRVINST(state); at_error_function_type f; f = drvinst->manufacturer_error; drvinst->manufacturer_error = func; return f; } static gn_error SoftReset(gn_data *data, struct gn_statemachine *state) { if (sm_message_send(4, GN_OP_Init, "ATZ\r", state)) return GN_ERR_NOTREADY; return sm_block_no_retry(GN_OP_Init, data, state); } static gn_error SetEcho(gn_data *data, struct gn_statemachine *state) { if (sm_message_send(5, GN_OP_Init, "ATE1\r", state)) return GN_ERR_NOTREADY; return sm_block_no_retry(GN_OP_Init, data, state); } static gn_error SetExtendedError(gn_data *data, struct gn_statemachine *state) { if (sm_message_send(10, GN_OP_Init, "AT+CMEE=1\r", state)) return GN_ERR_NOTREADY; return sm_block_no_retry(GN_OP_Init, data, state); } gn_error at_error_get(unsigned char *buffer, struct gn_statemachine *state) { at_driver_instance *drvinst = AT_DRVINST(state); int code; switch (buffer[0]) { case GN_AT_OK: return GN_ERR_NONE; case GN_AT_ERROR: return GN_ERR_UNKNOWN; case GN_AT_CMS: code = 256 * buffer[1] + buffer[2]; switch (code) { case 300: return GN_ERR_FAILED; /* ME failure */ case 301: return GN_ERR_FAILED; /* SMS service of ME reserved */ case 302: return GN_ERR_FAILED; /* operation not allowed */ case 303: return GN_ERR_NOTSUPPORTED; /* operation not supported */ case 304: return GN_ERR_WRONGDATAFORMAT;/* invalid PDU mode parameter */ case 305: return GN_ERR_WRONGDATAFORMAT;/* invalid text mode parameter */ case 310: return GN_ERR_SIMPROBLEM; /* SIM not inserted */ case 311: return GN_ERR_CODEREQUIRED; /* SIM PIN required */ case 312: return GN_ERR_CODEREQUIRED; /* PH-SIM PIN required */ case 313: return GN_ERR_SIMPROBLEM; /* SIM failure */ case 314: return GN_ERR_TRYAGAIN; /* SIM busy */ case 315: return GN_ERR_SIMPROBLEM; /* SIM wrong */ case 316: return GN_ERR_CODEREQUIRED; /* SIM PUK required */ case 317: return GN_ERR_CODEREQUIRED; /* SIM PIN2 required */ case 318: return GN_ERR_CODEREQUIRED; /* SIM PUK2 required */ case 320: return GN_ERR_FAILED; /* memory failure */ case 321: return GN_ERR_INVALIDLOCATION;/* invalid memory index */ case 322: return GN_ERR_MEMORYFULL; /* memory full */ case 330: return GN_ERR_FAILED; /* SMSC address unknown */ case 331: return GN_ERR_NOCARRIER; /* no network service */ case 332: return GN_ERR_TIMEOUT; /* network timeout */ case 340: return GN_ERR_FAILED; /* no +CNMA acknowledgement expected */ case 500: return GN_ERR_UNKNOWN; /* unknown error */ default: if (code >= 512 && drvinst->manufacturer_error) return drvinst->manufacturer_error(GN_AT_CMS, code, state); break; } break; case GN_AT_CME: code = 256 * buffer[1] + buffer[2]; switch (code) { case 0: return GN_ERR_FAILED; /* phone failure */ case 1: return GN_ERR_NOLINK; /* no connection to phone */ case 2: return GN_ERR_BUSY; /* phone-adaptor link reserved */ case 3: return GN_ERR_FAILED; /* operation not allowed */ case 4: return GN_ERR_NOTSUPPORTED; /* operation not supported */ case 5: return GN_ERR_CODEREQUIRED; /* PH-SIM PIN required */ case 6: return GN_ERR_CODEREQUIRED; /* PH-FSIM PIN required */ case 7: return GN_ERR_CODEREQUIRED; /* PH-FSIM PUK required */ case 10: return GN_ERR_SIMPROBLEM; /* SIM not inserted */ case 11: return GN_ERR_CODEREQUIRED; /* SIM PIN required */ case 12: return GN_ERR_CODEREQUIRED; /* SIM PUK required */ case 13: return GN_ERR_SIMPROBLEM; /* SIM failure */ case 14: return GN_ERR_TRYAGAIN; /* SIM busy */ case 15: return GN_ERR_SIMPROBLEM; /* SIM wrong */ case 16: return GN_ERR_INVALIDSECURITYCODE; /* incorrect password */ case 17: return GN_ERR_CODEREQUIRED; /* SIM PIN2 required */ case 18: return GN_ERR_CODEREQUIRED; /* SIM PUK2 required */ case 20: return GN_ERR_MEMORYFULL; /* memory full */ case 21: return GN_ERR_INVALIDLOCATION;/* invalid index */ case 22: return GN_ERR_EMPTYLOCATION; /* not found */ case 23: return GN_ERR_FAILED; /* memory failure */ case 24: return GN_ERR_ENTRYTOOLONG; /* text string too long */ case 25: return GN_ERR_WRONGDATAFORMAT;/* invalid characters in text string */ case 26: return GN_ERR_ENTRYTOOLONG; /* dial string too long */ case 27: return GN_ERR_WRONGDATAFORMAT;/* invalid characters in dial string */ case 30: return GN_ERR_NOCARRIER; /* no network service */ case 31: return GN_ERR_TIMEOUT; /* network timeout */ case 32: return GN_ERR_FAILED; /* network not allowed - emergency calls only */ case 40: return GN_ERR_CODEREQUIRED; /* network personalisation PIN required */ case 41: return GN_ERR_CODEREQUIRED; /* network personalisation PUK required */ case 42: return GN_ERR_CODEREQUIRED; /* network subset personalisation PIN required */ case 43: return GN_ERR_CODEREQUIRED; /* network subset personalisation PUK required */ case 44: return GN_ERR_CODEREQUIRED; /* service provider personalisation PIN required */ case 45: return GN_ERR_CODEREQUIRED; /* service provider personalisation PUK required */ case 46: return GN_ERR_CODEREQUIRED; /* corporate personalisation PIN required */ case 47: return GN_ERR_CODEREQUIRED; /* corporate personalisation PUK required */ case 100: return GN_ERR_UNKNOWN; /* unknown */ default: if (code >= 512 && drvinst->manufacturer_error) return drvinst->manufacturer_error(GN_AT_CME, code, state); break; } break; default: return GN_ERR_INTERNALERROR; /* shouldn't happen */ } return GN_ERR_UNKNOWN; } /* StoreDefaultCharset * * for a correct communication with the phone for phonebook entries or * SMS text mode, we need to set a suited charset. a suited charset * doesn't contain characters which are also used by the serial line for * software handshake. so the GSM charset (or PC437, latin-1, etc) are * a bad choice. * so the GSM specification defines the HEX charset which is a hexidecimal * representation of the "original" charset. this is a good choice for the * above problem. but the GSM specification defines the default charset and * no "original" charset. * so what we do is to ask the phone (after a reset) for its original * charset and store the result for future referece. we don't do a full * initialization for speed reason. at further processing we can chose * a working charset if needed. * * see also AT_SetCharset, AT_GetCharset */ static void StoreDefaultCharset(struct gn_statemachine *state) { at_driver_instance *drvinst = AT_DRVINST(state); gn_data data; gn_error error; gn_data_clear(&data); error = state->driver.functions(GN_OP_AT_GetCharset, &data, state); drvinst->defaultcharset = error ? AT_CHAR_UNKNOWN : drvinst->charset; } gn_error at_memory_type_set(gn_memory_type mt, struct gn_statemachine *state) { at_driver_instance *drvinst = AT_DRVINST(state); gn_data data; char req[32]; const char *memory_name; char memory_name_enc[16]; int len; gn_error ret = GN_ERR_NONE; if (mt != drvinst->memorytype) { memory_name = gn_memory_type2str(mt); if (!memory_name) return GN_ERR_INVALIDMEMORYTYPE; if (drvinst->encode_memory_type) { gn_data_clear(&data); at_encode(drvinst->charset, memory_name_enc, sizeof(memory_name_enc), memory_name, strlen(memory_name)); memory_name = memory_name_enc; } len = snprintf(req, sizeof(req), "AT+CPBS=\"%s\"\r", memory_name); ret = sm_message_send(len, GN_OP_Init, req, state); if (ret != GN_ERR_NONE) return ret; gn_data_clear(&data); ret = sm_block_no_retry(GN_OP_Init, &data, state); if (ret != GN_ERR_NONE) return ret; drvinst->memorytype = mt; gn_data_clear(&data); ret = state->driver.functions(GN_OP_AT_GetMemoryRange, &data, state); } return ret; } /* GSM 07.05 section 3.2.3 specified the +CPMS (Preferred Message Store) AT * command as taking 3 memory parameters , and . Each of * these stores is used for different purposes: * - memory from which messages are read and deleted * - memory to which writing and sending operations are made * - memory to which received SMs are preferred to be stored * * According to ETSI TS 127 005 V6.0.1 (2005-01) section 3.2.2, second and * third parameter are optional, so we set only to be more compatible. */ gn_error AT_SetSMSMemoryType(gn_memory_type mt, struct gn_statemachine *state) { at_driver_instance *drvinst = AT_DRVINST(state); gn_data data; char req[32]; const char *memory_name; char memory_name_enc[16]; int len; gn_error ret = GN_ERR_NONE; if (mt != drvinst->smsmemorytype) { memory_name = gn_memory_type2str(mt); if (!memory_name) return GN_ERR_INVALIDMEMORYTYPE; if (drvinst->encode_memory_type) { gn_data_clear(&data); at_encode(drvinst->charset, memory_name_enc, sizeof(memory_name_enc), memory_name, strlen(memory_name)); memory_name = memory_name_enc; } len = snprintf(req, sizeof(req), "AT+CPMS=\"%s\"\r", memory_name); ret = sm_message_send(len, GN_OP_Init, req, state); if (ret != GN_ERR_NONE) return ret; gn_data_clear(&data); ret = sm_block_no_retry(GN_OP_Init, &data, state); if (ret != GN_ERR_NONE) return ret; drvinst->smsmemorytype = mt; } return ret; } /* AT_SetCharset * * before we start sending or receiving phonebook entries from the phone, * we should set a charset. this is done once before the first read or write. * * we try to chose a charset with hexadecimal representation. first ucs2 * (which is a hexencoded unicode charset) is tested and set if available. * if this fails for any reason, it is checked if the original charset is * GSM. if this is true, we try to set HEX (a hexencoded GSM charset). if * this again fails or is impossible, we try to use the GSM charset. if * the original charset was GSM nothing is done (we rely on not changing * anything by the failing tries before). if the original charset was * something else, we set the GSM charset. if this too fails, the user is * on his own, characters will be copied from or to the phone without * conversion. * * the whole bunch is needed to get a reasonable support for different * phones. eg a siemens s25 has GSM as original charset and aditional * supports only UCS2, a nokia 7110 has PCCP437 as original charset which * renders HEX unusable for us (in this case HEX will give a hexadecimal * encoding of the PCCP437 charset) and no UCS2. a ericsson t39 uses * GSM as original charset but has never heard of any hex encoded charset. * but this doesn't matter with IRDA and i haven't found a serial cable * in a shop yet, so this is no problem * * see AT_GetCharset, StoreDefaultCharset */ static gn_error AT_SetCharset(gn_data *data, struct gn_statemachine *state) { at_driver_instance *drvinst = AT_DRVINST(state); gn_data tmpdata; gn_error error = GN_ERR_NONE; if (drvinst->charset != AT_CHAR_UNKNOWN) return GN_ERR_NONE; /* check available charsets */ if (drvinst->availcharsets == 0) { error = sm_message_send(10, GN_OP_AT_GetCharset, "AT+CSCS=?\r", state); if (error) return error; gn_data_clear(&tmpdata); error = sm_block_no_retry(GN_OP_AT_GetCharset, &tmpdata, state); } if (!error && (drvinst->availcharsets & AT_CHAR_UCS2) && (drvinst->charset != AT_CHAR_UCS2)) { /* UCS2 charset found. try to set it */ error = sm_message_send(15, GN_OP_Init, "AT+CSCS=\"UCS2\"\r", state); if (error) return error; error = sm_block_no_retry(GN_OP_Init, &tmpdata, state); if (!error) drvinst->charset = AT_CHAR_UCS2; } if (drvinst->charset != AT_CHAR_UNKNOWN) return GN_ERR_NONE; /* no UCS2 charset found or error occured */ if ((drvinst->availcharsets & AT_CHAR_HEXGSM) && (drvinst->charset != AT_CHAR_HEXGSM)) { /* try to set HEX charset */ error = sm_message_send(14, GN_OP_Init, "AT+CSCS=\"HEX\"\r", state); if (error) return error; error = sm_block_no_retry(GN_OP_Init, &tmpdata, state); if (!error) drvinst->charset = AT_CHAR_HEXGSM; } if (drvinst->charset != AT_CHAR_UNKNOWN) return GN_ERR_NONE; /* no support for HEXGSM, be happy with GSM */ if ((drvinst->availcharsets & AT_CHAR_GSM) && (drvinst->charset != AT_CHAR_HEXGSM)) { error = sm_message_send(14, GN_OP_Init, "AT+CSCS=\"GSM\"\r", state); if (error) return error; error = sm_block_no_retry(GN_OP_Init, &tmpdata, state); if (!error) drvinst->charset = AT_CHAR_GSM; } if (drvinst->charset != AT_CHAR_UNKNOWN) return GN_ERR_NONE; drvinst->charset = drvinst->defaultcharset; error = (drvinst->charset == AT_CHAR_UNKNOWN) ? error : GN_ERR_NONE; return error; } /* AT_GetCharset * * this function detects the current charset used by the phone. if it is * called immediatedly after a reset of the phone, this is also the * original charset of the phone. */ static gn_error AT_GetCharset(gn_data *data, struct gn_statemachine *state) { gn_error ret; ret = sm_message_send(9, GN_OP_AT_GetCharset, "AT+CSCS?\r", state); if (ret) return GN_ERR_NOTREADY; return sm_block_no_retry(GN_OP_AT_GetCharset, data, state); } static gn_error AT_Identify(gn_data *data, struct gn_statemachine *state) { gn_error ret; if ((ret = state->driver.functions(GN_OP_GetModel, data, state))) return ret; if ((ret = state->driver.functions(GN_OP_GetManufacturer, data, state))) return ret; if ((ret = state->driver.functions(GN_OP_GetRevision, data, state))) return ret; return state->driver.functions(GN_OP_GetImei, data, state); } static gn_error AT_GetModel(gn_data *data, struct gn_statemachine *state) { gn_error err; /* * prefer AT+GMM over AT+CGMM because it returns a user friendly model name * for some phones (e.g. Sony Ericsson Z310i) */ if (sm_message_send(7, GN_OP_Identify, "AT+GMM\r", state)) return GN_ERR_NOTREADY; if ((err = sm_block_no_retry(GN_OP_Identify, data, state)) == GN_ERR_NONE) return GN_ERR_NONE; if (sm_message_send(8, GN_OP_Identify, "AT+CGMM\r", state)) return GN_ERR_NOTREADY; if ((err = sm_block_no_retry(GN_OP_Identify, data, state)) == GN_ERR_NONE) return GN_ERR_NONE; return err; } static gn_error AT_GetManufacturer(gn_data *data, struct gn_statemachine *state) { gn_error err; if (sm_message_send(8, GN_OP_Identify, "AT+CGMI\r", state)) return GN_ERR_NOTREADY; if ((err = sm_block_no_retry(GN_OP_Identify, data, state)) == GN_ERR_NONE) return GN_ERR_NONE; if (sm_message_send(7, GN_OP_Identify, "AT+GMI\r", state)) return GN_ERR_NOTREADY; if (sm_block_no_retry(GN_OP_Identify, data, state) == GN_ERR_NONE) return GN_ERR_NONE; return err; } static gn_error AT_GetRevision(gn_data *data, struct gn_statemachine *state) { gn_error err; if (sm_message_send(8, GN_OP_Identify, "AT+CGMR\r", state)) return GN_ERR_NOTREADY; if ((err = sm_block_no_retry(GN_OP_Identify, data, state)) == GN_ERR_NONE) return GN_ERR_NONE; if (sm_message_send(7, GN_OP_Identify, "AT+GMR\r", state)) return GN_ERR_NOTREADY; if (sm_block_no_retry(GN_OP_Identify, data, state) == GN_ERR_NONE) return GN_ERR_NONE; return err; } static gn_error AT_GetIMEI(gn_data *data, struct gn_statemachine *state) { gn_error err; if (sm_message_send(8, GN_OP_Identify, "AT+CGSN\r", state)) return GN_ERR_NOTREADY; if ((err = sm_block_no_retry(GN_OP_Identify, data, state)) == GN_ERR_NONE) return GN_ERR_NONE; if (sm_message_send(7, GN_OP_Identify, "AT+GSN\r", state)) return GN_ERR_NOTREADY; if (sm_block_no_retry(GN_OP_Identify, data, state) == GN_ERR_NONE) return GN_ERR_NONE; return err; } /* gets battery level and power source */ static gn_error AT_GetBattery(gn_data *data, struct gn_statemachine *state) { at_driver_instance *drvinst = AT_DRVINST(state); char key[4]; snprintf(key, 4, "CBC"); if (map_get(&drvinst->cached_capabilities, key, 1)) return Parse_ReplyGetBattery(data, state); else if (sm_message_send(7, GN_OP_GetBatteryLevel, "AT+CBC\r", state)) return GN_ERR_NOTREADY; return sm_block_no_retry(GN_OP_GetBatteryLevel, data, state); } static gn_error AT_GetRFLevel(gn_data *data, struct gn_statemachine *state) { if (sm_message_send(7, GN_OP_GetRFLevel, "AT+CSQ\r", state)) return GN_ERR_NOTREADY; return sm_block_no_retry(GN_OP_GetRFLevel, data, state); } static gn_error AT_GetMemoryStatus(gn_data *data, struct gn_statemachine *state) { gn_error ret; ret = at_memory_type_set(data->memory_status->memory_type, state); if (ret) return ret; if (sm_message_send(9, GN_OP_GetMemoryStatus, "AT+CPBS?\r", state)) return GN_ERR_NOTREADY; return sm_block_no_retry(GN_OP_GetMemoryStatus, data, state); } static gn_error AT_GetMemoryRange(gn_data *data, struct gn_statemachine *state) { at_driver_instance *drvinst = AT_DRVINST(state); gn_error ret; char key[7]; snprintf(key, 7, "%s%s", "CPBR", gn_memory_type2str(drvinst->memorytype)); if (map_get(&drvinst->cached_capabilities, key, 0)) { ret = Parse_ReplyMemoryRange(data, state); } else { ret = sm_message_send(10, GN_OP_AT_GetMemoryRange, "AT+CPBR=?\r", state); if (ret) return GN_ERR_NOTREADY; ret = sm_block_no_retry(GN_OP_AT_GetMemoryRange, data, state); } return ret; } static gn_error AT_ReadPhonebook(gn_data *data, struct gn_statemachine *state) { at_driver_instance *drvinst = AT_DRVINST(state); char req[32]; gn_error ret; ret = at_memory_type_set(data->phonebook_entry->memory_type, state); if (ret) return ret; /* Try to read in UCS2. Ignore errors. */ ret = at_set_charset(data, state, AT_CHAR_UCS2); snprintf(req, sizeof(req), "AT+CPBR=%d\r", data->phonebook_entry->location + drvinst->memoryoffset); if (sm_message_send(strlen(req), GN_OP_ReadPhonebook, req, state)) return GN_ERR_NOTREADY; return sm_block_no_retry(GN_OP_ReadPhonebook, data, state); } static gn_error AT_WritePhonebook(gn_data *data, struct gn_statemachine *state) { at_driver_instance *drvinst = AT_DRVINST(state); int len, ofs; char req[256], *tmp; char number[64]; gn_error ret; ret = at_memory_type_set(data->phonebook_entry->memory_type, state); if (ret) return ret; if (data->phonebook_entry->empty) { return AT_DeletePhonebook(data, state); } else { ret = state->driver.functions(GN_OP_AT_SetCharset, data, state); if (ret) return ret; memset(number, 0, sizeof(number)); if (drvinst->encode_number) at_encode(drvinst->charset, number, sizeof(number), data->phonebook_entry->number, strlen(data->phonebook_entry->number)); else strncpy(number, data->phonebook_entry->number, sizeof(number)); ofs = snprintf(req, sizeof(req), "AT+CPBW=%d,\"%s\",%s,\"", data->phonebook_entry->location+drvinst->memoryoffset, number, data->phonebook_entry->number[0] == '+' ? "145" : "129"); tmp = req + ofs; len = at_encode(drvinst->charset, tmp, sizeof(req) - ofs, data->phonebook_entry->name, strlen(data->phonebook_entry->name)); tmp[len-1] = '"'; tmp[len++] = '\r'; len += ofs; } if (sm_message_send(len, GN_OP_WritePhonebook, req, state)) return GN_ERR_NOTREADY; return sm_block_no_retry(GN_OP_WritePhonebook, data, state); } static gn_error AT_DeletePhonebook(gn_data *data, struct gn_statemachine *state) { at_driver_instance *drvinst = AT_DRVINST(state); int len; char req[64]; gn_error ret; if (!data->phonebook_entry) return GN_ERR_INTERNALERROR; ret = at_memory_type_set(data->phonebook_entry->memory_type, state); if (ret) return ret; len = snprintf(req, sizeof(req), "AT+CPBW=%d\r", data->phonebook_entry->location+drvinst->memoryoffset); if (sm_message_send(len, GN_OP_DeletePhonebook, req, state)) return GN_ERR_NOTREADY; return sm_block_no_retry(GN_OP_DeletePhonebook, data, state); } static gn_error AT_ReadPhonebookExt(gn_data *data, struct gn_statemachine *state) { at_driver_instance *drvinst = AT_DRVINST(state); char req[32]; gn_error ret; ret = state->driver.functions(GN_OP_AT_SetCharset, data, state); if (ret) return ret; ret = at_memory_type_set(data->phonebook_entry->memory_type, state); if (ret) return ret; snprintf(req, sizeof(req), "AT+SPBR=%d\r", data->phonebook_entry->location+drvinst->memoryoffset); if (sm_message_send(strlen(req), GN_OP_ReadPhonebook, req, state)) return GN_ERR_NOTREADY; return sm_block_no_retry(GN_OP_ReadPhonebook, data, state); } static gn_error AT_DeletePhonebookExt(gn_data *data, struct gn_statemachine *state) { at_driver_instance *drvinst = AT_DRVINST(state); int len; char req[64]; gn_error ret; if (!data->phonebook_entry) return GN_ERR_INTERNALERROR; ret = at_memory_type_set(data->phonebook_entry->memory_type, state); if (ret) return ret; len = snprintf(req, sizeof(req), "AT+SPBW=%d\r", data->phonebook_entry->location+drvinst->memoryoffset); if (sm_message_send(len, GN_OP_DeletePhonebook, req, state)) return GN_ERR_NOTREADY; return sm_block_no_retry(GN_OP_DeletePhonebook, data, state); } #define MAX_REQ 2048 static gn_error AT_WritePhonebookExt(gn_data *data, struct gn_statemachine *state) { at_driver_instance *drvinst = AT_DRVINST(state); int len, ofs; char req[MAX_REQ + 1], tmp[MAX_REQ + 1]; char *mobile, *home, *work, *fax, *general, *email, *first_name, *last_name, *note; gn_phonebook_entry *entry = data->phonebook_entry; gn_data data2; gn_memory_status memstat; gn_error ret; int ix; if (entry->empty) return AT_DeletePhonebook(data, state); ret = at_memory_type_set(entry->memory_type, state); if (ret) return ret; ret = state->driver.functions(GN_OP_AT_SetCharset, data, state); if (ret) return ret; gn_data_clear(&data2); memstat.memory_type = entry->memory_type; data2.memory_status = &memstat; ret = state->driver.functions(GN_OP_GetMemoryStatus, &data2, state); if (ret) return ret; if (entry->memory_type != GN_MT_SM && entry->location > memstat.used) ix = 0; else ix = entry->location + drvinst->memoryoffset; mobile = extpb_find_number_subentry(entry, GN_PHONEBOOK_NUMBER_Mobile); home = extpb_find_number_subentry(entry, GN_PHONEBOOK_NUMBER_Home); work = extpb_find_number_subentry(entry, GN_PHONEBOOK_NUMBER_Work); fax = extpb_find_number_subentry(entry, GN_PHONEBOOK_NUMBER_Fax); general = extpb_find_number_subentry(entry, GN_PHONEBOOK_NUMBER_General); if (!(mobile || home || work || fax || general) && entry->number[0] != 0) mobile = entry->number; email = extpb_find_subentry(entry, GN_PHONEBOOK_ENTRY_Email); first_name = extpb_find_subentry(entry, GN_PHONEBOOK_ENTRY_FirstName); last_name = extpb_find_subentry(entry, GN_PHONEBOOK_ENTRY_LastName); if (!(first_name || last_name) && entry->name[0] != 0) first_name = entry->name; note = extpb_find_subentry(entry, GN_PHONEBOOK_ENTRY_Note); ofs = snprintf(req, MAX_REQ, "AT+SPBW=%d,\"", ix); if (mobile) ofs += at_encode(drvinst->charset, req + ofs, MAX_REQ - ofs, mobile, strlen(mobile)) - 1; strncat(req, "\",\"", MAX_REQ - ofs); ofs += 3; if (home) ofs += at_encode(drvinst->charset, req + ofs, MAX_REQ - ofs, home, strlen(home)) - 1; strncat(req, "\",\"", MAX_REQ - ofs); ofs += 3; if (work) ofs += at_encode(drvinst->charset, req + ofs, MAX_REQ - ofs, work, strlen(work)) - 1; strncat(req, "\",\"", MAX_REQ - ofs); ofs += 3; if (fax) ofs += at_encode(drvinst->charset, req + ofs, MAX_REQ - ofs, fax, strlen(fax)) - 1; strncat(req, "\",\"", MAX_REQ - ofs); ofs += 3; if (general) ofs += at_encode(drvinst->charset, req + ofs, MAX_REQ - ofs, general, strlen(general)) - 1; strncat(req, "\",\"", MAX_REQ - ofs); ofs += 3; if (email) ofs += at_encode(drvinst->charset, req + ofs, MAX_REQ - ofs, email, strlen(email)) - 1; strncat(req, "\",\"", MAX_REQ - ofs); ofs += 3; if (first_name) { len = at_encode(drvinst->charset, tmp, MAX_REQ, first_name, strlen(first_name)) - 1; ofs += snprintf(req + ofs, MAX_REQ - ofs, "%d,", len); memcpy(req + ofs, tmp, len + 1); ofs += len; } else ofs += snprintf(req + ofs, MAX_REQ - ofs, "0,"); strncat(req, "\",\"", MAX_REQ - ofs); ofs += 3; if (last_name) { len = at_encode(drvinst->charset, tmp, MAX_REQ, last_name, strlen(last_name)) - 1; ofs += snprintf(req + ofs, MAX_REQ - ofs, "%d,", len); memcpy(req + ofs, tmp, len + 1); ofs += len; } else ofs += snprintf(req + ofs, MAX_REQ - ofs, "0,"); strncat(req, "\",\"", MAX_REQ - ofs); ofs += 3; if (note) { len = at_encode(drvinst->charset, tmp, MAX_REQ, note, strlen(note)) - 1; ofs += snprintf(req + ofs, MAX_REQ - ofs, "%d,", len); memcpy(req + ofs, tmp, len + 1); ofs += len; } else ofs += snprintf(req + ofs, MAX_REQ - ofs, "0,"); strncat(req, "\",\"0,\"\r", MAX_REQ - ofs); ofs += 7; req[ofs] = 0; if (sm_message_send(ofs, GN_OP_WritePhonebook, req, state)) return GN_ERR_NOTREADY; return sm_block_no_retry(GN_OP_WritePhonebook, data, state); } #undef MAX_REQ static gn_error AT_CallDivert(gn_data *data, struct gn_statemachine *state) { char req[64]; int ctype; if (!data->call_divert) return GN_ERR_UNKNOWN; switch (data->call_divert->ctype) { case GN_CDV_VoiceCalls: ctype = 1; break; case GN_CDV_FaxCalls: ctype = 2; break; case GN_CDV_DataCalls: ctype = 4; break; default: ctype = 7; break; } if (data->call_divert->operation == GN_CDV_Register) { /* * Nokias do not like zero timeout: * * AT+CCFC=0,3,"123456789",129,7,,,0 * ERROR * * AT+CCFC=0,3,"123456789",129,7,,,10 * OK * * AT+CCFC=0,3,"123456789",129,7 * OK */ if (data->call_divert->timeout) snprintf(req, sizeof(req), "AT+CCFC=%d,%d,\"%s\",%d,%d,,,%d\r", data->call_divert->type, data->call_divert->operation, data->call_divert->number.number, data->call_divert->number.type, ctype, data->call_divert->timeout); else snprintf(req, sizeof(req), "AT+CCFC=%d,%d,\"%s\",%d,%d\r", data->call_divert->type, data->call_divert->operation, data->call_divert->number.number, data->call_divert->number.type, ctype); } else { snprintf(req, sizeof(req), "AT+CCFC=%d,%d\r", data->call_divert->type, data->call_divert->operation); } if (sm_message_send(strlen(req), GN_OP_CallDivert, req, state)) return GN_ERR_NOTREADY; /* Divert commands are slow */ return sm_block_no_retry_timeout(GN_OP_CallDivert, 2000, data, state); } static gn_error AT_SetPDUMode(gn_data *data, struct gn_statemachine *state) { gn_error error; at_driver_instance *drvinst = AT_DRVINST(state); /* If we're already in PDU mode don't send this AT command again */ if (drvinst->pdumode) return GN_ERR_NONE; if (sm_message_send(10, GN_OP_AT_SetPDUMode, "AT+CMGF=0\r", state)) return GN_ERR_NOTREADY; error = sm_block_no_retry(GN_OP_AT_SetPDUMode, data, state); /* If we successfully changed mode to PDU, let's store this information */ if (error == GN_ERR_NONE) drvinst->pdumode = 1; return error; } static gn_error AT_GetSMSFolders(gn_data *data, struct gn_statemachine *state) { gn_error ret; if (!data || !data->sms_folder_list) return GN_ERR_INTERNALERROR; ret = sm_message_send(10, GN_OP_GetSMSFolders, "AT+CPMS=?\r", state); if (ret != GN_ERR_NONE) return ret; return sm_block_no_retry(GN_OP_GetSMSFolders, data, state); } static gn_error AT_GetSMSStatusInternal(gn_data *data, struct gn_statemachine *state) { gn_error ret; if (!data->sms_status) return GN_ERR_INTERNALERROR; if (data->memory_status) { ret = AT_SetSMSMemoryType(data->memory_status->memory_type, state); if (ret != GN_ERR_NONE) return ret; } ret = sm_message_send(9, GN_OP_GetSMSStatus, "AT+CPMS?\r", state); if (ret != GN_ERR_NONE) return GN_ERR_NOTREADY; return sm_block_no_retry(GN_OP_GetSMSStatus, data, state); } static gn_error AT_GetSMSFolderStatus(gn_data *data, struct gn_statemachine *state) { gn_sms_status smsstatus = {0, 0, 0, 0, GN_MT_XX}, *save_smsstatus; gn_memory_status memory_status = {GN_MT_ME, 0, 0}, *save_memory_status; gn_error ret; memory_status.memory_type = data->sms_folder->folder_id; /* * This driver needs some structures that other drivers don't need * and the callers (eg. gnokii) may not be aware of that * so always use a local copy. */ save_smsstatus = data->sms_status; data->sms_status = &smsstatus; save_memory_status = data->memory_status; data->memory_status = &memory_status; ret = AT_GetSMSStatusInternal(data, state); data->memory_status = save_memory_status; data->sms_status = save_smsstatus; if (ret != GN_ERR_NONE) return ret; data->sms_folder->number = smsstatus.number; return GN_ERR_NONE; } static gn_error AT_GetSMSStatus(gn_data *data, struct gn_statemachine *state) { gn_sms_status smsstatus = {0, 0, 0, 0, GN_MT_XX}, *save_smsstatus; gn_memory_status memory_status = {GN_MT_ME, 0, 0}, *save_memory_status; gn_error ret_me, ret_sm; save_smsstatus = data->sms_status; data->sms_status = &smsstatus; save_memory_status = data->memory_status; data->memory_status = &memory_status; ret_me = AT_GetSMSStatusInternal(data, state); if (ret_me == GN_ERR_NONE) save_smsstatus->number = smsstatus.number; data->memory_status->memory_type = GN_MT_SM; ret_sm = AT_GetSMSStatusInternal(data, state); if (ret_sm == GN_ERR_NONE) save_smsstatus->number += smsstatus.number; data->memory_status = save_memory_status; data->sms_status = save_smsstatus; /* Don't fail if phone (or data card) supports at least one memory type */ if ((ret_me != GN_ERR_NONE) && (ret_sm != GN_ERR_NONE)) return ret_me; return GN_ERR_NONE; } static gn_error AT_SendSMS(gn_data *data, struct gn_statemachine *state) { return AT_WriteSMS(data, state, "CMGS"); } static gn_error AT_SaveSMS(gn_data *data, struct gn_statemachine *state) { gn_error ret; ret = AT_SetSMSMemoryType(data->raw_sms->memory_type, state); if (ret) return ret; return AT_WriteSMS(data, state, "CMGW"); } static gn_error AT_WriteSMS(gn_data *data, struct gn_statemachine *state, unsigned char *cmd) { unsigned char req[10240], req2[5120]; gn_error error; unsigned int length, tmp, offset = 0; at_driver_instance *drvinst = AT_DRVINST(state); if (!data->raw_sms) return GN_ERR_INTERNALERROR; /* Select PDU mode */ error = state->driver.functions(GN_OP_AT_SetPDUMode, data, state); if (error) { dprintf("PDU mode is not supported by the phone. This mobile supports only TEXT mode\nwhile gnokii supports only PDU mode.\n"); return error; } dprintf("PDU mode set\n"); /* Prepare the message and count the size */ if (drvinst->no_smsc) { /* not even a length byte included */ offset--; } else { memcpy(req2, data->raw_sms->message_center, data->raw_sms->message_center[0] + 1); offset += data->raw_sms->message_center[0]; } /* Validity period in relative format */ req2[offset + 1] = 0x01 | 0x10; if (data->raw_sms->reject_duplicates) req2[offset + 1] |= 0x04; if (data->raw_sms->report) req2[offset + 1] |= 0x20; if (data->raw_sms->udh_indicator) req2[offset + 1] |= 0x40; if (data->raw_sms->reply_via_same_smsc) req2[offset + 1] |= 0x80; req2[offset + 2] = 0x00; /* Message Reference */ tmp = data->raw_sms->remote_number[0]; if (tmp % 2) tmp++; tmp /= 2; memcpy(req2 + offset + 3, data->raw_sms->remote_number, tmp + 2); offset += tmp + 1; req2[offset + 4] = data->raw_sms->pid; req2[offset + 5] = data->raw_sms->dcs; req2[offset + 6] = 0xaa; /* Validity period */ req2[offset + 7] = data->raw_sms->length; memcpy(req2 + offset + 8, data->raw_sms->user_data, data->raw_sms->user_data_length); length = data->raw_sms->user_data_length + offset + 8; /* Length in AT mode is the length of the full message minus * SMSC field length */ if (drvinst->no_smsc) { snprintf(req, sizeof(req), "AT+%s=%d\r", cmd, length); } else { snprintf(req, sizeof(req), "AT+%s=%d\r", cmd, length - data->raw_sms->message_center[0] - 1); } dprintf("Sending initial sequence\n"); if (sm_message_send(strlen(req), GN_OP_AT_Prompt, req, state)) return GN_ERR_NOTREADY; error = sm_block_no_retry(GN_OP_AT_Prompt, data, state); dprintf("Got response: %s\n", gn_error_print(error)); if (error) return error; bin2hex(req, req2, length); req[length * 2] = 0x1a; req[length * 2 + 1] = 0; dprintf("Sending frame: %s\n", req); if (sm_message_send(strlen(req), GN_OP_SendSMS, req, state)) return GN_ERR_NOTREADY; do { error = sm_block_no_retry_timeout(GN_OP_SendSMS, state->config.smsc_timeout, data, state); } while (!state->config.smsc_timeout && error == GN_ERR_TIMEOUT); return error; } static gn_error AT_GetSMS(gn_data *data, struct gn_statemachine *state) { /* Sony Ericsson can return on notification a location that is 9-digits long */ unsigned char req[32]; gn_error err; err = AT_SetSMSMemoryType(data->raw_sms->memory_type, state); if (err) return err; err = state->driver.functions(GN_OP_AT_SetPDUMode, data, state); if (err) { dprintf("PDU mode is not supported by the phone. This mobile supports only TEXT mode\nwhile gnokii supports only PDU mode.\n"); return err; } dprintf("PDU mode set\n"); snprintf(req, sizeof(req), "AT+CMGR=%d\r", data->raw_sms->number); if (sm_message_send(strlen(req), GN_OP_GetSMS, req, state)) return GN_ERR_NOTREADY; return sm_block_no_retry(GN_OP_GetSMS, data, state); } static gn_error AT_DeleteSMS(gn_data *data, struct gn_statemachine *state) { unsigned char req[32]; gn_error err; err = AT_SetSMSMemoryType(data->raw_sms->memory_type, state); if (err) return err; snprintf(req, sizeof(req), "AT+CMGD=%d\r", data->sms->number); if (sm_message_send(strlen(req), GN_OP_DeleteSMS, req, state)) return GN_ERR_NOTREADY; return sm_block_no_retry(GN_OP_DeleteSMS, data, state); } /* * Hey nokia users. don't expect this to return anything useful. * You can't read the number set by the phone menu with this command, * nor can you change this number by AT commands. Worse, an ATZ will * clear a SMS Center Number set by AT commands. This doesn't affect * the number set by the phone menu. */ static gn_error AT_GetSMSCenter(gn_data *data, struct gn_statemachine *state) { /* AT protocol supports only one SMS Center */ if (data->message_center && data->message_center->id != 1) return GN_ERR_INVALIDLOCATION; at_set_charset(data, state, AT_CHAR_GSM); if (sm_message_send(9, GN_OP_GetSMSCenter, "AT+CSCA?\r", state)) return GN_ERR_NOTREADY; return sm_block_no_retry(GN_OP_GetSMSCenter, data, state); } #ifdef SECURITY static gn_error AT_GetSecurityCodeStatus(gn_data *data, struct gn_statemachine *state) { if (sm_message_send(9, GN_OP_GetSecurityCodeStatus, "AT+CPIN?\r", state)) return GN_ERR_NOTREADY; return sm_block_no_retry(GN_OP_GetSecurityCodeStatus, data, state); } static gn_error AT_EnterSecurityCode(gn_data *data, struct gn_statemachine *state) { unsigned char req[32]; if (data->security_code->type != GN_SCT_Pin) return GN_ERR_NOTIMPLEMENTED; snprintf(req, sizeof(req), "AT+CPIN=\"%s\"\r", data->security_code->code); if (sm_message_send(strlen(req), GN_OP_EnterSecurityCode, req, state)) return GN_ERR_NOTREADY; return sm_block_no_retry(GN_OP_EnterSecurityCode, data, state); } #endif static gn_error AT_DialVoice(gn_data *data, struct gn_statemachine *state) { unsigned char req[32]; if (!data->call_info) return GN_ERR_INTERNALERROR; snprintf(req, sizeof(req), "ATD%s;\r", data->call_info->number); if (sm_message_send(strlen(req), GN_OP_MakeCall, req, state)) return GN_ERR_NOTREADY; return sm_block_no_retry(GN_OP_MakeCall, data, state); } static gn_error AT_AnswerCall(gn_data *data, struct gn_statemachine *state) { if (sm_message_send(4, GN_OP_AnswerCall, "ATA\r", state)) return GN_ERR_NOTREADY; return sm_block_no_retry(GN_OP_AnswerCall, data, state); } static gn_error AT_CancelCall(gn_data *data, struct gn_statemachine *state) { if (sm_message_send(8, GN_OP_CancelCall, "AT+CHUP\r", state)) return GN_ERR_NOTREADY; return sm_block_no_retry(GN_OP_CancelCall, data, state); } static gn_error AT_SetCallNotification(gn_data *data, struct gn_statemachine *state) { at_driver_instance *drvinst = AT_DRVINST(state); gn_error err; if (!drvinst->call_notification && !data->call_notification) return GN_ERR_NONE; if (!drvinst->call_notification) { if (sm_message_send(9, GN_OP_SetCallNotification, "AT+CRC=1\r", state)) return GN_ERR_NOTREADY; if ((err = sm_block_no_retry(GN_OP_SetCallNotification, data, state)) != GN_ERR_NONE) return err; if (sm_message_send(10, GN_OP_SetCallNotification, "AT+CLIP=1\r", state)) return GN_ERR_NOTREADY; /* Ignore errors when we can't set Call Line Identity, just set that we * don't handle it */ if (sm_block_no_retry(GN_OP_SetCallNotification, data, state) == GN_ERR_NONE) drvinst->clip_supported = 1; if (sm_message_send(10, GN_OP_SetCallNotification, "AT+CLCC=1\r", state)) return GN_ERR_NOTREADY; /* Ignore errors when we can't set List Current Calls notifications */ sm_block_no_retry(GN_OP_SetCallNotification, data, state); } drvinst->call_notification = data->call_notification; drvinst->call_callback_data = data->callback_data; return GN_ERR_NONE; } static gn_error AT_GetNetworkInfo(gn_data *data, struct gn_statemachine *state) { at_driver_instance *drvinst = AT_DRVINST(state); /* * AT+CREG enables +CREG notifications, so register notification * callback. */ drvinst->reg_notification = data->reg_notification; drvinst->reg_callback_data = data->callback_data; if (!data->network_info) return GN_ERR_INTERNALERROR; if (!drvinst->extended_reg_status) { if (sm_message_send(10, GN_OP_GetNetworkInfo, "AT+CREG=?\r", state)) return GN_ERR_NOTREADY; /* Let's ignore the error. We try to get as much as possible */ sm_block_no_retry(GN_OP_GetNetworkInfo, data, state); } /* * We only check the registration status when the phone supports it. * What we want in fact is the LAC ID and CELL ID. */ if (drvinst->extended_reg_status == 2) { if (sm_message_send(10, GN_OP_GetNetworkInfo, "AT+CREG=2\r", state)) return GN_ERR_NOTREADY; /* Let's ignore the error. We try to get as much as possible */ sm_block_no_retry(GN_OP_GetNetworkInfo, data, state); if (sm_message_send(9, GN_OP_GetNetworkInfo, "AT+CREG?\r", state)) return GN_ERR_NOTREADY; /* Let's ignore the error. We try to get as much as possible */ sm_block_no_retry(GN_OP_GetNetworkInfo, data, state); } /* * We want to get the network information in the numerical format (network code). * Format of the command is as follows: * AT+COPS=,, * can be one of the following: * 0 - automatic mode ( is ignored) * 1 - manual mode ( is required) * 2 - unregister from the network * 3 - set field * 4 - mixed manual and automatic mode (if manual fails, go into the automatic mode) * can be one of the following: * 0 - long alphanumeric format (max 16 chars) * 1 - short alphanumeric format * 2 - numeric format (LAI) * should be alphanumeric network name or network code according to value */ if (sm_message_send(12, GN_OP_GetNetworkInfo, "AT+COPS=3,2\r", state)) return GN_ERR_NOTREADY; /* Ignore the error. Nokias do not support this command and give always network code. */ sm_block_no_retry(GN_OP_GetNetworkInfo, data, state); if (sm_message_send(9, GN_OP_GetNetworkInfo, "AT+COPS?\r", state)) return GN_ERR_NOTREADY; sm_block_no_retry(GN_OP_GetNetworkInfo, data, state); return GN_ERR_NONE; } static gn_error AT_SetDateTime(gn_data *data, struct gn_statemachine *state) { at_driver_instance *drvinst = AT_DRVINST(state); char req[64]; gn_timestamp aux; gn_timestamp *dt = data->datetime; memset(&aux, 0, sizeof(gn_timestamp)); /* Make sure GetDateTime doesn't overwrite dt */ data->datetime = &aux; /* ignore errors */ AT_GetDateTime(data, state); AT_PrepareDateTime(data, state); data->datetime = dt; if (drvinst->timezone) snprintf(req, sizeof(req), "AT+CCLK=\"%02d/%02d/%02d,%02d:%02d:%02d%s\"\r", dt->year % 100, dt->month, dt->day, dt->hour, dt->minute, dt->second, drvinst->timezone); else snprintf(req, sizeof(req), "AT+CCLK=\"%02d/%02d/%02d,%02d:%02d:%02d\"\r", dt->year % 100, dt->month, dt->day, dt->hour, dt->minute, dt->second); if (sm_message_send(strlen(req), GN_OP_SetDateTime, req, state)) return GN_ERR_NOTREADY; return sm_block_no_retry(GN_OP_SetDateTime, data, state); } static gn_error AT_GetDateTime(gn_data *data, struct gn_statemachine *state) { if (sm_message_send(9, GN_OP_GetDateTime, "AT+CCLK?\r", state)) return GN_ERR_NOTREADY; return sm_block_no_retry(GN_OP_GetDateTime, data, state); } static gn_error AT_PrepareDateTime(gn_data *data, struct gn_statemachine *state) { if (sm_message_send(10, GN_OP_AT_PrepareDateTime, "AT+CCLK=?\r", state)) return GN_ERR_NOTREADY; return sm_block_no_retry(GN_OP_AT_PrepareDateTime, data, state); } /* * This command allows to send DTMF tones and arbitrary tones. * DTMF is a single ASCII character in the set 0-9, *, #, A-D * FIXME: tone and duration parameters are not yet supported */ static gn_error AT_SendDTMF(gn_data *data, struct gn_statemachine *state) { gn_error error = GN_ERR_NONE; unsigned char req[32]; int len, i, dtmf_len; if (!data || !data->dtmf_string) return GN_ERR_INTERNALERROR; dtmf_len = strlen(data->dtmf_string); if (dtmf_len < 1) return GN_ERR_WRONGDATAFORMAT; /* First let's check out if the command is supported by the phone */ len = snprintf(req, sizeof(req), "AT+VTS=?\r"); if (sm_message_send(len, GN_OP_SendDTMF, req, state)) return GN_ERR_NOTREADY; if (sm_block_no_retry(GN_OP_SendDTMF, data, state) != GN_ERR_NONE) return GN_ERR_NOTSUPPORTED; /* Send it char by char */ for (i = 0; i < dtmf_len; i++) { len = snprintf(req, sizeof(req), "AT+VTS=%c\r", data->dtmf_string[i]); if (sm_message_send(len, GN_OP_SendDTMF, req, state)) return GN_ERR_NOTREADY; error = sm_block_no_retry(GN_OP_SendDTMF, data, state); if (error) break; } return error; } static gn_error AT_GetActiveCalls(gn_data *data, struct gn_statemachine *state) { if (sm_message_send(8, GN_OP_GetActiveCalls, "AT+CPAS\r", state)) return GN_ERR_NOTREADY; return sm_block_no_retry(GN_OP_GetActiveCalls, data, state); } static gn_error AT_OnSMS(gn_data *data, struct gn_statemachine *state) { at_driver_instance *drvinst = AT_DRVINST(state); gn_error error; int mode; char req[13]; mode = drvinst->cnmi_mode; do { snprintf(req, sizeof(req), "AT+CNMI=%d,1\r", mode); if (sm_message_send(strlen(req), GN_OP_OnSMS, req, state)) return GN_ERR_NOTREADY; error = sm_block_no_retry(GN_OP_OnSMS, data, state); } while (mode-- && error); if (error == GN_ERR_NONE) { AT_DRVINST(state)->on_sms = data->on_sms; AT_DRVINST(state)->sms_callback_data = data->callback_data; } return error; } static gn_error AT_GetSMSMemorySize(gn_data *data, struct gn_statemachine *state) { if (sm_message_send(18, GN_OP_AT_GetSMSMemorySize, "AT+CPMS=\"ME\",\"SM\"\r", state)) return GN_ERR_NOTREADY; return sm_block_no_retry(GN_OP_AT_GetSMSMemorySize, data, state); } static gn_error ReplyReadPhonebook(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state) { at_driver_instance *drvinst = AT_DRVINST(state); at_line_buffer buf; char *pos; gn_error error; error = at_error_get(buffer, state); switch (error) { case GN_ERR_NONE: break; case GN_ERR_FAILED: /* Some phones return "+CME ERROR: 3" for invalid locations */ /* Fall through */ case GN_ERR_UNKNOWN: /* Some phones return "+CME ERROR: 100" instead of "OK" for empty locations */ if (data->phonebook_entry->location >= drvinst->memoryoffset && data->phonebook_entry->location < drvinst->memoryoffset + drvinst->memorysize) { return GN_ERR_EMPTYLOCATION; } return GN_ERR_INVALIDLOCATION; default: return error; } buf.line1 = buffer + 1; buf.length = length; splitlines(&buf); if (strncmp(buf.line1, "AT+CPBR", 7)) { return GN_ERR_UNKNOWN; } if (!strncmp(buf.line2, "OK", 2)) { /* Empty phonebook location found */ if (data->phonebook_entry) { *(data->phonebook_entry->number) = '\0'; *(data->phonebook_entry->name) = '\0'; data->phonebook_entry->caller_group = GN_PHONEBOOK_GROUP_None; data->phonebook_entry->subentries_count = 0; data->phonebook_entry->empty = true; } return GN_ERR_NONE; } if (data->phonebook_entry) { char *part[6]; int parts, quoted; data->phonebook_entry->caller_group = GN_PHONEBOOK_GROUP_None; data->phonebook_entry->subentries_count = 0; data->phonebook_entry->empty = false; /* split in several parts a line like +CPBR: 1,"123",129,"Name","2008/03/19,18:57" part[] must have one more item than the string, otherwise the last *part will point to string tail commas can appear unescaped inside quotes quotes can appear only as delimiters */ part[0] = pos = buf.line2 + 7; for (parts = 1; parts < (sizeof(part) / sizeof(*part)); parts++) part[parts] = NULL; quoted = 0; parts = 1; while (*pos && (parts < (sizeof(part) / sizeof(*part)))) { switch (*pos) { case '"': quoted = !quoted; break; case ',': if (!quoted) { *pos = '\0'; part[parts] = pos + 1; /* Some phones add a space after a comma */ while (*part[parts] == ' ') part[parts]++; parts++; } break; } pos++; } /* DEBUG */ for (parts = 0; parts < (sizeof(part) / sizeof(*part)) && part[parts]; parts++) { dprintf("part[%d] = \"%s\"\n", parts, part[parts]); } /* store number */ pos = part[1]; if (pos) { dprintf("NUMBER: %s\n", pos); pos = strip_quotes(pos); if (drvinst->encode_number) at_decode(drvinst->charset, data->phonebook_entry->number, pos, strlen(pos), drvinst->ucs2_as_utf8); else snprintf(data->phonebook_entry->number, sizeof(data->phonebook_entry->number), "%s", pos); } /* store name */ pos = part[3]; if (pos) { dprintf("NAME: %s\n", pos); pos = strip_quotes(pos); at_decode(drvinst->charset, data->phonebook_entry->name, pos, strlen(pos), drvinst->ucs2_as_utf8); } /* store date/time (usually sent with DC, MC, RC entries) */ pos = part[4]; if (pos) { char *date_buf = NULL; dprintf("DATE: %s\n", pos); if (*pos == '"') pos++; if (drvinst->encode_number) { date_buf = calloc(strlen(pos) + 1, sizeof(char)); at_decode(drvinst->charset, date_buf, pos, strlen(pos), drvinst->ucs2_as_utf8); pos = date_buf; dprintf("DATE: %s\n", pos); } /* seconds may not be present */ data->phonebook_entry->date.second = 0; if (sscanf(pos, "%d/%d/%d,%d:%d:%d", &data->phonebook_entry->date.year, &data->phonebook_entry->date.month, &data->phonebook_entry->date.day, &data->phonebook_entry->date.hour, &data->phonebook_entry->date.minute, &data->phonebook_entry->date.second) < 5) { /* not a fatal error */ data->phonebook_entry->date.year = 0; } free(date_buf); } } return GN_ERR_NONE; } static gn_error ReplyReadPhonebookExt(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state) { at_driver_instance *drvinst = AT_DRVINST(state); at_line_buffer buf; char *pos, *first_name, *last_name, *tmp; gn_error error; size_t len = 0; if ((error = at_error_get(buffer, state)) != GN_ERR_NONE) return (error == GN_ERR_UNKNOWN) ? GN_ERR_INVALIDLOCATION : error; buf.line1 = buffer + 1; buf.length = length; splitlines(&buf); if (strncmp(buf.line1, "AT+SPBR=", 8)) { return GN_ERR_UNKNOWN; } if (!strncmp(buf.line2, "OK", 2)) { /* Empty phonebook location found */ if (data->phonebook_entry) { data->phonebook_entry->number[0] = 0; data->phonebook_entry->name[0] = 0; data->phonebook_entry->caller_group = GN_PHONEBOOK_GROUP_None; data->phonebook_entry->subentries_count = 0; data->phonebook_entry->empty = true; } return GN_ERR_NONE; } if (strncmp(buf.line2, "+SPBR: ", 7)) return GN_ERR_UNKNOWN; if (data->phonebook_entry) { gn_phonebook_entry *entry = data->phonebook_entry; data->phonebook_entry->number[0] = 0; data->phonebook_entry->name[0] = 0; entry->caller_group = GN_PHONEBOOK_GROUP_None; entry->subentries_count = 0; entry->empty = false; pos = buf.line2; /* store sub entries */ pos = extpb_scan_entry(drvinst, pos, entry, GN_PHONEBOOK_ENTRY_Number, GN_PHONEBOOK_NUMBER_Mobile, 0); pos = extpb_scan_entry(drvinst, pos, entry, GN_PHONEBOOK_ENTRY_Number, GN_PHONEBOOK_NUMBER_Home, 0); pos = extpb_scan_entry(drvinst, pos, entry, GN_PHONEBOOK_ENTRY_Number, GN_PHONEBOOK_NUMBER_Work, 0); pos = extpb_scan_entry(drvinst, pos, entry, GN_PHONEBOOK_ENTRY_Number, GN_PHONEBOOK_NUMBER_Fax, 0); pos = extpb_scan_entry(drvinst, pos, entry, GN_PHONEBOOK_ENTRY_Number, GN_PHONEBOOK_NUMBER_General, 0); pos = extpb_scan_entry(drvinst, pos, entry, GN_PHONEBOOK_ENTRY_Email, GN_PHONEBOOK_NUMBER_None, 0); pos = extpb_scan_entry(drvinst, pos, entry, GN_PHONEBOOK_ENTRY_FirstName, GN_PHONEBOOK_NUMBER_None, 1); pos = extpb_scan_entry(drvinst, pos, entry, GN_PHONEBOOK_ENTRY_LastName, GN_PHONEBOOK_NUMBER_None, 1); pos = extpb_scan_entry(drvinst, pos, entry, GN_PHONEBOOK_ENTRY_Note, GN_PHONEBOOK_NUMBER_None, 1); /* compile a name out of first name + last name */ first_name = extpb_find_subentry(entry, GN_PHONEBOOK_ENTRY_FirstName); last_name = extpb_find_subentry(entry, GN_PHONEBOOK_ENTRY_LastName); if (first_name || last_name) { if (first_name) len += strlen(first_name); if (last_name) len += strlen(last_name); if (!(tmp = (char *)malloc(len + 2))) /* +2 for \0 and space */ return GN_ERR_INTERNALERROR; tmp[0] = 0; if (first_name) { if (strlen(first_name) + strlen(entry->name) + 1 > sizeof(entry->name)) { free(tmp); return GN_ERR_FAILED; } strncat(entry->name, first_name, strlen(first_name)); if (last_name) strncat(entry->name, " ", strlen(" ")); } if (last_name) { if (strlen(last_name) + strlen(entry->name) + 1 > sizeof(entry->name)) { free(tmp); return GN_ERR_FAILED; } strncat(entry->name, last_name, strlen (last_name)); } free(tmp); } } return GN_ERR_NONE; } static gn_error ReplyGetSMSCenter(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state) { at_line_buffer buf; unsigned char *pos, *aux; gn_error error; if ((error = at_error_get(buffer, state)) != GN_ERR_NONE) return error; buf.line1 = buffer + 1; buf.length= length; splitlines(&buf); if (data->message_center && strstr(buf.line2, "+CSCA")) { pos = strchr(buf.line2 + 8, '\"'); if (pos) { *pos++ = '\0'; data->message_center->id = 1; snprintf(data->message_center->smsc.number, GN_BCD_STRING_MAX_LENGTH, "%s", buf.line2 + 8); /* Now we look for the number type */ aux = strchr(pos, ','); if (aux) data->message_center->smsc.type = atoi(++aux); else if (data->message_center->smsc.number[0] == '+') data->message_center->smsc.type = GN_GSM_NUMBER_International; else data->message_center->smsc.type = GN_GSM_NUMBER_Unknown; } else { data->message_center->id = 0; data->message_center->smsc.type = GN_GSM_NUMBER_Unknown; } /* Set a default SMSC name because +CSCA doesn't provide one */ snprintf(data->message_center->name, sizeof(data->message_center->name), _("Set %d"), data->message_center->id); data->message_center->default_name = data->message_center->id; /* FIXME? following information is given by AT+CSMP (if supported by phone) but is valid only for text mode */ data->message_center->format = GN_SMS_MF_Text; /* whatever */ data->message_center->validity = GN_SMS_VP_Max; data->message_center->recipient.number[0] = 0; } return GN_ERR_NONE; } static gn_error ReplyMemoryStatus(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state) { at_driver_instance *drvinst = AT_DRVINST(state); at_line_buffer buf; char *pos; gn_error error; if ((error = at_error_get(buffer, state)) != GN_ERR_NONE) return (error == GN_ERR_UNKNOWN) ? GN_ERR_INVALIDMEMORYTYPE : error; buf.line1 = buffer + 1; buf.length= length; splitlines(&buf); if (data->memory_status && strstr(buf.line2, "+CPBS")) { pos = strchr(buf.line2, ','); if (pos) { data->memory_status->used = atoi(++pos); } else { data->memory_status->used = drvinst->memorysize; data->memory_status->free = 0; return GN_ERR_NOTSUPPORTED; } pos = strchr(pos, ','); if (pos) { data->memory_status->free = atoi(++pos) - data->memory_status->used; } else { return GN_ERR_UNKNOWN; } } return GN_ERR_NONE; } static gn_error Parse_ReplyMemoryRange(gn_data *data, struct gn_statemachine *state) { at_driver_instance *drvinst = AT_DRVINST(state); char *r, *s, *t, *pos; char key[7]; snprintf(key, 7, "%s%s", "CPBR", gn_memory_type2str(drvinst->memorytype)); r = strdup(map_get(&drvinst->cached_capabilities, key, 0)); s = r + 7; pos = strchr(s, ','); if (pos) { *pos = '\0'; s = strip_brackets(s); t = strchr(s, '-'); if (t) { int first, last; first = atoi(s); last = atoi(t+1); drvinst->memoryoffset = first - 1; dprintf("Memory offset: %d\n", drvinst->memoryoffset); drvinst->memorysize = last - first + 1; dprintf("Memory size: %d\n", drvinst->memorysize); } } free(r); return GN_ERR_NONE; } /* * Response of of a form: * +CPBR: (list of supported indexes), , * list of supported indexes is usually in 1, 2500 form * nlength is the maximal length of the number * tlength is the maximal length of the name */ static gn_error ReplyMemoryRange(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state) { at_driver_instance *drvinst = AT_DRVINST(state); at_line_buffer buf; gn_error error; drvinst->memoryoffset = 0; drvinst->memorysize = 100; if ((error = at_error_get(buffer, state)) != GN_ERR_NONE) return error; buf.line1 = buffer + 1; buf.length= length; splitlines(&buf); if (strncmp(buf.line2, "+CPBR: ", 7) == 0) { char key[7]; snprintf(key, 7, "%s%s", "CPBR", gn_memory_type2str(drvinst->memorytype)); map_add(&drvinst->cached_capabilities, strdup(key), strdup(buf.line2)); Parse_ReplyMemoryRange(data, state); } return GN_ERR_NONE; } /* * Parse a response similar to * +CBC: 0, 50 * see subclause 8.4 of ETSI TS 127 007 V8.6.0 (2009-01) */ static gn_error Parse_ReplyGetBattery(gn_data *data, struct gn_statemachine *state) { at_driver_instance *drvinst = AT_DRVINST(state); const char *line, *pos; char key[4]; snprintf(key, 4, "CBC"); line = map_get(&drvinst->cached_capabilities, key, 1); if (data->battery_level) { if (data->battery_unit) *(data->battery_unit) = GN_BU_Percentage; pos = strchr(line, ','); if (pos) { pos++; *(data->battery_level) = atoi(pos); } else { *(data->battery_level) = 1; } } if (data->power_source) { pos = line + strlen("+CBC: "); switch (*pos) { case '0': *(data->power_source) = GN_PS_BATTERY; break; case '1': *(data->power_source) = GN_PS_ACDC; break; case '2': *(data->power_source) = GN_PS_NOBATTERY; break; case '3': *(data->power_source) = GN_PS_FAULT; break; default: dprintf("Unknown power status '%c'\n", *pos); *(data->power_source) = GN_PS_UNKNOWN; } } return GN_ERR_NONE; } /* * Let's cache it. --monitor calls it twice to get battery level * and battery source. */ static gn_error ReplyGetBattery(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state) { at_driver_instance *drvinst = AT_DRVINST(state); at_line_buffer buf; gn_error error; if ((error = at_error_get(buffer, state)) != GN_ERR_NONE) return error; buf.line1 = buffer + 1; buf.length= length; splitlines(&buf); if (!strncmp(buf.line1, "AT+CBC", 6) && !strncmp(buf.line2, "+CBC: ", 6)) { char key[4]; snprintf(key, 4, "CBC"); map_add(&drvinst->cached_capabilities, strdup(key), strdup(buf.line2)); Parse_ReplyGetBattery(data, state); } return GN_ERR_NONE; } static gn_error ReplyGetRFLevel(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state) { at_line_buffer buf; char *pos1, *pos2; gn_error error; if ((error = at_error_get(buffer, state)) != GN_ERR_NONE) return error; buf.line1 = buffer + 1; buf.length= length; splitlines(&buf); if (data->rf_unit && !strncmp(buf.line1, "AT+CSQ", 6)) { /* FIXME realy needed? */ *(data->rf_unit) = GN_RF_CSQ; pos1 = buf.line2 + 6; pos2 = strchr(buf.line2, ','); if (pos1 < pos2) { *(data->rf_level) = atoi(pos1); } else { *(data->rf_level) = 1; } } return GN_ERR_NONE; } static gn_error ReplyIdentify(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state) { at_line_buffer buf; gn_error error; if ((error = at_error_get(buffer, state)) != GN_ERR_NONE) return error; buf.line1 = buffer + 1; buf.length = length; splitlines(&buf); if (!strncmp(buf.line1, "AT+CG", 5)) { reply_simpletext(buf.line1+2, buf.line2, "+CGSN: ", data->imei, GN_IMEI_MAX_LENGTH); if (!data->model[0]) reply_simpletext(buf.line1+2, buf.line2, "+CGMM: ", data->model, GN_MODEL_MAX_LENGTH); reply_simpletext(buf.line1+2, buf.line2, "+CGMI: ", data->manufacturer, GN_MANUFACTURER_MAX_LENGTH); reply_simpletext(buf.line1+2, buf.line2, "+CGMR: ", data->revision, GN_REVISION_MAX_LENGTH); if (!data->model[0]) reply_simpletext(buf.line1+2, buf.line4, "+CGMR: ", data->model, GN_MODEL_MAX_LENGTH); } else if (!strncmp(buf.line1, "AT+G", 4)) { reply_simpletext(buf.line1+2, buf.line2, "+GSN: ", data->imei, GN_IMEI_MAX_LENGTH); if (!data->model[0]) reply_simpletext(buf.line1+2, buf.line2, "+GMM: ", data->model, GN_MODEL_MAX_LENGTH); reply_simpletext(buf.line1+2, buf.line2, "+GMI: ", data->manufacturer, GN_MANUFACTURER_MAX_LENGTH); reply_simpletext(buf.line1+2, buf.line2, "+GMR: ", data->revision, GN_REVISION_MAX_LENGTH); } return GN_ERR_NONE; } static gn_error ReplyCallDivert(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state) { /* FIXME: handle query responses */ return at_error_get(buffer, state); } static gn_error ReplyGetPrompt(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state) { switch (buffer[0]) { case GN_AT_PROMPT: return GN_ERR_NONE; case GN_AT_OK: return GN_ERR_INTERNALERROR; default: return at_error_get(buffer, state); } } static gn_error ReplyGetSMSFolders(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state) { at_line_buffer buf; gn_error error; char *pos, *memory_name, *line = NULL; char **items; int i, n; gn_memory_type memory_type; if ((error = at_error_get(buffer, state)) != GN_ERR_NONE) return error; buf.line1 = buffer + 1; buf.length = length; splitlines(&buf); /* * Samsung SHG-L760 answers with (no command echo): * >+CPMS: ("ME","MT","SM","SR"),("ME","MT","SM","SR"),("ME","MT","SM","SR") * > * >OK */ if (!strncmp("+CPMS:", buf.line1, 6)) line = buf.line1; /* * Nokia 6230i (and most of the phones) answer with (command echo): * >AT+CPMS=? * >+CPMS: ("ME","SM"),("ME","SM"),("MT") * > * >OK */ if (!strncmp("+CPMS:", buf.line2, 6)) line = buf.line2; if (!line) return GN_ERR_INTERNALERROR; /* * Split a string like +CPMS: ("ME","SM"),("ME","SM"),("ME","SM") * can't use strip_brackets() because it will strip the last ')', * not the first. */ pos = line + 6; while (*pos && *pos != ')') pos++; *pos = '\0'; pos = buf.line2 + 6; while (*pos == ' ' || *pos == '(') pos++; items = gnokii_strsplit(pos, ",", 4); n = 0; for (i = 0; items[i]; i++) { memory_name = strip_quotes(items[i]); if ((memory_type = gn_str2memory_type(memory_name)) != GN_MT_XX) { data->sms_folder_list->folder_id[n] = memory_type; data->sms_folder_list->folder[n].folder_id = memory_type; snprintf(data->sms_folder_list->folder[n].name, sizeof(data->sms_folder_list->folder[0].name), "%s", gn_memory_type_print(memory_type)); n++; } else { dprintf("Ignoring unknown memory type \"%s\".\n", memory_name); } } data->sms_folder_list->number = n; gnokii_strfreev(items); return GN_ERR_NONE; } static gn_error ReplyGetSMSStatus(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state) { at_line_buffer buf; gn_error error; if ((error = at_error_get(buffer, state)) != GN_ERR_NONE) return error; buf.line1 = buffer + 1; buf.length = length; splitlines(&buf); if (sscanf(buf.line2, "+CPMS: \"%*[^\"]\",%d,%*d", &data->sms_status->number) != 1) return GN_ERR_FAILED; data->sms_status->unread = 0; data->sms_status->changed = 0; data->sms_status->folders_count = 0; return GN_ERR_NONE; } static gn_error ReplySendSMS(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state) { at_line_buffer buf; gn_error error; if ((error = at_error_get(buffer, state)) != GN_ERR_NONE) return error; buf.line1 = buffer + 1; buf.length = length; splitlines(&buf); if (!strncmp("+CMGW:", buf.line2, 6)) { /* SaveSMS */ data->raw_sms->number = atoi(buf.line2 + 6); dprintf("Message saved (location: %d)\n", data->raw_sms->number); } else if (!strncmp("+CMGS:", buf.line2, 6)) { /* SendSMS */ data->raw_sms->reference = atoi(buf.line2 + 6); dprintf("Message sent (reference: %d)\n", data->raw_sms->reference); } else { data->raw_sms->reference = -1; } return GN_ERR_NONE; } static gn_error ReplyGetSMS(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state) { at_line_buffer buf; gn_error ret = GN_ERR_NONE; unsigned int sms_len, pdu_flags; unsigned char *tmp; gn_error error; at_driver_instance *drvinst = AT_DRVINST(state); if ((error = at_error_get(buffer, state)) != GN_ERR_NONE) return error; buf.line1 = buffer + 1; buf.length = length; splitlines(&buf); if (!data->raw_sms) return GN_ERR_INTERNALERROR; /* Try to figure out the status first */ tmp = strchr(buf.line2, ','); if (tmp != NULL && ((char *) tmp - buf.line2 - strlen("+CMGR: ")) >= 1) { char *status; int len; len = (char *) tmp - buf.line2 - strlen("+CMGR: "); status = malloc(len + 1); if (!status) { dprintf("Not enough memory for buffer.\n"); return GN_ERR_INTERNALERROR; } memcpy(status, buf.line2 + strlen("+CMGR: "), len); status[len] = '\0'; if (strstr(status, "UNREAD")) { data->raw_sms->status = GN_SMS_Unread; } else if (strstr(status, "READ")) { data->raw_sms->status = GN_SMS_Read; } else if (strstr(status, "UNSENT")) { data->raw_sms->status = GN_SMS_Unsent; } else if (strstr(status, "SENT")) { data->raw_sms->status = GN_SMS_Sent; } else { int s; s = atoi(status); switch (s) { case 0: data->raw_sms->status = GN_SMS_Unread; break; case 1: data->raw_sms->status = GN_SMS_Read; break; case 2: data->raw_sms->status = GN_SMS_Unsent; break; case 3: data->raw_sms->status = GN_SMS_Sent; break; } } free(status); } tmp = strrchr(buf.line2, ','); /* The following sequence is correct for emtpy location: * w: AT+CMGR=9 * r: AT+CMGR=9 * : * : OK */ if (!tmp) return GN_ERR_EMPTYLOCATION; sms_len = atoi(tmp+1); if (sms_len == 0) return GN_ERR_EMPTYLOCATION; sms_len = strlen(buf.line3) / 2; tmp = calloc(sms_len, 1); if (!tmp) { dprintf("Not enough memory for buffer.\n"); return GN_ERR_INTERNALERROR; } dprintf("%s\n", buf.line3); hex2bin(tmp, buf.line3, sms_len); if (drvinst->no_smsc) { pdu_flags = GN_SMS_PDU_NOSMSC; } else { pdu_flags = GN_SMS_PDU_DEFAULT; } ret = gn_sms_pdu2raw(data->raw_sms, tmp, sms_len, pdu_flags); free(tmp); return ret; } /* ReplyGetCharset * * parses the reponse from a check for the actual charset or the * available charsets. a bracket in the response is taken as a request * for available charsets. */ static gn_error ReplyGetCharset(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state) { at_driver_instance *drvinst = AT_DRVINST(state); at_line_buffer buf; int i; gn_error error; if ((error = at_error_get(buffer, state)) != GN_ERR_NONE) return error; buf.line1 = buffer + 1; buf.length= length; splitlines(&buf); if (!strncmp(buf.line1, "AT+CSCS?", 8)) { /* return current charset */ drvinst->charset = AT_CHAR_UNKNOWN; i = 0; while (atcharsets[i].str && drvinst->charset == AT_CHAR_UNKNOWN) { if (strstr(buf.line2, atcharsets[i].str)) drvinst->charset = atcharsets[i].charset; i++; } return GN_ERR_NONE; } else if (!strncmp(buf.line1, "AT+CSCS=", 8)) { /* return available charsets */ drvinst->availcharsets = 0; i = 0; while (atcharsets[i].str) { if (strstr(buf.line2, atcharsets[i].str)) drvinst->availcharsets |= atcharsets[i].charset; i++; } return GN_ERR_NONE; } return GN_ERR_FAILED; } #ifdef SECURITY static gn_error ReplyGetSecurityCodeStatus(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state) { at_line_buffer buf; char *pos; gn_error error; if ((error = at_error_get(buffer, state)) != GN_ERR_NONE) return error; buf.line1 = buffer + 1; buf.length= length; splitlines(&buf); if (data->security_code && !strncmp(buf.line1, "AT+CPIN", 7)) { if (strncmp(buf.line2, "+CPIN: ", 7)) { data->security_code->type = 0; return GN_ERR_INTERNALERROR; } pos = 7 + buf.line2; if (!strncmp(pos, "READY", 5)) { data->security_code->type = GN_SCT_None; return GN_ERR_NONE; } if (!strncmp(pos, "SIM ", 4)) { pos += 4; if (!strncmp(pos, "PIN2", 4)) { data->security_code->type = GN_SCT_Pin2; } if (!strncmp(pos, "PUK2", 4)) { data->security_code->type = GN_SCT_Puk2; } if (!strncmp(pos, "PIN", 3)) { data->security_code->type = GN_SCT_Pin; } if (!strncmp(pos, "PUK", 3)) { data->security_code->type = GN_SCT_Puk; } } } return GN_ERR_NONE; } #endif static gn_error ReplyRing(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state) { at_driver_instance *drvinst = AT_DRVINST(state); at_line_buffer buf; char *pos; gn_call_info cinfo; gn_call_status status; if (!drvinst->call_notification) return GN_ERR_UNSOLICITED; buf.line1 = buffer; buf.length= length; splitlines(&buf); memset(&cinfo, 0, sizeof(cinfo)); cinfo.call_id = 1; if (!strncmp(buf.line1, "RING", 4)) { return GN_ERR_INTERNALERROR; /* AT+CRC=1 disables RING */ } else if (!strncmp(buf.line1, "+CRING: ", 8)) { pos = buf.line1 + 8; if (!strncmp(pos, "VOICE", 5)) cinfo.type = GN_CALL_Voice; else if (*pos < ' ') /* some phones reply with "+CRING: " only */ cinfo.type = GN_CALL_Voice; else return GN_ERR_UNHANDLEDFRAME; status = GN_CALL_Incoming; } else if (!strncmp(buf.line1, "CONNECT", 7)) { status = GN_CALL_Established; } else if (!strncmp(buf.line1, "BUSY", 4)) { status = GN_CALL_RemoteHangup; } else if (!strncmp(buf.line1, "NO ANSWER", 9)) { status = GN_CALL_RemoteHangup; } else if (!strncmp(buf.line1, "NO CARRIER", 10)) { status = GN_CALL_RemoteHangup; } else if (!strncmp(buf.line1, "NO DIALTONE", 11)) { status = GN_CALL_LocalHangup; } else if (!strncmp(buf.line1, "+CLIP: ", 7)) { char **items; int i; items = gnokii_strsplit(buf.line1 + 7, ",", 6); for (i = 0; i < 6; i++) { if (items[i] == NULL) break; switch (i) { /* Number, if known */ case 0: snprintf(cinfo.number, GN_PHONEBOOK_NUMBER_MAX_LENGTH, "%s", strip_quotes(items[i])); break; /* 1 == Number "type" * 2 == String type subaddress * 3 == Type of subaddress * All ignored */ case 1: case 2: case 3: break; /* Name, if known */ case 4: snprintf(cinfo.name, GN_PHONEBOOK_NAME_MAX_LENGTH, "%s", strip_quotes(items[i])); break; /* Validity of the name/number provided */ case 5: switch (atoi(items[i])) { case 1: snprintf(cinfo.name, GN_PHONEBOOK_NAME_MAX_LENGTH, _("Withheld")); break; case 2: snprintf(cinfo.name, GN_PHONEBOOK_NAME_MAX_LENGTH, _("Unknown")); break; } } } if (cinfo.name == NULL) snprintf(cinfo.name, GN_PHONEBOOK_NAME_MAX_LENGTH, _("Unknown")); cinfo.type = drvinst->last_call_type; drvinst->call_notification(drvinst->last_call_status, &cinfo, state, drvinst->call_callback_data); gnokii_strfreev(items); return GN_ERR_UNSOLICITED; } else if (!strncmp(buf.line1, "+CLCC: ", 7)) { char **items; int i; items = gnokii_strsplit(buf.line1 + 7, ",", 8); status = -1; for (i = 0; i < 8; i++) { if (items[i] == NULL) break; switch (i) { /* Call ID */ case 0: cinfo.call_id = atoi(items[i]); break; /* Incoming, or finishing call */ case 1: break; case 2: switch (atoi(items[i])) { case 0: status = GN_CALL_Established; break; case 1: status = GN_CALL_Held; break; case 2: status = GN_CALL_Dialing; break; case 3: /* Alerting, remote end is ringing */ status = GN_CALL_Ringing; break; case 4: status = GN_CALL_Incoming; break; case 5: /* FIXME Call is "Waiting" */ status = GN_CALL_Held; break; case 6: status = GN_CALL_LocalHangup; break; } break; case 3: if (atoi(items[i]) == 0) cinfo.type = GN_CALL_Voice; else { /* We don't handle non-voice calls */ gnokii_strfreev(items); return GN_ERR_UNHANDLEDFRAME; } break; /* Multiparty status */ case 4: break; case 5: snprintf(cinfo.number, GN_PHONEBOOK_NUMBER_MAX_LENGTH, "%s", strip_quotes (items[i])); break; /* Phone display format */ case 6: break; case 7: snprintf(cinfo.name, GN_PHONEBOOK_NAME_MAX_LENGTH, "%s", strip_quotes (items[i])); break; } } /* FIXME we don't handle calls > 1 anywhere else */ if (status < 0) { gnokii_strfreev(items); return GN_ERR_UNHANDLEDFRAME; } drvinst->call_notification(status, &cinfo, state, drvinst->call_callback_data); gnokii_strfreev(items); return GN_ERR_UNSOLICITED; } else { return GN_ERR_UNHANDLEDFRAME; } if (!drvinst->clip_supported || status != GN_CALL_Incoming) { drvinst->call_notification(status, &cinfo, state, drvinst->call_callback_data); } else { drvinst->last_call_status = status; drvinst->last_call_type = cinfo.type; } return GN_ERR_UNSOLICITED; } static gn_error ReplyIncomingSMS(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state) { at_driver_instance *drvinst = AT_DRVINST(state); at_line_buffer buf; char *memory, *pos; int index; gn_memory_type mem; int freesms = 0; gn_error error = GN_ERR_NONE; if (!drvinst->on_sms) return GN_ERR_UNSOLICITED; buf.line1 = buffer; buf.length= length; splitlines(&buf); mem = GN_MT_XX; if (strncmp(buf.line1, "+CMTI: ", 7)) return GN_ERR_UNSOLICITED; pos = strrchr(buf.line1, ','); if (pos == NULL) return GN_ERR_UNSOLICITED; pos[0] = '\0'; pos++; index = atoi(pos); memory = strip_quotes(buf.line1 + 7); if (memory == NULL) return GN_ERR_UNSOLICITED; mem = gn_str2memory_type(memory); if (mem == GN_MT_XX) return GN_ERR_UNSOLICITED; dprintf("Received message folder %s index %d\n", gn_memory_type2str(mem), index); if (!data->sms) { freesms = 1; data->sms = calloc(1, sizeof(gn_sms)); if (!data->sms) return GN_ERR_INTERNALERROR; } memset(data->sms, 0, sizeof(gn_sms)); data->sms->memory_type = mem; data->sms->number = index; dprintf("get sms %d\n", index); error = gn_sms_get(data, state); if (error == GN_ERR_NONE) { error = GN_ERR_UNSOLICITED; drvinst->on_sms(data->sms, state, drvinst->sms_callback_data); } if (freesms) { free(data->sms); data->sms = NULL; } return error; } static gn_error creg_parse(char **strings, int i, gn_network_info *ninfo, int lac_swapped) { char tmp[3] = {0, 0, 0}; char *pos; int first = 0, second = 1; size_t n, len; if (!strings[i] || strlen(strings[i]) < 4 || !strings[i + 1] || strlen(strings[i + 1]) < 4) return GN_ERR_FAILED; pos = strip_quotes(strings[i]); /* * Some phones have reverse order of the bytes in LAC. */ if (lac_swapped) { first = 1; second = 0; } tmp[0] = pos[0]; tmp[1] = pos[1]; ninfo->LAC[first] = strtol(tmp, NULL, 16); tmp[0] = pos[2]; tmp[1] = pos[3]; ninfo->LAC[second] = strtol(tmp, NULL, 16); /* * GSM phones usually return 4 hex digits, UMTS phones can return up to 8 with optional leading 0's */ pos = strip_quotes(strings[i + 1]); n = 0; len = strlen(pos); if (len & 1) { tmp[0] = *pos++; tmp[1] = '\0'; ninfo->cell_id[n++] = strtol(tmp, NULL, 16); len--; } while (len) { tmp[0] = *pos++; tmp[1] = *pos++; ninfo->cell_id[n++] = strtol(tmp, NULL, 16); len -= 2; } return GN_ERR_NONE; } static gn_error ReplyGetNetworkInfo(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state) { at_driver_instance *drvinst = AT_DRVINST(state); at_line_buffer buf; char *pos; char **strings; gn_error error = GN_ERR_NONE; int i; buf.line1 = buffer + 1; buf.length= length; splitlines(&buf); if (!strncmp(buf.line1, "AT+CREG=?", 9)) { if ((error = at_error_get(buffer, state)) != GN_ERR_NONE) return error; /* * Answer to AT+CREG=? can be one of: * +CREG: (0-1) * +CREG: (0,1) * +CREG: (0-2) * +CREG: (0,1,2) * The interesting thing here is whether the phone supports extended mode (2) */ if (strstr(buf.line2, "2")) drvinst->extended_reg_status = 2; else drvinst->extended_reg_status = 1; } else if (!strncmp(buf.line1, "AT+CREG?", 8)) { if (!data->network_info) return GN_ERR_INTERNALERROR; if ((error = at_error_get(buffer, state)) != GN_ERR_NONE) return error; strings = gnokii_strsplit(buf.line2, ",", 4); i = strings[3] ? 2 : 1; /* * Reply to AT+CREG? may have one of the forms: * when we are in basic status presentation mode (MODE=1) * +CREG: , * when we are in extended status presentation mode (MODE=2) * +CREG: ,,, * However if we are in MODE=2 and SIM card is inactive we'll * get (or we might get) the answer as with MODE=1. * FIXME: parse and return parameter * 0 - not registered, does not search for the network * 1 - registered in the home network * 2 - not registered, searching for the network * 3 - registration forbidden * 4 - status unknown * 5 - registered in roaming */ error = creg_parse(strings, i, data->network_info, drvinst->lac_swapped); gnokii_strfreev(strings); if (error != GN_ERR_NONE) return error; } else if (!strncmp(buf.line1, "CREG:", 5)) { gn_network_info info; strings = gnokii_strsplit(buf.line1, ",", 3); i = strings[2] ? 1 : 0; /* * Reply to AT+CREG? is of the form: * +CREG: ,, * FIXME: parse and return parameter * 0 - not registered, does not search for the network * 1 - registered in the home network * 2 - not registered, searching for the network * 3 - registration forbidden * 4 - status unknown * 5 - registered in roaming */ error = creg_parse(strings, i, &info, drvinst->lac_swapped); *(info.network_code) = '\0'; gnokii_strfreev(strings); if (error != GN_ERR_NONE) return error; if (drvinst->reg_notification) drvinst->reg_notification(&info, drvinst->reg_callback_data); } else if (!strncmp(buf.line1, "AT+COPS?", 8)) { char tmp[128]; int format; if (!data->network_info) return GN_ERR_INTERNALERROR; if ((error = at_error_get(buffer, state)) != GN_ERR_NONE) return error; memset(tmp, 0, sizeof(tmp)); strings = gnokii_strsplit(buf.line2, ",", 3); /* phone may respond with only the first value as in "+COPS: 0" */ if (strings[1]) { format = atoi(strings[1]); } else { format = -1; } dprintf("Format given: %d\n", format); switch (format) { case -1: /* neither operator name nor code given (eg. no SIM or not registered) */ error = GN_ERR_NOTAVAILABLE; data->network_info->network_code[0] = 0; break; case 0: /* network operator name given */ pos = strip_quotes(strings[2]); at_decode(drvinst->charset, tmp, pos, strlen(pos), drvinst->ucs2_as_utf8); snprintf(data->network_info->network_code, sizeof(data->network_info->network_code), "%s", gn_network_code_get(tmp)); break; case 2: /* network operator code given */ /* * Siemens S55 follows own standards. With inactive SIM it returns: * AT+COPS? * +COPS: 0,2 * OK * In contrary Nokia e50 gives: * AT+COPS? * +COPS: 0 * OK */ if (!strings[2]) { error = GN_ERR_NOTAVAILABLE; data->network_info->network_code[0] = 0; } else if (strlen(strings[2]) == 5) { data->network_info->network_code[0] = strings[2][0]; data->network_info->network_code[1] = strings[2][1]; data->network_info->network_code[2] = strings[2][2]; data->network_info->network_code[3] = ' '; data->network_info->network_code[4] = strings[2][3]; data->network_info->network_code[5] = strings[2][4]; data->network_info->network_code[6] = 0; } else if (strlen(strings[2]) >= 6) { data->network_info->network_code[0] = strings[2][1]; data->network_info->network_code[1] = strings[2][2]; data->network_info->network_code[2] = strings[2][3]; data->network_info->network_code[3] = ' '; data->network_info->network_code[4] = strings[2][4]; data->network_info->network_code[5] = strings[2][5]; data->network_info->network_code[6] = 0; } else { /* probably incorrect */ snprintf(data->network_info->network_code, sizeof(data->network_info->network_code), "%s", strings[2]); } break; default: /* defined formats are in range (0-2) */ error = GN_ERR_UNHANDLEDFRAME; data->network_info->network_code[0] = 0; break; } gnokii_strfreev(strings); } return error; } static gn_error ReplyGetDateTime(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state) { at_driver_instance *drvinst = AT_DRVINST(state); int cnt; at_line_buffer buf; gn_error error; gn_timestamp *dt; char timezone[6]; if ((error = at_error_get(buffer, state)) != GN_ERR_NONE) return error; buf.line1 = buffer + 1; buf.length= length; splitlines(&buf); dt = data->datetime; memset(timezone, 0, 6); /* Use strip_quotes() since some phones do not use quotes. Add 7 to skip "+CCLK: " */ cnt = sscanf(strip_quotes(buf.line2 + 7), "%d/%d/%d,%d:%d:%d%[+-1234567890]", &dt->year, &dt->month, &dt->day, &dt->hour, &dt->minute, &dt->second, timezone); switch (cnt) { case 7: drvinst->timezone = realloc(drvinst->timezone, strlen(timezone) + 1); strcpy(drvinst->timezone, timezone); break; case 6: break; default: return GN_ERR_FAILED; } if (dt->year < 100) dt->year += 2000; return GN_ERR_NONE; } static gn_error ReplyGetActiveCalls(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state) { at_driver_instance *drvinst; gn_error error; at_line_buffer buf; int status; if (!data->call_active) return GN_ERR_INTERNALERROR; if ((error = at_error_get(buffer, state)) != GN_ERR_NONE) return error; status = -1; buf.line1 = buffer + 1; buf.length = length; splitlines(&buf); memset(data->call_active, 0, GN_CALL_MAX_PARALLEL * sizeof(gn_call_active)); if (strncmp(buf.line1, "AT+CPAS", 7)) { return GN_ERR_UNKNOWN; } data->call_active->call_id = 1; switch (atoi(buf.line2 + strlen("+CPAS: "))) { case 0: status = GN_CALL_Idle; break; /* Terminal doesn't know */ case 1: case 2: break; case 3: status = GN_CALL_Ringing; break; case 4: status = GN_CALL_Established; break; /* Low-power state, terminal can't answer */ case 5: break; } if (status < 0) return GN_ERR_UNKNOWN; drvinst = AT_DRVINST(state); data->call_active->state = status; data->call_active->prev_state = drvinst->prev_state; /* States go: * Idle -> Ringing -> (faked Local hangup) -> Idle * Idle -> Ringing -> Established -> (faked Remote hangup) -> Idle */ if (drvinst->prev_state == GN_CALL_Ringing && status == GN_CALL_Idle) data->call_active->state = GN_CALL_LocalHangup; else if (drvinst->prev_state == GN_CALL_Established && status == GN_CALL_Idle) data->call_active->state = GN_CALL_RemoteHangup; else data->call_active->state = status; drvinst->prev_state = data->call_active->state; snprintf(data->call_active->name, GN_PHONEBOOK_NAME_MAX_LENGTH, _("Unknown")); data->call_active->number[0] = '\0'; return GN_ERR_NONE; } static gn_error ReplyGetSMSMemorySize(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state) { at_driver_instance *drvinst = AT_DRVINST(state); at_line_buffer buf; gn_error error; if ((error = at_error_get(buffer, state)) != GN_ERR_NONE) return error; buf.line1 = buffer + 1; buf.length = length; splitlines(&buf); if (sscanf(buf.line2, "+CPMS: %*d,%d,%*d,%d", &drvinst->mememorysize, &drvinst->smmemorysize) != 2) return GN_ERR_FAILED; drvinst->smsmemorytype = GN_MT_ME; return GN_ERR_NONE; } /* General reply function for phone responses. buffer[0] holds the compiled * success of the result (OK, ERROR, ... ). see links/atbus.h and links/atbus.c * for reference */ static gn_error Reply(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state) { return at_error_get(buffer, state); } #define at_manufacturer_compare(pattern) strncasecmp(manufacturer, pattern, strlen(pattern)) static gn_error Initialise(gn_data *setupdata, struct gn_statemachine *state) { at_driver_instance *drvinst; gn_data data; gn_error ret = GN_ERR_NONE; char model[GN_MODEL_MAX_LENGTH]; char manufacturer[GN_MANUFACTURER_MAX_LENGTH]; int i; dprintf("Initializing AT capable mobile phone ...\n"); /* initialize variables */ memset(model, 0, GN_MODEL_MAX_LENGTH); memset(manufacturer, 0, GN_MANUFACTURER_MAX_LENGTH); /* Copy in the phone info */ memcpy(&(state->driver), &driver_at, sizeof(gn_driver)); if (!(drvinst = malloc(sizeof(at_driver_instance)))) return GN_ERR_MEMORYFULL; state->driver.incoming_functions = drvinst->incoming_functions; AT_DRVINST(state) = drvinst; drvinst->manufacturer_error = NULL; drvinst->memorytype = GN_MT_XX; drvinst->memoryoffset = 0; drvinst->memorysize = 100; drvinst->smsmemorytype = GN_MT_XX; drvinst->defaultcharset = AT_CHAR_UNKNOWN; drvinst->charset = AT_CHAR_UNKNOWN; drvinst->no_smsc = 0; drvinst->call_notification = NULL; drvinst->call_callback_data = NULL; drvinst->on_cell_broadcast = NULL; drvinst->cb_callback_data = NULL; drvinst->on_sms = NULL; drvinst->sms_callback_data = NULL; drvinst->reg_notification = NULL; drvinst->reg_callback_data = NULL; drvinst->clip_supported = 0; drvinst->last_call_type = GN_CALL_Voice; drvinst->last_call_status = GN_CALL_Idle; drvinst->prev_state = GN_CALL_Idle; drvinst->mememorysize = -1; drvinst->smmemorysize = -1; drvinst->timezone = NULL; /* FIXME: detect if from AT+CNMI=? */ drvinst->cnmi_mode = 3; drvinst->cached_capabilities = NULL; drvinst->pdumode = 0; drvinst->extended_reg_status = 0; drvinst->availcharsets = 0; drvinst->encode_memory_type = 0; drvinst->encode_number = 0; drvinst->lac_swapped = 0; drvinst->extended_phonebook = 0; drvinst->ucs2_as_utf8 = 0; drvinst->if_pos = 0; for (i = 0; i < GN_OP_AT_Max; i++) { drvinst->functions[i] = NULL; drvinst->incoming_functions[i].message_type = 0; drvinst->incoming_functions[i].functions = NULL; } for (i = 0; i < ARRAY_LEN(at_function_init); i++) { at_insert_send_function(at_function_init[i].gop, at_function_init[i].sfunc, state); at_insert_recv_function(at_function_init[i].gop, at_function_init[i].rfunc, state); } switch (state->config.connection_type) { case GN_CT_Serial: case GN_CT_Bluetooth: case GN_CT_Irda: case GN_CT_TCP: if (!strcmp(setupdata->model, "AT-HW")) ret = atbus_initialise(true, state); else ret = atbus_initialise(false, state); break; default: ret = GN_ERR_NOTSUPPORTED; break; } if (ret) goto out; sm_initialise(state); SoftReset(&data, state); SetEcho(&data, state); SetExtendedError(&data, state); /* * detect manufacturer and model for further initialization */ gn_data_clear(&data); data.model = model; ret = state->driver.functions(GN_OP_GetModel, &data, state); if (ret) goto out; data.manufacturer = manufacturer; ret = state->driver.functions(GN_OP_GetManufacturer, &data, state); if (ret) goto out; if (!at_manufacturer_compare("bosch")) at_bosch_init(model, setupdata->model, state); else if (!at_manufacturer_compare("ericsson")) at_ericsson_init(model, setupdata->model, state); else if (!at_manufacturer_compare("nokia")) at_nokia_init(model, setupdata->model, state); else if (!at_manufacturer_compare("siemens")) at_siemens_init(model, setupdata->model, state); else if (!at_manufacturer_compare("sony ericsson")) at_sonyericsson_init(model, setupdata->model, state); else if (!at_manufacturer_compare("samsung")) at_samsung_init(model, setupdata->model, state); else if (!at_manufacturer_compare("motorola")) at_motorola_init(model, setupdata->model, state); else if (!at_manufacturer_compare("sagem")) at_sagem_init(model, setupdata->model, state); else if (!at_manufacturer_compare("lg")) at_lg_init(model, setupdata->model, state); else if (!at_manufacturer_compare("huawei")) at_huawei_init(model, setupdata->model, state); StoreDefaultCharset(state); /* * Postconfig */ if (drvinst->extended_phonebook) register_extended_phonebook(state); dprintf("Initialisation completed\n"); out: if (ret) { dprintf("Initialization failed (%d)\n", ret); /* ignore return value from GN_OP_Terminate, will use previous error code instead */ state->driver.functions(GN_OP_Terminate, &data, state); } return ret; } static gn_error Terminate(gn_data *data, struct gn_statemachine *state) { if (AT_DRVINST(state)) { if (AT_DRVINST(state)->cached_capabilities) { map_free(&(AT_DRVINST(state)->cached_capabilities)); AT_DRVINST(state)->cached_capabilities = NULL; } if (AT_DRVINST(state)->timezone) { free(AT_DRVINST(state)->timezone); AT_DRVINST(state)->timezone = NULL; } free(AT_DRVINST(state)); AT_DRVINST(state) = NULL; } return pgen_terminate(data, state); } void splitlines(at_line_buffer *buf) { char *pos; int length = buf->length; pos = findcrlf(buf->line1, 0, length); if (pos) { *pos = 0; buf->line2 = skipcrlf(++pos); length -= (buf->line2 - buf->line1); } else { buf->line2 = buf->line1; } pos = findcrlf(buf->line2, 1, length); if (pos) { *pos = 0; buf->line3 = skipcrlf(++pos); length -= (buf->line3 - buf->line2); } else { buf->line3 = buf->line2; } pos = findcrlf(buf->line3, 1, length); if (pos) { *pos = 0; buf->line4 = skipcrlf(++pos); length -= (buf->line4 - buf->line3); } else { buf->line4 = buf->line3; } pos = findcrlf(buf->line4, 1, length); if (pos) { *pos = 0; } } /* * increments the argument until a char unequal to * or is found. returns the new position. */ char *skipcrlf(unsigned char *str) { if (str == NULL) return str; while ((*str == '\n') || (*str == '\r') || (*str > 127)) str++; return str; } /* * searches for or and returns the first * occurrence. if test is set, the gsm char @ which * is 0x00 is not considered as end of string. * return NULL if no or was found in the * range of max bytes. */ char *findcrlf(unsigned char *str, int test, int max) { if (str == NULL) return str; while ((max > 0) && (*str != '\n') && (*str != '\r') && ((*str != '\0') || test)) { str++; max--; } if ((*str == '\0') || ((max == 0) && (*str != '\n') && (*str != '\r'))) return NULL; return str; } gnokii-0.6.31/common/phones/nk6100.c0000644000175000017500000036257111666163120015070 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2000 Hugh Blemings & Pavel Janík ml. Copyright (C) 2001-2004 Pawel Kot Copyright (C) 2002-2004 BORBELY Zoltan Copyright (C) 2002 Georg Moritz, Markus Plail, Jan Kratochvil Copyright (C) 2003 Bertrik Sikken This file provides functions specific to the Nokia 6100 series. See README for more details on supported mobile phones. */ #include "config.h" #include #include #include #include "compat.h" #include "misc.h" #include "phones/generic.h" #include "phones/nokia.h" #include "phones/nk6100.h" #include "links/fbus.h" #include "links/fbus-phonet.h" #include "links/m2bus.h" #include "gnokii-internal.h" #include "gnokii.h" #define DRVINSTANCE(s) (*((nk6100_driver_instance **)(&(s)->driver.driver_instance))) #define FREE(p) do { free(p); (p) = NULL; } while (0) /* static functions prototypes */ static gn_error Functions(gn_operation op, gn_data *data, struct gn_statemachine *state); static gn_error Initialise(struct gn_statemachine *state); static gn_error Authentication(struct gn_statemachine *state, char *imei); static gn_error BuildKeytable(struct gn_statemachine *state); static gn_error Identify(gn_data *data, struct gn_statemachine *state); static gn_error GetSpeedDial(gn_data *data, struct gn_statemachine *state); static gn_error SetSpeedDial(gn_data *data, struct gn_statemachine *state); static gn_error PhoneInfo(gn_data *data, struct gn_statemachine *state); static gn_error GetBatteryLevel(gn_data *data, struct gn_statemachine *state); static gn_error GetRFLevel(gn_data *data, struct gn_statemachine *state); static gn_error GetMemoryStatus(gn_data *data, struct gn_statemachine *state); static gn_error SendSMSMessage(gn_data *data, struct gn_statemachine *state); static gn_error SetOnSMS(gn_data *data, struct gn_statemachine *state); static gn_error GetSMSMessage(gn_data *data, struct gn_statemachine *state); static gn_error SaveSMSMessage(gn_data *data, struct gn_statemachine *state); static gn_error DeleteSMSMessage(gn_data *data, struct gn_statemachine *state); static gn_error GetSMSFolders(gn_data *data, struct gn_statemachine *state); static gn_error GetSMSFolderStatus(gn_data *data, struct gn_statemachine *state); static gn_error GetBitmap(gn_data *data, struct gn_statemachine *state); static gn_error SetBitmap(gn_data *data, struct gn_statemachine *state); static gn_error ReadPhonebook(gn_data *data, struct gn_statemachine *state); static gn_error WritePhonebook(gn_data *data, struct gn_statemachine *state); static gn_error DeletePhonebook(gn_data *data, struct gn_statemachine *state); static gn_error GetPowersource(gn_data *data, struct gn_statemachine *state); static gn_error GetSMSStatus(gn_data *data, struct gn_statemachine *state); static gn_error GetNetworkInfo(gn_data *data, struct gn_statemachine *state); static gn_error GetWelcomeMessage(gn_data *data, struct gn_statemachine *state); static gn_error GetOperatorLogo(gn_data *data, struct gn_statemachine *state); static gn_error GetDateTime(gn_data *data, struct gn_statemachine *state); static gn_error SetDateTime(gn_data *data, struct gn_statemachine *state); static gn_error GetAlarm(gn_data *data, struct gn_statemachine *state); static gn_error SetAlarm(gn_data *data, struct gn_statemachine *state); static gn_error GetProfile(gn_data *data, struct gn_statemachine *state); static gn_error SetProfile(gn_data *data, struct gn_statemachine *state); static gn_error GetActiveProfile(gn_data *data, struct gn_statemachine *state); static gn_error SetActiveProfile(gn_data *data, struct gn_statemachine *state); static gn_error GetCalendarNote(gn_data *data, struct gn_statemachine *state); static gn_error WriteCalendarNote(gn_data *data, struct gn_statemachine *state); static gn_error DeleteCalendarNote(gn_data *data, struct gn_statemachine *state); static gn_error GetDisplayStatus(gn_data *data, struct gn_statemachine *state); static gn_error DisplayOutput(gn_data *data, struct gn_statemachine *state); static gn_error PollDisplay(gn_data *data, struct gn_statemachine *state); static gn_error GetSMSCenter(gn_data *data, struct gn_statemachine *state); static gn_error SetSMSCenter(gn_data *data, struct gn_statemachine *state); static gn_error SetCellBroadcast(gn_data *data, struct gn_statemachine *state); static gn_error GetActiveCalls1(gn_data *data, struct gn_statemachine *state); static gn_error MakeCall1(gn_data *data, struct gn_statemachine *state); static gn_error AnswerCall1(gn_data *data, struct gn_statemachine *state); static gn_error CancelCall1(gn_data *data, struct gn_statemachine *state); static gn_error SetCallNotification(gn_data *data, struct gn_statemachine *state); static gn_error GetActiveCalls(gn_data *data, struct gn_statemachine *state); static gn_error MakeCall(gn_data *data, struct gn_statemachine *state); static gn_error AnswerCall(gn_data *data, struct gn_statemachine *state); static gn_error CancelCall(gn_data *data, struct gn_statemachine *state); static gn_error SendRLPFrame(gn_data *data, struct gn_statemachine *state); static gn_error SetRLPRXCallback(gn_data *data, struct gn_statemachine *state); static gn_error SendDTMF(gn_data *data, struct gn_statemachine *state); static gn_error Reset(gn_data *data, struct gn_statemachine *state); static gn_error GetRingtone(gn_data *data, struct gn_statemachine *state); static gn_error SetRingtone(gn_data *data, struct gn_statemachine *state); static gn_error GetRawRingtone(gn_data *data, struct gn_statemachine *state); static gn_error SetRawRingtone(gn_data *data, struct gn_statemachine *state); static gn_error DeleteRingtone(gn_data *data, struct gn_statemachine *state); static gn_error PressOrReleaseKey(bool press, gn_data *data, struct gn_statemachine *state); static gn_error PressOrReleaseKey1(bool press, gn_data *data, struct gn_statemachine *state); static gn_error PressOrReleaseKey2(bool press, gn_data *data, struct gn_statemachine *state); static gn_error EnterChar(gn_data *data, struct gn_statemachine *state); static gn_error NBSUpload(gn_data *data, struct gn_statemachine *state, gn_sms_data_type type); static gn_error get_imei(gn_data *data, struct gn_statemachine *state); static gn_error get_phone_info(gn_data *data, struct gn_statemachine *state); static gn_error get_hw(gn_data *data, struct gn_statemachine *state); static gn_error get_ringtone_list(gn_data *data, struct gn_statemachine *state); #ifdef SECURITY static gn_error EnterSecurityCode(gn_data *data, struct gn_statemachine *state); static gn_error GetSecurityCodeStatus(gn_data *data, struct gn_statemachine *state); static gn_error ChangeSecurityCode(gn_data *data, struct gn_statemachine *state); static gn_error get_security_code(gn_data *data, struct gn_statemachine *state); #endif static gn_error IncomingPhoneInfo(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error IncomingPhoneInfo2(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error IncomingSMS1(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error IncomingSMS(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error IncomingPhonebook(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error IncomingNetworkInfo(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error IncomingProfile(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error IncomingPhoneStatus(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error IncomingPhoneClockAndAlarm(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error IncomingCalendar(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error IncomingDisplay(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error IncomingSecurity(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error IncomingCallInfo(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error IncomingRLPFrame(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error IncomingKey(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error IncomingMisc(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); #ifdef SECURITY static gn_error IncomingSecurityCode(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); #endif static int get_memory_type(gn_memory_type memory_type); static void FlushLostSMSNotifications(struct gn_statemachine *state); static gn_incoming_function_type nk6100_incoming_functions[] = { { 0x01, IncomingCallInfo }, { 0x02, IncomingSMS1 }, { 0x03, IncomingPhonebook }, { 0x04, IncomingPhoneStatus }, { 0x05, IncomingProfile }, { 0x06, pnok_call_divert_incoming }, #ifdef SECURITY { 0x08, IncomingSecurityCode }, #endif { 0x0a, IncomingNetworkInfo }, { 0x0c, IncomingKey }, { 0x0d, IncomingDisplay }, { 0x11, IncomingPhoneClockAndAlarm }, { 0x13, IncomingCalendar }, { 0x14, IncomingSMS }, { 0x40, IncomingSecurity }, { 0x64, IncomingPhoneInfo }, { 0xd2, IncomingPhoneInfo2 }, { 0xda, IncomingMisc }, { 0xf1, IncomingRLPFrame }, { 0, NULL} }; gn_driver driver_nokia_6100 = { nk6100_incoming_functions, pgen_incoming_default, /* Mobile phone information */ { "6110|6130|6150|6190|5110|5130|5190|3210|3310|3330|3360|3390|3410|8210|8250|8290|8850|RPM-1", /* Supported models */ 4, /* Max RF Level */ 0, /* Min RF Level */ GN_RF_Arbitrary, /* RF level units */ 4, /* Max Battery Level */ 0, /* Min Battery Level */ GN_BU_Arbitrary, /* Battery level units */ GN_DT_DateTime, /* Have date/time support */ GN_DT_TimeOnly, /* Alarm supports time only */ 1, /* Alarms available - FIXME */ 48, 84, /* Startup logo size */ 14, 72, /* Op logo size */ 14, 72 /* Caller logo size */ }, Functions, NULL }; struct { char *model; char *sw_version; int capabilities; } static nk6100_capabilities[] = { /* * Capability setup for phone models. * Example: * { "NSE-3", NULL, NK6100_CAP_OLD_CALL_API } * Set NULL in the second field for all software versions. */ { "NSE-3", "-4.06", NK6100_CAP_NBS_UPLOAD }, /* 6110 */ { "NHM-5", NULL, NK6100_CAP_OLD_KEY_API | NK6100_CAP_PB_UNICODE | NK6100_CAP_NO_PSTATUS | NK6100_CAP_OLD_CALL_API | NK6100_CAP_NO_PB_GROUP }, /* 3310 */ { "NHM-5NX", NULL, NK6100_CAP_OLD_KEY_API | NK6100_CAP_PB_UNICODE | NK6100_CAP_NO_PSTATUS | NK6100_CAP_OLD_CALL_API | NK6100_CAP_NO_PB_GROUP }, /* 3310 */ { "NHM-6", NULL, NK6100_CAP_PB_UNICODE | NK6100_CAP_NO_PB_GROUP }, /* 3330 */ { "NHM-2", NULL, NK6100_CAP_PB_UNICODE }, /* 3410 */ { "NSM-3D", NULL, NK6100_CAP_PB_UNICODE | NK6100_CAP_CAL_UNICODE }, /* 8250 */ { "RPM-1", "-4.23", NK6100_CAP_NBS_UPLOAD }, /* Card Phone 2.0 */ { "NSE-8", NULL, NK6100_CAP_OLD_KEY_API | NK6100_CAP_NO_PSTATUS | NK6100_CAP_NO_CB | NK6100_CAP_OLD_CALL_API | NK6100_CAP_NO_PB_GROUP }, /* 3210 */ { "NSE-9", NULL, NK6100_CAP_OLD_KEY_API | NK6100_CAP_NO_PSTATUS | NK6100_CAP_NO_CB | NK6100_CAP_OLD_CALL_API | NK6100_CAP_NO_PB_GROUP }, /* 3210 */ { NULL, NULL, 0 } }; static gn_error Functions(gn_operation op, gn_data *data, struct gn_statemachine *state) { if (!DRVINSTANCE(state) && op != GN_OP_Init) return GN_ERR_INTERNALERROR; switch (op) { case GN_OP_Init: if (DRVINSTANCE(state)) return GN_ERR_INTERNALERROR; return Initialise(state); case GN_OP_Terminate: FREE(DRVINSTANCE(state)); return pgen_terminate(data, state); case GN_OP_GetSpeedDial: return GetSpeedDial(data, state); case GN_OP_SetSpeedDial: return SetSpeedDial(data, state); case GN_OP_GetImei: case GN_OP_GetModel: case GN_OP_GetRevision: case GN_OP_GetManufacturer: case GN_OP_Identify: return Identify(data, state); case GN_OP_GetBitmap: return GetBitmap(data, state); case GN_OP_SetBitmap: return SetBitmap(data, state); case GN_OP_GetBatteryLevel: return GetBatteryLevel(data, state); case GN_OP_GetRFLevel: return GetRFLevel(data, state); case GN_OP_GetMemoryStatus: return GetMemoryStatus(data, state); case GN_OP_ReadPhonebook: return ReadPhonebook(data, state); case GN_OP_WritePhonebook: return WritePhonebook(data, state); case GN_OP_DeletePhonebook: return DeletePhonebook(data, state); case GN_OP_GetPowersource: return GetPowersource(data, state); case GN_OP_GetSMSStatus: return GetSMSStatus(data, state); case GN_OP_GetNetworkInfo: return GetNetworkInfo(data, state); case GN_OP_SendSMS: return SendSMSMessage(data, state); case GN_OP_OnSMS: return SetOnSMS(data, state); case GN_OP_PollSMS: gn_sm_loop(1, state); return GN_ERR_NONE; case GN_OP_GetSMS: return GetSMSMessage(data, state); case GN_OP_SaveSMS: return SaveSMSMessage(data, state); case GN_OP_DeleteSMS: return DeleteSMSMessage(data, state); case GN_OP_GetSMSFolders: return GetSMSFolders(data, state); case GN_OP_GetSMSFolderStatus: return GetSMSFolderStatus(data, state); case GN_OP_GetDateTime: return GetDateTime(data, state); case GN_OP_SetDateTime: return SetDateTime(data, state); case GN_OP_GetAlarm: return GetAlarm(data, state); case GN_OP_SetAlarm: return SetAlarm(data, state); case GN_OP_GetProfile: return GetProfile(data, state); case GN_OP_SetProfile: return SetProfile(data, state); case GN_OP_GetActiveProfile: return GetActiveProfile(data, state); case GN_OP_SetActiveProfile: return SetActiveProfile(data, state); case GN_OP_GetCalendarNote: return GetCalendarNote(data, state); case GN_OP_WriteCalendarNote: return WriteCalendarNote(data, state); case GN_OP_DeleteCalendarNote: return DeleteCalendarNote(data, state); case GN_OP_GetDisplayStatus: return GetDisplayStatus(data, state); case GN_OP_DisplayOutput: return DisplayOutput(data, state); case GN_OP_PollDisplay: return PollDisplay(data, state); case GN_OP_GetSMSCenter: return GetSMSCenter(data, state); case GN_OP_SetSMSCenter: return SetSMSCenter(data, state); case GN_OP_SetCellBroadcast: return SetCellBroadcast(data, state); case GN_OP_NetMonitor: return pnok_netmonitor(data, state); case GN_OP_GetActiveCalls: return GetActiveCalls(data, state); case GN_OP_MakeCall: return MakeCall(data, state); case GN_OP_AnswerCall: return AnswerCall(data, state); case GN_OP_CancelCall: return CancelCall(data, state); case GN_OP_SetCallNotification: return SetCallNotification(data, state); case GN_OP_SendRLPFrame: return SendRLPFrame(data, state); case GN_OP_SetRLPRXCallback: return SetRLPRXCallback(data, state); #ifdef SECURITY case GN_OP_EnterSecurityCode: return EnterSecurityCode(data, state); case GN_OP_GetSecurityCodeStatus: return GetSecurityCodeStatus(data, state); case GN_OP_ChangeSecurityCode: return ChangeSecurityCode(data, state); case GN_OP_GetSecurityCode: return get_security_code(data, state); #endif case GN_OP_GetLocksInfo: return pnok_get_locks_info(data, state); case GN_OP_SendDTMF: return SendDTMF(data, state); case GN_OP_Reset: return Reset(data, state); case GN_OP_GetRingtone: return GetRingtone(data, state); case GN_OP_SetRingtone: return SetRingtone(data, state); case GN_OP_GetRawRingtone: return GetRawRingtone(data, state); case GN_OP_SetRawRingtone: return SetRawRingtone(data, state); case GN_OP_DeleteRingtone: return DeleteRingtone(data, state); case GN_OP_PlayTone: return pnok_play_tone(data, state); case GN_OP_PressPhoneKey: return PressOrReleaseKey(true, data, state); case GN_OP_ReleasePhoneKey: return PressOrReleaseKey(false, data, state); case GN_OP_EnterChar: return EnterChar(data, state); case GN_OP_CallDivert: return pnok_call_divert(data, state); case GN_OP_GetRingtoneList: return get_ringtone_list(data, state); default: dprintf("nk61xx unimplemented operation: %d\n", op); return GN_ERR_NOTIMPLEMENTED; } } /* Nokia authentication protocol is used in the communication between Nokia mobile phones (e.g. Nokia 6110) and Nokia Cellular Data Suite software, commercially sold by Nokia Corp. The authentication scheme is based on the token send by the phone to the software. The software does it's magic (see the function FB61_GetNokiaAuth()) and returns the result back to the phone. If the result is correct the phone responds with the message "Accessory connected!" displayed on the LCD. Otherwise it will display "Accessory not supported" and some functions will not be available for use. The specification of the protocol is not publicly available, no comment. The auth code is written specially for gnokii project by Odinokov Serge. If you have some special requests for Serge just write him to apskaita@post.omnitel.net or serge@takas.lt Reimplemented in C by Pavel Janík ml. */ void PNOK_GetNokiaAuth(unsigned char *Imei, unsigned char *MagicBytes, unsigned char *MagicResponse) { int i, j, CRC = 0; unsigned char Temp[16]; /* This is our temporary working area. */ /* Here we put FAC (Final Assembly Code) and serial number into our area. */ memcpy(Temp, Imei + 6, 8); /* And now the TAC (Type Approval Code). */ memcpy(Temp + 8, Imei + 2, 4); /* And now we pack magic bytes from the phone. */ memcpy(Temp + 12, MagicBytes, 4); for (i = 0; i <= 11; i++) if (Temp[i + 1] & 1) Temp[i]<<=1; switch (Temp[15] & 0x03) { case 1: case 2: j = Temp[13] & 0x07; for (i = 0; i <= 3; i++) Temp[i+j] ^= Temp[i+12]; break; default: j = Temp[14] & 0x07; for (i = 0; i <= 3; i++) Temp[i + j] |= Temp[i + 12]; } for (i = 0; i <= 15; i++) CRC ^= Temp[i]; for (i = 0; i <= 15; i++) { switch (Temp[15 - i] & 0x06) { case 0: j = Temp[i] | CRC; break; case 2: case 4: j = Temp[i] ^ CRC; break; case 6: j = Temp[i] & CRC; break; } if (j == CRC) j = 0x2c; if (Temp[i] == 0) j = 0; MagicResponse[i] = j; } } static gn_error IdentifyPhone(struct gn_statemachine *state) { nk6100_driver_instance *drvinst = DRVINSTANCE(state); gn_error err; gn_data data; char revision[GN_REVISION_MAX_LENGTH]; revision[0] = '\0'; gn_data_clear(&data); data.model = drvinst->model; data.imei = drvinst->imei; data.revision = revision; if ((err = get_imei(&data, state)) != GN_ERR_NONE || (err = get_phone_info(&data, state)) != GN_ERR_NONE || (err = get_hw(&data, state)) != GN_ERR_NONE) { return err; } if ((drvinst->pm = gn_phone_model_get(data.model)) == NULL) { dump("Unsupported phone model \"%s\"\n", data.model); dump("Please read Docs/Bugs and send a bug report!\n"); return GN_ERR_INTERNALERROR; } if (drvinst->pm->flags & PM_AUTHENTICATION) { /* Now test the link and authenticate ourself */ if ((err = PhoneInfo(&data, state)) != GN_ERR_NONE) return err; } sscanf(revision, "SW %9[^ ,], HW %9s", drvinst->sw_version, drvinst->hw_version); return GN_ERR_NONE; } static bool match_phone(nk6100_driver_instance *drvinst, int i) { if (nk6100_capabilities[i].model != NULL && strcmp(nk6100_capabilities[i].model, drvinst->model)) return false; if (nk6100_capabilities[i].sw_version != NULL) { if (nk6100_capabilities[i].sw_version[0] == '-' && strcmp(nk6100_capabilities[i].sw_version + 1, drvinst->sw_version) >= 0) return true; if (nk6100_capabilities[i].sw_version[0] == '+' && strcmp(nk6100_capabilities[i].sw_version + 1, drvinst->sw_version) <= 0) return true; if (!strcmp(nk6100_capabilities[i].sw_version, drvinst->sw_version)) return true; return false; } return true; } /* Initialise is the only function allowed to 'use' state */ static gn_error Initialise(struct gn_statemachine *state) { gn_error err; int i; /* Copy in the phone info */ memcpy(&(state->driver), &driver_nokia_6100, sizeof(gn_driver)); if (!(DRVINSTANCE(state) = calloc(1, sizeof(nk6100_driver_instance)))) return GN_ERR_MEMORYFULL; switch (state->config.connection_type) { case GN_CT_Serial: state->config.connection_type = GN_CT_DAU9P; case GN_CT_Infrared: case GN_CT_DAU9P: case GN_CT_Tekram: case GN_CT_TCP: err = fbus_initialise(0, state); break; case GN_CT_Irda: err = phonet_initialise(state); break; case GN_CT_M2BUS: err = m2bus_initialise(state); break; default: err = GN_ERR_NOTSUPPORTED; } if (err != GN_ERR_NONE) { dprintf("Error in link initialisation\n"); gn_sm_functions(GN_OP_Terminate, NULL, state); return GN_ERR_NOTSUPPORTED; } sm_initialise(state); /* We need to identify the phone first in order to know whether we can authorize or set keytable */ if ((err = IdentifyPhone(state)) != GN_ERR_NONE) { gn_sm_functions(GN_OP_Terminate, NULL, state); return err; } for (i = 0; !match_phone(DRVINSTANCE(state), i); i++) ; DRVINSTANCE(state)->capabilities = nk6100_capabilities[i].capabilities; if (DRVINSTANCE(state)->pm->flags & PM_AUTHENTICATION) { /* Now test the link and authenticate ourself */ if ((err = Authentication(state, DRVINSTANCE(state)->imei)) != GN_ERR_NONE) { gn_sm_functions(GN_OP_Terminate, NULL, state); return err; } } if (DRVINSTANCE(state)->pm->flags & PM_KEYBOARD) { if (DRVINSTANCE(state)->capabilities & NK6100_CAP_OLD_KEY_API) { /* FIXME: build a default table */ } else { if (BuildKeytable(state) != GN_ERR_NONE) { gn_sm_functions(GN_OP_Terminate, NULL, state); return GN_ERR_NOTSUPPORTED; } } } if (!strcmp(DRVINSTANCE(state)->model, "RPM-1")) { state->driver.phone.max_battery_level = 1; DRVINSTANCE(state)->max_sms = 2; } else { DRVINSTANCE(state)->max_sms = NK6100_MAX_SMS_MESSAGES; } return GN_ERR_NONE; } static gn_error Identify(gn_data *data, struct gn_statemachine *state) { nk6100_driver_instance *drvinst = DRVINSTANCE(state); if (data->manufacturer) pnok_manufacturer_get(data->manufacturer); if (data->model) snprintf(data->model, GN_MODEL_MAX_LENGTH, "%s", drvinst->model); if (data->imei) snprintf(data->imei, GN_IMEI_MAX_LENGTH, "%s", drvinst->imei); if (data->revision) snprintf(data->revision, GN_REVISION_MAX_LENGTH, "SW %s, HW %s", drvinst->sw_version, drvinst->hw_version); data->phone = drvinst->pm; return GN_ERR_NONE; } static gn_error GetPhoneStatus(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x01}; if (DRVINSTANCE(state)->capabilities & NK6100_CAP_NO_PSTATUS) return GN_ERR_NOTSUPPORTED; dprintf("Getting phone status...\n"); if (sm_message_send(4, 0x04, req, state)) return GN_ERR_NOTREADY; return sm_block(0x04, data, state); } static gn_error GetRFLevel(gn_data *data, struct gn_statemachine *state) { dprintf("Getting rf level...\n"); return GetPhoneStatus(data, state); } static gn_error GetBatteryLevel(gn_data *data, struct gn_statemachine *state) { dprintf("Getting battery level...\n"); return GetPhoneStatus(data, state); } static gn_error GetPowersource(gn_data *data, struct gn_statemachine *state) { dprintf("Getting power source...\n"); return GetPhoneStatus(data, state); } #if 0 /* unused function */ static gn_error GetPhoneID(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x03}; dprintf("Getting phone id...\n"); if (sm_message_send(4, 0x04, req, state)) return GN_ERR_NOTREADY; return sm_block(0x04, data, state); } #endif static gn_error IncomingPhoneStatus(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { float csq_map[5] = {0, 8, 16, 24, 31}; char hw[10], sw[10]; switch (message[3]) { /* Phone status */ case 0x02: dprintf("\tRFLevel: %d\n", message[5]); dprintf("\tPowerSource: %d\n", message[7]); dprintf("\tBatteryLevel: %d\n", message[8]); if (message[5] > 4) return GN_ERR_UNHANDLEDFRAME; if (message[7] != 1 && message[7] != 2) return GN_ERR_UNHANDLEDFRAME; if (data->rf_level && data->rf_unit) { switch (*data->rf_unit) { case GN_RF_CSQ: *data->rf_level = csq_map[message[5]]; break; case GN_RF_Arbitrary: default: *data->rf_unit = GN_RF_Arbitrary; *data->rf_level = message[5]; break; } } if (data->power_source) { *data->power_source = message[7]; } if (data->battery_level && data->battery_unit) { *data->battery_unit = GN_BU_Arbitrary; *data->battery_level = message[8]; } break; /* Get Phone ID */ case 0x04: if (data->imei) { snprintf(data->imei, GN_IMEI_MAX_LENGTH, "%s", message + 5); dprintf("Received imei %s\n", data->imei); } if (data->revision) { sscanf(message + 35, " %9s", hw); sscanf(message + 40, " %9s", sw); snprintf(data->revision, GN_REVISION_MAX_LENGTH, "SW %s, HW %s", sw, hw); dprintf("Received revision %s\n", data->revision); } if (data->model) { snprintf(data->model, GN_MODEL_MAX_LENGTH, "%s", message + 21); dprintf("Received model %s\n", data->model); } break; default: return GN_ERR_UNHANDLEDFRAME; } return GN_ERR_NONE; } static gn_error GetMemoryStatus(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x07, 0x00}; dprintf("Getting memory status...\n"); req[4] = get_memory_type(data->memory_status->memory_type); if (sm_message_send(5, 0x03, req, state)) return GN_ERR_NOTREADY; return sm_block(0x03, data, state); } static gn_error ReadPhonebook(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x01, 0x00, 0x00, 0x00}; if (!data->phonebook_entry) return GN_ERR_INTERNALERROR; if ((data->phonebook_entry->location < 0) || (data->phonebook_entry->location > 255)) return GN_ERR_INVALIDLOCATION; dprintf("Reading phonebook location (%d/%d)\n", data->phonebook_entry->memory_type, data->phonebook_entry->location); req[4] = get_memory_type(data->phonebook_entry->memory_type); req[5] = data->phonebook_entry->location; data->phonebook_entry->empty = true; if (sm_message_send(7, 0x03, req, state)) return GN_ERR_NOTREADY; return sm_block(0x03, data, state); } static gn_error WritePhonebook(gn_data *data, struct gn_statemachine *state) { unsigned char req[FBUS_FRAME_MAX_LENGTH] = {FBUS_FRAME_HEADER, 0x04}; gn_phonebook_entry *pe; unsigned char *pos; int namelen, numlen; if ((data->phonebook_entry->location < 0) || (data->phonebook_entry->location > 255)) return GN_ERR_INVALIDLOCATION; pe = data->phonebook_entry; pos = req+4; namelen = strlen(pe->name); numlen = strlen(pe->number); dprintf("Writing phonebook location (%d/%d): %s\n", pe->memory_type, pe->location, pe->name); if (namelen > GN_PHONEBOOK_NAME_MAX_LENGTH) { dprintf("name too long\n"); return GN_ERR_ENTRYTOOLONG; } if (numlen > GN_PHONEBOOK_NUMBER_MAX_LENGTH) { dprintf("number too long\n"); return GN_ERR_ENTRYTOOLONG; } if (pe->subentries_count > 1) { dprintf("61xx doesn't support subentries\n"); return GN_ERR_UNKNOWN; } if ((pe->subentries_count == 1) && ((pe->subentries[0].entry_type != GN_PHONEBOOK_ENTRY_Number) || ((pe->subentries[0].number_type != GN_PHONEBOOK_NUMBER_General) && (pe->subentries[0].number_type != 0)) || (pe->subentries[0].id != 2) || strcmp(pe->subentries[0].data.number, pe->number))) { dprintf("61xx doesn't support subentries\n"); return GN_ERR_UNKNOWN; } *pos++ = get_memory_type(pe->memory_type); *pos++ = pe->location; if (DRVINSTANCE(state)->capabilities & NK6100_CAP_PB_UNICODE) namelen = char_unicode_encode(pos + 1, pe->name, namelen); else namelen = pnok_string_encode(pos + 1, namelen, pe->name); *pos++ = namelen; pos += namelen; *pos++ = numlen; pnok_string_encode(pos, numlen, pe->number); pos += numlen; *pos++ = (pe->caller_group == GN_PHONEBOOK_GROUP_None) ? 0xff : pe->caller_group; if (sm_message_send(pos-req, 0x03, req, state)) return GN_ERR_NOTREADY; return sm_block(0x03, data, state); } static gn_error DeletePhonebook(gn_data *data, struct gn_statemachine *state) { gn_data d; gn_phonebook_entry entry; if (!data->phonebook_entry) return GN_ERR_INTERNALERROR; gn_data_clear(&d); memset(&entry, 0, sizeof(entry)); d.phonebook_entry = &entry; entry.location = data->phonebook_entry->location; entry.memory_type = data->phonebook_entry->memory_type; entry.caller_group = GN_PHONEBOOK_GROUP_None; return WritePhonebook(&d, state); } static gn_error GetCallerGroupData(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x10, 0x00}; if ((data->bitmap->number < 0) || (data->bitmap->number > 255)) return GN_ERR_INVALIDLOCATION; req[4] = data->bitmap->number; if (sm_message_send(5, 0x03, req, state)) return GN_ERR_NOTREADY; return sm_block(0x03, data, state); } static gn_error GetBitmap(gn_data *data, struct gn_statemachine *state) { dprintf("Reading bitmap...\n"); switch (data->bitmap->type) { case GN_BMP_StartupLogo: return GetWelcomeMessage(data, state); case GN_BMP_WelcomeNoteText: return GetWelcomeMessage(data, state); case GN_BMP_DealerNoteText: return GetWelcomeMessage(data, state); case GN_BMP_OperatorLogo: return GetOperatorLogo(data, state); case GN_BMP_CallerLogo: return GetCallerGroupData(data, state); case GN_BMP_None: case GN_BMP_PictureMessage: return GN_ERR_NOTSUPPORTED; default: return GN_ERR_INTERNALERROR; } } static gn_error GetSpeedDial(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x16, 0x00}; if ((data->speed_dial->number < 0) || (data->speed_dial->number > 255)) return GN_ERR_INVALIDLOCATION; req[4] = data->speed_dial->number; if (sm_message_send(5, 0x03, req, state)) return GN_ERR_NOTREADY; return sm_block(0x03, data, state); } static gn_error SetSpeedDial(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x19, 0x00, 0x00, 0x00}; if ((data->speed_dial->location < 0) || (data->speed_dial->location > 255)) return GN_ERR_INVALIDLOCATION; if ((data->speed_dial->number < 0) || (data->speed_dial->number > 255)) return GN_ERR_INVALIDLOCATION; req[4] = data->speed_dial->number; req[5] = get_memory_type(data->speed_dial->memory_type); req[6] = data->speed_dial->location; if (sm_message_send(7, 0x03, req, state)) return GN_ERR_NOTREADY; return sm_block(0x03, data, state); } static gn_error IncomingPhonebook(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { gn_phonebook_entry *pe; gn_bmp *bmp; unsigned char *pos; int n; switch (message[3]) { case 0x02: if (data->phonebook_entry) { pe = data->phonebook_entry; pos = message + 5; n = *pos++; /* It seems that older phones (at least Nokia 5110 and 6130) set message[4] to 0. Newer ones set is to the location number. It can be the distinction when to read the name */ if ((message[4] != 0) || (DRVINSTANCE(state)->capabilities & NK6100_CAP_PB_UNICODE)) char_unicode_decode(pe->name, pos, n); else pnok_string_decode(pe->name, sizeof(pe->name), pos, n); pos += n; n = *pos++; pnok_string_decode(pe->number, sizeof(pe->number), pos, n); pos += n; if (DRVINSTANCE(state)->capabilities & NK6100_CAP_NO_PB_GROUP) { pe->caller_group = GN_PHONEBOOK_GROUP_None; pos++; } else { pe->caller_group = *pos++; } if (*pos++) { /* date is set */ pe->date.year = (pos[0] << 8) + pos[1]; pos += 2; pe->date.month = *pos++; pe->date.day = *pos++; pe->date.hour = *pos++; pe->date.minute = *pos++; pe->date.second = *pos++; } else { /* date is not set */ pe->date.year = 0; pe->date.month = 0; pe->date.day = 0; pe->date.hour = 0; pe->date.minute = 0; pe->date.second = 0; } pe->subentries_count = 0; pe->empty = (pe->name[0] == '\0') && (pe->number[0] == '\0'); } break; case 0x03: switch (message[4]) { case 0x6f: /* This gets returned when issuing --getphonebook * command and the phone displays 'Insert SIM card' * on Nokia 3330 (Daniele Forsi). */ return GN_ERR_NOTREADY; case 0x74: case 0x7d: return GN_ERR_INVALIDLOCATION; case 0x8d: /* waiting for PIN */ return GN_ERR_CODEREQUIRED; default: return GN_ERR_UNHANDLEDFRAME; } case 0x05: break; case 0x06: switch (message[4]) { case 0x6f: /* Insert SIM card */ return GN_ERR_NOTREADY; case 0x7d: case 0x90: return GN_ERR_ENTRYTOOLONG; case 0x74: return GN_ERR_INVALIDLOCATION; case 0x8d: /* waiting for PIN */ return GN_ERR_CODEREQUIRED; default: return GN_ERR_UNHANDLEDFRAME; } case 0x08: dprintf("\tMemory location: %d\n", message[4]); dprintf("\tUsed: %d\n", message[6]); dprintf("\tFree: %d\n", message[5]); if (data->memory_status) { data->memory_status->used = message[6]; data->memory_status->free = message[5]; return GN_ERR_NONE; } break; case 0x09: switch (message[4]) { case 0x6f: return GN_ERR_TIMEOUT; case 0x7d: return GN_ERR_INVALIDMEMORYTYPE; case 0x8d: return GN_ERR_INVALIDSECURITYCODE; default: return GN_ERR_UNHANDLEDFRAME; } case 0x11: if (data->bitmap) { bmp = data->bitmap; pos = message+4; bmp->number = *pos++; n = *pos++; pnok_string_decode(bmp->text, sizeof(bmp->text), pos, n); pos += n; bmp->ringtone = *pos++; pos++; bmp->size = (pos[0] << 8) + pos[1]; pos += 2; pos++; bmp->width = *pos++; bmp->height = *pos++; pos++; n = bmp->height * bmp->width / 8; if (bmp->size > n) bmp->size = n; if (bmp->size > sizeof(bmp->bitmap)) return GN_ERR_UNHANDLEDFRAME; memcpy(bmp->bitmap, pos, bmp->size); if (bmp->text[0] == '\0') { switch (bmp->number) { case 0: snprintf(bmp->text, sizeof(bmp->text), "%s", _("Family")); break; case 1: snprintf(bmp->text, sizeof(bmp->text), "%s", _("VIP")); break; case 2: snprintf(bmp->text, sizeof(bmp->text), "%s", _("Friends")); break; case 3: snprintf(bmp->text, sizeof(bmp->text), "%s", _("Colleagues")); break; case 4: snprintf(bmp->text, sizeof(bmp->text), "%s", _("Other")); break; default: break; } } } break; case 0x12: switch (message[4]) { case 0x7d: return GN_ERR_INVALIDLOCATION; default: return GN_ERR_UNHANDLEDFRAME; } case 0x14: break; case 0x15: switch (message[4]) { case 0x7d: return GN_ERR_INVALIDLOCATION; default: return GN_ERR_UNHANDLEDFRAME; } /* Get speed dial OK */ case 0x17: if (data->speed_dial) { switch (message[4]) { case NK6100_MEMORY_ME: data->speed_dial->memory_type = GN_MT_ME; break; case NK6100_MEMORY_SM: data->speed_dial->memory_type = GN_MT_SM; break; default: return GN_ERR_UNHANDLEDFRAME; } data->speed_dial->location = message[5]; } break; /* Get speed dial error */ case 0x18: return GN_ERR_INVALIDLOCATION; /* Set speed dial OK */ case 0x1a: return GN_ERR_NONE; /* Set speed dial error */ case 0x1b: switch (message[4]) { case 0x6f: /* Insert SIM card */ return GN_ERR_NOTREADY; case 0x74: return GN_ERR_INVALIDLOCATION; case 0x7d: return GN_ERR_INVALIDMEMORYTYPE; case 0x8d: /* waiting for PIN */ return GN_ERR_CODEREQUIRED; default: return GN_ERR_UNHANDLEDFRAME; } default: return GN_ERR_UNHANDLEDFRAME; } return GN_ERR_NONE; } static gn_error PhoneInfo(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x10}; dprintf("Getting phone info (new way)...\n"); if (sm_message_send(4, 0x64, req, state)) return GN_ERR_NOTREADY; return sm_block(0x64, data, state); } static gn_error Authentication(struct gn_statemachine *state, char *imei) { gn_error error; gn_data data; unsigned char connect1[] = {FBUS_FRAME_HEADER, 0x0d, 0x00, 0x00, 0x02}; unsigned char connect2[] = {FBUS_FRAME_HEADER, 0x20, 0x02}; unsigned char connect3[] = {FBUS_FRAME_HEADER, 0x0d, 0x01, 0x00, 0x02}; unsigned char magic_connect[] = {FBUS_FRAME_HEADER, 0x12, /* auth response */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 'N', 'O', 'K', 'I', 'A', '&', 'N', 'O', 'K', 'I', 'A', 'a', 'c', 'c', 'e', 's', 's', 'o', 'r', 'y', 0x00, 0x00, 0x00, 0x00}; gn_data_clear(&data); if ((error = sm_message_send(7, 0x02, connect1, state)) != GN_ERR_NONE) return error; if ((error = sm_block(0x02, &data, state)) != GN_ERR_NONE) return error; if ((error = sm_message_send(5, 0x02, connect2, state)) != GN_ERR_NONE) return error; if ((error = sm_block(0x02, &data, state)) != GN_ERR_NONE) return error; if ((error = sm_message_send(7, 0x02, connect3, state)) != GN_ERR_NONE) return error; if ((error = sm_block(0x02, &data, state)) != GN_ERR_NONE) return error; if ((error = PhoneInfo(&data, state)) != GN_ERR_NONE) return error; PNOK_GetNokiaAuth(imei, DRVINSTANCE(state)->magic_bytes, magic_connect + 4); if ((error = sm_message_send(45, 0x64, magic_connect, state)) != GN_ERR_NONE) return error; return GN_ERR_NONE; } static gn_error IncomingPhoneInfo(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { char hw[10], sw[10]; switch (message[3]) { /* Phone ID recvd */ case 0x11: if (data->imei) { snprintf(data->imei, GN_IMEI_MAX_LENGTH, "%s", message + 9); dprintf("Received imei %s\n", data->imei); } if (data->model) { snprintf(data->model, GN_MODEL_MAX_LENGTH, "%s", message + 25); dprintf("Received model %s\n", data->model); } if (data->revision) { sscanf(message + 39, " %9s", hw); sscanf(message + 44, " %9s", sw); snprintf(data->revision, GN_REVISION_MAX_LENGTH, "SW %s, HW %s", sw, hw); dprintf("Received revision %s\n", data->revision); } dprintf("Message: Mobile phone identification received:\n"); dprintf("\tIMEI: %s\n", message + 9); dprintf("\tModel: %s\n", message + 25); dprintf("\tProduction Code: %s\n", message + 31); dprintf("\tHW: %s\n", message + 39); dprintf("\tFirmware: %s\n", message + 44); /* These bytes are probably the source of the "Accessory not connected" messages on the phone when trying to emulate NCDS... I hope.... UPDATE: of course, now we have the authentication algorithm. */ dprintf("\tMagic bytes: %02x %02x %02x %02x\n", message[50], message[51], message[52], message[53]); memcpy(DRVINSTANCE(state)->magic_bytes, message + 50, 4); break; default: return GN_ERR_UNHANDLEDFRAME; } return GN_ERR_NONE; } #if 0 /* unused function */ static gn_error PhoneInfo2(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = { FBUS_FRAME_HEADER, 0x03, 0x00 }; dprintf("Getting phone info (old way)...\n"); if (sm_message_send(5, 0xd1, req, state)) return GN_ERR_NOTREADY; return sm_block(0xd2, data, state); } #endif static gn_error PressOrReleaseKey2(bool press, gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {0x00, 0x01, 0x46, 0x00, 0x01, 0x00}; req[2] = press ? 0x46 : 0x47; req[5] = data->key_code; if (sm_message_send(6, 0xd1, req, state)) return GN_ERR_NOTREADY; return sm_block(0xd2, data, state); } static gn_error IncomingPhoneInfo2(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { char sw[10]; switch (message[2]) { /* phone id2 received */ case 0x03: if (data->model) { snprintf(data->model, 6, "%s", message + 21); } if (data->revision) { sscanf(message + 6, " %9s", sw); snprintf(data->revision, GN_REVISION_MAX_LENGTH, "SW %s, HW ????", sw); } dprintf("Phone info:\n%s\n", message + 4); break; /* press key result */ case 0x46: if (message[3] != 0x00) return GN_ERR_UNHANDLEDFRAME; break; /* release key result */ case 0x47: if (message[3] != 0x00) return GN_ERR_UNHANDLEDFRAME; break; default: return GN_ERR_UNHANDLEDFRAME; } return GN_ERR_NONE; } static int get_memory_type(gn_memory_type memory_type) { int result; switch (memory_type) { case GN_MT_MT: result = NK6100_MEMORY_MT; break; case GN_MT_ME: result = NK6100_MEMORY_ME; break; case GN_MT_SM: result = NK6100_MEMORY_SM; break; case GN_MT_FD: result = NK6100_MEMORY_FD; break; case GN_MT_ON: result = NK6100_MEMORY_ON; break; case GN_MT_EN: result = NK6100_MEMORY_EN; break; case GN_MT_DC: result = NK6100_MEMORY_DC; break; case GN_MT_RC: result = NK6100_MEMORY_RC; break; case GN_MT_MC: result = NK6100_MEMORY_MC; break; default: result = NK6100_MEMORY_XX; break; } return (result); } static gn_error GetSMSCenter(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x33, 0x64, 0x00}; int id; id = data->message_center->id; if ((id < 1) || (id > 255)) return GN_ERR_INVALIDLOCATION; req[5] = id; if (sm_message_send(6, 0x02, req, state)) return GN_ERR_NOTREADY; return sm_block(0x02, data, state); } static gn_error SetSMSCenter(gn_data *data, struct gn_statemachine *state) { unsigned char req[64] = {FBUS_FRAME_HEADER, 0x30, 0x64}; gn_sms_message_center *smsc; unsigned char *pos; smsc = data->message_center; if ((smsc->id < 1) || (smsc->id > 255)) return GN_ERR_INVALIDLOCATION; pos = req+5; *pos++ = smsc->id; pos++; *pos++ = smsc->format; pos++; *pos++ = smsc->validity; *pos = (char_semi_octet_pack(smsc->recipient.number, pos + 1, smsc->recipient.type) + 1) / 2 + 1; pos += 12; *pos = (char_semi_octet_pack(smsc->smsc.number, pos + 1, smsc->smsc.type) + 1) / 2 + 1; pos += 12; if (smsc->default_name < 1) { snprintf(pos, 13, "%s", smsc->name); pos += strlen(pos)+1; } else *pos++ = 0; if (sm_message_send(pos-req, 0x02, req, state)) return GN_ERR_NOTREADY; return sm_block(0x02, data, state); } static gn_error SetCellBroadcast(gn_data *data, struct gn_statemachine *state) { unsigned char req_ena[] = {FBUS_FRAME_HEADER, 0x20, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01}; unsigned char req_dis[] = {FBUS_FRAME_HEADER, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; unsigned char *req; if (DRVINSTANCE(state)->capabilities & NK6100_CAP_NO_CB) return GN_ERR_NOTSUPPORTED; req = data->on_cell_broadcast ? req_ena : req_dis; DRVINSTANCE(state)->on_cell_broadcast = data->on_cell_broadcast; DRVINSTANCE(state)->cb_callback_data = data->callback_data; if (sm_message_send(10, 0x02, req, state)) return GN_ERR_NOTREADY; return sm_block(0x02, data, state); } static gn_error SendSMSMessage(gn_data *data, struct gn_statemachine *state) { unsigned char req[256] = {FBUS_FRAME_HEADER, 0x01, 0x02, 0x00}; gn_data dtemp; gn_error error; int len; /* * FIXME: * Ugly hack. The phone seems to drop the SendSMS message if the link * had been idle too long. -- bozo */ gn_data_clear(&dtemp); GetNetworkInfo(&dtemp, state); len = pnok_fbus_sms_encode(req + 6, data, state); len += 6; if (sm_message_send(len, PNOK_MSG_ID_SMS, req, state)) return GN_ERR_NOTREADY; do { error = sm_block_no_retry_timeout(PNOK_MSG_ID_SMS, state->config.smsc_timeout, data, state); } while (!state->config.smsc_timeout && error == GN_ERR_TIMEOUT); return error; } static bool CheckIncomingSMS(struct gn_statemachine *state, int pos) { gn_data data; gn_sms sms; gn_sms_raw rawsms; gn_error error; if (!DRVINSTANCE(state)->on_sms) { return false; } /* * libgnokii isn't reentrant anyway, so this simple trick should be * enough - bozo */ if (DRVINSTANCE(state)->sms_notification_in_progress) { DRVINSTANCE(state)->sms_notification_lost = true; return false; } DRVINSTANCE(state)->sms_notification_in_progress = true; memset(&sms, 0, sizeof(sms)); memset(&rawsms, 0, sizeof(rawsms)); rawsms.memory_type = sms.memory_type = GN_MT_SM; rawsms.number = sms.number = pos; gn_data_clear(&data); data.sms = &sms; dprintf("trying to fetch sms#%hd\n", sms.number); if ((error = gn_sms_get(&data, state)) != GN_ERR_NONE) { DRVINSTANCE(state)->sms_notification_in_progress = false; return false; } DRVINSTANCE(state)->on_sms(&sms, state, DRVINSTANCE(state)->sms_callback_data); dprintf("deleting sms#%hd\n", sms.number); gn_data_clear(&data); data.sms = &sms; data.raw_sms = &rawsms; rawsms.memory_type = sms.memory_type; rawsms.number = sms.number = pos; DeleteSMSMessage(&data, state); DRVINSTANCE(state)->sms_notification_in_progress = false; return true; } static void FlushLostSMSNotifications(struct gn_statemachine *state) { int i; while (!DRVINSTANCE(state)->sms_notification_in_progress && DRVINSTANCE(state)->sms_notification_lost) { DRVINSTANCE(state)->sms_notification_lost = false; for (i = 1; i <= DRVINSTANCE(state)->max_sms; i++) CheckIncomingSMS(state, i); } } static gn_error SetOnSMS(gn_data *data, struct gn_statemachine *state) { if (data->on_sms) { DRVINSTANCE(state)->on_sms = data->on_sms; DRVINSTANCE(state)->sms_callback_data = data->callback_data; DRVINSTANCE(state)->sms_notification_lost = true; FlushLostSMSNotifications(state); } else { DRVINSTANCE(state)->on_sms = NULL; DRVINSTANCE(state)->sms_callback_data = NULL; } return GN_ERR_NONE; } static gn_error IncomingSMS1(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { gn_sms_message_center *smsc; gn_cb_message cbmsg; unsigned char *pos; int n; gn_error error; switch (message[3]) { /* Message sent */ case 0x02: return GN_ERR_NONE; /* Send failed */ case 0x03: /* * The marked part seems to be an ISDN cause code -- bozo * 01 08 00 03 64 [01 32] 00 */ error = isdn_cause2gn_error(NULL, NULL, message[5], message[6]); switch (error) { case GN_ERR_UNKNOWN: return GN_ERR_FAILED; default: return error; } /* SMS message received */ case 0x10: dprintf("SMS received, location: %d\n", message[5]); CheckIncomingSMS(state, message[5]); FlushLostSMSNotifications(state); return GN_ERR_UNSOLICITED; /* FIXME: unhandled frame, request: Get HW&SW version !!! */ case 0x0e: if (length == 4) return GN_ERR_NONE; return GN_ERR_UNHANDLEDFRAME; /* Set CellBroadcast OK */ case 0x21: dprintf("Setting CellBroadcast successful\n"); break; /* Set CellBroadcast error */ case 0x22: dprintf("Setting CellBroadcast failed\n"); break; /* Read CellBroadcast */ case 0x23: if (DRVINSTANCE(state)->on_cell_broadcast) { char *aux; memset(&cbmsg, 0, sizeof(cbmsg)); cbmsg.is_new = true; cbmsg.channel = message[7]; aux = calloc(sizeof(cbmsg.message), 1); n = char_7bit_unpack(0, length-10, sizeof(cbmsg.message)-1, message+10, aux); char_default_alphabet_decode(cbmsg.message, aux, n); free(aux); DRVINSTANCE(state)->on_cell_broadcast(&cbmsg, state, DRVINSTANCE(state)->cb_callback_data); } return GN_ERR_UNSOLICITED; /* Set SMS center OK */ case 0x31: break; /* Set SMS center error */ case 0x32: switch (message[4]) { case 0x02: return GN_ERR_EMPTYLOCATION; case 0x06: /* Insert SIM card */ return GN_ERR_NOTREADY; case 0x0c: /* waiting for PIN */ return GN_ERR_CODEREQUIRED; default: return GN_ERR_UNHANDLEDFRAME; } return GN_ERR_UNHANDLEDFRAME; /* SMS center received */ case 0x34: if (data->message_center) { smsc = data->message_center; pos = message + 4; smsc->id = *pos++; pos++; smsc->format = *pos++; pos++; smsc->validity = *pos++; if (pos[0] % 2) pos[0]++; pos[0] = pos[0] / 2 + 1; snprintf(smsc->recipient.number, sizeof(smsc->recipient.number), "%s", char_bcd_number_get(pos)); smsc->recipient.type = pos[1]; pos += 12; snprintf(smsc->smsc.number, sizeof(smsc->smsc.number), "%s", char_bcd_number_get(pos)); smsc->smsc.type = pos[1]; pos += 12; /* FIXME: codepage must be investigated - bozo */ if (pos[0] == 0x00) { snprintf(smsc->name, sizeof(smsc->name), _("Set %d"), smsc->id); smsc->default_name = smsc->id; } else { snprintf(smsc->name, sizeof(smsc->name), "%s", pos); smsc->default_name = -1; } } break; /* SMS center error recv */ case 0x35: switch (message[4]) { case 0x01: return GN_ERR_EMPTYLOCATION; case 0x06: /* Insert SIM card */ return GN_ERR_NOTREADY; case 0x0c: /* waiting for PIN */ return GN_ERR_CODEREQUIRED; default: return GN_ERR_UNHANDLEDFRAME; } break; case 0xc9: dprintf("Still waiting....\n"); return GN_ERR_UNSOLICITED; default: return GN_ERR_UNHANDLEDFRAME; } return GN_ERR_NONE; } static gn_error GetSMSStatus(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = { FBUS_FRAME_HEADER, 0x36, 0x64 }; if (sm_message_send(5, 0x14, req, state)) return GN_ERR_NOTREADY; return sm_block(0x14, data, state); } static gn_error GetSMSMessage(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = { FBUS_FRAME_HEADER, 0x07, 0x02 /* Unknown */, 0x00 /* Location */, 0x01, 0x64 }; if (!data->raw_sms) return GN_ERR_INTERNALERROR; if (data->raw_sms->memory_type != GN_MT_SM) return GN_ERR_INVALIDMEMORYTYPE; if ((data->raw_sms->number < 0) || (data->raw_sms->number > 255)) return GN_ERR_INVALIDLOCATION; req[5] = data->raw_sms->number; if (sm_message_send(8, 0x02, req, state)) return GN_ERR_NOTREADY; return sm_block(0x14, data, state); } static gn_error SaveSMSMessage(gn_data *data, struct gn_statemachine *state) { unsigned char req[256] = {FBUS_FRAME_HEADER, 0x04, 0x07, /* status */ 0x02, 0x00, /* number */ 0x02 }; /* type */ int len; if (!data->raw_sms) return GN_ERR_INTERNALERROR; if ((data->raw_sms->number < 0) || (data->raw_sms->number > 255)) return GN_ERR_INVALIDLOCATION; if (44 + data->raw_sms->user_data_length > sizeof(req)) return GN_ERR_WRONGDATAFORMAT; if (data->raw_sms->type == GN_SMS_MT_Deliver) { /* Inbox */ dprintf("INBOX!\n"); req[4] = 0x03; /* SMS State - GN_SMS_Unread */ req[7] = 0x00; /* SMS Type */ } if (data->raw_sms->status == GN_SMS_Sent) req[4] -= 0x02; req[6] = data->raw_sms->number; #if 0 req[20] = 0x01; /* SMS Submit */ if (data->raw_sms->udh_indicator) req[20] |= 0x40; if (data->raw_sms->validity_indicator) req[20] |= 0x10; req[24] = data->raw_sms->user_data_length; memcpy(req + 37, data->raw_sms->validity, 7); memcpy(req + 44, data->raw_sms->dser_data, data->raw_sms->user_data_length); #endif len = pnok_fbus_sms_encode(req + 8, data, state); len += 8; if (sm_message_send(len, 0x14, req, state)) return GN_ERR_NOTREADY; return sm_block(0x14, data, state); } static gn_error DeleteSMSMessage(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = { FBUS_FRAME_HEADER, 0x0a, 0x02, 0x00 /* Location */ }; if (!data->sms) return GN_ERR_INTERNALERROR; if (data->sms->memory_type != GN_MT_SM) return GN_ERR_INVALIDMEMORYTYPE; if ((data->raw_sms->number < 0) || (data->raw_sms->number > 255)) return GN_ERR_INVALIDLOCATION; req[5] = data->sms->number; if (sm_message_send(6, 0x14, req, state)) return GN_ERR_NOTREADY; return sm_block(0x14, data, state); } static gn_error GetSMSFolders(gn_data *data, struct gn_statemachine *state) { if (!data || !data->sms_folder_list) return GN_ERR_INTERNALERROR; memset(data->sms_folder_list, 0, sizeof(gn_sms_folder_list)); data->sms_folder_list->number = 1; snprintf(data->sms_folder_list->folder[0].name, sizeof(data->sms_folder_list->folder[0].name), "%s", gn_memory_type_print(GN_MT_SM)); data->sms_folder_list->folder_id[0] = GN_MT_SM; data->sms_folder_list->folder[0].folder_id = NK6100_MEMORY_SM; return GN_ERR_NONE; } static gn_error GetSMSFolderStatus(gn_data *data, struct gn_statemachine *state) { gn_error error; gn_sms_status smsstatus = {0, 0, 0, 0}, *save_smsstatus; if (!data || !data->sms_folder) return GN_ERR_INTERNALERROR; if (data->sms_folder->folder_id != NK6100_MEMORY_SM) return GN_ERR_INVALIDMEMORYTYPE; error = GetSMSFolders(data, state); if (error != GN_ERR_NONE) return error; save_smsstatus = data->sms_status; data->sms_status = &smsstatus; error = GetSMSStatus(data, state); data->sms_status = save_smsstatus; if (error != GN_ERR_NONE) return error; data->sms_folder->number = smsstatus.number; return GN_ERR_NONE; } static gn_error IncomingSMS(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { int i; switch (message[3]) { /* save sms succeeded */ case 0x05: dprintf("Message stored at %d\n", message[5]); if (data->raw_sms) data->raw_sms->number = message[5]; break; /* save sms failed */ case 0x06: dprintf("SMS saving failed:\n"); switch (message[4]) { case 0x02: dprintf("\tAll locations busy.\n"); return GN_ERR_MEMORYFULL; case 0x03: dprintf("\tInvalid location!\n"); return GN_ERR_INVALIDLOCATION; case 0x06: /* Insert SIM card */ dprintf("\tInsert SIM card!\n"); return GN_ERR_NOTREADY; case 0x0c: /* waiting for PIN */ dprintf("\tPIN or PUK code required.\n"); return GN_ERR_CODEREQUIRED; default: dprintf("\tUnknown reason.\n"); return GN_ERR_UNHANDLEDFRAME; } /* read sms */ case 0x08: for (i = 0; i < length; i++) dprintf("[%02x(%d)]", message[i], i); dprintf("\n"); if (!data->raw_sms) return GN_ERR_INTERNALERROR; memset(data->raw_sms, 0, sizeof(gn_sms_raw)); #define getdata(d,dr,s) (message[(data->raw_sms->type == GN_SMS_MT_Deliver) ? (d) : ((data->raw_sms->type == GN_SMS_MT_StatusReport) ? (dr) : (s))]) switch (message[7]) { case 0x00: data->raw_sms->type = GN_SMS_MT_Deliver; break; case 0x01: data->raw_sms->type = GN_SMS_MT_StatusReport; break; case 0x02: data->raw_sms->type = GN_SMS_MT_Submit; break; default: return GN_ERR_UNHANDLEDFRAME; } data->raw_sms->number = message[6]; data->raw_sms->memory_type = GN_MT_SM; data->raw_sms->status = message[4]; data->raw_sms->dcs = getdata(22, 21, 23); data->raw_sms->length = getdata(23, 22, 24); data->raw_sms->udh_indicator = message[20]; data->raw_sms->user_data_length = data->raw_sms->length; if (data->raw_sms->udh_indicator & 0x40) data->raw_sms->user_data_length -= message[getdata(24, 23, 25)] + 1; memcpy(data->raw_sms->user_data, &getdata(43, 22, 44), data->raw_sms->length); if (data->raw_sms->type == GN_SMS_MT_StatusReport) { data->raw_sms->reply_via_same_smsc = message[11]; memcpy(data->raw_sms->time, message + 42, 7); data->raw_sms->report_status = message[22]; } if (data->raw_sms->type != GN_SMS_MT_Submit) { memcpy(data->raw_sms->smsc_time, &getdata(36, 35, 0), 7); } memcpy(data->raw_sms->message_center, message + 8, 12); memcpy(data->raw_sms->remote_number, &getdata(24, 23, 25), 12); #undef getdata break; /* read sms failed */ case 0x09: dprintf("SMS reading failed:\n"); switch (message[4]) { case 0x00: dprintf("\tUnknown reason!\n"); return GN_ERR_UNKNOWN; case 0x02: dprintf("\tInvalid location!\n"); return GN_ERR_INVALIDLOCATION; case 0x06: dprintf("\tInsert SIM card!\n"); return GN_ERR_NOTREADY; case 0x07: dprintf("\tEmpty SMS location.\n"); return GN_ERR_EMPTYLOCATION; case 0x0c: /* waiting for PIN */ dprintf("\tPIN or PUK code required.\n"); return GN_ERR_CODEREQUIRED; default: dprintf("\tUnknown reason.\n"); return GN_ERR_UNHANDLEDFRAME; } /* delete sms succeeded */ case 0x0b: dprintf("Message: SMS deleted successfully.\n"); break; /* delete sms failed */ case 0x0c: switch (message[4]) { case 0x00: return GN_ERR_UNKNOWN; case 0x02: return GN_ERR_INVALIDLOCATION; case 0x06: /* Insert SIM card */ return GN_ERR_NOTREADY; case 0x0c: /* waiting for PIN */ return GN_ERR_CODEREQUIRED; default: return GN_ERR_UNHANDLEDFRAME; } /* sms status succeded */ case 0x37: dprintf("Message: SMS Status Received\n"); dprintf("\tThe number of messages: %d\n", message[10]); dprintf("\tUnread messages: %d\n", message[11]); if (!data->sms_status) return GN_ERR_INTERNALERROR; data->sms_status->unread = message[11]; data->sms_status->number = message[10]; break; /* sms status failed */ case 0x38: switch (message[4]) { case 0x06: /* Insert SIM card */ return GN_ERR_NOTREADY; case 0x0c: /* waiting for PIN */ return GN_ERR_CODEREQUIRED; default: return GN_ERR_UNHANDLEDFRAME; } /* unknown */ default: dprintf("Unknown message.\n"); return GN_ERR_UNHANDLEDFRAME; } return GN_ERR_NONE; } static gn_error GetNetworkInfo(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = { FBUS_FRAME_HEADER, 0x70 }; if (sm_message_send(4, 0x0a, req, state)) return GN_ERR_NOTREADY; return sm_block(0x0a, data, state); } static gn_error IncomingNetworkInfo(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { switch (message[3]) { /* Network info */ case 0x71: dprintf("Message: Network Info Received\n"); if (message[7] >= 9) { if (data->network_info) { data->network_info->cell_id[0] = message[10]; data->network_info->cell_id[1] = message[11]; data->network_info->LAC[0] = message[12]; data->network_info->LAC[1] = message[13]; data->network_info->network_code[0] = '0' + (message[14] & 0x0f); data->network_info->network_code[1] = '0' + (message[14] >> 4); data->network_info->network_code[2] = '0' + (message[15] & 0x0f); data->network_info->network_code[3] = ' '; data->network_info->network_code[4] = '0' + (message[16] & 0x0f); data->network_info->network_code[5] = '0' + (message[16] >> 4); data->network_info->network_code[6] = 0; } } else if (message[7] >= 2) { /* This can happen if handset has not (yet) registered with network (e.g. waiting for PIN code) */ /* FIXME: print error messages instead of numeric codes, see Docs/protocol/nk6110.txt */ dprintf("netstatus 0x%02x netsel 0x%02x\n", message[8], message[9]); return GN_ERR_NOTAVAILABLE; } else { return GN_ERR_UNHANDLEDFRAME; } break; default: return GN_ERR_UNHANDLEDFRAME; } return GN_ERR_NONE; } static gn_error GetWelcomeMessage(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x16}; if (sm_message_send(4, 0x05, req, state)) return GN_ERR_NOTREADY; return sm_block(0x05, data, state); } static gn_error GetOperatorLogo(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x33, 0x01}; req[4] = data->bitmap->number; if (sm_message_send(5, 0x05, req, state)) return GN_ERR_NOTREADY; return sm_block(0x05, data, state); } static gn_error SetBitmap(gn_data *data, struct gn_statemachine *state) { unsigned char req[512 + GN_BMP_MAX_SIZE] = {FBUS_FRAME_HEADER}; gn_bmp *bmp; unsigned char *pos; int len; bmp = data->bitmap; pos = req+3; switch (bmp->type) { case GN_BMP_WelcomeNoteText: len = strlen(bmp->text); if (len > 255) { dprintf("WelcomeNoteText is too long\n"); return GN_ERR_INVALIDSIZE; } *pos++ = 0x18; *pos++ = 0x01; /* one block */ *pos++ = 0x02; *pos = pnok_string_encode(pos+1, len, bmp->text); pos += *pos+1; if (sm_message_send(pos-req, 0x05, req, state)) return GN_ERR_NOTREADY; return sm_block(0x05, data, state); case GN_BMP_DealerNoteText: len = strlen(bmp->text); if (len > 255) { dprintf("DealerNoteText is too long\n"); return GN_ERR_INVALIDSIZE; } *pos++ = 0x18; *pos++ = 0x01; /* one block */ *pos++ = 0x03; *pos = pnok_string_encode(pos+1, len, bmp->text); pos += *pos+1; if (sm_message_send(pos-req, 0x05, req, state)) return GN_ERR_NOTREADY; return sm_block(0x05, data, state); case GN_BMP_StartupLogo: if (bmp->size > GN_BMP_MAX_SIZE) { dprintf("StartupLogo is too long\n"); return GN_ERR_INVALIDSIZE; } *pos++ = 0x18; *pos++ = 0x01; /* one block */ *pos++ = 0x01; *pos++ = bmp->height; *pos++ = bmp->width; memcpy(pos, bmp->bitmap, bmp->size); pos += bmp->size; if (sm_message_send(pos-req, 0x05, req, state)) return GN_ERR_NOTREADY; return sm_block(0x05, data, state); case GN_BMP_OperatorLogo: if (bmp->size > GN_BMP_MAX_SIZE) { dprintf("OperatorLogo is too long\n"); return GN_ERR_INVALIDSIZE; } if (DRVINSTANCE(state)->capabilities & NK6100_CAP_NBS_UPLOAD) return NBSUpload(data, state, GN_SMS_DATA_Bitmap); *pos++ = 0x30; /* Store Op Logo */ *pos++ = 0x01; /* location */ *pos++ = ((bmp->netcode[1] & 0x0f) << 4) | (bmp->netcode[0] & 0x0f); *pos++ = 0xf0 | (bmp->netcode[2] & 0x0f); *pos++ = ((bmp->netcode[5] & 0x0f) << 4) | (bmp->netcode[4] & 0x0f); *pos++ = (bmp->size + 4) >> 8; *pos++ = (bmp->size + 4) & 0xff; *pos++ = 0x00; /* infofield */ *pos++ = bmp->width; *pos++ = bmp->height; *pos++ = 0x01; /* Just BW */ memcpy(pos, bmp->bitmap, bmp->size); pos += bmp->size; if (sm_message_send(pos-req, 0x05, req, state)) return GN_ERR_NOTREADY; return sm_block(0x05, data, state); case GN_BMP_CallerLogo: len = strlen(bmp->text); if (len > 255) { dprintf("Callergroup name is too long\n"); return GN_ERR_INVALIDSIZE; } if (bmp->size > GN_BMP_MAX_SIZE) { dprintf("CallerLogo is too long\n"); return GN_ERR_INVALIDSIZE; } *pos++ = 0x13; *pos++ = bmp->number; *pos = pnok_string_encode(pos+1, len, bmp->text); pos += *pos+1; *pos++ = bmp->ringtone; *pos++ = 0x01; /* Graphic on. You can use other values as well: 0x00 - Off 0x01 - On 0x02 - View Graphics 0x03 - Send Graphics 0x04 - Send via IR You can even set it higher but Nokia phones (my 6110 at least) will not show you the name of this item in menu ;-)) Nokia is really joking here. */ *pos++ = (bmp->size + 4) >> 8; *pos++ = (bmp->size + 4) & 0xff; *pos++ = 0x00; /* Future extensions! */ *pos++ = bmp->width; *pos++ = bmp->height; *pos++ = 0x01; /* Just BW */ memcpy(pos, bmp->bitmap, bmp->size); pos += bmp->size; if (sm_message_send(pos-req, 0x03, req, state)) return GN_ERR_NOTREADY; return sm_block(0x03, data, state); case GN_BMP_None: case GN_BMP_PictureMessage: return GN_ERR_NOTSUPPORTED; default: return GN_ERR_INTERNALERROR; } } static gn_error GetProfileFeature(int id, gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x13, 0x01, 0x00, 0x00}; if ((data->profile->number < 0) || (data->profile->number > 255)) return GN_ERR_INVALIDLOCATION; req[5] = data->profile->number; req[6] = (unsigned char)id; if (sm_message_send(7, 0x05, req, state)) return GN_ERR_NOTREADY; return sm_block(0x05, data, state); } static gn_error SetProfileFeature(gn_data *data, struct gn_statemachine *state, int id, int value) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x10, 0x01, 0x00, 0x00, 0x00, 0x01}; if ((data->profile->number < 0) || (data->profile->number > 255)) return GN_ERR_INVALIDLOCATION; req[5] = data->profile->number; req[6] = (unsigned char)id; req[7] = (unsigned char)value; dprintf("Setting profile %d feature %d to %d\n", req[5], req[6], req[7]); if (sm_message_send(9, 0x05, req, state)) return GN_ERR_NOTREADY; return sm_block(0x05, data, state); } static gn_error GetProfile(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x1a, 0x00}; gn_profile *prof; gn_error error; int i; if (!data->profile) return GN_ERR_UNKNOWN; if ((data->profile->number < 0) || (data->profile->number > 255)) return GN_ERR_INVALIDLOCATION; prof = data->profile; req[4] = prof->number; if (sm_message_send(5, 0x05, req, state)) return GN_ERR_NOTREADY; if ((error = sm_block(0x05, data, state))) return error; for (i = 0; i <= 0x09; i++) { if ((error = GetProfileFeature(i, data, state))) return error; } if (prof->default_name > -1) { /* For N5110 */ /* FIXME: It should be set for N5130 and 3210 too */ if (!strcmp(DRVINSTANCE(state)->model, "NSE-1")) { switch (prof->default_name) { case 0x00: snprintf(prof->name, sizeof(prof->name), _("Personal")); break; case 0x01: snprintf(prof->name, sizeof(prof->name), _("Car")); break; case 0x02: snprintf(prof->name, sizeof(prof->name), _("Headset")); break; default: snprintf(prof->name, sizeof(prof->name), _("Unknown (%d)"), prof->default_name); break; } } else { switch (prof->default_name) { case 0x00: snprintf(prof->name, sizeof(prof->name), _("General")); break; case 0x01: snprintf(prof->name, sizeof(prof->name), _("Silent")); break; case 0x02: snprintf(prof->name, sizeof(prof->name), _("Meeting")); break; case 0x03: snprintf(prof->name, sizeof(prof->name), _("Outdoor")); break; case 0x04: snprintf(prof->name, sizeof(prof->name), _("Pager")); break; case 0x05: snprintf(prof->name, sizeof(prof->name), _("Car")); break; case 0x06: snprintf(prof->name, sizeof(prof->name), _("Headset")); break; default: snprintf(prof->name, sizeof(prof->name), _("Unknown (%d)"), prof->default_name); break; } } } return GN_ERR_NONE; } static gn_error SetProfile(gn_data *data, struct gn_statemachine *state) { unsigned char req[64] = {FBUS_FRAME_HEADER, 0x1c, 0x01, 0x03}; gn_profile *prof; gn_error error; if (!data->profile) return GN_ERR_UNKNOWN; if ((data->profile->number < 0) || (data->profile->number > 255)) return GN_ERR_INVALIDLOCATION; prof = data->profile; dprintf("Setting profile %d (%s)\n", prof->number, prof->name); if (prof->number == 0) { /* We cannot rename the General profile! - bozo */ /* * FIXME: We must to do something. We cannot ask the name * of the General profile, because it's language dependent. * But without SetProfileName we aren't able to set features. */ dprintf("You cannot rename General profile\n"); return GN_ERR_NOTSUPPORTED; } else if (prof->default_name > -1) { prof->name[0] = 0; } req[7] = prof->number; req[8] = pnok_string_encode(req+9, 39, prof->name); req[6] = req[8] + 2; if (sm_message_send(req[8]+9, 0x05, req, state)) return GN_ERR_NOTREADY; if ((error = sm_block(0x05, data, state))) return error; error = SetProfileFeature(data, state, 0x00, prof->keypad_tone); error |= SetProfileFeature(data, state, 0x01, prof->lights); error |= SetProfileFeature(data, state, 0x02, prof->call_alert); error |= SetProfileFeature(data, state, 0x03, prof->ringtone); error |= SetProfileFeature(data, state, 0x04, prof->volume); error |= SetProfileFeature(data, state, 0x05, prof->message_tone); error |= SetProfileFeature(data, state, 0x06, prof->vibration); error |= SetProfileFeature(data, state, 0x07, prof->warning_tone); error |= SetProfileFeature(data, state, 0x08, prof->caller_groups); error |= SetProfileFeature(data, state, 0x09, prof->automatic_answer); return (error == GN_ERR_NONE) ? GN_ERR_NONE : GN_ERR_UNKNOWN; } static gn_error GetRingtone(gn_data *data, struct gn_statemachine *state) { gn_data d; gn_error err; gn_raw_data rawdata; char buf[4096]; if (!data->ringtone) return GN_ERR_INTERNALERROR; memset(&rawdata, 0, sizeof(gn_raw_data)); rawdata.data = buf; rawdata.length = sizeof(buf); gn_data_clear(&d); d.ringtone = data->ringtone; d.raw_data = &rawdata; if ((err = GetRawRingtone(&d, state)) != GN_ERR_NONE) return err; return pnok_ringtone_from_raw(data->ringtone, rawdata.data, rawdata.length); } static gn_error SetRingtone(gn_data *data, struct gn_statemachine *state) { unsigned char req[7 + GN_RINGTONE_PACKAGE_MAX_LENGTH] = {FBUS_FRAME_HEADER, 0x36, 0x00, 0x00, 0x78}; int size; if (!data || !data->ringtone) return GN_ERR_INTERNALERROR; if (data->ringtone->location < 0) data->ringtone->location = 17; if (DRVINSTANCE(state)->capabilities & NK6100_CAP_NBS_UPLOAD) { data->ringtone->location = -1; return NBSUpload(data, state, GN_SMS_DATA_Ringtone); } size = GN_RINGTONE_PACKAGE_MAX_LENGTH; gn_ringtone_pack(data->ringtone, req + 7, &size); req[4] = data->ringtone->location - 17; if (sm_message_send(7 + size, 0x05, req, state)) return GN_ERR_NOTREADY; return sm_block(0x05, data, state); } static gn_error GetActiveProfile(gn_data *data, struct gn_statemachine *state) { if (!data->profile) return GN_ERR_UNKNOWN; data->profile->number = 0; return GetProfileFeature(0x2a, data, state); } static gn_error SetActiveProfile(gn_data *data, struct gn_statemachine *state) { if (!data->profile) return GN_ERR_UNKNOWN; return SetProfileFeature(data, state, 0x2a, data->profile->number); } static gn_error IncomingProfile(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { gn_bmp *bmp; gn_profile *prof; unsigned char *pos; int i; bool found; switch (message[3]) { /* Set profile feat. OK */ case 0x11: if (length == 4) break; /* non profile specific, e.g. set active profile */ switch (message[4]) { case 0x01: break; case 0x7d: dprintf("Cannot set profile feature\n"); return GN_ERR_UNKNOWN; default: return GN_ERR_UNHANDLEDFRAME; } break; /* Set profile feat. ERR */ case 0x12: switch (message[4]) { case 0x6f: /* Insert SIM card */ return GN_ERR_NOTREADY; case 0x7d: dprintf("Cannot set profile feature\n"); return GN_ERR_INVALIDLOCATION; case 0x8d: /* waiting for PIN */ return GN_ERR_CODEREQUIRED; default: return GN_ERR_UNHANDLEDFRAME; } break; /* Get profile feature */ case 0x14: if (data->profile) { prof = data->profile; switch (message[6]) { case 0x00: prof->keypad_tone = message[8]; break; case 0x01: prof->lights = message[8]; break; case 0x02: prof->call_alert = message[8]; break; case 0x03: prof->ringtone = message[8]; break; case 0x04: prof->volume = message[8]; break; case 0x05: prof->message_tone = message[8]; break; case 0x06: prof->vibration = message[8]; break; case 0x07: prof->warning_tone = message[8]; break; case 0x08: prof->caller_groups = message[8]; break; case 0x09: prof->automatic_answer = message[8]; break; case 0x2a: prof->number = message[8]; break; default: return GN_ERR_UNHANDLEDFRAME; } } break; /* Get profile error */ case 0x15: switch (message[4]) { case 0x6f: /* Insert SIM card */ return GN_ERR_NOTREADY; case 0x7d: return GN_ERR_INVALIDLOCATION; case 0x8d: /* waiting for PIN */ return GN_ERR_CODEREQUIRED; default: return GN_ERR_UNHANDLEDFRAME; } /* Get Welcome Message */ case 0x17: if (data->bitmap) { bmp = data->bitmap; pos = message + 5; found = false; for (i = 0; i < message[4] && !found; i++) { switch (*pos++) { case 0x01: if (bmp->type != GN_BMP_StartupLogo) { pos += pos[0] * pos[1] / 8 + 2; continue; } bmp->height = *pos++; bmp->width = *pos++; bmp->size = bmp->height * bmp->width / 8; if (bmp->size > sizeof(bmp->bitmap)) { return GN_ERR_UNHANDLEDFRAME; } memcpy(bmp->bitmap, pos, bmp->size); pos += bmp->size; break; case 0x02: if (bmp->type != GN_BMP_WelcomeNoteText) { pos += *pos + 1; continue; } pnok_string_decode(bmp->text, sizeof(bmp->text), pos+1, *pos); pos += *pos + 1; break; case 0x03: if (bmp->type != GN_BMP_DealerNoteText) { pos += *pos + 1; continue; } pnok_string_decode(bmp->text, sizeof(bmp->text), pos+1, *pos); pos += *pos + 1; break; default: return GN_ERR_UNHANDLEDFRAME; } found = true; } if (!found) return GN_ERR_NOTSUPPORTED; } break; /* Set welcome ok */ case 0x19: break; /* Get profile name */ case 0x1b: switch (message[4]) { case 0x01: break; case 0x6f: return GN_ERR_NOTREADY; case 0x8d: return GN_ERR_CODEREQUIRED; case 0x93: return GN_ERR_EMPTYLOCATION; default: return GN_ERR_UNHANDLEDFRAME; } if (data->profile) { if (message[9] == 0x00) { data->profile->default_name = message[8]; data->profile->name[0] = 0; } else { data->profile->default_name = -1; pnok_string_decode(data->profile->name, sizeof(data->profile->name), message+10, message[9]); } break; } else { return GN_ERR_UNKNOWN; } break; /* Set profile name OK / ERR */ case 0x1d: switch (message[4]) { case 0x01: break; case 0x6f: /* Insert SIM card */ return GN_ERR_NOTREADY; case 0x8d: /* waiting for PIN */ return GN_ERR_CODEREQUIRED; default: return GN_ERR_UNHANDLEDFRAME; } break; /* Set oplogo ok */ case 0x31: break; /* Set oplogo error */ case 0x32: switch (message[4]) { case 0x7d: return GN_ERR_INVALIDLOCATION; default: return GN_ERR_UNHANDLEDFRAME; } /* Get oplogo */ case 0x34: if (data->bitmap) { bmp = data->bitmap; pos = message + 5; bmp->netcode[0] = '0' + (pos[0] & 0x0f); bmp->netcode[1] = '0' + (pos[0] >> 4); bmp->netcode[2] = '0' + (pos[1] & 0x0f); bmp->netcode[3] = ' '; bmp->netcode[4] = '0' + (pos[2] & 0x0f); bmp->netcode[5] = '0' + (pos[2] >> 4); bmp->netcode[6] = 0; pos += 3; bmp->size = (pos[0] << 8) + pos[1]; pos += 2; pos++; bmp->width = *pos++; bmp->height = *pos++; pos++; i = bmp->height * bmp->width / 8; if (bmp->size > i) bmp->size = i; if (bmp->size > sizeof(bmp->bitmap)) { return GN_ERR_UNHANDLEDFRAME; } memcpy(bmp->bitmap, pos, bmp->size); } break; /* Get oplogo error */ case 0x35: switch (message[4]) { case 0x7d: return GN_ERR_UNKNOWN; default: return GN_ERR_UNHANDLEDFRAME; } break; /* Set ringtone OK */ case 0x37: return GN_ERR_NONE; /* Set ringtone error */ case 0x38: switch (message[4]) { case 0x7d: return GN_ERR_UNKNOWN; default: return GN_ERR_UNHANDLEDFRAME; } break; default: return GN_ERR_UNHANDLEDFRAME; } return GN_ERR_NONE; } static gn_error GetDateTime(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x62}; if (sm_message_send(4, 0x11, req, state)) return GN_ERR_NOTREADY; return sm_block(0x11, data, state); } static gn_error SetDateTime(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x60, 0x01, 0x01, 0x07, 0x00, 0x00, /* year - H/L */ 0x00, 0x00, /* month, day */ 0x00, 0x00, /* hours, minutes */ 0x00}; /* Unknown, but not seconds - try 59 and wait 1 sec. */ req[7] = data->datetime->year >> 8; req[8] = data->datetime->year & 0xff; req[9] = data->datetime->month; req[10] = data->datetime->day; req[11] = data->datetime->hour; req[12] = data->datetime->minute; if (sm_message_send(14, 0x11, req, state)) return GN_ERR_NOTREADY; return sm_block(0x11, data, state); } static gn_error GetAlarm(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x6d}; if (sm_message_send(4, 0x11, req, state)) return GN_ERR_NOTREADY; return sm_block(0x11, data, state); } static gn_error SetAlarm(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x6b, 0x01, 0x20, 0x03, 0x02, /* should be alarm on/off, but it doesn't work */ 0x00, 0x00, /* hours, minutes */ 0x00}; /* Unknown, but not seconds - try 59 and wait 1 sec. */ if (data->alarm->enabled) { req[8] = data->alarm->timestamp.hour; req[9] = data->alarm->timestamp.minute; } else { dprintf("Clearing the alarm clock isn't supported\n"); return GN_ERR_NOTSUPPORTED; } if (sm_message_send(11, 0x11, req, state)) return GN_ERR_NOTREADY; return sm_block(0x11, data, state); } static gn_error IncomingPhoneClockAndAlarm(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { gn_timestamp *date; gn_calnote_alarm *alarm; unsigned char *pos; switch (message[3]) { /* Date and time set */ case 0x61: switch (message[4]) { case 0x01: break; case 0x6f: /* Insert SIM card */ return GN_ERR_NOTREADY; case 0x8d: /* waiting for PIN */ return GN_ERR_CODEREQUIRED; default: return GN_ERR_UNHANDLEDFRAME; } break; /* Date and time received */ case 0x63: dprintf("Message: Date and time\n"); if (!message[4]) dprintf(" Date: not set\n"); if (!message[5]) dprintf(" Time: not set\n"); if (!(message[4] && message[5])) return GN_ERR_NOTAVAILABLE; if (data->datetime) { date = data->datetime; pos = message + 8; date->year = (pos[0] << 8) | pos[1]; pos += 2; date->month = *pos++; date->day = *pos++; date->hour = *pos++; date->minute = *pos++; date->second = *pos++; dprintf(" Time: %02d:%02d:%02d\n", date->hour, date->minute, date->second); dprintf(" Date: %4d/%02d/%02d\n", date->year, date->month, date->day); } break; /* Alarm set */ case 0x6c: switch (message[4]) { case 0x01: break; case 0x6f: /* Insert SIM card */ return GN_ERR_NOTREADY; case 0x8d: /* waiting for PIN */ return GN_ERR_CODEREQUIRED; default: return GN_ERR_UNHANDLEDFRAME; } break; /* Alarm received */ case 0x6e: if (data->alarm) { alarm = data->alarm; pos = message + 8; alarm->enabled = (*pos++ == 2); alarm->timestamp.hour = *pos++; alarm->timestamp.minute = *pos++; alarm->timestamp.second = 0; dprintf("Message: Alarm\n"); dprintf(" Alarm: %02d:%02d\n", alarm->timestamp.hour, alarm->timestamp.minute); dprintf(" Alarm is %s\n", alarm->enabled ? "on" : "off"); } break; default: return GN_ERR_UNHANDLEDFRAME; } return GN_ERR_NONE; } static gn_error GetCalendarNote(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x66, 0x00}; if ((data->calnote->location < 0) || (data->calnote->location > 255)) return GN_ERR_INVALIDLOCATION; req[4] = data->calnote->location; if (sm_message_send(5, 0x13, req, state)) return GN_ERR_NOTREADY; return sm_block(0x13, data, state); } static gn_error WriteCalendarNote(gn_data *data, struct gn_statemachine *state) { unsigned char req[512] = {FBUS_FRAME_HEADER, 0x64, 0x01, 0x10, 0x00, /* Length of the rest of the frame. */ 0x00}; /* The type of calendar note */ gn_calnote *note; unsigned char *pos; unsigned int numlen, namelen; if (!data->calnote) return GN_ERR_UNKNOWN; if ((data->calnote->location < 0) || (data->calnote->location > 255)) return GN_ERR_INVALIDLOCATION; note = data->calnote; pos = req + 7; numlen = strlen(note->phone_number); if (numlen > GN_PHONEBOOK_NUMBER_MAX_LENGTH) { return GN_ERR_UNKNOWN; } switch (note->type) { case GN_CALNOTE_REMINDER: *pos++ = 0x01; break; case GN_CALNOTE_CALL: *pos++ = 0x02; break; case GN_CALNOTE_MEETING: *pos++ = 0x03; break; case GN_CALNOTE_BIRTHDAY: *pos++ = 0x04; break; default: return GN_ERR_INTERNALERROR; } *pos++ = note->time.year >> 8; *pos++ = note->time.year & 0xff; *pos++ = note->time.month; *pos++ = note->time.day; *pos++ = note->time.hour; *pos++ = note->time.minute; *pos++ = note->time.timezone; if (note->alarm.timestamp.year) { *pos++ = note->alarm.timestamp.year >> 8; *pos++ = note->alarm.timestamp.year & 0xff; *pos++ = note->alarm.timestamp.month; *pos++ = note->alarm.timestamp.day; *pos++ = note->alarm.timestamp.hour; *pos++ = note->alarm.timestamp.minute; *pos++ = note->alarm.timestamp.timezone; } else { memset(pos, 0x00, 7); pos += 7; } /* FIXME: use some constant not 255 magic number */ if (!strcmp(DRVINSTANCE(state)->model, "NHM-5") /* Nokia 3310 */ || !strcmp(DRVINSTANCE(state)->model, "NHM-6")) { /* Nokia 3330 */ /* in this case we have: length, encoding indicator, text */ namelen = pnok_string_encode(pos + 2, 255, note->text); *pos++ = namelen + 1; /* length of text + encoding indicator */ *pos++ = 0x03; /* encoding type */ } else { if (DRVINSTANCE(state)->capabilities & NK6100_CAP_CAL_UNICODE) namelen = char_unicode_encode(pos + 1, note->text, 255); else namelen = pnok_string_encode(pos + 1, 255, note->text); *pos++ = namelen; } pos += namelen; if (note->type == GN_CALNOTE_CALL) { *pos++ = numlen; memcpy(pos, note->phone_number, numlen); pos += numlen; } else { *pos++ = 0; } if (sm_message_send(pos - req, 0x13, req, state)) return GN_ERR_NOTREADY; return sm_block(0x13, data, state); } static gn_error DeleteCalendarNote(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x68, 0x00}; if ((data->calnote->location < 0) || (data->calnote->location > 255)) return GN_ERR_INVALIDLOCATION; req[4] = data->calnote->location; if (sm_message_send(5, 0x13, req, state)) return GN_ERR_NOTREADY; return sm_block(0x13, data, state); } static gn_error IncomingCalendar(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { gn_calnote *note; unsigned char *pos; int n; switch (message[3]) { /* Write cal.note report */ case 0x65: switch (message[4]) { case 0x01: return GN_ERR_NONE; case 0x6f: /* Insert SIM card */ return GN_ERR_NOTREADY; case 0x73: return GN_ERR_MEMORYFULL; case 0x7d: return GN_ERR_UNKNOWN; case 0x81: /* calendar functions are busy. well, this status code is better than nothing */ return GN_ERR_LINEBUSY; case 0x8d: /* waiting for PIN */ return GN_ERR_CODEREQUIRED; default: return GN_ERR_UNHANDLEDFRAME; } break; /* Calendar note recvd */ case 0x67: switch (message[4]) { case 0x01: break; case 0x6f: /* Insert SIM card */ return GN_ERR_NOTREADY; case 0x8d: /* waiting for PIN */ return GN_ERR_CODEREQUIRED; case 0x93: return GN_ERR_EMPTYLOCATION; default: return GN_ERR_UNHANDLEDFRAME; } if (data->calnote) { note = data->calnote; pos = message + 8; /* FIXME: this supposed to be replaced by general date unpacking function :-) */ switch (*pos++) { case 0x01: note->type = GN_CALNOTE_REMINDER; break; case 0x02: note->type = GN_CALNOTE_CALL; break; case 0x03: note->type = GN_CALNOTE_MEETING; break; case 0x04: note->type = GN_CALNOTE_BIRTHDAY; break; default: return GN_ERR_UNHANDLEDFRAME; } note->time.year = (pos[0] << 8) + pos[1]; pos += 2; note->time.month = *pos++; note->time.day = *pos++; note->time.hour = *pos++; note->time.minute = *pos++; note->time.second = *pos++; note->alarm.timestamp.year = (pos[0] << 8) + pos[1]; pos += 2; note->alarm.timestamp.month = *pos++; note->alarm.timestamp.day = *pos++; note->alarm.timestamp.hour = *pos++; note->alarm.timestamp.minute = *pos++; note->alarm.timestamp.second = *pos++; note->alarm.enabled = (note->alarm.timestamp.year != 0); n = *pos++; if (!strcmp(DRVINSTANCE(state)->model, "NHM-5") /* Nokia 3310 */ || !strcmp(DRVINSTANCE(state)->model, "NHM-6")) { /* Nokia 3330 */ pos++; /* skip encoding byte FIXME: decode accordingly */ n--; /* text length */ } if ((DRVINSTANCE(state)->capabilities & NK6100_CAP_CAL_UNICODE)) char_unicode_decode(note->text, pos, n); else pnok_string_decode(note->text, sizeof(note->text), pos, n); pos += n; if (note->type == GN_CALNOTE_CALL) { /* This will be replaced later :-) */ n = *pos++; pnok_string_decode(note->phone_number, sizeof(note->phone_number), pos, n); pos += n; } else { note->phone_number[0] = 0; } /* from Nokia 3310 and 3330 we always read year == 2090 */ if (note->time.year == 2090) { note->time.year = note->alarm.timestamp.year; /* FIXME: decrease note->time.year if the new start date is later than alarm date (this happens if you set an alarm for the next year); this would need a gn_timestamp_cmp() but would break again if you set an alarm two years in the future */ } memset(¬e->end_time, 0, sizeof(note->end_time)); note->mlocation[0] = 0; } break; /* Del. cal.note report */ case 0x69: switch (message[4]) { case 0x01: break; case 0x6f: /* Insert SIM card */ return GN_ERR_NOTREADY; case 0x81: /* calendar functions are busy. well, this status code is better than nothing */ return GN_ERR_LINEBUSY; case 0x8d: /* waiting for PIN */ return GN_ERR_CODEREQUIRED; case 0x93: return GN_ERR_EMPTYLOCATION; default: return GN_ERR_UNHANDLEDFRAME; } break; default: return GN_ERR_UNHANDLEDFRAME; } return GN_ERR_NONE; } static gn_error GetDisplayStatus(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x51}; if (sm_message_send(4, 0x0d, req, state)) return GN_ERR_NOTREADY; return sm_block(0x0d, data, state); } static gn_error PollDisplay(gn_data *data, struct gn_statemachine *state) { gn_data dummy; gn_data_clear(&dummy); GetDisplayStatus(&dummy, state); return GN_ERR_NONE; } static gn_error DisplayOutput(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x53, 0x00}; if (data->display_output->output_fn) { DRVINSTANCE(state)->display_output = data->display_output; req[4] = 0x01; } else { DRVINSTANCE(state)->display_output = NULL; req[4] = 0x02; } if (sm_message_send(5, 0x0d, req, state)) return GN_ERR_NOTREADY; return sm_block(0x0d, data, state); } static gn_error IncomingDisplay(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { int state_table[8] = { 1 << GN_DISP_Call_In_Progress, 1 << GN_DISP_Unknown, 1 << GN_DISP_Unread_SMS, 1 << GN_DISP_Voice_Call, 1 << GN_DISP_Fax_Call, 1 << GN_DISP_Data_Call, 1 << GN_DISP_Keyboard_Lock, 1 << GN_DISP_SMS_Storage_Full }; unsigned char *pos; int n, x, y, st; gn_display_draw_msg drawmsg; gn_display_output *disp = DRVINSTANCE(state)->display_output; struct timeval now, time_diff, time_limit; switch (message[3]) { /* Display output */ case 0x50: if (disp) { switch (message[4]) { case 0x01: break; default: return GN_ERR_UNHANDLEDFRAME; } pos = message + 5; y = *pos++; x = *pos++; n = *pos++; if (n > GN_DRAW_SCREEN_MAX_WIDTH) return GN_ERR_INTERNALERROR; /* * WARNING: the following part can damage your mind! * This is so ugly, but there's no other way. Nokia * forgot the clear screen from the protocol, so we * must implement some heuristic here... :-( - bozo */ time_limit.tv_sec = 0; time_limit.tv_usec = 200000; gettimeofday(&now, NULL); timersub(&now, &disp->last, &time_diff); if (y > 9 && timercmp(&time_diff, &time_limit, >)) disp->state = true; disp->last = now; if (disp->state && y > 9) { disp->state = false; memset(&drawmsg, 0, sizeof(drawmsg)); drawmsg.cmd = GN_DISP_DRAW_Clear; disp->output_fn(&drawmsg); } /* Maybe this is unneeded, please leave uncommented if (x == 0 && y == 46 && pos[1] != 'M') { disp->state = true; } */ memset(&drawmsg, 0, sizeof(drawmsg)); drawmsg.cmd = GN_DISP_DRAW_Text; drawmsg.data.text.x = x; drawmsg.data.text.y = y; char_unicode_decode(drawmsg.data.text.text, pos, n << 1); disp->output_fn(&drawmsg); dprintf("(x,y): %d,%d, len: %d, data: %s\n", x, y, n, drawmsg.data.text.text); } return GN_ERR_UNSOLICITED; /* Display status */ case 0x52: st = 0; pos = message + 4; for ( n = *pos++; n > 0; n--, pos += 2) { if ((pos[0] < 1) || (pos[0] > 8)) return GN_ERR_UNHANDLEDFRAME; if (pos[1] == 0x02) st |= state_table[pos[0] - 1]; } if (data->display_status) *data->display_status = st; if (disp) { memset(&drawmsg, 0, sizeof(drawmsg)); drawmsg.cmd = GN_DISP_DRAW_Status; drawmsg.data.status = st; disp->output_fn(&drawmsg); } break; /* Display status ack */ case 0x54: switch (message[4]) { case 0x01: break; default: return GN_ERR_UNHANDLEDFRAME; } break; default: return GN_ERR_UNHANDLEDFRAME; } return GN_ERR_NONE; } static gn_error Reset(gn_data *data, struct gn_statemachine *state) { if (!data) return GN_ERR_INTERNALERROR; if (data->reset_type != 0x03 && data->reset_type != 0x04) return GN_ERR_INTERNALERROR; return pnok_extended_cmds_enable(data->reset_type, data, state); } static gn_error GetRawRingtone(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {0x00, 0x01, 0x9e, 0x00}; gn_error error; if (!data || !data->ringtone || !data->raw_data) return GN_ERR_INTERNALERROR; if (data->ringtone->location < 0) return GN_ERR_INVALIDLOCATION; req[3] = data->ringtone->location - 17; if ((error = pnok_extended_cmds_enable(0x01, data, state))) return error; if (sm_message_send(4, 0x40, req, state)) return GN_ERR_NOTREADY; return sm_block(0x40, data, state); } static gn_error SetRawRingtone(gn_data *data, struct gn_statemachine *state) { unsigned char req[512] = {0x00, 0x01, 0xa0, 0x00, /* location */ 0x00, 0x0c, 0x2c, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xfc, 0x09}; /* data */ gn_error error; int len; if (!data || !data->ringtone || !data->raw_data || !data->raw_data->data) return GN_ERR_INTERNALERROR; if (data->ringtone->location < 0) data->ringtone->location = 17; req[3] = data->ringtone->location - 17; snprintf(req + 8, 13, "%s", data->ringtone->name); if (memcmp(data->raw_data->data, req + 20, 3) == 0) { memcpy(req + 20, data->raw_data->data, data->raw_data->length); len = 20 + data->raw_data->length; } else { /* compatibility */ memcpy(req + 24, data->raw_data->data, data->raw_data->length); len = 24 + data->raw_data->length; } if ((error = pnok_extended_cmds_enable(0x01, data, state))) return error; if (sm_message_send(len, 0x40, req, state)) return GN_ERR_NOTREADY; return sm_block(0x40, data, state); } static gn_error DeleteRingtone(gn_data *data, struct gn_statemachine *state) { gn_ringtone ringtone; gn_raw_data rawdata; unsigned char buf[] = {0x00, 0x02, 0xfc, 0x0b}; gn_data d; if (!data->ringtone) return GN_ERR_INTERNALERROR; memset(&ringtone, 0, sizeof(ringtone)); ringtone.location = (data->ringtone->location < 0) ? 17 : data->ringtone->location; memset(&rawdata, 0, sizeof(gn_raw_data)); rawdata.data = buf; rawdata.length = sizeof(buf); gn_data_clear(&d); d.ringtone = &ringtone; d.raw_data = &rawdata; return SetRawRingtone(&d, state); } static gn_error get_imei(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {0x00, 0x01, 0x66}; gn_error err; if ((err = pnok_extended_cmds_enable(0x01, data, state))) return err; if (sm_message_send(3, 0x40, req, state)) return GN_ERR_NOTREADY; return sm_block(0x40, data, state); } static gn_error get_phone_info(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {0x00, 0x01, 0xc8, 0x01}; gn_error err; if ((err = pnok_extended_cmds_enable(0x01, data, state))) return err; if (sm_message_send(4, 0x40, req, state)) return GN_ERR_NOTREADY; return sm_block(0x40, data, state); } static gn_error get_hw(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {0x00, 0x01, 0xc8, 0x05}; gn_error err; if ((err = pnok_extended_cmds_enable(0x01, data, state))) return err; if (sm_message_send(4, 0x40, req, state)) return GN_ERR_NOTREADY; return sm_block(0x40, data, state); } #ifdef SECURITY static gn_error get_security_code(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {0x00, 0x01, 0x6e, 0x01}; gn_error err; if (!data->security_code) return GN_ERR_INTERNALERROR; req[3] = data->security_code->type; if ((err = pnok_extended_cmds_enable(0x01, data, state))) return err; if (sm_message_send(4, 0x40, req, state)) return GN_ERR_NOTREADY; return sm_block(0x40, data, state); } #endif static gn_error IncomingSecurity(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { char *aux, *aux2; switch (message[2]) { /* IMEI */ case 0x66: if (data->imei) { dprintf("IMEI: %s\n", message + 4); snprintf(data->imei, GN_IMEI_MAX_LENGTH, "%s", message + 4); } break; #ifdef SECURITY /* get security code */ case 0x6e: if (message[4] != 0x01) return GN_ERR_UNKNOWN; if (data->security_code) { data->security_code->type = message[3]; snprintf(data->security_code->code, sizeof(data->security_code->code), "%s", message + 5); } break; #endif /* Get bin ringtone */ case 0x9e: switch (message[4]) { case 0x00: break; case 0x0a: return GN_ERR_INVALIDLOCATION; default: return GN_ERR_UNHANDLEDFRAME; } if (!data->ringtone) return GN_ERR_INTERNALERROR; data->ringtone->location = message[3] + 17; snprintf(data->ringtone->name, sizeof(data->ringtone->name), "%s", message + 8); if (data->raw_data->length < length - 20) return GN_ERR_MEMORYFULL; if (data->raw_data && data->raw_data->data) { memcpy(data->raw_data->data, message + 20, length - 20); data->raw_data->length = length - 20; } break; /* Set bin ringtone result */ case 0xa0: switch (message[4]) { case 0x00: break; case 0x0a: return GN_ERR_INVALIDLOCATION; default: return GN_ERR_UNHANDLEDFRAME; } break; case 0xc8: switch (message[3]) { case 0x01: if (data->revision) { aux = message + 7; aux2 = strchr(aux, 0x0a); if (data->revision[0]) { strcat(data->revision, ", SW "); strncat(data->revision, aux, aux2 - aux); } else { snprintf(data->revision, aux2 - aux + 4, "SW %s", aux); } dprintf("Received %s\n", data->revision); } aux = strchr(message + 5, 0x0a); aux++; aux = strchr(aux, 0x0a); aux++; if (data->model) { aux2 = strchr(aux, 0x0a); *aux2 = 0; snprintf(data->model, GN_MODEL_MAX_LENGTH, "%s", aux); dprintf("Received model %s\n", data->model); } break; case 0x05: if (data->revision) { if (data->revision[0]) { strcat(data->revision, ", HW "); strncat(data->revision, message + 5, GN_REVISION_MAX_LENGTH); } else { snprintf(data->revision, GN_REVISION_MAX_LENGTH, "HW %s", message + 5); } dprintf("Received %s\n", data->revision); } break; default: return GN_ERR_NOTIMPLEMENTED; } break; default: return pnok_security_incoming(messagetype, message, length, data, state); } return GN_ERR_NONE; } static gn_error GetActiveCalls1(gn_data *data, struct gn_statemachine *state) { char req[] = {FBUS_FRAME_HEADER, 0x20}; if (!data->call_active) return GN_ERR_INTERNALERROR; if (sm_message_send(4, 0x01, req, state)) return GN_ERR_NOTREADY; return sm_block(0x01, data, state); } static gn_error MakeCall1(gn_data *data, struct gn_statemachine *state) { unsigned char req[256] = {FBUS_FRAME_HEADER, 0x01}; /* order: req, voice_end */ unsigned char voice_end[] = {0x05, 0x01, 0x01, 0x05, 0x81, 0x01, 0x00, 0x00}; /* order: req, data_nondigital_end, data_nondigital_final */ unsigned char data_nondigital_end[] = { 0x01, /* make a data call = type 0x01 */ 0x02,0x01,0x05,0x81,0x01,0x00,0x00,0x01,0x02,0x0a, 0x07,0xa2,0x88,0x81,0x21,0x15,0x63,0xa8,0x00,0x00 }; unsigned char data_nondigital_final[] = { FBUS_FRAME_HEADER, 0x42,0x05,0x01, 0x07,0xa2,0xc8,0x81,0x21,0x15,0x63,0xa8,0x00,0x00, 0x07,0xa3,0xb8,0x81,0x20,0x15,0x63,0x80,0x01,0x60 }; /* order: req, data_digital_pred1, data_digital_pred2, data_digital_end */ unsigned char data_digital_pred1[] = { FBUS_FRAME_HEADER, 0x42,0x05,0x01, 0x07,0xa2,0x88,0x81,0x21,0x15,0x63,0xa8,0x00,0x00, 0x07,0xa3,0xb8,0x81,0x20,0x15,0x63,0x80 }; unsigned char data_digital_pred2[] = { FBUS_FRAME_HEADER, 0x42,0x05,0x81, 0x07,0xa1,0x88,0x89,0x21,0x15,0x63,0xa0,0x00,0x06, 0x88,0x90,0x21,0x48,0x40,0xbb,0x07,0xa3,0xb8,0x81, 0x20,0x15,0x63,0x80 }; unsigned char data_digital_end[] = { 0x01, 0x02,0x01,0x05,0x81,0x01,0x00,0x00,0x01,0x02,0x0a, 0x07,0xa1,0x88,0x89,0x21,0x15,0x63,0xa0,0x00,0x06, 0x88,0x90,0x21,0x48,0x40,0xbb }; unsigned char *pos; int n; gn_data dtemp; gn_error err; n = strlen(data->call_info->number); if (n > GN_PHONEBOOK_NUMBER_MAX_LENGTH) { dprintf("number too long\n"); return GN_ERR_ENTRYTOOLONG; } /* * FIXME: * Ugly hack. The phone seems to drop the dial message if the link * had been idle too long. -- bozo */ gn_data_clear(&dtemp); GetNetworkInfo(&dtemp, state); pos = req + 4; *pos++ = (unsigned char)n; memcpy(pos, data->call_info->number, n); pos += n; switch (data->call_info->type) { case GN_CALL_Voice: dprintf("Voice Call\n"); switch (data->call_info->send_number) { case GN_CALL_Never: voice_end[5] = 0x02; break; case GN_CALL_Always: voice_end[5] = 0x03; break; case GN_CALL_Default: voice_end[5] = 0x01; break; default: return GN_ERR_INTERNALERROR; } /* here in the past: voice_end had 8 bytes, memcpied 9 bytes, sent 1+9 bytes * fbus-6110.c: req_end had 9 bytes, memcpied 10 bytes, sent 8 bytes * currently: voice_end has 8 bytes, memcpying 8 bytes, sent 8 bytes */ memcpy(pos, voice_end, ARRAY_LEN(voice_end)); pos += ARRAY_LEN(voice_end); if (sm_message_send(pos - req, 0x01, req, state)) return GN_ERR_NOTREADY; break; case GN_CALL_NonDigitalData: dprintf("Non Digital Data Call\n"); memcpy(pos, data_nondigital_end, ARRAY_LEN(data_nondigital_end)); pos += ARRAY_LEN(data_nondigital_end); if (sm_message_send(pos - req, 0x01, req, state)) return GN_ERR_NOTREADY; if (sm_block_ack(state)) return GN_ERR_NOTREADY; gn_sm_loop(5, state); dprintf("after nondigital1\n"); if (sm_message_send(ARRAY_LEN(data_nondigital_final), 0x01, data_nondigital_final, state)) return GN_ERR_NOTREADY; dprintf("after nondigital2\n"); break; case GN_CALL_DigitalData: dprintf("Digital Data Call\n"); if (sm_message_send(ARRAY_LEN(data_digital_pred1), 0x01, data_digital_pred1, state)) return GN_ERR_NOTREADY; if (sm_block_ack(state)) return GN_ERR_NOTREADY; gn_sm_loop(5, state); dprintf("after digital1\n"); if (sm_message_send(ARRAY_LEN(data_digital_pred2), 0x01, data_digital_pred2, state)) return GN_ERR_NOTREADY; if (sm_block_ack(state)) return GN_ERR_NOTREADY; gn_sm_loop(5, state); dprintf("after digital2\n"); memcpy(pos, data_digital_end, ARRAY_LEN(data_digital_end)); pos += ARRAY_LEN(data_digital_end); if (sm_message_send(pos - req, 0x01, req, state)) return GN_ERR_NOTREADY; dprintf("after digital3\n"); break; default: dprintf("Invalid call type %d\n", data->call_info->type); return GN_ERR_INTERNALERROR; } err = sm_block_no_retry_timeout(0x01, 500, data, state); gn_sm_loop(5, state); return err; } static gn_error AnswerCall1(gn_data *data, struct gn_statemachine *state) { unsigned char req1[] = {FBUS_FRAME_HEADER, 0x42, 0x05, 0x01, 0x07, 0xa2, 0x88, 0x81, 0x21, 0x15, 0x63, 0xa8, 0x00, 0x00, 0x07, 0xa3, 0xb8, 0x81, 0x20, 0x15, 0x63, 0x80}; unsigned char req2[] = {FBUS_FRAME_HEADER, 0x06, 0x00, 0x00}; if (sm_message_send(sizeof(req1), 0x01, req1, state)) return GN_ERR_NOTREADY; req2[4] = data->call_info->call_id; if (sm_message_send(sizeof(req2), 0x01, req2, state)) return GN_ERR_NOTREADY; return sm_block(0x01, data, state); } static gn_error CancelCall1(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x08, 0x00, 0x85}; req[4] = data->call_info->call_id; if (sm_message_send(6, 0x01, req, state)) return GN_ERR_NOTREADY; sm_block_no_retry(0x01, data, state); return GN_ERR_NONE; } static gn_error SetCallNotification(gn_data *data, struct gn_statemachine *state) { DRVINSTANCE(state)->call_notification = data->call_notification; DRVINSTANCE(state)->call_callback_data = data->callback_data; return GN_ERR_NONE; } static gn_error GetActiveCalls(gn_data *data, struct gn_statemachine *state) { if (DRVINSTANCE(state)->capabilities & NK6100_CAP_OLD_CALL_API) return GN_ERR_NOTSUPPORTED; else return GetActiveCalls1(data, state); } static gn_error MakeCall(gn_data *data, struct gn_statemachine *state) { if (DRVINSTANCE(state)->capabilities & NK6100_CAP_OLD_CALL_API) return pnok_call_make(data, state); else return MakeCall1(data, state); } static gn_error AnswerCall(gn_data *data, struct gn_statemachine *state) { if (DRVINSTANCE(state)->capabilities & NK6100_CAP_OLD_CALL_API) return pnok_call_answer(data, state); else return AnswerCall1(data, state); } static gn_error CancelCall(gn_data *data, struct gn_statemachine *state) { if (DRVINSTANCE(state)->capabilities & NK6100_CAP_OLD_CALL_API) return pnok_call_cancel(data, state); else return CancelCall1(data, state); } static gn_error SendDTMF(gn_data *data, struct gn_statemachine *state) { unsigned char req[5+256] = {FBUS_FRAME_HEADER, 0x50}; int len; if (!data || !data->dtmf_string) return GN_ERR_INTERNALERROR; len = strlen(data->dtmf_string); if (len < 0 || len >= 256) return GN_ERR_INTERNALERROR; req[4] = len; memcpy(req + 5, data->dtmf_string, len); if (sm_message_send(5 + len, 0x01, req, state)) return GN_ERR_NOTREADY; return sm_block(0x01, data, state); } static gn_error IncomingCallInfo(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { gn_call_info cinfo; gn_call_active *ca; unsigned char *pos; int i; switch (message[3]) { /* Call going msg */ case 0x02: if (data->call_info) data->call_info->call_id = message[4]; break; /* Call in progress */ case 0x03: memset(&cinfo, 0, sizeof(cinfo)); cinfo.call_id = message[4]; if (DRVINSTANCE(state)->call_notification) DRVINSTANCE(state)->call_notification(GN_CALL_Established, &cinfo, state, DRVINSTANCE(state)->call_callback_data); if (!data->call_info) return GN_ERR_UNSOLICITED; data->call_info->call_id = message[4]; break; /* Remote end hang up */ case 0x04: isdn_cause2gn_error(NULL, NULL, message[7], message[6]); if (data->call_info) { data->call_info->call_id = message[4]; return GN_ERR_UNKNOWN; } memset(&cinfo, 0, sizeof(cinfo)); cinfo.call_id = message[4]; if (DRVINSTANCE(state)->call_notification) DRVINSTANCE(state)->call_notification(GN_CALL_RemoteHangup, &cinfo, state, DRVINSTANCE(state)->call_callback_data); return GN_ERR_UNSOLICITED; /* incoming call alert */ case 0x05: memset(&cinfo, 0, sizeof(cinfo)); pos = message + 4; cinfo.call_id = *pos++; pos++; if (*pos >= sizeof(cinfo.number)) return GN_ERR_UNHANDLEDFRAME; memcpy(cinfo.number, pos + 1, *pos); pos += *pos + 1; if (*pos >= sizeof(cinfo.name)) return GN_ERR_UNHANDLEDFRAME; memcpy(cinfo.name, pos + 1, *pos); pos += *pos + 1; if (DRVINSTANCE(state)->call_notification) DRVINSTANCE(state)->call_notification(GN_CALL_Incoming, &cinfo, state, DRVINSTANCE(state)->call_callback_data); return GN_ERR_UNSOLICITED; /* answered call */ case 0x07: return GN_ERR_UNSOLICITED; /* terminated call */ case 0x09: memset(&cinfo, 0, sizeof(cinfo)); cinfo.call_id = message[4]; if (DRVINSTANCE(state)->call_notification) DRVINSTANCE(state)->call_notification(GN_CALL_LocalHangup, &cinfo, state, DRVINSTANCE(state)->call_callback_data); if (!data->call_info) return GN_ERR_UNSOLICITED; data->call_info->call_id = message[4]; break; /* message after "terminated call" */ case 0x0a: return GN_ERR_UNSOLICITED; /* call status */ case 0x21: if (!data->call_active) return GN_ERR_INTERNALERROR; pos = message + 5; ca = data->call_active; memset(ca, 0x00, 2 * sizeof(gn_call_active)); for (i = 0; i < message[4]; i++) { if (pos[0] != 0x64) return GN_ERR_UNHANDLEDFRAME; ca[i].call_id = pos[2]; ca[i].channel = pos[3]; switch (pos[4]) { case 0x00: ca[i].state = GN_CALL_Idle; break; case 0x02: ca[i].state = GN_CALL_Dialing; break; case 0x03: ca[i].state = GN_CALL_Ringing; break; case 0x04: ca[i].state = GN_CALL_Incoming; break; case 0x05: ca[i].state = GN_CALL_Established; break; case 0x06: ca[i].state = GN_CALL_Held; break; case 0x07: ca[i].state = GN_CALL_RemoteHangup; break; default: return GN_ERR_UNHANDLEDFRAME; } switch (pos[5]) { case 0x00: ca[i].prev_state = GN_CALL_Idle; break; case 0x01: ca[i].prev_state = GN_CALL_Idle; break; case 0x02: ca[i].prev_state = GN_CALL_Dialing; break; case 0x03: ca[i].prev_state = GN_CALL_Ringing; break; case 0x04: ca[i].prev_state = GN_CALL_Incoming; break; case 0x05: ca[i].prev_state = GN_CALL_Established; break; case 0x06: ca[i].prev_state = GN_CALL_Held; break; case 0x07: ca[i].prev_state = GN_CALL_RemoteHangup; break; default: return GN_ERR_UNHANDLEDFRAME; } pnok_string_decode(ca[i].name, sizeof(ca[i].name), pos + 11, pos[10]); pos += pos[1] + 2; } break; /* call held */ case 0x23: memset(&cinfo, 0, sizeof(cinfo)); cinfo.call_id = message[4]; if (DRVINSTANCE(state)->call_notification) DRVINSTANCE(state)->call_notification(GN_CALL_Held, &cinfo, state, DRVINSTANCE(state)->call_callback_data); return GN_ERR_UNSOLICITED; /* call resumed */ case 0x25: memset(&cinfo, 0, sizeof(cinfo)); cinfo.call_id = message[4]; if (DRVINSTANCE(state)->call_notification) DRVINSTANCE(state)->call_notification(GN_CALL_Resumed, &cinfo, state, DRVINSTANCE(state)->call_callback_data); return GN_ERR_UNSOLICITED; /* call switch */ case 0x27: return GN_ERR_UNSOLICITED; case 0x40: return GN_ERR_UNSOLICITED; /* FIXME: response from "Sent after issuing data call (non digital lines)" * that's what we call data_nondigital_final in MakeCall() */ case 0x43: if (message[4] != 0x02) return GN_ERR_UNHANDLEDFRAME; return GN_ERR_UNSOLICITED; /* FIXME: response from answer1? - bozo */ case 0x44: if (message[4] != 0x68) return GN_ERR_UNHANDLEDFRAME; return GN_ERR_UNSOLICITED; /* DTMF sent */ case 0x51: break; default: return GN_ERR_UNHANDLEDFRAME; } return GN_ERR_NONE; } static gn_error SendRLPFrame(gn_data *data, struct gn_statemachine *state) { unsigned char req[32] = {0x00, 0xd9}; /* * Discontinuos transmission (DTX). * See section 5.6 of GSM 04.22 version 7.0.1. */ if (data->rlp_out_dtx) req[1] = 0x01; memcpy(req + 2, (unsigned char *) data->rlp_frame, 30); /* * It's ugly like the hell, maybe we should implement SM_SendFrame * and extend the GSM_Link structure. We should clean this up in the * future... - bozo * return SM_SendFrame(state, 32, 0xf0, req); */ return fbus_tx_send_frame(32, 0xf0, req, state); } static gn_error SetRLPRXCallback(gn_data *data, struct gn_statemachine *state) { DRVINSTANCE(state)->rlp_rx_callback = data->rlp_rx_callback; return GN_ERR_NONE; } static gn_error IncomingRLPFrame(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { gn_rlp_f96_frame frame; /* * We do not need RLP frame parsing to be done when we do not have * callback specified. */ if (!DRVINSTANCE(state)->rlp_rx_callback) return GN_ERR_NONE; /* * Anybody know the official meaning of the first two bytes? * Nokia 6150 sends junk frames starting D9 01, and real frames starting * D9 00. We'd drop the junk frames anyway because the FCS is bad, but * it's tidier to do it here. We still need to call the callback function * to give it a chance to handle timeouts and/or transmit a frame */ if (message[0] == 0xd9 && message[1] == 0x01) { DRVINSTANCE(state)->rlp_rx_callback(NULL); return GN_ERR_NONE; } /* * Nokia uses 240 bit frame size of RLP frames as per GSM 04.22 * specification, so Header consists of 16 bits (2 bytes). See section * 4.1 of the specification. */ frame.Header[0] = message[2]; frame.Header[1] = message[3]; /* * Next 200 bits (25 bytes) contain the Information. We store the * information in the Data array. */ memcpy(frame.Data, message + 4, 25); /* The last 24 bits (3 bytes) contain FCS. */ frame.FCS[0] = message[29]; frame.FCS[1] = message[30]; frame.FCS[2] = message[31]; /* Here we pass the frame down in the input stream. */ DRVINSTANCE(state)->rlp_rx_callback(&frame); return GN_ERR_NONE; } #ifdef SECURITY static gn_error EnterSecurityCode(gn_data *data, struct gn_statemachine *state) { unsigned char req[32] = {FBUS_FRAME_HEADER, 0x0a}; unsigned char *pos; int len; if (!data->security_code) return GN_ERR_INTERNALERROR; len = strlen(data->security_code->code); if (len < 0 || len >= 10) return GN_ERR_INTERNALERROR; pos = req + 4; *pos++ = data->security_code->type; memcpy(pos, data->security_code->code, len); pos += len; *pos++ = 0; *pos++ = 0; if (sm_message_send(pos - req, 0x08, req, state)) return GN_ERR_NOTREADY; return sm_block(0x08, data, state); } static gn_error GetSecurityCodeStatus(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x07}; if (!data->security_code) return GN_ERR_INTERNALERROR; if (sm_message_send(4, 0x08, req, state)) return GN_ERR_NOTREADY; return sm_block(0x08, data, state); } static gn_error ChangeSecurityCode(gn_data *data, struct gn_statemachine *state) { unsigned char req[32] = {FBUS_FRAME_HEADER, 0x04}; unsigned char *pos; int len1, len2; if (!data->security_code) return GN_ERR_INTERNALERROR; len1 = strlen(data->security_code->code); len2 = strlen(data->security_code->new_code); if (len1 < 0 || len1 >= 10 || len2 < 0 || len2 >= 10) return GN_ERR_INTERNALERROR; pos = req + 4; *pos++ = data->security_code->type; memcpy(pos, data->security_code->code, len1); pos += len1; *pos++ = 0; memcpy(pos, data->security_code->new_code, len2); pos += len2; *pos++ = 0; if (sm_message_send(pos - req, 0x08, req, state)) return GN_ERR_NOTREADY; return sm_block(0x08, data, state); } static gn_error IncomingSecurityCode(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { switch (message[3]) { /* change security code ok */ case 0x05: break; /* security code error */ case 0x06: /* --getsecuritycodestatus */ case 0x09: /* --changesecuritycode */ case 0x0c: /* --entersecuritycode */ switch (message[4]) { case 0x6f: /* Insert SIM card */ return GN_ERR_NOTREADY; case 0x79: return GN_ERR_SIMPROBLEM; case 0x88: case 0x8d: dprintf("Message: Security code wrong.\n"); return GN_ERR_INVALIDSECURITYCODE; default: return GN_ERR_UNHANDLEDFRAME; } /* security code status */ case 0x08: dprintf("Message: Security Code status received: "); switch (message[4]) { case GN_SCT_SecurityCode: dprintf("waiting for Security Code.\n"); break; case GN_SCT_Pin: dprintf("waiting for PIN.\n"); break; case GN_SCT_Pin2: dprintf("waiting for PIN2.\n"); break; case GN_SCT_Puk: dprintf("waiting for PUK.\n"); break; case GN_SCT_Puk2: dprintf("waiting for PUK2.\n"); break; case GN_SCT_None: dprintf("nothing to enter.\n"); break; default: dprintf("unknown\n"); return GN_ERR_UNHANDLEDFRAME; } if (data->security_code) data->security_code->type = message[4]; break; /* security code OK */ case 0x0b: dprintf("Message: Security code accepted.\n"); break; default: return GN_ERR_UNHANDLEDFRAME; } return GN_ERR_NONE; } #endif static gn_error PressOrReleaseKey1(bool press, gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x42, 0x00, 0x00, 0x01}; req[4] = press ? 0x01 : 0x02; req[5] = data->key_code; if (sm_message_send(7, 0x0c, req, state)) return GN_ERR_NOTREADY; return sm_block(0x0c, data, state); } static int ParseKey(gn_key_code key, unsigned char **ppos, struct gn_statemachine *state) { unsigned char ch; int n; ch = **ppos; (*ppos)++; if (key == GN_KEY_NONE) return ch ? -1 : 0; for (n = 1; ch; n++) { DRVINSTANCE(state)->keytable[ch].key = key; DRVINSTANCE(state)->keytable[ch].repeat = n; ch = **ppos; (*ppos)++; } return 0; } static gn_error BuildKeytable(struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x40, 0x01}; gn_error error; gn_data data; int i; /* * This function builds a table, where the index is the character * code to type, the value is the key code and the repeat count * to press this key. The GN_KEY_NONE means this character cannot * be represented, the GN_KEY_ASTERISK key means special symbols. * We just initialise the table here, it will be filled by the * IncomingKey() function which will be called as the result of * this message which we send here. */ for (i = 0; i < 256; i++) { DRVINSTANCE(state)->keytable[i].key = GN_KEY_NONE; DRVINSTANCE(state)->keytable[i].repeat = 0; } gn_data_clear(&data); if (sm_message_send(5, 0x0c, req, state)) return GN_ERR_NOTREADY; if ((error = sm_block(0x0c, &data, state))) return error; return GN_ERR_NONE; } static gn_error PressOrReleaseKey(bool press, gn_data *data, struct gn_statemachine *state) { if (DRVINSTANCE(state)->capabilities & NK6100_CAP_OLD_KEY_API) return PressOrReleaseKey2(press, data, state); else return PressOrReleaseKey1(press, data, state); } static gn_error PressKey(gn_key_code key, int d, struct gn_statemachine *state) { gn_data data; gn_error error; gn_data_clear(&data); data.key_code = key; if ((error = PressOrReleaseKey(true, &data, state))) return error; if (d) usleep(d*1000); if ((error = PressOrReleaseKey(false, &data, state))) return error; return GN_ERR_NONE; } static gn_error EnterChar(gn_data *data, struct gn_statemachine *state) { gn_key_code key; gn_error error; nk6100_keytable *keytable = DRVINSTANCE(state)->keytable; int i, r; /* * Beware! Horrible kludge here. Try to write some sms manually with * characters in different case and insert some symbols too. This * function just "emulates" this process. */ if (isupper(data->character)) { /* * the table contains only lowercase characters and symbols, * so we must translate into lowercase. */ i = tolower(data->character); if (keytable[i].key == GN_KEY_NONE) return GN_ERR_UNKNOWN; } else if (islower(data->character)) { /* * Ok, the character in proper case, but the phone in upper * case mode (default). We must switch it into lowercase. * We just have to press the hash key. */ i = data->character; if (keytable[i].key == GN_KEY_NONE) return GN_ERR_UNKNOWN; if ((error = PressKey(GN_KEY_HASH, 0, state))) return error; } else { /* * This is a special character (number, space, symbol) which * represents themself. */ i = data->character; if (keytable[i].key == GN_KEY_NONE) return GN_ERR_UNKNOWN; } if (keytable[i].key == GN_KEY_ASTERISK) { /* * This is a special symbol character, so we have to press * the asterisk key, the down key the repeat count minus one * times and finish with the ok (menu) key. */ if ((error = PressKey(GN_KEY_ASTERISK, 0, state))) return error; key = GN_KEY_DOWN; r = 1; } else { key = keytable[i].key; r = 0; } for (; r < keytable[i].repeat; r++) { if ((error = PressKey(key, 0, state))) return error; } if (islower(data->character)) { /* * This was a lowercase character. We must press the hash * key again to go back to uppercase mode. We might store * the lowercase/uppercase state, but it's much simpler. */ if ((error = PressKey(GN_KEY_HASH, 0, state))) return error; } else if (key == GN_KEY_DOWN) { /* This was a symbol character, press the menu key to finish */ if ((error = PressKey(GN_KEY_MENU, 0, state))) return error; } else { /* * Ok, the requested character is ready. But don't forget if * we press the same key after it in a hurry it will toggle * this char again! (Pressing key 2 will result "A", but if * you press the key 2 again it will be "B".) Pressing the * hash key is an easy workaround for it. */ if ((error = PressKey(GN_KEY_HASH, 0, state))) return error; if ((error = PressKey(GN_KEY_HASH, 0, state))) return error; } return GN_ERR_NONE; } static gn_error IncomingKey(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { unsigned char *pos; switch (message[3]) { /* Press key ack */ case 0x43: if (message[4] != 0x01 && message[4] != 0x02) return GN_ERR_UNHANDLEDFRAME; break; /* Get key assignments */ case 0x41: /* * This message contains the string of characters for each * phone key. We will simply parse it and build a reverse * translation table. The last string is a special case. It * contains the available symbols which isn't represented on * the keyboard directly, you can choose from the menu when * you press the asterisk key (think about sms writeing). */ pos = message + 4; if (ParseKey(GN_KEY_1, &pos, state)) return GN_ERR_UNHANDLEDFRAME; if (ParseKey(GN_KEY_2, &pos, state)) return GN_ERR_UNHANDLEDFRAME; if (ParseKey(GN_KEY_3, &pos, state)) return GN_ERR_UNHANDLEDFRAME; if (ParseKey(GN_KEY_4, &pos, state)) return GN_ERR_UNHANDLEDFRAME; if (ParseKey(GN_KEY_5, &pos, state)) return GN_ERR_UNHANDLEDFRAME; if (ParseKey(GN_KEY_6, &pos, state)) return GN_ERR_UNHANDLEDFRAME; if (ParseKey(GN_KEY_7, &pos, state)) return GN_ERR_UNHANDLEDFRAME; if (ParseKey(GN_KEY_8, &pos, state)) return GN_ERR_UNHANDLEDFRAME; if (ParseKey(GN_KEY_9, &pos, state)) return GN_ERR_UNHANDLEDFRAME; if (ParseKey(GN_KEY_0, &pos, state)) return GN_ERR_UNHANDLEDFRAME; if (ParseKey(GN_KEY_NONE, &pos, state)) return GN_ERR_UNHANDLEDFRAME; if (ParseKey(GN_KEY_NONE, &pos, state)) return GN_ERR_UNHANDLEDFRAME; if (ParseKey(GN_KEY_ASTERISK, &pos, state)) return GN_ERR_UNHANDLEDFRAME; break; default: return GN_ERR_UNHANDLEDFRAME; } return GN_ERR_NONE; } static gn_error NBSUpload(gn_data *data, struct gn_statemachine *state, gn_sms_data_type type) { unsigned char req[512] = {0x0c, 0x01}; gn_sms sms; gn_sms_raw rawsms; gn_error err; int n; gn_sms_default_submit(&sms); sms.user_data[0].type = type; sms.user_data[1].type = GN_SMS_DATA_None; switch (type) { case GN_SMS_DATA_Bitmap: memcpy(&sms.user_data[0].u.bitmap, data->bitmap, sizeof(gn_bmp)); break; case GN_SMS_DATA_Ringtone: memcpy(&sms.user_data[0].u.ringtone, data->ringtone, sizeof(gn_ringtone)); break; default: return GN_ERR_INTERNALERROR; } memset(&rawsms, 0, sizeof(rawsms)); if ((err = sms_prepare(&sms, &rawsms)) != GN_ERR_NONE) return err; n = 2 + rawsms.user_data_length; if (n > sizeof(req)) return GN_ERR_INTERNALERROR; memcpy(req + 2, rawsms.user_data, rawsms.user_data_length); return sm_message_send(n, 0x12, req, state); } static gn_error IncomingMisc(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { if (messagetype == 0xda && message[0] == 0x00 && message[1] == 0x00) { /* seems like a keepalive */ return GN_ERR_UNSOLICITED; } return GN_ERR_UNHANDLEDFRAME; } static gn_error get_ringtone_list(gn_data *data, struct gn_statemachine *state) { gn_ringtone_list *rl; gn_ringtone ringtone; gn_data d; gn_error error; #define ADDRINGTONE(id, str) \ rl->ringtone[rl->count].location = (id); \ snprintf(rl->ringtone[rl->count].name, sizeof(rl->ringtone[rl->count].name), "%s", (str)); \ rl->ringtone[rl->count].user_defined = 0; \ rl->ringtone[rl->count].readable = 0; \ rl->ringtone[rl->count].writable = 0; \ rl->count++; if (!(rl = data->ringtone_list)) return GN_ERR_INTERNALERROR; rl->userdef_location = 17; rl->userdef_count = 0; for (rl->count = 0; rl->count < GN_RINGTONE_MAX_COUNT; rl->count++) { memset(&ringtone, 0, sizeof(ringtone)); gn_data_clear(&d); d.ringtone = &ringtone; ringtone.location = rl->userdef_location + rl->userdef_count; error = GetRingtone(&d, state); if (error == GN_ERR_NONE) { snprintf(rl->ringtone[rl->count].name, sizeof(rl->ringtone[rl->count].name), "%s", ringtone.name); } else if (error == GN_ERR_WRONGDATAFORMAT) { snprintf(rl->ringtone[rl->count].name, sizeof(rl->ringtone[rl->count].name), "%s", _("Unknown")); } else break; rl->ringtone[rl->count].location = ringtone.location; rl->ringtone[rl->count].user_defined = 1; rl->ringtone[rl->count].readable = 1; rl->ringtone[rl->count].writable = 1; rl->userdef_count++; } if (!memcmp(state->config.model, "61", 2)) { ADDRINGTONE(18, "Ring ring"); ADDRINGTONE(19, "Low"); ADDRINGTONE(20, "Fly"); ADDRINGTONE(21, "Mosquito"); ADDRINGTONE(22, "Bee"); ADDRINGTONE(23, "Intro"); ADDRINGTONE(24, "Etude"); ADDRINGTONE(25, "Hunt"); ADDRINGTONE(26, "Going up"); ADDRINGTONE(27, "City Bird"); ADDRINGTONE(30, "Chase"); ADDRINGTONE(32, "Scifi"); ADDRINGTONE(34, "Kick"); ADDRINGTONE(35, "Do-mi-so"); ADDRINGTONE(36, "Robo N1X"); ADDRINGTONE(37, "Dizzy"); ADDRINGTONE(39, "Playground"); ADDRINGTONE(43, "That's it!"); ADDRINGTONE(47, "Grande valse"); ADDRINGTONE(48, "Helan"); ADDRINGTONE(49, "Fuga"); ADDRINGTONE(50, "Menuet"); ADDRINGTONE(51, "Ode to Joy"); ADDRINGTONE(52, "Elise"); ADDRINGTONE(53, "Mozart 40"); ADDRINGTONE(54, "Piano Concerto"); ADDRINGTONE(55, "William Tell"); ADDRINGTONE(56, "Badinerie"); ADDRINGTONE(57, "Polka"); ADDRINGTONE(58, "Attraction"); ADDRINGTONE(60, "Polite"); ADDRINGTONE(61, "Persuasion"); ADDRINGTONE(67, "Tick tick"); ADDRINGTONE(68, "Samba"); ADDRINGTONE(70, "Orient"); ADDRINGTONE(71, "Charleston"); ADDRINGTONE(73, "Jumping"); } else if (!memcmp(state->config.model, "51", 2)) { ADDRINGTONE(18, "Ring ring"); ADDRINGTONE(19, "Low"); ADDRINGTONE(20, "Fly"); ADDRINGTONE(21, "Mosquito"); ADDRINGTONE(22, "Bee"); ADDRINGTONE(23, "Intro"); ADDRINGTONE(24, "Etude"); ADDRINGTONE(25, "Hunt"); ADDRINGTONE(26, "Going up"); ADDRINGTONE(27, "City Bird"); ADDRINGTONE(30, "Chase"); ADDRINGTONE(32, "Scifi"); ADDRINGTONE(34, "Kick"); ADDRINGTONE(35, "Do-mi-so"); ADDRINGTONE(36, "Robo N1X"); ADDRINGTONE(37, "Dizzy"); ADDRINGTONE(39, "Playground"); ADDRINGTONE(43, "That's it!"); ADDRINGTONE(47, "Knock knock"); ADDRINGTONE(48, "Grande valse"); ADDRINGTONE(49, "Helan"); ADDRINGTONE(50, "Fuga"); ADDRINGTONE(51, "Ode to Joy"); ADDRINGTONE(52, "Elise"); ADDRINGTONE(54, "Mozart 40"); ADDRINGTONE(56, "William Tell"); ADDRINGTONE(57, "Badinerie"); ADDRINGTONE(58, "Polka"); ADDRINGTONE(59, "Attraction"); ADDRINGTONE(60, "Down"); ADDRINGTONE(62, "Persuasion"); ADDRINGTONE(67, "Tick tick"); ADDRINGTONE(69, "Samba"); ADDRINGTONE(71, "Orient"); ADDRINGTONE(72, "Charleston"); ADDRINGTONE(73, "Songette"); ADDRINGTONE(74, "Jumping"); ADDRINGTONE(75, "Lamb"); ADDRINGTONE(80, "Tango"); } if (!rl->count) { rl->userdef_location = 0; rl->userdef_count = 0; return GN_ERR_NOTIMPLEMENTED; } #undef ADDRINGTONE return GN_ERR_NONE; } gnokii-0.6.31/common/phones/nk6160.c0000644000175000017500000002700711666163120015066 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2002-2003 BORBELY Zoltan This file provides functions specific to the Nokia 6160 series. See README for more details on supported mobile phones. */ #include "config.h" #include #include #include #include "compat.h" #include "misc.h" #include "phones/generic.h" #include "phones/nokia.h" #include "links/m2bus.h" #include "links/fbus.h" #include "links/fbus-phonet.h" #include "gnokii-internal.h" #include "gnokii.h" #define SEND_MESSAGE_BLOCK(type, length) \ do { \ if (sm_message_send(length, type, req, state)) return GN_ERR_NOTREADY; \ return sm_block(type, data, state); \ } while (0) typedef struct { int logoslice; } nk6160_driver_instance; #define NK6160_DRVINST(s) (*((nk6160_driver_instance **)(&(s)->driver.driver_instance))) /* static functions prototypes */ static gn_error functions(gn_operation op, gn_data *data, struct gn_statemachine *state); static gn_error initialise(struct gn_statemachine *state); static gn_error identify(gn_data *data, struct gn_statemachine *state); static gn_error phonebook_read(gn_data *data, struct gn_statemachine *state); static gn_error phonebook_write(gn_data *data, struct gn_statemachine *state); static gn_error bitmap_get(gn_data *data, struct gn_statemachine *state); static gn_error phonebook_incoming(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error phone_info_incoming(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error bitmap_startup_logo_incoming(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_incoming_function_type incoming_functions[] = { { 0xd2, phone_info_incoming }, { 0x40, phonebook_incoming }, { 0xdd, bitmap_startup_logo_incoming }, { 0, NULL} }; gn_driver driver_nokia_6160 = { incoming_functions, pgen_incoming_default, /* Mobile phone information */ { "6160|5120|6185", /* Supported models */ 4, /* Max RF Level */ 0, /* Min RF Level */ GN_RF_Arbitrary, /* RF level units */ 4, /* Max Battery Level */ 0, /* Min Battery Level */ GN_BU_Arbitrary, /* Battery level units */ GN_DT_DateTime, /* Have date/time support */ GN_DT_TimeOnly, /* Alarm supports time only */ 1, /* Alarms available - FIXME */ 48, 84, /* Startup logo size */ 14, 72, /* Op logo size */ 14, 72 /* Caller logo size */ }, functions, NULL }; static gn_error functions(gn_operation op, gn_data *data, struct gn_statemachine *state) { switch (op) { case GN_OP_Init: return initialise(state); case GN_OP_Terminate: return pgen_terminate(data, state); /* case GN_OP_GetImei: */ case GN_OP_GetModel: case GN_OP_GetRevision: case GN_OP_GetManufacturer: case GN_OP_Identify: return identify(data, state); case GN_OP_ReadPhonebook: return phonebook_read(data, state); case GN_OP_WritePhonebook: return phonebook_write(data, state); case GN_OP_GetBitmap: return bitmap_get(data, state); default: dprintf("NK6160 unimplemented operation: %d\n", op); return GN_ERR_NOTIMPLEMENTED; } } /* Initialise is the only function allowed to 'use' state */ static gn_error initialise(struct gn_statemachine *state) { nk6160_driver_instance *drvinst; gn_error error; char model[GN_MODEL_MAX_LENGTH + 1]; gn_data data; gn_phone_model *pm; /* Copy in the phone info */ memcpy(&(state->driver), &driver_nokia_6160, sizeof(gn_driver)); if (!(drvinst = malloc(sizeof(nk6160_driver_instance)))) return GN_ERR_FAILED; state->driver.driver_instance = drvinst; switch (state->config.connection_type) { case GN_CT_Serial: case GN_CT_Infrared: case GN_CT_TCP: error = m2bus_initialise(state); break; case GN_CT_DLR3P: if ((error = fbus_initialise(0, state)) == GN_ERR_NONE) break; /*FALLTHROUGH*/ case GN_CT_DAU9P: error = fbus_initialise(1, state); break; case GN_CT_Bluetooth: error = fbus_initialise(2, state); break; case GN_CT_Irda: error = phonet_initialise(state); break; default: error = GN_ERR_NOTSUPPORTED; } if (error) goto out; sm_initialise(state); /* We need to identify the phone first in order to know whether we can authorize or set keytable */ memset(model, 0, sizeof(model)); gn_data_clear(&data); data.model = model; error = identify(&data, state); if (error) goto out; dprintf("model: '%s'\n", model); if ((pm = gn_phone_model_get(model)) == NULL) { dump("Unsupported phone model \"%s\"\n", model); dump("Please read Docs/Bugs and send a bug report!\n"); error = GN_ERR_INTERNALERROR; } out: if (error) { dprintf("Initialization failed (%d)\n", error); free(NK6160_DRVINST(state)); NK6160_DRVINST(state) = NULL; } return error; } static gn_error phonebook_read(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {0x00, 0x01, 0x1f, 0x01, 0x04, 0x86, 0x00}; dprintf("Reading phonebook location (%d)\n", data->phonebook_entry->location); req[6] = data->phonebook_entry->location; SEND_MESSAGE_BLOCK(0x40, 7); } static gn_error phonebook_write(gn_data *data, struct gn_statemachine *state) { unsigned char req[512] = {0x00, 0x01, 0x1f, 0x01, 0x04, 0x87, 0x00}; gn_phonebook_entry *pe; unsigned char *pos; int namelen, numlen; pe = data->phonebook_entry; pos = req + 6; namelen = strlen(pe->name); numlen = strlen(pe->number); dprintf("Writing phonebook location (%d): %s\n", pe->location, pe->name); if (namelen > GN_PHONEBOOK_NAME_MAX_LENGTH) { dprintf("name too long\n"); return GN_ERR_ENTRYTOOLONG; } if (numlen > GN_PHONEBOOK_NUMBER_MAX_LENGTH) { dprintf("number too long\n"); return GN_ERR_ENTRYTOOLONG; } if (pe->subentries_count > 1) { dprintf("6160 doesn't support subentries\n"); return GN_ERR_UNKNOWN; } if ((pe->subentries_count == 1) && ((pe->subentries[0].entry_type != GN_PHONEBOOK_ENTRY_Number) || (pe->subentries[0].number_type != GN_PHONEBOOK_NUMBER_General) || (pe->subentries[0].id != 2) || strcmp(pe->subentries[0].data.number, pe->number))) { dprintf("6160 doesn't support subentries\n"); return GN_ERR_UNKNOWN; } *pos++ = pe->location; strcpy(pos, pe->number); pos += numlen + 1; strcpy(pos, pe->name); pos += namelen + 1; SEND_MESSAGE_BLOCK(0x40, pos - req); } static gn_error phonebook_incoming(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { gn_phonebook_entry *pe; unsigned char *pos; unsigned char respheader[] = {0x01, 0x00, 0xc9, 0x04, 0x01}; if (memcmp(message, respheader, sizeof(respheader))) return GN_ERR_UNHANDLEDFRAME; switch (message[5]) { /* read phonebook reply */ case 0x86: if (!data->phonebook_entry) break; pe = data->phonebook_entry; pos = message + 8; switch (message[7]) { case 0x01: break; case 0x05: return GN_ERR_INVALIDLOCATION; default: return GN_ERR_UNHANDLEDFRAME; } snprintf(pe->number, sizeof(pe->number), "%s", pos); pos += strlen(pos) + 1; snprintf(pe->name, sizeof(pe->name), "%s", pos); memset(&pe->date, 0, sizeof(pe->date)); pe->subentries_count = 0; pe->caller_group = 5; pe->empty = (*pe->name != 0); break; /* write phonebook reply */ case 0x87: switch (message[7]) { case 0x01: break; case 0x05: return GN_ERR_INVALIDLOCATION; default: return GN_ERR_UNHANDLEDFRAME; } break; default: return GN_ERR_UNHANDLEDFRAME; } return GN_ERR_NONE; } static gn_error phone_info(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {0x00, 0x01, 0x00, 0x03, 0x00}; dprintf("Getting phone info...\n"); SEND_MESSAGE_BLOCK(0xd1, 5); } static gn_error identify(gn_data *data, struct gn_statemachine *state) { gn_error error; dprintf("Identifying...\n"); if (data->manufacturer) pnok_manufacturer_get(data->manufacturer); if ((error = phone_info(data, state)) != GN_ERR_NONE) return error; /* Check that we are back at state Initialised */ if (gn_sm_loop(0, state) != GN_SM_Initialised) return GN_ERR_UNKNOWN; return GN_ERR_NONE; } static gn_error phone_info_incoming(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { unsigned char *pos; if (data->model) { snprintf(data->model, 6, "%s", message + 21); } if (data->revision) { snprintf(data->revision, GN_REVISION_MAX_LENGTH, "SW: %s", message + 6); if ((pos = strchr(data->revision, '\n')) != NULL) *pos = 0; } dprintf("Phone info:\n%s\n", message + 4); return GN_ERR_NONE; } static gn_error get_bitmap_startup_slice(gn_data *data, struct gn_statemachine *state, int s) { nk6160_driver_instance *drvinst = NK6160_DRVINST(state); unsigned char req[] = {0x00, 0x01, 0x07, 0x07, 0x08, 0x00}; drvinst->logoslice = s; req[5] = (unsigned char)s + 1; SEND_MESSAGE_BLOCK(0x40, 6); } static gn_error bitmap_get(gn_data *data, struct gn_statemachine *state) { gn_error error; int i; if (!data->bitmap) return GN_ERR_INTERNALERROR; switch (data->bitmap->type) { case GN_BMP_StartupLogo: data->bitmap->height = driver_nokia_6160.phone.startup_logo_height; data->bitmap->width = driver_nokia_6160.phone.startup_logo_width; data->bitmap->size = ceiling_to_octet(data->bitmap->height * data->bitmap->width); gn_bmp_clear(data->bitmap); for (i = 0; i < 6; i++) if ((error = get_bitmap_startup_slice(data, state, i)) != GN_ERR_NONE) return error; break; case GN_BMP_WelcomeNoteText: case GN_BMP_DealerNoteText: case GN_BMP_OperatorLogo: case GN_BMP_CallerLogo: case GN_BMP_None: case GN_BMP_PictureMessage: return GN_ERR_NOTSUPPORTED; default: return GN_ERR_INTERNALERROR; } return GN_ERR_NONE; } static gn_error bitmap_startup_logo_incoming(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { nk6160_driver_instance *drvinst = NK6160_DRVINST(state) ; int x, i; unsigned char b; if (message[0] != 0x01 || message[1] != 0x00 || message[2] != 0x07 || message[3] != 0x08) return GN_ERR_UNHANDLEDFRAME; if (!data->bitmap || data->bitmap->type != GN_BMP_StartupLogo) return GN_ERR_INTERNALERROR; for (x = 0; x < 84; x++) for (b = message[5 + x], i = 0; b != 0; b >>= 1, i++) if (b & 0x01) gn_bmp_point_set(data->bitmap, x, 8 * drvinst->logoslice + i); return GN_ERR_NONE; } #if 0 static int get_memory_type(GSM_MemoryType memory_type) { int result; switch (memory_type) { case GN_MT_MT: result = NK6100_MEMORY_MT; break; case GN_MT_ME: result = NK6100_MEMORY_ME; break; case GN_MT_SM: result = NK6100_MEMORY_SM; break; case GN_MT_FD: result = NK6100_MEMORY_FD; break; case GN_MT_ON: result = NK6100_MEMORY_ON; break; case GN_MT_EN: result = NK6100_MEMORY_EN; break; case GN_MT_DC: result = NK6100_MEMORY_DC; break; case GN_MT_RC: result = NK6100_MEMORY_RC; break; case GN_MT_MC: result = NK6100_MEMORY_MC; break; default: result = NK6100_MEMORY_XX; break; } return (result); } #endif gnokii-0.6.31/common/phones/atbosch.c0000644000175000017500000000660211666163120015562 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright 2002-2003 Ladislav Michl This file provides functions specific to AT commands on Bosch phones. See README for more details on supported mobile phones. */ #include "config.h" #include #include #include "gnokii-internal.h" #include "phones/generic.h" #include "phones/atgen.h" #include "phones/atbosch.h" #include "links/atbus.h" static gn_error FakeCharset(gn_data *data, struct gn_statemachine *state) { AT_DRVINST(state)->charset = AT_CHAR_GSM; return GN_ERR_NONE; } static gn_error Unsupported(gn_data *data, struct gn_statemachine *state) { return GN_ERR_NOTSUPPORTED; } static at_recv_function_type replygetsms; /* * Bosch 909 (and probably also Bosch 908) doesn't provide SMSC information * We insert it here to satisfy generic PDU SMS receiving function in atgen.c */ static gn_error ReplyGetSMS(int type, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state) { int i, ofs, len; char *pos, *lenpos = NULL; char tmp[8]; if (buffer[0] != GN_AT_OK) return GN_ERR_INVALIDLOCATION; pos = buffer + 1; for (i = 0; i < 2; i++) { pos = findcrlf(pos, 1, length); if (!pos) return GN_ERR_INTERNALERROR; pos = skipcrlf(pos); if (i == 0) { int j; lenpos = pos; for (j = 0; j < 2; j++) { lenpos = strchr(lenpos, ','); if (!lenpos) return GN_ERR_INTERNALERROR; lenpos++; } } } if (!lenpos) return GN_ERR_INTERNALERROR; len = atoi(lenpos); /* Do we need one more digit? */ if (len / 10 < (len + 2) / 10) memmove(lenpos + 1, lenpos, lenpos - (char*)buffer); ofs = snprintf(tmp, 8, "%d", len + 2); if (ofs < 1) return GN_ERR_INTERNALERROR; /* something went very wrong */ memcpy(lenpos, tmp, ofs); /* Insert zero length SMSC field */ ofs = pos - (char*)buffer; memmove(pos + 2, pos, length - ofs); buffer[ofs] = '0'; buffer[ofs+1] = '0'; return (*replygetsms)(type, buffer, length + 2, data, state); } void at_bosch_init(char* foundmodel, char* setupmodel, struct gn_statemachine *state) { at_insert_send_function(GN_OP_AT_GetCharset, FakeCharset, state); at_insert_send_function(GN_OP_AT_SetCharset, FakeCharset, state); replygetsms = at_insert_recv_function(GN_OP_GetSMS, ReplyGetSMS, state); /* phone lacks many usefull commands :( */ at_insert_send_function(GN_OP_GetBatteryLevel, Unsupported, state); at_insert_send_function(GN_OP_GetRFLevel, Unsupported, state); at_insert_send_function(GN_OP_GetSecurityCodeStatus, Unsupported, state); at_insert_send_function(GN_OP_EnterSecurityCode, Unsupported, state); at_insert_send_function(GN_OP_SaveSMS, Unsupported, state); } gnokii-0.6.31/common/phones/nk3110.c0000644000175000017500000013370011666163120015054 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2000 Hugh Blemings & Pavel Janík ml. Copyright (C) 2001 Pawe³ Kot Copyright (C) 2003-2003 BORBELY Zoltan Copyright (C) 2003 Osma Suominen This file provides functions specific to the Nokia 3110 series. See README for more details on supported mobile phones. */ #include "config.h" #include #include #include #include "compat.h" #include "misc.h" #include "gnokii.h" #include "phones/generic.h" #include "phones/nk3110.h" #include "links/fbus-3110.h" #include "phones/nokia.h" #include "gnokii-internal.h" #define DRVINSTANCE(s) (*((nk3110_driver_instance **)(&(s)->driver.driver_instance))) #define FREE(p) do { free(p); (p) = NULL; } while (0) /* Prototypes */ static gn_error functions(gn_operation op, gn_data *data, struct gn_statemachine *state); static gn_error P3110_Initialise(struct gn_statemachine *state); static gn_error P3110_GetSMSInfo(gn_data *data, struct gn_statemachine *state); static gn_error P3110_GetPhoneInfo(gn_data *data, struct gn_statemachine *state); static gn_error P3110_GetStatusInfo(gn_data *data, struct gn_statemachine *state); static gn_error P3110_Identify(gn_data *data, struct gn_statemachine *state); static gn_error P3110_GetMemoryStatus(gn_data *data, struct gn_statemachine *state); static gn_error P3110_GetSMSMessage(gn_data *data, struct gn_statemachine *state); static gn_error P3110_DeleteSMSMessage(gn_data *data, struct gn_statemachine *state); static gn_error P3110_SendSMSMessage(gn_data *data, struct gn_statemachine *state, bool save_sms); static gn_error P3110_ReadPhonebook(gn_data *data, struct gn_statemachine *state); static gn_error P3110_WritePhonebook(gn_data *data, struct gn_statemachine *state); static gn_error P3110_MakeCall(gn_data *data, struct gn_statemachine *state); static gn_error P3110_SendRLPFrame(gn_data *data, struct gn_statemachine *state); static gn_error P3110_SetRLPRXCallback(gn_data *data, struct gn_statemachine *state); static gn_error P3110_IncomingNothing(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error P3110_IncomingRLPFrame(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error P3110_IncomingCall(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error P3110_IncomingCallAnswered(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error P3110_IncomingCallEstablished(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error P3110_IncomingEndOfOutgoingCall(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error P3110_IncomingEndOfIncomingCall(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error P3110_IncomingEndOfOutgoingCall2(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error P3110_IncomingRestart(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error P3110_IncomingInitFrame(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error P3110_IncomingSMSUserData(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error P3110_IncomingSMSSend(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error P3110_IncomingSMSSave(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error P3110_IncomingSMSHeader(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error P3110_IncomingSMSDelete(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error P3110_IncomingSMSDelivered(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error P3110_IncomingNoSMSInfo(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error P3110_IncomingSMSInfo(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error P3110_IncomingPhonebookRead(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error P3110_IncomingPhonebookWrite(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error P3110_IncomingPINEntered(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error P3110_IncomingStatusInfo(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static gn_error P3110_IncomingPhoneInfo(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); static int sms_header_encode(gn_data *data, struct gn_statemachine *state, unsigned char *req, int ulength, bool save_sms); static int get_memory_type(gn_memory_type memory_type); static gn_incoming_function_type incoming_functions[] = { { 0x02, P3110_IncomingRLPFrame }, { 0x0a, P3110_IncomingNothing }, { 0x0b, P3110_IncomingCall }, { 0x0c, P3110_IncomingNothing }, { 0x0d, P3110_IncomingCallAnswered }, { 0x0e, P3110_IncomingCallEstablished }, { 0x0f, P3110_IncomingNothing }, { 0x10, P3110_IncomingEndOfOutgoingCall }, { 0x11, P3110_IncomingEndOfIncomingCall }, { 0x12, P3110_IncomingEndOfOutgoingCall2 }, { 0x13, P3110_IncomingRestart }, { 0x15, P3110_IncomingInitFrame }, { 0x16, P3110_IncomingInitFrame }, { 0x20, P3110_IncomingNothing }, { 0x23, P3110_IncomingNothing }, { 0x24, P3110_IncomingNothing }, { 0x25, P3110_IncomingNothing }, { 0x26, P3110_IncomingNothing }, { 0x27, P3110_IncomingSMSUserData }, { 0x28, P3110_IncomingSMSSend }, { 0x2a, P3110_IncomingSMSSave }, /* ... */ { 0x2c, P3110_IncomingSMSHeader }, { 0x2e, P3110_IncomingSMSDelete }, /* ... */ { 0x32, P3110_IncomingSMSDelivered }, { 0x3f, P3110_IncomingNothing }, { 0x40, P3110_IncomingNoSMSInfo }, { 0x41, P3110_IncomingSMSInfo }, { 0x42, P3110_IncomingNothing }, { 0x43, P3110_IncomingNothing }, { 0x44, P3110_IncomingPhonebookWrite }, { 0x46, P3110_IncomingPhonebookRead }, { 0x48, P3110_IncomingPINEntered }, { 0x4a, P3110_IncomingNothing }, { 0x4b, P3110_IncomingStatusInfo }, { 0x4c, P3110_IncomingNothing }, { 0x4d, P3110_IncomingPhoneInfo }, { 0, NULL} }; gn_driver driver_nokia_3110 = { incoming_functions, pgen_incoming_default, /* Mobile phone information */ { "3110|3810|8110|8110i", /* Models */ 4, /* Max RF Level */ 0, /* Min RF Level */ GN_RF_Arbitrary, /* RF level units */ 4, /* Max Battery Level */ 0, /* Min Battery Level */ GN_BU_Arbitrary, /* Battery level units */ GN_DT_None, /* No date/time support */ GN_DT_None, /* No alarm support */ 0, /* Max alarms = 0 */ 0, 0, /* Startup logo size */ 0, 0, /* Op logo size */ 0, 0 /* Caller logo size */ }, functions, NULL }; static gn_error functions(gn_operation op, gn_data *data, struct gn_statemachine *state) { if (!DRVINSTANCE(state) && op != GN_OP_Init) return GN_ERR_INTERNALERROR; switch (op) { case GN_OP_Init: if (DRVINSTANCE(state)) return GN_ERR_INTERNALERROR; return P3110_Initialise(state); case GN_OP_Terminate: FREE(DRVINSTANCE(state)); return pgen_terminate(data, state); case GN_OP_GetModel: case GN_OP_GetRevision: case GN_OP_GetImei: return P3110_GetPhoneInfo(data, state); case GN_OP_Identify: return P3110_Identify(data, state); case GN_OP_GetBatteryLevel: case GN_OP_GetRFLevel: return P3110_GetStatusInfo(data, state); case GN_OP_GetMemoryStatus: return P3110_GetMemoryStatus(data, state); case GN_OP_ReadPhonebook: return P3110_ReadPhonebook(data, state); case GN_OP_WritePhonebook: return P3110_WritePhonebook(data, state); case GN_OP_MakeCall: return P3110_MakeCall(data, state); case GN_OP_SendRLPFrame: return P3110_SendRLPFrame(data, state); case GN_OP_SetRLPRXCallback: return P3110_SetRLPRXCallback(data, state); case GN_OP_GetPowersource: case GN_OP_GetAlarm: case GN_OP_GetSMSStatus: case GN_OP_GetIncomingCallNr: case GN_OP_GetNetworkInfo: return GN_ERR_NOTIMPLEMENTED; case GN_OP_GetSMS: return P3110_GetSMSMessage(data, state); case GN_OP_DeleteSMS: return P3110_DeleteSMSMessage(data, state); case GN_OP_SendSMS: return P3110_SendSMSMessage(data, state, false); case GN_OP_SaveSMS: return P3110_SendSMSMessage(data, state, true); case GN_OP_GetSMSCenter: return P3110_GetSMSInfo(data, state); case GN_OP_GetSpeedDial: case GN_OP_GetDateTime: default: return GN_ERR_NOTIMPLEMENTED; } } /* Initialise is the only function allowed to 'use' state */ static gn_error P3110_Initialise(struct gn_statemachine *state) { gn_data data; gn_error error = GN_ERR_NONE; u8 init_sequence[20] = {0x02, 0x01, 0x07, 0xa2, 0x88, 0x81, 0x21, 0x55, 0x63, 0xa8, 0x00, 0x00, 0x07, 0xa3, 0xb8, 0x81, 0x20, 0x15, 0x63, 0x80}; /* Copy in the phone info */ memcpy(&(state->driver), &driver_nokia_3110, sizeof(gn_driver)); if (!(DRVINSTANCE(state) = calloc(1, sizeof(nk3110_driver_instance)))) { error = GN_ERR_MEMORYFULL; goto retval; } /* just to make things explicit: */ DRVINSTANCE(state)->sim_available = false; /* Only serial connection is supported */ if (state->config.connection_type != GN_CT_Serial) { error = GN_ERR_NOTSUPPORTED; goto errcond; } /* Initialise FBUS link */ if (fb3110_initialise(state) != GN_ERR_NONE) { dprintf("Error in link initialisation\n"); error = GN_ERR_NOTREADY; goto errcond; } /* Initialise state machine */ sm_initialise(state); /* 0x15 messages are sent by the PC during the initialisation phase. Anyway, the contents of the message are not understood so we simply send the same sequence observed between the W95 PC and the phone. The init sequence may still be a bit flaky and is not fully understood. */ if (sm_message_send(20, 0x15, init_sequence, state) != GN_ERR_NONE) { error = GN_ERR_NOTREADY; goto errcond; } /* Wait for response to 0x15 sequence */ gn_data_clear(&data); if (sm_block(0x16, &data, state) != GN_ERR_NONE) { error = GN_ERR_NOTREADY; goto errcond; } goto retval; errcond: FREE(DRVINSTANCE(state)); pgen_terminate(&data, state); retval: return error; } static gn_error P3110_GetSMSInfo(gn_data *data, struct gn_statemachine *state) { dprintf("Getting SMS info...\n"); if (sm_message_send(0, 0x3f, NULL, state) != GN_ERR_NONE) return GN_ERR_NOTREADY; return sm_block(0x41, data, state); } static gn_error P3110_GetPhoneInfo(gn_data *data, struct gn_statemachine *state) { dprintf("Getting phone info...\n"); if (sm_message_send(0, 0x4c, NULL, state) != GN_ERR_NONE) return GN_ERR_NOTREADY; return sm_block(0x4d, data, state); } static gn_error P3110_GetStatusInfo(gn_data *data, struct gn_statemachine *state) { dprintf("Getting phone status...\n"); if (sm_message_send(0, 0x4a, NULL, state) != GN_ERR_NONE) return GN_ERR_NOTREADY; return sm_block(0x4b, data, state); } static gn_error P3110_GetMemoryStatus(gn_data *data, struct gn_statemachine *state) { dprintf("Getting memory status...\n"); /* Check if this type of memory is available */ switch (data->memory_status->memory_type) { case GN_MT_SM: if (!(DRVINSTANCE(state)->sim_available)) return GN_ERR_NOTREADY; return P3110_GetSMSInfo(data, state); case GN_MT_ME: if (P3110_MEMORY_SIZE_ME == 0) return GN_ERR_NOTREADY; return P3110_GetSMSInfo(data, state); default: break; } return GN_ERR_NOTREADY; } static gn_error P3110_Identify(gn_data *data, struct gn_statemachine *state) { dprintf("Identifying...\n"); pnok_manufacturer_get(data->manufacturer); if (sm_message_send(0, 0x4c, NULL, state) != GN_ERR_NONE) return GN_ERR_NOTREADY; if (sm_block(0x4d, data, state) != GN_ERR_NONE) return GN_ERR_NOTREADY; /* Check that we are back at state Initialised */ if (gn_sm_loop(0, state) != GN_SM_Initialised) return GN_ERR_UNKNOWN; return GN_ERR_NONE; } static gn_error P3110_GetSMSMessage(gn_data *data, struct gn_statemachine *state) { int memory_type; unsigned char request[2]; gn_error error = GN_ERR_INTERNALERROR; struct timeval now, next, timeout; dprintf("Getting SMS message...\n"); if (!data->raw_sms) return GN_ERR_INTERNALERROR; /* Set memory type and location in the request */ memory_type = get_memory_type(data->raw_sms->memory_type); if (memory_type == 0) return GN_ERR_INVALIDMEMORYTYPE; request[0] = memory_type; request[1] = data->raw_sms->number; /* 0x25 messages requests the contents of an SMS message from the phone. The first byte has only ever been observed to be 0x02 - could be selecting internal versus external memory. Specifying memory 0x00 may request the first location? Phone replies with 0x2c and 0x27 messages for valid locations, 0x2d for empty ones. */ if (sm_message_send(2, 0x25, request, state) != GN_ERR_NONE) return GN_ERR_NOTREADY; error = sm_block(0x2c, data, state); if (error != GN_ERR_NONE) return error; /* Wait for subsequent content frames. The received data is first * stored in DRVINSTANCE(state)->user_data, because trying to catch * all the user data frames using sm_block() would create a race * condition. */ timeout.tv_sec = 10; timeout.tv_usec = 0; gettimeofday(&now, NULL); timeradd(&now, &timeout, &next); dprintf("Waiting for content frames...\n"); while (DRVINSTANCE(state)->user_data_count < data->raw_sms->length && timercmp(&next, &now, >)) { gn_sm_loop(1, state); gettimeofday(&now, NULL); } if (DRVINSTANCE(state)->user_data_count < data->raw_sms->length) return GN_ERR_TIMEOUT; /* the data has been received, copy it to the right place */ memcpy(data->raw_sms->user_data, DRVINSTANCE(state)->user_data, data->raw_sms->length); return GN_ERR_NONE; } static gn_error P3110_DeleteSMSMessage(gn_data *data, struct gn_statemachine *state) { int memory_type; unsigned char request[2]; dprintf("Deleting SMS message...\n"); /* Set memory type and location in the request */ memory_type = get_memory_type(data->raw_sms->memory_type); if (memory_type == 0) return GN_ERR_INVALIDMEMORYTYPE; request[0] = memory_type; request[1] = data->raw_sms->number; /* 0x26 message deletes an SMS message from the phone. The first byte has only ever been observed to be 0x02 but is assumed to be selecting internal versus external memory. Phone replies with 0x2e for valid locations, 0x2f for invalid ones. If a location is empty but otherwise valid 0x2e is still returned. */ if (sm_message_send(2, 0x26, request, state) != GN_ERR_NONE) return GN_ERR_NOTREADY; return sm_block(0x2e, data, state); } static gn_error P3110_SendSMSMessage(gn_data *data, struct gn_statemachine *state, bool save_sms) { unsigned char msgtype, hreq[256], req[256], udata[256]; /* FIXME hardcoded buffer sizes are ugly */ int hsize, retry_count, block_count; int uoffset, uremain, ulength, blength; gn_error error = GN_ERR_NONE; msgtype = save_sms ? 0x24 : 0x23; /* FIXME Dirty hacks ahead: * The message data can either be unpacked from the raw_sms * structure - which is stupid - or it can be read directly from * the data->sms structure - which is ugly and breaks the code * structure. But the latter seems to work a bit better with * special characters, not sure why, but anyway this is not the * way things should be done, but it should be fixed elsewhere. */ #if 0 /* The phone expects ASCII data instead of 7bit packed data, which * is the format used in raw_sms. So the data has to be unpacked * again. */ ulength = char_7bit_unpack(0, data->raw_sms->user_data_length, sizeof(udata), data->raw_sms->user_data, udata); #else ulength = strlen(data->sms->user_data[0].u.text); memcpy(udata, data->sms->user_data[0].u.text, ulength); #endif hsize = sms_header_encode(data, state, hreq, ulength, save_sms); /* We have a loop here as if the response from the phone is 0x65 0x26 the rule appears to be just to try sending the message again. We do this a maximum of P3110_SMS_SEND_RETRY_COUNT times before giving up. This value is empirical only! */ retry_count = P3110_SMS_SEND_RETRY_COUNT; while (retry_count > 0) { if (sm_message_send(hsize, msgtype, hreq, state) != GN_ERR_NONE) return GN_ERR_NOTREADY; error = sm_block_ack(state); if (error != GN_ERR_NONE) return error; /* Now send as many blocks of maximum 55 characters as required to send complete message. */ block_count = 0; uoffset = 0; uremain = ulength; while (uremain > 0) { ++block_count; blength = uremain; /* Limit block length */ if (blength > 55) blength = 55; /* Create block */ req[0] = block_count; memcpy(req+1, udata + uoffset, blength); /* Send block */ if (sm_message_send(blength+1, 0x27, req, state) != GN_ERR_NONE) return GN_ERR_NOTREADY; /* update remaining and offset values for next block */ uremain -= blength; uoffset += blength; /* for blocks other than the last one, wait for ack; * for last block, wait for reply message instead */ if (uremain == 0) break; error = sm_block_ack(state); if (error != GN_ERR_NONE) return error; } dprintf("SMS data sent, waiting for result...\n"); if (save_sms) { error = sm_block_no_retry_timeout(0x2a, 200, data, state); } else { error = sm_block_no_retry_timeout(0x28, 1200, data, state); if (error == GN_ERR_FAILED) { /* Got a retry response so try again! */ dprintf("SMS send attempt failed, trying again...\n"); retry_count--; /* After an empirically determined pause... */ usleep(500000); /* 0.5 seconds. */ continue; } } return error; } /* Retries must have failed. */ return GN_ERR_FAILED; } static gn_error P3110_ReadPhonebook(gn_data *data, struct gn_statemachine *state) { unsigned char req[2]; req[0] = get_memory_type(data->phonebook_entry->memory_type); req[1] = data->phonebook_entry->location; if (sm_message_send(2, 0x43, req, state) != GN_ERR_NONE) return GN_ERR_NOTREADY; return sm_block(0x46, data, state); } static gn_error P3110_WritePhonebook(gn_data *data, struct gn_statemachine *state) { int namelen, numberlen; unsigned char req[256]; req[0] = get_memory_type(data->phonebook_entry->memory_type); req[1] = data->phonebook_entry->location; namelen = strlen(data->phonebook_entry->name); numberlen = strlen(data->phonebook_entry->number); req[2] = namelen; memcpy(req + 3, data->phonebook_entry->name, namelen); req[3 + namelen] = numberlen; memcpy(req + 3 + namelen + 1, data->phonebook_entry->number, numberlen); if (sm_message_send(3 + namelen + 1 + numberlen, 0x42, req, state) != GN_ERR_NONE) return GN_ERR_NOTREADY; return sm_block(0x44, data, state); } static gn_error P3110_MakeCall(gn_data *data, struct gn_statemachine *state) { unsigned char req[256], call_type; int pos = 0, numlen; switch (data->call_info->type) { case GN_CALL_Voice: call_type = 0x05; break; case GN_CALL_DigitalData: case GN_CALL_NonDigitalData: call_type = 0x01; break; default: dprintf("Invalid call type %d\n", data->call_info->type); return GN_ERR_INTERNALERROR; } numlen = strlen(data->call_info->number); req[pos++] = call_type; req[pos++] = 0x01; /* Address / number type? */ req[pos++] = numlen; memcpy(req + pos, data->call_info->number, numlen); pos += numlen; /* Magic bytes taken from gnokii 0.3.5 code * These probably set up some timers or something... * According to old comments, InitField1 is not needed for * voice calls, but doesn't seem to do any harm. */ req[pos++] = 0x07; /* Length of InitField1 */ req[pos++] = 0xa2; /* InitField1 content */ req[pos++] = 0x88; req[pos++] = 0x81; req[pos++] = 0x21; req[pos++] = 0x15; req[pos++] = 0x63; req[pos++] = 0xa8; req[pos++] = 0x00; /* Length of InitField2 */ req[pos++] = 0x00; /* Length of InitField2 */ if (sm_message_send(pos, 0x0a, req, state) != GN_ERR_NONE) return GN_ERR_NOTREADY; return sm_block_no_retry_timeout(0x0e, 500, data, state); } static gn_error P3110_SendRLPFrame(gn_data *data, struct gn_statemachine *state) { unsigned char req[31]; req[0] = (data->rlp_out_dtx) ? 0x01 : 0x00; memcpy(req + 1, (unsigned char *) data->rlp_frame, 30); return sm_message_send(31, 0x01, req, state); } static gn_error P3110_SetRLPRXCallback(gn_data *data, struct gn_statemachine *state) { DRVINSTANCE(state)->rlp_rx_callback = data->rlp_rx_callback; return GN_ERR_NONE; } static gn_error P3110_IncomingNothing(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { return GN_ERR_NONE; } static gn_error P3110_IncomingRLPFrame(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { gn_rlp_f96_frame frame; if (!DRVINSTANCE(state)->rlp_rx_callback) return GN_ERR_NONE; frame.Header[0] = message[2]; frame.Header[1] = message[3]; memcpy(frame.Data, message + 4, 25); frame.FCS[0] = message[29]; frame.FCS[1] = message[30]; frame.FCS[2] = message[31]; DRVINSTANCE(state)->rlp_rx_callback(&frame); return GN_ERR_NONE; } /* 0x0b messages are sent by phone when an incoming call occurs, this message must be acknowledged. */ static gn_error P3110_IncomingCall(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { int count; char buffer[256]; /* Get info out of message. At present, first three bytes are unknown (though third seems to correspond to length of number). Remaining bytes are the phone number, ASCII encoded. */ for (count = 0; count < message[4]; count ++) { buffer[count] = message[5 + count]; } buffer[count] = 0x00; /* Now display incoming call message. */ dprintf("Incoming call - Type: %s. %02x, Number %s.\n", (message[2] == 0x05 ? "Voice":"Data?"), message[3], buffer); return GN_ERR_NONE; } static gn_error P3110_IncomingCallAnswered(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { dprintf("Incoming call answered from phone.\n"); return GN_ERR_NONE; } /* Fairly self explanatory these two, though the outgoing call message has three (unexplained) data bytes. */ static gn_error P3110_IncomingCallEstablished(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { dprintf("%s call established - status bytes %02x %02x.\n", (message[2] == 0x05 ? "voice":"data(?)"), message[3], message[4]); return GN_ERR_NONE; } /* 0x10 messages are sent by the phone when an outgoing call terminates. */ static gn_error P3110_IncomingEndOfOutgoingCall(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { dprintf("Call terminated from phone (0x10 message).\n"); /* FIXME: Tell datapump code that the call has terminated. */ /*if (CallPassup) { CallPassup(' '); }*/ return GN_ERR_NONE; } /* 0x11 messages are sent by the phone when an incoming call terminates. There is some other data in the message, purpose as yet undertermined. */ static gn_error P3110_IncomingEndOfIncomingCall(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { dprintf("Call terminated from opposite end of line (or from network).\n"); /* FIXME: Tell datapump code that the call has terminated. */ /*if (CallPassup) { CallPassup(' '); }*/ return GN_ERR_NONE; } /* 0x12 messages are sent after the 0x10 message at the end of an outgoing call. Significance of two messages versus the one at the end of an incoming call is as yet undertermined. */ static gn_error P3110_IncomingEndOfOutgoingCall2(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { dprintf("Call terminated from phone (0x12 message).\n"); /* FIXME: Tell datapump code that the call has terminated. */ /*if (CallPassup) { CallPassup(' '); }*/ return GN_ERR_NONE; } /* 0x13 messages are sent after the phone restarts. Re-initialise */ static gn_error P3110_IncomingRestart(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { /* FIXME: send 0x15 message somehow */ return GN_ERR_NONE; } /* 0x15 messages are sent by the phone in response to the init sequence sent so we don't acknowledge them! */ /* 0x16 messages are sent by the phone during initialisation, to response to the 0x15 message. Sequence bytes have been observed to change with differing software versions: V06.61 (19/08/97) sends 0x10 0x02, V07.02 (17/03/98) sends 0x30 0x02. The actual data byte is 0x02 when SIM memory is available, and 0x01 when not (e.g. when SIM card isn't inserted to phone or when it is waiting for PIN) */ static gn_error P3110_IncomingInitFrame(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { switch (message[0]) { /* unfold message type */ case 0x15: return GN_ERR_NONE; case 0x16: DRVINSTANCE(state)->sim_available = (message[2] == 0x02); dprintf("SIM available: %s.\n", (DRVINSTANCE(state)->sim_available ? "Yes" : "No")); return GN_ERR_NONE; case 0x17: dprintf("0x17 Registration Response: Failure!\n"); return GN_ERR_FAILED; default: return GN_ERR_INTERNALERROR; } } /* 0x27 messages are a little unusual when sent by the phone in that they can either be an acknowledgement of an 0x27 message we sent to the phone with message text in it or they could contain message text for a message we requested. */ static gn_error P3110_IncomingSMSUserData(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { /* First see if it was an acknowledgement to one of our messages, if so then nothing to do */ if (length == 0x02) return GN_ERR_NONE; /* This function may be called several times; it accumulates the * SMS content in DRVINSTANCE(state)->user_data * DRVINSTANCE(state)->user_data_count is used as a counter. */ /* If this is the first block, reset accumulated message length. */ if (message[2] == 1) DRVINSTANCE(state)->user_data_count = 0; memcpy(DRVINSTANCE(state)->user_data + DRVINSTANCE(state)->user_data_count, message + 3, length - 3); DRVINSTANCE(state)->user_data_count += length - 3; return GN_ERR_NONE; } /* 0x28 messages are sent by the phone to acknowledge successful sending of an SMS message. The byte returned is a receipt number of some form, not sure if it's from the network, sending sending of an SMS message. The byte returned is the TP-MR (TP-Message-Reference) from sending phone (Also sent to network). TP-MR is send from phone within 0x32 message. TP-MR is increased by phone after each sent SMS */ /* 0x29 messages are sent by the phone to indicate an error in sending an SMS message. Observed values are 0x65 0x15 when the phone originated SMS was disabled by the network for the particular phone. 0x65 0x26 was observed too, whereupon the message was retried. */ static gn_error P3110_IncomingSMSSend(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { switch (message[0]) { /* unfold message type */ case 0x28: dprintf("SMS send OK (0x%02hhx)\n", message[2]); data->raw_sms->number = (int) message[2]; return GN_ERR_NONE; case 0x29: dprintf("SMS send failed (0x%02hhx 0x%02hhx)\n", message[2], message[3]); return GN_ERR_FAILED; default: return GN_ERR_INTERNALERROR; } } /* 0x2a messages are sent by the phone to acknowledge successful saving of an SMS message. */ /* 0x2b messages are sent by the phone to indicate an error in saving an SMS message. */ static gn_error P3110_IncomingSMSSave(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { switch (message[0]) { /* unfold message type */ case 0x2a: dprintf("SMS save OK (0x%02hhx)\n", message[2]); data->raw_sms->number = (int) message[2]; return GN_ERR_NONE; case 0x2b: dprintf("SMS send failed (0x%02hhx)\n", message[2]); return GN_ERR_FAILED; default: return GN_ERR_INTERNALERROR; } } /* 0x2c messages are generated by the phone when we request an SMS message with an 0x25 message. Appears to have the same fields as the 0x30 notification but with one extra. Immediately after the 0x2c nessage, the phone sends 0x27 message(s) */ /* 0x2d messages are generated when an SMS message is requested that does not exist or is empty. */ static gn_error P3110_IncomingSMSHeader(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { int smsc_length, remote_length, l; gn_gsm_number_type smsc_number_type, remote_number_type; unsigned char smsc[256], remote[256]; /* should be enough for anyone */ switch (message[0]) { /* unfold message type */ case 0x2c: break; case 0x2d: if (message[2] == 0x74) return GN_ERR_INVALIDLOCATION; else return GN_ERR_EMPTYLOCATION; default: return GN_ERR_INTERNALERROR; } if (!data->raw_sms) { dprintf("Unrequested SMS header received. Ignoring.\n"); return GN_ERR_INTERNALERROR; } data->raw_sms->status = message[4]; /* Check UDHI */ if (message[5] & 0x40) /* FO_UDHI */ data->raw_sms->udh_indicator = 1; else data->raw_sms->udh_indicator = 0; data->raw_sms->dcs = message[7]; /* FIXME the DCS is set to indicate an 8-bit message in order * to avoid the conversion from 7bit in gsm-sms.c * This really should be done some other way... */ data->raw_sms->dcs = 0xf4; /* Set message length */ data->raw_sms->length = message[15]; /* Only received messages have meaningful timestamps and numbers, * saved messages only seem to have garbage in these fields. So * they are not read if the message is a saved one. It seems that * 0x01 indicates a saved message, however both 0x04 and 0x24 have * been seen in received messages. What their difference is is * unknown (at least it's not just read/unread status - the value * seems not to change for a given message). */ if (message[5] != 0x01) { memcpy(data->raw_sms->smsc_time, message + 8, 7); /* Now get remote and message center length & type */ smsc_length = message[16]; remote_length = message[17 + smsc_length]; remote_number_type = message[17 + smsc_length + 1 + remote_length]; /* Need to do some stupid tricks with SMSC number and remote * number, because the gn_sms_raw data structure stores them * in BCD format whereas the phone uses non-zero-terminated * strings with a length byte. So first the data is copied to * a temp string, zero termination is added and the result is * fed to a BCD conversion function. */ strncpy(smsc, message + 17, smsc_length); smsc[smsc_length] = '\0'; smsc_number_type = (smsc[0] == '+') ? GN_GSM_NUMBER_International : GN_GSM_NUMBER_Unknown; l = char_semi_octet_pack(smsc, data->raw_sms->message_center + 1, smsc_number_type); /* and here's the magic for SMSC number length... */ data->raw_sms->message_center[0] = (l + 1) / 2 + 1; strncpy(remote, message + 17 + smsc_length + 1, remote_length); remote[remote_length] = '\0'; l = char_semi_octet_pack(remote, data->raw_sms->remote_number + 1, remote_number_type); data->raw_sms->remote_number[0] = l; } else { remote[0] = '\0'; smsc[0] = '\0'; } dprintf("PID:%02x DCS:%02x Timezone:%02x Stat1:%02x Stat2:%02x\n", message[6], message[7], message[14], message[4], message[5]); dprintf("Message Read:\n"); dprintf(" Location: %d. Type: %d Status: %d\n", data->raw_sms->number, data->raw_sms->type, data->raw_sms->status); dprintf(" Sender: %s\n", remote); dprintf(" Message Center: %s\n", smsc); return GN_ERR_NONE; } /* 0x2e messages are generated when an SMS message is deleted successfully. */ /* 0x2f messages are generated when an SMS message is deleted that does not exist. Unlike responses to a getsms message no error is returned when the entry is already empty */ static gn_error P3110_IncomingSMSDelete(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { switch (message[0]) { /* unfold message type */ case 0x2e: return GN_ERR_NONE; case 0x2f: /* Note 0x74 is the only value that has been seen! */ if (message[2] == 0x74) return GN_ERR_INVALIDLOCATION; else return GN_ERR_EMPTYLOCATION; default: return GN_ERR_INTERNALERROR; } } /* 0x32 messages are generated when delivery notification arrives to phone from network */ static gn_error P3110_IncomingSMSDelivered(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { static gn_sms_raw sms; /* u8 dest_length, smsc_length, l;*/ u8 U0, U1, U2; data->raw_sms = &sms; if (!data->raw_sms) return GN_ERR_INTERNALERROR; U0 = message[1]; U1 = message[2]; U2 = message[17]; /* DecodePDUSMS(message, data->raw_sms, length); */ /* All these are moved fo gsm-sms.c P3110_DecodeTime(message+3, &(data->raw_sms->Time)); P3110_DecodeTime(message+10, &(data->raw_sms->SMSCTime)); Get message id data->raw_sms->MessageNumber = (int) message[18]; Get sender and message center length dest_length = message[19]; smsc_length = message[20 + dest_length]; Copy destination number l = dest_length < GSM_MAX_DESTINATION_LENGTH ? dest_length : GSM_MAX_DESTINATION_LENGTH; strncpy(data->raw_sms->Destination, message + 20, l); data->raw_sms->Destination[l] = 0; Copy SMSC number l = smsc_length < GSM_MAX_SMS_CENTER_LENGTH ? smsc_length : GSM_MAX_SMS_CENTER_LENGTH; strncpy(data->raw_sms->MessageCenter.Number, message + 21 + dest_length, l); data->raw_sms->MessageCenter.Number[l] = 0; dprintf("Message [0x%02x] Delivered!\n", data->raw_sms->Number); dprintf(" Destination: %s\n", data->raw_sms->RemoteNumber.number); dprintf(" Message Center: %s\n", data->raw_sms->MessageCenter.Number); dprintf(" Unknowns: 0x%02x 0x%02x 0x%02x\n", U0, U1, U2); dprintf(" Discharge Time: %02d.%02d.%02d %02d:%02d:%02d\n", data->raw_sms->Time.Day, data->raw_sms->Time.Month, data->raw_sms->Time.Year, data->raw_sms->Time.Hour, data->raw_sms->Time.Minute, data->raw_sms->Time.Second); dprintf(" SMSC Time Stamp: %02d.%02d.%02d %02d:%02d:%02d\n", data->raw_sms->SMSCTime.Day, data->raw_sms->SMSCTime.Month, data->raw_sms->SMSCTime.Year, data->raw_sms->SMSCTime.Hour, data->raw_sms->SMSCTime.Minute, data->raw_sms->SMSCTime.Second); */ return GN_ERR_NONE; } /* 0x40 Messages are sent to response to an 0x3f request. e.g. when phone is waiting for PIN */ static gn_error P3110_IncomingNoSMSInfo(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { dprintf("SMS Message Center Data not reachable.\n"); return GN_ERR_NOTREADY; } /* Handle 0x41 message which is sent by phone in response to an 0x3f request. Contains data about the Message Center in use */ static gn_error P3110_IncomingSMSInfo(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { u8 center_number_length; u8 option_number_length; int count; if (!data) return GN_ERR_INTERNALERROR; /* We don't know what this option number is, just handle it */ option_number_length = message[12]; /* Get message center length */ center_number_length = message[13 + option_number_length]; dprintf("SMS Message Center Data:\n"); dprintf(" Selected memory: 0x%02x\n", message[2]); dprintf(" Messages in Phone: 0x%02x Unread: 0x%02x\n", message[3], message[4]); dprintf(" Messages in SIM: 0x%02x Unread: 0x%02x\n", message[5], message[6]); dprintf(" Reply via own centre: 0x%02x (%s)\n", message[10], (message[10] == 0x02 ? "Yes" : "No")); dprintf(" Delivery reports: 0x%02x (%s)\n", message[11], (message[11] == 0x02 ? "Yes" : "No")); dprintf(" Messages sent as: 0x%02x\n", message[7]); dprintf(" Message validity: 0x%02x\n", message[9]); dprintf(" Unknown: 0x%02x\n", message[8]); dprintf(" UnknownNumber: "); for (count = 0; count < option_number_length; count ++) dprintf("%c", message[13 + count]); dprintf("\n"); dprintf(" Message center number: "); for (count = 0; count < center_number_length; count ++) { dprintf("%c", message[14 + option_number_length + count]); } dprintf("\n"); /* Get message center related info if upper layer wants to know */ if (data->message_center) { data->message_center->format = message[7]; data->message_center->validity = message[9]; if (center_number_length == 0) { data->message_center->smsc.number[0] = 0x00; /* Null terminate */ } else { memcpy(data->message_center->smsc.number, message + 14 + option_number_length, center_number_length); data->message_center->smsc.number[center_number_length] = '\0'; data->message_center->smsc.type = (data->message_center->smsc.number[0] == '+') ? GN_GSM_NUMBER_International : GN_GSM_NUMBER_Unknown; } /* 3810 series doesn't support Name or multiple center numbers so put in null data for them . */ data->message_center->name[0] = 0x00; data->message_center->id = 0; } /* Get SMS related info if upper layer wants to know */ if (data->sms_status) { data->sms_status->unread = message[4] + message[6]; data->sms_status->number = message[3] + message[5]; } /* Get memory info if upper layer wants to know */ if (data->memory_status) { switch (data->memory_status->memory_type) { case GN_MT_SM: data->memory_status->used = message[5]; data->memory_status->free = P3110_MEMORY_SIZE_SM - message[5]; break; case GN_MT_ME: data->memory_status->used = message[3]; data->memory_status->free = P3110_MEMORY_SIZE_ME - message[3]; break; default: break; } } return GN_ERR_NONE; } static gn_error P3110_IncomingPhonebookRead(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { int namelen, numberlen; if(!data->phonebook_entry) return GN_ERR_INTERNALERROR; switch (message[0]) { /* unfold message type */ case 0x46: dprintf("Phonebook read OK\n"); break; case 0x47: /* 0x74 is the only seen error code */ if (message[2] == 0x74) return GN_ERR_INVALIDLOCATION; else return GN_ERR_EMPTYLOCATION; default: return GN_ERR_INTERNALERROR; } /* empty locations are reported with empty name and number, so * check for that case here */ if (message[2] == 0x00 && message[3] == 0x00) return GN_ERR_EMPTYLOCATION; data->phonebook_entry->caller_group = 0; data->phonebook_entry->subentries_count = 0; namelen = message[2]; memcpy(data->phonebook_entry->name, message + 3, namelen); *(data->phonebook_entry->name + namelen) = '\0'; numberlen = message[3 + namelen]; memcpy(data->phonebook_entry->number, message + 3 + namelen + 1, numberlen); *(data->phonebook_entry->number + numberlen) = '\0'; return GN_ERR_NONE; } static gn_error P3110_IncomingPhonebookWrite(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { switch (message[0]) { /* unfold message type */ case 0x44: dprintf("Phonebook written OK\n"); return GN_ERR_NONE; case 0x45: dprintf("Phonebook write failed (0x%02x)\n", message[2]); switch(message[2]) { case 0x74: return GN_ERR_INVALIDLOCATION; case 0x66: return GN_ERR_ENTRYTOOLONG; default: return GN_ERR_UNKNOWN; } default: return GN_ERR_INTERNALERROR; } } /* 0x48 is sent during power-on of the phone, after the 0x13 message is received and the PIN (if any) has been entered correctly. */ static gn_error P3110_IncomingPINEntered(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { DRVINSTANCE(state)->sim_available = true; dprintf("PIN [possibly] entered.\n"); return GN_ERR_NONE; } /* 0x4b messages are sent by phone in response (it seems) to the keep alive packet. We must acknowledge these it seems by sending a response with the "sequence number" byte loaded appropriately. */ static gn_error P3110_IncomingStatusInfo(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { /* Strings for the status byte received from phone. */ char *StatusStr[] = { "Unknown", "Ready", "Interworking", "Call in progress", "No network access" }; /* There are three data bytes in the status message, two have been attributed to signal level, the third is presently unknown. Unknown byte has been observed to be 0x01 when connected to normal network, 0x04 when no network available. Steps through 0x02, 0x03 when incoming or outgoing calls occur...*/ /* Note: GetRFLevel function in fbus-3810.c does conversion into required units. */ if (data->rf_level) { *(data->rf_unit) = GN_RF_Arbitrary; *(data->rf_level) = message[3]; } /* Note: GetBatteryLevel function in fbus-3810.c does conversion into required units. */ if (data->battery_level) { *(data->battery_unit) = GN_BU_Arbitrary; *(data->battery_level) = message[4]; } /* Only output connection status byte now as the RF and Battery levels are displayed by the main gnokii code. */ dprintf("Status: %s, Battery level: %d, RF level: %d.\n", StatusStr[message[2]], message[4], message[3]); return GN_ERR_NONE; } /* 0x4d Message provides IMEI, Revision and Model information. */ static gn_error P3110_IncomingPhoneInfo(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { size_t imei_length, rev_length, model_length; imei_length = strlen(message + 2); rev_length = strlen(message + 3 + imei_length); model_length = strlen(message + 4 + imei_length + rev_length); if (data->imei) strcpy(data->imei, message + 2); if (data->revision) strcpy(data->revision, message + 3 + imei_length); if (data->model) strcpy(data->model, message + 4 + imei_length + rev_length); dprintf("Mobile Phone Identification:\n"); dprintf(" IMEI: %s\n", message + 2); dprintf(" Model: %s\n", message + 4 + imei_length + rev_length); dprintf(" Revision: %s\n", message + 3 + imei_length); return GN_ERR_NONE; } /* This function creates a header for sending or saving a SMS message. * If save_sms is true, a header for saving is created; if false, a * header for sending will be created instead. */ static int sms_header_encode(gn_data *data, struct gn_statemachine *state, unsigned char *req, int ulength, bool save_sms) { int pos = 0; unsigned char smsc[256], remote[256]; /* convert length units from decimal digit count to BCD byte count */ data->raw_sms->remote_number[0] = (data->raw_sms->remote_number[0] + 1) / 2 + 1; /* SMSC and remote number are in BCD format, but the phone wants them * in plain ASCII, so we have to convert. */ snprintf(smsc, sizeof(smsc), "%s", char_bcd_number_get(data->raw_sms->message_center)); snprintf(remote, sizeof(remote), "%s", char_bcd_number_get(data->raw_sms->remote_number)); dprintf("smsc:'%s' remote:'%s'\n", smsc, remote); if (save_sms) { /* make header for saving SMS */ req[pos++] = get_memory_type(data->raw_sms->memory_type); req[pos++] = data->raw_sms->status; req[pos++] = 0x01; /* status byte for "saved SMS" */ } else { /* make header for sending SMS */ /* the magic "first octet" specifying flags */ if (data->raw_sms->type != GN_SMS_MT_Deliver) req[pos] = 0x01; /* SMS Submit */ else req[pos] = 0x00; /* SMS Deliver */ if (data->raw_sms->reply_via_same_smsc) req[pos] |= 0x80; if (data->raw_sms->reject_duplicates) req[pos] |= 0x04; if (data->raw_sms->report) req[pos] |= 0x20; if (data->raw_sms->udh_indicator) req[pos] |= 0x40; if (data->raw_sms->type != GN_SMS_MT_Deliver) { switch (data->raw_sms->validity_indicator) { case GN_SMS_VP_None: default: break; case GN_SMS_VP_RelativeFormat: req[pos] |= 0x10; break; case GN_SMS_VP_AbsoluteFormat: req[pos] |= 0x18; break; case GN_SMS_VP_EnhancedFormat: req[pos] |= 0x08; break; } } dprintf("First Octet: %02x\n", req[pos]); pos++; } req[pos++] = data->raw_sms->pid; req[pos++] = data->raw_sms->dcs; /* The following 7 bytes define validity for SMSs to be sent. * When saving they are apparently ignored - or somehow incorporated * into the garbage you get in the date bytes when you read a saved * SMS. So we'll just put validity in here now. */ memcpy(req + pos, data->raw_sms->validity, 7); pos += 7; req[pos++] = ulength; /* user data length */ /* The SMSC and remote number are not particularly relevant for * saving SMSs, but there's a place for them in the request, so * we'll put them there. The phone ignores them or at least doesn't * return them when reading the message. */ req[pos++] = strlen(smsc); memcpy(req + pos, smsc, strlen(smsc)); pos += strlen(smsc); req[pos++] = strlen(remote); memcpy(req + pos, remote, strlen(remote)); pos += strlen(remote); /* For some reason, the header for saving SMSs has a byte for the * remote number type, according to Docs/protocol/nk3110.txt * Sent SMS messages don't. */ if (save_sms) req[pos++] = data->raw_sms->remote_number[1]; /* number type */ return pos; /* length of encoded header is returned */ } static int get_memory_type(gn_memory_type memory_type) { int result; switch (memory_type) { case GN_MT_CB: result = 0x01; break; case GN_MT_SM: result = 0x02; break; case GN_MT_ME: result = 0x03; break; case GN_MT_ON: result = 0x04; break; default: result = 0; break; /* error code */ } return result; } gnokii-0.6.31/common/phones/fake.c0000644000175000017500000003730511666163120015051 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2002 Pavel Machek Copyright (C) 2002-2011 Pawel Kot This file provides functions for some functionality testing (eg. SMS) */ #include "config.h" #include "compat.h" #include "misc.h" #include "gnokii.h" #include "phones/generic.h" #include "gnokii-internal.h" #include "phones/atgen.h" /* Some globals */ static gn_error fake_functions(gn_operation op, gn_data *data, struct gn_statemachine *state); gn_driver driver_fake = { NULL, pgen_incoming_default, /* Mobile phone information */ { "fake", /* Supported models */ 7, /* Max RF Level */ 0, /* Min RF Level */ GN_RF_Percentage, /* RF level units */ 7, /* Max Battery Level */ 0, /* Min Battery Level */ GN_BU_Percentage, /* Battery level units */ GN_DT_DateTime, /* Have date/time support */ GN_DT_TimeOnly, /* Alarm supports time only */ 1, /* Alarms available - FIXME */ 60, 96, /* Startup logo size - 7110 is fixed at init */ 21, 78, /* Op logo size */ 14, 72 /* Caller logo size */ }, fake_functions, NULL }; #if __STDC_VERSION__ >= 199901L #define HAVE_FAKE_PHONEBOOK 1 gn_phonebook_entry fake_phonebook[] = { { .location = 1, .empty = false, .name = "Test 1", .number = "1111", .subentries_count = 0 }, { .location = 2, .empty = false, .name = "Test 2", .number = "2222", .subentries_count = 0 }, { .location = 3, .empty = true }, { .location = 4, .empty = false, .name = "Test 4", .number = "4444", .subentries_count = 0 }, }; #endif /* Initialise is the only function allowed to 'use' state */ static gn_error fake_initialise(struct gn_statemachine *state) { gn_data data; char model[GN_MODEL_MAX_LENGTH+1]; dprintf("Initializing...\n"); /* Copy in the phone info */ memcpy(&(state->driver), &driver_fake, sizeof(gn_driver)); dprintf("Connecting\n"); /* Now test the link and get the model */ gn_data_clear(&data); data.model = model; return GN_ERR_NONE; } static gn_error fake_identify(gn_data *data, struct gn_statemachine *state) { fprintf(stderr, _("Apparently you didn't configure gnokii. Please do it prior to using it.\n" "You can get some clues from comments included in sample config file or give\n" "a try with gnokii-configure utility included in gnokii distribution.\n")); return GN_ERR_NONE; } static gn_error at_sms_write(gn_data *data, struct gn_statemachine *state, char* cmd) { unsigned char req[10240], req2[5120]; int length, tmp, offset = 0; if (!data->raw_sms) return GN_ERR_INTERNALERROR; /* Do not fill message center so we don't have to emulate that */ req2[offset] = 0; offset += 0; req2[offset + 1] = 0x01 | 0x10; /* Validity period in relative format */ if (data->raw_sms->reject_duplicates) req2[offset + 1] |= 0x04; if (data->raw_sms->report) req2[offset + 1] |= 0x20; if (data->raw_sms->udh_indicator) req2[offset + 1] |= 0x40; if (data->raw_sms->reply_via_same_smsc) req2[offset + 1] |= 0x80; req2[offset + 2] = 0x00; /* Message Reference */ tmp = data->raw_sms->remote_number[0]; if (tmp % 2) tmp++; tmp /= 2; memcpy(req2 + offset + 3, data->raw_sms->remote_number, tmp + 2); offset += tmp + 1; req2[offset + 4] = data->raw_sms->pid; req2[offset + 5] = data->raw_sms->dcs; req2[offset + 6] = 0x00; /* Validity period */ req2[offset + 7] = data->raw_sms->length; memcpy(req2 + offset + 8, data->raw_sms->user_data, data->raw_sms->user_data_length); length = data->raw_sms->user_data_length + offset + 8; /* Length in AT mode is the length of the full message minus SMSC field length */ fprintf(stdout, "AT+%s=%d\n", cmd, length - 1); bin2hex(req, req2, length); req[length * 2] = 0x1a; req[length * 2 + 1] = 0; fprintf(stdout, "%s\n", req); /* Generate reference number (use a constant to match output from testsuite) */ data->raw_sms->reference = 1; return GN_ERR_NONE; } static char *sms_inbox[] = { /* SMS-DELIVER */ /* From: gnokii */ /* Text: Configure gnokii prior to using it. You can get some clues from comments included in sample config file or try with gnokii-configure from utils dir. */ "0791214365870921240BD067F77B9D4E0300009011800000004094C3B7DB9C3ED7E565D0D9FD5EA7D320B83CFD9683E86F507D9E769F4169BA0B947DD741E3B01B742ED341F377BB0C1AB3EBE539C82C7FB741E377BB5D76D3E7A0B47BCCAE93CB6450DA0D9A87DB707619347EBBCDE933C89C6697416F39882ECF83EE693A1A7476BFD7E9746BFC769BD3E7BABC0C32CBDF6D509D9E66CF41E4B4DC05", /* SMS-DELIVER */ /* Text: Hello! vowels àèìòù euro € */ "0791214365870921240B919999999999F90000902072129025401BC8329BFD0E81ECEF7B993D07FD0907840154AECBDFA04D19", /* SMS-DELIVER */ /* Text: € */ "0791214365870921240B919999999999F9000090907000920480029B32", /* SMS-STATUS-REPORT */ /* Status: delivered */ "07914366999999F906CD098186666666F89080709002818090807002336080009FD6E494", /* SMS-DELIVER */ /* Linked (1/2) */ /* Text: 1234567890ABCDEFGHIJKLMNOPQRTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRTUV */ "07918406010013F0400B918405000000F0000011209151335140A0050003C5020163B219AD66BBE172B0A070482C1A8FC8A472C96C3A9FD0A8945AB55EB1596D583C2697CD67745ABD66B7DD6F785C3EA7D7ED777C5E1F93CD6835DB0D978305854362D1784426954B66D3F98446A5D4AAF58ACD6AC3E231B96C3EA3D3EA35BBED7EC3E3F239BD6EBFE3F3FA986C46ABD96EB81C2C281C128BC62332A95C329BCE27342AA556AD", /* SMS-DELIVER */ /* Linked (2/2) */ /* Text: WXYZabcdefghijklmnopqrstuvwxyz */ "07918406010013F0440B918405000000F000001120915133714025050003C50202AFD8AC362C1E93CBE6333AAD5EB3DBEE373C2E9FD3EBF63B3EAF07" }; static gn_error at_sms_get_generic(gn_data *data, struct gn_statemachine *state, char *sms) { gn_error e; int len = strlen(sms) / 2; char *tmp = calloc(len, 1); if (!tmp) return GN_ERR_FAILED; hex2bin(tmp, sms, len); e = gn_sms_pdu2raw(data->raw_sms, tmp, len, GN_SMS_PDU_DEFAULT); free(tmp); return e; } static gn_error at_sms_get_static(gn_data *data, struct gn_statemachine *state, int position) { if (position < 1 || position > sizeof(sms_inbox)/sizeof(char *)) return GN_ERR_INVALIDLOCATION; if (!sms_inbox[position - 1]) return GN_ERR_EMPTYLOCATION; return at_sms_get_generic(data, state, sms_inbox[position - 1]); } static int at_sms_get_status_static(gn_data *data, struct gn_statemachine *state) { int i, count = 0; for (i = 0; i < sizeof(sms_inbox)/sizeof(char *); i++) if (sms_inbox[i]) count++; return count; } static gn_error at_sms_delete_static(gn_data *data, struct gn_statemachine *state, int position) { if (position < 1 || position > sizeof(sms_inbox)/sizeof(char *)) return GN_ERR_INVALIDLOCATION; if (!sms_inbox[position - 1]) return GN_ERR_EMPTYLOCATION; sms_inbox[position - 1] = NULL; return GN_ERR_NONE; } #ifndef WIN32 #define MAX_PATH_LEN 256 static gn_error at_sms_get_from_file(gn_data *data, struct gn_statemachine *state, int position, DIR *d, const char *dirpath) { gn_error e = GN_ERR_EMPTYLOCATION; int i, offset, size = 256; struct dirent *dent; FILE *f; char *sms_text; struct stat buf; char path[MAX_PATH_LEN]; /* Put an arbitrary limit to quit early from gnokii --getsms 1 end */ if (position < 1 || position > 100) return GN_ERR_INVALIDLOCATION; /* iterate to Nth position */ for (i = 0; i < position; i++) { dent = readdir(d); if (dent) { snprintf(path, MAX_PATH_LEN, "%s/%s", dirpath, dent->d_name); stat(path, &buf); if (!S_ISREG(buf.st_mode)) i--; } else goto out; } f = fopen(path, "r"); if (!f) { e = GN_ERR_INTERNALERROR; goto out; } sms_text = calloc(size, sizeof(char)); offset = 0; while (fgets(sms_text + offset, size, f)) { char *aux; offset += size - 1; aux = realloc(sms_text, offset + size); if (aux) sms_text = aux; else { dprintf("Failed to allocate memory\n"); e = GN_ERR_INTERNALERROR; goto err; } } e = at_sms_get_generic(data, state, sms_text); err: free(sms_text); fclose(f); out: closedir(d); return e; } static gn_error at_sms_delete_from_file(gn_data *data, struct gn_statemachine *state, int position, DIR *d, const char *dirpath) { gn_error e = GN_ERR_NONE; int i; struct dirent *dent; struct stat buf; char path[MAX_PATH_LEN]; /* Put an arbitrary limit to quit early from gnokii --deletesms 1 end */ if (position < 1 || position > 100) return GN_ERR_INVALIDLOCATION; /* iterate to Nth position */ for (i = 0; i < position; i++) { dent = readdir(d); if (dent) { snprintf(path, MAX_PATH_LEN, "%s/%s", dirpath, dent->d_name); stat(path, &buf); if (!S_ISREG(buf.st_mode)) i--; } else goto out; } if (unlink(path)) e = GN_ERR_FAILED; out: closedir(d); return e; } #endif #ifdef WIN32 static gn_error at_sms_get(gn_data *data, struct gn_statemachine *state) { int position; if (!data || !data->raw_sms) return GN_ERR_INTERNALERROR; position = data->raw_sms->number; return at_sms_get_static(data, state, position); } static gn_error at_sms_delete(gn_data *data, struct gn_statemachine *state) { int position; if (!data || !data->raw_sms) return GN_ERR_INTERNALERROR; position = data->raw_sms->number; return at_sms_delete_static(data, state, position); } static gn_error at_sms_get_sms_status(gn_data *data, struct gn_statemachine *state) { if (!data || !data->sms_status) return GN_ERR_INTERNALERROR; data->sms_status->number = 0; data->sms_status->unread = 0; data->sms_status->changed = 0; data->sms_status->folders_count = 0; return GN_ERR_NONE; } #else static gn_error at_sms_get(gn_data *data, struct gn_statemachine *state) { gn_error e = GN_ERR_NONE; const char *path; DIR *d; int position; if (!data || !data->raw_sms) { e = GN_ERR_INTERNALERROR; goto out; } position = data->raw_sms->number; path = gn_lib_cfg_get("fake_driver", "sms_inbox"); if (!path || (d = opendir(path)) == NULL) e = at_sms_get_static(data, state, position); else e = at_sms_get_from_file(data, state, position, d, path); out: return e; } static int count_files(DIR *d, const char *dirpath) { int i = 0; struct dirent *dent; struct stat buf; char path[MAX_PATH_LEN]; while ((dent = readdir(d)) != NULL) { snprintf(path, MAX_PATH_LEN, "%s/%s", dirpath, dent->d_name); if (!stat(path, &buf) && S_ISREG(buf.st_mode)) i++; } return i; } static gn_error at_sms_get_sms_status(gn_data *data, struct gn_statemachine *state) { DIR *d; const char *path; if (!data || !data->sms_status) return GN_ERR_INTERNALERROR; data->sms_status->number = 0; data->sms_status->unread = 0; data->sms_status->changed = 0; data->sms_status->folders_count = 0; path = gn_lib_cfg_get("fake_driver", "sms_inbox"); if (!path || (d = opendir(path)) == NULL) { data->sms_status->number = data->sms_status->unread = at_sms_get_status_static(data, state); } else { data->sms_status->number = data->sms_status->unread = count_files(d, path); closedir(d); } return GN_ERR_NONE; } static gn_error at_sms_delete(gn_data *data, struct gn_statemachine *state) { gn_error e = GN_ERR_NONE; const char *path; DIR *d; int position; if (!data || !data->raw_sms) { e = GN_ERR_INTERNALERROR; goto out; } position = data->raw_sms->number; path = gn_lib_cfg_get("fake_driver", "sms_inbox"); if (!path || (d = opendir(path)) == NULL) e = at_sms_delete_static(data, state, position); else e = at_sms_delete_from_file(data, state, position, d, path); out: return e; } #endif static gn_error at_get_model(gn_data *data, struct gn_statemachine *state) { if (!data) return GN_ERR_INTERNALERROR; snprintf(data->model, GN_MODEL_MAX_LENGTH, "%s", "fake"); return GN_ERR_NONE; } size_t fake_encode(at_charset charset, char *dst, size_t dst_len, const char *src, size_t len) { size_t ret; switch (charset) { case AT_CHAR_GSM: ret = char_ascii_encode(dst, dst_len, src, len); break; case AT_CHAR_HEXGSM: ret = char_hex_encode(dst, dst_len, src, len); break; case AT_CHAR_UCS2: ret = char_ucs2_encode(dst, dst_len, src, len); break; default: memcpy(dst, src, dst_len >= len ? len : dst_len); ret = len; break; } if (ret < dst_len) dst[ret] = '\0'; return ret+1; } static gn_error fake_phonebookstatus(gn_data *data, struct gn_statemachine *state) { #if defined (HAVE_FAKE_PHONEBOOK) int location, used, free; for (location = 0, used = 0, free = 0; location < sizeof(fake_phonebook) / sizeof(gn_phonebook_entry); location++) { if (fake_phonebook[location].empty) free++; else used++; } data->memory_status->used = used; data->memory_status->free = free; return GN_ERR_NONE; #else return GN_ERR_NOTIMPLEMENTED; #endif } static gn_error fake_writephonebook(gn_data *data, struct gn_statemachine *state) { int len, ofs; char req[256], *tmp; char number[64]; memset(number, 0, sizeof(number)); #if 1 fake_encode(AT_CHAR_UCS2, number, sizeof(number), data->phonebook_entry->number, strlen(data->phonebook_entry->number)); #else strncpy(number, data->phonebook_entry->number, sizeof(number)); #endif ofs = snprintf(req, sizeof(req), "AT+CPBW=%d,\"%s\",%s,\"", data->phonebook_entry->location, number, data->phonebook_entry->number[0] == '+' ? "145" : "129"); tmp = req + ofs; len = fake_encode(AT_CHAR_UCS2, tmp, sizeof(req) - ofs - 3, data->phonebook_entry->name, strlen(data->phonebook_entry->name)); tmp[len-1] = '"'; tmp[len++] = '\r'; tmp[len] = '\0'; dprintf("%s\n", req); return GN_ERR_NONE; } static gn_error fake_readphonebook(gn_data *data, struct gn_statemachine *state) { #if defined (HAVE_FAKE_PHONEBOOK) gn_phonebook_entry *pe = data->phonebook_entry; if (pe->location < 1 || pe->location > sizeof(fake_phonebook) / sizeof(gn_phonebook_entry)) return GN_ERR_INVALIDLOCATION; if (fake_phonebook[pe->location - 1].empty) #if 1 /* This is to emulate those phones that return error for empty locations */ return GN_ERR_INVALIDLOCATION; #else return GN_ERR_EMPTYLOCATION; #endif memcpy(pe, &fake_phonebook[pe->location - 1], sizeof(gn_phonebook_entry)); return GN_ERR_NONE; #else return GN_ERR_NOTIMPLEMENTED; #endif } static gn_error fake_functions(gn_operation op, gn_data *data, struct gn_statemachine *state) { switch (op) { case GN_OP_Init: return fake_initialise(state); case GN_OP_Identify: return fake_identify(data, state); case GN_OP_Terminate: return GN_ERR_NONE; case GN_OP_SaveSMS: return at_sms_write(data, state, "CMGW"); case GN_OP_SendSMS: return at_sms_write(data, state, "CMGS"); case GN_OP_GetSMS: return at_sms_get(data, state); case GN_OP_DeleteSMS: return at_sms_delete(data, state); case GN_OP_GetSMSCenter: snprintf(data->message_center->smsc.number, sizeof(data->message_center->smsc.number), "%s", "12345"); return GN_ERR_NONE; case GN_OP_GetModel: return at_get_model(data, state); case GN_OP_GetSMSStatus: return at_sms_get_sms_status(data, state); case GN_OP_GetMemoryStatus: return fake_phonebookstatus(data, state); case GN_OP_ReadPhonebook: return fake_readphonebook(data, state); case GN_OP_WritePhonebook: return fake_writephonebook(data, state); default: return GN_ERR_NOTIMPLEMENTED; } return GN_ERR_INTERNALERROR; } gnokii-0.6.31/common/phones/atsag.c0000644000175000017500000000367511666163120015245 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2008 Pawel Kot This file provides functions specific to at commands on Sagem phones. See README for more details on supported mobile phones. */ #include "config.h" #include #include #include #include "compat.h" #include "misc.h" #include "gnokii.h" #include "phones/generic.h" #include "phones/atgen.h" #include "phones/atsag.h" static gn_error AT_GetModel(gn_data *data, struct gn_statemachine *state) { /* Sagem myW-8 replies to "AT+GMM" with "+CGMM: myW-7 UMTS" and to "AT+CGMM" with "+CGMM: myW-8 UMTS" so don't use the first command that gives the wrong answer and isn't correctly handled by ReplyIdentify() in atgen.c because of the mismatch AT+GMM / +CGMM */ if (sm_message_send(8, GN_OP_Identify, "AT+CGMM\r", state)) return GN_ERR_NOTREADY; return sm_block_no_retry(GN_OP_Identify, data, state); } void at_sagem_init(char* foundmodel, char* setupmodel, struct gn_statemachine *state) { AT_DRVINST(state)->lac_swapped = 1; AT_DRVINST(state)->encode_number = 1; /* fix for Sagem myW-8 returning the wrong answer to GN_OP_GetModel */ at_insert_send_function(GN_OP_GetModel, AT_GetModel, state); } gnokii-0.6.31/common/phones/pcsc.c0000644000175000017500000014052211666163120015067 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2007-2008 Daniele Forsi This file provides functions for accessing PC/SC SIM smart cards. Where not otherwise noted the document referenced is ETSI TS 100 977 V8.13.0 (2005-06). */ #include "config.h" #ifdef HAVE_PCSC #include "phones/pcsc.h" /* prototypes for functions related to libgnokii */ static gn_error GetFile(gn_data *data, struct gn_statemachine *state); static gn_error GetMemoryStatus(gn_data *data, struct gn_statemachine *state); static gn_error GetNetworkInfo(gn_data *data, struct gn_statemachine *state); static gn_error GetSMSCenter(gn_data *data, struct gn_statemachine *state); static gn_error GetSMSFolders(gn_data *data, struct gn_statemachine *state); static gn_error GetSMSFolderStatus(gn_data *data, struct gn_statemachine *state); static gn_error GetSMSMessage(gn_data *data, struct gn_statemachine *state); static gn_error GetSMSStatus(gn_data *data, struct gn_statemachine *state); static gn_error DeleteSMSMessage(gn_data *data, struct gn_statemachine *state); static gn_error Identify(gn_data *data, struct gn_statemachine *state); static gn_error Initialise(struct gn_statemachine *state); static gn_error ReadPhonebook(gn_data *data, struct gn_statemachine *state); static gn_error DeletePhonebook(gn_data *data, struct gn_statemachine *state); static gn_error Terminate(gn_data *data, struct gn_statemachine *state); #ifdef SECURITY static gn_error GetSecurityCodeStatus(gn_data *data, struct gn_statemachine *state); static gn_error EnterSecurityCode(gn_data *data, struct gn_statemachine *state); #endif static gn_error functions(gn_operation op, gn_data *data, struct gn_statemachine *state); /* prototypes for functions related to libpcsclite */ static LONG pcsc_change_dir(PCSC_IOSTRUCT *ios, LONG directory_id); static LONG pcsc_close_reader(); static LONG pcsc_cmd_get_response(PCSC_IOSTRUCT *ios, BYTE length); static LONG pcsc_cmd_read_binary(PCSC_IOSTRUCT *ios, LONG length); static LONG pcsc_cmd_read_record(PCSC_IOSTRUCT *ios, BYTE record, BYTE length); static LONG pcsc_cmd_update_record(PCSC_IOSTRUCT *ios, BYTE record, BYTE *data, BYTE length); static LONG pcsc_cmd_select(PCSC_IOSTRUCT *ios, LONG file_id); static LONG pcsc_file_get_contents(PCSC_IOSTRUCT *ios, LONG file_id); static LONG pcsc_open_reader_name(LPCSTR reader_name); static LONG pcsc_open_reader_number(LONG number); static LONG pcsc_read_file(PCSC_IOSTRUCT *ios, LONG dir_id, LONG file_id); static LONG pcsc_read_file_record(PCSC_IOSTRUCT *ios, LONG file_id, BYTE record); static LONG pcsc_stat_file(PCSC_IOSTRUCT *ios, LONG file_id); static LONG pcsc_update_file_record(PCSC_IOSTRUCT *ios, LONG file_id, BYTE record, BYTE *data, BYTE length); #ifdef SECURITY static LONG pcsc_verify_chv(PCSC_IOSTRUCT *ios, BYTE chv_id, BYTE *chv, BYTE chv_len); #endif /* prototypes for functions converting between the two libraries */ static gn_error get_gn_error(PCSC_IOSTRUCT *ios, LONG ret); static LONG get_memory_type(gn_memory_type memory_type); static gn_error ios2gn_error(PCSC_IOSTRUCT *ios); /* higher level functions */ static gn_error get_iccid(char *result); static gn_error get_imsi(char *result); static gn_error get_mnc_len(int *len); static gn_error get_phase(const char **phase); /* Some globals */ gn_driver driver_pcsc = { NULL, pgen_incoming_default, /* Mobile phone information */ { "pcsc|APDU", /* Supported models */ 5, /* Unused */ /* Max RF Level */ 0, /* Unused */ /* Min RF Level */ GN_RF_Percentage, /* Unused */ /* RF level units */ 100, /* Unused */ /* Max Battery Level */ 0, /* Unused */ /* Min Battery Level */ GN_BU_Percentage, /* Unused */ /* Battery level units */ GN_DT_None, /* Unused */ /* Have date/time support */ GN_DT_None, /* Unused */ /* Alarm supports time only */ 0, /* Unused */ /* Alarms available */ 60, 96, /* Unused */ /* Startup logo size */ 21, 78, /* Unused */ /* Op logo size */ 14, 72 /* Unused */ /* Caller logo size */ }, functions, NULL }; SCARDCONTEXT hContext; SCARDHANDLE hCard; DWORD dwActiveProtocol; SCARD_IO_REQUEST *pioSendPci, pioRecvPci; BYTE buf[MAX_BUFFER_SIZE]; PCSC_IOSTRUCT IoStruct = { buf, sizeof(buf), 0, 0 }; #ifdef DEBUG #define DUMP_BUFFER(ret, str, buf, len) pcsc_dump_buffer(ret, (char *) __FUNCTION__, str, buf, len) void pcsc_dump_buffer(LONG ret, const char *func, const char *str, BYTE *buf, LONG len) { if (ret != SCARD_S_SUCCESS) { dump("%s: %s (0x%lX)\n", func, pcsc_stringify_error(ret), ret); } else { dump("%s", str); sm_message_dump(gn_elog_write, 0, buf, len); } } #else #define DUMP_BUFFER(a, b, c, d) do { } while (0) #endif #define PCSC_TRANSMIT_WITH_LENGTH(ret, string, pbSendBuffer, bSendLength, ios) \ DUMP_BUFFER(ret, "Sending " string ": ", pbSendBuffer, bSendLength); \ ret = SCardTransmit(hCard, pioSendPci, pbSendBuffer, bSendLength, &pioRecvPci, ios->pbRecvBuffer, &ios->dwReceived); \ DUMP_BUFFER(ret, "Received: ", ios->pbRecvBuffer, ios->dwReceived); #define PCSC_TRANSMIT(ret, string, pbSendBuffer, ios) \ PCSC_TRANSMIT_WITH_LENGTH(ret, string, pbSendBuffer, sizeof(pbSendBuffer), ios) /* helper functions */ static gn_error ios2gn_error(PCSC_IOSTRUCT *ios) { /* Convert a card status condition code into a libgnokii error code */ if (!ios || ios->dwReceived < 2) return GN_ERR_NONE; /* check for a "soft" error */ switch (ios->pbRecvBuffer[ios->dwReceived - 2]) { /* 9.4.1 Responses to commands which are correctly executed */ case 0x90: /* "normal ending of command" */ case 0x91: /* "normal ending of command, with extra information" */ case 0x9E: /* "SW2 is the length of response data" (SIM data donwload error) */ case 0x9F: /* "SW2 is the length of response data" */ return GN_ERR_NONE; case 0x92: /* 9.4.3 Memory management */ if (ios->pbRecvBuffer[ios->dwReceived - 1] < 16) { dprintf("WARNING: command succeded after %d retries\n", ios->pbRecvBuffer[ios->dwReceived - 1]); return GN_ERR_NONE; } else { return GN_ERR_FAILED; } case 0x94: /* Subclause 9.4.4 Referencing management */ switch (ios->pbRecvBuffer[ios->dwReceived - 1]) { case 0x02: /* out of range (invalid address) */ return GN_ERR_INVALIDLOCATION; case 0x04: /* file ID (or pattern) not found */ return GN_ERR_INVALIDMEMORYTYPE; } case 0x98: /* Subclause 9.4.5 Security management */ dprintf("ERROR: PIN/PUK failure code 0x%02x\n", ios->pbRecvBuffer[ios->dwReceived - 1]); return GN_ERR_CODEREQUIRED; default: return GN_ERR_UNKNOWN; } } static gn_error get_gn_error(PCSC_IOSTRUCT *ios, LONG ret) { /* Convert a libpcsclite error code into a libgnokii error code */ switch (ret) { case SCARD_S_SUCCESS: return ios2gn_error(ios); case SCARD_F_INTERNAL_ERROR: return GN_ERR_INTERNALERROR; case SCARD_E_NOT_READY: return GN_ERR_NOTREADY; case SCARD_E_NO_SMARTCARD: case SCARD_W_UNSUPPORTED_CARD: case SCARD_W_UNRESPONSIVE_CARD: case SCARD_W_UNPOWERED_CARD: case SCARD_W_RESET_CARD: case SCARD_W_REMOVED_CARD: return GN_ERR_SIMPROBLEM; case SCARD_E_NO_MEMORY: return GN_ERR_MEMORYFULL; case SCARD_F_WAITED_TOO_LONG: case SCARD_E_TIMEOUT: return GN_ERR_TIMEOUT; case SCARD_E_READER_UNAVAILABLE: case SCARD_E_READER_UNSUPPORTED: case SCARD_E_NO_SERVICE: case SCARD_E_SERVICE_STOPPED: case SCARD_E_UNKNOWN_READER: return GN_ERR_NOLINK; default: return GN_ERR_UNKNOWN; } } static LONG get_memory_type(gn_memory_type memory_type) { /* Convert a libgnokii memory_type into a GSM file ID */ switch (memory_type) { case GN_MT_SM: return GN_PCSC_FILE_EF_ADN; case GN_MT_EN: return GN_PCSC_FILE_EF_ECC; case GN_MT_FD: return GN_PCSC_FILE_EF_FDN; case GN_MT_LD: return GN_PCSC_FILE_EF_LND; case GN_MT_ON: return GN_PCSC_FILE_EF_MSISDN; case GN_MT_SD: return GN_PCSC_FILE_EF_SDN; case GN_MT_BD: return GN_PCSC_FILE_EF_BDN; default: return GN_PCSC_FILE_UNKNOWN; } } static size_t alpha_tag_strlen(BYTE *buf, size_t max_length) { /* Calculate length of an "alpha tag" (ie the text associated to a phone number) according to subclause 10.5.1 and Annex B */ size_t alpha_length; switch (*buf) { case 0x80: /* UCS2 alphabet */ buf++; /* skip 0x80 */ alpha_length = 0; while ((*buf++ != 0xff) && (alpha_length < max_length)) { alpha_length++; } break; case 0x81: case 0x82: /* UCS2 alphabet with different coding schemes */ if (buf[1] > max_length) { alpha_length = max_length; } else { alpha_length = buf[1]; } break; default: /* GSM Default Alphabet */ alpha_length = 0; while ((*buf++ != 0xff) && (alpha_length < max_length)) { alpha_length++; } } return alpha_length; } static void alpha_tag_decode(BYTE *dest, BYTE *buf, size_t alpha_length) { /* Handle decoding according to Annex B */ BYTE *temp; int i, ucs2_base; switch (*buf) { case 0x80: /* UCS2 alphabet */ buf++; char_unicode_decode(dest, buf, alpha_length * 2); break; case 0x81: case 0x82: /* UCS2 alphabet mixed with GSM Default Alphabet */ if (*buf == 0x81) { ucs2_base = *(buf+2) << 7; buf += 3; } else { ucs2_base = (*(buf+2) << 8) + *(buf+3); buf += 4; } dprintf("ucs2_base = 0x%04x\n", ucs2_base); temp = (BYTE *) malloc(alpha_length * 2); if (!temp) { dest[0] = '\0'; return; } /* Convert to pure UCS2 data in a temporary buffer to use existing libgnokii function */ for (i = 0; i < alpha_length; i++, buf++) { if (*buf & 0x80) { /* UCS2 alphabet */ dprintf("ucs2 = 0x%04x\n", ucs2_base + (*buf & 0x7f)); temp[i * 2] = ((ucs2_base + (*buf & 0x7f)) >> 8) & 0xff; temp[i * 2 + 1] = (ucs2_base + (*buf & 0x7f)) & 0xff; } else { /* GSM Default Alphabet */ dprintf("GSM = 0x%02x\n", *buf & 0x7f); temp[i * 2] = 0; temp[i * 2 + 1] = char_def_alphabet_decode(*buf & 0x7f); } } char_unicode_decode(dest, temp, alpha_length * 2); free(temp); break; default: /* GSM Default Alphabet */ i = 0; while ((*buf != 0xff) && (i < alpha_length)) { dest[i++] = char_def_alphabet_decode(*buf++); } dest[i] = '\0'; } } /* higher level functions */ /* read ICCID and convert it into an ASCII string in the provided buffer (at least GN_PCSC_ICCID_MAX_LENGTH bytes long) */ static gn_error get_iccid(char *result) { LONG ret; LONG result_len; BYTE *buf; gn_error error; ret = pcsc_read_file(&IoStruct, GN_PCSC_FILE_MF, GN_PCSC_FILE_EF_ICCID); error = get_gn_error(&IoStruct, ret); if (error != GN_ERR_NONE) return error; /* Convert into ASCII digits */ result_len = (GN_PCSC_ICCID_MAX_LENGTH - 1) / 2; buf = IoStruct.pbRecvBuffer; /* Note: the following ignores the exceptions for some Phase 1 SIM cards (see subclause 10.1.1) */ while (result_len--) { if ((*buf & 0xf) == 0xf) break; *result++ = (*buf & 0xf) + '0'; if ((*buf & 0xf0) == 0xf0) break; *result++ = ((*buf & 0xf0) >> 4) + '0'; buf++; } *result = '\0'; return error; } /* sets *len to the number of MNC digits in IMSI from Administrative Data (subclause 10.3.18) *len is unchanged in case of error */ static gn_error get_mnc_len(int *len) { LONG ret; gn_error error; ret = pcsc_read_file(&IoStruct, GN_PCSC_FILE_DF_GSM, GN_PCSC_FILE_EF_AD); error = get_gn_error(&IoStruct, ret); if (error != GN_ERR_NONE) return error; /* add 2 because dwRecvLength contains SW */ if (IoStruct.dwReceived >= 4 + 2) { *len = IoStruct.pbRecvBuffer[3]; } return error; } /* read IMSI and convert it into an ASCII string in the provided buffer (at least GN_PCSC_IMSI_MAX_LENGTH bytes long) */ static gn_error get_imsi(char *result) { LONG ret; LONG result_len; BYTE *buf; gn_error error; ret = pcsc_read_file(&IoStruct, GN_PCSC_FILE_DF_GSM, GN_PCSC_FILE_EF_IMSI); error = get_gn_error(&IoStruct, ret); if (error != GN_ERR_NONE) return error; /* Convert IMSI into ASCII digits (ETSI TS 100 940 V7.21.0 (2003-12) only talks about MCC and MNC parts) */ result_len = IoStruct.pbRecvBuffer[0]; buf = IoStruct.pbRecvBuffer + 1; /* ignore lower nibble of first octet because it is a bit field */ *result++ = ((*buf & 0xf0) >> 4) + '0'; while (--result_len) { buf++; *result++ = (*buf & 0xf) + '0'; *result++ = ((*buf & 0xf0) >> 4) + '0'; } *result = '\0'; return error; } /* sets *phase to a string representing Phase Identification of the SIM (subclause 10.3.19) or leaves it unchanged in case of error phase can be "1", "2" or "2+" */ static gn_error get_phase(const char **phase) { LONG ret; gn_error error; ret = pcsc_read_file(&IoStruct, GN_PCSC_FILE_DF_GSM, GN_PCSC_FILE_EF_PHASE); error = get_gn_error(&IoStruct, ret); if (error != GN_ERR_NONE) return error; /* add 2 because dwRecvLength contains SW */ if (IoStruct.dwReceived >= 1 + 2) { switch (IoStruct.pbRecvBuffer[0]) { case 1: *phase = "1"; break; case 2: *phase = "2"; break; case 3: *phase = "2+"; break; default: dprintf("Unknown Phase Identification 0x%02x\n", IoStruct.pbRecvBuffer[0]); } } return error; } /* read SPN and convert it into an ASCII string in the provided buffer (at least GN_PCSC_SPN_MAX_LENGTH bytes long) according to subclause 10.3.11 and Annex B */ static gn_error get_spn(char *result) { LONG ret; BYTE *buf; gn_error error; ret = pcsc_read_file(&IoStruct, GN_PCSC_FILE_DF_GSM, GN_PCSC_FILE_EF_SPN); error = get_gn_error(&IoStruct, ret); if (error != GN_ERR_NONE) return error; /* Skip first byte (it's a bit field) */ buf = IoStruct.pbRecvBuffer + 1; alpha_tag_decode(result, buf, GN_PCSC_SPN_MAX_LENGTH); return GN_ERR_NONE; } /* functions for libgnokii stuff */ static gn_error functions(gn_operation op, gn_data *data, struct gn_statemachine *state) { switch (op) { case GN_OP_Init: return Initialise(state); case GN_OP_Terminate: return Terminate(data, state); case GN_OP_Identify: return Identify(data, state); case GN_OP_GetMemoryStatus: return GetMemoryStatus(data, state); case GN_OP_GetNetworkInfo: return GetNetworkInfo(data, state); case GN_OP_GetSMSCenter: return GetSMSCenter(data, state); case GN_OP_GetSMS: return GetSMSMessage(data, state); case GN_OP_GetSMSFolders: return GetSMSFolders(data, state); case GN_OP_GetSMSFolderStatus: return GetSMSFolderStatus(data, state); case GN_OP_GetSMSStatus: return GetSMSStatus(data, state); case GN_OP_DeleteSMS: return DeleteSMSMessage(data, state); case GN_OP_ReadPhonebook: return ReadPhonebook(data, state); case GN_OP_DeletePhonebook: return DeletePhonebook(data, state); case GN_OP_GetFile: return GetFile(data, state); #ifdef SECURITY case GN_OP_EnterSecurityCode: return EnterSecurityCode(data, state); case GN_OP_GetSecurityCodeStatus: return GetSecurityCodeStatus(data, state); #endif default: return GN_ERR_NOTIMPLEMENTED; } return GN_ERR_INTERNALERROR; } /* Initialise is the only function allowed to 'use' state */ static gn_error Initialise(struct gn_statemachine *state) { LONG ret; LONG reader_number; char *aux = NULL; dprintf("Initializing...\n"); if (!strcmp("pcsc", state->config.model)) fprintf(stderr, "WARNING: %s=%s is deprecated and will soon be removed. Use %s=%s instead.\n", "model", state->config.model, "model", "APDU"); /* Copy in the phone info */ memcpy(&(state->driver), &driver_pcsc, sizeof(gn_driver)); /* Initialise */ ret = SCardEstablishContext(SCARD_SCOPE_SYSTEM, NULL, NULL, &hContext); if (ret != SCARD_S_SUCCESS) { dprintf("SCardEstablishContext error %lX: %s\n", ret, pcsc_stringify_error(ret)); return get_gn_error(NULL, ret); } /* Now establish the link */ reader_number = strtol(state->config.port_device, &aux, 10); if (*aux) { /* port_device doesn't look like a number, so use it as a reader name */ ret = pcsc_open_reader_name(state->config.port_device); } else { /* use port_device as an index in the list of readers (starting from 0) */ ret = pcsc_open_reader_number(reader_number); } return get_gn_error(NULL, ret); } static gn_error Terminate(gn_data *data, struct gn_statemachine *state) { LONG ret; /* we're going to terminate even if this call returns error */ (void) pcsc_close_reader(); ret = SCardReleaseContext(hContext); if (ret != SCARD_S_SUCCESS) { dprintf("SCardReleaseContext error %lX: %s\n", ret, pcsc_stringify_error(ret)); } return get_gn_error(NULL, ret); } static gn_error Identify(gn_data *data, struct gn_statemachine *state) { gn_error error; char imsi[GN_PCSC_IMSI_MAX_LENGTH], iccid[GN_PCSC_ICCID_MAX_LENGTH]; char spn[GN_PCSC_SPN_MAX_LENGTH] = ""; const char *phase = "??"; /* read ICCID */ error = get_iccid(iccid); if (error == GN_ERR_NONE) { /* showing this as IMEI would be confusing, so just print it in debug mode */ dprintf("ICCID = %s\n", iccid); } /* read IMSI */ error = get_imsi(imsi); if (error == GN_ERR_NONE) { char mcc[4], mnc[4], net_code[8], *network_name; int mnc_len = 2; /* extract MCC and MNC */ snprintf(mcc, sizeof(mcc), "%s", imsi); /* ignore errors, set default value above */ get_mnc_len(&mnc_len); snprintf(mnc, sizeof(mnc), "%.*s", mnc_len, imsi + 3); dprintf("IMSI = %s Home PLMN = MCC %s MNC %s\n", imsi, mcc, mnc); snprintf(net_code, sizeof(net_code), "%s %s", mcc, mnc); /* get operator and country names as strings from libgnokii */ network_name = gn_network_name_get(net_code); /* read Service Provider Name */ (void) get_spn(spn); if (*spn && strcmp(spn, network_name)) snprintf(data->manufacturer, GN_MANUFACTURER_MAX_LENGTH, "%s, %s (%s)", spn, network_name, gn_country_name_get(mcc)); else snprintf(data->manufacturer, GN_MANUFACTURER_MAX_LENGTH, "%s (%s)", network_name, gn_country_name_get(mcc)); } snprintf(data->model, GN_MODEL_MAX_LENGTH, "%s", "APDU"); /* read SIM "Phase Identification" */ /* ignore errors, set default value above */ get_phase(&phase); snprintf(data->revision, GN_REVISION_MAX_LENGTH, _("Phase %s SIM"), phase); return GN_ERR_NONE; } static gn_error GetMemoryStatus(gn_data *data, struct gn_statemachine *state) { LONG file; LONG ret; if (!data || !data->memory_status) { return GN_ERR_INTERNALERROR; } file = get_memory_type(data->memory_status->memory_type); if (!file) { return GN_ERR_INVALIDMEMORYTYPE; } ret = pcsc_change_dir(&IoStruct, GN_PCSC_FILE_DF_TELECOM); if (get_gn_error(&IoStruct, ret) == GN_ERR_NONE) { ret = pcsc_stat_file(&IoStruct, file); if (get_gn_error(&IoStruct, ret) == GN_ERR_NONE) { /* FIXME: this is total space (should read all entries and subtract empty ones) */ data->memory_status->used = (IoStruct.pbRecvBuffer[2] * 256 + IoStruct.pbRecvBuffer[3]) / IoStruct.pbRecvBuffer[14]; data->memory_status->free = 0; } } return get_gn_error(&IoStruct, ret); } static gn_error GetNetworkInfo(gn_data *data, struct gn_statemachine *state) { /* See Subclause 10.3.17 */ LONG ret; gn_error error; ret = pcsc_read_file(&IoStruct, GN_PCSC_FILE_DF_GSM, GN_PCSC_FILE_EF_LOCI); error = get_gn_error(&IoStruct, ret); if (error != GN_ERR_NONE) return error; /* See Subclause 10.5.1.3 of 3GPP TS 04.08 version 7.21.0 Release 1998 == ETSI TS 100 940 V7.21.0 (2003-12) */ data->network_info->cell_id[0] = 0; data->network_info->cell_id[1] = 0; data->network_info->LAC[0] = IoStruct.pbRecvBuffer[7]; data->network_info->LAC[1] = IoStruct.pbRecvBuffer[8]; data->network_info->network_code[0] = '0' + (IoStruct.pbRecvBuffer[4] & 0x0f); data->network_info->network_code[1] = '0' + (IoStruct.pbRecvBuffer[4] >> 4); data->network_info->network_code[2] = '0' + (IoStruct.pbRecvBuffer[5] & 0x0f); data->network_info->network_code[3] = ' '; data->network_info->network_code[4] = '0' + (IoStruct.pbRecvBuffer[6] & 0x0f); data->network_info->network_code[5] = '0' + (IoStruct.pbRecvBuffer[6] >> 4); /* 3-digits MNC */ if ((IoStruct.pbRecvBuffer[5] & 0xf0) != 0xf0) { data->network_info->network_code[6] = '0' + (IoStruct.pbRecvBuffer[5] >> 4); data->network_info->network_code[7] = '\0'; } else { data->network_info->network_code[6] = '\0'; } return error; } static gn_error GetSMSCenter(gn_data *data, struct gn_statemachine *state) { /* See Subclause 10.5.6 */ LONG file; LONG ret; int alpha_max_len, alpha_length, parameter_indicators; gn_error error; if (!data || !data->message_center) { return GN_ERR_INTERNALERROR; } if ((data->message_center->id < 1) || (data->message_center->id > 255)) { return GN_ERR_INVALIDLOCATION; } file = GN_PCSC_FILE_EF_SMSP; ret = pcsc_change_dir(&IoStruct, GN_PCSC_FILE_DF_TELECOM); error = get_gn_error(&IoStruct, ret); if (error != GN_ERR_NONE) return error; ret = pcsc_read_file_record(&IoStruct, file, data->message_center->id); error = get_gn_error(&IoStruct, ret); if (error != GN_ERR_NONE) return error; /* Expected layout: 28+Y bytes (subtract 2 for SW) */ alpha_max_len = IoStruct.dwReceived - 28 - 2; alpha_length = alpha_tag_strlen(IoStruct.pbRecvBuffer, alpha_max_len); dprintf("Max length of Alpha Identifier is %d\n", alpha_max_len); if (alpha_max_len < 0) return GN_ERR_INTERNALERROR; /* Alpha-Identifier */ if (alpha_length > 0) { alpha_tag_decode(data->message_center->name, IoStruct.pbRecvBuffer, GNOKII_MIN(sizeof(data->message_center->name), alpha_length)); data->message_center->default_name = -1; } else { /* Set a default name */ snprintf(data->message_center->name, sizeof(data->message_center->name), _("Set %d"), data->message_center->id); /* From include/gnokii/sms.h: set this flag >= 1 if default name used, otherwise -1 */ data->message_center->default_name = data->message_center->id; } /* Parameter Indicators */ parameter_indicators = IoStruct.pbRecvBuffer[alpha_max_len]; dprintf("Parameter Indicators: 0x%02x\n", parameter_indicators); /* Call it empty if no parameter is present */ if (parameter_indicators == 0xff) return GN_ERR_EMPTYLOCATION; /* TP-Destination Address */ if (parameter_indicators & 0x01) { data->message_center->recipient.number[0] = '\0'; } else { snprintf(data->message_center->recipient.number, sizeof(data->message_center->recipient.number), "%s", char_bcd_number_get(IoStruct.pbRecvBuffer + alpha_max_len + 1)); /* TON - Type of Number */ data->message_center->recipient.type = IoStruct.pbRecvBuffer[alpha_max_len + 2]; } /* TP-Service Centre Address */ if (parameter_indicators & 0x02) { data->message_center->smsc.number[0] = '\0'; } else { snprintf(data->message_center->smsc.number, sizeof(data->message_center->smsc.number), "%s", char_bcd_number_get(IoStruct.pbRecvBuffer + alpha_max_len + 13)); /* TON - Type of Number */ data->message_center->smsc.type = IoStruct.pbRecvBuffer[alpha_max_len + 14]; } /* TP-Protocol Identifier */ if (parameter_indicators & 0x04) { dprintf("\tTP-Protocol Identifier: parameter absent\n"); } else { data->message_center->format = IoStruct.pbRecvBuffer[alpha_max_len + 25]; } /* TP-Data Coding Scheme */ if (parameter_indicators & 0x08) { dprintf("\tTP-Data Coding Scheme: parameter absent\n"); } else { dprintf("\tTP-Data Coding Scheme: 0x%02x\n", IoStruct.pbRecvBuffer[alpha_max_len + 26]); } /* TP-Validity Period */ if (parameter_indicators & 0x10) { dprintf("\tTP-Validity Period: parameter absent\n"); } else { data->message_center->validity = IoStruct.pbRecvBuffer[alpha_max_len + 27]; } return GN_ERR_NONE; } static gn_error GetSMSFolders(gn_data *data, struct gn_statemachine *state) { if (!data || !data->sms_folder_list) return GN_ERR_INTERNALERROR; memset(data->sms_folder_list, 0, sizeof(gn_sms_folder_list)); data->sms_folder_list->number = 1; snprintf(data->sms_folder_list->folder[0].name, sizeof(data->sms_folder_list->folder[0].name), "%s", gn_memory_type_print(GN_MT_SM)); data->sms_folder_list->folder_id[0] = GN_MT_SM; data->sms_folder_list->folder[0].folder_id = GN_PCSC_FILE_EF_SMS; return GN_ERR_NONE; } static gn_error GetSMSFolderStatus(gn_data *data, struct gn_statemachine *state) { gn_sms_status sms_status = {0, 0, 0, 0}, *save_sms_status; gn_error error = GN_ERR_NONE; if (!data || !data->sms_folder) return GN_ERR_INTERNALERROR; if (data->sms_folder->folder_id != GN_PCSC_FILE_EF_SMS) return GN_ERR_INVALIDMEMORYTYPE; save_sms_status = data->sms_status; data->sms_status = &sms_status; error = GetSMSStatus(data, state); data->sms_status = save_sms_status; if (error != GN_ERR_NONE) return error; data->sms_folder->number = sms_status.number; return error; } static gn_error GetSMSMessage(gn_data *data, struct gn_statemachine *state) { /* See Subclause 10.5.3 */ LONG file; LONG ret; gn_error error = GN_ERR_NONE; unsigned char *tmp; unsigned int sms_len; if (!data || !data->raw_sms || !data->sms) { return GN_ERR_INTERNALERROR; } if (data->raw_sms->memory_type != GN_MT_SM) { return GN_ERR_INVALIDMEMORYTYPE; } if ((data->raw_sms->number < 1) || (data->raw_sms->number > 255)) { return GN_ERR_INVALIDLOCATION; } file = GN_PCSC_FILE_EF_SMS; ret = pcsc_change_dir(&IoStruct, GN_PCSC_FILE_DF_TELECOM); error = get_gn_error(&IoStruct, ret); if (error != GN_ERR_NONE) return error; ret = pcsc_read_file_record(&IoStruct, file, data->raw_sms->number); error = get_gn_error(&IoStruct, ret); if (error != GN_ERR_NONE) return error; /* expected layout: 1 octet status, N octets number, 177-N octets data */ if (IoStruct.dwReceived < 178) return GN_ERR_INTERNALERROR; /* skip SIM entry status */ tmp = IoStruct.pbRecvBuffer + 1; /* subtract 1 for SIM entry status and 2 for SW */ sms_len = IoStruct.dwReceived - 3; ret = gn_sms_pdu2raw(data->raw_sms, tmp, sms_len, GN_SMS_PDU_DEFAULT); /* after-the-fact detection of unrecoverable deleted messages */ if (ret != GN_ERR_NONE && (IoStruct.pbRecvBuffer[0] & 0x01) == 0) return GN_ERR_EMPTYLOCATION; switch (IoStruct.pbRecvBuffer[0] & 0x06) { case 0: data->raw_sms->status = GN_SMS_Read; break; case 2: data->raw_sms->status = GN_SMS_Unread; break; case 4: data->raw_sms->status = GN_SMS_Sent; break; case 6: data->raw_sms->status = GN_SMS_Unsent; break; } return get_gn_error(&IoStruct, ret); } static gn_error GetSMSStatus(gn_data *data, struct gn_statemachine *state) { LONG file; LONG ret; if (!data || !data->sms_status) { return GN_ERR_INTERNALERROR; } file = GN_PCSC_FILE_EF_SMS; ret = pcsc_change_dir(&IoStruct, GN_PCSC_FILE_DF_TELECOM); if (get_gn_error(&IoStruct, ret) == GN_ERR_NONE) { ret = pcsc_stat_file(&IoStruct, file); if (get_gn_error(&IoStruct, ret) == GN_ERR_NONE) { /* FIXME: this is total space (should read all SMS to check which are empty or unread) */ data->sms_status->number = (IoStruct.pbRecvBuffer[2] * 256 + IoStruct.pbRecvBuffer[3]) / IoStruct.pbRecvBuffer[14]; data->sms_status->unread = 0; } } return get_gn_error(&IoStruct, ret); } static gn_error DeleteSMSMessage(gn_data *data, struct gn_statemachine *state) { LONG file; LONG ret; BYTE buf[256]; int record_length; gn_sms_raw *rs; gn_error error; if (!data || !data->raw_sms || !data->sms) { return GN_ERR_INTERNALERROR; } rs = data->raw_sms; file = GN_PCSC_FILE_EF_SMS; if (data->raw_sms->memory_type != GN_MT_SM) { return GN_ERR_INVALIDMEMORYTYPE; } if (rs->number < 1 || rs->number > 255) { return GN_ERR_INVALIDLOCATION; } dprintf("Erasing SMS storage number (%d/%d)\n", rs->memory_type, rs->number); ret = pcsc_change_dir(&IoStruct, GN_PCSC_FILE_DF_TELECOM); error = get_gn_error(&IoStruct, ret); if (error != GN_ERR_NONE) return error; ret = pcsc_read_file_record(&IoStruct, file, rs->number); error = get_gn_error(&IoStruct, ret); if (error != GN_ERR_NONE) return error; if (IoStruct.dwReceived < 178) return GN_ERR_INTERNALERROR; /* do not check whether the record is already empty; this is intentional to make is possible to wipe deleted records */ record_length = IoStruct.dwReceived - 2; if (record_length > 255) return GN_ERR_INTERNALERROR; buf[0] = 0x00; memset(buf+1, 0xff, record_length-1); ret = pcsc_update_file_record(&IoStruct, file, rs->number, buf, record_length); return get_gn_error(&IoStruct, ret); } static gn_error GetFile(gn_data *data, struct gn_statemachine *state) { LONG file_id; LONG ret; gn_file *file = NULL; unsigned char *pos, buf[4]; gn_error error = GN_ERR_NONE; if (!data || !data->file) { return GN_ERR_INTERNALERROR; } file = data->file; /* emulated path starts with B: or b: */ pos = file->name; if (*pos != 'B' && *pos != 'b') return GN_ERR_INVALIDLOCATION; pos++; if (*pos != ':') return GN_ERR_INVALIDLOCATION; pos++; /* the rest of the path is made of groups of 4 hex digits with a slash or backslash as separator */ if (strlen(pos) % 5) return GN_ERR_INVALIDLOCATION; /* the last group of digits is the file id, the previous groups, if any, are the directories eg: b:/7f10/6f3c */ while (*pos && error == GN_ERR_NONE) { if (*pos != '\\' && *pos != '/') return GN_ERR_INVALIDLOCATION; pos++; hex2bin(buf, pos, 2); file_id = buf[0] * 256 + buf[1]; pos += 4; if (*pos) { /* intermediate IDs are treated as directories */ ret = pcsc_change_dir(&IoStruct, file_id); error = get_gn_error(&IoStruct, ret); } else { PCSC_IOSTRUCT ios; /* the last ID is read as a file */ ret = pcsc_file_get_contents(&ios, file_id); error = get_gn_error(&ios, ret); /* fill in libgnokii fields */ snprintf(file->name, sizeof(file->name), "%04lx", file_id); file->file = ios.pbRecvBuffer; file->file_length = ios.dwReceived - 2; } } return error; } static gn_error ReadPhonebook(gn_data *data, struct gn_statemachine *state) { LONG file; LONG ret; int number_start, alpha_length; gn_phonebook_entry *pe; gn_error error; if (!data || !data->phonebook_entry) return GN_ERR_INTERNALERROR; pe = data->phonebook_entry; file = get_memory_type(pe->memory_type); if (!file) { return GN_ERR_INVALIDMEMORYTYPE; } if (pe->location < 1 || pe->location > 255) { return GN_ERR_INVALIDLOCATION; } dprintf("Reading phonebook location (%d/%d)\n", pe->memory_type, pe->location); ret = pcsc_change_dir(&IoStruct, GN_PCSC_FILE_DF_TELECOM); error = get_gn_error(&IoStruct, ret); if (error != GN_ERR_NONE) return error; ret = pcsc_read_file_record(&IoStruct, file, pe->location); error = get_gn_error(&IoStruct, ret); if (error != GN_ERR_NONE) return error; /* FIXME: number format for EF_ECC is different (BCD without leading length, max 3 octects) this is so previous lines will print useful debug information */ if (file == GN_PCSC_FILE_EF_ECC) { return GN_ERR_INVALIDMEMORYTYPE; } /* layout of buffer is: 0..241 octects with alpha tag", 14 octects for number, 2 octects for SW (so for EF_ADN subtract 14 for number and 2 for SW) */ /* FIXME: "14" is not right for all types of numbers (it's 15 for EF_BDN, it's completely different for EF_ECC) */ if (IoStruct.dwReceived < 16) return GN_ERR_INTERNALERROR; number_start = IoStruct.dwReceived - 14 - 2; /* mark the entry as empty only if both name and number are missing */ if ((IoStruct.pbRecvBuffer[0] == 0xff) && (IoStruct.pbRecvBuffer[number_start] == 0xff)) { pe->empty = true; /* xgnokii checks for empty name and number */ *pe->name = '\0'; *pe->number = '\0'; return GN_ERR_EMPTYLOCATION; } /* decode and copy the name */ /* calculate length of the "alpha tag" (ie the text associated to this number) because existing libgnokii functions need it */ alpha_length = alpha_tag_strlen(IoStruct.pbRecvBuffer, number_start); /* better check, since subclause 10.5.1 says length of alpha tag is 0..241 */ if (alpha_length > GN_PHONEBOOK_NAME_MAX_LENGTH) { dprintf("WARNING: Phonebook name too long, %d will be truncated to %d\n", alpha_length, GN_PHONEBOOK_NAME_MAX_LENGTH); alpha_length = GN_PHONEBOOK_NAME_MAX_LENGTH; } alpha_tag_decode(pe->name, IoStruct.pbRecvBuffer, alpha_length); /* decode and copy the number */ snprintf(pe->number, GN_PHONEBOOK_NUMBER_MAX_LENGTH, "%s", char_bcd_number_get((u8 *)&IoStruct.pbRecvBuffer[number_start])); if (IoStruct.pbRecvBuffer[IoStruct.dwReceived - 3] != 0xff) { /* TODO: handle the extension identifier field for numbers or SSCs longer than 20 digits (do they really exist in the wild?) */ dprintf("WARNING: Ignoring extension identifier field\n"); } /* fill in other libgnokii fields */ pe->subentries_count = 0; pe->caller_group = GN_PHONEBOOK_GROUP_None; return get_gn_error(&IoStruct, ret); } static gn_error DeletePhonebook(gn_data *data, struct gn_statemachine *state) { LONG file; LONG ret; BYTE buf[256]; int record_length; gn_phonebook_entry *pe; gn_error error; if (!data || !data->phonebook_entry) return GN_ERR_INTERNALERROR; pe = data->phonebook_entry; file = get_memory_type(pe->memory_type); if (!file) { return GN_ERR_INVALIDMEMORYTYPE; } if (pe->location < 1 || pe->location > 255) { return GN_ERR_INVALIDLOCATION; } dprintf("Erasing phonebook location (%d/%d)\n", pe->memory_type, pe->location); ret = pcsc_change_dir(&IoStruct, GN_PCSC_FILE_DF_TELECOM); error = get_gn_error(&IoStruct, ret); if (error != GN_ERR_NONE) return error; ret = pcsc_read_file_record(&IoStruct, file, pe->location); error = get_gn_error(&IoStruct, ret); if (error != GN_ERR_NONE) return error; if (IoStruct.dwReceived < 16) return GN_ERR_INTERNALERROR; /* do not check whether the record is already empty; this is intentional to make is possible to wipe deleted records */ if (IoStruct.pbRecvBuffer[IoStruct.dwReceived - 3] != 0xff) { dprintf("Cannot erase a record with an extension field\n"); return GN_ERR_INTERNALERROR; } record_length = IoStruct.dwReceived - 2; if (record_length > 255) return GN_ERR_INTERNALERROR; memset(buf, 0xff, record_length); ret = pcsc_update_file_record(&IoStruct, file, pe->location, buf, record_length); return get_gn_error(&IoStruct, ret); } #ifdef SECURITY static gn_error GetSecurityCodeStatus(gn_data *data, struct gn_statemachine *state) { LONG ret; gn_error error; BYTE fchars, chv1st; data->security_code->type = GN_SCT_None; ret = pcsc_change_dir(&IoStruct, GN_PCSC_FILE_DF_TELECOM); error = get_gn_error(&IoStruct, ret); if (error != GN_ERR_NONE) return error; ret = pcsc_stat_file(&IoStruct, GN_PCSC_FILE_DF_TELECOM); error = get_gn_error(&IoStruct, ret); if (error != GN_ERR_NONE) return error; if (IoStruct.dwReceived < 22) return GN_ERR_INTERNALERROR; fchars = IoStruct.pbRecvBuffer[13]; chv1st = IoStruct.pbRecvBuffer[18]; dprintf("File chars 0x%02x CHV1 status 0x%02x\n", fchars, chv1st); if ((fchars & 0x80) == 0) { /* CHV1 enabled */ if ((chv1st & 0x0f) == 0) { /* CHV1 blocked */ data->security_code->type = GN_SCT_Puk; } else { ret = pcsc_read_file_record(&IoStruct, GN_PCSC_FILE_EF_FDN, 1); error = get_gn_error(&IoStruct, ret); if (error == GN_ERR_CODEREQUIRED) /* CHV1 required */ data->security_code->type = GN_SCT_Pin; else if (error != GN_ERR_NONE) return error; } } return GN_ERR_NONE; } static gn_error EnterSecurityCode(gn_data *data, struct gn_statemachine *state) { LONG ret; gn_error error; BYTE chv_id; size_t chv_len; switch (data->security_code->type) { case GN_SCT_Pin: chv_id = 1; break; default: return GN_ERR_NOTIMPLEMENTED; } chv_len = strlen(data->security_code->code); if (chv_len > 8) return GN_ERR_INVALIDSECURITYCODE; ret = pcsc_change_dir(&IoStruct, GN_PCSC_FILE_DF_TELECOM); error = get_gn_error(&IoStruct, ret); if (error != GN_ERR_NONE) return error; ret = pcsc_verify_chv(&IoStruct, chv_id, (BYTE *)data->security_code->code, chv_len); error = get_gn_error(&IoStruct, ret); if (error == GN_ERR_CODEREQUIRED) error = GN_ERR_INVALIDSECURITYCODE; return error; } #endif /* SECURITY */ /* functions for libpcsc stuff */ static LONG pcsc_cmd_get_response(PCSC_IOSTRUCT *ios, BYTE length) { /* fetch the data that the card has prepared */ LONG ret = SCARD_S_SUCCESS; BYTE pbSendBuffer[] = { GN_PCSC_CMD_GET_RESPONSE, 0x00, 0x00, 0x00 }; pbSendBuffer[GN_PCSC_PARAMETER_OFFSET_P3] = length; ios->dwReceived = ios->dwRecvLength; PCSC_TRANSMIT(ret, "cmd_get_response", pbSendBuffer, ios); return ret; } static LONG pcsc_cmd_select(PCSC_IOSTRUCT *ios, LONG file_id) { /* this is similar to open() or chdir(), depending on the file id */ LONG ret = SCARD_S_SUCCESS; BYTE pbSendBuffer[] = { GN_PCSC_CMD_SELECT, 0x00, 0x00, 0x02, 0x00, 0x00 }; pbSendBuffer[GN_PCSC_PARAMETER_OFFSET_FILEID_HI] = (file_id >> 8) & 0xff; pbSendBuffer[GN_PCSC_PARAMETER_OFFSET_FILEID_LO] = file_id & 0xff; ios->dwReceived = ios->dwRecvLength; PCSC_TRANSMIT(ret, "cmd_select", pbSendBuffer, ios); return ret; } static LONG pcsc_change_dir(PCSC_IOSTRUCT *ios, LONG directory_id) { /* select the specified directory */ /* checking if it is really a "Directory File" would require getting the response to check the type of file e.g. using pcsc_stat_file() */ return pcsc_cmd_select(ios, directory_id); } static LONG pcsc_stat_file(PCSC_IOSTRUCT *ios, LONG file_id) { /* fill the buffer with file information */ LONG ret; ret = pcsc_cmd_select(ios, file_id); if (ret != SCARD_S_SUCCESS) return ret; /* "soft" failure that needs to be catched by the caller */ if (ios->pbRecvBuffer[ios->dwReceived - 2] != 0x9f) { return SCARD_S_SUCCESS; } /* get file structure and length */ ret = pcsc_cmd_get_response(ios, ios->pbRecvBuffer[1]); if (ret != SCARD_S_SUCCESS) return ret; /* short reads should never happen (minimum lengths taken from subclause 9.2.1) */ switch (ios->pbRecvBuffer[6]) { case GN_PCSC_FILE_TYPE_MF: case GN_PCSC_FILE_TYPE_DF: if (ios->dwReceived < 22) ret = SCARD_F_UNKNOWN_ERROR; break; case GN_PCSC_FILE_TYPE_EF: if (ios->dwReceived < 14) ret = SCARD_F_UNKNOWN_ERROR; break; default: ret = SCARD_E_INVALID_PARAMETER; } return ret; } static LONG pcsc_cmd_read_binary(PCSC_IOSTRUCT *ios, LONG length) { /* copy a smart card "transparent file" contents to the provided buffer */ LONG ret = SCARD_S_SUCCESS; BYTE pbSendBuffer[] = { GN_PCSC_CMD_READ_BINARY, 0x00, 0x00, 0x00 }; /* TODO: read files longer than 255 bytes (not needed for phonebook or SMS) */ if ((length > 255) || (length > ios->dwRecvLength)) { ret = SCARD_E_INVALID_PARAMETER; dprintf("%s error %lX: %s\n", __FUNCTION__, ret, pcsc_stringify_error(ret)); return ret; } pbSendBuffer[GN_PCSC_PARAMETER_OFFSET_P3] = length; ios->dwReceived = ios->dwRecvLength; PCSC_TRANSMIT(ret, "cmd_read_binary", pbSendBuffer, ios); return ret; } static LONG pcsc_cmd_read_record(PCSC_IOSTRUCT *ios, BYTE record, BYTE length) { /* copy a smart card "linear fixed file" contents to the provided buffer */ LONG ret = SCARD_S_SUCCESS; BYTE pbSendBuffer[] = { GN_PCSC_CMD_READ_RECORD, 0x00, GN_PCSC_FILE_READ_ABS, 0x00 }; pbSendBuffer[GN_PCSC_PARAMETER_OFFSET_P1] = record; /* pbSendBuffer[GN_PCSC_PARAMETER_OFFSET_P2] = GN_PCSC_FILE_READ_ABS; */ /* always use absolute/current mode */ pbSendBuffer[GN_PCSC_PARAMETER_OFFSET_P3] = length; ios->dwReceived = ios->dwRecvLength; PCSC_TRANSMIT(ret, "cmd_read_record", pbSendBuffer, ios); return ret; } static LONG pcsc_file_get_contents(PCSC_IOSTRUCT *ios, LONG file_id) { /* copy file contents in a newly allocated buffer ios->pbRecvBuffer which must be freed by the caller also in case of error return. Note that this function overwrites ios->pbRecvBuffer and ios->dwRecvLength */ LONG ret; BYTE bRecordLength, bRecordCount, *pbFileBuffer, bFileStructure; DWORD dwFileLength; /* allocate a buffer for the "stat" command */ ios->dwRecvLength = MAX_BUFFER_SIZE; ios->pbRecvBuffer = malloc(ios->dwRecvLength); if (!ios->pbRecvBuffer) return SCARD_E_NO_MEMORY; ret = pcsc_stat_file(ios, file_id); if (ret != SCARD_S_SUCCESS) return ret; /* "soft" failure that needs to be catched by the caller */ if (ios->pbRecvBuffer[ios->dwReceived - 2] != 0x90) return SCARD_S_SUCCESS; switch (ios->pbRecvBuffer[6]) { case GN_PCSC_FILE_TYPE_MF: case GN_PCSC_FILE_TYPE_DF: /* reuse the buffer even if it's bigger than needed */ dprintf("file %04x length %d\n", file_id, ios->dwReceived - 2); return SCARD_S_SUCCESS; case GN_PCSC_FILE_TYPE_EF: break; default: return SCARD_E_INVALID_PARAMETER; } dwFileLength = ios->pbRecvBuffer[2] * 256 + ios->pbRecvBuffer[3]; bFileStructure = ios->pbRecvBuffer[13]; if (ios->dwReceived <= 15) return SCARD_F_UNKNOWN_ERROR; bRecordLength = ios->pbRecvBuffer[14]; dprintf("file %04x length %d\n", file_id, dwFileLength); /* 2 extra bytes are needed to store the last SW (the previous SWs are overwritten by the following reads) having the SW after file contents is consistent with the other functions */ free(ios->pbRecvBuffer); ios->pbRecvBuffer = malloc(dwFileLength + 2); if (!ios->pbRecvBuffer) return SCARD_E_NO_MEMORY; switch (bFileStructure) { case GN_PCSC_FILE_STRUCTURE_TRANSPARENT: ret = pcsc_cmd_read_binary(ios, dwFileLength); break; case GN_PCSC_FILE_STRUCTURE_CYCLIC: case GN_PCSC_FILE_STRUCTURE_LINEAR_FIXED: bRecordCount = dwFileLength / bRecordLength; pbFileBuffer = ios->pbRecvBuffer; ios->bRecordNumber = 1; while (bRecordCount-- && ret == SCARD_S_SUCCESS) { ret = pcsc_cmd_read_record(ios, ios->bRecordNumber++, bRecordLength); ios->pbRecvBuffer += bRecordLength; } /* pretend we filled the buffer in one pass */ ios->pbRecvBuffer = pbFileBuffer; /* use the actual number of records read */ ios->dwReceived = (ios->bRecordNumber - 1) * bRecordLength + 2; break; default: ret = SCARD_E_INVALID_PARAMETER; } if (ret != SCARD_S_SUCCESS) { dprintf("%s error %lX: %s\n", __FUNCTION__, ret, pcsc_stringify_error(ret)); } return ret; } static LONG pcsc_read_file_record(PCSC_IOSTRUCT *ios, LONG file_id, BYTE record) { /* copy contents of a record from a file to the provided buffer */ LONG ret; ret = pcsc_stat_file(ios, file_id); if (ret != SCARD_S_SUCCESS) return ret; /* "soft" failure that needs to be catched by the caller */ if (ios->pbRecvBuffer[ios->dwReceived - 2] != 0x90) return SCARD_S_SUCCESS; /* records can only be read from EFs */ if (ios->pbRecvBuffer[6] != GN_PCSC_FILE_TYPE_EF) return SCARD_E_INVALID_PARAMETER; switch (ios->pbRecvBuffer[13]) { case GN_PCSC_FILE_STRUCTURE_CYCLIC: case GN_PCSC_FILE_STRUCTURE_LINEAR_FIXED: if (ios->dwReceived <= 14) return SCARD_F_UNKNOWN_ERROR; ret = pcsc_cmd_read_record(ios, record, ios->pbRecvBuffer[14]); break; default: ret = SCARD_E_INVALID_PARAMETER; } if (ret != SCARD_S_SUCCESS) { dprintf("%s error %lX: %s\n", __FUNCTION__, ret, pcsc_stringify_error(ret)); } return ret; } static LONG pcsc_read_file(PCSC_IOSTRUCT *ios, LONG dir_id, LONG file_id) { /* copy contents of a file to the provided buffer */ LONG ret; DWORD dwFileLength; BYTE bRecordLength, bRecordCount, *pbFileBuffer, bFileStructure; ret = pcsc_change_dir(ios, dir_id); if (ret != SCARD_S_SUCCESS) return ret; ret = pcsc_stat_file(ios, file_id); if (ret != SCARD_S_SUCCESS) return ret; dwFileLength = ios->pbRecvBuffer[2] * 256 + ios->pbRecvBuffer[3]; bFileStructure = ios->pbRecvBuffer[13]; switch (bFileStructure) { case GN_PCSC_FILE_STRUCTURE_TRANSPARENT: ret = pcsc_cmd_read_binary(ios, dwFileLength); break; case GN_PCSC_FILE_STRUCTURE_CYCLIC: case GN_PCSC_FILE_STRUCTURE_LINEAR_FIXED: bRecordLength = ios->pbRecvBuffer[14]; bRecordCount = dwFileLength / bRecordLength; pbFileBuffer = ios->pbRecvBuffer; ios->bRecordNumber = 1; while (bRecordCount-- && ret == SCARD_S_SUCCESS) { ret = pcsc_cmd_read_record(ios, ios->bRecordNumber++, bRecordLength); ios->pbRecvBuffer += bRecordLength; } /* pretend we filled the buffer in one pass */ ios->pbRecvBuffer = pbFileBuffer; /* use the actual number of records read */ ios->dwReceived = (ios->bRecordNumber - 1) * bRecordLength + 2; break; default: ret = SCARD_E_INVALID_PARAMETER; } if (ret != SCARD_S_SUCCESS) { dprintf("%s error %lX: %s\n", __FUNCTION__, ret, pcsc_stringify_error(ret)); } return ret; } static LONG pcsc_cmd_update_record(PCSC_IOSTRUCT *ios, BYTE record, BYTE *data, BYTE length) { /* update a smart card "linear fixed file" contents from the provided buffer */ LONG ret = SCARD_S_SUCCESS; BYTE pbSendBuffer[GN_PCSC_DATA_OFFSET + 256] = { GN_PCSC_CMD_UPDATE_RECORD, 0x00, GN_PCSC_FILE_READ_ABS, 0x00 }; pbSendBuffer[GN_PCSC_PARAMETER_OFFSET_P1] = record; /* pbSendBuffer[GN_PCSC_PARAMETER_OFFSET_P2] = GN_PCSC_FILE_READ_ABS; */ /* always use absolute/current mode */ pbSendBuffer[GN_PCSC_PARAMETER_OFFSET_P3] = length; memcpy(&pbSendBuffer[GN_PCSC_DATA_OFFSET], data, length); ios->dwReceived = ios->dwRecvLength; PCSC_TRANSMIT_WITH_LENGTH(ret, "cmd_update_record", pbSendBuffer, GN_PCSC_DATA_OFFSET + length, ios); return ret; } static LONG pcsc_update_file_record(PCSC_IOSTRUCT *ios, LONG file_id, BYTE record, BYTE *data, BYTE length) { /* copy contents of a record from the provided buffer to a file */ LONG ret; ret = pcsc_stat_file(ios, file_id); if (ret != SCARD_S_SUCCESS) return ret; if (ios->dwReceived < 2) return SCARD_F_UNKNOWN_ERROR; /* "soft" failure that needs to be catched by the caller */ if (ios->pbRecvBuffer[ios->dwReceived - 2] != 0x90) return SCARD_S_SUCCESS; /* records can only be updated in EFs */ if (ios->dwReceived <= 6) return SCARD_F_UNKNOWN_ERROR; if (ios->pbRecvBuffer[6] != GN_PCSC_FILE_TYPE_EF) return SCARD_E_INVALID_PARAMETER; if (ios->dwReceived <= 13) return SCARD_F_UNKNOWN_ERROR; switch (ios->pbRecvBuffer[13]) { case GN_PCSC_FILE_STRUCTURE_CYCLIC: case GN_PCSC_FILE_STRUCTURE_LINEAR_FIXED: if (length != ios->pbRecvBuffer[14]) { ret = SCARD_E_INVALID_PARAMETER; break; } ret = pcsc_cmd_update_record(ios, record, data, length); break; default: ret = SCARD_E_INVALID_PARAMETER; } if (ret != SCARD_S_SUCCESS) { dprintf("%s error %lX: %s\n", __FUNCTION__, ret, pcsc_stringify_error(ret)); } return ret; } #ifdef SECURITY static LONG pcsc_verify_chv(PCSC_IOSTRUCT *ios, BYTE chv_id, BYTE *chv, BYTE chv_len) { LONG ret = SCARD_S_SUCCESS; BYTE pbSendBuffer[] = { GN_PCSC_CMD_VERIFY_CHV, 0x00, 0x00, 0x08, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; if (chv_len > 8) return SCARD_E_INVALID_PARAMETER; pbSendBuffer[GN_PCSC_PARAMETER_OFFSET_P2] = chv_id; memcpy(&pbSendBuffer[GN_PCSC_DATA_OFFSET], chv, chv_len); ios->dwReceived = ios->dwRecvLength; PCSC_TRANSMIT(ret, "cmd_verify_chv", pbSendBuffer, ios); return ret; } #endif /* SECURITY */ static LONG pcsc_close_reader() { /* disconnect from reader */ /* if PIN has been successfully entered, SCARD_LEAVE_CARD leaves the card unprotected until SCARD_UNPOWER_CARD or SCARD_RESET_CARD are used or it is removed from reader */ return SCardDisconnect(hCard, SCARD_LEAVE_CARD); } static LONG pcsc_open_reader_number(LONG number) { /* connect to a reader by number, 0 is the first reader (as configured in /etc/reader.conf) */ LONG ret; LONG len; BYTE *buf; LPCSTR reader_name; /* first retrieve buffer length */ ret = SCardListReaders(hContext, NULL, NULL, &len); buf = (BYTE *) malloc(len); if (!buf) { return SCARD_E_NO_MEMORY; } /* then fill in the buffer just allocated */ ret = SCardListReaders(hContext, NULL, buf, &len); if (ret == SCARD_S_SUCCESS) { reader_name = buf; /* print names because libpcsclite appends some figures to the names in the config file */ dprintf("pcsc_reader_name = \"%s\"\n", reader_name); while (--len && number) { if (!*reader_name++) { number--; dprintf("pcsc_reader_name = \"%s\"\n", reader_name); } } /* reader_name points to the n-th reader name or to '\0' if there aren't enough names */ if (*reader_name) { ret = pcsc_open_reader_name(reader_name); } else { ret = SCARD_E_UNKNOWN_READER; } } free(buf); return ret; } static LONG pcsc_open_reader_name(LPCSTR reader_name) { /* connect to a reader by name, case sensitive (as configured in /etc/reader.conf) */ LONG ret; dprintf("Connecting to reader \"%s\"\n", reader_name); dwActiveProtocol = -1; ret = SCardConnect(hContext, reader_name, SCARD_SHARE_SHARED, SCARD_PROTOCOL_T0 | SCARD_PROTOCOL_T1, &hCard, &dwActiveProtocol); if (ret != SCARD_S_SUCCESS) { dprintf("SCardConnect error %lX: %s\n", ret, pcsc_stringify_error(ret)); pcsc_close_reader(); return ret; } switch(dwActiveProtocol) { case SCARD_PROTOCOL_T0: pioSendPci = SCARD_PCI_T0; break; case SCARD_PROTOCOL_T1: pioSendPci = SCARD_PCI_T1; break; default: /* Unknown protocol */ pcsc_close_reader(); return SCARD_E_PROTO_MISMATCH; } return ret; } #endif /* HAVE_PCSC */ gnokii-0.6.31/common/phones/atsam.c0000644000175000017500000000673611666163120015254 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright 2004 Hugo Haas Copyright 2004 Pawel Kot Copyright 2007 Ingmar Steen This file provides functions specific to AT commands on Samsung phones. See README for more details on supported mobile phones. */ #include "config.h" #include #include #include #include "compat.h" #include "misc.h" #include "gnokii.h" #include "phones/generic.h" #include "phones/atgen.h" #include "phones/atsam.h" #include "links/atbus.h" static gn_error Unsupported(gn_data *data, struct gn_statemachine *state) { return GN_ERR_NOTSUPPORTED; } void at_samsung_init(char* foundmodel, char* setupmodel, struct gn_statemachine *state) { if (foundmodel) { if (!strncasecmp("SGH-L760", foundmodel, 8)) AT_DRVINST(state)->ucs2_as_utf8 = 1; else if (!strncasecmp("SGH-U600", foundmodel, 8)) AT_DRVINST(state)->extended_phonebook = 1; else if (!strncasecmp("SAMSUNG B2100", foundmodel, 13)) AT_DRVINST(state)->encode_number = 1; } /* phone lacks many useful commands :( */ at_insert_send_function(GN_OP_GetBatteryLevel, Unsupported, state); at_insert_send_function(GN_OP_GetPowersource, Unsupported, state); at_insert_send_function(GN_OP_GetRFLevel, Unsupported, state); } static char hexatoi(char c) { if ((c >= '0') && (c <= '9')) return c - '0'; if ((c >= 'A') && (c <= 'F')) return c - 'A' + 10; if ((c >= 'a') && (c <= 'f')) return c - 'a' + 10; return 0; } /* * These are known weird encodings found in SGH-L760 model */ static unsigned char sgh_l760_fixup(unsigned char prev, unsigned char curr) { switch (curr) { case 0x98: switch (prev) { case 0xC4: return 0x99; default: return curr; } case 0xA3: switch (prev) { case 0xC4: return 0x98; case 0xC5: return 0x94; default: return curr; } case 0xA9: switch (prev) { case 0xC5: return 0x95; default: return curr; } default: return curr; } } /* * Samsung SGH-l760 was reported to have incorrect encoding * With UCS-2 encoding for character Å› it uses: * 00C5009B * instead of: * 015B * 0xC59B is UTF-8 representation of Å› */ size_t decode_ucs2_as_utf8(char *dst, const char *src, int len) { unsigned char *aux = calloc(len/4, sizeof(char)); int i, j; /* * First convert string to UTF-8 string: * in: 00C5009B * out: C59B */ for (i = 0, j = 0; i < len/4; i++) { unsigned char a, b; a = hexatoi(src[4 * i + 2]); b = hexatoi(src[4 * i + 3]); /* If there's 0x03 instead of 0x00 we have somehow different encoding */ if ((src[4 * i] == 0x30) && (src[4 * i + 1] == 0x33)) { aux[j] = sgh_l760_fixup(aux[j-1], a * 16 + b); j++; } else { aux[j++] = a * 16 + b; } } return utf8_decode(dst, len/4, aux, len/4); } gnokii-0.6.31/common/phones/atlg.c0000644000175000017500000000243111666163120015062 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2008 Pawel Kot This file provides functions specific to at commands on LG phones. See README for more details on supported mobile phones. */ #include "config.h" #include #include #include #include "compat.h" #include "misc.h" #include "gnokii.h" #include "phones/generic.h" #include "phones/atgen.h" #include "phones/atlg.h" void at_lg_init(char* foundmodel, char* setupmodel, struct gn_statemachine *state) { AT_DRVINST(state)->lac_swapped = 1; } gnokii-0.6.31/common/phones/generic.c0000644000175000017500000000322211666163120015546 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 2000 Chris Kemp Copyright (C) 2001-2002 Pawel Kot Copyright (C) 2002 Ladis Michl This file provides useful functions for all phones. See README for more details on supported mobile phones. The various routines are called pgen_(whatever). */ #include "config.h" #include "gnokii-internal.h" #include "links/utils.h" /* If we do not support a message type, print out some debugging info */ gn_error pgen_incoming_default(int messagetype, unsigned char *buffer, int length, struct gn_statemachine *state) { dprintf("Unknown Message received [type (%02x) length (%d)]: \n", messagetype, length); sm_message_dump(gn_log_debug, messagetype, buffer, length); return GN_ERR_NONE; } gn_error pgen_terminate(gn_data *data, struct gn_statemachine *state) { return link_terminate(state); } gnokii-0.6.31/common/phones/ateric.c0000644000175000017500000000477311666163120015415 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2001 Manfred Jonsson Copyright (C) 2002 Ladis Michl This file provides functions specific to at commands on ericsson phones. See README for more details on supported mobile phones. */ #include "config.h" #include #include #include #include "compat.h" #include "misc.h" #include "gnokii.h" #include "phones/generic.h" #include "phones/atgen.h" #include "phones/ateric.h" #include "links/atbus.h" static gn_error GetMemoryStatus(gn_data *data, struct gn_statemachine *state) { gn_error ret; ret = at_memory_type_set(data->memory_status->memory_type, state); if (ret) return ret; if (sm_message_send(11, GN_OP_GetMemoryStatus, "AT+CPBR=?\r\n", state)) return GN_ERR_NOTREADY; return sm_block_no_retry(GN_OP_GetMemoryStatus, data, state); } /* * Reminder: SonyEricsson doesn't return and values of memory usage: * > AT+CPBS? * +CPBS: "ME" */ static gn_error ReplyMemoryStatus(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state) { at_line_buffer buf; char *pos; buf.line1 = buffer; buf.length = length; splitlines(&buf); if (buf.line1 == NULL) return GN_ERR_INVALIDMEMORYTYPE; if (data->memory_status) { if (strstr(buf.line2, "+CPBR")) { pos = strchr(buf.line2, '-'); if (pos) { data->memory_status->used = atoi(++pos); data->memory_status->free = 0; } else { return GN_ERR_NOTSUPPORTED; } } } return GN_ERR_NONE; } void at_ericsson_init(char* foundmodel, char* setupmodel, struct gn_statemachine *state) { at_insert_recv_function(GN_OP_GetMemoryStatus, ReplyMemoryStatus, state); at_insert_send_function(GN_OP_GetMemoryStatus, GetMemoryStatus, state); } gnokii-0.6.31/common/phones/atnok.c0000644000175000017500000001045411666163120015253 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2001 Manfred Jonsson Copyright (C) 2002 Ladis Michl Copyright (C) 2003 Pawel Kot This file provides functions specific to at commands on nokia phones. See README for more details on supported mobile phones. */ #include "config.h" #include #include #include #include "compat.h" #include "misc.h" #include "gnokii.h" #include "phones/generic.h" #include "phones/atgen.h" #include "phones/atnok.h" #include "links/atbus.h" static at_send_function_type writephonebook; static gn_error WritePhonebook(gn_data *data, struct gn_statemachine *state) { if (writephonebook == NULL) return GN_ERR_UNKNOWN; if (data->memory_status && data->memory_status->memory_type == GN_MT_ME) return GN_ERR_NOTSUPPORTED; return (*writephonebook)(data, state); } static gn_error ReplyIncomingSMS(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state) { at_driver_instance *drvinst = AT_DRVINST(state); at_line_buffer buf; char *memory_name, *pos; int index; gn_memory_type mem; int freesms = 0; gn_error error = GN_ERR_NONE; if (!drvinst->on_sms) return GN_ERR_UNSOLICITED; buf.line1 = buffer; buf.length= length; splitlines(&buf); mem = GN_MT_XX; if (strncmp(buf.line1, "+CMTI: ", 7)) return GN_ERR_UNSOLICITED; pos = strrchr(buf.line1, ','); if (pos == NULL) return GN_ERR_UNSOLICITED; pos[0] = '\0'; pos++; index = atoi(pos); memory_name = strip_quotes(buf.line1 + 7); if (memory_name == NULL) return GN_ERR_UNSOLICITED; mem = gn_str2memory_type(memory_name); if (mem == GN_MT_XX) return GN_ERR_UNSOLICITED; /* Ugly workaround for at least Nokia behaviour. Reply is of form: * +CMTI: , * is the memory where the message is stored and can be "ME" or "SM". * is a place in "MT" memory which consists of "SM" and "ME". * order is that "SM" memory goes first, "ME" memory goes second. * So if the memory is "ME" we need to substract from size of "SM" * memory to get the location (we cannot read from "MT" memory */ if (mem == GN_MT_ME) { if (drvinst->smmemorysize < 0) error = gn_sm_functions(GN_OP_AT_GetSMSMemorySize, data, state); /* ignore errors */ if ((error == GN_ERR_NONE) && (index > drvinst->smmemorysize)) index -= drvinst->smmemorysize; } dprintf("Received message folder %s index %d\n", gn_memory_type2str(mem), index); if (!data->sms) { freesms = 1; data->sms = calloc(1, sizeof(gn_sms)); if (!data->sms) return GN_ERR_INTERNALERROR; } memset(data->sms, 0, sizeof(gn_sms)); data->sms->memory_type = mem; data->sms->number = index; error = gn_sms_get(data, state); if (error == GN_ERR_NONE) { error = GN_ERR_UNSOLICITED; drvinst->on_sms(data->sms, state, drvinst->sms_callback_data); } if (freesms) free(data->sms); return error; } void at_nokia_init(char* foundmodel, char* setupmodel, struct gn_statemachine *state) { /* block writing of phone memory on nokia phones other than */ /* 8210. if you write to the phonebook of a eg 7110 all extended */ /* information will be lost. */ if (strncasecmp("8210", foundmodel, 4)) writephonebook = at_insert_send_function(GN_OP_WritePhonebook, WritePhonebook, state); /* premicell does not want sms centers in PDU packets (send & */ /* receive) */ if (!strncasecmp("0301", foundmodel, 4)) AT_DRVINST(state)->no_smsc = 1; /* Nokias support just mode 1 */ AT_DRVINST(state)->cnmi_mode = 1; at_insert_recv_function(GN_OP_AT_IncomingSMS, ReplyIncomingSMS, state); } gnokii-0.6.31/common/phones/atsoer.c0000644000175000017500000001236311666163120015435 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright 2004 Hugo Haas Copyright 2004-2008 Pawel Kot This file provides functions specific to AT commands on Sony Ericsson phones. See README for more details on supported mobile phones. */ #include "config.h" #include #include #include #include "compat.h" #include "misc.h" #include "gnokii.h" #include "phones/generic.h" #include "phones/atgen.h" #include "phones/atsoer.h" #include "links/atbus.h" static gn_error se_at_memory_type_set(gn_memory_type mt, struct gn_statemachine *state) { at_driver_instance *drvinst = AT_DRVINST(state); gn_data data; char req[32]; const char *memory_name; char memory_name_enc[16]; int len; gn_error ret = GN_ERR_NONE; if (mt != drvinst->memorytype) { memory_name = gn_memory_type2str(mt); if (!memory_name) return GN_ERR_INVALIDMEMORYTYPE; /* BC is "Own Business Card" as per the Sony Ericsson documentation */ if (strcmp(memory_name, "ON") == 0) memory_name = "BC"; if (drvinst->encode_memory_type) { gn_data_clear(&data); at_encode(drvinst->charset, memory_name_enc, sizeof(memory_name_enc), memory_name, strlen(memory_name)); memory_name = memory_name_enc; } len = snprintf(req, sizeof(req), "AT+CPBS=\"%s\"\r", memory_name); ret = sm_message_send(len, GN_OP_Init, req, state); if (ret != GN_ERR_NONE) return ret; gn_data_clear(&data); ret = sm_block_no_retry(GN_OP_Init, &data, state); if (ret != GN_ERR_NONE) return ret; drvinst->memorytype = mt; gn_data_clear(&data); ret = state->driver.functions(GN_OP_AT_GetMemoryRange, &data, state); } return ret; } /* * Calculate phonebook size for SonyEricsson phones: they don't respond * with memory stats to AT+CPBS. Calculate by reading and counting all * entries (which is fast -- just one command). */ static gn_error ReplyMemoryStatus(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state) { at_driver_instance *drvinst = AT_DRVINST(state); gn_error error; char *buf = buffer; int counter = 0; if (!data->memory_status) return GN_ERR_INTERNALERROR; if ((error = at_error_get(buffer, state)) != GN_ERR_NONE) return error; while ((buf = strchr(buf, '\r'))) { buf++; if (strlen(buf) > 6 && (!strncmp(buf, "+CPBR:", 6) || !strncmp(buf + 1, "+CPBR:", 6))) counter++; } data->memory_status->used += counter; data->memory_status->free = drvinst->memorysize - data->memory_status->used; return error; } /* * Calculate phonebook size for SonyEricsson phones: they don't respond * with memory stats to AT+CPBS. Calculate by reading and counting all * entries (which is pretty fast). */ #define PHONEBOOKREAD_CHUNK_SIZE 200 static gn_error AT_GetMemoryStatus(gn_data *data, struct gn_statemachine *state) { at_driver_instance *drvinst = AT_DRVINST(state); gn_error ret = GN_ERR_NONE; char req[32]; int top, bottom; ret = se_at_memory_type_set(data->memory_status->memory_type, state); if (ret) return ret; ret = state->driver.functions(GN_OP_AT_GetMemoryRange, data, state); if (ret) return ret; data->memory_status->used = 0; bottom = 0; at_set_charset(data, state, AT_CHAR_UCS2); top = (bottom + PHONEBOOKREAD_CHUNK_SIZE > drvinst->memorysize) ? drvinst->memorysize : bottom + PHONEBOOKREAD_CHUNK_SIZE; while (top <= drvinst->memorysize) { snprintf(req, sizeof(req) - 1, "AT+CPBR=%d,%d\r", drvinst->memoryoffset + 1 + bottom, top + drvinst->memoryoffset); ret = sm_message_send(strlen(req), GN_OP_GetMemoryStatus, req, state); if (ret) return GN_ERR_NOTREADY; ret = sm_block_no_retry(GN_OP_GetMemoryStatus, data, state); if (ret) return ret; bottom = top; top = bottom + PHONEBOOKREAD_CHUNK_SIZE; if (bottom >= drvinst->memorysize) break; if (top > drvinst->memorysize) top = drvinst->memorysize; } dprintf("Got %d entries\n", data->memory_status->used); return ret; } void at_sonyericsson_init(char* foundmodel, char* setupmodel, struct gn_statemachine *state) { /* Sony Ericssons support just mode 2 */ AT_DRVINST(state)->cnmi_mode = 2; AT_DRVINST(state)->encode_memory_type = 1; AT_DRVINST(state)->encode_number = 1; AT_DRVINST(state)->lac_swapped = 1; /* * Calculate phonebook size for SonyEricsson phones: they don't respond * with memory stats to AT+CPBS. Calculate by reading and counting all * entries (which is fast -- just one command). */ at_insert_send_function(GN_OP_GetMemoryStatus, AT_GetMemoryStatus, state); at_insert_recv_function(GN_OP_GetMemoryStatus, ReplyMemoryStatus, state); } gnokii-0.6.31/common/phones/gnapplet.c0000644000175000017500000013741611666163120015761 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2004-2005 BORBELY Zoltan This file provides functions specific to the gnapplet series. See README for more details on supported mobile phones. */ #include "config.h" #include #include #include #include #include "compat.h" #include "misc.h" #include "phones/generic.h" #include "phones/gnapplet.h" #include "links/gnbus.h" #include "pkt.h" #include "gnokii-internal.h" #include "gnokii.h" #define DRVINSTANCE(s) (*((gnapplet_driver_instance **)(&(s)->driver.driver_instance))) #define FREE(p) do { free(p); (p) = NULL; } while (0) #define REQUEST_DEFN(n) \ unsigned char req[n]; \ pkt_buffer pkt; \ pkt_buffer_set(&pkt, req, sizeof(req)) #define REQUEST_DEF REQUEST_DEFN(1024) #define REPLY_DEF \ pkt_buffer pkt; \ uint16_t code; \ gn_error error; \ pkt_buffer_set(&pkt, message, length); \ code = pkt_get_uint16(&pkt); \ error = pkt_get_uint16(&pkt) #define SEND_MESSAGE_BLOCK(type) \ do { \ if (sm_message_send(pkt.offs, type, pkt.addr, state)) return GN_ERR_NOTREADY; \ return sm_block(type, data, state); \ } while (0) #define SEND_MESSAGE_BLOCK_NO_RETRY(type) \ do { \ if (sm_message_send(pkt.offs, type, pkt.addr, state)) return GN_ERR_NOTREADY; \ return sm_block_no_retry(type, data, state); \ } while (0) /* static functions prototypes */ static gn_error gnapplet_functions(gn_operation op, gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_initialise(struct gn_statemachine *state); static gn_error gnapplet_get_phone_info(gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_identify(gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_read_phonebook(gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_write_phonebook(gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_delete_phonebook(gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_memory_status(gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_get_network_info(gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_get_rf_level(gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_get_power_info(gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_sms_get_status(gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_sms_folder_list(gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_sms_folder_status(gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_sms_folder_create(gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_sms_folder_delete(gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_sms_message_read_nv(gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_sms_message_read(gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_sms_message_write(gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_sms_message_send(gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_sms_message_delete_nv(gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_sms_message_delete(gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_sms_center_read(gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_sms_center_write(gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_calendar_note_read(gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_calendar_note_write(gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_calendar_note_delete(gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_calendar_todo_read(gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_calendar_todo_write(gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_calendar_todo_delete(gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_calendar_todo_delete_all(gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_clock_datetime_read(gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_clock_datetime_write(gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_clock_alarm_read(gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_clock_alarm_write(gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_profile_read(gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_profile_active_read(gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_profile_active_write(gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_incoming_info(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_incoming_phonebook(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_incoming_netinfo(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_incoming_power(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_incoming_debug(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_incoming_sms(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_incoming_calendar(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_incoming_clock(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_error gnapplet_incoming_profile(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); static gn_incoming_function_type gnapplet_incoming_functions[] = { { GNAPPLET_MSG_INFO, gnapplet_incoming_info }, { GNAPPLET_MSG_PHONEBOOK, gnapplet_incoming_phonebook }, { GNAPPLET_MSG_NETINFO, gnapplet_incoming_netinfo }, { GNAPPLET_MSG_POWER, gnapplet_incoming_power }, { GNAPPLET_MSG_DEBUG, gnapplet_incoming_debug }, { GNAPPLET_MSG_SMS, gnapplet_incoming_sms }, { GNAPPLET_MSG_CALENDAR, gnapplet_incoming_calendar }, { GNAPPLET_MSG_CLOCK, gnapplet_incoming_clock }, { GNAPPLET_MSG_PROFILE, gnapplet_incoming_profile }, { 0, NULL} }; gn_driver driver_gnapplet = { gnapplet_incoming_functions, pgen_incoming_default, /* Mobile phone information */ { "gnapplet|symbian|3650|6600|sx1", /* Supported models */ 0, /* Max RF Level */ 100, /* Min RF Level */ GN_RF_Percentage, /* RF level units */ 7, /* Max Battery Level */ 0, /* Min Battery Level */ GN_BU_Percentage, /* Battery level units */ GN_DT_DateTime, /* Have date/time support */ GN_DT_TimeOnly, /* Alarm supports time only */ 1, /* Alarms available - FIXME */ 48, 84, /* Startup logo size */ 14, 72, /* Op logo size */ 14, 72 /* Caller logo size */ }, gnapplet_functions, NULL }; static int pdu_deliver[] = {2, 17, 23, 4, 7, 9, 10, 11, 16, 24, -1}; static int pdu_submit[] = {25, 3, 17, 23, 5, 6, 8, 9, 10, 12, 16, 24, -1}; static int pdu_status_report[] = {23, 2, 26, 6, 14, 11, 13, 15, 27, 9, 10, 16, 24, -1}; static unsigned char gnapplet_get_addrlen(const unsigned char *addr) { if (!addr[0]) return 0; return (addr[0] + 1) / 2 + 1; } static unsigned char gnapplet_get_semi(const unsigned char *addr) { int l; if (!addr[0]) return 0; l = 2 * (addr[0] - 1); return ((addr[addr[0]] & 0xf0) == 0xf0) ? l - 1 : l; } static gn_error gnapplet_sms_pdu_decode(gn_sms_raw *rawsms, const unsigned char *buf, int len) { const unsigned char *pos; unsigned char first_octet; int *pdu_format; int i, l; pos = buf; /* smsc address */ l = gnapplet_get_addrlen(pos); assert(l >= 0 && l < sizeof(rawsms->message_center)); rawsms->message_center[0] = l; memcpy(rawsms->message_center + 1, pos + 1, l); pos += l + 1; /* first octet */ first_octet = *pos++; rawsms->type = (first_octet & 0x03) << 1; switch (rawsms->type) { case GN_SMS_MT_Deliver: pdu_format = pdu_deliver; break; case GN_SMS_MT_Submit: pdu_format = pdu_submit; break; case GN_SMS_MT_StatusReport: pdu_format = pdu_status_report; break; default: return GN_ERR_FAILED; } for (i = 0; pdu_format[i] > 0; i++) { switch (pdu_format[i]) { case 2: /* TP-MMS */ rawsms->more_messages = ((first_octet & 0x04) != 0); break; case 3: /* TP-VPF */ rawsms->validity_indicator = (first_octet & 0x18) >> 3; break; case 4: /* TP-SRI */ case 5: /* TP-SRR */ case 26:/* TP-SRQ */ rawsms->report = ((first_octet & 0x20) != 0); break; case 6: /* TP-MR */ rawsms->reference = *pos++; break; case 7: /* TP-OA */ case 8: /* TP-DA */ case 14:/* TP-RA */ l = gnapplet_get_addrlen(pos) + 1; assert(l > 0 && l <= sizeof(rawsms->remote_number)); memcpy(rawsms->remote_number, pos, l); pos += l; break; case 9: /* TP-PID */ rawsms->pid = *pos++; break; case 10:/* TP-DCS */ rawsms->dcs = *pos++; break; case 11:/* TP-SCTS */ memcpy(rawsms->smsc_time, pos, 7); pos += 7; break; case 12:/* TP-VP */ switch (rawsms->validity_indicator) { case GN_SMS_VP_None: l = 0; break; case GN_SMS_VP_RelativeFormat: l = 1; break; default: l = 7; break; } memcpy(rawsms->validity, pos, l); pos += l; break; case 13:/* TP-DT */ memcpy(rawsms->time, pos, 7); pos += 7; break; case 15:/* TP-ST */ case 22:/* TP-FCS */ rawsms->report_status = *pos++; break; case 16:/* TP-UDL */ case 20:/* TP-CDL */ rawsms->length = *pos++; break; case 17:/* TP-RP */ rawsms->reply_via_same_smsc = ((first_octet & 0x80) != 0); break; case 18:/* TP-MN */ rawsms->number = *pos++; break; case 19:/* TP-CT */ pos++; /* unused */ break; case 21:/* TP-CD */ case 24:/* TP-UD */ rawsms->user_data_length = len - (pos - buf); assert(rawsms->user_data_length >= 0 && rawsms->user_data_length < sizeof(rawsms->user_data)); memcpy(rawsms->user_data, pos, rawsms->user_data_length); pos += rawsms->user_data_length; break; case 23:/* TP-UDHI */ rawsms->udh_indicator = (first_octet & 0x40); break; case 25:/* TP-RD */ rawsms->reject_duplicates = ((first_octet & 0x04) != 0); break; case 27:/* TP-PI */ pos++; /* unused */ break; } } return GN_ERR_NONE; } static gn_error gnapplet_sms_pdu_encode(unsigned char *buf, int *len, const gn_sms_raw *rawsms) { unsigned char *pos, *fpos, first_octet; int *pdu_format; int i, l; memset(buf, 0, *len); pos = buf; /* smsc address */ *pos++ = gnapplet_get_semi(rawsms->message_center); memcpy(pos, rawsms->message_center + 1, rawsms->message_center[0]); pos += rawsms->message_center[0]; /* first octet */ fpos = pos++; first_octet = rawsms->type >> 1; switch (rawsms->type) { case GN_SMS_MT_Deliver: pdu_format = pdu_deliver; break; case GN_SMS_MT_Submit: pdu_format = pdu_submit; break; case GN_SMS_MT_StatusReport: pdu_format = pdu_status_report; break; default: return GN_ERR_FAILED; } for (i = 0; pdu_format[i] > 0; i++) { switch (pdu_format[i]) { case 2: /* TP-MMS */ if (rawsms->more_messages) first_octet |= 0x04; break; case 3: /* TP-VPF */ first_octet |= rawsms->validity_indicator << 3; break; case 4: /* TP-SRI */ case 5: /* TP-SRR */ case 26:/* TP-SRQ */ if (rawsms->report) first_octet |= 0x20; break; case 6: /* TP-MR */ *pos++ = rawsms->reference; break; case 7: /* TP-OA */ case 8: /* TP-DA */ case 14:/* TP-RA */ l = gnapplet_get_addrlen(rawsms->remote_number) + 1; assert(l > 0 && l <= sizeof(rawsms->remote_number)); memcpy(pos, rawsms->remote_number, l); pos += l; break; case 9: /* TP-PID */ *pos++ = rawsms->pid; break; case 10:/* TP-DCS */ *pos++ = rawsms->dcs; break; case 11:/* TP-SCTS */ memcpy(pos, rawsms->smsc_time, 7); pos += 7; break; case 12:/* TP-VP */ switch (rawsms->validity_indicator) { case GN_SMS_VP_None: l = 0; break; case GN_SMS_VP_RelativeFormat: l = 1; break; default: l = 7; break; } memcpy(pos, rawsms->validity, l); pos += l; break; case 13:/* TP-DT */ memcpy(pos, rawsms->time, 7); pos += 7; break; case 15:/* TP-ST */ case 22:/* TP-FCS */ *pos++ = rawsms->report_status; break; case 16:/* TP-UDL */ case 20:/* TP-CDL */ *pos++ = rawsms->length; break; case 17:/* TP-RP */ if (rawsms->reply_via_same_smsc) first_octet |= 0x80; break; case 18:/* TP-MN */ *pos++ = rawsms->number; break; case 19:/* TP-CT */ pos++; /* unused */ break; case 21:/* TP-CD */ case 24:/* TP-UD */ assert(rawsms->user_data_length <= *len - (pos - buf)); memcpy(pos, rawsms->user_data, rawsms->user_data_length); pos += rawsms->user_data_length; break; case 23:/* TP-UDHI */ if (rawsms->udh_indicator) first_octet |= 0x40; break; case 25:/* TP-RD */ if (rawsms->reject_duplicates) first_octet |= 0x04; break; case 27:/* TP-PI */ pos++; /* unused */ break; } } *fpos = first_octet; *len = pos - buf; return GN_ERR_NONE; } static gn_error gnapplet_functions(gn_operation op, gn_data *data, struct gn_statemachine *state) { if (!DRVINSTANCE(state) && op != GN_OP_Init) return GN_ERR_INTERNALERROR; switch (op) { case GN_OP_Init: if (DRVINSTANCE(state)) return GN_ERR_INTERNALERROR; return gnapplet_initialise(state); case GN_OP_Terminate: FREE(DRVINSTANCE(state)); return pgen_terminate(data, state); case GN_OP_GetImei: case GN_OP_GetModel: case GN_OP_GetRevision: case GN_OP_GetManufacturer: case GN_OP_Identify: return gnapplet_identify(data, state); case GN_OP_ReadPhonebook: return gnapplet_read_phonebook(data, state); case GN_OP_WritePhonebook: return gnapplet_write_phonebook(data, state); case GN_OP_DeletePhonebook: return gnapplet_delete_phonebook(data, state); case GN_OP_GetMemoryStatus: return gnapplet_memory_status(data, state); case GN_OP_GetNetworkInfo: return gnapplet_get_network_info(data, state); case GN_OP_GetRFLevel: return gnapplet_get_rf_level(data, state); case GN_OP_GetBatteryLevel: case GN_OP_GetPowersource: return gnapplet_get_power_info(data, state); case GN_OP_GetSMSStatus: return gnapplet_sms_get_status(data, state); case GN_OP_GetSMSFolders: return gnapplet_sms_folder_list(data, state); case GN_OP_GetSMSFolderStatus: return gnapplet_sms_folder_status(data, state); case GN_OP_CreateSMSFolder: return gnapplet_sms_folder_create(data, state); case GN_OP_DeleteSMSFolder: return gnapplet_sms_folder_delete(data, state); case GN_OP_GetSMSnoValidate: return gnapplet_sms_message_read_nv(data, state); case GN_OP_GetSMS: return gnapplet_sms_message_read(data, state); case GN_OP_SaveSMS: return gnapplet_sms_message_write(data, state); case GN_OP_SendSMS: return gnapplet_sms_message_send(data, state); case GN_OP_DeleteSMSnoValidate: return gnapplet_sms_message_delete_nv(data, state); case GN_OP_DeleteSMS: return gnapplet_sms_message_delete(data, state); case GN_OP_GetSMSCenter: return gnapplet_sms_center_read(data, state); case GN_OP_SetSMSCenter: return gnapplet_sms_center_write(data, state); case GN_OP_GetCalendarNote: return gnapplet_calendar_note_read(data, state); case GN_OP_WriteCalendarNote: return gnapplet_calendar_note_write(data, state); case GN_OP_DeleteCalendarNote: return gnapplet_calendar_note_delete(data, state); case GN_OP_GetToDo: return gnapplet_calendar_todo_read(data, state); case GN_OP_WriteToDo: return gnapplet_calendar_todo_write(data, state); case GN_OP_DeleteAllToDos: return gnapplet_calendar_todo_delete_all(data, state); case GN_OP_GetDateTime: return gnapplet_clock_datetime_read(data, state); case GN_OP_SetDateTime: return gnapplet_clock_datetime_write(data, state); case GN_OP_GetAlarm: return gnapplet_clock_alarm_read(data, state); case GN_OP_SetAlarm: return gnapplet_clock_alarm_write(data, state); case GN_OP_GetProfile: return gnapplet_profile_read(data, state); case GN_OP_GetActiveProfile: return gnapplet_profile_active_read(data, state); case GN_OP_SetActiveProfile: return gnapplet_profile_active_write(data, state); default: dprintf("gnapplet unimplemented operation: %d\n", op); return GN_ERR_NOTIMPLEMENTED; } } static gn_error gnapplet_initialise(struct gn_statemachine *state) { gn_error err; gn_data d; /* Copy in the phone info */ memcpy(&(state->driver), &driver_gnapplet, sizeof(gn_driver)); if (!(DRVINSTANCE(state) = calloc(1, sizeof(gnapplet_driver_instance)))) return GN_ERR_MEMORYFULL; switch (state->config.connection_type) { case GN_CT_Irda: case GN_CT_Serial: case GN_CT_Infrared: case GN_CT_TCP: case GN_CT_Bluetooth: err = gnbus_initialise(state); break; default: FREE(DRVINSTANCE(state)); return GN_ERR_NOTSUPPORTED; } if (err != GN_ERR_NONE) { dprintf("Error in link initialisation\n"); FREE(DRVINSTANCE(state)); return GN_ERR_NOTSUPPORTED; } sm_initialise(state); gn_data_clear(&d); if ((err = gnapplet_identify(&d, state)) != GN_ERR_NONE) { FREE(DRVINSTANCE(state)); return err; } return GN_ERR_NONE; } static gn_error gnapplet_get_phone_info(gn_data *data, struct gn_statemachine *state) { REQUEST_DEF; pkt_put_uint16(&pkt, GNAPPLET_MSG_INFO_ID_REQ); SEND_MESSAGE_BLOCK(GNAPPLET_MSG_INFO); } static gn_error gnapplet_identify(gn_data *data, struct gn_statemachine *state) { gnapplet_driver_instance *drvinst = DRVINSTANCE(state); gn_error error; if (!drvinst->manufacturer[0]) { if ((error = gnapplet_get_phone_info(data, state)) != GN_ERR_NONE) return error; } if (data->manufacturer) snprintf(data->manufacturer, GN_MANUFACTURER_MAX_LENGTH, "%s", drvinst->manufacturer); if (data->model) snprintf(data->model, GN_MODEL_MAX_LENGTH, "%s", drvinst->model); if (data->imei) snprintf(data->imei, GN_IMEI_MAX_LENGTH, "%s", drvinst->imei); if (data->revision) snprintf(data->revision, GN_REVISION_MAX_LENGTH, "SW %s, HW %s", drvinst->sw_version, drvinst->hw_version); //data->phone = drvinst->phone; return GN_ERR_NONE; } static gn_error gnapplet_incoming_info(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { gnapplet_driver_instance *drvinst = DRVINSTANCE(state); REPLY_DEF; switch (code) { case GNAPPLET_MSG_INFO_ID_RESP: if (error != GN_ERR_NONE) return error; drvinst->proto_major = pkt_get_uint16(&pkt); drvinst->proto_minor = pkt_get_uint16(&pkt); /* Compatibility isn't important early in the development */ /* if (proto_major != GNAPPLET_MAJOR_VERSION) { */ if (drvinst->proto_major != GNAPPLET_MAJOR_VERSION || drvinst->proto_minor != GNAPPLET_MINOR_VERSION) { dprintf("gnapplet version: %d.%d, gnokii driver: %d.%d\n", drvinst->proto_major, drvinst->proto_minor, GNAPPLET_MAJOR_VERSION, GNAPPLET_MINOR_VERSION); return GN_ERR_INTERNALERROR; } pkt_get_string(drvinst->manufacturer, sizeof(drvinst->manufacturer), &pkt); pkt_get_string(drvinst->model, sizeof(drvinst->model), &pkt); pkt_get_string(drvinst->imei, sizeof(drvinst->imei), &pkt); pkt_get_string(drvinst->sw_version, sizeof(drvinst->sw_version), &pkt); pkt_get_string(drvinst->hw_version, sizeof(drvinst->hw_version), &pkt); break; default: return GN_ERR_UNHANDLEDFRAME; } return GN_ERR_NONE; } static gn_error gnapplet_read_phonebook(gn_data *data, struct gn_statemachine *state) { REQUEST_DEF; if (!data->phonebook_entry) return GN_ERR_INTERNALERROR; pkt_put_uint16(&pkt, GNAPPLET_MSG_PHONEBOOK_READ_REQ); pkt_put_uint16(&pkt, data->phonebook_entry->memory_type); pkt_put_uint32(&pkt, data->phonebook_entry->location); SEND_MESSAGE_BLOCK(GNAPPLET_MSG_PHONEBOOK); } static gn_error gnapplet_write_phonebook(gn_data *data, struct gn_statemachine *state) { gn_phonebook_subentry *se; int i, need_defnumber; REQUEST_DEF; if (!data->phonebook_entry) return GN_ERR_INTERNALERROR; if (!data->phonebook_entry->name[0]) return gnapplet_delete_phonebook(data, state); need_defnumber = 1; for (i = 0; i < data->phonebook_entry->subentries_count; i++) { se = data->phonebook_entry->subentries + i; if (se->entry_type == GN_PHONEBOOK_ENTRY_Number && strcmp(se->data.number, data->phonebook_entry->number) == 0) { need_defnumber = 0; break; } } pkt_put_uint16(&pkt, GNAPPLET_MSG_PHONEBOOK_WRITE_REQ); pkt_put_uint16(&pkt, data->phonebook_entry->memory_type); pkt_put_uint32(&pkt, data->phonebook_entry->location); pkt_put_uint16(&pkt, data->phonebook_entry->subentries_count + 1 + need_defnumber); pkt_put_uint16(&pkt, GN_PHONEBOOK_ENTRY_Name); pkt_put_uint16(&pkt, 0); pkt_put_string(&pkt, data->phonebook_entry->name); if (need_defnumber) { pkt_put_uint16(&pkt, GN_PHONEBOOK_ENTRY_Number); pkt_put_uint16(&pkt, GN_PHONEBOOK_NUMBER_General); pkt_put_string(&pkt, data->phonebook_entry->number); } for (i = 0; i < data->phonebook_entry->subentries_count; i++) { se = data->phonebook_entry->subentries + i; pkt_put_uint16(&pkt, se->entry_type); pkt_put_uint16(&pkt, se->number_type); pkt_put_string(&pkt, se->data.number); } SEND_MESSAGE_BLOCK(GNAPPLET_MSG_PHONEBOOK); } static gn_error gnapplet_delete_phonebook(gn_data *data, struct gn_statemachine *state) { REQUEST_DEF; if (!data->phonebook_entry) return GN_ERR_INTERNALERROR; pkt_put_uint16(&pkt, GNAPPLET_MSG_PHONEBOOK_DELETE_REQ); pkt_put_uint16(&pkt, data->phonebook_entry->memory_type); pkt_put_uint32(&pkt, data->phonebook_entry->location); SEND_MESSAGE_BLOCK(GNAPPLET_MSG_PHONEBOOK); } static gn_error gnapplet_memory_status(gn_data *data, struct gn_statemachine *state) { REQUEST_DEF; if (!data->memory_status) return GN_ERR_INTERNALERROR; pkt_put_uint16(&pkt, GNAPPLET_MSG_PHONEBOOK_STATUS_REQ); pkt_put_uint16(&pkt, data->memory_status->memory_type); SEND_MESSAGE_BLOCK(GNAPPLET_MSG_PHONEBOOK); } static gn_error gnapplet_incoming_phonebook(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { int i, n, type, subtype; gn_phonebook_entry *entry; gn_phonebook_subentry *se; REPLY_DEF; switch (code) { case GNAPPLET_MSG_PHONEBOOK_READ_RESP: if (!(entry = data->phonebook_entry)) return GN_ERR_INTERNALERROR; entry->empty = true; entry->caller_group = 5; entry->name[0] = '\0'; entry->number[0] = '\0'; entry->subentries_count = 0; memset(&entry->date, 0, sizeof(entry->date)); if (error != GN_ERR_NONE) return error; entry->empty = false; n = pkt_get_uint16(&pkt); assert(n < GN_PHONEBOOK_SUBENTRIES_MAX_NUMBER); for (i = 0; i < n; i++) { se = entry->subentries + entry->subentries_count; type = pkt_get_uint16(&pkt); subtype = pkt_get_uint16(&pkt); switch (type) { case GN_PHONEBOOK_ENTRY_Name: pkt_get_string(entry->name, sizeof(entry->name), &pkt); break; case GN_PHONEBOOK_ENTRY_Number: se->entry_type = type; se->number_type = subtype; se->id = 0; pkt_get_string(se->data.number, sizeof(se->data.number), &pkt); entry->subentries_count++; if (!entry->number[0]) { snprintf(entry->number, sizeof(entry->number), "%s", se->data.number); } break; case GN_PHONEBOOK_ENTRY_Date: se->entry_type = type; se->number_type = subtype; se->id = 0; pkt_get_timestamp(&se->data.date, &pkt); entry->subentries_count++; entry->date = se->data.date; break; default: se->entry_type = type; se->number_type = subtype; se->id = 0; pkt_get_string(se->data.number, sizeof(se->data.number), &pkt); entry->subentries_count++; break; } } break; case GNAPPLET_MSG_PHONEBOOK_WRITE_RESP: if (!(entry = data->phonebook_entry)) return GN_ERR_INTERNALERROR; if (error != GN_ERR_NONE) return error; entry->memory_type = pkt_get_uint16(&pkt); entry->location = pkt_get_uint32(&pkt); break; case GNAPPLET_MSG_PHONEBOOK_DELETE_RESP: if (!(entry = data->phonebook_entry)) return GN_ERR_INTERNALERROR; if (error != GN_ERR_NONE) return error; entry->memory_type = pkt_get_uint16(&pkt); entry->location = pkt_get_uint32(&pkt); break; case GNAPPLET_MSG_PHONEBOOK_STATUS_RESP: if (!data->memory_status) return GN_ERR_INTERNALERROR; if (error != GN_ERR_NONE) return error; data->memory_status->memory_type = pkt_get_uint16(&pkt); data->memory_status->used = pkt_get_uint32(&pkt); data->memory_status->free = pkt_get_uint32(&pkt); break; default: return GN_ERR_UNHANDLEDFRAME; } return GN_ERR_NONE; } static gn_error gnapplet_get_network_info(gn_data *data, struct gn_statemachine *state) { REQUEST_DEF; if (!data->network_info) return GN_ERR_INTERNALERROR; pkt_put_uint16(&pkt, GNAPPLET_MSG_NETINFO_GETCURRENT_REQ); SEND_MESSAGE_BLOCK(GNAPPLET_MSG_NETINFO); } static gn_error gnapplet_get_rf_level(gn_data *data, struct gn_statemachine *state) { REQUEST_DEF; if (!data->rf_unit || !data->rf_level) return GN_ERR_INTERNALERROR; pkt_put_uint16(&pkt, GNAPPLET_MSG_NETINFO_GETRFLEVEL_REQ); SEND_MESSAGE_BLOCK(GNAPPLET_MSG_NETINFO); } static gn_error gnapplet_incoming_netinfo(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { gn_network_info *netinfo; uint16_t cellid, lac; REPLY_DEF; switch (code) { case GNAPPLET_MSG_NETINFO_GETCURRENT_RESP: if (!(netinfo = data->network_info)) return GN_ERR_INTERNALERROR; memset(netinfo, 0, sizeof(gn_network_info)); if (error != GN_ERR_NONE) return error; cellid = pkt_get_uint16(&pkt); netinfo->cell_id[0] = cellid / 256; netinfo->cell_id[1] = cellid % 256; lac = pkt_get_uint16(&pkt); netinfo->LAC[0] = lac / 256; netinfo->LAC[1] = lac % 256; pkt_get_uint8(&pkt); /* registration status */ pkt_get_string(netinfo->network_code, sizeof(netinfo->network_code), &pkt); break; case GNAPPLET_MSG_NETINFO_GETRFLEVEL_RESP: if (!data->rf_unit || !data->rf_level) return GN_ERR_INTERNALERROR; if (error != GN_ERR_NONE) return error; *data->rf_unit = GN_RF_Percentage; *data->rf_level = pkt_get_uint8(&pkt); break; default: return GN_ERR_UNHANDLEDFRAME; } return GN_ERR_NONE; } static gn_error gnapplet_get_power_info(gn_data *data, struct gn_statemachine *state) { REQUEST_DEF; if (!data->battery_unit && !data->battery_level && !data->power_source) return GN_ERR_INTERNALERROR; pkt_put_uint16(&pkt, GNAPPLET_MSG_POWER_INFO_REQ); SEND_MESSAGE_BLOCK(GNAPPLET_MSG_POWER); } static gn_error gnapplet_incoming_power(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { uint8_t percent, source; REPLY_DEF; switch (code) { case GNAPPLET_MSG_POWER_INFO_RESP: percent = pkt_get_uint8(&pkt); source = pkt_get_uint8(&pkt); if (error != GN_ERR_NONE) return error; if (data->battery_unit) *data->battery_unit = GN_BU_Percentage; if (data->battery_level) *data->battery_level = percent; if (data->power_source) *data->power_source = source; break; default: return GN_ERR_UNHANDLEDFRAME; } return GN_ERR_NONE; } static gn_error gnapplet_incoming_debug(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { char msg[1024]; REPLY_DEF; switch (code) { case GNAPPLET_MSG_DEBUG_NOTIFICATION: if (error != GN_ERR_NONE) return error; pkt_get_string(msg, sizeof(msg), &pkt); dprintf("PHONE: %s\n", msg); break; default: return GN_ERR_UNHANDLEDFRAME; } return GN_ERR_UNSOLICITED; } static gn_error gnapplet_sms_get_status(gn_data *data, struct gn_statemachine *state) { REQUEST_DEF; if (!data->sms_status) return GN_ERR_INTERNALERROR; pkt_put_uint16(&pkt, GNAPPLET_MSG_SMS_STATUS_REQ); SEND_MESSAGE_BLOCK(GNAPPLET_MSG_SMS); } static gn_error gnapplet_sms_folder_list(gn_data *data, struct gn_statemachine *state) { REQUEST_DEF; if (!data->sms_folder_list) return GN_ERR_INTERNALERROR; pkt_put_uint16(&pkt, GNAPPLET_MSG_SMS_FOLDER_LIST_REQ); SEND_MESSAGE_BLOCK(GNAPPLET_MSG_SMS); } static gn_error gnapplet_sms_folder_status(gn_data *data, struct gn_statemachine *state) { REQUEST_DEF; if (!data->sms_folder) return GN_ERR_INTERNALERROR; pkt_put_uint16(&pkt, GNAPPLET_MSG_SMS_FOLDER_STATUS_REQ); pkt_put_uint16(&pkt, data->sms_folder->folder_id); SEND_MESSAGE_BLOCK(GNAPPLET_MSG_SMS); } static gn_error gnapplet_sms_folder_create(gn_data *data, struct gn_statemachine *state) { REQUEST_DEF; if (!data->sms_folder) return GN_ERR_INTERNALERROR; pkt_put_uint16(&pkt, GNAPPLET_MSG_SMS_FOLDER_CREATE_REQ); pkt_put_string(&pkt, data->sms_folder->name); SEND_MESSAGE_BLOCK(GNAPPLET_MSG_SMS); } static gn_error gnapplet_sms_folder_delete(gn_data *data, struct gn_statemachine *state) { REQUEST_DEF; if (!data->sms_folder) return GN_ERR_INTERNALERROR; pkt_put_uint16(&pkt, GNAPPLET_MSG_SMS_FOLDER_DELETE_REQ); pkt_put_uint16(&pkt, data->sms_folder->folder_id); SEND_MESSAGE_BLOCK(GNAPPLET_MSG_SMS); } static gn_error gnapplet_sms_validate(gn_data *data, struct gn_statemachine *state) { gn_error error; if (!data->sms_folder) return GN_ERR_INTERNALERROR; if (data->sms_folder->folder_id != data->raw_sms->memory_type) { data->sms_folder->folder_id = data->raw_sms->memory_type; if ((error = gnapplet_sms_folder_status(data, state)) != GN_ERR_NONE) return error; } if (data->raw_sms->number < 1) return GN_ERR_INVALIDLOCATION; if (data->raw_sms->number > data->sms_folder->number) return GN_ERR_EMPTYLOCATION; return GN_ERR_NONE; } static gn_error gnapplet_sms_message_read_nv(gn_data *data, struct gn_statemachine *state) { REQUEST_DEF; if (!data->raw_sms) return GN_ERR_INTERNALERROR; pkt_put_uint16(&pkt, GNAPPLET_MSG_SMS_MESSAGE_READ_REQ); pkt_put_uint16(&pkt, data->raw_sms->memory_type); pkt_put_uint32(&pkt, data->raw_sms->number); SEND_MESSAGE_BLOCK(GNAPPLET_MSG_SMS); } static gn_error gnapplet_sms_message_read(gn_data *data, struct gn_statemachine *state) { gn_error error; if (!data->raw_sms) return GN_ERR_INTERNALERROR; if ((error = gnapplet_sms_validate(data, state)) != GN_ERR_NONE) return error; data->raw_sms->number = data->sms_folder->locations[data->raw_sms->number - 1]; return gnapplet_sms_message_read_nv(data, state); } static gn_error gnapplet_sms_message_write(gn_data *data, struct gn_statemachine *state) { unsigned char buf[256]; gn_error error; int n; REQUEST_DEF; if (!data->raw_sms) return GN_ERR_INTERNALERROR; n = sizeof(buf); if ((error = gnapplet_sms_pdu_encode(buf, &n, data->raw_sms)) != GN_ERR_NONE) return error; //if ((error = gnapplet_sms_validate(data, state)) != GN_ERR_NONE) return error; //data->raw_sms->number = data->sms_folder->locations[data->raw_sms->number - 1]; pkt_put_uint16(&pkt, GNAPPLET_MSG_SMS_MESSAGE_WRITE_REQ); pkt_put_uint16(&pkt, data->raw_sms->memory_type); pkt_put_uint32(&pkt, data->raw_sms->number); pkt_put_bytes(&pkt, buf, n); SEND_MESSAGE_BLOCK(GNAPPLET_MSG_SMS); } static gn_error gnapplet_sms_message_send(gn_data *data, struct gn_statemachine *state) { unsigned char buf[256]; gn_error error; int n; REQUEST_DEF; if (!data->raw_sms) return GN_ERR_INTERNALERROR; n = sizeof(buf); if ((error = gnapplet_sms_pdu_encode(buf, &n, data->raw_sms)) != GN_ERR_NONE) return error; pkt_put_uint16(&pkt, GNAPPLET_MSG_SMS_MESSAGE_SEND_REQ); pkt_put_bytes(&pkt, buf, n); SEND_MESSAGE_BLOCK_NO_RETRY(GNAPPLET_MSG_SMS); } static gn_error gnapplet_sms_message_delete_nv(gn_data *data, struct gn_statemachine *state) { REQUEST_DEF; if (!data->raw_sms) return GN_ERR_INTERNALERROR; pkt_put_uint16(&pkt, GNAPPLET_MSG_SMS_MESSAGE_DELETE_REQ); pkt_put_uint16(&pkt, data->raw_sms->memory_type); pkt_put_uint32(&pkt, data->raw_sms->number); SEND_MESSAGE_BLOCK(GNAPPLET_MSG_SMS); } static gn_error gnapplet_sms_message_delete(gn_data *data, struct gn_statemachine *state) { gn_error error; if (!data->raw_sms) return GN_ERR_INTERNALERROR; if ((error = gnapplet_sms_validate(data, state)) != GN_ERR_NONE) return error; data->raw_sms->number = data->sms_folder->locations[data->raw_sms->number - 1]; return gnapplet_sms_message_delete_nv(data, state); } #if 0 static gn_error gnapplet_sms_message_move_nv(gn_data *data, struct gn_statemachine *state) { REQUEST_DEF; if (!data->raw_sms) return GN_ERR_INTERNALERROR; pkt_put_uint16(&pkt, GNAPPLET_MSG_SMS_MESSAGE_MOVE_REQ); pkt_put_uint16(&pkt, data->raw_sms->memory_type); pkt_put_uint32(&pkt, data->raw_sms->number); pkt_put_uint16(&pkt, 0); /* FIXME */ SEND_MESSAGE_BLOCK(GNAPPLET_MSG_SMS); } static gn_error gnapplet_sms_message_move(gn_data *data, struct gn_statemachine *state) { gn_error error; if (!data->raw_sms) return GN_ERR_INTERNALERROR; if ((error = gnapplet_sms_validate(data, state)) != GN_ERR_NONE) return error; data->raw_sms->number = data->sms_folder->locations[data->raw_sms->number - 1]; return gnapplet_sms_message_move_nv(data, state); } #endif static gn_error gnapplet_sms_center_read(gn_data *data, struct gn_statemachine *state) { REQUEST_DEF; if (!data->message_center) return GN_ERR_INTERNALERROR; pkt_put_uint16(&pkt, GNAPPLET_MSG_SMS_CENTER_READ_REQ); pkt_put_uint16(&pkt, data->message_center->id - 1); SEND_MESSAGE_BLOCK(GNAPPLET_MSG_SMS); } static gn_error gnapplet_sms_center_write(gn_data *data, struct gn_statemachine *state) { REQUEST_DEF; if (!data->message_center) return GN_ERR_INTERNALERROR; pkt_put_uint16(&pkt, GNAPPLET_MSG_SMS_CENTER_WRITE_REQ); pkt_put_uint16(&pkt, data->message_center->id - 1); pkt_put_string(&pkt, data->message_center->name); pkt_put_int16(&pkt, data->message_center->default_name); pkt_put_uint8(&pkt, data->message_center->format); pkt_put_uint8(&pkt, data->message_center->validity); pkt_put_uint8(&pkt, data->message_center->smsc.type); pkt_put_string(&pkt, data->message_center->smsc.number); pkt_put_uint8(&pkt, data->message_center->recipient.type); pkt_put_string(&pkt, data->message_center->recipient.number); SEND_MESSAGE_BLOCK(GNAPPLET_MSG_SMS); } static gn_error gnapplet_incoming_sms(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { gn_sms_folder_list *folders; gn_sms_folder *folder; gn_sms_raw *rawsms; gn_sms_message_center *smsc; unsigned char buf[256]; int i; REPLY_DEF; switch (code) { case GNAPPLET_MSG_SMS_STATUS_RESP: if (!data->sms_status) return GN_ERR_INTERNALERROR; if (error != GN_ERR_NONE) return error; data->sms_status->number = pkt_get_uint32(&pkt); data->sms_status->unread = pkt_get_uint32(&pkt); data->sms_status->changed = pkt_get_bool(&pkt); data->sms_status->folders_count = pkt_get_uint16(&pkt); break; case GNAPPLET_MSG_SMS_FOLDER_LIST_RESP: if (!(folders = data->sms_folder_list)) return GN_ERR_INTERNALERROR; if (error != GN_ERR_NONE) return error; memset(folders, 0, sizeof(gn_sms_folder_list)); folders->number = pkt_get_uint16(&pkt); assert(folders->number <= GN_SMS_FOLDER_MAX_NUMBER); for (i = 0; i < folders->number; i++) { folders->folder[i].folder_id = pkt_get_uint16(&pkt); pkt_get_string(folders->folder[i].name, sizeof(folders->folder[i].name), &pkt); folders->folder_id[i] = folders->folder[i].folder_id; } break; case GNAPPLET_MSG_SMS_FOLDER_STATUS_RESP: if (!(folder = data->sms_folder)) return GN_ERR_INTERNALERROR; if (error != GN_ERR_NONE) return error; folder->folder_id = pkt_get_uint16(&pkt); folder->number = pkt_get_uint32(&pkt); assert(folder->number <= GN_SMS_MESSAGE_MAX_NUMBER); for (i = 0; i < folder->number; i++) { folder->locations[i] = pkt_get_uint32(&pkt); } break; case GNAPPLET_MSG_SMS_FOLDER_CREATE_RESP: if (!(folder = data->sms_folder)) return GN_ERR_INTERNALERROR; if (error != GN_ERR_NONE) return error; memset(folder, 0, sizeof(gn_sms_folder)); folder->folder_id = pkt_get_uint16(&pkt); pkt_get_string(folder->name, sizeof(folder->name), &pkt); break; case GNAPPLET_MSG_SMS_FOLDER_DELETE_RESP: if (!(folder = data->sms_folder)) return GN_ERR_INTERNALERROR; if (error != GN_ERR_NONE) return error; memset(folder, 0, sizeof(gn_sms_folder)); folder->folder_id = pkt_get_uint16(&pkt); break; case GNAPPLET_MSG_SMS_MESSAGE_READ_RESP: if (!(rawsms = data->raw_sms)) return GN_ERR_INTERNALERROR; if (error != GN_ERR_NONE) return error; memset(rawsms, 0, sizeof(*rawsms)); i = pkt_get_bytes(buf, sizeof(buf), &pkt); //rawsms->memory_type = pkt_get_uint16(&pkt); rawsms->status = pkt_get_uint8(&pkt); if ((error = gnapplet_sms_pdu_decode(rawsms, buf, i)) != GN_ERR_NONE) return error; break; case GNAPPLET_MSG_SMS_MESSAGE_SEND_RESP: if (!(rawsms = data->raw_sms)) return GN_ERR_INTERNALERROR; if (error != GN_ERR_NONE) return error; break; case GNAPPLET_MSG_SMS_MESSAGE_DELETE_RESP: if (!(rawsms = data->raw_sms)) return GN_ERR_INTERNALERROR; if (error != GN_ERR_NONE) return error; break; case GNAPPLET_MSG_SMS_MESSAGE_MOVE_RESP: if (!(rawsms = data->raw_sms)) return GN_ERR_INTERNALERROR; if (error != GN_ERR_NONE) return error; break; case GNAPPLET_MSG_SMS_CENTER_READ_RESP: if (!(smsc=data->message_center)) return GN_ERR_INTERNALERROR; if (error != GN_ERR_NONE) return error; memset(smsc, 0, sizeof(*smsc)); smsc->id = pkt_get_uint16(&pkt) + 1; pkt_get_string(smsc->name, sizeof(smsc->name), &pkt); smsc->default_name = pkt_get_int16(&pkt); smsc->format = pkt_get_uint8(&pkt); smsc->validity = pkt_get_uint8(&pkt); smsc->smsc.type = pkt_get_uint8(&pkt); pkt_get_string(smsc->smsc.number, sizeof(smsc->smsc.number), &pkt); smsc->recipient.type = pkt_get_uint8(&pkt); pkt_get_string(smsc->recipient.number, sizeof(smsc->recipient.number), &pkt); break; case GNAPPLET_MSG_SMS_CENTER_WRITE_RESP: if (!(smsc=data->message_center)) return GN_ERR_INTERNALERROR; if (error != GN_ERR_NONE) return error; smsc->id = pkt_get_uint16(&pkt) + 1; break; default: return GN_ERR_UNHANDLEDFRAME; } return GN_ERR_NONE; } static gn_error gnapplet_calendar_note_read(gn_data *data, struct gn_statemachine *state) { REQUEST_DEF; if (!data->calnote) return GN_ERR_INTERNALERROR; pkt_put_uint16(&pkt, GNAPPLET_MSG_CALENDAR_NOTE_READ_REQ); pkt_put_uint32(&pkt, data->calnote->location); SEND_MESSAGE_BLOCK(GNAPPLET_MSG_CALENDAR); } static gn_error gnapplet_calendar_note_write(gn_data *data, struct gn_statemachine *state) { gn_timestamp null_ts; REQUEST_DEF; if (!data->calnote) return GN_ERR_INTERNALERROR; memset(&null_ts, 0, sizeof(null_ts)); pkt_put_uint16(&pkt, GNAPPLET_MSG_CALENDAR_NOTE_WRITE_REQ); pkt_put_uint32(&pkt, data->calnote->location); pkt_put_uint8(&pkt, data->calnote->type); pkt_put_timestamp(&pkt, &data->calnote->time); if (data->calnote->end_time.year) pkt_put_timestamp(&pkt, &data->calnote->end_time); else pkt_put_timestamp(&pkt, &null_ts); if (data->calnote->alarm.enabled && data->calnote->alarm.timestamp.year != 0) pkt_put_timestamp(&pkt, &data->calnote->alarm.timestamp); else { pkt_put_timestamp(&pkt, &null_ts); } pkt_put_string(&pkt, data->calnote->text); if (data->calnote->type == GN_CALNOTE_CALL) pkt_put_string(&pkt, data->calnote->phone_number); else pkt_put_string(&pkt, ""); if (data->calnote->type == GN_CALNOTE_MEETING) pkt_put_string(&pkt, data->calnote->mlocation); else pkt_put_string(&pkt, ""); pkt_put_uint16(&pkt, data->calnote->recurrence); SEND_MESSAGE_BLOCK(GNAPPLET_MSG_CALENDAR); } static gn_error gnapplet_calendar_note_delete(gn_data *data, struct gn_statemachine *state) { REQUEST_DEF; if (!data->calnote) return GN_ERR_INTERNALERROR; pkt_put_uint16(&pkt, GNAPPLET_MSG_CALENDAR_NOTE_DELETE_REQ); pkt_put_uint32(&pkt, data->calnote->location); SEND_MESSAGE_BLOCK(GNAPPLET_MSG_CALENDAR); } static gn_error gnapplet_calendar_todo_read(gn_data *data, struct gn_statemachine *state) { REQUEST_DEF; if (!data->todo) return GN_ERR_INTERNALERROR; pkt_put_uint16(&pkt, GNAPPLET_MSG_CALENDAR_TODO_READ_REQ); pkt_put_uint32(&pkt, data->todo->location); SEND_MESSAGE_BLOCK(GNAPPLET_MSG_CALENDAR); } static gn_error gnapplet_calendar_todo_write(gn_data *data, struct gn_statemachine *state) { REQUEST_DEF; if (!data->todo) return GN_ERR_INTERNALERROR; pkt_put_uint16(&pkt, GNAPPLET_MSG_CALENDAR_TODO_WRITE_REQ); pkt_put_uint32(&pkt, data->todo->location); pkt_put_string(&pkt, data->todo->text); pkt_put_uint8(&pkt, data->todo->priority); SEND_MESSAGE_BLOCK(GNAPPLET_MSG_CALENDAR); } static gn_error gnapplet_calendar_todo_delete(gn_data *data, struct gn_statemachine *state) { REQUEST_DEF; if (!data->todo) return GN_ERR_INTERNALERROR; pkt_put_uint16(&pkt, GNAPPLET_MSG_CALENDAR_TODO_DELETE_REQ); pkt_put_uint32(&pkt, data->todo->location); SEND_MESSAGE_BLOCK(GNAPPLET_MSG_CALENDAR); } static gn_error gnapplet_calendar_todo_delete_all(gn_data *data, struct gn_statemachine *state) { gn_error error; gn_todo todo; gn_todo *todo_save; todo_save = data->todo; memset(&todo, 0, sizeof(todo)); data->todo = &todo; do { data->todo->location = 1; error = gnapplet_calendar_todo_delete(data, state); } while (error == GN_ERR_NONE); data->todo = todo_save; return GN_ERR_NONE; } static gn_error gnapplet_incoming_calendar(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { gn_calnote *cal; gn_todo *todo; REPLY_DEF; switch (code) { case GNAPPLET_MSG_CALENDAR_NOTE_READ_RESP: if (!(cal = data->calnote)) return GN_ERR_INTERNALERROR; if (error != GN_ERR_NONE) return error; cal->location = pkt_get_uint32(&pkt); cal->type = pkt_get_uint8(&pkt); pkt_get_timestamp(&cal->time, &pkt); pkt_get_timestamp(&cal->end_time, &pkt); pkt_get_timestamp(&cal->alarm.timestamp, &pkt); cal->alarm.enabled = (cal->alarm.timestamp.year != 0); pkt_get_string(cal->text, sizeof(cal->text), &pkt); pkt_get_string(cal->phone_number, sizeof(cal->phone_number), &pkt); pkt_get_string(cal->mlocation, sizeof(cal->mlocation), &pkt); cal->recurrence = pkt_get_uint16(&pkt); break; case GNAPPLET_MSG_CALENDAR_NOTE_WRITE_RESP: if (!(cal = data->calnote)) return GN_ERR_INTERNALERROR; if (error != GN_ERR_NONE) return error; cal->location = pkt_get_uint32(&pkt); break; case GNAPPLET_MSG_CALENDAR_NOTE_DELETE_RESP: if (!(cal = data->calnote)) return GN_ERR_INTERNALERROR; if (error != GN_ERR_NONE) return error; cal->location = pkt_get_uint32(&pkt); break; case GNAPPLET_MSG_CALENDAR_TODO_READ_RESP: if (!(todo = data->todo)) return GN_ERR_INTERNALERROR; if (error != GN_ERR_NONE) return error; todo->location = pkt_get_uint32(&pkt); pkt_get_string(todo->text, sizeof(todo->text), &pkt); todo->priority = pkt_get_uint8(&pkt); break; case GNAPPLET_MSG_CALENDAR_TODO_WRITE_RESP: if (!(todo = data->todo)) return GN_ERR_INTERNALERROR; if (error != GN_ERR_NONE) return error; todo->location = pkt_get_uint32(&pkt); break; case GNAPPLET_MSG_CALENDAR_TODO_DELETE_RESP: if (!(todo = data->todo)) return GN_ERR_INTERNALERROR; if (error != GN_ERR_NONE) return error; todo->location = pkt_get_uint32(&pkt); break; default: return GN_ERR_UNHANDLEDFRAME; } return GN_ERR_NONE; } static gn_error gnapplet_clock_datetime_read(gn_data *data, struct gn_statemachine *state) { REQUEST_DEF; if (!data->datetime) return GN_ERR_INTERNALERROR; pkt_put_uint16(&pkt, GNAPPLET_MSG_CLOCK_DATETIME_READ_REQ); SEND_MESSAGE_BLOCK(GNAPPLET_MSG_CLOCK); } static gn_error gnapplet_clock_datetime_write(gn_data *data, struct gn_statemachine *state) { REQUEST_DEF; if (!data->datetime) return GN_ERR_INTERNALERROR; pkt_put_uint16(&pkt, GNAPPLET_MSG_CLOCK_DATETIME_WRITE_REQ); pkt_put_timestamp(&pkt, data->datetime); SEND_MESSAGE_BLOCK(GNAPPLET_MSG_CLOCK); } static gn_error gnapplet_clock_alarm_read(gn_data *data, struct gn_statemachine *state) { REQUEST_DEF; if (!data->alarm) return GN_ERR_INTERNALERROR; pkt_put_uint16(&pkt, GNAPPLET_MSG_CLOCK_ALARM_READ_REQ); SEND_MESSAGE_BLOCK(GNAPPLET_MSG_CLOCK); } static gn_error gnapplet_clock_alarm_write(gn_data *data, struct gn_statemachine *state) { REQUEST_DEF; if (!data->alarm) return GN_ERR_INTERNALERROR; if (!data->alarm->enabled) { data->alarm->timestamp.hour = 0; data->alarm->timestamp.minute = 0; data->alarm->timestamp.second = 0; } data->alarm->timestamp.year = 0; data->alarm->timestamp.month = 1; data->alarm->timestamp.day = 1; data->alarm->timestamp.timezone = 0; pkt_put_uint16(&pkt, GNAPPLET_MSG_CLOCK_ALARM_WRITE_REQ); pkt_put_bool(&pkt, data->alarm->enabled); pkt_put_timestamp(&pkt, &data->alarm->timestamp); SEND_MESSAGE_BLOCK(GNAPPLET_MSG_CLOCK); } static gn_error gnapplet_incoming_clock(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { REPLY_DEF; switch (code) { case GNAPPLET_MSG_CLOCK_DATETIME_READ_RESP: if (!data->datetime) return GN_ERR_INTERNALERROR; if (error != GN_ERR_NONE) return error; pkt_get_timestamp(data->datetime, &pkt); break; case GNAPPLET_MSG_CLOCK_DATETIME_WRITE_RESP: if (data->datetime) return GN_ERR_INTERNALERROR; if (error != GN_ERR_NONE) return error; break; case GNAPPLET_MSG_CLOCK_ALARM_READ_RESP: if (!data->alarm) return GN_ERR_INTERNALERROR; if (error != GN_ERR_NONE) return error; data->alarm->enabled = pkt_get_bool(&pkt); pkt_get_timestamp(&data->alarm->timestamp, &pkt); break; case GNAPPLET_MSG_CLOCK_ALARM_WRITE_RESP: if (data->alarm) return GN_ERR_INTERNALERROR; if (error != GN_ERR_NONE) return error; break; default: return GN_ERR_UNHANDLEDFRAME; } return GN_ERR_NONE; } static gn_error gnapplet_profile_read(gn_data *data, struct gn_statemachine *state) { REQUEST_DEF; if (!data->profile) return GN_ERR_INTERNALERROR; pkt_put_uint16(&pkt, GNAPPLET_MSG_PROFILE_READ_REQ); pkt_put_uint16(&pkt, data->profile->number); SEND_MESSAGE_BLOCK(GNAPPLET_MSG_PROFILE); } static gn_error gnapplet_profile_active_read(gn_data *data, struct gn_statemachine *state) { REQUEST_DEF; if (!data->profile) return GN_ERR_INTERNALERROR; pkt_put_uint16(&pkt, GNAPPLET_MSG_PROFILE_GET_ACTIVE_REQ); SEND_MESSAGE_BLOCK(GNAPPLET_MSG_PROFILE); } static gn_error gnapplet_profile_active_write(gn_data *data, struct gn_statemachine *state) { REQUEST_DEF; if (!data->profile) return GN_ERR_INTERNALERROR; pkt_put_uint16(&pkt, GNAPPLET_MSG_PROFILE_SET_ACTIVE_REQ); pkt_put_uint16(&pkt, data->profile->number); SEND_MESSAGE_BLOCK(GNAPPLET_MSG_PROFILE); } static gn_error gnapplet_incoming_profile(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { gn_profile *profile; REPLY_DEF; switch (code) { case GNAPPLET_MSG_PROFILE_READ_RESP: if (!(profile = data->profile)) return GN_ERR_INTERNALERROR; if (error != GN_ERR_NONE) return error; profile->number = pkt_get_uint16(&pkt); pkt_get_string(profile->name, sizeof(profile->name), &pkt); profile->default_name = pkt_get_int16(&pkt); profile->keypad_tone = pkt_get_uint8(&pkt); profile->lights = 0; profile->call_alert = pkt_get_uint8(&pkt); profile->ringtone = 0; //!!!FIXME profile->volume = pkt_get_uint8(&pkt); profile->message_tone = 0; profile->warning_tone = pkt_get_uint8(&pkt); profile->vibration = pkt_get_uint8(&pkt); profile->caller_groups = 0; profile->automatic_answer = 0; break; case GNAPPLET_MSG_PROFILE_GET_ACTIVE_RESP: if (!(profile = data->profile)) return GN_ERR_INTERNALERROR; if (error != GN_ERR_NONE) return error; profile->number = pkt_get_uint16(&pkt); break; case GNAPPLET_MSG_PROFILE_SET_ACTIVE_RESP: if (!(profile = data->profile)) return GN_ERR_INTERNALERROR; if (error != GN_ERR_NONE) return error; break; default: return GN_ERR_UNHANDLEDFRAME; } return GN_ERR_NONE; } gnokii-0.6.31/common/phones/nokia.c0000644000175000017500000005071611666163120015245 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 2001 Manfred Jonsson Copyright (C) 2002 Ladis Michl, Markus Plail Copyright (C) 2002-2004 BORBELY Zoltan, Pawel Kot This file provides useful functions for all Nokia phones. See README for more details on supported mobile phones. The various routines are called pnok_(whatever). */ #include "config.h" #include #include "compat.h" #include "gnokii-internal.h" #include "gnokii.h" #include "links/fbus.h" #include "phones/nokia.h" /* This function provides a way to detect the manufacturer of a phone * because it is only used by the fbus/mbus protocol phones and only * nokia is using those protocols, the result is clear. * the error reporting is also very simple * the strncpy and pnok_MAX_MODEL_LENGTH is only here as a reminder */ gn_error pnok_manufacturer_get(char *manufacturer) { strcpy(manufacturer, "Nokia"); return GN_ERR_NONE; } static wchar_t pnok_nokia_to_uni(unsigned char ch) { switch (ch) { case 0x82: return 0x00e1; /* LATIN SMALL LETTER A WITH ACUTE */ case 0x1c: return 0x00c1; /* LATIN CAPITAL LETTER A WITH ACUTE */ case 0xe9: return 0x00e9; /* LATIN SMALL LETTER E WITH ACUTE (!) */ case 0xc9: return 0x00c9; /* LATIN CAPITAL LETTER E WITH ACUTE (!) */ case 0x8a: return 0x00ed; /* LATIN SMALL LETTER I WITH ACUTE */ case 0x5e: return 0x00cd; /* LATIN CAPITAL LETTER I WITH ACUTE */ case 0x90: return 0x00f3; /* LATIN SMALL LETTER O WITH ACUTE */ case 0x7d: return 0x00d3; /* LATIN CAPITAL LETTER O WITH ACUTE */ case 0xf6: return 0x00f6; /* LATIN SMALL LETTER O WITH DIAERESIS (!) */ case 0xd6: return 0x00d6; /* LATIN CAPITAL LETTER O WITH DIAERESIS (!) */ case 0x96: return 0x0151; /* LATIN SMALL LETTER O WITH DOUBLE ACUTE */ case 0x95: return 0x0150; /* LATIN CAPITAL LETTER O WITH DOUBLE ACUTE */ case 0x97: return 0x00fa; /* LATIN SMALL LETTER U WITH ACUTE */ case 0x80: return 0x00da; /* LATIN CAPITAL LETTER U WITH ACUTE */ case 0xfc: return 0x00fc; /* LATIN SMALL LETTER U WITH DIAERESIS (!) */ case 0xdc: return 0x00dc; /* LATIN CAPITAL LETTER U WITH DIAERESIS (!) */ case 0xce: return 0x0171; /* LATIN SMALL LETTER U WITH DOUBLE ACUTE */ case 0xcc: return 0x0170; /* LATIN CAPITAL LETTER U WITH DOUBLE ACUTE */ case 0xe4: return 0x00e4; /* LATIN SMALL LETTER A WITH DIARESIS */ case 0xc4: return 0x00c4; /* LATIN CAPITAL LETTER A WITH DIARESIS */ case 0xdf: return 0x00df; /* LATIN SMALL LETTER SHARP S */ default: return char_def_alphabet_decode(ch); } } static unsigned char pnok_uni_to_nokia(wchar_t wch) { switch (wch) { case 0x00e1: return 0x82; /* LATIN SMALL LETTER A WITH ACUTE */ case 0x00c1: return 0x1c; /* LATIN CAPITAL LETTER A WITH ACUTE */ case 0x00e9: return 0xe9; /* LATIN SMALL LETTER E WITH ACUTE (!) */ case 0x00c9: return 0xc9; /* LATIN CAPITAL LETTER E WITH ACUTE (!) */ case 0x00ed: return 0x8a; /* LATIN SMALL LETTER I WITH ACUTE */ case 0x00cd: return 0x5e; /* LATIN CAPITAL LETTER I WITH ACUTE */ case 0x00f3: return 0x90; /* LATIN SMALL LETTER O WITH ACUTE */ case 0x00d3: return 0x7d; /* LATIN CAPITAL LETTER O WITH ACUTE */ case 0x00f6: return 0xf6; /* LATIN SMALL LETTER O WITH DIAERESIS (!) */ case 0x00d6: return 0xd6; /* LATIN CAPITAL LETTER O WITH DIAERESIS (!) */ case 0x0151: return 0x96; /* LATIN SMALL LETTER O WITH DOUBLE ACUTE */ case 0x0150: return 0x95; /* LATIN CAPITAL LETTER O WITH DOUBLE ACUTE */ case 0x00fa: return 0x97; /* LATIN SMALL LETTER U WITH ACUTE */ case 0x00da: return 0x80; /* LATIN CAPITAL LETTER U WITH ACUTE */ case 0x00fc: return 0xfc; /* LATIN SMALL LETTER U WITH DIAERESIS (!) */ case 0x00dc: return 0xdc; /* LATIN CAPITAL LETTER U WITH DIAERESIS (!) */ case 0x0171: return 0xce; /* LATIN SMALL LETTER U WITH DOUBLE ACUTE */ case 0x0170: return 0xcc; /* LATIN CAPITAL LETTER U WITH DOUBLE ACUTE */ case 0x00e4: return 0xe4; /* LATIN SMALL LETTER A WITH DIARESIS */ case 0x00c4: return 0xc4; /* LATIN CAPITAL LETTER A WITH DIARESIS */ case 0x00df: return 0xdf; /* LATIN SMALL LETTER SHARP S */ default: return char_def_alphabet_encode((unsigned char)wch); } } void pnok_string_decode(unsigned char *dest, size_t max, const unsigned char *src, size_t len) { size_t i, j, n; unsigned char buf[16]; MBSTATE mbs; MBSTATE_DEC_CLEAR(mbs); for (i = 0, j = 0; j < len; i += n, j++) { n = char_uni_alphabet_decode(pnok_nokia_to_uni(src[j]), buf, &mbs); if (i + n >= max) break; memcpy(dest + i, buf, n); } dest[i] = 0; } size_t pnok_string_encode(unsigned char *dest, size_t max, const unsigned char *src) { size_t i, j, n; wchar_t wch; MBSTATE mbs; MBSTATE_ENC_CLEAR(mbs); for (i = 0, j = 0; i < max && src[j]; i++, j += n) { n = char_uni_alphabet_encode(src + j, max - j, &wch, &mbs); dest[i] = pnok_uni_to_nokia(wch); } return i; } /* Call Divert */ gn_error pnok_call_divert(gn_data *data, struct gn_statemachine *state) { unsigned short length = 0x09; char req[55] = { FBUS_FRAME_HEADER, 0x01, 0x00, /* operation */ 0x00, 0x00, /* divert type */ 0x00, /* call type */ 0x00 }; if (!data->call_divert) return GN_ERR_UNKNOWN; switch (data->call_divert->operation) { case GN_CDV_Query: req[4] = 0x05; break; case GN_CDV_Register: req[4] = 0x03; length = 0x37; req[8] = 0x01; req[9] = char_semi_octet_pack(data->call_divert->number.number, req + 10, data->call_divert->number.type); req[54] = data->call_divert->timeout; break; case GN_CDV_Erasure: req[4] = 0x04; break; default: return GN_ERR_NOTIMPLEMENTED; } switch (data->call_divert->ctype) { case GN_CDV_AllCalls: break; case GN_CDV_VoiceCalls: req[7] = 0x0b; break; case GN_CDV_FaxCalls: req[7] = 0x0d; break; case GN_CDV_DataCalls: req[7] = 0x19; break; default: return GN_ERR_NOTIMPLEMENTED; } switch (data->call_divert->type) { case GN_CDV_AllTypes: req[6] = 0x15; break; case GN_CDV_Busy: req[6] = 0x43; break; case GN_CDV_NoAnswer: req[6] = 0x3d; break; case GN_CDV_OutOfReach: req[6] = 0x3e; break; default: return GN_ERR_NOTIMPLEMENTED; } if ((data->call_divert->type == GN_CDV_AllTypes) && (data->call_divert->ctype == GN_CDV_AllCalls)) req[6] = 0x02; if (sm_message_send(length, 0x06, req, state)) return GN_ERR_NOTREADY; return sm_block_timeout(0x06, 100, data, state); } gn_error pnok_call_divert_incoming(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { unsigned char *pos; gn_call_divert *cd; int n; char buf[1024]; /* the struct is not yet allocated if this is the first unsolicited call divert message */ if (!data->call_divert) { data->call_divert = malloc(sizeof(gn_call_divert)); if (!data->call_divert) return GN_ERR_MEMORYFULL; memset(data->call_divert, 0, sizeof(*data->call_divert)); } switch (message[3]) { /* Get call diverts ok */ case 0x02: pos = message + 4; cd = data->call_divert; if (*pos != 0x05 && *pos != 0x04) return GN_ERR_UNHANDLEDFRAME; pos++; if (*pos++ != 0x00) return GN_ERR_UNHANDLEDFRAME; switch (*pos++) { case 0x02: case 0x15: cd->type = GN_CDV_AllTypes; break; case 0x43: cd->type = GN_CDV_Busy; break; case 0x3d: cd->type = GN_CDV_NoAnswer; break; case 0x3e: cd->type = GN_CDV_OutOfReach; break; default: return GN_ERR_UNHANDLEDFRAME; } if (*pos++ != 0x02) return GN_ERR_UNHANDLEDFRAME; switch (*pos++) { case 0x00: cd->ctype = GN_CDV_AllCalls; break; case 0x0b: cd->ctype = GN_CDV_VoiceCalls; break; case 0x0d: cd->ctype = GN_CDV_FaxCalls; break; case 0x19: cd->ctype = GN_CDV_DataCalls; break; default: return GN_ERR_UNHANDLEDFRAME; } if (message[4] == 0x04 && pos[0] == 0x00) { return GN_ERR_EMPTYLOCATION; } else if (message[4] == 0x04 || (pos[0] == 0x01 && pos[1] == 0x00)) { cd->number.type = GN_GSM_NUMBER_Unknown; memset(cd->number.number, 0, sizeof(cd->number.number)); } else if (pos[0] == 0x02 && pos[1] == 0x01) { pos += 2; snprintf(cd->number.number, sizeof(cd->number.number), "%-*.*s", *pos+1, *pos+1, char_bcd_number_get(pos+1)); pos += 12 + 22; cd->timeout = *pos++; } break; /* FIXME: failed calldivert result code? */ case 0x03: return GN_ERR_UNHANDLEDFRAME; /* FIXME: call divert is active */ case 0x06: return GN_ERR_UNSOLICITED; /* FIXME: is this common between models? - bozo */ /* get prepaid info */ case 0x05: { char *aux = calloc(sizeof(buf) + 1, 1); n = char_7bit_unpack(0, message[7], sizeof(buf), message + 8, aux); char_default_alphabet_decode(buf, aux, n); free(aux); dprintf("Message: Prepaid info received: \"%s\"\n", buf); return GN_ERR_UNSOLICITED; } default: return GN_ERR_UNHANDLEDFRAME; } return GN_ERR_NONE; } int pnok_fbus_sms_encode(unsigned char *req, gn_data *data, struct gn_statemachine *state) { int pos = 0; if (data->raw_sms->message_center[0] != '\0') memcpy(req, data->raw_sms->message_center, 12); pos += 12; if (data->raw_sms->type != GN_SMS_MT_Deliver) req[pos] = 0x01; /* SMS Submit */ else req[pos] = 0x00; /* SMS Deliver */ if (data->raw_sms->reply_via_same_smsc) req[pos] |= 0x80; if (data->raw_sms->reject_duplicates) req[pos] |= 0x04; if (data->raw_sms->report) req[pos] |= 0x20; if (data->raw_sms->udh_indicator) req[pos] |= 0x40; if (data->raw_sms->type != GN_SMS_MT_Deliver) { if (data->raw_sms->validity_indicator) req[pos] |= 0x10; pos++; req[pos++] = data->raw_sms->reference; } else pos++; req[pos++] = data->raw_sms->pid; req[pos++] = data->raw_sms->dcs; req[pos++] = data->raw_sms->length; memcpy(req + pos, data->raw_sms->remote_number, 12); pos += 12; if (data->raw_sms->type != GN_SMS_MT_Deliver) memcpy(req + pos, data->raw_sms->validity, 7); else memcpy(req + pos, data->raw_sms->smsc_time, 7); pos += 7; memcpy(req + pos, data->raw_sms->user_data, data->raw_sms->user_data_length); pos += data->raw_sms->user_data_length; return pos; } /* security commands */ gn_error pnok_extended_cmds_enable(unsigned char type, gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {0x00, 0x01, 0x64, 0x00}; if (type == 0x06) { dump(_("Tried to activate CONTACT SERVICE\n")); return GN_ERR_INTERNALERROR; } req[3] = type; if (sm_message_send(4, 0x40, req, state)) return GN_ERR_NOTREADY; return sm_block(0x40, data, state); } gn_error pnok_call_make(gn_data *data, struct gn_statemachine *state) { unsigned char req[5 + GN_PHONEBOOK_NUMBER_MAX_LENGTH] = {0x00, 0x01, 0x7c, 0x01}; int n; gn_error err; if (!data->call_info) return GN_ERR_INTERNALERROR; switch (data->call_info->type) { case GN_CALL_Voice: break; case GN_CALL_NonDigitalData: case GN_CALL_DigitalData: dprintf("Unsupported call type %d\n", data->call_info->type); return GN_ERR_NOTSUPPORTED; default: dprintf("Invalid call type %d\n", data->call_info->type); return GN_ERR_INTERNALERROR; } n = strlen(data->call_info->number); if (n > GN_PHONEBOOK_NUMBER_MAX_LENGTH) { dprintf("number too long\n"); return GN_ERR_ENTRYTOOLONG; } if ((err = pnok_extended_cmds_enable(0x01, data, state))) return err; snprintf(req + 4, GN_PHONEBOOK_NUMBER_MAX_LENGTH + 1, "%s", data->call_info->number); if (sm_message_send(5 + n, 0x40, req, state)) return GN_ERR_NOTREADY; return sm_block(0x40, data, state); } gn_error pnok_call_answer(gn_data *data, struct gn_statemachine *state) { unsigned char req[4] = {0x00, 0x01, 0x7c, 0x02}; gn_error err; if (!data->call_info) return GN_ERR_INTERNALERROR; if ((err = pnok_extended_cmds_enable(0x01, data, state))) return err; if (sm_message_send(4, 0x40, req, state)) return GN_ERR_NOTREADY; return sm_block(0x40, data, state); } gn_error pnok_call_cancel(gn_data *data, struct gn_statemachine *state) { unsigned char req[4] = {0x00, 0x01, 0x7c, 0x03}; gn_error err; if (!data->call_info) return GN_ERR_INTERNALERROR; if ((err = pnok_extended_cmds_enable(0x01, data, state))) return err; if (sm_message_send(4, 0x40, req, state)) return GN_ERR_NOTREADY; return sm_block(0x40, data, state); } gn_error pnok_netmonitor(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {0x00, 0x01, 0x7e, 0x00}; gn_error err; if (!data->netmonitor) return GN_ERR_INTERNALERROR; req[3] = data->netmonitor->field; if ((err = pnok_extended_cmds_enable(0x01, data, state))) return err; if (sm_message_send(4, 0x40, req, state)) return GN_ERR_NOTREADY; return sm_block(0x40, data, state); } gn_error pnok_get_locks_info(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {0x00, 0x01, 0x8a, 0x00}; if (sm_message_send(4, 0x40, req, state)) return GN_ERR_NOTREADY; return sm_block(0x40, data, state); } gn_error pnok_play_tone(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {0x00, 0x01, 0x8f, 0x00, 0x00, 0x00}; req[3] = data->tone->volume; req[4] = data->tone->frequency / 256; req[5] = data->tone->frequency % 256; if (sm_message_send(6, 0x40, req, state)) return GN_ERR_NOTREADY; return sm_block(0x40, data, state); } gn_error pnok_security_incoming(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state) { char tmp[24]; int i; switch (message[2]) { /* Enable extended commands */ case 0x64: dprintf("Message: Extended commands enabled.\n"); break; /* Call management (old style) */ case 0x7c: switch (message[3]) { case 0x01: dprintf("Message: CallMgmt (old): dial\n"); break; case 0x02: dprintf("Message: CallMgmt (old): answer\n"); break; case 0x03: dprintf("Message: CallMgmt (old): release\n"); break; default: return GN_ERR_UNHANDLEDFRAME; } break; /* Netmonitor */ case 0x7e: switch (message[3]) { case 0x00: dprintf("Message: Netmonitor correctly set.\n"); break; default: dprintf("Message: Netmonitor menu %d received:\n", message[3]); dprintf("%s\n", message + 4); if (data->netmonitor) snprintf(data->netmonitor->screen, sizeof(data->netmonitor->screen), "%s", message + 4); break; } break; /* Get (sim)lock info */ case 0x8a: for (i = 0; i < 4; i++) { memset(&data->locks_info[i], 0, sizeof(gn_locks_info)); } data->locks_info[0].userlock = ((message[5] & 0x01) != 0); data->locks_info[1].userlock = ((message[5] & 0x02) != 0); data->locks_info[2].userlock = ((message[5] & 0x04) != 0); data->locks_info[3].userlock = ((message[5] & 0x08) != 0); data->locks_info[0].closed = ((message[6] & 0x01) != 0); data->locks_info[1].closed = ((message[6] & 0x02) != 0); data->locks_info[2].closed = ((message[6] & 0x04) != 0); data->locks_info[3].closed = ((message[6] & 0x08) != 0); bin2hex(tmp, message + 9, 12); strncpy(data->locks_info[0].data, tmp, 5); strncpy(data->locks_info[1].data, tmp + 16, 4); strncpy(data->locks_info[2].data, tmp + 20, 4); strncpy(data->locks_info[3].data, tmp + 5, 10); data->locks_info[0].counter = message[21]; data->locks_info[1].counter = message[22]; data->locks_info[2].counter = message[23]; data->locks_info[3].counter = message[24]; break; /* Play tone */ case 0x8f: break; default: return GN_ERR_UNHANDLEDFRAME; } return GN_ERR_NONE; } gn_error pnok_ringtone_from_raw(gn_ringtone *ringtone, const unsigned char *raw, int rawlen) { int i, c, p, current; int rcount, rstart; int lastc, lastp; gn_ringtone_note *note = NULL; int notes[] = {0, 1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12}; int dct4, base; ringtone->tempo = 120; dct4 = 0; base = 114; recode: ringtone->notes_count = 0; rstart = -1; rcount = 0; lastc = -1; lastp = 0; for(i = 0; i < rawlen; ) { current = i; c = raw[i++]; if (c == 0x00) { /* start? */ continue; } else if (c == 0x06) { /* repeat end */ if (rstart < 0) continue; /* FIXME: why not corrupted */ p = ringtone->notes_count - rstart; if (ringtone->notes_count + rcount * p >= GN_RINGTONE_MAX_NOTES) return GN_ERR_INVALIDSIZE; while (rcount-- > 0) { memcpy(ringtone->notes + ringtone->notes_count, ringtone->notes + rstart, p * sizeof(gn_ringtone_note)); ringtone->notes_count += p; } rstart = -1; rcount = 0; continue; } else if (c == 0x07) { /* unknown */ continue; } else if (c == 0x09) { /* unknown */ continue; } else if (c == 0x0b) { /* stop */ break; } else if (c == 0x0c) { /* unknown */ continue; } else if (c == 0x0e) { /* unknown */ continue; } if (i >= rawlen) goto corrupted; p = raw[i++]; if (c == 0x04) { /* unknown */ } else if (c == 0x02) { /* unknown */ } else if (c == 0x05) { /* begin repeat */ if (rstart >= 0) goto corrupted; rstart = ringtone->notes_count; rcount = p - 1; } else if (c == 0x0a) { /* vibra? */ } else if (c == 0x40) { /* pause */ if (p == 0x01) { /* skip normal inter note pause */ lastc = -1; continue; } if (c == lastc) { lastp += p; p = lastp; } else { note = ringtone->notes + ringtone->notes_count++; lastc = c; lastp = p; } note->note = 255; gn_ringtone_set_duration(ringtone, note - ringtone->notes, 8000 * p); } else if (66 <= c && c <= 161) { /* normal tone */ if (c == lastc) { lastp += p; p = lastp; } else { note = ringtone->notes + ringtone->notes_count++; lastc = c; lastp = p; } if (c < base) { if (!dct4) { dct4 = 1; base = 90; goto recode; } note->note = notes[(c - 66) % 12]; } else { note->note = 14 * ((c - base) / 12) + notes[(c - base) % 12]; } gn_ringtone_set_duration(ringtone, note - ringtone->notes, 8000 * p); } else { /* unknown messages */ goto corrupted; } } /* check wheter the tempo selected correctly */ c = 0; for (i = 0; i < ringtone->notes_count; i++) if (ringtone->notes[i].note != 255 && ringtone->notes[i].duration > c) c = ringtone->notes[i].duration; if (ringtone->tempo < 250 && c < 32) { /* there was no 1/8 */ ringtone->tempo = 250; goto recode; } while (ringtone->notes_count > 0 && ringtone->notes[ringtone->notes_count - 1].note == 255) ringtone->notes_count--; return GN_ERR_NONE; corrupted: dump(_("NOKIA RAW RINGTONE DECODING FAILED\nringtone:\n")); for (i = 0; i < rawlen; i++) { if (i % 16 == 0) { if (i != 0) dump("\n"); dump("%04x", i); } dump(" %02x", raw[i]); } if (i % 16 != 0) dump("\n"); dump(_("offset: %04x\n"), current); dump(_("Please read Docs/Bugs and send a bug report!\n")); return GN_ERR_WRONGDATAFORMAT; } gn_error pnok_ringtone_to_raw(char *raw, int *rawlen, const gn_ringtone *ringtone, int dct4) { int i, c, p, l, freq, base; int rleft, vtime, vstat; const gn_ringtone_note *note; char header[] = {0x00, 0x02, 0xfc, 0x0a, 0x01}; char tailer[] = {0x0a, 0x0a, 0x0a, 0xfe, 0x40, 0x20, 0x07, 0x0b, 0xff, 0xff, 0xff, 0xff}; char vibr_on[] = {0x0a, 0x01}; char vibr_off[] = {0x0a, 0xfe}; int notes[] = {0, 1, 2, 3, 4, 4, 5, 6, 7, 8, 9, 10, 11, 11}; rleft = *rawlen; vtime = 0; vstat = 1; base = dct4 ? 90 : 114; if (rleft < sizeof(header)) return GN_ERR_MEMORYFULL; memcpy(raw, header, sizeof(header)); raw += sizeof(header); rleft -= sizeof(header); for (i = 0; i < ringtone->notes_count; i++) { if (vtime >= 300) { if (rleft < 2) return GN_ERR_MEMORYFULL; memcpy(raw, vstat ? vibr_off : vibr_on, 2); vtime = 0; vstat = !vstat; raw += 2; rleft -= 2; } note = ringtone->notes + i; gn_ringtone_get_tone(ringtone, i, &freq, &p); p /= 8000; vtime += p; if (note->note == 0xff) { c = 0x40; p++; } else { c = 12 * (note->note / 14) + notes[note->note % 14] + base; } while (p > 1) { if (rleft < 2) return GN_ERR_MEMORYFULL; l = (p > 0xff) ? 0xff : p - 1; *raw++ = c; *raw++ = l; p -= l; rleft -= 2; } if (c != 0x40) { if (rleft < 2) return GN_ERR_MEMORYFULL; *raw++ = 0x40; *raw++ = 1; rleft -= 2; } } if (rleft < sizeof(tailer)) return GN_ERR_MEMORYFULL; memcpy(raw, tailer, sizeof(tailer)); rleft -= sizeof(tailer); *rawlen = (*rawlen - rleft) & ~3; return GN_ERR_NONE; } gnokii-0.6.31/common/phones/dc2711.c0000644000175000017500000000645011666163120015041 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright 2001 Pavel Machek Copyright 2001 Manfred Jonsson Copyright 2002-2003 Ladislav Michl Copyright 2001-2004 Pawel Kot This file provides functions specific to the Dancall 2711. See README for more details on supported mobile phones. */ #include "config.h" #include #include #include "compat.h" #include "misc.h" #include "gnokii.h" #include "phones/generic.h" #include "phones/atgen.h" #include "links/atbus.h" static gn_error FakeCharset(gn_data *data, struct gn_statemachine *state) { AT_DRVINST(state)->charset = AT_CHAR_GSM; return GN_ERR_NONE; } static gn_error GetSMSStatus(gn_data *data, struct gn_statemachine *state) { if (sm_message_send(18, GN_OP_GetSMSStatus, "AT+CPMS=\"SM\",\"SM\"\r", state)) return GN_ERR_NOTREADY; return sm_block_no_retry(GN_OP_GetSMSStatus, data, state); } static gn_error ReplyGetSMSStatus(int type, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state) { int i, j, k, l; if (buffer[0] != GN_AT_OK) return GN_ERR_FAILED; if (sscanf(buffer + 1, "+CPMS: \"SM\",%d,%d,\"SM\",%d,%d", &i, &j, &k, &l) != 4) return GN_ERR_FAILED; data->sms_status->unread = i; data->sms_status->number = k; return GN_ERR_NONE; } /* * FIXME: SMSs are not ready for text mode :-( * * message looks like this one (stupid and lying advertisment by Eurotel): * +CMGR: "REC READ","999102",,"02/12/20,10:17:57+40"Prejeme Vam vesele Vanoce a stastny novy rok 2003. I v pristim roce muzete ocekavat spoustu zajimavych nabidek a prekvapeni od Go Clubu. */ static gn_error ReplyGetSMS(int type, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state) { if (buffer[0] != GN_AT_OK) return GN_ERR_FAILED; if (!data->raw_sms) return GN_ERR_INTERNALERROR; data->raw_sms->time[0] = 0; data->raw_sms->smsc_time[0] = 0; strncpy(data->raw_sms->user_data, buffer, GN_SMS_LONG_MAX_LENGTH); data->raw_sms->length = 161; return GN_ERR_NONE; } static gn_error Unsupported(gn_data *data, struct gn_statemachine *state) { return GN_ERR_NOTSUPPORTED; } void dc2711_init(char* foundmodel, char* setupmodel, struct gn_statemachine *state) { at_insert_send_function(GN_OP_AT_GetCharset, FakeCharset, state); at_insert_send_function(GN_OP_AT_SetCharset, FakeCharset, state); at_insert_send_function(GN_OP_GetSMSStatus, GetSMSStatus, state); at_insert_recv_function(GN_OP_GetSMSStatus, ReplyGetSMSStatus, state); at_insert_recv_function(GN_OP_GetSMS, ReplyGetSMS, state); } gnokii-0.6.31/common/phones/atsie.c0000644000175000017500000000365011666163120015244 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2001 Manfred Jonsson Copyright (C) 2002 Ladis Michl This file provides functions specific to at commands on siemens phones. See README for more details on supported mobile phones. */ #include "config.h" #include #include #include #include "compat.h" #include "misc.h" #include "gnokii.h" #include "phones/generic.h" #include "phones/atgen.h" #include "phones/atsie.h" #include "links/atbus.h" static at_send_function_type writephonebook; static gn_error WritePhonebook(gn_data *data, struct gn_statemachine *state) { gn_phonebook_entry newphone; if (writephonebook == NULL) return GN_ERR_UNKNOWN; if (data->phonebook_entry != NULL) { memcpy(&newphone, data->phonebook_entry, sizeof(gn_phonebook_entry)); data->phonebook_entry = &newphone; } return (*writephonebook)(data, state); } void at_siemens_init(char* foundmodel, char* setupmodel, struct gn_statemachine *state) { /* names for s35 etc must be escaped */ if (foundmodel && !strncasecmp("35", foundmodel + 1, 2)) writephonebook = at_insert_send_function(GN_OP_WritePhonebook, WritePhonebook, state); } gnokii-0.6.31/common/gsm-statemachine.c0000644000175000017500000002622611666163120016100 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 2001 Chris Kemp, Manfred Jonsson Copyright (C) 2001-2002 Pavel Machek, Ladis Michl Copyright (C) 2001-2003 Pawel Kot Copyright (C) 2002-2004 BORBELY Zoltan Copyright (C) 2003 Osma Suominen */ #include "config.h" #include "gnokii-internal.h" #include "gnokii.h" #include "misc.h" gn_error sm_initialise(struct gn_statemachine *state) { state->current_state = GN_SM_Initialised; state->waiting_for_number = 0; state->received_number = 0; return GN_ERR_NONE; } gn_error sm_message_send(u16 messagesize, u8 messagetype, void *message, struct gn_statemachine *state) { if (state->current_state != GN_SM_Startup) { #ifdef DEBUG dprintf("Message sent: "); sm_message_dump(gn_log_debug, messagetype, message, messagesize); #endif state->last_msg_size = messagesize; state->last_msg_type = messagetype; state->last_msg = message; state->current_state = GN_SM_MessageSent; /* FIXME - clear KeepAlive timer */ return state->link.send_message(messagesize, messagetype, message, state); } else return GN_ERR_NOTREADY; } GNOKII_API gn_state gn_sm_loop(int timeout, struct gn_statemachine *state) { struct timeval loop_timeout; int i; if (!state->link.loop) { dprintf("No Loop function. Aborting.\n"); abort(); } for (i = 0; i < timeout; i++) { /* * Some select() implementation (e.g. Linux) will modify the * timeval structure - bozo */ loop_timeout.tv_sec = 0; loop_timeout.tv_usec = 100000; state->link.loop(&loop_timeout, state); } /* FIXME - add calling a KeepAlive function here */ return state->current_state; } void sm_reset(struct gn_statemachine *state) { /* Don't reset to initialised if we aren't! */ if (state->current_state != GN_SM_Startup) { state->current_state = GN_SM_Initialised; state->waiting_for_number = 0; state->received_number = 0; if (state->link.reset) state->link.reset(state); } } void sm_incoming_function(u8 messagetype, void *message, u16 messagesize, struct gn_statemachine *state) { int c; int temp = 1; gn_data *data, *edata; gn_error res = GN_ERR_INTERNALERROR; int waitingfor = -1; #ifdef DEBUG dprintf("Message received: "); sm_message_dump(gn_log_debug, messagetype, message, messagesize); #endif edata = (gn_data *)calloc(1, sizeof(gn_data)); data = edata; /* See if we need to pass the function the data struct */ if (state->current_state == GN_SM_WaitingForResponse) for (c = 0; c < state->waiting_for_number; c++) if (state->waiting_for[c] == messagetype) { data = state->data[c]; waitingfor = c; } /* Pass up the message to the correct phone function, with data if necessary */ c = 0; while (state->driver.incoming_functions[c].functions) { if (state->driver.incoming_functions[c].message_type == messagetype) { dprintf("Received message type %02x\n", messagetype); res = state->driver.incoming_functions[c].functions(messagetype, message, messagesize, data, state); temp = 0; break; } c++; } if (res == GN_ERR_UNSOLICITED) { dprintf("Unsolicited frame, skipping...\n"); free(edata); return; } else if (res == GN_ERR_UNHANDLEDFRAME) { sm_unhandled_frame_dump(messagetype, message, messagesize, state); } else if (res == GN_ERR_WAITING) { free(edata); return; } if (temp != 0) { dprintf("Unknown Frame Type %02x\n", messagetype); state->driver.default_function(messagetype, message, messagesize, state); free(edata); return; } if (state->current_state == GN_SM_WaitingForResponse) { /* Check if we were waiting for a response and we received it */ if (waitingfor != -1) { state->response_error[waitingfor] = res; state->received_number++; } /* Check if all waitingfors have been received */ if (state->received_number == state->waiting_for_number) { state->current_state = GN_SM_ResponseReceived; } } free(edata); } /* This returns the error recorded from the phone function and indicates collection */ gn_error sm_error_get(unsigned char messagetype, struct gn_statemachine *state) { int c, d; gn_error error = GN_ERR_NOTREADY; switch (state->current_state) { case GN_SM_ResponseReceived: for (c = 0; c < state->received_number; c++) if (state->waiting_for[c] == messagetype) { error = state->response_error[c]; for (d = c + 1 ; d < state->received_number; d++) { state->response_error[d-1] = state->response_error[d]; state->waiting_for[d-1] = state->waiting_for[d]; state->data[d-1] = state->data[d]; } state->received_number--; state->waiting_for_number--; c--; /* For neatness continue in the correct place */ } if (state->received_number == 0) { state->waiting_for_number = 0; state->current_state = GN_SM_Initialised; } break; /* Here we are fine! */ case GN_SM_Initialised: error = GN_ERR_NONE; break; default: break; } return error; } /* Indicate that the phone code is waiting for a response */ /* This does not actually wait! */ gn_error sm_wait_for(unsigned char messagetype, gn_data *data, struct gn_statemachine *state) { /* If we've received a response, we have to call SM_GetError first */ if ((state->current_state == GN_SM_Startup) || (state->current_state == GN_SM_ResponseReceived)) return GN_ERR_NOTREADY; if (state->waiting_for_number == GN_SM_WAITINGFOR_MAX_NUMBER) return GN_ERR_NOTREADY; state->waiting_for[state->waiting_for_number] = messagetype; state->data[state->waiting_for_number] = data; state->response_error[state->waiting_for_number] = GN_ERR_BUSY; state->waiting_for_number++; return GN_ERR_NONE; } void sm_incoming_acknowledge(struct gn_statemachine *state) { if (state->current_state == GN_SM_MessageSent) state->current_state = GN_SM_WaitingForResponse; } /* This function is for convinience only. It is called after SM_SendMessage and blocks until a response is received. t is in tenths of second. */ static gn_error __sm_block_timeout(int waitfor, int t, gn_data *data, struct gn_statemachine *state) { int retry; gn_state s; gn_error err; struct timeval now, next, timeout; s = state->current_state; timeout.tv_sec = 3; timeout.tv_usec = 0; gettimeofday(&now, NULL); for (retry = 0; retry < 2; retry++) { err = sm_wait_for(waitfor, data, state); if (err != GN_ERR_NONE) return err; timeradd(&now, &timeout, &next); do { s = gn_sm_loop(1, state); /* Timeout=100ms */ gettimeofday(&now, NULL); } while (timercmp(&next, &now, >) && (s == GN_SM_MessageSent)); if (s == GN_SM_WaitingForResponse || s == GN_SM_ResponseReceived) break; if (state->config.sm_retry) { dprintf("SM_Block Retry - %d\n", retry); sm_reset(state); sm_message_send(state->last_msg_size, state->last_msg_type, state->last_msg, state); } else { /* If we don't want retry, we should exit the loop */ dprintf("SM_Block: exiting the retry loop\n"); break; } } if (s == GN_SM_ResponseReceived) return sm_error_get(waitfor, state); timeout.tv_sec = t / 10; timeout.tv_usec = (t % 10) * 100000; timeradd(&now, &timeout, &next); do { s = gn_sm_loop(1, state); /* Timeout=100ms */ gettimeofday(&now, NULL); } while (timercmp(&next, &now, >) && (s != GN_SM_ResponseReceived)); if (s == GN_SM_ResponseReceived) return sm_error_get(waitfor, state); sm_reset(state); return GN_ERR_TIMEOUT; } gn_error sm_block_timeout(int waitfor, int t, gn_data *data, struct gn_statemachine *state) { int retry; gn_error err; for (retry = 0; retry < 3; retry++) { err = __sm_block_timeout(waitfor, t, data, state); if (err == GN_ERR_NONE || err != GN_ERR_TIMEOUT) return err; if (retry < 2) { sm_message_send(state->last_msg_size, state->last_msg_type, state->last_msg, state); } } return GN_ERR_TIMEOUT; } gn_error sm_block(int waitfor, gn_data *data, struct gn_statemachine *state) { return sm_block_timeout(waitfor, 40, data, state); } /* This function is equal to sm_block_timeout except it does not retry the message */ gn_error sm_block_no_retry_timeout(int waitfor, int t, gn_data *data, struct gn_statemachine *state) { return __sm_block_timeout(waitfor, t, data, state); } /* This function is equal to sm_block except it does not retry the message */ gn_error sm_block_no_retry(int waitfor, gn_data *data, struct gn_statemachine *state) { return sm_block_no_retry_timeout(waitfor, 100, data, state); } /* Block waiting for an ack, don't wait for a reply message of any sort */ gn_error sm_block_ack(struct gn_statemachine *state) { int retry; gn_state s; gn_error err; struct timeval now, next, timeout; s = state->current_state; timeout.tv_sec = 3; timeout.tv_usec = 0; gettimeofday(&now, NULL); for (retry = 0; retry < 2; retry++) { timeradd(&now, &timeout, &next); do { s = gn_sm_loop(1, state); /* Timeout=100ms */ gettimeofday(&now, NULL); } while (timercmp(&next, &now, >) && (s == GN_SM_MessageSent)); if (s == GN_SM_WaitingForResponse || s == GN_SM_ResponseReceived) return GN_ERR_NONE; dprintf("sm_block_ack Retry - %d\n", retry); sm_reset(state); err = sm_message_send(state->last_msg_size, state->last_msg_type, state->last_msg, state); if (err != GN_ERR_NONE) return err; } sm_reset(state); return GN_ERR_TIMEOUT; } /* Just to do things neatly */ GNOKII_API gn_error gn_sm_functions(gn_operation op, gn_data *data, struct gn_statemachine *sm) { if (!sm->driver.functions) { dprintf("Sorry, gnokii internal structures were not correctly initialized (op == %d)\n", op); return GN_ERR_INTERNALERROR; } return sm->driver.functions(op, data, sm); } /* Dumps a message */ void sm_message_dump(gn_log_func_t lfunc, int messagetype, unsigned char *message, int messagesize) { int i; char buf[17]; buf[16] = 0; lfunc("0x%02x / 0x%04x", messagetype, messagesize); for (i = 0; i < messagesize; i++) { if (i % 16 == 0) { if (i != 0) lfunc("| %s", buf); lfunc("\n"); memset(buf, ' ', 16); } lfunc("%02x ", message[i]); if (isprint(message[i])) buf[i % 16] = message[i]; } if (i != 0) lfunc("%*s| %s", i % 16 ? 3 * (16 - i % 16) : 0, "", buf); lfunc("\n"); } /* Prints a warning message about unhandled frames */ void sm_unhandled_frame_dump(int messagetype, unsigned char *message, int messagesize, struct gn_statemachine *state) { dump(_("UNHANDLED FRAME RECEIVED\nrequest: ")); sm_message_dump(gn_elog_write, state->last_msg_type, state->last_msg, state->last_msg_size); dump(_("reply: ")); sm_message_dump(gn_elog_write, messagetype, message, messagesize); dump(_("Please read Docs/Bugs and send a bug report!\n")); } gnokii-0.6.31/common/gnokii.pc.in0000644000175000017500000000031411666163120014702 0ustar leoleoprefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: gnokii Description: Gnokii library interface Version: @VERSION@ Libs: -L${libdir} -lgnokii Cflags: -I${includedir} gnokii-0.6.31/common/map.c0000644000175000017500000001032511666163120013415 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2008 Pawel Kot Operations on map data structure (key, value pairs). */ #include "config.h" #include "compat.h" #include "map.h" #include "misc.h" #include "gnokii.h" #include #include /* * @map_free * Frees all memory allocated for the map data structure. */ void map_free(struct map **map) { struct map *tmp = *map; while (tmp) { free(tmp->key); free(tmp->data); tmp = tmp->next; free(*map); *map = tmp; } } /* * @map_add * Adds (key, data) pair to the map data structure. * key and data need to be in allocatable memory. On free and del * operations, we'll try to free them. * map pointer gets modified with this operation. * retval: * 0: OK * -1: invalid input data (key or data are NULL) * -2: duplicated key * -3: allocation failed */ int map_add(struct map **map, char *key, void *data) { struct map *tmp; int retval = 0; if (!key || !data) { retval = -1; goto out; } dprintf("Adding key %s to map %p.\n", key, *map); /* Don't allow duplicated keys */ tmp = *map; while (tmp) { if (!strcmp(key, tmp->key)) { retval = -2; goto out; } tmp = tmp->next; } /* Prepare new entry */ tmp = calloc(1, sizeof(struct map)); /* Allocation failed */ if (!tmp) { retval = -3; goto out; } tmp->key = key; tmp->data = data; tmp->timestamp = time(NULL); tmp->next = *map; tmp->prev = NULL; /* Prepend current list with newly allocated entry... */ if (*map) (*map)->prev = tmp; else dprintf("New map %p.\n", *map); /* ... and make tmp first element */ *map = tmp; out: return retval; } /* * @map_get * Reads value associated with the key in map data structure pointed by map. * Retrievs just values not older than given timeout (in seconds). timeout = 0 * means no timeout. * retval: pointer to the data associated with the key * if NULL, no key was found or other error occurred * space for the returned value is freshly allocated */ void *map_get(struct map **map, char *key, time_t timeout) { struct map *tmp = *map; void *value = NULL; time_t now = time(NULL); if (!*map || !key) goto out; dprintf("Getting key %s from map %p.\n", key, *map); while (tmp) { if (!strcmp(key, tmp->key)) { if (timeout > 0 && now - tmp->timestamp > timeout) { /* * We invalidate the key, but someone * could try it with different timeout. * We don't bother, he'll wait. */ dprintf("Cache expired for key %s in map %p.\n", key, *map); map_del(map, key); goto out; } else value = tmp->data; break; } tmp = tmp->next; } out: return value; } /* * @map_del * Removes the tuple denoted by key from map data structure pointed by map. * retval: * 0: OK, removal successful * 1: No tuple with given key found * -1: invalid input data (map or key pointers are invalid) */ int map_del(struct map **map, char *key) { struct map *tmp = *map; int retval = 1; if (!tmp || !key) { retval = -1; goto out; } dprintf("Deleting key %s from map %p.\n", key, *map); while (tmp) { if (!strcmp(key, tmp->key)) { /* Free allocated space */ free(tmp->key); free(tmp->data); if (tmp->prev) tmp->prev->next = tmp->next; if (tmp->next) tmp->next->prev = tmp->prev; /* * If we free the first element on list, we need * to move the head pointer to the next position. */ if (tmp == *map) *map = tmp->next; free(tmp); retval = 0; break; } tmp = tmp->next; } out: return retval; } gnokii-0.6.31/common/ldif.c0000644000175000017500000002124211666163120013556 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolkit and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA This file is based on vcard.c written by Pavel Machek. Copyright (C) 1999 Hugh Blemings, Pavel Janik Copyright (C) 2002 Pavel Machek Copyright (C) 2003 Pawel Kot, Martin Goldhahn, BORBELY Zoltan */ #include "config.h" #include #include #include #include "compat.h" #include "gnokii.h" #include "gnokii-internal.h" /* write the string value to the file and convert it to base64 if necessary convertToUTF8 is necessary for Mozilla, but might not be appropriate for other programs that use the LDIF format, base64 encoding is compliant with the LDIF format */ static int ldif_entry_write(FILE *f, const char *parameter, const char *value, int convertToUTF8) { char *buf = NULL; int n, inlen, buflen; if (string_base64(value)) { inlen = strlen(value); n = 2 * inlen * 4 / 3; /* * 2 -> UTF8 * * 4/3 -> base 64 */ if (n % 4) n += (4 - (n % 4)); /* base 64 padds with '=' to length dividable by 4 */ buflen = n; buf = malloc(buflen + 1); if (convertToUTF8) n = utf8_base64_encode(buf, buflen, value, inlen); else n = base64_encode(buf, buflen, value, inlen); fprintf(f, "%s:: %s\n", parameter, buf); free(buf); } else { fprintf(f, "%s: %s\n", parameter, value); } return 1; } GNOKII_API int gn_phonebook2ldif(FILE *f, gn_phonebook_entry *entry) { char *aux; int i; /* this works for the import, but mozilla exports strings that contain chars >= 0x80 as dn:: */ fprintf(f, "dn: cn=%s\n", entry->name); fprintf(f, "objectclass: top\n"); fprintf(f, "objectclass: person\n"); fprintf(f, "objectclass: organizationalPerson\n"); fprintf(f, "objectclass: inetOrgPerson\n"); fprintf(f, "objectclass: mozillaAbPersonObsolete\n"); aux = strrchr(entry->name, ' '); if (aux) *aux = 0; ldif_entry_write(f, "givenName", entry->name, 1); if (aux) ldif_entry_write(f, "sn", aux + 1, 1); if (aux) *aux = ' '; ldif_entry_write(f, "cn", entry->name, 1); if (entry->caller_group) { char aux2[10]; snprintf(aux2, sizeof(aux2), "%d", entry->caller_group); ldif_entry_write(f, "businessCategory", aux2, 1); } if (entry->subentries_count == 0) { ldif_entry_write(f, "telephoneNumber", entry->number, 1); } if (entry->address.has_address) { ldif_entry_write(f, "homePostalAddress", entry->address.post_office_box, 1); } /* Add ext. pbk info if required */ for (i = 0; i < entry->subentries_count; i++) { switch (entry->subentries[i].entry_type) { case GN_PHONEBOOK_ENTRY_Email: ldif_entry_write(f, "mail", entry->subentries[i].data.number, 1); break; case GN_PHONEBOOK_ENTRY_Postal: ldif_entry_write(f, "homePostalAddress", entry->subentries[i].data.number, 1); break; case GN_PHONEBOOK_ENTRY_Note: ldif_entry_write(f, "Description", entry->subentries[i].data.number, 1); break; case GN_PHONEBOOK_ENTRY_Number: switch (entry->subentries[i].number_type) { case GN_PHONEBOOK_NUMBER_Home: ldif_entry_write(f, "homePhone", entry->subentries[i].data.number, 1); break; case GN_PHONEBOOK_NUMBER_Mobile: ldif_entry_write(f, "mobile", entry->subentries[i].data.number, 1); break; case GN_PHONEBOOK_NUMBER_Fax: ldif_entry_write(f, "fax", entry->subentries[i].data.number, 1); break; case GN_PHONEBOOK_NUMBER_Work: ldif_entry_write(f, "workPhone", entry->subentries[i].data.number, 1); break; case GN_PHONEBOOK_NUMBER_None: case GN_PHONEBOOK_NUMBER_Common: case GN_PHONEBOOK_NUMBER_General: ldif_entry_write(f, "telephoneNumber", entry->subentries[i].data.number, 1); break; default: break; } break; case GN_PHONEBOOK_ENTRY_URL: ldif_entry_write(f, "homeurl", entry->subentries[i].data.number, 1); break; default: fprintf(f, "custom%d: %s\n", entry->subentries[i].entry_type, entry->subentries[i].data.number); break; } } fprintf(f, "\n"); return 0; } #define BEGINS(a) ( !strncasecmp(buf, a, strlen(a)) ) #define STOREINT(a, b) if (BEGINS(a)) { b = atoi(buf+strlen(a)); continue; } #define STORE2(a, b, c) if (BEGINS(a)) { c; strncpy(b, buf+strlen(a), strlen(buf)-strlen(a)-1); continue; } #define STORE2_BASE64(a, b, c) if (BEGINS(a)) { c; utf8_base64_decode(b, GN_PHONEBOOK_NAME_MAX_LENGTH, buf+strlen(a), strlen(buf)-strlen(a)-1); continue; } #define STORE(a, b) STORE2(a, b, (void) 0) #define STORE_BASE64(a, b) STORE2_BASE64(a, b, (void) 0) #define STORESUB(a, c) if (entry->subentries_count == GN_PHONEBOOK_SUBENTRIES_MAX_NUMBER) return -1; \ STORE2(a, entry->subentries[entry->subentries_count++].data.number, \ entry->subentries[entry->subentries_count].entry_type = c); #define STORESUB_BASE64(a, c) if (entry->subentries_count == GN_PHONEBOOK_SUBENTRIES_MAX_NUMBER) return -1; \ STORE2_BASE64(a, entry->subentries[entry->subentries_count++].data.number, \ entry->subentries[entry->subentries_count].entry_type = c); #define STORENUM(a, c) if (entry->subentries_count == GN_PHONEBOOK_SUBENTRIES_MAX_NUMBER) return -1; \ STORE2(a, entry->subentries[entry->subentries_count++].data.number, \ entry->subentries[entry->subentries_count].entry_type = GN_PHONEBOOK_ENTRY_Number; \ entry->subentries[entry->subentries_count].number_type = c); #define STORENUM_BASE64(a, c) if (entry->subentries_count == GN_PHONEBOOK_SUBENTRIES_MAX_NUMBER) return -1; \ STORE2_BASE64(a, entry->subentries[entry->subentries_count++].data.number, \ entry->subentries[entry->subentries_count].entry_type = GN_PHONEBOOK_ENTRY_Number; \ entry->subentries[entry->subentries_count].number_type = c); #undef ERROR #define ERROR(a) fprintf(stderr, "%s\n", a) /* We assume gn_phonebook_entry is ready for writing in, ie. no rubbish inside */ GNOKII_API int gn_ldif2phonebook(FILE *f, gn_phonebook_entry *entry) { char buf[10240]; int i; while (1) { if (!fgets(buf, 1024, f)) return -1; if (BEGINS("dn:")) break; } while (1) { if (!fgets(buf, 1024, f)) { ERROR("LDIF began but not ended?"); return -1; } STORE("cn: ", entry->name); STORE_BASE64("cn:: ", entry->name); STORESUB("homeurl: ", GN_PHONEBOOK_ENTRY_URL); STORESUB_BASE64("homeurl:: ", GN_PHONEBOOK_ENTRY_URL); STORESUB("mail: ", GN_PHONEBOOK_ENTRY_Email); STORESUB_BASE64("mail:: ", GN_PHONEBOOK_ENTRY_Email); STORESUB("homePostalAddress: ", GN_PHONEBOOK_ENTRY_Postal); STORESUB_BASE64("homePostalAddress:: ", GN_PHONEBOOK_ENTRY_Postal); STORESUB("Description: ", GN_PHONEBOOK_ENTRY_Note); STORESUB_BASE64("Description:: ", GN_PHONEBOOK_ENTRY_Note); STORENUM("homePhone: ", GN_PHONEBOOK_NUMBER_Home); STORENUM_BASE64("homePhone:: ", GN_PHONEBOOK_NUMBER_Home); STORENUM("mobile: ", GN_PHONEBOOK_NUMBER_Mobile); STORENUM_BASE64("mobile:: ", GN_PHONEBOOK_NUMBER_Mobile); STORENUM("cellphone: ", GN_PHONEBOOK_NUMBER_Mobile); STORENUM_BASE64("cellphone:: ", GN_PHONEBOOK_NUMBER_Mobile); STORENUM("fax: ", GN_PHONEBOOK_NUMBER_Fax); STORENUM_BASE64("fax:: ", GN_PHONEBOOK_NUMBER_Fax); STORENUM("workPhone: ", GN_PHONEBOOK_NUMBER_Work); STORENUM_BASE64("workPhone:: ", GN_PHONEBOOK_NUMBER_Work); STORENUM("telephoneNumber: ", GN_PHONEBOOK_NUMBER_General); STORENUM_BASE64("telephoneNumber:: ", GN_PHONEBOOK_NUMBER_General); STOREINT("businessCategory: ", entry->caller_group); if (BEGINS("\n")) break; } /* set entry->number from the first sub-entry that is a number */ for (i = 0; i < entry->subentries_count && entry->number[0] == 0; i++) { if (entry->subentries[i].entry_type == GN_PHONEBOOK_ENTRY_Number) { switch (entry->subentries[i].number_type) { case GN_PHONEBOOK_NUMBER_None: case GN_PHONEBOOK_NUMBER_Common: case GN_PHONEBOOK_NUMBER_General: case GN_PHONEBOOK_NUMBER_Work: case GN_PHONEBOOK_NUMBER_Home: case GN_PHONEBOOK_NUMBER_Mobile: dprintf("setting default number to %s\n", entry->subentries[i].data.number); snprintf(entry->number, sizeof(entry->number), "%s", entry->subentries[i].data.number); break; default: dprintf("unknown type\n"); break; } } } return 0; } gnokii-0.6.31/common/devices/0000755000175000017500000000000011666163463014127 5ustar leoleognokii-0.6.31/common/devices/Makefile.am0000644000175000017500000000111611666163120016150 0ustar leoleoDEFS = -DCOMPILING_LIBGNOKII noinst_LTLIBRARIES = libDEVICES.la WIN32_FILES = \ winserial.c \ winirda.c \ winbluetooth.c UNIX_FILES = \ unixserial.c \ unixbluetooth.c \ osxbluetooth.c \ unixirda.c \ tcp.c \ socketphonet.c if WIN32 PLATFORM_FILES = $(WIN32_FILES) else PLATFORM_FILES = $(UNIX_FILES) endif libDEVICES_la_SOURCES = \ $(PLATFORM_FILES) \ tekram.c \ irda.c \ dku2libusb.c \ bluetooth.c libDEVICES_la_CFLAGS = \ -I$(top_srcdir)/include libDEVICES_la_LIBADD = \ $(USB_LIBS) \ $(BLUETOOTH_LIBS) \ $(TCP_LIBS) EXTRA_DIST = $(WIN32_FILES) $(UNIX_FILES) gnokii-0.6.31/common/devices/Makefile.in0000644000175000017500000007773411666163211016205 0ustar leoleo# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = common/devices DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_expand_dir.m4 \ $(top_srcdir)/m4/acx_pthread.m4 $(top_srcdir)/m4/intltool.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = libDEVICES_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am__libDEVICES_la_SOURCES_DIST = unixserial.c unixbluetooth.c \ osxbluetooth.c unixirda.c tcp.c socketphonet.c winserial.c \ winirda.c winbluetooth.c tekram.c irda.c dku2libusb.c \ bluetooth.c am__objects_1 = libDEVICES_la-unixserial.lo \ libDEVICES_la-unixbluetooth.lo libDEVICES_la-osxbluetooth.lo \ libDEVICES_la-unixirda.lo libDEVICES_la-tcp.lo \ libDEVICES_la-socketphonet.lo am__objects_2 = libDEVICES_la-winserial.lo libDEVICES_la-winirda.lo \ libDEVICES_la-winbluetooth.lo @WIN32_FALSE@am__objects_3 = $(am__objects_1) @WIN32_TRUE@am__objects_3 = $(am__objects_2) am_libDEVICES_la_OBJECTS = $(am__objects_3) libDEVICES_la-tekram.lo \ libDEVICES_la-irda.lo libDEVICES_la-dku2libusb.lo \ libDEVICES_la-bluetooth.lo libDEVICES_la_OBJECTS = $(am_libDEVICES_la_OBJECTS) libDEVICES_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libDEVICES_la_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libDEVICES_la_SOURCES) DIST_SOURCES = $(am__libDEVICES_la_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLUETOOTH_LIBS = @BLUETOOTH_LIBS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = -DCOMPILING_LIBGNOKII DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FIND = @FIND@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLDFLAGS = @GLDFLAGS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GMODULE_CFLAGS = @GMODULE_CFLAGS@ GMODULE_LIBS = @GMODULE_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GNOKII_LT_VERSION = @GNOKII_LT_VERSION@ GNOKII_LT_VERSION_AGE = @GNOKII_LT_VERSION_AGE@ GNOKII_LT_VERSION_CURRENT = @GNOKII_LT_VERSION_CURRENT@ GNOKII_LT_VERSION_REVISION = @GNOKII_LT_VERSION_REVISION@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_LIBICAL = @HAVE_LIBICAL@ HAVE_LIBUSB = @HAVE_LIBUSB@ HAVE_SOCKETPHONET = @HAVE_SOCKETPHONET@ HAVE_XGNOKII = @HAVE_XGNOKII@ ICAL_CFLAGS = @ICAL_CFLAGS@ ICAL_LIBS = @ICAL_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBGNOKII_VERSION_MAJOR = @LIBGNOKII_VERSION_MAJOR@ LIBGNOKII_VERSION_MINOR = @LIBGNOKII_VERSION_MINOR@ LIBGNOKII_VERSION_RELEASE = @LIBGNOKII_VERSION_RELEASE@ LIBGNOKII_VERSION_STRING = @LIBGNOKII_VERSION_STRING@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBPCSCLITE_CFLAGS = @LIBPCSCLITE_CFLAGS@ LIBPCSCLITE_LIBS = @LIBPCSCLITE_LIBS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKE = @MAKE@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ MYSQLCONFIG = @MYSQLCONFIG@ MYSQLCONFIG5 = @MYSQLCONFIG5@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_LIBS = @MYSQL_LIBS@ NEED_LOCALE_CHARSET = @NEED_LOCALE_CHARSET@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OWN_GETOPT = @OWN_GETOPT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PGCONFIG = @PGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSTGRES_CFLAGS = @POSTGRES_CFLAGS@ POSTGRES_LIBS = @POSTGRES_LIBS@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LIBS = @SQLITE3_LIBS@ SQLITE_CFLAGS = @SQLITE_CFLAGS@ SQLITE_LIBS = @SQLITE_LIBS@ STRIP = @STRIP@ TCP_LIBS = @TCP_LIBS@ TERMLDFLAGS = @TERMLDFLAGS@ TERMLIBS = @TERMLIBS@ USB_LIBS = @USB_LIBS@ USE_NLS = @USE_NLS@ USE_UNIX98PTYS = @USE_UNIX98PTYS@ VERSION = @VERSION@ WIN32 = @WIN32@ WIN32_CROSS = @WIN32_CROSS@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ XPACKAGE = @XPACKAGE@ XPM_CFLAGS = @XPM_CFLAGS@ XPM_LIBS = @XPM_LIBS@ XVERSION = @XVERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ acx_pthread_config = @acx_pthread_config@ 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@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libDEVICES.la WIN32_FILES = \ winserial.c \ winirda.c \ winbluetooth.c UNIX_FILES = \ unixserial.c \ unixbluetooth.c \ osxbluetooth.c \ unixirda.c \ tcp.c \ socketphonet.c @WIN32_FALSE@PLATFORM_FILES = $(UNIX_FILES) @WIN32_TRUE@PLATFORM_FILES = $(WIN32_FILES) libDEVICES_la_SOURCES = \ $(PLATFORM_FILES) \ tekram.c \ irda.c \ dku2libusb.c \ bluetooth.c libDEVICES_la_CFLAGS = \ -I$(top_srcdir)/include libDEVICES_la_LIBADD = \ $(USB_LIBS) \ $(BLUETOOTH_LIBS) \ $(TCP_LIBS) EXTRA_DIST = $(WIN32_FILES) $(UNIX_FILES) all: all-am .SUFFIXES: .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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu common/devices/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu common/devices/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 $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libDEVICES.la: $(libDEVICES_la_OBJECTS) $(libDEVICES_la_DEPENDENCIES) $(libDEVICES_la_LINK) $(libDEVICES_la_OBJECTS) $(libDEVICES_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDEVICES_la-bluetooth.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDEVICES_la-dku2libusb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDEVICES_la-irda.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDEVICES_la-osxbluetooth.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDEVICES_la-socketphonet.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDEVICES_la-tcp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDEVICES_la-tekram.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDEVICES_la-unixbluetooth.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDEVICES_la-unixirda.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDEVICES_la-unixserial.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDEVICES_la-winbluetooth.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDEVICES_la-winirda.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDEVICES_la-winserial.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @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 $@ $< libDEVICES_la-unixserial.lo: unixserial.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDEVICES_la_CFLAGS) $(CFLAGS) -MT libDEVICES_la-unixserial.lo -MD -MP -MF $(DEPDIR)/libDEVICES_la-unixserial.Tpo -c -o libDEVICES_la-unixserial.lo `test -f 'unixserial.c' || echo '$(srcdir)/'`unixserial.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDEVICES_la-unixserial.Tpo $(DEPDIR)/libDEVICES_la-unixserial.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='unixserial.c' object='libDEVICES_la-unixserial.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDEVICES_la_CFLAGS) $(CFLAGS) -c -o libDEVICES_la-unixserial.lo `test -f 'unixserial.c' || echo '$(srcdir)/'`unixserial.c libDEVICES_la-unixbluetooth.lo: unixbluetooth.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDEVICES_la_CFLAGS) $(CFLAGS) -MT libDEVICES_la-unixbluetooth.lo -MD -MP -MF $(DEPDIR)/libDEVICES_la-unixbluetooth.Tpo -c -o libDEVICES_la-unixbluetooth.lo `test -f 'unixbluetooth.c' || echo '$(srcdir)/'`unixbluetooth.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDEVICES_la-unixbluetooth.Tpo $(DEPDIR)/libDEVICES_la-unixbluetooth.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='unixbluetooth.c' object='libDEVICES_la-unixbluetooth.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDEVICES_la_CFLAGS) $(CFLAGS) -c -o libDEVICES_la-unixbluetooth.lo `test -f 'unixbluetooth.c' || echo '$(srcdir)/'`unixbluetooth.c libDEVICES_la-osxbluetooth.lo: osxbluetooth.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDEVICES_la_CFLAGS) $(CFLAGS) -MT libDEVICES_la-osxbluetooth.lo -MD -MP -MF $(DEPDIR)/libDEVICES_la-osxbluetooth.Tpo -c -o libDEVICES_la-osxbluetooth.lo `test -f 'osxbluetooth.c' || echo '$(srcdir)/'`osxbluetooth.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDEVICES_la-osxbluetooth.Tpo $(DEPDIR)/libDEVICES_la-osxbluetooth.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='osxbluetooth.c' object='libDEVICES_la-osxbluetooth.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDEVICES_la_CFLAGS) $(CFLAGS) -c -o libDEVICES_la-osxbluetooth.lo `test -f 'osxbluetooth.c' || echo '$(srcdir)/'`osxbluetooth.c libDEVICES_la-unixirda.lo: unixirda.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDEVICES_la_CFLAGS) $(CFLAGS) -MT libDEVICES_la-unixirda.lo -MD -MP -MF $(DEPDIR)/libDEVICES_la-unixirda.Tpo -c -o libDEVICES_la-unixirda.lo `test -f 'unixirda.c' || echo '$(srcdir)/'`unixirda.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDEVICES_la-unixirda.Tpo $(DEPDIR)/libDEVICES_la-unixirda.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='unixirda.c' object='libDEVICES_la-unixirda.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDEVICES_la_CFLAGS) $(CFLAGS) -c -o libDEVICES_la-unixirda.lo `test -f 'unixirda.c' || echo '$(srcdir)/'`unixirda.c libDEVICES_la-tcp.lo: tcp.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDEVICES_la_CFLAGS) $(CFLAGS) -MT libDEVICES_la-tcp.lo -MD -MP -MF $(DEPDIR)/libDEVICES_la-tcp.Tpo -c -o libDEVICES_la-tcp.lo `test -f 'tcp.c' || echo '$(srcdir)/'`tcp.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDEVICES_la-tcp.Tpo $(DEPDIR)/libDEVICES_la-tcp.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tcp.c' object='libDEVICES_la-tcp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDEVICES_la_CFLAGS) $(CFLAGS) -c -o libDEVICES_la-tcp.lo `test -f 'tcp.c' || echo '$(srcdir)/'`tcp.c libDEVICES_la-socketphonet.lo: socketphonet.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDEVICES_la_CFLAGS) $(CFLAGS) -MT libDEVICES_la-socketphonet.lo -MD -MP -MF $(DEPDIR)/libDEVICES_la-socketphonet.Tpo -c -o libDEVICES_la-socketphonet.lo `test -f 'socketphonet.c' || echo '$(srcdir)/'`socketphonet.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDEVICES_la-socketphonet.Tpo $(DEPDIR)/libDEVICES_la-socketphonet.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='socketphonet.c' object='libDEVICES_la-socketphonet.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDEVICES_la_CFLAGS) $(CFLAGS) -c -o libDEVICES_la-socketphonet.lo `test -f 'socketphonet.c' || echo '$(srcdir)/'`socketphonet.c libDEVICES_la-winserial.lo: winserial.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDEVICES_la_CFLAGS) $(CFLAGS) -MT libDEVICES_la-winserial.lo -MD -MP -MF $(DEPDIR)/libDEVICES_la-winserial.Tpo -c -o libDEVICES_la-winserial.lo `test -f 'winserial.c' || echo '$(srcdir)/'`winserial.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDEVICES_la-winserial.Tpo $(DEPDIR)/libDEVICES_la-winserial.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='winserial.c' object='libDEVICES_la-winserial.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDEVICES_la_CFLAGS) $(CFLAGS) -c -o libDEVICES_la-winserial.lo `test -f 'winserial.c' || echo '$(srcdir)/'`winserial.c libDEVICES_la-winirda.lo: winirda.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDEVICES_la_CFLAGS) $(CFLAGS) -MT libDEVICES_la-winirda.lo -MD -MP -MF $(DEPDIR)/libDEVICES_la-winirda.Tpo -c -o libDEVICES_la-winirda.lo `test -f 'winirda.c' || echo '$(srcdir)/'`winirda.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDEVICES_la-winirda.Tpo $(DEPDIR)/libDEVICES_la-winirda.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='winirda.c' object='libDEVICES_la-winirda.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDEVICES_la_CFLAGS) $(CFLAGS) -c -o libDEVICES_la-winirda.lo `test -f 'winirda.c' || echo '$(srcdir)/'`winirda.c libDEVICES_la-winbluetooth.lo: winbluetooth.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDEVICES_la_CFLAGS) $(CFLAGS) -MT libDEVICES_la-winbluetooth.lo -MD -MP -MF $(DEPDIR)/libDEVICES_la-winbluetooth.Tpo -c -o libDEVICES_la-winbluetooth.lo `test -f 'winbluetooth.c' || echo '$(srcdir)/'`winbluetooth.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDEVICES_la-winbluetooth.Tpo $(DEPDIR)/libDEVICES_la-winbluetooth.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='winbluetooth.c' object='libDEVICES_la-winbluetooth.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDEVICES_la_CFLAGS) $(CFLAGS) -c -o libDEVICES_la-winbluetooth.lo `test -f 'winbluetooth.c' || echo '$(srcdir)/'`winbluetooth.c libDEVICES_la-tekram.lo: tekram.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDEVICES_la_CFLAGS) $(CFLAGS) -MT libDEVICES_la-tekram.lo -MD -MP -MF $(DEPDIR)/libDEVICES_la-tekram.Tpo -c -o libDEVICES_la-tekram.lo `test -f 'tekram.c' || echo '$(srcdir)/'`tekram.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDEVICES_la-tekram.Tpo $(DEPDIR)/libDEVICES_la-tekram.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tekram.c' object='libDEVICES_la-tekram.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDEVICES_la_CFLAGS) $(CFLAGS) -c -o libDEVICES_la-tekram.lo `test -f 'tekram.c' || echo '$(srcdir)/'`tekram.c libDEVICES_la-irda.lo: irda.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDEVICES_la_CFLAGS) $(CFLAGS) -MT libDEVICES_la-irda.lo -MD -MP -MF $(DEPDIR)/libDEVICES_la-irda.Tpo -c -o libDEVICES_la-irda.lo `test -f 'irda.c' || echo '$(srcdir)/'`irda.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDEVICES_la-irda.Tpo $(DEPDIR)/libDEVICES_la-irda.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='irda.c' object='libDEVICES_la-irda.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDEVICES_la_CFLAGS) $(CFLAGS) -c -o libDEVICES_la-irda.lo `test -f 'irda.c' || echo '$(srcdir)/'`irda.c libDEVICES_la-dku2libusb.lo: dku2libusb.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDEVICES_la_CFLAGS) $(CFLAGS) -MT libDEVICES_la-dku2libusb.lo -MD -MP -MF $(DEPDIR)/libDEVICES_la-dku2libusb.Tpo -c -o libDEVICES_la-dku2libusb.lo `test -f 'dku2libusb.c' || echo '$(srcdir)/'`dku2libusb.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDEVICES_la-dku2libusb.Tpo $(DEPDIR)/libDEVICES_la-dku2libusb.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dku2libusb.c' object='libDEVICES_la-dku2libusb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDEVICES_la_CFLAGS) $(CFLAGS) -c -o libDEVICES_la-dku2libusb.lo `test -f 'dku2libusb.c' || echo '$(srcdir)/'`dku2libusb.c libDEVICES_la-bluetooth.lo: bluetooth.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDEVICES_la_CFLAGS) $(CFLAGS) -MT libDEVICES_la-bluetooth.lo -MD -MP -MF $(DEPDIR)/libDEVICES_la-bluetooth.Tpo -c -o libDEVICES_la-bluetooth.lo `test -f 'bluetooth.c' || echo '$(srcdir)/'`bluetooth.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDEVICES_la-bluetooth.Tpo $(DEPDIR)/libDEVICES_la-bluetooth.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bluetooth.c' object='libDEVICES_la-bluetooth.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDEVICES_la_CFLAGS) $(CFLAGS) -c -o libDEVICES_la-bluetooth.lo `test -f 'bluetooth.c' || echo '$(srcdir)/'`bluetooth.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: 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-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES 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-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gnokii-0.6.31/common/devices/winirda.c0000644000175000017500000001140411666163120015716 0ustar leoleo/* * * $Id$ * * G N O K I I * * A Linux/Unix toolset and driver for the mobile phones. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library 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. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright (C) 2004 Phil Ashby * */ #include "config.h" #ifdef HAVE_IRDA #define WIN32_LEAN_AND_MEAN #include #include #include "compat.h" #include "misc.h" #include "devices/irda.h" /* 'cause af_irda needs it.. */ #define _WIN32_WINDOWS #include #define INFO_LEN 22 #define DISCOVERY_TIMEOUT 60000 #define DISCOVERY_SLEEP 400 /* Maximum number of devices we look for */ #define MAX_DEVICES 20 #define INVALID_DADDR ((DWORD)-1L) static DWORD irda_discover_device(struct gn_statemachine *state, SOCKET fd) { DEVICELIST *list; IRDA_DEVICE_INFO *dev; unsigned char *buf; int s, len, i; DWORD daddr = INVALID_DADDR; DWORD t1, t2; len = sizeof(*list) + sizeof(*dev) * MAX_DEVICES; buf = malloc(len); list = (DEVICELIST *)buf; dev = list->Device; t1 = timeGetTime(); dprintf("Expecting: %s\n", state->config.irda_string); do { s = len; memset(buf, 0, s); if (getsockopt(fd, SOL_IRLMP, IRLMP_ENUMDEVICES, buf, &s) != SOCKET_ERROR) { for (i = 0; (i < list->numDevice) && (daddr == INVALID_DADDR); i++) { if (strlen(state->config.irda_string) == 0) { /* We take first entry */ daddr = *(DWORD*)dev[i].irdaDeviceID; dprintf("Default: %s\t%x\n", dev[i].irdaDeviceName, *(DWORD*)dev[i].irdaDeviceID); } else { if (strncmp(dev[i].irdaDeviceName, state->config.irda_string, INFO_LEN) == 0) { daddr = *(DWORD*)dev[i].irdaDeviceID; dprintf("Matching: %s\t%x\n", dev[i].irdaDeviceName, *(DWORD*)dev[i].irdaDeviceID); } else { dprintf("Not matching: %s\t%x\n", dev[i].irdaDeviceName, *(DWORD*)dev[i].irdaDeviceID); } } } } if (daddr == INVALID_DADDR) { Sleep(DISCOVERY_SLEEP); } t2 = timeGetTime(); } while ((t2 - t1 < DISCOVERY_TIMEOUT) && (daddr == INVALID_DADDR)); free(buf); return daddr; } int irda_open(struct gn_statemachine *state) { WSADATA wsaData; SOCKADDR_IRDA peer; SOCKET fd = INVALID_SOCKET; DWORD daddr = INVALID_DADDR; int x = 1; /* Initialize */ if (WSAStartup(MAKEWORD(2,0), &wsaData) != 0) { dprintf("WSAStartup() failed.\n"); fprintf(stderr, _("Failed to initialize socket subsystem: need WINSOCK2. Please upgrade.\n")); return -1; } /* Create an irda socket */ if ((fd = socket(AF_IRDA, SOCK_STREAM, 0)) < 0) { perror("socket"); dprintf("Failed to create an irda socket.\n"); return -1; } /* Discover devices */ daddr = irda_discover_device(state, fd); /* discover the devices */ if (daddr == INVALID_DADDR) { dprintf("Failed to discover any irda device.\n"); closesocket(fd); return -1; } /* Prepare socket structure for irda socket */ peer.irdaAddressFamily = AF_IRDA; *(DWORD*)peer.irdaDeviceID = daddr; if (!strcasecmp(state->config.port_device, "IrDA:IrCOMM")) { snprintf(peer.irdaServiceName, sizeof(peer.irdaServiceName), "IrDA:IrCOMM"); if (setsockopt(fd, SOL_IRLMP, IRLMP_9WIRE_MODE, (char *)&x, sizeof(x)) == SOCKET_ERROR) { perror("setsockopt"); dprintf("Failed to set irda socket options.\n"); closesocket(fd); return -1; } } else snprintf(peer.irdaServiceName, sizeof(peer.irdaServiceName), "Nokia:PhoNet"); /* Connect to the irda socket */ if (connect(fd, (struct sockaddr *)&peer, sizeof(peer))) { /* Connect to service "Nokia:PhoNet" */ perror("connect"); dprintf("Failed to connect to irda socket\n"); closesocket(fd); return -1; } return (int)fd; } int irda_close(int fd, struct gn_statemachine *state) { shutdown(fd, 0); closesocket((SOCKET)fd); WSACleanup(); return 0; } int irda_write(int fd, const __ptr_t bytes, int size, struct gn_statemachine *state) { return send((SOCKET)fd, bytes, size, 0); } int irda_read(int fd, __ptr_t bytes, int size, struct gn_statemachine *state) { return recv((SOCKET)fd, bytes, size, 0); } int irda_select(int fd, struct timeval *timeout, struct gn_statemachine *state) { fd_set readfds; FD_ZERO(&readfds); FD_SET((SOCKET)fd, &readfds); return select(0 /* ignored on Win32 */, &readfds, NULL, NULL, timeout); } #endif /* HAVE_IRDA */ gnokii-0.6.31/common/devices/tcp.c0000644000175000017500000001274311666163120015056 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2002 Jan Kratochvil, Pavel Machek, Manfred Jonsson, Ladis Michl Copyright (C) 2002-2004 BORBELY Zoltan, Pawel Kot */ #include "config.h" #include "misc.h" #include "devices/tcp.h" #include "devices/serial.h" #ifndef WIN32 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef HAVE_SYS_FILE_H # include #endif #ifdef HAVE_SYS_IOCTL_COMPAT_H # include #endif #ifdef HAVE_SYS_SELECT_H # include #endif #ifndef O_NONBLOCK # define O_NONBLOCK 0 #endif /* Open the serial port and store the settings. */ static int tcp_open(const char *file) { int fd; struct sockaddr_in addr; char *filedup,*portstr,*end; unsigned long portul; struct hostent *hostent; fd = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP); if (fd == -1) { perror(_("Gnokii tcp_open: socket()")); return -1; } if (!(filedup = strdup(file))) { fail_close: close(fd); return -1; } if (!(portstr = strchr(filedup, ':'))) { fprintf(stderr, _("Gnokii tcp_open: colon (':') not found in connect strings \"%s\"!\n"), filedup); fail_free: free(filedup); goto fail_close; } *portstr++ = '\0'; portul = strtoul(portstr, &end, 0); if ((end && *end) || portul >= 0x10000) { fprintf(stderr, _("Gnokii tcp_open: Port string \"%s\" not valid for IPv4 connection!\n"), portstr); goto fail_free; } if (!(hostent = gethostbyname(filedup))) { fprintf(stderr, _("Gnokii tcp_open: Unknown host \"%s\"!\n"), filedup); goto fail_free; } if (hostent->h_addrtype != AF_INET || hostent->h_length != sizeof(addr.sin_addr) || !hostent->h_addr_list[0]) { fprintf(stderr, _("Gnokii tcp_open: Address resolve for host \"%s\" not compatible!\n"), filedup); goto fail_free; } free(filedup); addr.sin_family = AF_INET; addr.sin_port = htons(portul); memcpy(&addr.sin_addr, hostent->h_addr_list[0], sizeof(addr.sin_addr)); if (connect(fd, (struct sockaddr *)&addr, sizeof(addr))) { perror(_("Gnokii tcp_open: connect()")); goto fail_close; } return fd; } int tcp_close(int fd, struct gn_statemachine *state) { /* handle config file disconnect_script: */ if (device_script(fd, "disconnect_script", state) == -1) fprintf(stderr, _("Gnokii tcp_close: disconnect_script\n")); return close(fd); } /* Open a device with standard options. * Use value (-1) for "with_hw_handshake" if its specification is required from the user */ int tcp_opendevice(const char *file, int with_async, struct gn_statemachine *state) { int fd; int retcode; /* Open device */ fd = tcp_open(file); if (fd < 0) return fd; /* handle config file connect_script: */ if (device_script(fd, "connect_script", state) == -1) { fprintf(stderr, _("Gnokii tcp_opendevice: connect_script\n")); tcp_close(fd, state); return -1; } /* Allow process/thread to receive SIGIO */ #if !(__unices__) retcode = fcntl(fd, F_SETOWN, getpid()); if (retcode == -1){ perror(_("Gnokii tcp_opendevice: fcntl(F_SETOWN)")); tcp_close(fd, state); return -1; } #endif /* Make filedescriptor asynchronous. */ /* We need to supply FNONBLOCK (or O_NONBLOCK) again as it would get reset * by F_SETFL as a side-effect! */ #ifdef FNONBLOCK retcode = fcntl(fd, F_SETFL, (with_async ? FASYNC : 0) | FNONBLOCK); #else # ifdef FASYNC retcode = fcntl(fd, F_SETFL, (with_async ? FASYNC : 0) | O_NONBLOCK); # else retcode = fcntl(fd, F_SETFL, O_NONBLOCK); if (retcode != -1) retcode = ioctl(fd, FIOASYNC, &with_async); # endif #endif if (retcode == -1) { perror(_("Gnokii tcp_opendevice: fcntl(F_SETFL)")); tcp_close(fd, state); return -1; } return fd; } int tcp_select(int fd, struct timeval *timeout, struct gn_statemachine *state) { return serial_select(fd, timeout, state); } /* Read from serial device. */ size_t tcp_read(int fd, __ptr_t buf, size_t nbytes, struct gn_statemachine *state) { return read(fd, buf, nbytes); } /* Write to serial device. */ size_t tcp_write(int fd, const __ptr_t buf, size_t n, struct gn_statemachine *state) { return write(fd, buf, n); } #else /* WIN32 */ int tcp_close(int fd, struct gn_statemachine *state) { return -1; } int tcp_opendevice(const char *file, int with_async, struct gn_statemachine *state) { return -1; } size_t tcp_read(int fd, __ptr_t buf, size_t nbytes, struct gn_statemachine *state) { return -1; } size_t tcp_write(int fd, const __ptr_t buf, size_t n, struct gn_statemachine *state) { return -1; } int tcp_select(int fd, struct timeval *timeout, struct gn_statemachine *state) { return -1; } #endif /* WIN32 */ gnokii-0.6.31/common/devices/unixbluetooth.c0000644000175000017500000003221211666163120017172 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janík ml. Copyright (C) 2002 Ladis Michl, Marcel Holtmann Copyright (C) 2003 BORBELY Zoltan, Pawel Kot PhoneManager Utilities: rfcomm channel autodetection Copyright (C) 2003-2004 Edd Dumbill Copyright (C) 2005-2007 Bastien Nocera */ #include "config.h" #include "compat.h" #include "misc.h" #include "gnokii.h" #include "devices/unixbluetooth.h" #if defined(HAVE_BLUETOOTH_BLUEZ) || defined(HAVE_BLUETOOTH_NETGRAPH) || defined(HAVE_BLUETOOTH_NETBT) #include #include #include #include #include #include #include #ifdef HAVE_BLUETOOTH_NETGRAPH /* FreeBSD / netgraph */ #include #include #define BTPROTO_RFCOMM BLUETOOTH_PROTO_RFCOMM #define BDADDR_ANY NG_HCI_BDADDR_ANY #define GNOKII_SERIAL_PORT_CLASS SDP_SERVICE_CLASS_SERIAL_PORT #define GNOKII_DIALUP_NETWORK_CLASS SDP_SERVICE_CLASS_DIALUP_NETWORKING #define sockaddr_rc sockaddr_rfcomm #define rc_family rfcomm_family #define rc_bdaddr rfcomm_bdaddr #define rc_channel rfcomm_channel #else #ifdef HAVE_BLUETOOTH_NETBT /* FreeBSD / netbt */ #include #include #define GNOKII_SERIAL_PORT_CLASS SDP_SERVICE_CLASS_SERIAL_PORT #define GNOKII_DIALUP_NETWORK_CLASS SDP_SERVICE_CLASS_DIALUP_NETWORKING #define sockaddr_rc sockaddr_bt #define rc_family bt_family #define rc_bdaddr bt_bdaddr #define rc_channel bt_channel #else /* Linux / BlueZ support */ #include #include #include #include #define GNOKII_SERIAL_PORT_CLASS SERIAL_PORT_SVCLASS_ID #define GNOKII_DIALUP_NETWORK_CLASS DIALUP_NET_SVCLASS_ID #endif /* HAVE_BLUETOOTH_NETBT */ #endif /* HAVE_BLUETOOTH_NETGRAPH */ #if defined(HAVE_BLUETOOTH_NETGRAPH) || defined(HAVE_BLUETOOTH_NETBT) /* FreeBSD / NetBSD */ /* ** FreeBSD version of the find_service_channel function. ** Written by Guido Falsi . ** Contains code taken from FreeBSD's sdpcontrol and rfcomm_sppd ** programs, which are Copyright (c) 2001-2003 Maksim Yevmenkin ** . ** ** Also thanks to Iain Hibbert for his suggestions. */ #define attrs_len (sizeof(attrs)/sizeof(attrs[0])) #define NRECS 25 /* request this much records from the SDP server */ #define BSIZE 256 /* one attribute buffer size */ #define values_len (sizeof(values)/sizeof(values[0])) static int find_service_channel(bdaddr_t *adapter, bdaddr_t *device, int only_gnapplet, uint16_t svclass_id) { int i, channel = -1; char name[64]; void *ss = NULL; uint32_t attrs[] = { SDP_ATTR_RANGE( SDP_ATTR_PROTOCOL_DESCRIPTOR_LIST, SDP_ATTR_PROTOCOL_DESCRIPTOR_LIST), SDP_ATTR_RANGE( SDP_ATTR_PRIMARY_LANGUAGE_BASE_ID + SDP_ATTR_SERVICE_NAME_OFFSET, SDP_ATTR_PRIMARY_LANGUAGE_BASE_ID + SDP_ATTR_SERVICE_NAME_OFFSET), }; /* Buffer for the attributes */ static uint8_t buffer[NRECS * attrs_len][BSIZE]; /* SDP attributes */ static sdp_attr_t values[NRECS * attrs_len]; /* Initialize attribute values array */ for (i = 0; i < values_len; i ++) { values[i].flags = SDP_ATTR_INVALID; values[i].attr = 0; values[i].vlen = BSIZE; values[i].value = buffer[i]; } if ((ss = sdp_open(adapter, device)) == NULL) return -1; if (sdp_error(ss) != 0) goto end; if (sdp_search(ss, 1, &svclass_id, attrs_len, attrs, values_len, values) != 0) goto end; for (i = 0; i < values_len; i++) { union { uint8_t uint8; uint16_t uint16; uint32_t uint32; uint64_t uint64; int128_t int128; } value; uint8_t *start, *end; uint32_t type, len; if (values[i].flags != SDP_ATTR_OK) break; start = values[i].value; end = values[i].value + values[i].vlen; switch (values[i].attr) { case SDP_ATTR_PROTOCOL_DESCRIPTOR_LIST: SDP_GET8(type, start); switch (type) { case SDP_DATA_SEQ8: SDP_GET8(len, start); break; case SDP_DATA_SEQ16: SDP_GET16(len, start); break; case SDP_DATA_SEQ32: SDP_GET32(len, start); break; default: goto end; break; } SDP_GET8(type, start); switch (type) { case SDP_DATA_SEQ8: SDP_GET8(len, start); break; case SDP_DATA_SEQ16: SDP_GET16(len, start); break; case SDP_DATA_SEQ32: SDP_GET32(len, start); break; default: goto end; } while (start < end) { SDP_GET8(type, start); switch (type) { case SDP_DATA_UUID16: SDP_GET16(value.uint16, start); break; case SDP_DATA_UUID32: SDP_GET32(value.uint32, start); break; case SDP_DATA_UUID128: SDP_GET_UUID128(&value.int128, start); break; default: goto end; } if (value.uint16 == 3) { SDP_GET8(type, start); switch (type) { case SDP_DATA_UINT8: case SDP_DATA_INT8: SDP_GET8(value.uint8, start); channel = value.uint8; break; case SDP_DATA_UINT16: case SDP_DATA_INT16: SDP_GET16(value.uint16, start); channel = value.uint16; break; case SDP_DATA_UINT32: case SDP_DATA_INT32: SDP_GET32(value.uint32, start); channel = value.uint32; break; default: goto end; } } else { SDP_GET8(type, start); switch (type) { case SDP_DATA_SEQ8: case SDP_DATA_UINT8: case SDP_DATA_INT8: case SDP_DATA_BOOL: SDP_GET8(value.uint8, start); break; case SDP_DATA_SEQ16: case SDP_DATA_UINT16: case SDP_DATA_INT16: case SDP_DATA_UUID16: SDP_GET16(value.uint16, start); break; case SDP_DATA_SEQ32: case SDP_DATA_UINT32: case SDP_DATA_INT32: case SDP_DATA_UUID32: SDP_GET32(value.uint32, start); break; case SDP_DATA_UINT64: case SDP_DATA_INT64: SDP_GET64(value.uint64, start); break; case SDP_DATA_UINT128: case SDP_DATA_INT128: SDP_GET128(&value.int128, start); break; default: goto end; } } } start += len; break; case SDP_ATTR_PRIMARY_LANGUAGE_BASE_ID + SDP_ATTR_SERVICE_NAME_OFFSET: if (channel == -1) break; SDP_GET8(type, start); switch (type) { case SDP_DATA_STR8: case SDP_DATA_URL8: SDP_GET8(len, start); snprintf(name, sizeof(name), "%*.*s", len, len, (char *) start); start += len; break; case SDP_DATA_STR16: case SDP_DATA_URL16: SDP_GET16(len, start); snprintf(name, sizeof(name), "%*.*s", len, len, (char *) start); start += len; break; case SDP_DATA_STR32: case SDP_DATA_URL32: SDP_GET32(len, start); snprintf(name, sizeof(name), "%*.*s", len, len, (char *) start); start += len; break; default: goto end; } if (name == NULL) break; if (only_gnapplet != 0) { if (strcmp(name, "gnapplet") == 0) goto end; else { channel = -1; break; } } if (strstr(name, "Nokia PC Suite") != NULL) { channel = -1; break; } if (strstr(name, "Bluetooth Serial Port") != NULL) { channel = -1; break; } if (strstr(name, "m-Router Connectivity") != NULL) { channel = -1; break; } goto end; } } end: sdp_close(ss); return channel; } #else /* * Taken from gnome-phone-manager */ static int get_rfcomm_channel(sdp_record_t *rec, int only_gnapplet) { int channel = -1; sdp_list_t *protos = NULL; sdp_data_t *data; char name[64]; if (sdp_get_access_protos(rec, &protos) != 0) goto end; data = sdp_data_get(rec, SDP_ATTR_SVCNAME_PRIMARY); if (data) snprintf(name, sizeof(name), "%.*s", data->unitSize, data->val.str); if (name == NULL) goto end; /* * If we're only supposed to check for gnapplet, do it here * We ignore it if we're not supposed to check for it. */ if (only_gnapplet != 0) { if (strcmp(name, "gnapplet") == 0) channel = sdp_get_proto_port(protos, RFCOMM_UUID); goto end; } /* * We can't seem to connect to the PC Suite channel. */ if (strstr(name, "Nokia PC Suite") != NULL) goto end; /* * And that type of channel on Nokia Symbian phones doesn't * work either. */ if (strstr(name, "Bluetooth Serial Port") != NULL) goto end; /* * Avoid the m-Router channel, same as the PC Suite on Sony Ericsson * phones. */ if (strstr(name, "m-Router Connectivity") != NULL) goto end; channel = sdp_get_proto_port(protos, RFCOMM_UUID); end: sdp_list_foreach(protos, (sdp_list_func_t)sdp_list_free, 0); sdp_list_free(protos, 0); return channel; } /* * Determine whether the given device supports Serial or Dial-Up Networking, * and if so what the RFCOMM channel number for the service is. */ static int find_service_channel(bdaddr_t *adapter, bdaddr_t *device, int only_gnapplet, uint16_t svclass_id) { sdp_session_t *sdp = NULL; sdp_list_t *search = NULL, *attrs = NULL, *recs = NULL, *tmp; uuid_t browse_uuid, service_id; uint32_t range = 0x0000ffff; int channel = -1; sdp = sdp_connect(adapter, device, SDP_RETRY_IF_BUSY); if (!sdp) goto end; sdp_uuid16_create(&browse_uuid, PUBLIC_BROWSE_GROUP); sdp_uuid16_create(&service_id, svclass_id); search = sdp_list_append(NULL, &browse_uuid); search = sdp_list_append(search, &service_id); attrs = sdp_list_append(NULL, &range); if (sdp_service_search_attr_req(sdp, search, SDP_ATTR_REQ_RANGE, attrs, &recs)) goto end; for (tmp = recs; tmp != NULL; tmp = tmp->next) { sdp_record_t *rec = tmp->data; /* * If this service is better than what we've * previously seen, try and get the channel number. */ channel = get_rfcomm_channel(rec, only_gnapplet); if (channel > 0) goto end; } end: sdp_list_free(recs, (sdp_free_func_t)sdp_record_free); sdp_list_free(search, NULL); sdp_list_free(attrs, NULL); sdp_close(sdp); return channel; } #endif static uint8_t get_serial_channel(bdaddr_t *device, int only_gnapplet) { bdaddr_t src; int channel; uint8_t retval; bacpy(&src, BDADDR_ANY); channel = find_service_channel(&src, device, only_gnapplet, GNOKII_SERIAL_PORT_CLASS); if (channel < 0) channel = find_service_channel(&src, device, only_gnapplet, GNOKII_DIALUP_NETWORK_CLASS); if (channel < 0) retval = 0; else retval = channel; return retval; } /* From: http://www.kegel.com/dkftpbench/nonblocking.html */ static int setNonblocking(int fd) { int retcode, flags; #if defined(O_NONBLOCK) if ((flags = fcntl(fd, F_GETFL, 0)) == -1) flags = 0; retcode = fcntl(fd, F_SETFL, flags | O_NONBLOCK); #else flags = 1; retcode = ioctl(fd, FIOASYNC, &flags); #endif return retcode; } int bluetooth_open(const char *addr, uint8_t channel, struct gn_statemachine *state) { bdaddr_t bdaddr; struct sockaddr_rc raddr; int fd; if (str2ba((char *)addr, &bdaddr)) { fprintf(stderr, _("Invalid bluetooth address \"%s\"\n"), addr); return -1; } if ((fd = socket(PF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM)) < 0) { perror(_("Can't create socket")); return -1; } memset(&raddr, 0, sizeof(raddr)); raddr.rc_family = AF_BLUETOOTH; bacpy(&raddr.rc_bdaddr, &bdaddr); dprintf("Channel: %d\n", channel); if (channel < 1) { if (!strcmp(state->config.model, "gnapplet") || !strcmp(state->config.model, "symbian")) channel = get_serial_channel(&bdaddr, 1); else channel = get_serial_channel(&bdaddr, 0); } dprintf("Channel: %d\n", channel); /* If none channel found, fail. */ if (channel < 1) { fprintf(stderr, _("Cannot find any appropriate rfcomm channel and none was specified in the config.\n")); close(fd); return -1; } dprintf("Using channel: %d\n", channel); raddr.rc_channel = channel; if (connect(fd, (struct sockaddr *)&raddr, sizeof(raddr)) < 0) { perror(_("Can't connect")); close(fd); return -1; } /* Ignore errors. If the socket was not set in the async way, * we can live with that. */ setNonblocking(fd); return fd; } int bluetooth_close(int fd, struct gn_statemachine *state) { sleep(2); return close(fd); } int bluetooth_write(int fd, const __ptr_t bytes, int size, struct gn_statemachine *state) { return write(fd, bytes, size); } int bluetooth_read(int fd, __ptr_t bytes, int size, struct gn_statemachine *state) { return read(fd, bytes, size); } int bluetooth_select(int fd, struct timeval *timeout, struct gn_statemachine *state) { fd_set readfds; FD_ZERO(&readfds); FD_SET(fd, &readfds); return select(fd + 1, &readfds, NULL, NULL, timeout); } #endif /* HAVE_BLUETOOTH_BLUEZ || HAVE_BLUETOOTH_NETGRAPH || HAVE_BLUETOOTH_NETBT */ gnokii-0.6.31/common/devices/winserial.c0000644000175000017500000002055211666163120016262 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 2002 Ladis Michl Copyright (C) 2002-2004 BORBELY Zoltan, Pawel Kot */ #include "config.h" #include #include #include #include #include #include "misc.h" #include "gnokii.h" #include "devices/serial.h" #define USECOMM /* yes, we need the COMM API */ HANDLE hPhone; OVERLAPPED osWrite, osRead; /* Open the serial port and store the settings. */ int serial_open(const char *file, int oflags) { COMMTIMEOUTS CommTimeOuts; if ((hPhone = CreateFile(file, GENERIC_READ | GENERIC_WRITE, 0, /* exclusive access */ NULL, /* no security attrs */ OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED, /* overlapped I/O */ NULL)) == (HANDLE) -1) return FALSE; else { /* get any early notifications */ SetCommMask(hPhone, EV_RXCHAR); /* setup device buffers */ SetupComm(hPhone, 4096, 4096); /* purge any information in the buffer */ PurgeComm(hPhone, PURGE_TXABORT | PURGE_RXABORT | PURGE_TXCLEAR | PURGE_RXCLEAR); /* set up for overlapped I/O */ CommTimeOuts.ReadIntervalTimeout = 0xFFFFFFFF; CommTimeOuts.ReadTotalTimeoutMultiplier = 0; CommTimeOuts.ReadTotalTimeoutConstant = 1000; #if 0 /* CBR_9600 is approximately 1byte/ms. For our purposes, allow * double the expected time per character for a fudge factor. */ CommTimeOuts.WriteTotalTimeoutMultiplier = 2 * CBR_9600 / CBR_115200; #else CommTimeOuts.WriteTotalTimeoutMultiplier = 10; #endif CommTimeOuts.WriteTotalTimeoutConstant = 0; SetCommTimeouts(hPhone, &CommTimeOuts); } return true; } /* Close the serial port and restore old settings. */ int serial_close(int fd, struct gn_statemachine *state) { /* disable event notification and wait for thread * to halt */ SetCommMask(hPhone, 0); /* drop DTR */ EscapeCommFunction(hPhone, CLRDTR); /* purge any outstanding reads/writes and close device handle */ PurgeComm(hPhone, PURGE_TXABORT | PURGE_RXABORT | PURGE_TXCLEAR | PURGE_RXCLEAR); CloseHandle(hPhone); return true; } /* Open a device with standard options. * Use value (-1) for "with_hw_handshake" if its specification is required from the user. */ int serial_opendevice(const char *file, int with_odd_parity, int with_async, int with_hw_handshake, struct gn_statemachine *state) { DCB dcb; if (!serial_open(file, 0)) return -1; /* set handshake */ dcb.DCBlength = sizeof(DCB); GetCommState(hPhone, &dcb); dcb.fOutxDsrFlow = 0; if (state->config.hardware_handshake) { dcb.fOutxCtsFlow = TRUE; dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; } else { dcb.fOutxCtsFlow = FALSE; dcb.fRtsControl = RTS_CONTROL_ENABLE; } if (!SetCommState(hPhone, &dcb)) { fprintf(stderr, _("Gnokii serial_opendevice: cannot set handshake\n")); serial_close(0, state); return -1; } if (serial_changespeed(0, state->config.serial_baudrate, state) != GN_ERR_NONE) serial_changespeed(0, 19200 /* default value */, state); return 0; } /* Set the DTR and RTS bit of the serial device. */ void serial_setdtrrts(int fd, int dtr, int rts, struct gn_statemachine *state) { BOOL fRetVal; DCB dcb; dcb.DCBlength = sizeof(DCB); GetCommState(hPhone, &dcb); dcb.fOutxDsrFlow = 0; if (dtr) dcb.fDtrControl = DTR_CONTROL_ENABLE; else dcb.fDtrControl = DTR_CONTROL_DISABLE; dcb.fOutxCtsFlow = 0; if (rts) dcb.fRtsControl = RTS_CONTROL_ENABLE; else dcb.fRtsControl = RTS_CONTROL_DISABLE; /* no software flow control */ dcb.fInX = dcb.fOutX = 0; fRetVal = SetCommState(hPhone, &dcb); } int serial_select(int fd, struct timeval *timeout, struct gn_statemachine *state) { usleep(timeout->tv_sec * 60 + timeout->tv_usec); return 1; } /* Change the speed of the serial device. * RETURNS: Success */ gn_error serial_changespeed(int fd, int speed, struct gn_statemachine *state) { BOOL fRetVal; DCB dcb; dcb.DCBlength = sizeof(DCB); GetCommState(hPhone, &dcb); dcb.BaudRate = speed; dcb.ByteSize = 8; dcb.Parity = NOPARITY; dcb.StopBits = ONESTOPBIT; fRetVal = SetCommState(hPhone, &dcb); if (fRetVal == 0) fRetVal = GetLastError(); return GN_ERR_NONE; } /* Read from serial device. */ size_t serial_read(int fd, __ptr_t buf, size_t nbytes, struct gn_statemachine *state) { BOOL fReadStat; COMSTAT ComStat; DWORD dwErrorFlags; DWORD dwLength=0; DWORD dwError; /* only try to read number of bytes in queue */ ClearCommError(hPhone, &dwErrorFlags, &ComStat); dwLength = min((DWORD) nbytes, ComStat.cbInQue); if (dwLength > 0) { fReadStat = ReadFile(hPhone, buf, dwLength, &dwLength, &osRead); if (!fReadStat) { if (GetLastError() == ERROR_IO_PENDING) { fprintf(stderr, _("\n\rIO Pending")); /* We have to wait for read to complete. * This function will timeout according to the * CommTimeOuts.ReadTotalTimeoutConstant variable * Every time it times out, check for port errors */ while (!GetOverlappedResult(hPhone, &osRead, &dwLength, TRUE)) { dwError = GetLastError(); if (dwError == ERROR_IO_INCOMPLETE) { /* normal result if not finished */ continue; } else { /* an error occurred, try to recover */ ClearCommError(hPhone, &dwErrorFlags, &ComStat); break; } } } else { /* some other error occurred */ dwLength = 0; ClearCommError(hPhone, &dwErrorFlags, &ComStat); } } } return dwLength; } /* Write to serial device. */ size_t serial_write(int fd, __ptr_t buf, size_t n, struct gn_statemachine *state) { BOOL fWriteStat; DWORD dwBytesWritten; DWORD dwErrorFlags; DWORD dwError; DWORD dwBytesSent = 0; COMSTAT ComStat; fWriteStat = WriteFile(hPhone, buf, n, &dwBytesWritten, &osWrite); /* Note that normally the code will not execute the following * because the driver caches write operations. Small I/O requests * (up to several thousand bytes) will normally be accepted * immediately and WriteFile will return true even though an * overlapped operation was specified */ if (!fWriteStat) { if (GetLastError() == ERROR_IO_PENDING) { /* We should wait for the completion of the write operation * so we know if it worked or not * * This is only one way to do this. It might be beneficial to * place the write operation in a separate thread * so that blocking on completion will not negatively * affect the responsiveness of the UI * * If the write takes too long to complete, this * function will timeout according to the * CommTimeOuts.WriteTotalTimeoutMultiplier variable. * This code logs the timeout but does not retry * the write. */ while (!GetOverlappedResult(hPhone, &osWrite, &dwBytesWritten, TRUE)) { dwError = GetLastError(); if (dwError == ERROR_IO_INCOMPLETE) { /* normal result if not finished */ dwBytesSent += dwBytesWritten; continue; } else { /* an error occurred, try to recover */ ClearCommError(hPhone, &dwErrorFlags, &ComStat); break; } } dwBytesSent += dwBytesWritten; #if 0 if (dwBytesSent != dwBytesToWrite) fprintf(stderr, _("\nProbable Write Timeout: Total of %ld bytes sent (%ld)"), dwBytesSent, dwBytesToWrite); else fprintf(stderr, _("\n%ld bytes written"), dwBytesSent); #endif } else { /* some other error occurred */ ClearCommError(hPhone, &dwErrorFlags, &ComStat); return 0; } } return n; } gn_error serial_nreceived(int fd, int *n, struct gn_statemachine *state) { return GN_ERR_NONE; } gn_error serial_flush(int fd, struct gn_statemachine *state) { return GN_ERR_NONE; } gnokii-0.6.31/common/devices/irda.c0000644000175000017500000000306411666163120015203 0ustar leoleo/* * * $Id$ * * G N O K I I * * A Linux/Unix toolset and driver for the mobile phones. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library 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. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright (C) 1999-2000 Hugh Blemings & Pavel Janík ml. * Copyright (C) 2000-2001 Marcel Holtmann * Copyright (C) 2004 Phil Ashby * * Fake definitions for irda handling functions. */ #include "config.h" #include "compat.h" #include "misc.h" #include "gnokii.h" #ifndef HAVE_IRDA int irda_open(struct gn_statemachine *state) { return -1; } int irda_close(int fd, struct gn_statemachine *state) { return -1; } int irda_write(int fd, const __ptr_t bytes, int size, struct gn_statemachine *state) { return -1; } int irda_read(int fd, __ptr_t bytes, int size, struct gn_statemachine *state) { return -1; } int irda_select(int fd, struct timeval *timeout, struct gn_statemachine *state) { return -1; } #endif /* HAVE_IRDA */ gnokii-0.6.31/common/devices/winbluetooth.c0000644000175000017500000000646011666163120017012 0ustar leoleo/* * * $Id$ * * G N O K I I * * A Linux/Unix toolset and driver for the mobile phones. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library 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. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright (C) 2006 Pawel Kot * */ #include "config.h" #ifdef HAVE_BLUETOOTH #include #include #include #include #include "compat.h" #include "gnokii.h" #include "misc.h" /* QTTY by Davide Libenzi ( Terminal interface to Symbian QConsole ) * Copyright (C) 2004 Davide Libenzi * Davide Libenzi */ static int str2ba(const char *straddr, BTH_ADDR *btaddr) { int i; unsigned int aaddr[6]; BTH_ADDR tmpaddr = 0; if (sscanf(straddr, "%02x:%02x:%02x:%02x:%02x:%02x", &aaddr[0], &aaddr[1], &aaddr[2], &aaddr[3], &aaddr[4], &aaddr[5]) != 6) return 1; *btaddr = 0; for (i = 0; i < 6; i++) { tmpaddr = (BTH_ADDR) (aaddr[i] & 0xff); *btaddr = ((*btaddr) << 8) + tmpaddr; } return 0; } int bluetooth_open(const char *addr, uint8_t channel, struct gn_statemachine *state) { WSADATA wsd; SOCKET fd = INVALID_SOCKET; SOCKADDR_BTH sa; /* Initialize */ if (WSAStartup(MAKEWORD(2,0), &wsd)) { dprintf("WSAStartup() failed.\n"); fprintf(stderr, _("Failed to initialize socket subsystem: need WINSOCK2. Please upgrade.\n")); return -1; } /* Create a bluetooth socket */ if ((fd = socket(AF_BTH, SOCK_STREAM, BTHPROTO_RFCOMM)) == INVALID_SOCKET) { perror("socket"); dprintf("Failed to create a bluetooth socket\n"); WSACleanup(); return -1; } /* Prepare socket structure for the bluetooth socket */ memset(&sa, 0, sizeof(sa)); sa.addressFamily = AF_BTH; if (str2ba(addr, &sa.btAddr)) { dprintf("Incorrect bluetooth address given in the config file\n"); closesocket(fd); WSACleanup(); return -1; } sa.port = channel & 0xff; /* Connect to the bluetooth socket */ if (connect(fd, (SOCKADDR *)&sa, sizeof(sa))) { perror("socket"); dprintf("Failed to connect to bluetooth socket\n"); closesocket(fd); WSACleanup(); return -1; } return (int)fd; } int bluetooth_close(int fd, struct gn_statemachine *state) { shutdown(fd, 0); closesocket((SOCKET)fd); WSACleanup(); return 0; } int bluetooth_write(int fd, const __ptr_t bytes, int size, struct gn_statemachine *state) { return send((SOCKET)fd, bytes, size, 0); } int bluetooth_read(int fd, __ptr_t bytes, int size, struct gn_statemachine *state) { return recv((SOCKET)fd, bytes, size, 0); } int bluetooth_select(int fd, struct timeval *timeout, struct gn_statemachine *state) { fd_set readfds; FD_ZERO(&readfds); FD_SET((SOCKET)fd, &readfds); return select(0 /* ignored on Win32 */, &readfds, NULL, NULL, timeout); } #endif /* HAVE_BLUETOOTH */ gnokii-0.6.31/common/devices/socketphonet.c0000644000175000017500000001021611666163120016767 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2010 Daniele Forsi This file provides an API for accessing functions via the phonet Linux kernel module. See README for more details on supported mobile phones. The various routines are called socketphonet_(whatever). */ #include "config.h" #include "compat.h" /* for __ptr_t definition */ #include "gnokii.h" #ifndef HAVE_SOCKETPHONET int socketphonet_close(struct gn_statemachine *state) { return -1; } int socketphonet_open(const char *iface, int with_async, struct gn_statemachine *state) { return -1; } size_t socketphonet_read(int fd, __ptr_t buf, size_t nbytes, struct gn_statemachine *state) { return -1; } size_t socketphonet_write(int fd, const __ptr_t buf, size_t n, struct gn_statemachine *state) { return -1; } int socketphonet_select(int fd, struct timeval *timeout, struct gn_statemachine *state) { return -1; } #else /* System header files */ #include #include /* Various header files */ #include "compat.h" #include "links/fbus-common.h" #include "links/fbus-phonet.h" #include "device.h" #include "devices/serial.h" #include "gnokii-internal.h" static struct sockaddr_pn addr = { .spn_family = AF_PHONET, .spn_dev = FBUS_DEVICE_PHONE }; int socketphonet_close(struct gn_statemachine *state) { return close(state->device.fd); } int socketphonet_open(const char *interface, int with_async, struct gn_statemachine *state) { int fd, retcode; fd = socket(PF_PHONET, SOCK_DGRAM, 0); if (fd == -1) { perror("socket"); return -1; } if (bind(fd, (struct sockaddr *)&addr, sizeof(addr))) { perror("bind"); close(fd); return -1; } if (setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, interface, strlen(interface))) { perror("setsockopt"); close(fd); return -1; } /* Make filedescriptor asynchronous. */ /* We need to supply FNONBLOCK (or O_NONBLOCK) again as it would get reset * by F_SETFL as a side-effect! */ #ifdef FNONBLOCK retcode = fcntl(fd, F_SETFL, (with_async ? FASYNC : 0) | FNONBLOCK); #else # ifdef FASYNC retcode = fcntl(fd, F_SETFL, (with_async ? FASYNC : 0) | O_NONBLOCK); # else retcode = fcntl(fd, F_SETFL, O_NONBLOCK); if (retcode != -1) retcode = ioctl(fd, FIOASYNC, &with_async); # endif #endif if (retcode == -1) { perror("fcntl"); close(fd); return -1; } return fd; } size_t socketphonet_read(int fd, __ptr_t buf, size_t nbytes, struct gn_statemachine *state) { int received; unsigned char *frame = buf; received = recvfrom(fd, buf + 8, nbytes - 8, 0, NULL, NULL); if (received == -1) { perror("recvfrom"); return -1; } /* Hack!!! Rebuild header as expected by phonet_rx_statemachine() */ /* FIXME: why we need to add another 2 bytes? */ received += 2; frame[0] = FBUS_PHONET_DKU2_FRAME_ID; frame[1] = FBUS_PHONET_BLUETOOTH_DEVICE_PC; frame[2] = FBUS_DEVICE_PHONE; frame[3] = addr.spn_resource; frame[4] = received >> 8; frame[5] = received & 0xff; return received + 8; } size_t socketphonet_write(int fd, const __ptr_t buf, size_t n, struct gn_statemachine *state) { int sent; const unsigned char *frame = buf; addr.spn_resource = frame[3]; sent = sendto(fd, buf + 8, n - 8, 0, (struct sockaddr *)&addr, sizeof(addr)); if (sent == -1) { perror("sendto"); return -1; } return sent + 8; } int socketphonet_select(int fd, struct timeval *timeout, struct gn_statemachine *state) { return serial_select(fd, timeout, state); } #endif /* HAVE_SOCKETPHONET */ gnokii-0.6.31/common/devices/tekram.c0000644000175000017500000000606011666163120015546 0ustar leoleo/* * * $Id$ * * G N O K I I * * A Linux/Unix toolset and driver for the mobile phones. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library 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. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright (C) 1999-2000 Hugh Blemings & Pavel Janik ml. * Copyright (C) 2000-2001 Marcel Holtmann * Copyright (C) 2001 Chris Kemp * Copyright (C) 2002 Ladis Michl * Copyright (C) 2002-2003 BORBELY Zoltan, Pawel Kot * */ #include "config.h" #include "misc.h" #include "gnokii.h" #include "devices/serial.h" #include "devices/tekram.h" #include #ifdef HAVE_FCNTL_H # include #endif #ifdef HAVE_SYS_IOCTL_H # include #endif #ifdef HAVE_TERMIOS_H # include #endif #include int tekram_open(const char *file, struct gn_statemachine *state) { #if defined(O_NOCTTY) && defined(O_NONBLOCK) && defined (O_RDWR) return serial_open(file, O_RDWR | O_NOCTTY | O_NONBLOCK); #elif defined (O_RDWR) return serial_open(file, O_RDWR); #else return serial_open(file, 0); #endif } void tekram_close(int fd, struct gn_statemachine *state) { serial_setdtrrts(fd, 0, 0, state); serial_close(fd, state); } void tekram_reset(int fd, struct gn_statemachine *state) { serial_setdtrrts(fd, 0, 0, state); usleep(50000); serial_setdtrrts(fd, 1, 0, state); usleep(1000); serial_setdtrrts(fd, 1, 1, state); usleep(50); serial_changespeed(fd, 9600, state); } void tekram_changespeed(int fd, int speed, struct gn_statemachine *state) { unsigned char speedbyte; switch (speed) { default: case 9600: speedbyte = TEKRAM_PW | TEKRAM_B9600; break; case 19200: speedbyte = TEKRAM_PW | TEKRAM_B19200; break; case 38400: speedbyte = TEKRAM_PW | TEKRAM_B38400; break; case 57600: speedbyte = TEKRAM_PW | TEKRAM_B57600; break; case 115200: speedbyte = TEKRAM_PW | TEKRAM_B115200; break; } tekram_reset(fd, state); serial_setdtrrts(fd, 1, 0, state); usleep(7); serial_write(fd, &speedbyte, 1, state); usleep(100000); serial_setdtrrts(fd, 1, 1, state); serial_changespeed(fd, speed, state); } size_t tekram_read(int fd, __ptr_t buf, size_t nbytes, struct gn_statemachine *state) { return serial_read(fd, buf, nbytes, state); } size_t tekram_write(int fd, const __ptr_t buf, size_t n, struct gn_statemachine *state) { return serial_write(fd, buf, n, state); } int tekram_select(int fd, struct timeval *timeout, struct gn_statemachine *state) { return serial_select(fd, timeout, state); } gnokii-0.6.31/common/devices/unixserial.c0000644000175000017500000002717711666163120016462 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 2001 Chris Kemp, Manfred Jonsson, Jank Kratochvil Copyright (C) 2002 Ladis Michl, Pavel Machek Copyright (C) 2001-2004 Pawel Kot Copyright (C) 2002-2004 BORBELY Zoltan */ #include "config.h" #include "misc.h" #include "gnokii.h" #include "gnokii-internal.h" #include "devices/serial.h" #include #include #include #include #include #include #include #include #include #include #ifdef HAVE_SYS_IOCTL_COMPAT_H # include #endif #ifdef HAVE_SYS_SELECT_H # include #endif #ifdef HAVE_SYS_MODEM_H # include #endif #ifdef HAVE_SYS_FILIO_H # include #endif /* If the target operating system does not have cfsetspeed, we can emulate it. */ #ifndef HAVE_CFSETSPEED # if defined(HAVE_CFSETISPEED) && defined(HAVE_CFSETOSPEED) # define cfsetspeed(t, speed) \ (cfsetispeed(t, speed) || cfsetospeed(t, speed)) # else static int cfsetspeed(struct termios *t, int speed) { # ifdef HAVE_TERMIOS_CSPEED t->c_ispeed = speed; t->c_ospeed = speed; # else t->c_cflag |= speed; # endif /* HAVE_TERMIOS_CSPEED */ return 0; } # endif /* HAVE_CFSETISPEED && HAVE_CFSETOSPEED */ #endif /* HAVE_CFSETSPEED */ #ifndef O_NONBLOCK # define O_NONBLOCK 0 #endif /* Structure to backup the setting of the terminal. */ struct termios serial_termios; /* Script handling: */ static void device_script_cfgfunc(const char *section, const char *key, const char *value) { setenv(key, value, 1); /* errors ignored */ } int device_script(int fd, const char *section, struct gn_statemachine *state) { pid_t pid; const char *scriptname; int status; if (!strcmp(section, "connect_script")) scriptname = state->config.connect_script; else scriptname = state->config.disconnect_script; if (scriptname[0] == '\0') return 0; errno = 0; switch ((pid = fork())) { case -1: fprintf(stderr, _("device_script(\"%s\"): fork() failure: %s!\n"), scriptname, strerror(errno)); return -1; case 0: /* child */ cfg_foreach(section, device_script_cfgfunc); errno = 0; if (dup2(fd, 0) != 0 || dup2(fd, 1) != 1 || close(fd)) { fprintf(stderr, _("device_script(\"%s\"): file descriptor preparation failure: %s\n"), scriptname, strerror(errno)); _exit(-1); } /* FIXME: close all open descriptors - how to track them? */ execl("/bin/sh", "sh", "-c", scriptname, NULL); fprintf(stderr, _("device_script(\"%s\"): script execution failure: %s\n"), scriptname, strerror(errno)); _exit(-1); /* NOTREACHED */ default: if (pid == waitpid(pid, &status, 0 /* options */) && WIFEXITED(status) && !WEXITSTATUS(status)) return 0; fprintf(stderr, _("device_script(\"%s\"): child script execution failure: %s, exit code=%d\n"), scriptname, (WIFEXITED(status) ? _("normal exit") : _("abnormal exit")), (WIFEXITED(status) ? WEXITSTATUS(status) : -1)); errno = EIO; return -1; } /* NOTREACHED */ } int serial_close(int fd, struct gn_statemachine *state); /* Open the serial port and store the settings. * Returns a file descriptor on success, or -1 if an error occurred. */ int serial_open(const char *file, int oflag) { int fd; int retcode; fd = open(file, oflag); if (fd == -1) { perror("Gnokii serial_open: open"); return -1; } retcode = tcgetattr(fd, &serial_termios); if (retcode == -1) { perror("Gnokii serial_open: tcgetattr"); /* Don't call serial_close since serial_termios is not valid */ close(fd); return -1; } return fd; } /* Close the serial port and restore old settings. * Returns zero on success, -1 if an error occurred or fd was invalid. */ int serial_close(int fd, struct gn_statemachine *state) { /* handle config file disconnect_script: */ if (device_script(fd, "disconnect_script", state) == -1) dprintf("Gnokii serial_close: disconnect_script\n"); if (fd >= 0) { serial_termios.c_cflag |= HUPCL; /* production == 1 */ tcsetattr(fd, TCSANOW, &serial_termios); return close(fd); } return -1; } /* Open a device with standard options. * Use value (-1) for "with_hw_handshake" if its specification is required from the user. */ int serial_opendevice(const char *file, int with_odd_parity, int with_async, int with_hw_handshake, struct gn_statemachine *state) { int fd; int retcode; struct termios tp; /* Open device */ /* O_NONBLOCK MUST be used here as the CLOCAL may be currently off * and if DCD is down the "open" syscall would be stuck waiting for DCD. */ fd = serial_open(file, O_RDWR | O_NOCTTY | O_NONBLOCK); if (fd < 0) return fd; /* Initialise the port settings */ memcpy(&tp, &serial_termios, sizeof(struct termios)); /* Set port settings for canonical input processing */ tp.c_cflag = B0 | CS8 | CLOCAL | CREAD | HUPCL; if (with_odd_parity) { tp.c_cflag |= (PARENB | PARODD); tp.c_iflag = 0; } else tp.c_iflag = IGNPAR; #ifdef CRTSCTS if (state->config.hardware_handshake) tp.c_cflag |= CRTSCTS; else tp.c_cflag &= ~CRTSCTS; #endif tp.c_oflag = 0; tp.c_lflag = 0; tp.c_cc[VMIN] = 1; tp.c_cc[VTIME] = 0; retcode = tcflush(fd, TCIFLUSH); if (retcode == -1) { perror("Gnokii serial_opendevice: tcflush"); serial_close(fd, state); return -1; } retcode = tcsetattr(fd, TCSANOW, &tp); if (retcode == -1) { perror("Gnokii serial_opendevice: tcsetattr"); serial_close(fd, state); return -1; } if (serial_changespeed(fd, state->config.serial_baudrate, state) != GN_ERR_NONE) serial_changespeed(fd, 19200 /* default value */, state); /* We need to turn off O_NONBLOCK now (we have CLOCAL set so it is safe). * When we run some device script it really doesn't expect NONBLOCK! */ retcode = fcntl(fd, F_SETFL, 0); if (retcode == -1) { perror("Gnokii serial_opendevice: fcntl(F_SETFL)"); serial_close(fd, state); return -1; } /* handle config file connect_script: */ if (device_script(fd, "connect_script", state) == -1) { dprintf("Gnokii serial_opendevice: connect_script\n"); serial_close(fd, state); return -1; } /* Allow process/thread to receive SIGIO */ #if !(__unices__) retcode = fcntl(fd, F_SETOWN, getpid()); if (retcode == -1) { perror("Gnokii serial_opendevice: fcntl(F_SETOWN)"); serial_close(fd, state); return -1; } #endif /* Make filedescriptor asynchronous. */ if (with_async) { /* We need to supply FNONBLOCK (or O_NONBLOCK) again as it would get reset * by F_SETFL as a side-effect! */ #ifdef FNONBLOCK retcode = fcntl(fd, F_SETFL, (with_async ? FASYNC : 0) | FNONBLOCK); #else # ifdef FASYNC retcode = fcntl(fd, F_SETFL, (with_async ? FASYNC : 0) | O_NONBLOCK); # else retcode = fcntl(fd, F_SETFL, O_NONBLOCK); if (retcode != -1) retcode = ioctl(fd, FIOASYNC, &with_async); # endif #endif if (retcode == -1) { perror("Gnokii serial_opendevice: fcntl(F_SETFL)"); serial_close(fd, state); return -1; } } return fd; } /* Set the DTR and RTS bit of the serial device. */ void serial_setdtrrts(int fd, int dtr, int rts, struct gn_statemachine *state) { unsigned int flags; if (!state->config.set_dtr_rts) return; flags = TIOCM_DTR; if (dtr) ioctl(fd, TIOCMBIS, &flags); else ioctl(fd, TIOCMBIC, &flags); flags = TIOCM_RTS; if (rts) ioctl(fd, TIOCMBIS, &flags); else ioctl(fd, TIOCMBIC, &flags); } int serial_select(int fd, struct timeval *timeout, struct gn_statemachine *state) { fd_set readfds; FD_ZERO(&readfds); FD_SET(fd, &readfds); return select(fd + 1, &readfds, NULL, NULL, timeout); } static int serial_wselect(int fd, struct timeval *timeout, struct gn_statemachine *state) { fd_set writefds; FD_ZERO(&writefds); FD_SET(fd, &writefds); return select(fd + 1, NULL, &writefds, NULL, timeout); } /* Change the speed of the serial device. * RETURNS: Success */ gn_error serial_changespeed(int fd, int speed, struct gn_statemachine *state) { gn_error retcode = GN_ERR_NONE; #ifndef SGTTY struct termios t; #else struct sgttyb t; #endif int new_speed = B9600; switch (speed) { case 0: dprintf("Not setting port speed\n"); return GN_ERR_NOTSUPPORTED; case 2400: new_speed = B2400; break; case 4600: new_speed = B4800; break; case 9600: new_speed = B9600; break; case 19200: new_speed = B19200; break; case 38400: new_speed = B38400; break; case 57600: new_speed = B57600; break; case 115200: new_speed = B115200; break; default: fprintf(stderr, _("Serial port speed %d not supported!\n"), speed); return GN_ERR_NOTSUPPORTED; } #ifndef SGTTY if (tcgetattr(fd, &t)) retcode = GN_ERR_INTERNALERROR; if (cfsetspeed(&t, new_speed) == -1) { dprintf("Serial port speed setting failed\n"); retcode = GN_ERR_INTERNALERROR; } tcsetattr(fd, TCSADRAIN, &t); #else if (ioctl(fd, TIOCGETP, &t)) retcode = GN_ERR_INTERNALERROR; t.sg_ispeed = new_speed; t.sg_ospeed = new_speed; if (ioctl(fd, TIOCSETN, &t)) retcode = GN_ERR_INTERNALERROR; #endif return retcode; } /* Read from serial device. */ size_t serial_read(int fd, __ptr_t buf, size_t nbytes, struct gn_statemachine *state) { return read(fd, buf, nbytes); } #if !defined(TIOCMGET) && defined(TIOCMODG) # define TIOCMGET TIOCMODG #endif static void check_dcd(int fd) { #ifdef TIOCMGET int mcs; if (ioctl(fd, TIOCMGET, &mcs) || !(mcs & TIOCM_CAR)) { fprintf(stderr, _("ERROR: Modem DCD is down and global/require_dcd parameter is set!\n")); exit(EXIT_FAILURE); /* Hard quit of all threads */ } #else /* Impossible!! (eg. Coherent) */ #endif } /* Write to serial device. */ size_t serial_write(int fd, const __ptr_t buf, size_t n, struct gn_statemachine *state) { size_t r = 0, bs; ssize_t got; #ifndef TIOCMGET if (state->config.require_dcd) dprintf("WARNING: global/require_dcd argument was set but it is not supported on this system!\n"); #endif if (state->config.require_dcd) check_dcd(fd); while (n > 0) { bs = (state->config.serial_write_usleep < 0) ? n : 1; got = write(fd, buf + r, bs); if (got == 0) { dprintf("Serial write: oops, zero byte has written!\n"); } else if (got < 0) { if (errno == EINTR) continue; if (errno != EAGAIN) { dprintf("Serial write: write error %d\n", errno); return -1; } dprintf("Serial write: transmitter busy, waiting\n"); serial_wselect(fd, NULL, state); dprintf("Serial write: transmitter ready\n"); continue; } n -= got; r += got; if (state->config.serial_write_usleep > 0) usleep(state->config.serial_write_usleep); } return r; } gn_error serial_nreceived(int fd, int *n, struct gn_statemachine *state) { if (ioctl(fd, FIONREAD, n)) { dprintf("serial_nreceived: cannot get the received data size\n"); return GN_ERR_INTERNALERROR; } return GN_ERR_NONE; } gn_error serial_flush(int fd, struct gn_statemachine *state) { if (tcdrain(fd)) { dprintf("serial_flush: cannot flush serial device\n"); return GN_ERR_INTERNALERROR; } return GN_ERR_NONE; } gnokii-0.6.31/common/devices/dku2libusb.c0000644000175000017500000003325211666163120016334 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 2002 Ladis Michl, Marcel Holtmann Copyright (C) 2003 BORBELY Zoltan Copyright (C) 2005 Alex Kanavin Copyright (C) 2003-2006 Pawel Kot */ #include "config.h" #include "compat.h" #include "misc.h" #include "gnokii.h" #include "devices/dku2libusb.h" #ifndef HAVE_LIBUSB int fbusdku2usb_open(struct gn_statemachine *state) { return -1; } int fbusdku2usb_close(struct gn_statemachine *state) { return -1; } int fbusdku2usb_write(const __ptr_t bytes, int size, struct gn_statemachine *state) { return -1; } int fbusdku2usb_read(__ptr_t bytes, int size, struct gn_statemachine *state) { return -1; } int fbusdku2usb_select(struct timeval *timeout, struct gn_statemachine *state) { return -1; } #else #include #include #include #include #include #define DEVINSTANCE(s) (*((fbus_usb_interface **)(&(s)->device.device_instance))) /* * Helper function to usbfbus_find_interfaces */ static void find_eps(struct fbus_usb_interface_transport *iface, struct usb_interface_descriptor data_iface, int *found_active, int *found_idle) { struct usb_endpoint_descriptor *ep0, *ep1; if (data_iface.bNumEndpoints == 2) { ep0 = data_iface.endpoint; ep1 = data_iface.endpoint + 1; if ((ep0->bEndpointAddress & USB_ENDPOINT_IN) && ((ep0->bmAttributes & USB_ENDPOINT_TYPE_MASK) == USB_ENDPOINT_TYPE_BULK) && !(ep1->bEndpointAddress & USB_ENDPOINT_IN) && ((ep1->bmAttributes & USB_ENDPOINT_TYPE_MASK) == USB_ENDPOINT_TYPE_BULK)) { *found_active = 1; iface->data_active_setting = data_iface.bAlternateSetting; iface->data_interface_active_description = data_iface.iInterface; iface->data_endpoint_read = ep0->bEndpointAddress; iface->data_endpoint_write = ep1->bEndpointAddress; } if (!(ep0->bEndpointAddress & USB_ENDPOINT_IN) && ((ep0->bmAttributes & USB_ENDPOINT_TYPE_MASK) == USB_ENDPOINT_TYPE_BULK) && (ep1->bEndpointAddress & USB_ENDPOINT_IN) && ((ep1->bmAttributes & USB_ENDPOINT_TYPE_MASK) == USB_ENDPOINT_TYPE_BULK)) { *found_active = 1; iface->data_active_setting = data_iface.bAlternateSetting; iface->data_interface_active_description = data_iface.iInterface; iface->data_endpoint_read = ep1->bEndpointAddress; iface->data_endpoint_write = ep0->bEndpointAddress; } } if (data_iface.bNumEndpoints == 0) { *found_idle = 1; iface->data_idle_setting = data_iface.bAlternateSetting; iface->data_interface_idle_description = data_iface.iInterface; } } /* * Helper function to usbfbus_find_interfaces */ static int find_fbus_data_interface(unsigned char *buffer, int buflen, struct usb_config_descriptor config, struct fbus_usb_interface_transport *iface) { struct cdc_union_desc *union_header = NULL; int i, a; int found_active = 0; int found_idle = 0; if (!buffer) { dprintf("Weird descriptor references\n"); return -EINVAL; } while (buflen > 0) { if (buffer [1] != USB_DT_CS_INTERFACE) { dprintf("skipping garbage\n"); goto next_desc; } switch (buffer [2]) { case CDC_UNION_TYPE: /* we've found it */ if (union_header) { dprintf("More than one union descriptor, skiping ...\n"); goto next_desc; } union_header = (struct cdc_union_desc *)buffer; break; case CDC_FBUS_TYPE: /* maybe check version */ case CDC_HEADER_TYPE: break; /* for now we ignore it */ default: dprintf("Ignoring extra header, type %d, length %d\n", buffer[2], buffer[0]); break; } next_desc: buflen -= buffer[0]; buffer += buffer[0]; } if (!union_header) { dprintf("No union descriptor, giving up\n"); return -ENODEV; } /* Found the slave interface, now find active/idle settings and endpoints */ iface->data_interface = union_header->bSlaveInterface0; /* Loop through all of the interfaces */ for (i = 0; i < config.bNumInterfaces; i++) { /* Loop through all of the alternate settings */ for (a = 0; a < config.interface[i].num_altsetting; a++) { /* Check if this interface is DKU2 FBUS data interface */ /* and find endpoints */ if (config.interface[i].altsetting[a].bInterfaceNumber == iface->data_interface) { find_eps(iface, config.interface[i].altsetting[a], &found_active, &found_idle); } } } if (!found_idle) { dprintf("No idle setting\n"); return -ENODEV; } if (!found_active) { dprintf("No active setting\n"); return -ENODEV; } dprintf("Found FBUS interface\n"); return 0; } /* * Helper function to usbfbus_find_interfaces */ static int get_iface_string(struct usb_dev_handle *usb_handle, char **string, int id) { if (id) { if ((*string = malloc(USB_MAX_STRING_SIZE)) == NULL) return -ENOMEM; *string[0] = '\0'; return usb_get_string_simple(usb_handle, id, *string, USB_MAX_STRING_SIZE); } return 0; } /* * Helper function to usbfbus_find_interfaces */ static struct fbus_usb_interface_transport *check_iface(struct usb_device *dev, int c, int i, int a, struct fbus_usb_interface_transport *current) { struct fbus_usb_interface_transport *next = NULL; if ((dev->config[c].interface[i].altsetting[a].bInterfaceClass == USB_CDC_CLASS) && (dev->config[c].interface[i].altsetting[a].bInterfaceSubClass == USB_CDC_FBUS_SUBCLASS)) { int err; unsigned char *buffer = dev->config[c].interface[i].altsetting[a].extra; int buflen = dev->config[c].interface[i].altsetting[a].extralen; next = malloc(sizeof(struct fbus_usb_interface_transport)); if (next == NULL) return current; next->device = dev; next->configuration = dev->config[c].bConfigurationValue; next->configuration_description = dev->config[c].iConfiguration; next->control_interface = dev->config[c].interface[i].altsetting[a].bInterfaceNumber; next->control_interface_description = dev->config[c].interface[i].altsetting[a].iInterface; next->control_setting = dev->config[c].interface[i].altsetting[a].bAlternateSetting; err = find_fbus_data_interface(buffer, buflen, dev->config[c], next); if (err) free(next); else { if (current) current->next = next; next->prev = current; next->next = NULL; current = next; } } return current; } /* * Function usbfbus_find_interfaces () * * Find available USB DKU2 FBUS interfaces on the system */ static int usbfbus_find_interfaces(struct gn_statemachine *state) { struct usb_bus *busses; struct usb_bus *bus; struct usb_device *dev; int c, i, a, retval = 0; struct fbus_usb_interface_transport *current = NULL; struct fbus_usb_interface_transport *tmp = NULL; struct usb_dev_handle *usb_handle; int n; /* For connection type dku2libusb port denotes number of DKU2 device */ n = atoi(state->config.port_device); /* Assume default is first interface */ if (n < 1) { n = 1; dprintf("port = %s is not valid for connection = dku2libusb using port = %d instead\n", state->config.port_device, n); } usb_init(); usb_find_busses(); usb_find_devices(); busses = usb_get_busses(); for (bus = busses; bus; bus = bus->next) { for (dev = bus->devices; dev; dev = dev->next) { if (dev->descriptor.idVendor == NOKIA_VENDOR_ID) { /* Loop through all of the configurations */ for (c = 0; c < dev->descriptor.bNumConfigurations; c++) { /* Loop through all of the interfaces */ for (i = 0; i < dev->config[c].bNumInterfaces; i++) { /* Loop through all of the alternate settings */ for (a = 0; a < dev->config[c].interface[i].num_altsetting; a++) { /* Check if this interface is DKU2 FBUS */ /* and find data interface */ current = check_iface(dev, c, i, a, current); } } } } } } /* rewind */ while (current && current->prev) current = current->prev; /* Take N-th device on the list */ while (--n && current) { tmp = current; current = current->next; /* free the previous element on the list -- won't be needed anymore */ free(tmp); } if (current) { int s = sizeof(fbus_usb_interface); state->device.device_instance = calloc(1, s); if (!DEVINSTANCE(state)) goto cleanup_list; DEVINSTANCE(state)->interface = current; usb_handle = usb_open(current->device); get_iface_string(usb_handle, &DEVINSTANCE(state)->manufacturer, current->device->descriptor.iManufacturer); get_iface_string(usb_handle, &DEVINSTANCE(state)->product, current->device->descriptor.iProduct); get_iface_string(usb_handle, &DEVINSTANCE(state)->serial, current->device->descriptor.iSerialNumber); get_iface_string(usb_handle, &DEVINSTANCE(state)->configuration, current->configuration_description); get_iface_string(usb_handle, &DEVINSTANCE(state)->control_interface, current->control_interface_description); get_iface_string(usb_handle, &DEVINSTANCE(state)->data_interface_idle, current->data_interface_idle_description); get_iface_string(usb_handle, &DEVINSTANCE(state)->data_interface_active, current->data_interface_active_description); usb_close(usb_handle); retval = 1; current = current->next; } cleanup_list: while (current) { tmp = current->next; free(current); current = tmp; } return retval; } /* * Function usbfbus_free_interfaces () * * Free the list of discovered USB DKU2 FBUS interfaces on the system */ static void usbfbus_free_interfaces(fbus_usb_interface *iface) { if (iface == NULL) return; free(iface->manufacturer); free(iface->product); free(iface->serial); free(iface->configuration); free(iface->control_interface); free(iface->data_interface_idle); free(iface->data_interface_active); free(iface->interface); free(iface); } /* * Function usbfbus_connect_request (self) * * Open the USB connection * */ static int usbfbus_connect_request(struct gn_statemachine *state) { int ret; DEVINSTANCE(state)->interface->dev_data = usb_open(DEVINSTANCE(state)->interface->device); ret = usb_set_configuration(DEVINSTANCE(state)->interface->dev_data, DEVINSTANCE(state)->interface->configuration); if (ret < 0) { dprintf("Can't set configuration: %d\n", ret); } ret = usb_claim_interface(DEVINSTANCE(state)->interface->dev_data, DEVINSTANCE(state)->interface->control_interface); if (ret < 0) { dprintf("Can't claim control interface: %d\n", ret); goto err1; } ret = usb_set_altinterface(DEVINSTANCE(state)->interface->dev_data, DEVINSTANCE(state)->interface->control_setting); if (ret < 0) { dprintf("Can't set control setting: %d\n", ret); goto err2; } ret = usb_claim_interface(DEVINSTANCE(state)->interface->dev_data, DEVINSTANCE(state)->interface->data_interface); if (ret < 0) { dprintf("Can't claim data interface: %d\n", ret); goto err2; } ret = usb_set_altinterface(DEVINSTANCE(state)->interface->dev_data, DEVINSTANCE(state)->interface->data_active_setting); if (ret < 0) { dprintf("Can't set data active setting: %d\n", ret); goto err3; } return 1; err3: usb_release_interface(DEVINSTANCE(state)->interface->dev_data, DEVINSTANCE(state)->interface->data_interface); err2: usb_release_interface(DEVINSTANCE(state)->interface->dev_data, DEVINSTANCE(state)->interface->control_interface); err1: usb_close(DEVINSTANCE(state)->interface->dev_data); return 0; } /* * Function usbfbus_link_disconnect_request (self) * * Shutdown the USB link * */ static int usbfbus_disconnect_request(struct gn_statemachine *state) { int ret; if (state->device.fd < 0) return 0; ret = usb_set_altinterface(DEVINSTANCE(state)->interface->dev_data, DEVINSTANCE(state)->interface->data_idle_setting); if (ret < 0) dprintf("Can't set data idle setting %d\n", ret); ret = usb_release_interface(DEVINSTANCE(state)->interface->dev_data, DEVINSTANCE(state)->interface->data_interface); if (ret < 0) dprintf("Can't release data interface %d\n", ret); ret = usb_release_interface(DEVINSTANCE(state)->interface->dev_data, DEVINSTANCE(state)->interface->control_interface); if (ret < 0) dprintf("Can't release control interface %d\n", ret); ret = usb_close(DEVINSTANCE(state)->interface->dev_data); if (ret < 0) dprintf("Can't close data interface %d\n", ret); return ret; } int fbusdku2usb_open(struct gn_statemachine *state) { int retval; retval = usbfbus_find_interfaces(state); if (retval) retval = usbfbus_connect_request(state); return (retval ? retval : -1); } int fbusdku2usb_close(struct gn_statemachine *state) { usbfbus_disconnect_request(state); usbfbus_free_interfaces(DEVINSTANCE(state)); state->device.device_instance = NULL; return 0; } int fbusdku2usb_write(const __ptr_t bytes, int size, struct gn_statemachine *state) { return usb_bulk_write(DEVINSTANCE(state)->interface->dev_data, DEVINSTANCE(state)->interface->data_endpoint_write, (char *) bytes, size, USB_FBUS_TIMEOUT); } int fbusdku2usb_read(__ptr_t bytes, int size, struct gn_statemachine *state) { return usb_bulk_read(DEVINSTANCE(state)->interface->dev_data, DEVINSTANCE(state)->interface->data_endpoint_read, (char *) bytes, size, USB_FBUS_TIMEOUT); } int fbusdku2usb_select(struct timeval *timeout, struct gn_statemachine *state) { return 1; } #endif gnokii-0.6.31/common/devices/osxbluetooth.c0000644000175000017500000001456311666163120017031 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janík ml. Copyright (C) 2003 Siegfried Schloissnig */ #include "config.h" #ifdef HAVE_BLUETOOTH_MACOSX #include "compat.h" #include "devices/osxbluetooth.h" #include "misc.h" #include "gnokii.h" #include "devices/unixbluetooth.h" /* ----- bluetooth io thread ----- */ static void thread_rfcommDataListener(IOBluetoothRFCOMMChannelRef rfcommChannel, void* data, UInt16 length, void* refCon) { threadContext *pContext = (threadContext *)refCon; void *pBuffer = malloc(length); dataBlock *pDataBlock = (dataBlock *)malloc(sizeof(dataBlock)); memcpy(pBuffer, data, length); pDataBlock->pData = pBuffer; pDataBlock->nSize = length; pthread_mutex_lock(&(pContext->mutexWait)); CFArrayAppendValue(pContext->arrDataReceived, pDataBlock); pthread_mutex_unlock(&(pContext->mutexWait)); } static void *thread_main(void *pArg) { threadContext* pContext = (threadContext *)pArg; IOBluetoothDeviceRef device = IOBluetoothDeviceCreateWithAddress(&(pContext->deviceAddress)); IOBluetoothRFCOMMChannelRef rfcommChannel; if (IOBluetoothDeviceOpenRFCOMMChannel(device, pContext->nChannel, &rfcommChannel) != kIOReturnSuccess) { rfcommChannel = 0; } else { /* register an incoming data listener */ if (IOBluetoothRFCOMMChannelRegisterIncomingDataListener(rfcommChannel, thread_rfcommDataListener, pArg) != kIOReturnSuccess) { rfcommChannel = 0; } } pContext->rfcommChannel = rfcommChannel; pthread_mutex_unlock(&(pContext->mutexWait)); /* start the runloop */ CFRunLoopRun(); } /* ---- bluetooth io thread ---- */ int bluetooth_open(const char* addr, uint8_t channel, struct gn_statemachine* state) { /* create the thread context and start the thread */ CFStringRef strDevice; pthread_t threadID; threadContext *pContext = (threadContext *)malloc(sizeof(threadContext)); strDevice = CFStringCreateWithCString(kCFAllocatorDefault, addr, kCFStringEncodingMacRomanLatin1); IOBluetoothNSStringToDeviceAddress(strDevice, &pContext->deviceAddress); CFRelease(strDevice); pContext->arrDataReceived = CFArrayCreateMutable(kCFAllocatorDefault, 0, NULL); pContext->rfcommChannel = 0; pContext->nChannel = channel; pthread_mutex_init(&(pContext->mutexWait), NULL); pthread_mutex_lock(&(pContext->mutexWait)); /* lock */ pthread_create(&(pContext->threadID), NULL, thread_main, pContext); /* wait until main finishes its initialization */ pthread_mutex_lock(&(pContext->mutexWait)); /* unblock the mutex */ pthread_mutex_unlock(&(pContext->mutexWait)); if (pContext->rfcommChannel == 0) return -1; else /* return the thread context as the file descriptor */ return (int)pContext; } int bluetooth_close(int fd, struct gn_statemachine *state) { threadContext *pContext = (threadContext *)fd; IOBluetoothDeviceRef device; sleep(2); if (fd != -1 && pContext->rfcommChannel > 0) { /* de-register the callback */ IOBluetoothRFCOMMChannelRegisterIncomingDataListener(pContext->rfcommChannel, NULL, NULL); /* close channel and device connection */ IOBluetoothRFCOMMChannelCloseChannel(pContext->rfcommChannel); device = IOBluetoothRFCOMMChannelGetDevice(pContext->rfcommChannel); IOBluetoothDeviceCloseConnection(device); /* IOBluetoothObjectRelease(pContext->rfcommChannel); */ IOBluetoothObjectRelease(device); } return 1; } int bluetooth_write(int fd, const __ptr_t bytes, int size, struct gn_statemachine *state) { threadContext *pContext = (threadContext *)fd; if (IOBluetoothRFCOMMChannelWrite(pContext->rfcommChannel, bytes, size, TRUE) != kIOReturnSuccess) return -1; return size; } int bluetooth_read(int fd, __ptr_t bytes, int size, struct gn_statemachine *state) { threadContext *pContext = (threadContext *)fd; int nOffset = 0; int nBytes = 0; dataBlock* pDataBlock; /* no data received so far */ if (CFArrayGetCount(pContext->arrDataReceived) == 0) return 0; while (CFArrayGetCount(pContext->arrDataReceived) != 0) { pthread_mutex_lock(&(pContext->mutexWait)); pDataBlock = (dataBlock*)CFArrayGetValueAtIndex(pContext->arrDataReceived, 0); pthread_mutex_unlock(&(pContext->mutexWait)); if (pDataBlock->nSize == size) { /* copy data and remove block */ memcpy(bytes + nOffset, pDataBlock->pData, size); pthread_mutex_lock(&(pContext->mutexWait)); CFArrayRemoveValueAtIndex(pContext->arrDataReceived, 0); pthread_mutex_unlock(&(pContext->mutexWait)); free(pDataBlock->pData); free(pDataBlock); return nBytes + size; } else if (pDataBlock->nSize > size) { /* copy data and update block contents */ memcpy(bytes + nOffset, pDataBlock->pData, size); memmove(pDataBlock->pData, pDataBlock->pData + size, pDataBlock->nSize - size); pDataBlock->nSize -= size; return nBytes + size; } else { /* pDataBlock->nSize < size */ /* copy data and remove block */ memcpy(bytes + nOffset, pDataBlock->pData, pDataBlock->nSize); size -= pDataBlock->nSize; nOffset += pDataBlock->nSize; nBytes += pDataBlock->nSize; pthread_mutex_lock(&(pContext->mutexWait)); CFArrayRemoveValueAtIndex(pContext->arrDataReceived, 0); pthread_mutex_unlock(&(pContext->mutexWait)); free(pDataBlock->pData); free(pDataBlock); } } return nBytes; } int bluetooth_select(int fd, struct timeval *timeout, struct gn_statemachine *state) { threadContext *pContext = (threadContext *)fd; int nRetVal = 0; usleep(timeout->tv_usec); pthread_mutex_lock(&(pContext->mutexWait)); if (CFArrayGetCount(pContext->arrDataReceived) > 0) nRetVal = 1; pthread_mutex_unlock(&(pContext->mutexWait)); return nRetVal; } #endif /* HAVE_BLUETOOTH_MACOSX */ gnokii-0.6.31/common/devices/unixirda.c0000644000175000017500000001121411666163120016103 0ustar leoleo/* * * $Id$ * * G N O K I I * * A Linux/Unix toolset and driver for the mobile phones. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library 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. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright (C) 1999-2000 Hugh Blemings & Pavel Janík ml. * Copyright (C) 2000-2001 Marcel Holtmann * Copyright (C) 2001 Chris Kemp * Copyright (C) 2001-2004 Pawel Kot * Copyright (C) 2002-2004 BORBELY Zoltan * Copyright (C) 2004 Phil Ashby * */ #include "config.h" #include "misc.h" #include "gnokii.h" #include "compat.h" #ifdef HAVE_IRDA #include #include #include #include #include #include #include #include #include #include "devices/irda.h" #ifndef AF_IRDA # define AF_IRDA 23 #endif #define INFO_LEN 22 #define DISCOVERY_TIMEOUT 60.0 #define DISCOVERY_SLEEP 0.4 /* Maximum number of devices we look for */ #define MAX_DEVICES 20 static double d_time(void) { double time; struct timeval tv; gettimeofday(&tv, NULL); time = tv.tv_sec + (((double)tv.tv_usec) / 1000000.0); return time; } static double d_sleep(double s) { double time; struct timeval tv1, tv2; gettimeofday(&tv1, NULL); usleep(s * 1000000); gettimeofday(&tv2, NULL); time = tv2.tv_sec - tv1.tv_sec + (((double)(tv2.tv_usec - tv1.tv_usec)) / 1000000.0); return time; } static int irda_discover_device(struct gn_statemachine *state) { struct irda_device_list *list; struct irda_device_info *dev; unsigned char *buf; int s, len, i, daddr = -1, fd; double t1, t2; fd = socket(AF_IRDA, SOCK_STREAM, 0); len = sizeof(*list) + sizeof(*dev) * MAX_DEVICES; buf = malloc(len); list = (struct irda_device_list *)buf; dev = list->dev; t1 = d_time(); dprintf("Expecting: %s\n", state->config.irda_string); do { s = len; memset(buf, 0, s); if (getsockopt(fd, SOL_IRLMP, IRLMP_ENUMDEVICES, buf, (socklen_t *)&s) == 0) { for (i = 0; (i < list->len) && (daddr == -1); i++) { if (strlen(state->config.irda_string) == 0) { /* We take first entry */ daddr = dev[i].daddr; dprintf("Default: %s\t%x\n", dev[i].info, dev[i].daddr); } else { if (strncmp(dev[i].info, state->config.irda_string, INFO_LEN) == 0) { daddr = dev[i].daddr; dprintf("Matching: %s\t%x\n", dev[i].info, dev[i].daddr); } else { dprintf("Not matching: %s\t%x\n", dev[i].info, dev[i].daddr); } } } } if (daddr == -1) { d_sleep(DISCOVERY_SLEEP); } t2 = d_time(); } while ((t2 - t1 < DISCOVERY_TIMEOUT) && (daddr == -1)); free(buf); close(fd); return daddr; } int irda_open(struct gn_statemachine *state) { struct sockaddr_irda peer; int fd = -1, daddr; daddr = irda_discover_device(state); /* discover the devices */ if (daddr != -1) { if (!strcasecmp(state->config.port_device, "IrDA:IrCOMM")) { fprintf(stderr, _("Virtual IrCOMM device unsupported under Linux\n")); return -1; } fd = socket(AF_IRDA, SOCK_STREAM, 0); /* Create socket */ peer.sir_family = AF_IRDA; peer.sir_lsap_sel = LSAP_ANY; peer.sir_addr = daddr; snprintf(peer.sir_name, sizeof(peer.sir_name), "Nokia:PhoNet"); if (connect(fd, (struct sockaddr *)&peer, sizeof(peer))) { /* Connect to service "Nokia:PhoNet" */ perror("connect"); close(fd); fd = -1; /* } else { FIXME: It does not work in most cases. Why? Or why it should work? recv(fd, NULL, 0, 0); call recv first to make select work correctly */ } } return fd; } int irda_close(int fd, struct gn_statemachine *state) { shutdown(fd, 0); return close(fd); } int irda_write(int fd, const __ptr_t bytes, int size, struct gn_statemachine *state) { return send(fd, bytes, size, 0); } int irda_read(int fd, __ptr_t bytes, int size, struct gn_statemachine *state) { return recv(fd, bytes, size, 0); } int irda_select(int fd, struct timeval *timeout, struct gn_statemachine *state) { fd_set readfds; FD_ZERO(&readfds); FD_SET(fd, &readfds); return select(fd + 1, &readfds, NULL, NULL, timeout); } #endif /* HAVE_IRDA */ gnokii-0.6.31/common/devices/bluetooth.c0000644000175000017500000000317611666163120016275 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2002 Marcel Holtmann Copyright (C) 2003 BORBELY Zoltan Copyright (C) 2004 Pawel Kot, Phil Ashby Fake definitions for the bluetooth handling functions. */ #include "config.h" #include "compat.h" #include "misc.h" #include "gnokii.h" #include "devices/unixbluetooth.h" #ifndef HAVE_BLUETOOTH int bluetooth_open(const char *addr, uint8_t channel, struct gn_statemachine *state) { return -1; } int bluetooth_close(int fd, struct gn_statemachine *state) { return -1; } int bluetooth_write(int fd, const __ptr_t bytes, int size, struct gn_statemachine *state) { return -1; } int bluetooth_read(int fd, __ptr_t bytes, int size, struct gn_statemachine *state) { return -1; } int bluetooth_select(int fd, struct timeval *timeout, struct gn_statemachine *state) { return -1; } #endif /* HAVE_BLUETOOTH */ gnokii-0.6.31/common/gsm-mms.c0000644000175000017500000006330511666163120014226 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2009 Daniele Forsi Library for parsing and creating Multimedia Messaging Service messages (MMS). */ #include "config.h" #include /* for ctime() */ #ifdef ENABLE_NLS # include #endif #include "gnokii-internal.h" /** * mms_fields - mapping of all headers defined by the standard * * See OMA-MMS-ENC-V1_3-20050214-D - Chapter 7.4 "Header Field Names and Assigned Numbers" */ gn_mms_field mms_fields[] = { {GN_MMS_Bcc, GN_MMS_FIELD_IS_ENCSTRING, 0, "Bcc"}, {GN_MMS_Cc, GN_MMS_FIELD_IS_ENCSTRING, 0, "Cc"}, {GN_MMS_Content_Location, GN_MMS_FIELD_IS_STRING, 0, "Content-Location"}, {GN_MMS_Content_Type, GN_MMS_FIELD_IS_CONTENT_TYPE, 0, "Content-Type"}, {GN_MMS_Date, GN_MMS_FIELD_IS_DATE, 0, "Date"}, {GN_MMS_Delivery_Report, GN_MMS_FIELD_IS_YESNO, 1, "Delivery-Report"}, {GN_MMS_Delivery_Time, GN_MMS_FIELD_IS_OCTECT, 1, "Delivery-Time"}, {GN_MMS_Expiry, GN_MMS_FIELD_IS_EXPIRY, 1, "Expiry"}, {GN_MMS_From, GN_MMS_FIELD_IS_STRING, 0, "From"}, {GN_MMS_Message_Class, GN_MMS_FIELD_IS_OCTECT, 1, "Message-Class"}, {GN_MMS_Message_ID, GN_MMS_FIELD_IS_STRING, 1, "Message-ID"}, {GN_MMS_Message_Type, GN_MMS_FIELD_IS_OCTECT, 1, "Message-Type"}, {GN_MMS_MMS_Version, GN_MMS_FIELD_IS_OCTECT, 1, "MMS-Version"}, {GN_MMS_Message_Size, GN_MMS_FIELD_IS_LONG, 1, "Message-Size"}, {GN_MMS_Priority, GN_MMS_FIELD_IS_OCTECT, 1, "Priority"}, {GN_MMS_Read_Reply, GN_MMS_FIELD_IS_YESNO, 1, "Read-Reply"}, {GN_MMS_Report_Allowed, GN_MMS_FIELD_IS_YESNO, 1, "Report-Allowed"}, {GN_MMS_Response_Status, GN_MMS_FIELD_IS_OCTECT, 1, "Response-Status"}, {GN_MMS_Response_Text, GN_MMS_FIELD_IS_ENCSTRING, 1, "Response-Text"}, {GN_MMS_Sender_Visibility, GN_MMS_FIELD_IS_OCTECT, 1, "Sender-Visibility"}, {GN_MMS_Status, GN_MMS_FIELD_IS_OCTECT, 1, "Status"}, {GN_MMS_Subject, GN_MMS_FIELD_IS_ENCSTRING, 0, "Subject"}, {GN_MMS_To, GN_MMS_FIELD_IS_ENCSTRING, 0, "To"}, {GN_MMS_Transaction_Id, GN_MMS_FIELD_IS_STRING, 1, "Transaction-Id"} }; /** * gn_mms_field_lookup - search the field corresponding to the given @id * * @id: the identifier of the field * * Return value: a pointer to @gn_mms_field or NULL if not found */ const gn_mms_field *gn_mms_field_lookup(gn_mms_field_id id) { int i; id |= 0x80; for (i = 0; i < sizeof(mms_fields) / sizeof(mms_fields[0]); i++) { if (mms_fields[i].id == id) { return &mms_fields[i]; } } return NULL; } /** * content_type_fields - mapping of values defined by the standard * * See http://www.wapforum.org/wina (referred to by WAP-230-WSP-20010705-a - Appendix A, Table 40) */ gn_mms_content_type content_type_fields[] = { {GN_MMS_CONTENT_application_vnd_wap_multipart_mixed, "application/vnd.wap.multipart.mixed"}, {GN_MMS_CONTENT_application_vnd_wap_multipart_related, "application/vnd.wap.multipart.related"}, {GN_MMS_CONTENT_text_plain, "text/plain"}, {GN_MMS_CONTENT_image_jpeg, "image/jpeg"}, }; /** * gn_mms_content_type_lookup - search the field corresponding to the given @id * * @id: the identifier of the field * * Return value: a pointer to @gn_mms_field or NULL if not found */ const gn_mms_content_type *gn_mms_content_type_lookup(gn_mms_content type) { int i; type |= 0x80; for (i = 0; i < sizeof(content_type_fields) / sizeof(content_type_fields[0]); i++) { if (content_type_fields[i].type == type) { return &content_type_fields[i]; } } return NULL; } /* * gn_mms_detect_format - Tries to autodetect format of MMS stored in memory * @source: a pointer to the buffer to decode * @source_len: the number of bytes in the @source buffer * * Known formats are: * - #GN_MMS_FORMAT_PDU: the binary format exchanged between phone and server * - #GN_MMS_FORMAT_MIME: an ASCII translation of the PDU * - #GN_MMS_FORMAT_NOKIA: a PDU with additional Nokia information before and after it */ GNOKII_API gn_mms_format gn_mms_detect_format(const unsigned char *source, size_t source_len) { const gn_mms_field *field; if (!source) return GN_MMS_FORMAT_UNKNOWN; if (*source == GN_MMS_Message_Type) return GN_MMS_FORMAT_PDU; field = gn_mms_field_lookup(GN_MMS_Message_Type); if (!field) return GN_MMS_FORMAT_UNKNOWN; if (!strncmp(source, field->header, strlen(field->header))) return GN_MMS_FORMAT_MIME; if (source_len < GN_MMS_NOKIA_HEADER_LEN + 1) return GN_MMS_FORMAT_UNKNOWN; /* do not check length values in header now, they can be fixed later if wrong */ if (*source == '\0' && source[GN_MMS_NOKIA_HEADER_LEN] == GN_MMS_Message_Type) return GN_MMS_FORMAT_RAW; return GN_MMS_FORMAT_UNKNOWN; } /** * gn_mms_dec_uintvar - decode and unsigned integer of variable length * @source: a pointer to the buffer to decode * @source_len: the number of bytes in the @source buffer * @number: the destination of the decoding * @decoded_len: the number of bytes from @source that have been converted * * Decodes at most 5 octects from @source into the unsigned integer @number (at most 32 bits). * See WAP-230-WSP-20010705-a Chapter 8.1.2 "Variable Length Unsigned Integers" * * Return value: a @gn_error code */ gn_error gn_mms_dec_uintvar(const unsigned char *source, size_t source_len, unsigned int *number, size_t *decoded_len) { *decoded_len = 0; if (source_len < 1) return GN_ERR_WRONGDATAFORMAT; *number = 0; *decoded_len = 0; while (*decoded_len < 5) { (*decoded_len)++; *number <<= 7; *number += *source & 0x7f; /* number ends when "continuation bit" is unset */ if (!(*source & 0x80)) return GN_ERR_NONE; source++; } return GN_ERR_WRONGDATAFORMAT; } #define APPEND(buf, fmt, ...) \ do { \ size_t count, newsize; \ char *astring, *nbuf; \ count = asprintf(&astring, fmt, __VA_ARGS__); \ if (!astring) \ return GN_ERR_MEMORYFULL; \ newsize = *dest_length + count; \ nbuf = realloc(buf, newsize + 1); \ if (!nbuf) { \ free(buf); \ free(astring); \ return GN_ERR_MEMORYFULL; \ } \ buf = nbuf; \ strcat(buf + *dest_length, astring); \ free(astring); \ *dest_length = newsize; \ } while (0) #define DUMP(buf, memory, length) \ do { \ int j, n; \ size_t len = length; \ const unsigned char *source = memory; \ while (len > 0) { \ APPEND(buf, "%s", " "); \ if (len >= 35) \ n = 35; \ else \ n = len; \ for (j = 0; j < n; j++) { \ APPEND(buf, "%02x", *source); \ source++; \ } \ len -= n; \ APPEND(buf, "%s", "\n"); \ } \ } while (0) #define DUMP64(buf, memory, length) \ do { \ int n; \ size_t len = length; \ const unsigned char *source = memory; \ unsigned char outstring[61]; \ while (len > 0) { \ if (len >= 45) \ n = 45; \ else \ n = len; \ base64_encode(outstring, sizeof(outstring), source, n); \ APPEND(buf, "%s", outstring); \ source += n; \ len -= n; \ APPEND(buf, "%s", "\n"); \ } \ } while (0) /** * gn_mms_dec_miscstring - decode several types of strings * @source: a pointer to the buffer to decode * @source_len: the number of bytes in the @source buffer * @number: the destination of the decoding * @decoded_len: the number of bytes from @source that have been converted * * Decodes a variety of string formats. * * Return value: a @gn_error code */ gn_error gn_mms_dec_miscstring(const unsigned char *source, size_t source_len, unsigned char **dest_buffer, size_t *dest_length, size_t *decoded_len) { size_t i; unsigned int number; gn_error error; *decoded_len = 0; if (source_len < 2) return GN_ERR_WRONGDATAFORMAT; /* * Decode Text-string, Quoted-string and Extension-media */ i = 0; if (source[i] == 1 && source[i + 1] == GN_MMS_Insert_Address_Token) { /* * Special case for "From" field. "0x01 0x81" wouldn't be a valid string anyway * because according to 8.4.2.1 Basic rules if first char is > 127 it must be quoted */ /* Skip NUL terminator */ *decoded_len = source[i] - 1; i++; *dest_length = asprintf((char **) dest_buffer, "0x%02x", source[i]); } else { if (source[i] <= 30) { /* Ignore NUL terminator */ *decoded_len = source[i] - 1; i++; } else if (source[i] == 31) { i++; error = gn_mms_dec_uintvar(&source[i], source_len - i, &number, decoded_len); if (error) return error; i += *decoded_len; *decoded_len = number; /* Special case for "From" field. "0x1f length 0x80" wouldn't be a valid string anyway */ if (source[i] == GN_MMS_Address_Present_Token) { /* Skip Address-present-token */ i++; (*decoded_len)--; } /* FIXME handle Char-set */ dprintf("Ignoring Char-set 0x%02x\n", source[i]); /* Ignore NUL terminator */ (*decoded_len)--; } else if (source[i] == '"' || source[i] == 0x7f) { /* Skip quoting char */ i++; *decoded_len = strlen(&source[i]); } else { /* A null terminated string */ *decoded_len = strlen(&source[i]); } *dest_length = asprintf((char **) dest_buffer, "%*s", (int)*decoded_len, &source[i]); } (*decoded_len) += i; return GN_ERR_NONE; } /** * gn_mms_pdu2txtmime - convert an MMS from PDU to human readable format or to MIME * @buffer: a pointer to the buffer to decode * @length: the number of bytes in the @source buffer * @dest_buffer: the destination of the decoding; must be free()'d by the caller * @dest_length: a pointer to the number of octects in @dest_buffer * @mime: 0 to convert to text, 1 to convert to MIME * * Return value: a @gn_error code; in case of error @length contains the position of the error */ static gn_error gn_mms_pdu2txtmime(unsigned const char *buffer, size_t *length, unsigned char **dest_buffer, size_t *dest_length, int mime) { size_t i, j, decoded_len, string_len; const gn_mms_field *field; unsigned int number; unsigned char *string; gn_error error; *dest_length = 0; *dest_buffer = calloc(1, *dest_length + 1); if (!*dest_buffer) return GN_ERR_MEMORYFULL; for (i = 0; i < *length; i++) { if ((buffer[i] & 0x80) == 0x80) { field = gn_mms_field_lookup(buffer[i]); /* TODO check if decoding of each field overrides the input buffer */ if (field) { if (mime && field->x) APPEND(*dest_buffer, "%s", "X-"); /* * Decode according to WAP-230-WSP-20010705-a, Approved Version 5 July 2001 8.4.2.1 Basic rules */ i++; switch (field->type) { case GN_MMS_FIELD_IS_OCTECT: /* * Decode a Short-Integer - could use gn_mms_dec_uintvar() but it's easier this way */ APPEND(*dest_buffer, "%s: 0x%02x\n", field->header, buffer[i] & 0x7f); break; case GN_MMS_FIELD_IS_LONG: /* FALL THROUGH */ case GN_MMS_FIELD_IS_DATE: /* * Decode a Long-Integer */ decoded_len = buffer[i]; i++; number = 0; for (j = 0; j < decoded_len; j++) { number = number * 256 + buffer[i + j]; } if (field->type == GN_MMS_FIELD_IS_DATE) { /* ctime() adds a trailing \n */ APPEND(*dest_buffer, "%s: %s", field->header, ctime((time_t *) &number)); } else { APPEND(*dest_buffer, "%s: %u\n", field->header, number); } decoded_len--; i += decoded_len; break; case GN_MMS_FIELD_IS_STRING: /* * Decode Text-string, Quoted-string and Extension-media */ error = gn_mms_dec_miscstring(&buffer[i], *length - i, &string, &string_len, &decoded_len); if (error) return error; APPEND(*dest_buffer, "%s: %s\n", field->header, string); free(string); i += decoded_len; break; case GN_MMS_FIELD_IS_CONTENT_TYPE: /* * Decode Content-Type * See WAP-230-WSP-20010705-a, Approved Version 5 July 2001 8.4.2.24 Content type field */ { const gn_mms_content_type *type; int headers_len, data_len; /* * WAP-230-WSP-20010705-a 8.5 Multipart Data */ /* 8.4.2.1 Basic rules Constrained-encoding */ if (buffer[i] > 127) { /* Short-integer */ type = gn_mms_content_type_lookup(buffer[i]); if (type) { APPEND(*dest_buffer, "%s: %s\n", field->header, type->name); } else { APPEND(*dest_buffer, "%s: 0x%02x\n", field->header, buffer[i]); } i++; } else { /* Extension-media */ decoded_len = buffer[i]; i++; APPEND(*dest_buffer, "%s:", field->header); DUMP(*dest_buffer, &buffer[i], decoded_len); i += decoded_len; } /* Docs say to ignore nEntries because entries can simply be iterated */ i++; while (i < *length) { /* 8.5.3 Multipart Entry */ error = gn_mms_dec_uintvar(&buffer[i], *length - i, &headers_len, &decoded_len); if (error) return error; dprintf("HeadersLen %d at 0x%x\n", headers_len, i + 0xb0); i += decoded_len; error = gn_mms_dec_uintvar(&buffer[i], *length - i, &data_len, &decoded_len); if (error) return error; dprintf("DataLen %d at 0x%x\n", data_len, i + 0xb0); i += decoded_len; if (mime) { APPEND(*dest_buffer, "Headers length: %d\n", headers_len); DUMP(*dest_buffer, &buffer[i], headers_len); i += headers_len; /* Data */ APPEND(*dest_buffer, "Data length: %d\n", data_len); DUMP64(*dest_buffer, &buffer[i], data_len); i += data_len; } else { /* Headers */ APPEND(*dest_buffer, "Headers length: %d\n", headers_len); DUMP(*dest_buffer, &buffer[i], headers_len); i += headers_len; /* Data */ APPEND(*dest_buffer, "Data length: %d\n", data_len); i += data_len; } } } break; case GN_MMS_FIELD_IS_EXPIRY: decoded_len = buffer[i]; APPEND(*dest_buffer, "%s:", field->header); DUMP(*dest_buffer, &buffer[i + 1], decoded_len); i += decoded_len; break; default: dprintf("Unhandled GN_MMS_FIELD_IS_* %d\n", field->type); return GN_ERR_INTERNALERROR; } } else { /* Text-Value */ dprintf("Unknown field 0x%02x\n", buffer[i]); return GN_ERR_INTERNALERROR; } } else { dprintf("Out of sync at offset 0x%02x value 0x%02x\n", i, buffer[i]); return GN_ERR_INTERNALERROR; } } if (i - *length != 1) { dprintf("Read buffer overflow (%d bytes)\n", i - *length); return GN_ERR_INTERNALERROR; } return GN_ERR_NONE; } #undef DUMP64 #undef DUMP #undef APPEND /** * gn_mms_pdu2txt - convert an MMS from PDU to human readable format * @buffer: a pointer to the buffer to decode * @length: the number of bytes in the @source buffer * @dest_buffer: the destination of the decoding; must be free()'d by the caller * @dest_length: a pointer to the number of octects in @dest_buffer * * Return value: a @gn_error code; in case of error @length contains the position of the error */ gn_error gn_mms_pdu2txt(unsigned const char *buffer, size_t *length, unsigned char **dest_buffer, size_t *dest_length) { return gn_mms_pdu2txtmime(buffer, length, dest_buffer, dest_length, 0); } /** * gn_mms_pdu2mime - convert an MMS from PDU to MIME format * @buffer: a pointer to the buffer to decode * @length: the number of bytes in the @source buffer * @dest_buffer: the destination of the decoding; must be free()'d by the caller * @dest_length: a pointer to the number of octects in @dest_buffer * * Return value: a @gn_error code; in case of error @length contains the position of the error */ gn_error gn_mms_pdu2mime(unsigned const char *buffer, size_t *length, unsigned char **dest_buffer, size_t *dest_length) { return gn_mms_pdu2txtmime(buffer, length, dest_buffer, dest_length, 1); } /** * gn_mms_nokia2pdu - extract the PDU from a buffer containing an MMS in Nokia file format * * @source_buffer: a pointer to the buffer containing the MMS * @source_length: the number of octects in @source_buffer * @dest_buffer: the address of a pointer to the destination of the decoding; must be free()'d by the caller * @dest_length: a pointer to the number of octects in @dest_buffer * * Return value: a @gn_error code */ gn_error gn_mms_nokia2pdu(const unsigned char *source_buffer, size_t *source_length, unsigned char **dest_buffer, size_t *dest_length) { const unsigned char *nokia_header, *pdu_start; size_t mms_length, total_length; if (*source_length < GN_MMS_NOKIA_HEADER_LEN) return GN_ERR_WRONGDATAFORMAT; nokia_header = source_buffer; pdu_start = nokia_header + GN_MMS_NOKIA_HEADER_LEN; mms_length = (nokia_header[4] << 24) + (nokia_header[5] << 16) + (nokia_header[6] << 8) + nokia_header[7]; total_length = (nokia_header[8] << 24) + (nokia_header[9] << 16) + (nokia_header[10] << 8) + nokia_header[11]; dprintf("Nokia header length %d\n", GN_MMS_NOKIA_HEADER_LEN); dprintf("\tMMS length %d\n", mms_length); dprintf("\tFooter length %d\n", total_length - mms_length - GN_MMS_NOKIA_HEADER_LEN); dprintf("\tTotal length %d\n", total_length); if (total_length != *source_length) { dprintf("ERROR: total_length != source_length (%d != %d)\n", total_length, *source_length); return GN_ERR_WRONGDATAFORMAT; } if (total_length <= mms_length) { dprintf("ERROR: total_length <= mms_length (%d <= %d)\n", total_length, mms_length); return GN_ERR_WRONGDATAFORMAT; } *dest_buffer = malloc(mms_length); if (!*dest_buffer) return GN_ERR_MEMORYFULL; *dest_length = mms_length; memcpy(*dest_buffer, pdu_start, mms_length); return GN_ERR_NONE; } /** * gn_mms_nokia2mms - fill MMS fields from a buffer containing an MMS in Nokia file format * * @source_buffer: a pointer to the buffer containing the MMS * @source_length: the number of octects in @source_buffer * @mms: a pointer to the @mms to fill with decoded data * * Return value: a @gn_error code */ gn_error gn_mms_nokia2mms(const unsigned char *source_buffer, size_t *source_length, gn_mms *mms) { gn_error error; const unsigned char *nokia_header; char string[80]; error = gn_mms_nokia2pdu(source_buffer, source_length, &mms->buffer, &mms->buffer_length); if (error != GN_ERR_NONE) return error; mms->buffer_format = GN_MMS_FORMAT_PDU; nokia_header = source_buffer; /* Decode Nokia header */ char_unicode_decode(string, nokia_header + 12, sizeof(string)); mms->subject = strdup(string); char_unicode_decode(string, nokia_header + 94, sizeof(string)); mms->from = strdup(string); return GN_ERR_NONE; } /** * gn_mms_nokia2txt - fill a text buffer from a buffer containing an MMS in Nokia file format * * @source_buffer: a pointer to the buffer containing the MMS * @source_length: the number of octects in @source_buffer * @dest_buffer: the address of a pointer to the destination of the decoding; must be free()'d by the caller * @dest_length: a pointer to the number of octects in @dest_buffer * * Return value: a @gn_error code */ gn_error gn_mms_nokia2txt(const unsigned char *source_buffer, size_t *source_length, unsigned char **dest_buffer, size_t *dest_length) { gn_error error; unsigned char *pdu_buffer; size_t pdu_length; error = gn_mms_nokia2pdu(source_buffer, source_length, &pdu_buffer, &pdu_length); if (error != GN_ERR_NONE) return error; error = gn_mms_pdu2txt(pdu_buffer, &pdu_length, dest_buffer, dest_length); free(pdu_buffer); return error; } /** * gn_mms_nokia2mime - fill a buffer in MIME format from a buffer containing an MMS in Nokia file format * * @source_buffer: a pointer to the buffer containing the MMS * @source_length: the number of octects in @source_buffer * @dest_buffer: the address of a pointer to the destination of the decoding; must be free()'d by the caller * @dest_length: a pointer to the number of octects in @dest_buffer * * Return value: a @gn_error code */ gn_error gn_mms_nokia2mime(const unsigned char *source_buffer, size_t *source_length, unsigned char **dest_buffer, size_t *dest_length) { gn_error error; unsigned char *pdu_buffer; size_t pdu_length; error = gn_mms_nokia2pdu(source_buffer, source_length, &pdu_buffer, &pdu_length); if (error != GN_ERR_NONE) return error; error = gn_mms_pdu2mime(pdu_buffer, &pdu_length, dest_buffer, dest_length); free(pdu_buffer); return error; } /** * gn_mms_convert- High-level function for converting MMS * @source_mms: a pointer to a @gn_mms containing the MMS to be converted * @dest_mms: a pointer to a @gn_mms that will contain the converted MMS * * @dest_mms->buffer_format fields must set, @source_mms->buffer_format is * autodetected id unset, other fields of @source_mms must be valid depending * on format, @dest_mms->buffer must be free()'d by the caller on success. * * Return value: a @gn_error code */ GNOKII_API gn_error gn_mms_convert(const gn_mms *source_mms, gn_mms *dest_mms) { gn_mms_format source_format; gn_mms *temp_mms = NULL; gn_error error = GN_ERR_NONE; size_t source_length; if (!source_mms || !dest_mms) return GN_ERR_INTERNALERROR; source_length = source_mms->buffer_length; if (source_mms->buffer_format == GN_MMS_FORMAT_UNKNOWN) { source_format = gn_mms_detect_format(source_mms->buffer, source_length); } else { source_format = source_mms->buffer_format; } /* Convert all input formats to PDU */ switch (source_format) { case GN_MMS_FORMAT_PDU: /* Do nothing */ break; case GN_MMS_FORMAT_RAW: error = gn_mms_alloc(&temp_mms); if (error != GN_ERR_NONE) break; error = gn_mms_nokia2pdu(source_mms->buffer, &source_length, &temp_mms->buffer, &temp_mms->buffer_length); temp_mms->buffer_format = GN_MMS_FORMAT_PDU; source_mms = temp_mms; source_length = source_mms->buffer_length; break; default: error = GN_ERR_NOTIMPLEMENTED; } if (error == GN_ERR_NONE) { /* TODO: parse source MMS instead of blindly copying it */ if (source_format == dest_mms->buffer_format) { dest_mms->buffer_length = source_length; dest_mms->buffer = malloc(source_length); if (dest_mms->buffer) { memcpy(dest_mms->buffer, source_mms->buffer, source_length); } else { error = GN_ERR_MEMORYFULL; } return error; } switch (dest_mms->buffer_format) { case GN_MMS_FORMAT_TEXT: error = gn_mms_pdu2txt(source_mms->buffer, &source_length, &dest_mms->buffer, &dest_mms->buffer_length); break; case GN_MMS_FORMAT_MIME: error = gn_mms_pdu2mime(source_mms->buffer, &source_length, &dest_mms->buffer, &dest_mms->buffer_length); break; case GN_MMS_FORMAT_PDU: /* Handled above */ break; default: error = GN_ERR_NOTIMPLEMENTED; } } if (temp_mms) gn_mms_free(temp_mms); return error; } /** * gn_mms_get- High-level function for reading MMS from phone * @data: GSM data for the phone driver * @state: current statemachine state * * This function is the frontend for reading MMS from phone. The @mms field * in the @gn_data structure must be initialized and @data->mms->buffer * must be free()'d by the caller. * * Return value: a @gn_error code */ GNOKII_API gn_error gn_mms_get(gn_data *data, struct gn_statemachine *state) { gn_error error; gn_mms_raw rawmms; if (!data->mms) return GN_ERR_INTERNALERROR; if (data->mms->number < 1) return GN_ERR_INVALIDLOCATION; rawmms.number = data->mms->number; rawmms.memory_type = data->mms->memory_type; data->raw_mms = &rawmms; dprintf("%s() memory %s location %d\n", __FUNCTION__, gn_memory_type2str(rawmms.memory_type), rawmms.number); error = gn_sm_functions(GN_OP_GetMMS, data, state); if (error) return error; data->mms->status = rawmms.status; switch (data->mms->buffer_format) { case GN_MMS_FORMAT_TEXT: error = gn_mms_nokia2txt(rawmms.buffer, &rawmms.buffer_length, &data->mms->buffer, &data->mms->buffer_length); break; case GN_MMS_FORMAT_MIME: error = gn_mms_nokia2mime(rawmms.buffer, &rawmms.buffer_length, &data->mms->buffer, &data->mms->buffer_length); break; case GN_MMS_FORMAT_PDU: error = gn_mms_nokia2pdu(rawmms.buffer, &rawmms.buffer_length, &data->mms->buffer, &data->mms->buffer_length); break; case GN_MMS_FORMAT_RAW: data->mms->buffer = rawmms.buffer; data->mms->buffer_length = rawmms.buffer_length; rawmms.buffer = NULL; break; default: error = GN_ERR_WRONGDATAFORMAT; } if (rawmms.buffer) { if (error == GN_ERR_INTERNALERROR) dprintf("%s", rawmms.buffer); free(rawmms.buffer); } return error; } /** * gn_mms_delete - High-level function for deleting MMS * @data: GSM data for the phone driver * @state: current statemachine state * * This function is the frontend for deleting MMS. Note that MMS field * in the gn_data structure must be initialized. */ GNOKII_API gn_error gn_mms_delete(gn_data *data, struct gn_statemachine *state) { gn_mms_raw rawmms; if (!data->mms) return GN_ERR_INTERNALERROR; memset(&rawmms, 0, sizeof(gn_mms_raw)); rawmms.number = data->mms->number; rawmms.memory_type = data->mms->memory_type; data->raw_mms = &rawmms; return gn_sm_functions(GN_OP_DeleteMMS, data, state); } /*** *** OTHER FUNCTIONS ***/ /** * gn_mms_free - free an @mms * @mms: a pointer to a @gn_mms returned by gn_mms_alloc() * * Return value: a @gn_error code */ GNOKII_API gn_error gn_mms_free(gn_mms *mms) { if (mms) { if (mms->tid) free(mms->tid); if (mms->from) free(mms->from); if (mms->to) free(mms->to); if (mms->buffer) free(mms->buffer); free(mms); } return GN_ERR_NONE; } /** * gn_mms_alloc - allocate an @mms * @mms: the address of a pointer to a gn_mms that must be freed with gn_mms_free() * * Return value: a @gn_error code */ GNOKII_API gn_error gn_mms_alloc(gn_mms **mms) { *mms = calloc(1, sizeof(gn_mms)); if (*mms) return GN_ERR_NONE; return GN_ERR_MEMORYFULL; } gnokii-0.6.31/common/gsm-api.c0000644000175000017500000001166411666163120014204 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 2001 Chris Kemp, Manfred Jonsson Copyright (C) 2001-2002 Pavel Machek Copyright (C) 2001-2003 Pawel Kot Copyright (C) 2002-2003 Ladis Michl Copyright (C) 2002-2004 BORBELY Zoltan Provides a generic API for accessing functions on the phone, wherever possible hiding the model specific details. The underlying code should run in it's own thread to allow communications to the phone to be run independantly of mailing code that calls these API functions. Unless otherwise noted, all functions herein block until they complete. The functions themselves are defined in a structure in gsm-common.h. */ #include "config.h" #include #include #include #include "compat.h" #include "misc.h" #include "gnokii.h" #include "cfgreader.h" #include "phones/nk6510.h" #include "phones/nk7110.h" #include "phones/nk6100.h" #include "phones/nk3110.h" #include "phones/nk2110.h" #if defined(WIN32) && defined(_USRDLL) /* * Define the entry point for the DLL application. * * We don't do anything special here (yet) but the code is needed * in order to create a DLL. */ BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { /* * For now this is enough to satisfy the compiler and linker. * Currently no extra code is needed for initializing or * deinitializing of the DLL. */ switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: case DLL_PROCESS_DETACH: break; } return TRUE; } #endif /* defined(WIN32) && defined(_USRDLL) */ /* Initialise interface to the phone. Model number should be a string such as 3810, 5110, 6110 etc. Device is the serial port to use e.g. /dev/ttyS0, the user must have write permission to the device. */ static gn_error register_driver(gn_driver *driver, const char *model, char *setupmodel, struct gn_statemachine *sm) { gn_data *data = NULL; gn_data *p_data; gn_error error = GN_ERR_UNKNOWNMODEL; if (setupmodel) { data = calloc(1, sizeof(gn_data)); if (!data) return GN_ERR_INTERNALERROR; data->model = setupmodel; p_data = data; } else { p_data = NULL; } if (strstr(driver->phone.models, model) != NULL) error = driver->functions(GN_OP_Init, p_data, sm); free(data); return error; } #define REGISTER_DRIVER(x, y) { \ extern gn_driver driver_##x; \ if ((ret = register_driver(&driver_##x, sm->config.model, y, sm)) != GN_ERR_UNKNOWNMODEL) \ return ret; \ } GNOKII_API gn_error gn_gsm_initialise(struct gn_statemachine *sm) { gn_error ret; dprintf("phone instance config:\n"); dprintf("model = %s\n", sm->config.model); dprintf("port = %s\n", sm->config.port_device); dprintf("connection = %s\n", gn_lib_get_connection_name(sm->config.connection_type)); if (sm->config.init_length) { dprintf("initlength = %d\n", sm->config.init_length); } else { dprintf("initlength = default\n"); } dprintf("serial_baudrate = %d\n", sm->config.serial_baudrate); dprintf("serial_write_usleep = %d\n", sm->config.serial_write_usleep); dprintf("handshake = %s\n", sm->config.hardware_handshake ? "hardware" : "software"); dprintf("require_dcd = %d\n", sm->config.require_dcd); dprintf("smsc_timeout = %d\n", sm->config.smsc_timeout / 10); if (*sm->config.connect_script) dprintf("connect_script = %s\n", sm->config.connect_script); if (*sm->config.disconnect_script) dprintf("disconnect_script = %s\n", sm->config.disconnect_script); dprintf("rfcomm_channel = %d\n", (int)sm->config.rfcomm_cn); dprintf("sm_retry = %d\n", sm->config.sm_retry); if (sm->config.model[0] == '\0') return GN_ERR_UNKNOWNMODEL; if (sm->config.port_device[0] == '\0') return GN_ERR_FAILED; REGISTER_DRIVER(nokia_7110, NULL); REGISTER_DRIVER(nokia_6510, NULL); REGISTER_DRIVER(nokia_6100, NULL); REGISTER_DRIVER(nokia_3110, NULL); #if 0 #ifndef WIN32 REGISTER_DRIVER(nokia_2110, NULL); #endif #endif REGISTER_DRIVER(fake, NULL); REGISTER_DRIVER(at, sm->config.model); REGISTER_DRIVER(nokia_6160, NULL); REGISTER_DRIVER(gnapplet, NULL); #ifdef HAVE_PCSC REGISTER_DRIVER(pcsc, sm->config.model); #endif return GN_ERR_UNKNOWNMODEL; } gnokii-0.6.31/common/readmidi.c0000644000175000017500000007630711666163120014432 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janík ml. Copyright (C) 2003 Tomi Ollila, BORBELY Zoltan Functions to read and write common file types. */ /* * This file was downloaded from http://www.guru-group.fi/~too/sw/xring/ * The page states this is a GPL'd program, so I added an explicit GPL * header (required by savannah). -- bozo */ /* embedding modified midifile.h and midifile.c into this file */ /***** midifile.h ******/ struct MF { /* definitions for MIDI file parsing code */ int (*Mf_getc) (struct MF *); void (*Mf_header) (struct MF *, int, int, int); void (*Mf_trackstart) (struct MF *); void (*Mf_trackend) (struct MF *); void (*Mf_noteon) (struct MF *, int, int, int); void (*Mf_noteoff) (struct MF *, int, int, int); void (*Mf_pressure) (struct MF *, int, int, int); void (*Mf_parameter) (struct MF *, int, int, int); void (*Mf_pitchbend) (struct MF *, int, int, int); void (*Mf_program) (struct MF *, int, int); void (*Mf_chanpressure) (struct MF *, int, int); void (*Mf_sysex) (struct MF *, int, char *); void (*Mf_metamisc) (struct MF *, int, int, char *); void (*Mf_seqspecific) (struct MF *, int, int, char *); void (*Mf_seqnum) (struct MF *, int); void (*Mf_text) (struct MF *, int, int, char *); void (*Mf_eot) (struct MF *); void (*Mf_timesig) (struct MF *, int, int, int, int); void (*Mf_smpte) (struct MF *, int, int, int, int, int); void (*Mf_tempo) (struct MF *, long); void (*Mf_keysig) (struct MF *, int, int); void (*Mf_arbitrary) (struct MF *, int, char *); void (*Mf_error) (struct MF *, char *); /* definitions for MIDI file writing code */ int (*Mf_putc) (struct MF *, int); long (*Mf_getpos) (struct MF *); int (*Mf_setpos) (struct MF *, long); void (*Mf_writetrack) (struct MF *, int); void (*Mf_writetempotrack) (struct MF *); /* variables */ int Mf_nomerge; /* 1 => continue'ed system exclusives are */ /* not collapsed. */ long Mf_currtime; /* current time in delta-time units */ /* private stuff */ long Mf_toberead; long Mf_numbyteswritten; char *Msgbuff; /* message buffer */ int Msgsize; /* Size of currently allocated Msg */ int Msgindex; /* index of next available location in Msg */ }; float mf_ticks2sec(unsigned long ticks, int division, unsigned int tempo); unsigned long mf_sec2ticks(float secs, int division, unsigned int tempo); void mferror(struct MF *mf, char *s); /*void mfwrite(); */ /* MIDI status commands most significant bit is 1 */ #define note_off 0x80 #define note_on 0x90 #define poly_aftertouch 0xa0 #define control_change 0xb0 #define program_chng 0xc0 #define channel_aftertouch 0xd0 #define pitch_wheel 0xe0 #define system_exclusive 0xf0 #define delay_packet (1111) /* 7 bit controllers */ #define damper_pedal 0x40 #define portamento 0x41 #define sostenuto 0x42 #define soft_pedal 0x43 #define general_4 0x44 #define hold_2 0x45 #define general_5 0x50 #define general_6 0x51 #define general_7 0x52 #define general_8 0x53 #define tremolo_depth 0x5c #define chorus_depth 0x5d #define detune 0x5e #define phaser_depth 0x5f /* parameter values */ #define data_inc 0x60 #define data_dec 0x61 /* parameter selection */ #define non_reg_lsb 0x62 #define non_reg_msb 0x63 #define reg_lsb 0x64 #define reg_msb 0x65 /* Standard MIDI Files meta event definitions */ #define meta_event 0xFF #define sequence_number 0x00 #define text_event 0x01 #define copyright_notice 0x02 #define sequence_name 0x03 #define instrument_name 0x04 #define lyric 0x05 #define marker 0x06 #define cue_point 0x07 #define channel_prefix 0x20 #define end_of_track 0x2f #define set_tempo 0x51 #define smpte_offset 0x54 #define time_signature 0x58 #define key_signature 0x59 #define sequencer_specific 0x74 /* Manufacturer's ID number */ #define Seq_Circuits (0x01) /* Sequential Circuits Inc. */ #define Big_Briar (0x02) /* Big Briar Inc. */ #define Octave (0x03) /* Octave/Plateau */ #define Moog (0x04) /* Moog Music */ #define Passport (0x05) /* Passport Designs */ #define Lexicon (0x06) /* Lexicon */ #define Tempi (0x20) /* Bon Tempi */ #define Siel (0x21) /* S.I.E.L. */ #define Kawai (0x41) #define Roland (0x42) #define Korg (0x42) #define Yamaha (0x43) /* miscellaneous definitions */ #define MThd 0x4d546864 #define MTrk 0x4d54726b #define lowerbyte(x) ((unsigned char)(x & 0xff)) #define upperbyte(x) ((unsigned char)((x & 0xff00)>>8)) /* the midifile interface */ void midifile(struct MF *mf); /***** midifile.c ******/ /* * midifile 1.11 * * Read and write a MIDI file. Externally-assigned function pointers are * called upon recognizing things in the file. * * Original release ? * June 1989 - Added writing capability, M. Czeiszperger. * * The file format implemented here is called * Standard MIDI Files, and is part of the Musical * instrument Digital Interface specification. * The spec is avaiable from: * * International MIDI Association * 5316 West 57th Street * Los Angeles, CA 90056 * * An in-depth description of the spec can also be found * in the article "Introducing Standard MIDI Files", published * in Electronic Musician magazine, April, 1989. * */ #include "config.h" #include "misc.h" #include "gnokii.h" #include #include #include #define NULLFUNC NULL static void readheader(struct MF *mf); static int readtrack(struct MF *mf); static void chanmessage(struct MF *mf, int status, int c1, int c2); static void msginit(struct MF *mf); static void msgadd(struct MF *mf, int c); static void metaevent(struct MF *mf, int type); static void sysex(struct MF *mf); static int msgleng(struct MF *mf); static void badbyte(struct MF *mf, int c); static void biggermsg(struct MF *mf); static void mf_write_track_chunk(struct MF *mf, int which_track); static void mf_write_header_chunk(struct MF *mf, int format, int ntracks, int division); static long readvarinum(struct MF *mf); static long read32bit(struct MF *mf); static long to32bit(int, int, int, int); static int read16bit(struct MF *mf); static int to16bit(int, int); static char *msg(struct MF *mf); static void write32bit(struct MF *mf, unsigned long data); static void write16bit(struct MF *mf, int data); static int eputc(struct MF *mf, unsigned char c); static void WriteVarLen(struct MF *mf, unsigned long value); /* The only non-static function in this file. */ void mfread(struct MF *mf) { if (mf->Mf_getc == NULLFUNC) mferror(mf, "mfread() called without setting Mf_getc"); readheader(mf); while (readtrack(mf)) ; } /* for backward compatibility with the original lib */ void midifile(struct MF *mf) { mfread(mf); } /* read through the "MThd" or "MTrk" header string */ static int readmt(struct MF *mf, char *s) { int n = 0; char *p = s; int c = 0; while (n++ < 4 && (c = mf->Mf_getc(mf)) != EOF) { if (c != *p++) { char buff[32]; snprintf(buff, sizeof(buff), "expecting %s", s); mferror(mf, buff); } } return c; } /* read a single character and abort on EOF */ static int egetc(struct MF *mf) { int c = mf->Mf_getc(mf); if (c == EOF) mferror(mf, "premature EOF"); mf->Mf_toberead--; return c; } /* read a header chunk */ static void readheader(struct MF *mf) { int format, ntrks, division; if (readmt(mf, "MThd") == EOF) return; mf->Mf_toberead = read32bit(mf); format = read16bit(mf); ntrks = read16bit(mf); division = read16bit(mf); if (mf->Mf_header) (*mf->Mf_header) (mf, format, ntrks, division); /* flush any extra stuff, in case the length of header is not 6 */ while (mf->Mf_toberead > 0) (void) egetc(mf); } static int readtrack(struct MF *mf) { /* read a track chunk */ /* This array is indexed by the high half of a status byte. It's */ /* value is either the number of bytes needed (1 or 2) for a channel */ /* message, or 0 (meaning it's not a channel message). */ static int chantype[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 through 0x70 */ 2, 2, 2, 2, 1, 1, 2, 0 /* 0x80 through 0xf0 */ }; long lookfor; int c, c1, type; int sysexcontinue = 0; /* 1 if last message was an unfinished sysex */ int running = 0; /* 1 when running status used */ int status = 0; /* status value (e.g. 0x90==note-on) */ int needed; if (readmt(mf, "MTrk") == EOF) return (0); mf->Mf_toberead = read32bit(mf); mf->Mf_currtime = 0; if (mf->Mf_trackstart) (*mf->Mf_trackstart) (mf); while (mf->Mf_toberead > 0) { mf->Mf_currtime += readvarinum(mf); /* delta time */ c = egetc(mf); if (sysexcontinue && c != 0xf7) mferror(mf, "didn't find expected continuation of a sysex"); if ((c & 0x80) == 0) { /* running status? */ if (status == 0) mferror(mf, "unexpected running status"); running = 1; } else { status = c; running = 0; } needed = chantype[(status >> 4) & 0xf]; if (needed) { /* ie. is it a channel message? */ if (running) c1 = c; else c1 = egetc(mf); chanmessage(mf, status, c1, (needed > 1) ? egetc(mf) : 0); continue;; } switch (c) { case 0xff: /* meta event */ type = egetc(mf); lookfor = mf->Mf_toberead - readvarinum(mf); msginit(mf); while (mf->Mf_toberead > lookfor) msgadd(mf, egetc(mf)); metaevent(mf, type); break; case 0xf0: /* start of system exclusive */ lookfor = mf->Mf_toberead - readvarinum(mf); msginit(mf); msgadd(mf, 0xf0); while (mf->Mf_toberead > lookfor) msgadd(mf, c = egetc(mf)); if (c == 0xf7 || mf->Mf_nomerge == 0) sysex(mf); else sysexcontinue = 1; /* merge into next msg */ break; case 0xf7: /* sysex continuation or arbitrary stuff */ lookfor = mf->Mf_toberead - readvarinum(mf); if (!sysexcontinue) msginit(mf); while (mf->Mf_toberead > lookfor) msgadd(mf, c = egetc(mf)); if (!sysexcontinue) { if (mf->Mf_arbitrary) (*mf->Mf_arbitrary) (mf, msgleng(mf), msg(mf)); } else if (c == 0xf7) { sysex(mf); sysexcontinue = 0; } break; default: badbyte(mf, c); break; } } if (mf->Mf_trackend) (*mf->Mf_trackend) (mf); return (1); } static void badbyte(struct MF *mf, int c) { char buff[32]; snprintf(buff, sizeof(buff), "unexpected byte: 0x%02x", c); mferror(mf, buff); } static void metaevent(struct MF *mf, int type) { int leng = msgleng(mf); char *m = msg(mf); switch (type) { case 0x00: if (mf->Mf_seqnum) (*mf->Mf_seqnum) (mf, to16bit(m[0], m[1])); break; case 0x01: /* Text event */ case 0x02: /* Copyright notice */ case 0x03: /* Sequence/Track name */ case 0x04: /* Instrument name */ case 0x05: /* Lyric */ case 0x06: /* Marker */ case 0x07: /* Cue point */ case 0x08: case 0x09: case 0x0a: case 0x0b: case 0x0c: case 0x0d: case 0x0e: case 0x0f: /* These are all text events */ if (mf->Mf_text) (*mf->Mf_text) (mf, type, leng, m); break; case 0x2f: /* End of Track */ if (mf->Mf_eot) (*mf->Mf_eot) (mf); break; case 0x51: /* Set tempo */ if (mf->Mf_tempo) (*mf->Mf_tempo) (mf, to32bit(0, m[0], m[1], m[2])); break; case 0x54: if (mf->Mf_smpte) (*mf->Mf_smpte) (mf, m[0], m[1], m[2], m[3], m[4]); break; case 0x58: if (mf->Mf_timesig) (*mf->Mf_timesig) (mf, m[0], m[1], m[2], m[3]); break; case 0x59: if (mf->Mf_keysig) (*mf->Mf_keysig) (mf, m[0], m[1]); break; case 0x7f: if (mf->Mf_seqspecific) (*mf->Mf_seqspecific) (mf, type, leng, m); break; default: if (mf->Mf_metamisc) (*mf->Mf_metamisc) (mf, type, leng, m); } } static void sysex(struct MF *mf) { if (mf->Mf_sysex) (*mf->Mf_sysex) (mf, msgleng(mf), msg(mf)); } static void chanmessage(struct MF *mf, int status, int c1, int c2) { int chan = status & 0xf; switch (status & 0xf0) { case 0x80: if (mf->Mf_noteoff) (*mf->Mf_noteoff) (mf, chan, c1, c2); break; case 0x90: if (mf->Mf_noteon) (*mf->Mf_noteon) (mf, chan, c1, c2); break; case 0xa0: if (mf->Mf_pressure) (*mf->Mf_pressure) (mf, chan, c1, c2); break; case 0xb0: if (mf->Mf_parameter) (*mf->Mf_parameter) (mf, chan, c1, c2); break; case 0xe0: if (mf->Mf_pitchbend) (*mf->Mf_pitchbend) (mf, chan, c1, c2); break; case 0xc0: if (mf->Mf_program) (*mf->Mf_program) (mf, chan, c1); break; case 0xd0: if (mf->Mf_chanpressure) (*mf->Mf_chanpressure) (mf, chan, c1); break; } } /* readvarinum - read a varying-length number, and return the */ /* number of characters it took. */ static long readvarinum(struct MF *mf) { long value; int c; c = egetc(mf); value = c; if (c & 0x80) { value &= 0x7f; do { c = egetc(mf); value = (value << 7) + (c & 0x7f); } while (c & 0x80); } return (value); } static long to32bit(int c1, int c2, int c3, int c4) { long value = 0L; value = (c1 & 0xff); value = (value << 8) + (c2 & 0xff); value = (value << 8) + (c3 & 0xff); value = (value << 8) + (c4 & 0xff); return (value); } static int to16bit(int c1, int c2) { return ((c1 & 0xff) << 8) + (c2 & 0xff); } static long read32bit(struct MF *mf) { int c1, c2, c3, c4; c1 = egetc(mf); c2 = egetc(mf); c3 = egetc(mf); c4 = egetc(mf); return to32bit(c1, c2, c3, c4); } static int read16bit(struct MF *mf) { int c1, c2; c1 = egetc(mf); c2 = egetc(mf); return to16bit(c1, c2); } /* static */ void mferror(struct MF *mf, char *s) { if (mf->Mf_error) (*mf->Mf_error) (mf, s); exit(1); } /* The code below allows collection of a system exclusive message of */ /* arbitrary length. The Msgbuff is expanded as necessary. The only */ /* visible data/routines are msginit(), msgadd(), msg(), msgleng(). */ #define MSGINCREMENT 128 static void msginit(struct MF *mf) { mf->Msgindex = 0; } static char *msg(struct MF *mf) { return (mf->Msgbuff); } static int msgleng(struct MF *mf) { return (mf->Msgindex); } static void msgadd(struct MF *mf, int c) { /* If necessary, allocate larger message buffer. */ if (mf->Msgindex >= mf->Msgsize) biggermsg(mf); mf->Msgbuff[mf->Msgindex++] = c; } static void biggermsg(struct MF *mf) { char *newmess; char *oldmess = mf->Msgbuff; int oldleng = mf->Msgsize; mf->Msgsize += MSGINCREMENT; newmess = (char *) malloc((unsigned) (sizeof(char) * mf->Msgsize)); if (newmess == NULL) mferror(mf, "malloc error!"); /* copy old message into larger new one */ if (oldmess != NULL) { register char *p = newmess; register char *q = oldmess; register char *endq = &oldmess[oldleng]; for (; q != endq; p++, q++) *p = *q; free(oldmess); } mf->Msgbuff = newmess; } /* * mfwrite() - The only fuction you'll need to call to write out * a midi file. * * format 0 - Single multi-channel track * 1 - Multiple simultaneous tracks * 2 - One or more sequentially independent * single track patterns * ntracks The number of tracks in the file. * division This is kind of tricky, it can represent two * things, depending on whether it is positive or negative * (bit 15 set or not). If bit 15 of division is zero, * bits 14 through 0 represent the number of delta-time * "ticks" which make up a quarter note. If bit 15 of * division is a one, delta-times in a file correspond to * subdivisions of a second similiar to SMPTE and MIDI * time code. In this format bits 14 through 8 contain * one of four values - 24, -25, -29, or -30, * corresponding to the four standard SMPTE and MIDI * time code frame per second formats, where -29 * represents 30 drop frame. The second byte * consisting of bits 7 through 0 corresponds the the * resolution within a frame. Refer the Standard MIDI * Files 1.0 spec for more details. * fp This should be the open file pointer to the file you * want to write. It will have be a global in order * to work with Mf_putc. */ void mfwrite(struct MF *mf, int format, int ntracks, int division) { int i; if (mf->Mf_putc == NULLFUNC) mferror(mf, "mfmf_write() called without setting Mf_putc"); if (mf->Mf_writetrack == NULLFUNC) mferror(mf, "mfmf_write() called without setting Mf_writetrack"); if (mf->Mf_getpos == NULLFUNC) mferror(mf, "mfmf_write() called without setting Mf_getpos"); if (mf->Mf_setpos == NULLFUNC) mferror(mf, "mfmf_write() called without setting Mf_setpos"); /* every MIDI file starts with a header */ mf_write_header_chunk(mf, format, ntracks, division); /* In format 1 files, the first track is a tempo map */ if (format == 1 && (mf->Mf_writetempotrack)) { (*mf->Mf_writetempotrack) (mf); } /* The rest of the file is a series of tracks */ for (i = 0; i < ntracks; i++) mf_write_track_chunk(mf, i); } static void mf_write_track_chunk(struct MF *mf, int which_track) { unsigned long trkhdr, trklength; long offset, place_marker; trkhdr = MTrk; trklength = 0; /* Remember where the length was written, because we don't know how long it will be until we've finished writing */ offset = (*mf->Mf_getpos) (mf); #ifdef DEBUG printf("offset = %d\n", (int) offset); #endif /* Write the track chunk header */ write32bit(mf, trkhdr); write32bit(mf, trklength); mf->Mf_numbyteswritten = 0L; /* the header's length doesn't count */ if (mf->Mf_writetrack) { (*mf->Mf_writetrack) (mf, which_track); } /* mf_write End of track meta event */ eputc(mf, 0); eputc(mf, meta_event); eputc(mf, end_of_track); eputc(mf, 0); /* It's impossible to know how long the track chunk will be beforehand, so the position of the track length data is kept so that it can be written after the chunk has been generated */ place_marker = (*mf->Mf_getpos) (mf); /* This method turned out not to be portable because the parameter returned from ftell is not guaranteed to be in bytes on every machine */ /* track.length = place_marker - offset - (long) sizeof(track); */ #ifdef DEBUG printf("length = %d\n", (int) trklength); #endif if (mf->Mf_setpos(mf, offset) < 0) mferror(mf, "error seeking during final stage of write"); trklength = mf->Mf_numbyteswritten; /* Re-mf_write the track chunk header with right length */ write32bit(mf, trkhdr); write32bit(mf, trklength); mf->Mf_setpos(mf, place_marker); } /* End gen_track_chunk() */ static void mf_write_header_chunk(struct MF *mf, int format, int ntracks, int division) { unsigned long ident, length; ident = MThd; /* Head chunk identifier */ length = 6; /* Chunk length */ /* individual bytes of the header must be written separately to preserve byte order across cpu types :-( */ write32bit(mf, ident); write32bit(mf, length); write16bit(mf, format); write16bit(mf, ntracks); write16bit(mf, division); } /* end gen_header_chunk() */ /* * mf_write_midi_event() * * Library routine to mf_write a single MIDI track event in the standard MIDI * file format. The format is: * * * * In this case, event can be any multi-byte midi message, such as * "note on", "note off", etc. * * delta_time - the time in ticks since the last event. * type - the type of meta event. * chan - The midi channel. * data - A pointer to a block of chars containing the META EVENT, * data. * size - The length of the meta-event data. */ int mf_write_midi_event(struct MF *mf, unsigned long delta_time, unsigned int type, unsigned int chan, unsigned char *data, unsigned long size) { int i; unsigned char c; WriteVarLen(mf, delta_time); /* all MIDI events start with the type in the first four bits, and the channel in the lower four bits */ c = type | chan; if (chan > 15) mferror(mf, "error: MIDI channel greater than 16\n"); eputc(mf, c); /* write out the data bytes */ for (i = 0; i < size; i++) eputc(mf, data[i]); return (size); } /* end mf_write MIDI event */ /* * mf_write_meta_event() * * Library routine to mf_write a single meta event in the standard MIDI * file format. The format of a meta event is: * * * * delta_time - the time in ticks since the last event. * type - the type of meta event. * data - A pointer to a block of chars containing the META EVENT, * data. * size - The length of the meta-event data. */ int mf_write_meta_event(struct MF *mf, unsigned long delta_time, unsigned char type, unsigned char *data, unsigned long size) { int i; WriteVarLen(mf, delta_time); /* This marks the fact we're writing a meta-event */ eputc(mf, meta_event); /* The type of meta event */ eputc(mf, type); /* The length of the data bytes to follow */ WriteVarLen(mf, size); for (i = 0; i < size; i++) { if (eputc(mf, data[i]) != data[i]) return (-1); } return (size); } /* end mf_write_meta_event */ void mf_write_tempo(struct MF *mf, unsigned long tempo) { /* Write tempo */ /* all tempos are written as 120 beats/minute, */ /* expressed in microseconds/quarter note */ eputc(mf, 0); eputc(mf, meta_event); eputc(mf, set_tempo); eputc(mf, 3); eputc(mf, (unsigned) (0xff & (tempo >> 16))); eputc(mf, (unsigned) (0xff & (tempo >> 8))); eputc(mf, (unsigned) (0xff & tempo)); } /* * Write multi-length bytes to MIDI format files */ static void WriteVarLen(struct MF *mf, unsigned long value) { unsigned long buffer; buffer = value & 0x7f; while ((value >>= 7) > 0) { buffer <<= 8; buffer |= 0x80; buffer += (value & 0x7f); } while (1) { eputc(mf, (unsigned) (buffer & 0xff)); if (buffer & 0x80) buffer >>= 8; else return; } } /* end of WriteVarLen */ /* * write32bit() * write16bit() * * These routines are used to make sure that the byte order of * the various data types remains constant between machines. This * helps make sure that the code will be portable from one system * to the next. It is slightly dangerous that it assumes that longs * have at least 32 bits and ints have at least 16 bits, but this * has been true at least on PCs, UNIX machines, and Macintosh's. * */ static void write32bit(struct MF *mf, unsigned long data) { eputc(mf, (unsigned) ((data >> 24) & 0xff)); eputc(mf, (unsigned) ((data >> 16) & 0xff)); eputc(mf, (unsigned) ((data >> 8) & 0xff)); eputc(mf, (unsigned) (data & 0xff)); } static void write16bit(struct MF *mf, int data) { eputc(mf, (unsigned) ((data & 0xff00) >> 8)); eputc(mf, (unsigned) (data & 0xff)); } /* write a single character and abort on error */ static int eputc(struct MF *mf, unsigned char c) { int return_val; if ((mf->Mf_putc) == NULLFUNC) { mferror(mf, "Mf_putc undefined"); return (-1); } return_val = (mf->Mf_putc) (mf, c); if (return_val == EOF) mferror(mf, "error writing"); mf->Mf_numbyteswritten++; return (return_val); } unsigned long mf_sec2ticks(float secs, int division, unsigned int tempo) { return (long) (((secs * 1000.0) / 4.0 * division) / tempo); } /* * This routine converts delta times in ticks into seconds. The * else statement is needed because the formula is different for tracks * based on notes and tracks based on SMPTE times. * */ float mf_ticks2sec(unsigned long ticks, int division, unsigned int tempo) { float smpte_format, smpte_resolution; if (division > 0) return ((float) (((float) (ticks) * (float) (tempo)) / ((float) (division) * 1000000.0))); else { smpte_format = upperbyte(division); smpte_resolution = lowerbyte(division); return (float) ((float) ticks / (smpte_format * smpte_resolution * 1000000.0)); } } /* end of ticks2sec() */ /* code to utilize the interface */ #define TRACE(x, y) do { if (x) printf y; } while (0) typedef unsigned long ulg; typedef unsigned char uch; typedef unsigned int ui; struct MFX { struct MF mfi; int division; int trackstate; int prevnoteonpitch; /* -1, nothing, 0 pause, 1-x note. */ ulg prevnoteontime; gn_ringtone *ringtone; FILE *istream; gn_error err; }; enum { TRK_NONE, TRK_READING, TRK_FINISHED }; static void lm_error(struct MF *mf, char *s); static int lm_getc(struct MF *mf); static void lm_header(struct MF *mf, int, int, int); static void lm_trackstart(struct MF *mf); static void lm_trackend(struct MF *mf); static void lm_tempo(struct MF *, long); static void lm_noteon(struct MF *, int, int, int); static void lm_noteoff(struct MF *, int, int, int); static void lm_error(struct MF *mf, char *s) { struct MFX *mfx = (struct MFX *) mf; if (mfx->err == GN_ERR_NONE) mfx->err = GN_ERR_WRONGDATAFORMAT; fprintf(stderr, "%s\n", s); } static int lm_getc(struct MF *mf) { struct MFX *mfx = (struct MFX *) mf; int ch; if ((ch = fgetc(mfx->istream)) == EOF) return -1; return ch; } static void lm_header(struct MF *mf, int format, int ntrks, int division) { struct MFX *mfx = (struct MFX *) mf; TRACE(0, ("lm_header(%p, %d, %d, %d)\n", mf, format, ntrks, division)); mfx->division = division; } /* this is just a quess */ static void lm_tempo(struct MF *mf, long tempo) { struct MFX *mfx = (struct MFX *) mf; TRACE(0, ("lm_tempo(%p, %ld)\n", mf, tempo)); if (mfx->trackstate != TRK_FINISHED) mfx->ringtone->tempo = 60000000 / tempo; } static void addnote(struct MFX *mfx, int pitch, int duration, int special) { gn_ringtone_note *note; int scale; int lengths[] = { 4, 8, 16, 32, 64, 128 }; /* c, c#, d, d#, e, f, f#, g, g#, a, a#, h */ int notes[] = { 0, 1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12 }; /* truncate the ringtone if it's too long */ if (mfx->ringtone->notes_count == GN_RINGTONE_MAX_NOTES-1) return; note = mfx->ringtone->notes + mfx->ringtone->notes_count; mfx->ringtone->notes_count++; if (pitch == 0) { /* pause */ note->note = 255; } else { pitch--; scale = pitch / 12; if (scale < 4) scale = 0; else if (scale > 7) scale = 3; else scale -= 4; note->note = 14 * (pitch / 12 - 4) + notes[pitch % 12]; } if (duration < sizeof(lengths) / sizeof(lengths[0])) note->duration = lengths[duration]; else note->duration = 4; if (special) note->duration *= 1.5; } /* currently supported */ static /* N 32 32. 16 16. 8 8. 4 4. 2 2. 1 1. */ int vals[] = { 15, 38, 54, 78, 109, 156, 218, 312, 437, 625, 875, 1250 }; static void writenote(struct MFX *mfx, int delta) { ulg millinotetime = delta * 250 / mfx->division; int i; int duration; int special; for (i = 0; i < sizeof vals / sizeof vals[0]; i++) { if (millinotetime < vals[i]) break; } if (i == 0) return; i--; duration = i / 2; special = i & 1; addnote(mfx, mfx->prevnoteonpitch, duration, special); /* XXX think this */ } static void lm_trackstart(struct MF *mf) { struct MFX *mfx = (struct MFX *) mf; TRACE(0, ("lm_trackstart(%p)\n", mf)); if (mfx->trackstate == TRK_NONE) mfx->trackstate = TRK_READING; mfx->prevnoteonpitch = -1; } static void lm_trackend(struct MF *mf) { struct MFX *mfx = (struct MFX *) mf; long time = mf->Mf_currtime; TRACE(0, ("lm_trackend(%p)\n", mf)); if (mfx->trackstate == TRK_READING && mfx->ringtone->notes_count > 0) mfx->trackstate = TRK_FINISHED; if (mfx->prevnoteonpitch >= 0) writenote(mfx, time - mfx->prevnoteontime); mfx->prevnoteonpitch = -1; } static void lm_noteon(struct MF *mf, int chan, int pitch, int vol) { struct MFX *mfx = (struct MFX *) mf; long time = mf->Mf_currtime; TRACE(0, ("lm_noteon(%p, %d, %d, %d)\n", mf, chan, pitch, vol)); if (vol == 0) /* kludge? to handle some (format 1? midi files) */ return; if (mfx->trackstate != TRK_READING) return; if (mfx->prevnoteonpitch >= 0) writenote(mfx, time - mfx->prevnoteontime); if (vol == 0) mfx->prevnoteonpitch = 0; else mfx->prevnoteonpitch = pitch + 1; mfx->prevnoteontime = time; } static void lm_noteoff(struct MF *mf, int chan, int pitch, int vol) { struct MFX *mfx = (struct MFX *) mf; long time = mf->Mf_currtime; TRACE(0, ("lm_noteoff(%p, %d, %d, %d)\n", mf, chan, pitch, vol)); if (mfx->prevnoteonpitch >= 0) { writenote(mfx, time - mfx->prevnoteontime); mfx->prevnoteonpitch = -1; } mfx->prevnoteonpitch = 0; mfx->prevnoteontime = time; } static int lm_putc(struct MF *mf, int c) { struct MFX *mfx = (struct MFX *) mf; return fputc(c, mfx->istream); } static long lm_getpos(struct MF *mf) { struct MFX *mfx = (struct MFX *) mf; return ftell(mfx->istream); } static int lm_setpos(struct MF *mf, long pos) { struct MFX *mfx = (struct MFX *) mf; return fseek(mfx->istream, pos, SEEK_SET); } static void lm_writetrack(struct MF *mf, int track) { struct MFX *mfx = (struct MFX *) mf; gn_ringtone_note *note; int i, delta; int volume = 100; char data[2]; int notes[] = {0, 1, 2, 3, 4, 4, 5, 6, 7, 8, 9, 10, 11, 11}; mf_write_tempo(mf, 60000000 / mfx->ringtone->tempo); for (i = 0; i < mfx->ringtone->notes_count; i++) { note = mfx->ringtone->notes + i; delta = note->duration * mfx->division / 32; if (note->note == 0xff) { data[0] = 0; data[1] = 0; mf_write_midi_event(mf, delta, note_off, 1, data, 2); } else { data[0] = 12 * (4 + note->note / 14) + notes[note->note % 14]; data[1] = volume; mf_write_midi_event(mf, 1, note_on, 1, data, 2); data[1] = 0; mf_write_midi_event(mf, delta, note_off, 1, data, 2); } } } gn_error file_midi_load(FILE * file, gn_ringtone * ringtone) { struct MFX mfxi; struct MF *mf; ringtone->location = 0; snprintf(ringtone->name, sizeof(ringtone->name), "GNOKII"); ringtone->tempo = 120; ringtone->notes_count = 0; memset(&mfxi, 0, sizeof(struct MFX)); mf = &mfxi.mfi; mfxi.ringtone = ringtone; mfxi.istream = file; mfxi.err = GN_ERR_NONE; /* set variables to their initial values */ mfxi.division = 0; mfxi.trackstate = TRK_NONE; mfxi.prevnoteonpitch = -1; mf->Mf_getc = lm_getc; mf->Mf_header = lm_header; mf->Mf_tempo = lm_tempo; mf->Mf_trackstart = lm_trackstart; mf->Mf_trackend = lm_trackend; mf->Mf_noteon = lm_noteon; mf->Mf_noteoff = lm_noteoff; mf->Mf_error = lm_error; midifile(mf); return mfxi.err; } gn_error file_midi_save(FILE * file, gn_ringtone * ringtone) { struct MFX mfxi; struct MF *mf; memset(&mfxi, 0, sizeof(struct MFX)); mf = &mfxi.mfi; mfxi.ringtone = ringtone; mfxi.istream = file; mfxi.err = GN_ERR_NONE; /* set variables to their initial values */ mfxi.division = 480; mf->Mf_putc = lm_putc; mf->Mf_getpos = lm_getpos; mf->Mf_setpos = lm_setpos; mf->Mf_writetrack = lm_writetrack; mf->Mf_writetempotrack = NULLFUNC; mf->Mf_error = lm_error; mfwrite(mf, 0, 1, mfxi.division); return mfxi.err; } gnokii-0.6.31/common/sms-nokia.c0000644000175000017500000000517611666163120014551 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings, Pavel Janik Copyright (C) 2002-2004 Pawel Kot Copyright (C) 2002 Ladis Michl, BORBELY Zoltan Various function used by Nokia in their SMS extension protocols. */ #include "config.h" #include #include "misc.h" #include "sms-nokia.h" #include "gnokii-internal.h" #include "gnokii.h" /** * PackSmartMessagePart - Adds Smart Message header to the certain part of the message * @msg: place to store the header * @size: size of the part * @type: type of the part * @first: indicator of the first part * * This function adds the header as specified in the Nokia Smart Messaging * Specification v3. */ int sms_nokia_smart_message_part_pack(unsigned char *msg, unsigned int size, unsigned int type, bool first) { unsigned char current = 0; if (first) msg[current++] = 0x30; /* SM version. Here 3.0 */ msg[current++] = type; msg[current++] = (size & 0xff00) >> 8; /* Length for picture part, hi */ msg[current++] = size & 0x00ff; /* length lo */ return current; } /* Returns used length */ int sms_nokia_text_encode(unsigned char *text, unsigned char *message, bool first) { int len, current = 0; /* FIXME: unicode length is not as simple as strlen */ int type = GN_SMS_MULTIPART_DEFAULT; len = strlen(text); current = sms_nokia_smart_message_part_pack(message, len, type, first); if (type == GN_SMS_MULTIPART_UNICODE) len = char_unicode_encode(message + current, text, strlen(text)); else memcpy(message + current, text, strlen(text)); current += len; return current; } int sms_nokia_bitmap_encode(gn_bmp *bitmap, unsigned char *message, bool first) { unsigned int current; /* FIXME: allow for the different sizes */ current = sms_nokia_smart_message_part_pack(message, 256, GN_SMS_MULTIPART_BITMAP, first); return gn_bmp_sms_encode(bitmap, message + current) + current; } gnokii-0.6.31/common/libfunctions.c0000644000175000017500000004151011666163120015337 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janík ml. Copyright (C) 2001 Chris Kemp Copyright (C) 2001-2011 Pawel Kot Copyright (C) 2002-2003 BORBELY Zoltan Copyright (C) 2002 Pavel Machek, Marcin Wiacek Copyright (C) 2006 Helge Deller Goal of this code is to provide a binary compatible layer to access libgnokii.so functions from external programs which are not part of this gnokii package. One of those external programs is e.g. the Mobile Phone import/export filter of the KDE Adressbook (kaddressbook). Helge Deller - April 2006 */ #if !defined(GNOKII_DEPRECATED) # define GNOKII_DEPRECATED /* do not warn about deprecated functions here */ #endif #include "config.h" #include "compat.h" #include "misc.h" #include "gnokii.h" #include "gnokii-internal.h" #ifdef ENABLE_NLS # include #endif /* this macro sets the "lasterror" code */ #define LASTERROR(state,nr) ((state->lasterror = nr)) /* do not delete the double brackets! */ /** * gn_lib_init: * * returns: GN_ERR_NONE on success, an error on failure * * Initializes the library for use by programs. * Call this function before any other in this library. */ GNOKII_API gn_error gn_lib_init() { static bool initialized = false; if (initialized == true) return GN_ERR_NONE; #ifdef ENABLE_NLS bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); #endif initialized = true; return GN_ERR_NONE; } GNOKII_API unsigned int gn_lib_version() { /* return the library version number at compile time of libgnokii */ return LIBGNOKII_VERSION; } static gn_error load_from_file(const char *configfile, const char *configname) { if (configfile && *configfile) return gn_cfg_file_read(configfile); else return gn_cfg_read_default(); } static gn_error load_from_memory(char **lines) { return gn_cfg_memory_read((const char **)lines); } static gn_error phoneprofile_load(const char *configname, gn_error error, struct gn_statemachine **state) { *state = NULL; if (error == GN_ERR_NONE) { /* allocate and initialize data structures */ *state = malloc(sizeof(**state)); if (*state) { memset(*state, 0, sizeof(**state)); /* Load the phone configuration */ error = gn_cfg_phone_load(configname, *state); } else { error = GN_ERR_MEMORYFULL; } } if (error != GN_ERR_NONE) { gn_lib_phoneprofile_free(state); gn_lib_library_free(); return error; } return LASTERROR((*state), GN_ERR_NONE); } GNOKII_API gn_error gn_lib_phoneprofile_load_from_file(const char *configfile, const char *configname, struct gn_statemachine **state) { gn_error error = GN_ERR_NONE; if (!gn_cfg_info) error = load_from_file(configfile, configname); return phoneprofile_load(configname, error, state); } GNOKII_API gn_error gn_lib_phoneprofile_load_from_external(char **lines, struct gn_statemachine **state) { gn_error error = GN_ERR_NONE; if (!gn_cfg_info) error = load_from_memory(lines); return phoneprofile_load(NULL, error, state); } GNOKII_API gn_error gn_lib_phoneprofile_load(const char *configname, struct gn_statemachine **state) { return gn_lib_phoneprofile_load_from_file(NULL, configname, state); } GNOKII_API gn_error gn_lib_phoneprofile_free( struct gn_statemachine **state ) { /* free data structure */ free(*state); *state = NULL; return GN_ERR_NONE; } GNOKII_API void gn_lib_library_free( void ) { if (gn_cfg_info) { gn_cfg_free_default(); } } /* return last error code */ GNOKII_API gn_error gn_lib_lasterror( struct gn_statemachine *state ) { if (state) return state->lasterror; else return GN_ERR_INTERNALERROR; } GNOKII_API gn_error gn_lib_phone_open( struct gn_statemachine *state ) { gn_error error; state->lockfile = NULL; /* should the device be locked with a lockfile ? */ if (state->config.use_locking) { state->lockfile = gn_device_lock(state->config.port_device); if (state->lockfile == NULL) { fprintf(stderr, _("Lock file error. Exiting.\n")); return LASTERROR(state, GN_ERR_LOCKED); } } /* Initialise the code for the GSM interface. */ error = gn_gsm_initialise(state); if (error != GN_ERR_NONE) { fprintf(stderr, _("Telephone interface init failed: %s\nQuitting.\n"), gn_error_print(error)); /* gn_device_unlock() removes lockfile if it was created and frees state->lockfile */ gn_device_unlock(state->lockfile); state->lockfile = NULL; return LASTERROR(state, error); } return LASTERROR(state, GN_ERR_NONE); } GNOKII_API gn_error gn_lib_phone_close( struct gn_statemachine *state ) { /* close phone connection */ gn_sm_functions(GN_OP_Terminate, NULL, state); /* gn_device_unlock() removes lockfile if it was created and frees state->lockfile */ gn_device_unlock(state->lockfile); state->lockfile = NULL; return LASTERROR(state, GN_ERR_NONE); } static gn_error gn_lib_get_phone_information( struct gn_statemachine *state ) { gn_data *data = &state->sm_data; const char *unknown = _("Unknown"); gn_error error; if (state->config.m_model[0]) return LASTERROR(state, GN_ERR_NONE); // identify phone gn_data_clear(data); data->model = state->config.m_model; data->manufacturer = state->config.m_manufacturer; data->revision = state->config.m_revision; data->imei = state->config.m_imei; error = gn_sm_functions(GN_OP_Identify, data, state); if (!data->model[0]) snprintf(data->model, GN_MODEL_MAX_LENGTH, "%s", unknown); if (!data->manufacturer[0]) snprintf(data->manufacturer, GN_MANUFACTURER_MAX_LENGTH, "%s", unknown); if (!data->revision[0]) snprintf(data->revision, GN_REVISION_MAX_LENGTH, "%s", unknown); if (!data->imei[0]) snprintf(data->imei, GN_IMEI_MAX_LENGTH, "%s", unknown); return LASTERROR(state, error); } /* ask phone for static information (model, version, manufacturer, revision and imei) */ GNOKII_API const char *gn_lib_get_phone_model( struct gn_statemachine *state ) { const char *aux; gn_lib_get_phone_information(state); aux = gn_model_get(state->config.m_model); /* e.g. 6310 */ if (aux) return aux; else return state->config.m_model; } GNOKII_API const char *gn_lib_get_phone_product_name( struct gn_statemachine *state ) { gn_lib_get_phone_information(state); return state->config.m_model; /* e.g. NPE-4 */ } GNOKII_API const char *gn_lib_get_phone_manufacturer( struct gn_statemachine *state ) { gn_lib_get_phone_information(state); return state->config.m_manufacturer; } GNOKII_API const char *gn_lib_get_phone_revision( struct gn_statemachine *state ) { gn_lib_get_phone_information(state); return state->config.m_revision; } GNOKII_API const char *gn_lib_get_phone_imei( struct gn_statemachine *state ) { gn_lib_get_phone_information(state); return state->config.m_imei; } GNOKII_API const char *gn_lib_cfg_get(const char *section, const char *key) { if (!gn_cfg_info) gn_cfg_read_default(); return gn_cfg_get(gn_cfg_info, section, key); } /* Phone addressbook functions */ GNOKII_API gn_error gn_lib_addressbook_memstat( struct gn_statemachine *state, const gn_memory_type memory_type, int *num_used, int *num_free ) { gn_error error; gn_memory_status memstat; gn_data *data = &state->sm_data; gn_data_clear(data); memset(&memstat, 0, sizeof(memstat)); memstat.memory_type = memory_type; data->memory_status = &memstat; error = gn_sm_functions(GN_OP_GetMemoryStatus, data, state); if (error == GN_ERR_NONE) { if (num_used) *num_used = memstat.used; if (num_free) *num_free = memstat.free; } return LASTERROR(state, error); } GNOKII_API gn_error gn_lib_phonebook_read_entry( struct gn_statemachine *state, const gn_memory_type memory_type, const int index ) { gn_error error; gn_data *data = &state->sm_data; state->u.pb_entry.memory_type = memory_type; state->u.pb_entry.location = index; data->phonebook_entry = &state->u.pb_entry; error = gn_sm_functions(GN_OP_ReadPhonebook, data, state); return LASTERROR(state, error); } GNOKII_API int gn_lib_phonebook_entry_isempty( struct gn_statemachine *state, const gn_memory_type memory_type, const int index ) { gn_error error; error = gn_lib_phonebook_read_entry(state, memory_type, index); if (error == GN_ERR_EMPTYLOCATION) return true; if (error == GN_ERR_NONE && state->u.pb_entry.empty) return true; return false; } /* after reading an entry with gn_lib_phonebook_read_entry() ask for the values of the phonebook entry */ GNOKII_API const char *gn_lib_get_pb_name( struct gn_statemachine *state ) { return state->u.pb_entry.name; } GNOKII_API const char *gn_lib_get_pb_number( struct gn_statemachine *state ) { return state->u.pb_entry.number; } GNOKII_API gn_phonebook_group_type gn_lib_get_pb_caller_group( struct gn_statemachine *state ) { return state->u.pb_entry.caller_group; } GNOKII_API gn_memory_type gn_lib_get_pb_memtype( struct gn_statemachine *state ) { return state->u.pb_entry.memory_type; } GNOKII_API int gn_lib_get_pb_location( struct gn_statemachine *state ) { return state->u.pb_entry.location; } GNOKII_API gn_timestamp gn_lib_get_pb_date( struct gn_statemachine *state ) { return state->u.pb_entry.date; } GNOKII_API int gn_lib_get_pb_num_subentries( struct gn_statemachine *state ) { return state->u.pb_entry.subentries_count; } GNOKII_API gn_error gn_lib_get_pb_subentry( struct gn_statemachine *state, const int index, gn_phonebook_entry_type *entry_type, gn_phonebook_number_type *number_type, const char **number ) { if (entry_type) *entry_type = state->u.pb_entry.subentries[index].entry_type; if (number_type) *number_type = state->u.pb_entry.subentries[index].number_type; if (number) *number = state->u.pb_entry.subentries[index].data.number; return LASTERROR(state, GN_ERR_NONE); } GNOKII_API gn_error gn_lib_phonebook_entry_delete( struct gn_statemachine *state, const gn_memory_type memory_type, const int index ) { gn_error error; gn_data *data = &state->sm_data; data->phonebook_entry = &state->u.pb_entry; memset(data->phonebook_entry, 0, sizeof(*data->phonebook_entry)); data->phonebook_entry->empty = 1; data->phonebook_entry->memory_type = memory_type; data->phonebook_entry->location = index; error = gn_sm_functions(GN_OP_WritePhonebook, data, state); return LASTERROR(state, error); } GNOKII_API gn_error gn_lib_phonebook_prepare_write_entry( struct gn_statemachine *state ) { gn_data *data = &state->sm_data; gn_data_clear(data); memset(&state->u, 0, sizeof(state->u)); return LASTERROR(state, GN_ERR_NONE); } GNOKII_API gn_error gn_lib_phonebook_write_entry( struct gn_statemachine *state, const gn_memory_type memory_type, const int index ) { gn_error error; gn_data *data = &state->sm_data; state->u.pb_entry.memory_type = memory_type; state->u.pb_entry.location = index; data->phonebook_entry = &state->u.pb_entry; error = gn_sm_functions(GN_OP_WritePhonebook, data, state); return LASTERROR(state, error); } GNOKII_API gn_error gn_lib_set_pb_name(struct gn_statemachine *state, const char *name) { snprintf(state->u.pb_entry.name, sizeof(state->u.pb_entry.name), "%s", name); return LASTERROR(state, GN_ERR_NONE); } GNOKII_API gn_error gn_lib_set_pb_number(struct gn_statemachine *state, const char *number) { snprintf(state->u.pb_entry.number, sizeof(state->u.pb_entry.number), "%s", number); return LASTERROR(state, GN_ERR_NONE); } GNOKII_API gn_error gn_lib_set_pb_caller_group( struct gn_statemachine *state, gn_phonebook_group_type grouptype ) { state->u.pb_entry.caller_group = grouptype; return LASTERROR(state, GN_ERR_NONE); } GNOKII_API gn_error gn_lib_set_pb_memtype( struct gn_statemachine *state, gn_memory_type memtype ) { state->u.pb_entry.memory_type = memtype; return LASTERROR(state, GN_ERR_NONE); } GNOKII_API gn_error gn_lib_set_pb_location( struct gn_statemachine *state, int location ) { state->u.pb_entry.location = location; return LASTERROR(state, GN_ERR_NONE); } GNOKII_API gn_error gn_lib_set_pb_date( struct gn_statemachine *state, gn_timestamp timestamp ) { state->u.pb_entry.date = timestamp; return LASTERROR(state, GN_ERR_NONE); } GNOKII_API gn_error gn_lib_set_pb_subentry(struct gn_statemachine *state, const int index, /* index=-1 appends it */ gn_phonebook_entry_type entry_type, gn_phonebook_number_type number_type, const char *number) { int i = (index==-1) ? gn_lib_get_pb_num_subentries(state) : index; if (i<0 || i>=GN_PHONEBOOK_SUBENTRIES_MAX_NUMBER) return LASTERROR(state, GN_ERR_INVALIDLOCATION); if (index == -1) ++state->u.pb_entry.subentries_count; state->u.pb_entry.subentries[i].entry_type = entry_type; state->u.pb_entry.subentries[i].number_type = number_type; snprintf(state->u.pb_entry.subentries[i].data.number, sizeof(state->u.pb_entry.subentries[i].data.number), "%s", number); return LASTERROR(state, GN_ERR_NONE); } /* helper functions */ GNOKII_API void gn_timestamp_set(gn_timestamp *dt, int year, int month, int day, int hour, int minute, int second, int timezone) { dt->year = year; dt->month = month; dt->day = day; dt->hour = hour; dt->minute = minute; dt->second = second; dt->timezone = timezone; } GNOKII_API void gn_timestamp_get(gn_timestamp *dt, int *year, int *month, int *day, int *hour, int *minute, int *second, int *timezone) { if (year) *year = dt->year; if (month) *month = dt->month; if (day) *day = dt->day; if (hour) *hour = dt->hour; if (minute) *minute = dt->minute; if (second) *second = dt->second; if (timezone) *timezone = dt->timezone; } static struct { gn_connection_type ct; const char *str; } connectiontypes[] = { { GN_CT_Serial, "serial" }, { GN_CT_DAU9P, "dau9p" }, { GN_CT_DLR3P, "dlr3p" }, { GN_CT_M2BUS, "m2bus" }, #ifdef HAVE_IRDA { GN_CT_Infrared, "infrared" }, { GN_CT_Irda, "irda" }, #endif #ifdef HAVE_BLUETOOTH { GN_CT_Bluetooth, "bluetooth" }, #endif { GN_CT_DLR3P, "dku5" }, { GN_CT_DKU2, "dku2" }, #ifdef HAVE_LIBUSB { GN_CT_DKU2LIBUSB, "dku2libusb" }, #endif #ifdef HAVE_PCSC { GN_CT_PCSC, "libpcsclite" }, { GN_CT_PCSC, "pcsc" }, #endif #ifndef WIN32 { GN_CT_TCP, "tcp" }, #endif { GN_CT_Tekram, "tekram" }, #ifdef HAVE_SOCKETPHONET { GN_CT_SOCKETPHONET, "phonet" }, #endif }; GNOKII_API gn_connection_type gn_get_connectiontype(const char *connection_type_string) { int i; for (i = 0; i < sizeof(connectiontypes)/sizeof(connectiontypes[0]); i++) if (!strcasecmp(connection_type_string, connectiontypes[i].str)) return connectiontypes[i].ct; return GN_CT_NONE; } GNOKII_API const char *gn_lib_get_supported_connection(const int num) { if (num < 0 || num >= sizeof(connectiontypes)/sizeof(connectiontypes[0])) return NULL; return connectiontypes[num].str; } GNOKII_API const char *gn_lib_get_connection_name(gn_connection_type ct) { int i; for (i = 0; i < sizeof(connectiontypes)/sizeof(connectiontypes[0]); i++) if (ct == connectiontypes[i].ct) return connectiontypes[i].str; return NULL; } GNOKII_API int gn_lib_is_connectiontype_supported(gn_connection_type ct) { switch (ct) { case GN_CT_Serial: case GN_CT_DAU9P: case GN_CT_DLR3P: case GN_CT_M2BUS: case GN_CT_Tekram: return 1; case GN_CT_Infrared: case GN_CT_Irda: #ifdef HAVE_IRDA return 1; #else return 0; #endif case GN_CT_Bluetooth: #ifdef HAVE_BLUETOOTH return 1; #else return 0; #endif case GN_CT_DKU2: /* FIXME: How to detect this? */ return 1; case GN_CT_DKU2LIBUSB: #ifdef HAVE_LIBUSB return 1; #else return 0; #endif case GN_CT_PCSC: #ifdef HAVE_PCSC return 1; #else return 0; #endif case GN_CT_TCP: #ifndef WIN32 return 0; #else return 1; #endif case GN_CT_SOCKETPHONET: #ifndef HAVE_SOCKETPHONET return 0; #else return 1; #endif default: return 0; } } GNOKII_API gn_error gn_lib_search_one_connected_phone(struct gn_statemachine **state) { /* allocate and initialize data structures */ *state = malloc(sizeof(**state)); if (!*state) return GN_ERR_MEMORYFULL; memset(*state, 0, sizeof(**state)); /* not yet implemented */ free(*state); *state = NULL; return GN_ERR_NOTIMPLEMENTED; } GNOKII_API gn_error gn_lib_phone_change_driver(struct gn_statemachine *state, const char* driver) { /* terminate the connection */ return_on_error(gn_lib_phone_close(state)); return_on_error(gn_lib_phoneprofile_free(&state)); /* change the driver */ return_on_error(gn_cfg_phone_load(driver, state)); /* initialize new connection */ return gn_lib_phone_open(state); } gnokii-0.6.31/common/gsm-bitmaps.c0000644000175000017500000002216011666163120015063 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999, 2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 2000 Marcin Wiacek Copyright (C) 2000-2001 Chris Kemp Copyright (C) 2001-2002 Markus Plail Copyright (C) 2001-2003 Pawel Kot Copyright (C) 2002 Pavel Machek Based on work from mygnokii, thanks go to Marcin Wiacek. Functions for common bitmap operations. */ #include "config.h" #include #include #include #include #include #include "compat.h" #include "misc.h" #include "gnokii.h" /* A few useful functions for bitmaps */ GNOKII_API gn_error gn_bmp_null(gn_bmp *bmp, gn_phone *info) { if (!bmp || !info) return GN_ERR_INTERNALERROR; snprintf(bmp->netcode, sizeof(bmp->netcode), "000 00"); bmp->width = info->operator_logo_width; bmp->height = info->operator_logo_height; bmp->size = ceiling_to_octet(bmp->width * bmp->height); gn_bmp_clear(bmp); return GN_ERR_NONE; } GNOKII_API void gn_bmp_point_set(gn_bmp *bmp, int x, int y) { switch (bmp->type) { case GN_BMP_NewOperatorLogo: case GN_BMP_StartupLogo: bmp->bitmap[((y / 8) * bmp->width) + x] |= 1 << (y % 8); break; /* Testing only! */ case GN_BMP_PictureMessage: bmp->bitmap[9 * y + (x / 8)] |= 1 << (7 - (x % 8)); break; case GN_BMP_EMSPicture: case GN_BMP_EMSAnimation: case GN_BMP_EMSAnimation2: case GN_BMP_OperatorLogo: case GN_BMP_CallerLogo: default: bmp->bitmap[(y * bmp->width + x) / 8] |= 1 << (7 - ((y * bmp->width + x) % 8)); break; } } GNOKII_API void gn_bmp_point_clear(gn_bmp *bmp, int x, int y) { switch (bmp->type) { case GN_BMP_StartupLogo: case GN_BMP_NewOperatorLogo: bmp->bitmap[((y / 8) * bmp->width) + x] &= ~(1 << (y % 8)); break; /* Testing only! */ case GN_BMP_PictureMessage: bmp->bitmap[9 * y + (x / 8)] &= ~(1 << (7 - (x % 8))); break; case GN_BMP_EMSPicture: case GN_BMP_EMSAnimation: case GN_BMP_EMSAnimation2: case GN_BMP_OperatorLogo: case GN_BMP_CallerLogo: default: bmp->bitmap[(y*bmp->width+x)/8] &= ~(1 << (7-((y*bmp->width+x)%8))); break; } } GNOKII_API int gn_bmp_point(gn_bmp *bmp, int x, int y) { int i = 0; switch (bmp->type) { case GN_BMP_OperatorLogo: case GN_BMP_CallerLogo: i = (bmp->bitmap[(y * bmp->width + x) / 8] & 1 << (7-((y * bmp->width + x) % 8))); break; case GN_BMP_PictureMessage: i = (bmp->bitmap[9 * y + (x / 8)] & 1 << (7 - (x % 8))); break; case GN_BMP_StartupLogo: case GN_BMP_NewOperatorLogo: i = (bmp->bitmap[((y / 8) * bmp->width) + x] & 1 << (y % 8)); break; default: /* Let's guess */ i = (bmp->bitmap[(y * bmp->width + x) / 8] & 1 << (7-((y * bmp->width + x) % 8))); break; } return ((i == 0) ? false : true); } GNOKII_API void gn_bmp_clear(gn_bmp *bmp) { if (bmp) memset(bmp->bitmap, 0, (bmp->size > GN_BMP_MAX_SIZE) ? GN_BMP_MAX_SIZE : bmp->size); } GNOKII_API void gn_bmp_resize(gn_bmp *bitmap, gn_bmp_types target, gn_phone *info) { gn_bmp backup; int x, y, copywidth, copyheight; /* Copy into the backup */ memcpy(&backup, bitmap, sizeof(gn_bmp)); switch (target) { case GN_BMP_StartupLogo: bitmap->width = info->startup_logo_width; bitmap->height = info->startup_logo_height; if (info->models && ((!strncmp(info->models, "6510", 4)) || (!strncmp(info->models, "7110", 4)))) bitmap->size = ceiling_to_octet(bitmap->height) * bitmap->width; else bitmap->size = ceiling_to_octet(bitmap->height * bitmap->width); break; case GN_BMP_NewOperatorLogo: bitmap->width = info->operator_logo_width; bitmap->height = info->operator_logo_height; bitmap->size = ceiling_to_octet(bitmap->height) * bitmap->width; break; case GN_BMP_OperatorLogo: bitmap->width = info->operator_logo_width; bitmap->height = info->operator_logo_height; bitmap->size = ceiling_to_octet(bitmap->height * bitmap->width); break; case GN_BMP_CallerLogo: bitmap->width = info->caller_logo_width; bitmap->height = info->caller_logo_height; bitmap->size = ceiling_to_octet(bitmap->height * bitmap->width); break; case GN_BMP_PictureMessage: bitmap->width = 72; bitmap->height = 48; bitmap->size = ceiling_to_octet(bitmap->height * bitmap->width); break; default: bitmap->width = 0; bitmap->height = 0; bitmap->size = ceiling_to_octet(bitmap->height * bitmap->width); break; } bitmap->type = target; if (backup.width > bitmap->width) { copywidth = bitmap->width; dprintf("We lost some part of image - it's cut (width from %i to %i) !\n", backup.width, bitmap->width); } else copywidth = backup.width; if (backup.height > bitmap->height) { copyheight = bitmap->height; dprintf("We lost some part of image - it's cut (height from %i to %i) !\n", backup.height, bitmap->height); } else copyheight = backup.height; gn_bmp_clear(bitmap); for (y = 0; y < copyheight; y++) { for (x = 0; x < copywidth; x++) if (gn_bmp_point(&backup, x, y)) gn_bmp_point_set(bitmap, x, y); } } GNOKII_API void gn_bmp_print(gn_bmp *bitmap, FILE *f) { int x, y; for (y = 0; y < bitmap->height; y++) { for (x = 0; x < bitmap->width; x++) { if (gn_bmp_point(bitmap, x, y)) { fprintf(f, "#"); } else { fprintf(f, " "); } } fprintf(f, "\n"); } } GNOKII_API gn_error gn_bmp_sms_read(int type, unsigned char *message, unsigned char *code, gn_bmp *bitmap) { int offset = 0; bitmap->type = type; switch (type) { case GN_BMP_PictureMessage: offset = 2; break; case GN_BMP_OperatorLogo: if (!code) return GN_ERR_UNKNOWN; bitmap->netcode[0] = '0' + (message[0] & 0x0f); bitmap->netcode[1] = '0' + (message[0] >> 4); bitmap->netcode[2] = '0' + (message[1] & 0x0f); bitmap->netcode[3] = ' '; bitmap->netcode[4] = '0' + (message[2] & 0x0f); bitmap->netcode[5] = '0' + (message[2] >> 4); bitmap->netcode[6] = 0; break; case GN_BMP_CallerLogo: break; default: /* error */ return GN_ERR_UNKNOWN; } bitmap->width = message[0]; bitmap->height = message[1]; bitmap->size = ceiling_to_octet(bitmap->width * bitmap->height); memcpy(bitmap->bitmap, message + offset + 2, bitmap->size); dprintf("Bitmap from SMS: width %i, height %i\n", bitmap->width, bitmap->height); return GN_ERR_NONE; } /* Returns message length */ GNOKII_API int gn_bmp_sms_encode(gn_bmp *bitmap, unsigned char *message) { unsigned int current = 0; switch (bitmap->type) { case GN_BMP_OperatorLogo: /* Set the network code */ dprintf("Operator Logo\n"); message[current++] = ((bitmap->netcode[1] & 0x0f) << 4) | (bitmap->netcode[0] & 0xf); message[current++] = 0xf0 | (bitmap->netcode[2] & 0x0f); message[current++] = ((bitmap->netcode[5] & 0x0f) << 4) | (bitmap->netcode[4] & 0xf); break; case GN_BMP_PictureMessage: dprintf("Picture Image\n"); /* Set the logo size */ message[current++] = 0x00; message[current++] = bitmap->width; message[current++] = bitmap->height; message[current++] = 0x01; memcpy(message + current, bitmap->bitmap, bitmap->size); current = current + bitmap->size; return current; case GN_BMP_EMSPicture: dprintf("EMS picture\n"); if (bitmap->width % 8) { dprintf("EMS needs bitmap size 8, 16, 24, ... \n"); return GN_ERR_NOTSUPPORTED; } message[current++] = bitmap->width / 8 * bitmap->height + 5; message[current++] = 0x12; /* Picture code */ message[current++] = bitmap->width / 8 * bitmap->height + 3; /* Picture size */; message[current++] = 0; /* Position in text this picture is at */ message[current++] = bitmap->width / 8; /* Horizontal size / 8 */ message[current++] = bitmap->height; break; case GN_BMP_EMSAnimation: dprintf("EMS animation\n"); message[current++] = 128 + 3; message[current++] = 0x0e; /* Animation code */ message[current++] = 128 + 1; /* Picture size */; message[current++] = 0x00; /* Position where to display */ case GN_BMP_EMSAnimation2: dprintf("(without header)\n"); if (bitmap->width != 16) { dprintf("EMS animation needs bitmap 16x16 ... \n"); return GN_ERR_NOTSUPPORTED; } break; default: /* error */ dprintf("gulp?\n"); break; } switch (bitmap->type) { case GN_BMP_EMSPicture: case GN_BMP_EMSAnimation: case GN_BMP_EMSAnimation2: break; default: /* Add common nokia headers */ /* Info field */ message[current++] = 0x00; /* Logo size */ message[current++] = bitmap->width; message[current++] = bitmap->height; /* Number of colors */ message[current++] = 0x01; } memcpy(message + current, bitmap->bitmap, bitmap->size); current += bitmap->size; return current; } gnokii-0.6.31/common/snprintf.c0000644000175000017500000005441411666163120014512 0ustar leoleo/* * Copyright Patrick Powell 1995 * This code is based on code written by Patrick Powell (papowell@astart.com) * It may be used for any purpose as long as this notice remains intact * on all source code distributions */ /************************************************************** * Original: * Patrick Powell Tue Apr 11 09:48:21 PDT 1995 * A bombproof version of doprnt (dopr) included. * Sigh. This sort of thing is always nasty do deal with. Note that * the version here does not include floating point... * * snprintf() is used instead of sprintf() as it does limit checks * for string length. This covers a nasty loophole. * * The other functions are there to prevent NULL pointers from * causing nast effects. * * More Recently: * Brandon Long 9/15/96 for mutt 0.43 * This was ugly. It is still ugly. I opted out of floating point * numbers, but the formatter understands just about everything * from the normal C string format, at least as far as I can tell from * the Solaris 2.5 printf(3S) man page. * * Brandon Long 10/22/97 for mutt 0.87.1 * Ok, added some minimal floating point support, which means this * probably requires libm on most operating systems. Don't yet * support the exponent (e,E) and sigfig (g,G). Also, fmtint() * was pretty badly broken, it just wasn't being exercised in ways * which showed it, so that's been fixed. Also, formated the code * to mutt conventions, and removed dead code left over from the * original. Also, there is now a builtin-test, just compile with: * gcc -DTEST_SNPRINTF -o snprintf snprintf.c -lm * and run snprintf for results. * * Thomas Roessler 01/27/98 for mutt 0.89i * The PGP code was using unsigned hexadecimal formats. * Unfortunately, unsigned formats simply didn't work. * * Michael Elkins 03/05/98 for mutt 0.90.8 * The original code assumed that both snprintf() and vsnprintf() were * missing. Some systems only have snprintf() but not vsnprintf(), so * the code is now broken down under HAVE_SNPRINTF and HAVE_VSNPRINTF. * * Andrew Tridgell (tridge@samba.org) Oct 1998 * fixed handling of %.0f * added test for HAVE_LONG_DOUBLE * * tridge@samba.org, idra@samba.org, April 2001 * got rid of fcvt code (twas buggy and made testing harder) * added C99 semantics * **************************************************************/ #ifndef NO_CONFIG_H /* for some tests */ # include "config.h" #endif #include "compat.h" #define snprintf __dummy_snprintf #if defined(WIN32) && !defined(CYGWIN) # include # include #endif #ifdef HAVE_STRING_H # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_CTYPE_H # include #endif #include #ifdef HAVE_STDARG_H # include #endif #ifdef HAVE_STDLIB_H # include #endif #undef snprintf #if defined(HAVE_SNPRINTF) && defined(HAVE_VSNPRINTF) && defined(HAVE_C99_VSNPRINTF) /* only include stdio.h if we are not re-defining snprintf or vsnprintf */ # include /* make the compiler happy with an empty file */ void dummy_snprintf(void) {} #else #ifdef HAVE_LONG_DOUBLE #define LDOUBLE long double #else #define LDOUBLE double #endif #ifdef HAVE_LONG_LONG_INT #define LLONG long long #else #define LLONG long #endif /* free memory if the pointer is valid and zero the pointer */ #ifndef SAFE_FREE #define SAFE_FREE(x) do { if ((x) != NULL) {free((x)); (x)=NULL;} } while(0) #endif static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list args); static void fmtstr(char *buffer, size_t *currlen, size_t maxlen, char *value, int flags, int min, int max); static void fmtint(char *buffer, size_t *currlen, size_t maxlen, long value, int base, int min, int max, int flags); static void fmtfp(char *buffer, size_t *currlen, size_t maxlen, LDOUBLE fvalue, int min, int max, int flags); static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c); /* * dopr(): poor man's version of doprintf */ /* format read states */ #define DP_S_DEFAULT 0 #define DP_S_FLAGS 1 #define DP_S_MIN 2 #define DP_S_DOT 3 #define DP_S_MAX 4 #define DP_S_MOD 5 #define DP_S_CONV 6 #define DP_S_DONE 7 /* format flags - Bits */ #define DP_F_MINUS (1 << 0) #define DP_F_PLUS (1 << 1) #define DP_F_SPACE (1 << 2) #define DP_F_NUM (1 << 3) #define DP_F_ZERO (1 << 4) #define DP_F_UP (1 << 5) #define DP_F_UNSIGNED (1 << 6) /* Conversion Flags */ #define DP_C_SHORT 1 #define DP_C_LONG 2 #define DP_C_LDOUBLE 3 #define DP_C_LLONG 4 #define char_to_int(p) ((p)- '0') #ifndef MAX #define MAX(p,q) (((p) >= (q)) ? (p) : (q)) #endif static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list args) { char ch; LLONG value; LDOUBLE fvalue; char *strvalue; int min; int max; int state; int flags; int cflags; size_t currlen; state = DP_S_DEFAULT; currlen = flags = cflags = min = 0; max = -1; ch = *format++; while (state != DP_S_DONE) { if (ch == '\0') state = DP_S_DONE; switch(state) { case DP_S_DEFAULT: if (ch == '%') state = DP_S_FLAGS; else dopr_outch (buffer, &currlen, maxlen, ch); ch = *format++; break; case DP_S_FLAGS: switch (ch) { case '-': flags |= DP_F_MINUS; ch = *format++; break; case '+': flags |= DP_F_PLUS; ch = *format++; break; case ' ': flags |= DP_F_SPACE; ch = *format++; break; case '#': flags |= DP_F_NUM; ch = *format++; break; case '0': flags |= DP_F_ZERO; ch = *format++; break; default: state = DP_S_MIN; break; } break; case DP_S_MIN: if (isdigit((unsigned char)ch)) { min = 10*min + char_to_int (ch); ch = *format++; } else if (ch == '*') { min = va_arg (args, int); ch = *format++; state = DP_S_DOT; } else { state = DP_S_DOT; } break; case DP_S_DOT: if (ch == '.') { state = DP_S_MAX; ch = *format++; } else { state = DP_S_MOD; } break; case DP_S_MAX: if (isdigit((unsigned char)ch)) { if (max < 0) max = 0; max = 10*max + char_to_int (ch); ch = *format++; } else if (ch == '*') { max = va_arg (args, int); ch = *format++; state = DP_S_MOD; } else { state = DP_S_MOD; } break; case DP_S_MOD: switch (ch) { case 'h': cflags = DP_C_SHORT; ch = *format++; break; case 'l': cflags = DP_C_LONG; ch = *format++; if (ch == 'l') { /* It's a long long */ cflags = DP_C_LLONG; ch = *format++; } break; case 'L': cflags = DP_C_LDOUBLE; ch = *format++; break; default: break; } state = DP_S_CONV; break; case DP_S_CONV: switch (ch) { case 'd': case 'i': if (cflags == DP_C_SHORT) value = va_arg (args, int); else if (cflags == DP_C_LONG) value = va_arg (args, long int); else if (cflags == DP_C_LLONG) value = va_arg (args, LLONG); else value = va_arg (args, int); fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags); break; case 'o': flags |= DP_F_UNSIGNED; if (cflags == DP_C_SHORT) value = va_arg (args, unsigned int); else if (cflags == DP_C_LONG) value = (long)va_arg (args, unsigned long int); else if (cflags == DP_C_LLONG) value = (long)va_arg (args, unsigned LLONG); else value = (long)va_arg (args, unsigned int); fmtint (buffer, &currlen, maxlen, value, 8, min, max, flags); break; case 'u': flags |= DP_F_UNSIGNED; if (cflags == DP_C_SHORT) value = va_arg (args, unsigned int); else if (cflags == DP_C_LONG) value = (long)va_arg (args, unsigned long int); else if (cflags == DP_C_LLONG) value = (LLONG)va_arg (args, unsigned LLONG); else value = (long)va_arg (args, unsigned int); fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags); break; case 'X': flags |= DP_F_UP; case 'x': flags |= DP_F_UNSIGNED; if (cflags == DP_C_SHORT) value = va_arg (args, unsigned int); else if (cflags == DP_C_LONG) value = (long)va_arg (args, unsigned long int); else if (cflags == DP_C_LLONG) value = (LLONG)va_arg (args, unsigned LLONG); else value = (long)va_arg (args, unsigned int); fmtint (buffer, &currlen, maxlen, value, 16, min, max, flags); break; case 'f': if (cflags == DP_C_LDOUBLE) fvalue = va_arg (args, LDOUBLE); else fvalue = va_arg (args, double); /* um, floating point? */ fmtfp (buffer, &currlen, maxlen, fvalue, min, max, flags); break; case 'E': flags |= DP_F_UP; case 'e': if (cflags == DP_C_LDOUBLE) fvalue = va_arg (args, LDOUBLE); else fvalue = va_arg (args, double); break; case 'G': flags |= DP_F_UP; case 'g': if (cflags == DP_C_LDOUBLE) fvalue = va_arg (args, LDOUBLE); else fvalue = va_arg (args, double); break; case 'c': dopr_outch (buffer, &currlen, maxlen, va_arg (args, int)); break; case 's': strvalue = va_arg (args, char *); if (!strvalue) strvalue = "(NULL)"; if (max == -1) { max = strlen(strvalue); } if (min > 0 && max >= 0 && min > max) max = min; fmtstr (buffer, &currlen, maxlen, strvalue, flags, min, max); break; case 'p': strvalue = va_arg (args, void *); fmtint (buffer, &currlen, maxlen, (long) strvalue, 16, min, max, flags); break; case 'n': if (cflags == DP_C_SHORT) { short int *num; num = va_arg (args, short int *); *num = currlen; } else if (cflags == DP_C_LONG) { long int *num; num = va_arg (args, long int *); *num = (long int)currlen; } else if (cflags == DP_C_LLONG) { LLONG *num; num = va_arg (args, LLONG *); *num = (LLONG)currlen; } else { int *num; num = va_arg (args, int *); *num = currlen; } break; case '%': dopr_outch (buffer, &currlen, maxlen, ch); break; case 'w': /* not supported yet, treat as next char */ ch = *format++; break; default: /* Unknown, skip */ break; } ch = *format++; state = DP_S_DEFAULT; flags = cflags = min = 0; max = -1; break; case DP_S_DONE: break; default: /* hmm? */ break; /* some picky compilers need this */ } } if (maxlen != 0) { if (currlen < maxlen - 1) buffer[currlen] = '\0'; else if (maxlen > 0) buffer[maxlen - 1] = '\0'; } return currlen; } static void fmtstr(char *buffer, size_t *currlen, size_t maxlen, char *value, int flags, int min, int max) { int padlen, strln; /* amount to pad */ int cnt = 0; #ifdef DEBUG_SNPRINTF printf("fmtstr min=%d max=%d s=[%s]\n", min, max, value); #endif if (value == 0) { value = ""; } for (strln = 0; value[strln]; ++strln); /* strlen */ padlen = min - strln; if (padlen < 0) padlen = 0; if (flags & DP_F_MINUS) padlen = -padlen; /* Left Justify */ while ((padlen > 0) && (cnt < max)) { dopr_outch (buffer, currlen, maxlen, ' '); --padlen; ++cnt; } while (*value && (cnt < max)) { dopr_outch (buffer, currlen, maxlen, *value++); ++cnt; } while ((padlen < 0) && (cnt < max)) { dopr_outch (buffer, currlen, maxlen, ' '); ++padlen; ++cnt; } } /* Have to handle DP_F_NUM (ie 0x and 0 alternates) */ static void fmtint(char *buffer, size_t *currlen, size_t maxlen, long value, int base, int min, int max, int flags) { int signvalue = 0; unsigned long uvalue; char convert[20]; int place = 0; int spadlen = 0; /* amount to space pad */ int zpadlen = 0; /* amount to zero pad */ int caps = 0; if (max < 0) max = 0; uvalue = value; if(!(flags & DP_F_UNSIGNED)) { if( value < 0 ) { signvalue = '-'; uvalue = -value; } else { if (flags & DP_F_PLUS) /* Do a sign (+/i) */ signvalue = '+'; else if (flags & DP_F_SPACE) signvalue = ' '; } } if (flags & DP_F_UP) caps = 1; /* Should characters be upper case? */ do { convert[place++] = (caps? "0123456789ABCDEF":"0123456789abcdef") [uvalue % (unsigned)base ]; uvalue = (uvalue / (unsigned)base ); } while(uvalue && (place < 20)); if (place == 20) place--; convert[place] = 0; zpadlen = max - place; spadlen = min - MAX (max, place) - (signvalue ? 1 : 0); if (zpadlen < 0) zpadlen = 0; if (spadlen < 0) spadlen = 0; if (flags & DP_F_ZERO) { zpadlen = MAX(zpadlen, spadlen); spadlen = 0; } if (flags & DP_F_MINUS) spadlen = -spadlen; /* Left Justifty */ #ifdef DEBUG_SNPRINTF printf("zpad: %d, spad: %d, min: %d, max: %d, place: %d\n", zpadlen, spadlen, min, max, place); #endif /* Spaces */ while (spadlen > 0) { dopr_outch (buffer, currlen, maxlen, ' '); --spadlen; } /* Sign */ if (signvalue) dopr_outch (buffer, currlen, maxlen, signvalue); /* Zeros */ if (zpadlen > 0) { while (zpadlen > 0) { dopr_outch (buffer, currlen, maxlen, '0'); --zpadlen; } } /* Digits */ while (place > 0) dopr_outch (buffer, currlen, maxlen, convert[--place]); /* Left Justified spaces */ while (spadlen < 0) { dopr_outch (buffer, currlen, maxlen, ' '); ++spadlen; } } static LDOUBLE abs_val(LDOUBLE value) { LDOUBLE result = value; if (value < 0) result = -value; return result; } static LDOUBLE POW10(int exp) { LDOUBLE result = 1; while (exp) { result *= 10; exp--; } return result; } static LLONG ROUND(LDOUBLE value) { LLONG intpart; intpart = (LLONG)value; value = value - intpart; if (value >= 0.5) intpart++; return intpart; } /* a replacement for modf that doesn't need the math library. Should be portable, but slow */ static double my_modf(double x0, double *iptr) { int i; long l; double x = x0; double f = 1.0; for (i=0;i<100;i++) { l = (long)x; if (l <= (x+1) && l >= (x-1)) break; x *= 0.1; f *= 10.0; } if (i == 100) { /* yikes! the number is beyond what we can handle. What do we do? */ (*iptr) = 0; return 0; } if (i != 0) { double i2; double ret; ret = my_modf(x0-l*f, &i2); (*iptr) = l*f + i2; return ret; } (*iptr) = l; return x - (*iptr); } static void fmtfp (char *buffer, size_t *currlen, size_t maxlen, LDOUBLE fvalue, int min, int max, int flags) { int signvalue = 0; double ufvalue; char iconvert[311]; char fconvert[311]; int iplace = 0; int fplace = 0; int padlen = 0; /* amount to pad */ int zpadlen = 0; int caps = 0; int index; double intpart; double fracpart; double temp; /* * AIX manpage says the default is 0, but Solaris says the default * is 6, and sprintf on AIX defaults to 6 */ if (max < 0) max = 6; ufvalue = abs_val (fvalue); if (fvalue < 0) { signvalue = '-'; } else { if (flags & DP_F_PLUS) { /* Do a sign (+/i) */ signvalue = '+'; } else { if (flags & DP_F_SPACE) signvalue = ' '; } } #if 0 if (flags & DP_F_UP) caps = 1; /* Should characters be upper case? */ #endif #if 0 if (max == 0) ufvalue += 0.5; /* if max = 0 we must round */ #endif /* * Sorry, we only support 16 digits past the decimal because of our * conversion method */ if (max > 16) max = 16; /* We "cheat" by converting the fractional part to integer by * multiplying by a factor of 10 */ temp = ufvalue; my_modf(temp, &intpart); fracpart = ROUND((POW10(max)) * (ufvalue - intpart)); if (fracpart >= POW10(max)) { intpart++; fracpart -= POW10(max); } /* Convert integer part */ do { temp = intpart; my_modf(intpart*0.1, &intpart); temp = temp*0.1; index = (int) ((temp -intpart +0.05)* 10.0); /* index = (int) (((double)(temp*0.1) -intpart +0.05) *10.0); */ /* printf ("%llf, %f, %x\n", temp, intpart, index); */ iconvert[iplace++] = (caps? "0123456789ABCDEF":"0123456789abcdef")[index]; } while (intpart && (iplace < 311)); if (iplace == 311) iplace--; iconvert[iplace] = 0; /* Convert fractional part */ if (fracpart) { do { temp = fracpart; my_modf(fracpart*0.1, &fracpart); temp = temp*0.1; index = (int) ((temp -fracpart +0.05)* 10.0); /* index = (int) ((((temp/10) -fracpart) +0.05) *10); */ /* printf ("%lf, %lf, %ld\n", temp, fracpart, index); */ fconvert[fplace++] = (caps? "0123456789ABCDEF":"0123456789abcdef")[index]; } while(fracpart && (fplace < 311)); if (fplace == 311) fplace--; } fconvert[fplace] = 0; /* -1 for decimal point, another -1 if we are printing a sign */ padlen = min - iplace - max - 1 - ((signvalue) ? 1 : 0); zpadlen = max - fplace; if (zpadlen < 0) zpadlen = 0; if (padlen < 0) padlen = 0; if (flags & DP_F_MINUS) padlen = -padlen; /* Left Justifty */ if ((flags & DP_F_ZERO) && (padlen > 0)) { if (signvalue) { dopr_outch (buffer, currlen, maxlen, signvalue); --padlen; signvalue = 0; } while (padlen > 0) { dopr_outch (buffer, currlen, maxlen, '0'); --padlen; } } while (padlen > 0) { dopr_outch (buffer, currlen, maxlen, ' '); --padlen; } if (signvalue) dopr_outch (buffer, currlen, maxlen, signvalue); while (iplace > 0) dopr_outch (buffer, currlen, maxlen, iconvert[--iplace]); #ifdef DEBUG_SNPRINTF printf("fmtfp: fplace=%d zpadlen=%d\n", fplace, zpadlen); #endif /* * Decimal point. This should probably use locale to find the correct * char to print out. */ if (max > 0) { dopr_outch (buffer, currlen, maxlen, '.'); while (fplace > 0) dopr_outch (buffer, currlen, maxlen, fconvert[--fplace]); } while (zpadlen > 0) { dopr_outch (buffer, currlen, maxlen, '0'); --zpadlen; } while (padlen < 0) { dopr_outch (buffer, currlen, maxlen, ' '); ++padlen; } } static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c) { if (*currlen < maxlen) { buffer[(*currlen)] = c; } (*currlen)++; } /* yes this really must be a ||. Don't muck with this (tridge) */ #if !defined(HAVE_VSNPRINTF) || !defined(HAVE_C99_VSNPRINTF) int vsnprintf (char *str, size_t count, const char *fmt, va_list args) { return dopr(str, count, fmt, args); } #endif /* yes this really must be a ||. Don't muck wiith this (tridge) * * The logic for these two is that we need our own definition if the * OS *either* has no definition of *sprintf, or if it does have one * that doesn't work properly according to the autoconf test. Perhaps * these should really be smb_snprintf to avoid conflicts with buggy * linkers? -- mbp */ #if !defined(HAVE_SNPRINTF) || !defined(HAVE_C99_SNPRINTF) int snprintf(char *str,size_t count,const char *fmt,...) { size_t ret; va_list ap; va_start(ap, fmt); ret = vsnprintf(str, count, fmt, ap); va_end(ap); #ifdef WIN32 str[count-1] = 0; /* Windows vsnprintf does NOT truncate str. We do it manually. */ #endif return ret; } #endif #endif #ifndef HAVE_VASPRINTF int vasprintf(char **ptr, const char *format, va_list ap) { int ret; ret = vsnprintf(NULL, 0, format, ap); if (ret <= 0) return ret; (*ptr) = (char *)malloc(ret+1); if (!*ptr) return -1; ret = vsnprintf(*ptr, ret+1, format, ap); return ret; } #endif #ifndef HAVE_ASPRINTF int asprintf(char **ptr, const char *format, ...) { va_list ap; int ret; *ptr = NULL; va_start(ap, format); ret = vasprintf(ptr, format, ap); va_end(ap); return ret; } #endif #ifndef HAVE_VSYSLOG #ifdef HAVE_SYSLOG void vsyslog (int facility_priority, char *format, va_list arglist) { char *msg = NULL; vasprintf(&msg, format, arglist); if (!msg) return; syslog(facility_priority, "%s", msg); SAFE_FREE(msg); } #endif /* HAVE_SYSLOG */ #endif /* HAVE_VSYSLOG */ #ifdef TEST_SNPRINTF int sprintf(char *str,const char *fmt,...); int main (void) { char buf1[1024]; char buf2[1024]; char *fp_fmt[] = { "%1.1f", "%-1.5f", "%1.5f", "%123.9f", "%10.5f", "% 10.5f", "%+22.9f", "%+4.9f", "%01.3f", "%4f", "%3.1f", "%3.2f", "%.0f", "%f", "-16.16f", NULL }; double fp_nums[] = { 6442452944.1234, -1.5, 134.21, 91340.2, 341.1234, 0203.9, 0.96, 0.996, 0.9996, 1.996, 4.136, 0}; char *int_fmt[] = { "%-1.5d", "%1.5d", "%123.9d", "%5.5d", "%10.5d", "% 10.5d", "%+22.33d", "%01.3d", "%4d", "%d", NULL }; long int_nums[] = { -1, 134, 91340, 341, 0203, 0}; char *str_fmt[] = { "10.5s", "5.10s", "10.1s", "0.10s", "10.0s", "1.10s", "%s", "%.1s", "%.10s", "%10s", NULL }; char *str_vals[] = {"hello", "a", "", "a longer string", NULL}; int x, y; int fail = 0; int num = 0; printf ("Testing snprintf format codes against system sprintf...\n"); for (x = 0; fp_fmt[x] ; x++) { for (y = 0; fp_nums[y] != 0 ; y++) { int l1 = snprintf(NULL, 0, fp_fmt[x], fp_nums[y]); int l2 = snprintf(buf1, sizeof(buf1), fp_fmt[x], fp_nums[y]); sprintf (buf2, fp_fmt[x], fp_nums[y]); if (strcmp (buf1, buf2)) { printf("snprintf doesn't match Format: %s\n\tsnprintf = [%s]\n\t sprintf = [%s]\n", fp_fmt[x], buf1, buf2); fail++; } if (l1 != l2) { printf("snprintf l1 != l2 (%d %d) %s\n", l1, l2, fp_fmt[x]); fail++; } num++; } } for (x = 0; int_fmt[x] ; x++) { for (y = 0; int_nums[y] != 0 ; y++) { int l1 = snprintf(NULL, 0, int_fmt[x], int_nums[y]); int l2 = snprintf(buf1, sizeof(buf1), int_fmt[x], int_nums[y]); sprintf (buf2, int_fmt[x], int_nums[y]); if (strcmp (buf1, buf2)) { printf("snprintf doesn't match Format: %s\n\tsnprintf = [%s]\n\t sprintf = [%s]\n", int_fmt[x], buf1, buf2); fail++; } if (l1 != l2) { printf("snprintf l1 != l2 (%d %d) %s\n", l1, l2, int_fmt[x]); fail++; } num++; } } for (x = 0; str_fmt[x] ; x++) { for (y = 0; str_vals[y] != 0 ; y++) { int l1 = snprintf(NULL, 0, str_fmt[x], str_vals[y]); int l2 = snprintf(buf1, sizeof(buf1), str_fmt[x], str_vals[y]); sprintf (buf2, str_fmt[x], str_vals[y]); if (strcmp (buf1, buf2)) { printf("snprintf doesn't match Format: %s\n\tsnprintf = [%s]\n\t sprintf = [%s]\n", str_fmt[x], buf1, buf2); fail++; } if (l1 != l2) { printf("snprintf l1 != l2 (%d %d) %s\n", l1, l2, str_fmt[x]); fail++; } num++; } } printf ("%d tests failed out of %d.\n", fail, num); printf("seeing how many digits we support\n"); { double v0 = 0.12345678901234567890123456789012345678901; for (x=0; x<100; x++) { snprintf(buf1, sizeof(buf1), "%1.1f", v0*pow(10, x)); sprintf(buf2, "%1.1f", v0*pow(10, x)); if (strcmp(buf1, buf2)) { printf("we seem to support %d digits\n", x-1); break; } } } return 0; } #endif /* SNPRINTF_TEST */ gnokii-0.6.31/common/gsm-call.c0000644000175000017500000001612011666163120014336 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2002-2003 BORBELY Zoltan Copyright (C) 2002 Pawel Kot Library for call management. */ #include "config.h" #include #include "gnokii-internal.h" #include "gnokii.h" static gn_call calltable[GN_CALL_MAX_PARALLEL]; static gn_call *search_call(int call_id, struct gn_statemachine *state) { int i; for (i = 0; i < GN_CALL_MAX_PARALLEL; i++) if (calltable[i].state == state && calltable[i].call_id == call_id) return calltable + i; return NULL; } GNOKII_API void gn_call_notifier(gn_call_status call_status, gn_call_info *call_info, struct gn_statemachine *state) { gn_call *call; call = search_call(call_info->call_id, state); switch (call_status) { case GN_CALL_Incoming: if (call != NULL) break; if ((call = search_call(0, NULL)) == NULL) { dprintf("Call table overflow!\n"); break; } call->state = state; call->call_id = call_info->call_id; call->status = GN_CALL_Ringing; call->type = call_info->type; snprintf(call->remote_number, sizeof(call->remote_number), "%s", call_info->number); snprintf(call->remote_name, sizeof(call->remote_name), "%s", call_info->name); gettimeofday(&call->start_time, NULL); memset(&call->answer_time, 0, sizeof(call->answer_time)); call->local_originated = false; break; case GN_CALL_LocalHangup: case GN_CALL_RemoteHangup: if (call == NULL) break; memset(call, 0, sizeof(*call)); call->status = GN_CALL_Idle; break; case GN_CALL_Established: if (call == NULL) { if ((call = search_call(0, NULL)) == NULL) { dprintf("Call table overflow!\n"); break; } call->state = state; call->call_id = call_info->call_id; call->type = call_info->type; snprintf(call->remote_number, sizeof(call->remote_number), "%s", call_info->number); snprintf(call->remote_name, sizeof(call->remote_name), "%s", call_info->name); gettimeofday(&call->start_time, NULL); memcpy(&call->answer_time, &call->start_time, sizeof(call->answer_time)); call->local_originated = false; } else gettimeofday(&call->answer_time, NULL); call->status = GN_CALL_Established; break; case GN_CALL_Resumed: if (call == NULL) break; call->status = GN_CALL_Established; break; case GN_CALL_Held: if (call == NULL) break; call->status = GN_CALL_Held; break; default: dprintf("Invalid call notification code: %d\n", call_status); break; } } GNOKII_API gn_error gn_call_dial(int *call_id, gn_data *data, struct gn_statemachine *state) { gn_call *call; gn_error err; *call_id = -1; if ((call = search_call(0, NULL)) == NULL) { dprintf("Call table overflow!\n"); return GN_ERR_INTERNALERROR; } if ((err = gn_sm_functions(GN_OP_MakeCall, data, state)) != GN_ERR_NONE) return err; call->state = state; call->call_id = data->call_info->call_id; call->status = GN_CALL_Dialing; call->type = data->call_info->type; snprintf(call->remote_number, sizeof(call->remote_number), "%s", data->call_info->number); snprintf(call->remote_name, sizeof(call->remote_name), "%s", data->call_info->name); gettimeofday(&call->start_time, NULL); memset(&call->answer_time, 0, sizeof(call->answer_time)); call->local_originated = true; *call_id = call - calltable; return GN_ERR_NONE; } GNOKII_API gn_error gn_call_answer(int call_id) { gn_data data; gn_call_info call_info; if (calltable[call_id].status == GN_CALL_Idle) return GN_ERR_NONE; memset(&call_info, 0, sizeof(call_info)); call_info.call_id = calltable[call_id].call_id; gn_data_clear(&data); data.call_info = &call_info; return gn_sm_functions(GN_OP_AnswerCall, &data, calltable[call_id].state); } GNOKII_API gn_error gn_call_cancel(int call_id) { gn_data data; gn_call_info call_info; if (calltable[call_id].status == GN_CALL_Idle) return GN_ERR_NONE; memset(&call_info, 0, sizeof(call_info)); call_info.call_id = calltable[call_id].call_id; gn_data_clear(&data); data.call_info = &call_info; return gn_sm_functions(GN_OP_CancelCall, &data, calltable[call_id].state); } GNOKII_API gn_call *gn_call_get_active(int call_id) { if (calltable[call_id].status == GN_CALL_Idle) return NULL; return calltable + call_id; } GNOKII_API gn_error gn_call_check_active(struct gn_statemachine *state) { gn_data data; gn_call_active active[GN_CALL_MAX_PARALLEL]; gn_call *call; gn_error err; int i, j, got; memset(active, 0, sizeof(*active)); gn_data_clear(&data); data.call_active = active; /* initialize active call table */ for (i = 0; i < GN_CALL_MAX_PARALLEL; i++) active[i].state = GN_CALL_Idle; if ((err = gn_sm_functions(GN_OP_GetActiveCalls, &data, state)) != GN_ERR_NONE) return (err == GN_ERR_NOTIMPLEMENTED || err == GN_ERR_NOTSUPPORTED) ? GN_ERR_NONE : err; /* delete terminated calls */ for (j = 0; j < GN_CALL_MAX_PARALLEL; j++) { if (calltable[j].state != state) continue; got = 0; for (i = 0; i < GN_CALL_MAX_PARALLEL; i++) { if (calltable[j].call_id == active[i].call_id) { got = 1; break; } } if (!got) { memset(calltable + j, 0, sizeof(gn_call)); calltable[j].status = GN_CALL_Idle; } } for (i = 0; i < GN_CALL_MAX_PARALLEL; i++) { if (active[i].state == GN_CALL_Idle) continue; dprintf("call state: %d\n", active[i].state); if (!(call = search_call(active[i].call_id, state))) { /* incoming call */ if (active[i].state == GN_CALL_RemoteHangup || active[i].state == GN_CALL_LocalHangup) continue; if ((call = search_call(0, NULL)) == NULL) { dprintf("Call table overflow!\n"); return GN_ERR_MEMORYFULL; } call->state = state; call->call_id = active[i].call_id; call->status = active[i].state; call->type = GN_CALL_Voice; snprintf(call->remote_number, sizeof(call->remote_number), "%s", active[i].number); snprintf(call->remote_name, sizeof(call->remote_name), "%s", active[i].name); gettimeofday(&call->start_time, NULL); memset(&call->answer_time, 0, sizeof(call->answer_time)); call->local_originated = false; } else { /* already registered */ if (active[i].state == GN_CALL_RemoteHangup || active[i].state == GN_CALL_LocalHangup) { memset(call, 0, sizeof(gn_call)); call->status = GN_CALL_Idle; } else { if (call->status != GN_CALL_Established && active[i].state == GN_CALL_Established) { gettimeofday(&call->answer_time, NULL); } call->status = active[i].state; } } } return GN_ERR_NONE; } gnokii-0.6.31/common/links/0000755000175000017500000000000011666163463013625 5ustar leoleognokii-0.6.31/common/links/Makefile.am0000644000175000017500000000036211666163120015650 0ustar leoleoDEFS = -DCOMPILING_LIBGNOKII noinst_LTLIBRARIES = libLINKS.la libLINKS_la_SOURCES = \ atbus.c \ fbus.c \ fbus-phonet.c \ fbus-3110.c \ m2bus.c \ gnbus.c \ utils.c libLINKS_la_CFLAGS = \ -I$(top_srcdir)/include EXTRA_DIST = cbus.c gnokii-0.6.31/common/links/Makefile.in0000644000175000017500000006012211666163211015662 0ustar leoleo# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = common/links DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_expand_dir.m4 \ $(top_srcdir)/m4/acx_pthread.m4 $(top_srcdir)/m4/intltool.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libLINKS_la_LIBADD = am_libLINKS_la_OBJECTS = libLINKS_la-atbus.lo libLINKS_la-fbus.lo \ libLINKS_la-fbus-phonet.lo libLINKS_la-fbus-3110.lo \ libLINKS_la-m2bus.lo libLINKS_la-gnbus.lo libLINKS_la-utils.lo libLINKS_la_OBJECTS = $(am_libLINKS_la_OBJECTS) libLINKS_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libLINKS_la_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libLINKS_la_SOURCES) DIST_SOURCES = $(libLINKS_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLUETOOTH_LIBS = @BLUETOOTH_LIBS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = -DCOMPILING_LIBGNOKII DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FIND = @FIND@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLDFLAGS = @GLDFLAGS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GMODULE_CFLAGS = @GMODULE_CFLAGS@ GMODULE_LIBS = @GMODULE_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GNOKII_LT_VERSION = @GNOKII_LT_VERSION@ GNOKII_LT_VERSION_AGE = @GNOKII_LT_VERSION_AGE@ GNOKII_LT_VERSION_CURRENT = @GNOKII_LT_VERSION_CURRENT@ GNOKII_LT_VERSION_REVISION = @GNOKII_LT_VERSION_REVISION@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_LIBICAL = @HAVE_LIBICAL@ HAVE_LIBUSB = @HAVE_LIBUSB@ HAVE_SOCKETPHONET = @HAVE_SOCKETPHONET@ HAVE_XGNOKII = @HAVE_XGNOKII@ ICAL_CFLAGS = @ICAL_CFLAGS@ ICAL_LIBS = @ICAL_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBGNOKII_VERSION_MAJOR = @LIBGNOKII_VERSION_MAJOR@ LIBGNOKII_VERSION_MINOR = @LIBGNOKII_VERSION_MINOR@ LIBGNOKII_VERSION_RELEASE = @LIBGNOKII_VERSION_RELEASE@ LIBGNOKII_VERSION_STRING = @LIBGNOKII_VERSION_STRING@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBPCSCLITE_CFLAGS = @LIBPCSCLITE_CFLAGS@ LIBPCSCLITE_LIBS = @LIBPCSCLITE_LIBS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKE = @MAKE@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ MYSQLCONFIG = @MYSQLCONFIG@ MYSQLCONFIG5 = @MYSQLCONFIG5@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_LIBS = @MYSQL_LIBS@ NEED_LOCALE_CHARSET = @NEED_LOCALE_CHARSET@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OWN_GETOPT = @OWN_GETOPT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PGCONFIG = @PGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSTGRES_CFLAGS = @POSTGRES_CFLAGS@ POSTGRES_LIBS = @POSTGRES_LIBS@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LIBS = @SQLITE3_LIBS@ SQLITE_CFLAGS = @SQLITE_CFLAGS@ SQLITE_LIBS = @SQLITE_LIBS@ STRIP = @STRIP@ TCP_LIBS = @TCP_LIBS@ TERMLDFLAGS = @TERMLDFLAGS@ TERMLIBS = @TERMLIBS@ USB_LIBS = @USB_LIBS@ USE_NLS = @USE_NLS@ USE_UNIX98PTYS = @USE_UNIX98PTYS@ VERSION = @VERSION@ WIN32 = @WIN32@ WIN32_CROSS = @WIN32_CROSS@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ XPACKAGE = @XPACKAGE@ XPM_CFLAGS = @XPM_CFLAGS@ XPM_LIBS = @XPM_LIBS@ XVERSION = @XVERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ acx_pthread_config = @acx_pthread_config@ 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@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libLINKS.la libLINKS_la_SOURCES = \ atbus.c \ fbus.c \ fbus-phonet.c \ fbus-3110.c \ m2bus.c \ gnbus.c \ utils.c libLINKS_la_CFLAGS = \ -I$(top_srcdir)/include EXTRA_DIST = cbus.c all: all-am .SUFFIXES: .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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu common/links/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu common/links/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 $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libLINKS.la: $(libLINKS_la_OBJECTS) $(libLINKS_la_DEPENDENCIES) $(libLINKS_la_LINK) $(libLINKS_la_OBJECTS) $(libLINKS_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLINKS_la-atbus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLINKS_la-fbus-3110.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLINKS_la-fbus-phonet.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLINKS_la-fbus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLINKS_la-gnbus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLINKS_la-m2bus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLINKS_la-utils.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @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 $@ $< libLINKS_la-atbus.lo: atbus.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLINKS_la_CFLAGS) $(CFLAGS) -MT libLINKS_la-atbus.lo -MD -MP -MF $(DEPDIR)/libLINKS_la-atbus.Tpo -c -o libLINKS_la-atbus.lo `test -f 'atbus.c' || echo '$(srcdir)/'`atbus.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLINKS_la-atbus.Tpo $(DEPDIR)/libLINKS_la-atbus.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='atbus.c' object='libLINKS_la-atbus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLINKS_la_CFLAGS) $(CFLAGS) -c -o libLINKS_la-atbus.lo `test -f 'atbus.c' || echo '$(srcdir)/'`atbus.c libLINKS_la-fbus.lo: fbus.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLINKS_la_CFLAGS) $(CFLAGS) -MT libLINKS_la-fbus.lo -MD -MP -MF $(DEPDIR)/libLINKS_la-fbus.Tpo -c -o libLINKS_la-fbus.lo `test -f 'fbus.c' || echo '$(srcdir)/'`fbus.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLINKS_la-fbus.Tpo $(DEPDIR)/libLINKS_la-fbus.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbus.c' object='libLINKS_la-fbus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLINKS_la_CFLAGS) $(CFLAGS) -c -o libLINKS_la-fbus.lo `test -f 'fbus.c' || echo '$(srcdir)/'`fbus.c libLINKS_la-fbus-phonet.lo: fbus-phonet.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLINKS_la_CFLAGS) $(CFLAGS) -MT libLINKS_la-fbus-phonet.lo -MD -MP -MF $(DEPDIR)/libLINKS_la-fbus-phonet.Tpo -c -o libLINKS_la-fbus-phonet.lo `test -f 'fbus-phonet.c' || echo '$(srcdir)/'`fbus-phonet.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLINKS_la-fbus-phonet.Tpo $(DEPDIR)/libLINKS_la-fbus-phonet.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbus-phonet.c' object='libLINKS_la-fbus-phonet.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLINKS_la_CFLAGS) $(CFLAGS) -c -o libLINKS_la-fbus-phonet.lo `test -f 'fbus-phonet.c' || echo '$(srcdir)/'`fbus-phonet.c libLINKS_la-fbus-3110.lo: fbus-3110.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLINKS_la_CFLAGS) $(CFLAGS) -MT libLINKS_la-fbus-3110.lo -MD -MP -MF $(DEPDIR)/libLINKS_la-fbus-3110.Tpo -c -o libLINKS_la-fbus-3110.lo `test -f 'fbus-3110.c' || echo '$(srcdir)/'`fbus-3110.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLINKS_la-fbus-3110.Tpo $(DEPDIR)/libLINKS_la-fbus-3110.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbus-3110.c' object='libLINKS_la-fbus-3110.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLINKS_la_CFLAGS) $(CFLAGS) -c -o libLINKS_la-fbus-3110.lo `test -f 'fbus-3110.c' || echo '$(srcdir)/'`fbus-3110.c libLINKS_la-m2bus.lo: m2bus.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLINKS_la_CFLAGS) $(CFLAGS) -MT libLINKS_la-m2bus.lo -MD -MP -MF $(DEPDIR)/libLINKS_la-m2bus.Tpo -c -o libLINKS_la-m2bus.lo `test -f 'm2bus.c' || echo '$(srcdir)/'`m2bus.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLINKS_la-m2bus.Tpo $(DEPDIR)/libLINKS_la-m2bus.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='m2bus.c' object='libLINKS_la-m2bus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLINKS_la_CFLAGS) $(CFLAGS) -c -o libLINKS_la-m2bus.lo `test -f 'm2bus.c' || echo '$(srcdir)/'`m2bus.c libLINKS_la-gnbus.lo: gnbus.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLINKS_la_CFLAGS) $(CFLAGS) -MT libLINKS_la-gnbus.lo -MD -MP -MF $(DEPDIR)/libLINKS_la-gnbus.Tpo -c -o libLINKS_la-gnbus.lo `test -f 'gnbus.c' || echo '$(srcdir)/'`gnbus.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLINKS_la-gnbus.Tpo $(DEPDIR)/libLINKS_la-gnbus.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnbus.c' object='libLINKS_la-gnbus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLINKS_la_CFLAGS) $(CFLAGS) -c -o libLINKS_la-gnbus.lo `test -f 'gnbus.c' || echo '$(srcdir)/'`gnbus.c libLINKS_la-utils.lo: utils.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLINKS_la_CFLAGS) $(CFLAGS) -MT libLINKS_la-utils.lo -MD -MP -MF $(DEPDIR)/libLINKS_la-utils.Tpo -c -o libLINKS_la-utils.lo `test -f 'utils.c' || echo '$(srcdir)/'`utils.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLINKS_la-utils.Tpo $(DEPDIR)/libLINKS_la-utils.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='utils.c' object='libLINKS_la-utils.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLINKS_la_CFLAGS) $(CFLAGS) -c -o libLINKS_la-utils.lo `test -f 'utils.c' || echo '$(srcdir)/'`utils.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: 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-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES 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-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gnokii-0.6.31/common/links/gnbus.c0000644000175000017500000001674111666163120015106 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for Nokia mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 2000 Chris Kemp Copyright (C) 2004 BORBELY Zoltan This file provides an API for accessing functions via gnbus. See README for more details on supported mobile phones. The various routines are called gnbus_ (whatever). */ #include "config.h" /* System header files */ #include #include #include /* Various header file */ #include "compat.h" #include "misc.h" #include "gnokii.h" #include "device.h" #include "links/gnbus.h" #include "links/utils.h" #include "gnokii-internal.h" /* * RX_State machine for receive handling. Called once for each character * received from the phone. */ static void gnbus_rx_statemachine(unsigned char rx_byte, struct gn_statemachine *state) { struct timeval time_diff; gnbus_incoming_message *i = &GNBUSINST(state)->i; if (!i) return; /* XOR the byte with the current checksum */ i->checksum[i->checksum_idx] ^= rx_byte; i->checksum_idx ^= 1; switch (i->state) { /* * Messages from the phone start with a GNBUS_MAGIC_BYTE. * We use this to "synchronise" with the incoming data stream. * However, if we see something else, we assume we have lost * sync and we require a gap of at least 5ms before we start * looking again. This is because the data part of the * frame could contain a byte which looks like the sync byte. */ case GNBUS_RX_Discarding: gettimeofday(&i->time_now, NULL); timersub(&i->time_now, &i->time_last, &time_diff); if (time_diff.tv_sec == 0 && time_diff.tv_usec < 5000) { i->time_last = i->time_now; /* no gap seen, continue discarding */ break; } /* else fall through to... */ case GNBUS_RX_Sync: if (rx_byte == GNBUS_MAGIC_BYTE) { /* Initialize checksums. */ i->checksum[0] = rx_byte; i->checksum[1] = 0; i->checksum_idx = 1; i->state = GNBUS_RX_GetSequence; } else { /* Lost frame sync */ i->state = GNBUS_RX_Discarding; gettimeofday(&i->time_last, NULL); } break; case GNBUS_RX_GetSequence: i->sequence = rx_byte; i->state = GNBUS_RX_GetLength1; break; case GNBUS_RX_GetLength1: i->message_length = rx_byte << 8; i->state = GNBUS_RX_GetLength2; break; case GNBUS_RX_GetLength2: i->message_length += rx_byte; i->state = GNBUS_RX_GetType; break; case GNBUS_RX_GetType: i->message_type = rx_byte; i->state = GNBUS_RX_GetDummy; break; case GNBUS_RX_GetDummy: i->state = GNBUS_RX_GetMessage; if ((i->message_buffer = malloc(i->message_length + 3)) == NULL) { dprintf("GNBUS: receive buffer allocation failed, requested %d bytes.\n", i->message_length + 2); i->state = GNBUS_RX_Sync; } i->buffer_count = 0; break; case GNBUS_RX_GetMessage: i->message_buffer[i->buffer_count++] = rx_byte; /* If this is the last byte, it's the checksum. */ if (i->buffer_count == ((i->message_length + 3) & ~1)) { /* Is the checksum correct? */ if (i->checksum[0] == 0x00 && i->checksum[1] == 0x00) { sm_incoming_acknowledge(state); /* dispatch if ready */ sm_incoming_function(i->message_type, i->message_buffer, i->message_length, state); } else { dprintf("GNBUS: Bad checksum!\n"); } free(i->message_buffer); i->message_buffer = NULL; i->state = GNBUS_RX_Sync; } break; } } /* * This is the main loop function which must be called regularly * timeout can be used to make it 'busy' or not */ static gn_error gnbus_loop(struct timeval *timeout, struct gn_statemachine *state) { unsigned char buffer[BUFFER_SIZE]; int count, res; res = device_select(timeout, state); if (res > 0) { res = device_read(buffer, sizeof(buffer), state); for (count = 0; count < res; count++) gnbus_rx_statemachine(buffer[count], state); } else return GN_ERR_TIMEOUT; /* This traps errors from device_read */ if (res > 0) return GN_ERR_NONE; else return GN_ERR_INTERNALERROR; } /* * Prepares the message header and sends it, prepends the message * with a header, calculates checksum and then sends the lot down * the pipe... */ static gn_error gnbus_send_message(unsigned int messagesize, unsigned char messagetype, unsigned char *message, struct gn_statemachine *state) { unsigned char *out_buffer; int count, i = 0; unsigned char checksum[2]; if (messagesize >= 0xfff0) { dprintf("GNBUS: message is too big to transmit, size: %d bytes\n", messagesize); return GN_ERR_MEMORYFULL; } if ((out_buffer = malloc(messagesize + 8)) == NULL) { dprintf("GNBUS: transmit buffer allocation failed, requested %d bytes.\n", messagesize + 8); return GN_ERR_MEMORYFULL; } /* Now construct the message header. */ i = 0; out_buffer[i++] = GNBUS_MAGIC_BYTE; out_buffer[i++] = 0x00; /* FIXME: sequence */ out_buffer[i++] = messagesize >> 8; /* Length MSB */ out_buffer[i++] = messagesize & 0xff; /* Length LSB */ out_buffer[i++] = messagetype; /* Type */ out_buffer[i++] = 0x00; /* Reserved */ /* Copy in data if any. */ if (messagesize != 0) { memcpy(out_buffer + i, message, messagesize); i += messagesize; } if (messagesize & 1) out_buffer[i++] = 0x00; /* Now calculate checksums over entire message and append to message. */ checksum[0] = 0; checksum[1] = 0; for (count = 0; count < i; count++) checksum[count & 1] ^= out_buffer[count]; out_buffer[i++] = checksum[0]; out_buffer[i++] = checksum[1]; /* Send it out... */ #if 0 dprintf("GNBUS: Sending message 0x%02x / 0x%04x", messagetype, messagesize); for (count = 0; count < i; count++) { if (count % 16 == 0) dprintf("\n"); dprintf(" %02x", out_buffer[count]); } dprintf("\n"); #endif if (device_write(out_buffer, i, state) != i) { free(out_buffer); return GN_ERR_INTERNALERROR; } free(out_buffer); return GN_ERR_NONE; } static void gnbus_reset(struct gn_statemachine *state) { GNBUSINST(state)->i.state = GNBUS_RX_Sync; GNBUSINST(state)->i.checksum_idx = 0; } /* * Initialise variables and start the link */ gn_error gnbus_initialise(struct gn_statemachine *state) { int conn_type; if (!state) return GN_ERR_FAILED; /* Fill in the link functions */ state->link.loop = &gnbus_loop; state->link.send_message = &gnbus_send_message; state->link.reset = &gnbus_reset; state->link.cleanup = NULL; /* Start up the link */ if ((GNBUSINST(state) = calloc(1, sizeof(gnbus_link))) == NULL) return GN_ERR_MEMORYFULL; gnbus_reset(state); if (state->config.connection_type == GN_CT_Irda && strcasecmp(state->config.port_device, "IrDA:IrCOMM")) conn_type = GN_CT_Serial; else conn_type = state->config.connection_type; if (!device_open(state->config.port_device, false, false, false, conn_type, state)) { perror(_("Couldn't open GNBUS device")); free(GNBUSINST(state)); GNBUSINST(state) = NULL; return GN_ERR_FAILED; } return GN_ERR_NONE; } gnokii-0.6.31/common/links/fbus-phonet.c0000644000175000017500000002722211666163120016216 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 2000-2001 Chris Kemp Copyright (C) 2001-2011 Pawel Kot Copyright (C) 2001 Manfred Jonsson, Martin Jancar Copyright (C) 2002 Ladis Michl Copyright (C) 2002-2003 BORBELY Zoltan This file provides an API for accessing functions via fbus over irda. See README for more details on supported mobile phones. The various routines are called phonet_(whatever). */ #include "config.h" /* System header files */ #include #include #include /* Various header file */ #include "compat.h" #include "misc.h" #include "gnokii.h" #include "device.h" #include "links/fbus-phonet.h" #include "links/fbus.h" #include "links/utils.h" #include "gnokii-internal.h" static void phonet_rx_statemachine(unsigned char rx_byte, struct gn_statemachine *state); static gn_error phonet_send_message(unsigned int messagesize, unsigned char messagetype, unsigned char *message, struct gn_statemachine *state); #define FBUSINST(s) (*((phonet_incoming_message **)(&(s)->link.link_instance))) #define FBUS_PHONET_BLUETOOTH_INITSEQ 0xd0, 0x00, 0x01 /*--------------------------------------------*/ static int verify_max_message_len(int len, char **message_buffer) { static int max_message_len = 0; if (len > max_message_len) { dprintf("overrun: %d %d\n", len, max_message_len); *message_buffer = realloc(*message_buffer, len + 1); max_message_len = len + 1; } if (*message_buffer) return max_message_len; else return 0; } /*--------------------------------------------*/ static bool phonet_open(struct gn_statemachine *state) { int result, i, n, total = 0; unsigned char init_sequence[] = { FBUS_PHONET_BLUETOOTH_FRAME_ID, FBUS_DEVICE_PHONE, FBUS_PHONET_BLUETOOTH_DEVICE_PC, FBUS_PHONET_BLUETOOTH_INITSEQ, 0x04}; unsigned char init_resp[7]; unsigned char init_pattern[7] = { FBUS_PHONET_BLUETOOTH_FRAME_ID, FBUS_PHONET_BLUETOOTH_DEVICE_PC, FBUS_DEVICE_PHONE, FBUS_PHONET_BLUETOOTH_INITSEQ, 0x05}; if (!state) return false; memset(&init_resp, 0, 7); /* Open device. */ result = device_open(state->config.port_device, false, false, false, state->config.connection_type, state); if (!result) { perror(_("Couldn't open PHONET device")); return false; } if (state->config.connection_type == GN_CT_Bluetooth) { device_write(&init_sequence, 7, state); while (total < 7) { n = device_read(&init_resp + total, 7 - total, state); if (n > 0) total += n; } for (i = 0; i < n; i++) { if (init_resp[i] != init_pattern[i]) { dprintf("Incorrect byte in the answer\n"); return false; } } } return true; } /* RX_State machine for receive handling. Called once for each character received from the phone. */ static void phonet_rx_statemachine(unsigned char rx_byte, struct gn_statemachine *state) { phonet_incoming_message *i = FBUSINST(state); /* FIXME: perhaps we should return something here */ if (!i) return; switch (i->state) { case FBUS_RX_Sync: if (rx_byte == FBUS_PHONET_FRAME_ID || rx_byte == FBUS_PHONET_BLUETOOTH_FRAME_ID || rx_byte == FBUS_PHONET_DKU2_FRAME_ID) { i->state = FBUS_RX_GetDestination; } i->message_corrupted = 0; break; case FBUS_RX_GetDestination: i->message_destination = rx_byte; i->state = FBUS_RX_GetSource; if (rx_byte != FBUS_DEVICE_PC && rx_byte != FBUS_PHONET_DKU2_DEVICE_PC && rx_byte != FBUS_PHONET_BLUETOOTH_DEVICE_PC) { i->state = FBUS_RX_Sync; dprintf("The fbus stream is out of sync - expected 0x0c, got 0x%02x\n", rx_byte); } break; case FBUS_RX_GetSource: i->message_source = rx_byte; i->state = FBUS_RX_GetType; if (rx_byte != FBUS_DEVICE_PHONE) { i->state = FBUS_RX_Sync; dprintf("The fbus stream is out of sync - expected 0x00, got 0x%02x\n", rx_byte); } break; case FBUS_RX_GetType: i->message_type = rx_byte; i->state = FBUS_RX_GetLength1; break; case FBUS_RX_GetLength1: i->message_length = rx_byte << 8; i->state = FBUS_RX_GetLength2; break; case FBUS_RX_GetLength2: i->message_length = i->message_length + rx_byte; i->state = FBUS_RX_GetMessage; i->buffer_count = 0; if (!verify_max_message_len(i->message_length, &(i->message_buffer))) { dprintf("PHONET: Failed to allocate memory for larger buffer\n"); dprintf("PHONET: Message buffer overrun - resetting (message length: %d, max: %d)\n", i->message_length, PHONET_FRAME_MAX_LENGTH); i->message_corrupted = 1; } break; case FBUS_RX_GetMessage: /* * If message is corrupted it means that we couldn't allocate full * space to store it. Therefore let's just print out the message. */ if (i->message_corrupted) { if (i->buffer_count % 16 == 0) dprintf("\n"); dprintf("%02x ", rx_byte); i->buffer_count++; } i->message_buffer[i->buffer_count] = rx_byte; i->buffer_count++; /* Is that it? */ if (i->buffer_count == i->message_length) { sm_incoming_function(i->message_type, i->message_buffer, i->message_length, state); i->state = FBUS_RX_Sync; } break; default: i->state = FBUS_RX_Sync; break; } } /* This is the main loop function which must be called regularly */ /* timeout can be used to make it 'busy' or not */ static gn_error phonet_loop(struct timeval *timeout, struct gn_statemachine *state) { gn_error error = GN_ERR_INTERNALERROR; /* * IMPORTANT: size of this buffer must be a multiple of packet size for USB compatibility. * See http://libusb.sourceforge.net/api-1.0/packetoverflow.html * Packet size can be found in the lsusb output for the proper endpoint. In case of the * overruns validate this information. Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 11 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 2 Communications bInterfaceSubClass 254 bInterfaceProtocol 0 iInterface 0 CDC Header: bcdCDC 1.10 UNRECOGNIZED CDC: 05 24 ab 05 5c CDC Union: bMasterInterface 11 bSlaveInterface 12 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 12 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 10 CDC Data bInterfaceSubClass 0 Unused bInterfaceProtocol 0 iInterface 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 12 bAlternateSetting 1 bNumEndpoints 2 bInterfaceClass 10 CDC Data bInterfaceSubClass 0 Unused bInterfaceProtocol 0 iInterface 0 ** UNRECOGNIZED: 04 24 fd 01 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x88 EP 8 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes <== bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x08 EP 8 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes <== bInterval 0 */ unsigned char buffer[BUFFER_SIZE]; int count, res; res = device_select(timeout, state); if (res > 0) { res = device_read(buffer, sizeof(buffer), state); for (count = 0; count < res; count++) { phonet_rx_statemachine(buffer[count], state); } if (res > 0) { error = GN_ERR_NONE; /* This traps errors from device_read */ } } else if (!res) { error = GN_ERR_TIMEOUT; } return error; } /* Main function to send an fbus message */ static gn_error phonet_send_message(unsigned int messagesize, unsigned char messagetype, unsigned char *message, struct gn_statemachine *state) { u8 out_buffer[PHONET_TRANSMIT_MAX_LENGTH + 5]; int current = 0; int total, sent; if (!state) return GN_ERR_FAILED; if (messagesize > PHONET_TRANSMIT_MAX_LENGTH) { return GN_ERR_MEMORYFULL; } /* Now construct the message header. */ switch (state->config.connection_type) { case GN_CT_Bluetooth: out_buffer[current++] = FBUS_PHONET_BLUETOOTH_FRAME_ID; out_buffer[current++] = FBUS_DEVICE_PHONE; out_buffer[current++] = FBUS_PHONET_BLUETOOTH_DEVICE_PC; break; case GN_CT_DKU2: case GN_CT_DKU2LIBUSB: out_buffer[current++] = FBUS_PHONET_DKU2_FRAME_ID; out_buffer[current++] = FBUS_DEVICE_PHONE; out_buffer[current++] = FBUS_PHONET_DKU2_DEVICE_PC; break; default: out_buffer[current++] = FBUS_PHONET_FRAME_ID; out_buffer[current++] = FBUS_DEVICE_PHONE; /* Destination */ out_buffer[current++] = FBUS_DEVICE_PC; /* Source */ break; } out_buffer[current++] = messagetype; /* Type */ out_buffer[current++] = (messagesize & 0xff00) >> 8; out_buffer[current++] = (messagesize & 0x00ff); /* Copy in data if any. */ if (messagesize > 0) { memcpy(out_buffer + current, message, messagesize); current += messagesize; } /* Send it out... */ total = current; current = 0; sent = 0; do { sent = device_write(out_buffer + current, total - current, state); if (sent < 0) return GN_ERR_FAILED; else current += sent; } while (current < total); sm_incoming_acknowledge(state); return GN_ERR_NONE; } static void phonet_reset(struct gn_statemachine *state) { /* Init variables */ FBUSINST(state)->state = FBUS_RX_Sync; FBUSINST(state)->buffer_count = 0; } static void phonet_cleanup(struct gn_statemachine *state) { free(FBUSINST(state)->message_buffer); FBUSINST(state)->message_buffer = NULL; } /* Initialise variables and start the link */ gn_error phonet_initialise(struct gn_statemachine *state) { gn_error error = GN_ERR_FAILED; if (!state) return error; /* Fill in the link functions */ state->link.loop = &phonet_loop; state->link.send_message = &phonet_send_message; state->link.reset = &phonet_reset; state->link.cleanup = &phonet_cleanup; if ((FBUSINST(state) = calloc(1, sizeof(phonet_incoming_message))) == NULL) return GN_ERR_MEMORYFULL; if (!verify_max_message_len(PHONET_FRAME_MAX_LENGTH, &(FBUSINST(state)->message_buffer))) return GN_ERR_MEMORYFULL; switch (state->config.connection_type) { case GN_CT_Infrared: case GN_CT_Irda: case GN_CT_DKU2: case GN_CT_DKU2LIBUSB: case GN_CT_Bluetooth: case GN_CT_SOCKETPHONET: if (phonet_open(state) == true) error = GN_ERR_NONE; break; default: break; } if (error != GN_ERR_NONE) { free(FBUSINST(state)); FBUSINST(state) = NULL; return error; } phonet_reset(state); return error; } gnokii-0.6.31/common/links/fbus.c0000644000175000017500000004664111666163120014731 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 2000-2001 Chris Kemp Copyright (C) 2001-2006 Pawel Kot Copyright (C) 2001 Manfred Jonsson, Pavel Machek Copyright (C) 2001-2002 Ladis Michl Copyright (C) 2002-2004 BORBELY Zoltan Copyright (C) 2003 Marcel Holtmann This file provides an API for accessing functions via fbus. See README for more details on supported mobile phones. The various routines are called FBUS_(whatever). */ #include "config.h" /* System header files */ #include #include #include /* Various header file */ #include "compat.h" #include "misc.h" #include "gnokii.h" #include "device.h" #include "links/fbus.h" #include "links/utils.h" #include "gnokii-internal.h" static void fbus_rx_statemachine(unsigned char rx_byte, struct gn_statemachine *state); static gn_error fbus_send_message(unsigned int messagesize, unsigned char messagetype, unsigned char *message, struct gn_statemachine *state); static int fbus_tx_send_ack(u8 message_type, u8 message_seq, struct gn_statemachine *state); /* FIXME - win32 stuff! */ #define FBUSINST(s) (*((fbus_link **)(&(s)->link.link_instance))) #define IR_MODE(s) ((s)->config.connection_type == GN_CT_Infrared || (s)->config.connection_type == GN_CT_Tekram) /*--------------------------------------------*/ static bool fbus_serial_open(bool dlr3, struct gn_statemachine *state) { int type; if (!state) return false; if (state->config.connection_type == GN_CT_TCP) type = GN_CT_TCP; else type = GN_CT_Serial; if (dlr3) dlr3 = 1; /* Open device. */ if (!device_open(state->config.port_device, false, false, false, type, state)) { perror(_("Couldn't open FBUS device")); return false; } device_changespeed(115200, state); /* clearing the RTS bit and setting the DTR bit */ device_setdtrrts((1-dlr3), 0, state); return true; } static int send_command(char *cmd, int len, struct gn_statemachine *state) { struct timeval timeout; unsigned char buffer[255]; int res, offset = 0, waitformore = 1; /* Communication with the phone looks strange here. I am unable to * read the whole answer from the port with DKU-5 cable and * Nokia 6020. The following code seems to work reliably. */ device_write(cmd, len, state); /* Experimental timeout */ timeout.tv_sec = 0; timeout.tv_usec = 500000; res = device_select(&timeout, state); /* Read from the port only when select succeeds */ while (res > 0 && waitformore) { /* Avoid 'device temporarily unavailable' error */ usleep(50000); res = device_read(buffer + offset, sizeof(buffer) - offset, state); /* The whole answer is read */ if (strstr(buffer, "OK")) waitformore = 0; if (res > 0) offset += res; res = offset; /* The phone is already in AT mode */ if (strchr(buffer, 0x55)) res = 0; } return res; } static bool at2fbus_serial_open(struct gn_statemachine *state, gn_connection_type type) { unsigned char init_char = 0x55; unsigned char end_init_char = 0xc1; int count, res; if (!state) return false; /* Open device. */ if (!device_open(state->config.port_device, false, false, false, type, state)) { perror(_("Couldn't open FBUS device")); return false; } device_setdtrrts(0, 0, state); usleep(1000000); device_setdtrrts(1, 1, state); usleep(1000000); device_changespeed(19200, state); dprintf("Switching to FBUS mode\n"); /* Here we can be either switched to FBUS or not. Assume 0.5 second * timeout for the answer. */ res = send_command("AT\r\n", 4, state); if (res) res = send_command("AT&F\r\n", 6, state); if (res) res = send_command("AT*NOKIAFBUS\r\n", 14, state); device_changespeed(115200, state); if (type != GN_CT_Bluetooth && type != GN_CT_TCP) { for (count = 0; count < 32; count++) { device_write(&init_char, 1, state); } device_write(&end_init_char, 1, state); usleep(1000000); } return true; } static bool fbus_ir_open(struct gn_statemachine *state) { struct timeval timeout; unsigned char init_char = 0x55; unsigned char end_init_char = 0xc1; unsigned char connect_seq[] = { FBUS_FRAME_HEADER, 0x0d, 0x00, 0x00, 0x02 }; unsigned int count, retry; if (!state) return false; if (!device_open(state->config.port_device, false, false, false, state->config.connection_type, state)) { perror(_("Couldn't open FBUS device")); return false; } /* clearing the RTS bit and setting the DTR bit */ device_setdtrrts(1, 0, state); for (retry = 0; retry < 5; retry++) { dprintf("IR init, retry=%d\n", retry); device_changespeed(9600, state); for (count = 0; count < 32; count++) { device_write(&init_char, 1, state); } device_write(&end_init_char, 1, state); usleep(100000); device_changespeed(115200, state); fbus_send_message(7, 0x02, connect_seq, state); /* Wait for 1 sec. */ timeout.tv_sec = 1; timeout.tv_usec = 0; if (device_select(&timeout, state)) { dprintf("IR init succeeded\n"); return true; } } return false; } /* RX_State machine for receive handling. Called once for each character received from the phone. */ static void fbus_rx_statemachine(unsigned char rx_byte, struct gn_statemachine *state) { struct timeval time_diff; fbus_incoming_frame *i = &FBUSINST(state)->i; int frm_num, seq_num; fbus_incoming_message *m; unsigned char *message_buffer; if (!i) return; /* XOR the byte with the current checksum */ i->checksum[i->buffer_count & 1] ^= rx_byte; switch (i->state) { /* Messages from the phone start with an 0x1e (cable) or 0x1c (IR). We use this to "synchronise" with the incoming data stream. However, if we see something else, we assume we have lost sync and we require a gap of at least 5ms before we start looking again. This is because the data part of the frame could contain a byte which looks like the sync byte */ case FBUS_RX_Discarding: gettimeofday(&i->time_now, NULL); timersub(&i->time_now, &i->time_last, &time_diff); if (time_diff.tv_sec == 0 && time_diff.tv_usec < 5000) { i->time_last = i->time_now; /* no gap seen, continue discarding */ break; } /* else fall through to... */ case FBUS_RX_Sync: if (IR_MODE(state)) { if (rx_byte == FBUS_IR_FRAME_ID) { /* Initialize checksums. */ i->checksum[0] = FBUS_IR_FRAME_ID; i->checksum[1] = 0; i->state = FBUS_RX_GetDestination; } else { /* Lost frame sync */ i->state = FBUS_RX_Discarding; gettimeofday(&i->time_last, NULL); } } else { /* !IR_MODE */ if (rx_byte == FBUS_FRAME_ID) { /* Initialize checksums. */ i->checksum[0] = FBUS_FRAME_ID; i->checksum[1] = 0; i->state = FBUS_RX_GetDestination; } else { /* Lost frame sync */ i->state = FBUS_RX_Discarding; gettimeofday(&i->time_last, NULL); } } break; case FBUS_RX_GetDestination: i->message_destination = rx_byte; i->state = FBUS_RX_GetSource; /* When there is a checksum error and things get out of sync we have to manage to resync */ /* If doing a data call at the time, finding a 0x1e etc is really quite likely in the data stream */ /* Then all sorts of horrible things happen because the packet length etc is wrong... */ /* Therefore we test here for a destination of 0x0c and return to the top if it is not */ if (rx_byte == 0x00) { i->state = FBUS_RX_EchoSource; } else if (rx_byte != 0x0c) { i->state = FBUS_RX_Sync; dprintf("The fbus stream is out of sync - expected 0x0c, got 0x%02x\n", rx_byte); } break; case FBUS_RX_GetSource: i->message_source = rx_byte; i->state = FBUS_RX_GetType; /* Source should be 0x00 */ if (rx_byte != 0x00) { i->state = FBUS_RX_Sync; dprintf("The fbus stream is out of sync - expected 0x00, got 0x%02x\n", rx_byte); } break; case FBUS_RX_GetType: i->message_type = rx_byte; i->state = FBUS_RX_GetLength1; break; case FBUS_RX_GetLength1: i->frame_length = rx_byte << 8; i->state = FBUS_RX_GetLength2; break; case FBUS_RX_GetLength2: i->frame_length = i->frame_length + rx_byte; i->state = FBUS_RX_GetMessage; i->buffer_count = 0; break; case FBUS_RX_GetMessage: if (i->buffer_count >= FBUS_FRAME_MAX_LENGTH) { dprintf("FBUS: Message buffer overrun - resetting\n"); i->state = FBUS_RX_Sync; break; } i->message_buffer[i->buffer_count] = rx_byte; i->buffer_count++; /* If this is the last byte, it's the checksum. */ if (i->buffer_count == i->frame_length + (i->frame_length % 2) + 2) { i->state = FBUS_RX_Sync; /* Is the checksum correct? */ if (i->checksum[0] == i->checksum[1]) { /* Deal with exceptions to the rules - acks and rlp.. */ if (i->message_type == 0x7f) { dprintf("[Received Ack of type %02x, seq: %2x]\n", i->message_buffer[0], (unsigned char) i->message_buffer[1]); sm_incoming_acknowledge(state); } else if (i->message_type == 0xf1) { sm_incoming_function(i->message_type, i->message_buffer, i->frame_length - 2, state); } else { /* Normal message type */ sm_incoming_acknowledge(state); /* Add data to the relevant Message buffer */ /* having checked the sequence number */ m = &FBUSINST(state)->messages[i->message_type]; frm_num = i->message_buffer[i->frame_length - 2]; seq_num = i->message_buffer[i->frame_length - 1]; /* 0x40 in the sequence number indicates first frame of a message */ if ((seq_num & 0x40) == 0x40) { /* Fiddle around and malloc some memory */ m->message_length = 0; m->frames_to_go = frm_num; if (m->malloced != 0) { free(m->message_buffer); m->malloced = 0; m->message_buffer = NULL; } m->malloced = frm_num * m->message_length; m->message_buffer = (unsigned char *)malloc(m->malloced); } else if (m->frames_to_go != frm_num) { dprintf("Missed a frame in a multiframe message.\n"); /* FIXME - we should make sure we don't ack the rest etc */ } if (m->malloced < m->message_length + i->frame_length) { m->malloced = m->message_length + i->frame_length; m->message_buffer = (unsigned char *)realloc(m->message_buffer, m->malloced); } memcpy(m->message_buffer + m->message_length, i->message_buffer, i->frame_length - 2); m->message_length += i->frame_length - 2; m->frames_to_go--; /* Send an ack (for all for now) */ fbus_tx_send_ack(i->message_type, seq_num & 0x0f, state); /* Finally dispatch if ready */ if (m->frames_to_go == 0) { message_buffer = m->message_buffer; m->message_buffer = NULL; m->malloced = 0; sm_incoming_function(i->message_type, message_buffer, m->message_length, state); free(message_buffer); } } } else { dprintf("Bad checksum!\n"); } } break; case FBUS_RX_EchoSource: i->message_source = rx_byte; i->state = FBUS_RX_EchoType; if (rx_byte != 0x0c) { i->state = FBUS_RX_Sync; dprintf("The fbus stream is out of sync - expected 0x0c, got 0x%02x\n", rx_byte); } break; case FBUS_RX_EchoType: i->message_type = rx_byte; i->state = FBUS_RX_EchoLength1; break; case FBUS_RX_EchoLength1: i->state = FBUS_RX_EchoLength2; break; case FBUS_RX_EchoLength2: i->frame_length = rx_byte; i->state = FBUS_RX_EchoMessage; i->buffer_count = 0; break; case FBUS_RX_EchoMessage: if (i->buffer_count >= FBUS_FRAME_MAX_LENGTH) { dprintf("FBUS: Message buffer overrun - resetting\n"); i->state = FBUS_RX_Sync; break; } i->buffer_count++; if (i->buffer_count == i->frame_length + (i->frame_length % 2) + 2) { i->state = FBUS_RX_Sync; dprintf("[Echo cancelled]\n"); } break; } } /* This is the main loop function which must be called regularly */ /* timeout can be used to make it 'busy' or not */ static gn_error fbus_loop(struct timeval *timeout, struct gn_statemachine *state) { unsigned char buffer[BUFFER_SIZE]; int count, res; res = device_select(timeout, state); if (res > 0) { res = device_read(buffer, sizeof(buffer), state); for (count = 0; count < res; count++) fbus_rx_statemachine(buffer[count], state); } else return GN_ERR_TIMEOUT; /* This traps errors from device_read */ if (res > 0) return GN_ERR_NONE; else return GN_ERR_INTERNALERROR; } /* Prepares the message header and sends it, prepends the message start byte (0x1e) and other values according the value specified when called. Calculates checksum and then sends the lot down the pipe... */ int fbus_tx_send_frame(u8 message_length, u8 message_type, u8 *buffer, struct gn_statemachine *state) { u8 out_buffer[FBUS_TRANSMIT_MAX_LENGTH + 5]; int count, current = 0; unsigned char checksum; /* FIXME - we should check for the message length ... */ /* Now construct the message header. */ if (IR_MODE(state)) out_buffer[current++] = FBUS_IR_FRAME_ID; /* Start of the IR frame indicator */ else /* connection_type == GN_CT_Serial */ out_buffer[current++] = FBUS_FRAME_ID; /* Start of the frame indicator */ out_buffer[current++] = FBUS_DEVICE_PHONE; /* Destination */ out_buffer[current++] = FBUS_DEVICE_PC; /* Source */ out_buffer[current++] = message_type; /* Type */ out_buffer[current++] = 0; /* Length */ out_buffer[current++] = message_length; /* Length */ /* Copy in data if any. */ if (message_length != 0) { memcpy(out_buffer + current, buffer, message_length); current += message_length; } /* If the message length is odd we should add pad byte 0x00 */ if (message_length % 2) out_buffer[current++] = 0x00; /* Now calculate checksums over entire message and append to message. */ /* Odd bytes */ checksum = 0; for (count = 0; count < current; count += 2) checksum ^= out_buffer[count]; out_buffer[current++] = checksum; /* Even bytes */ checksum = 0; for (count = 1; count < current; count += 2) checksum ^= out_buffer[count]; out_buffer[current++] = checksum; /* Send it out... */ if (device_write(out_buffer, current, state) != current) return false; return true; } /* Main function to send an fbus message */ /* Splits up the message into frames if necessary */ static gn_error fbus_send_message(unsigned int messagesize, unsigned char messagetype, unsigned char *message, struct gn_statemachine *state) { u8 seqnum, frame_buffer[FBUS_CONTENT_MAX_LENGTH + 2]; u8 nom, lml; /* number of messages, last message len */ int i; if (!FBUSINST(state)) return GN_ERR_FAILED; seqnum = 0x40 + FBUSINST(state)->request_sequence_number; FBUSINST(state)->request_sequence_number = (FBUSINST(state)->request_sequence_number + 1) & 0x07; /* * For the very first time sequence number should be ORed with * 0x20. It should initialize sequence counter in the phone. */ if (FBUSINST(state)->init_frame) { seqnum |= 0x20; FBUSINST(state)->init_frame = 0; } if (messagesize > FBUS_CONTENT_MAX_LENGTH) { nom = (messagesize + FBUS_CONTENT_MAX_LENGTH - 1) / FBUS_CONTENT_MAX_LENGTH; lml = messagesize - ((nom - 1) * FBUS_CONTENT_MAX_LENGTH); for (i = 0; i < nom - 1; i++) { memcpy(frame_buffer, message + (i * FBUS_CONTENT_MAX_LENGTH), FBUS_CONTENT_MAX_LENGTH); frame_buffer[FBUS_CONTENT_MAX_LENGTH] = nom - i; frame_buffer[FBUS_CONTENT_MAX_LENGTH + 1] = seqnum; fbus_tx_send_frame(FBUS_CONTENT_MAX_LENGTH + 2, messagetype, frame_buffer, state); seqnum = FBUSINST(state)->request_sequence_number; FBUSINST(state)->request_sequence_number = (FBUSINST(state)->request_sequence_number + 1) & 0x07; } memcpy(frame_buffer, message + ((nom - 1) * FBUS_CONTENT_MAX_LENGTH), lml); frame_buffer[lml] = 0x01; frame_buffer[lml + 1] = seqnum; fbus_tx_send_frame(lml + 2, messagetype, frame_buffer, state); } else { memcpy(frame_buffer, message, messagesize); frame_buffer[messagesize] = 0x01; frame_buffer[messagesize + 1] = seqnum; fbus_tx_send_frame(messagesize + 2, messagetype, frame_buffer, state); } return GN_ERR_NONE; } static int fbus_tx_send_ack(u8 message_type, u8 message_seq, struct gn_statemachine *state) { unsigned char request[2]; request[0] = message_type; request[1] = message_seq; dprintf("[Sending Ack of type %02x, seq: %x]\n", message_type, message_seq); return fbus_tx_send_frame(2, 0x7f, request, state); } static void fbus_reset(struct gn_statemachine *state) { int count; /* Init variables */ FBUSINST(state)->i.state = FBUS_RX_Sync; FBUSINST(state)->i.buffer_count = 0; for (count = 0; count < FBUS_MESSAGE_MAX_TYPES; count++) { FBUSINST(state)->messages[count].malloced = 0; FBUSINST(state)->messages[count].frames_to_go = 0; FBUSINST(state)->messages[count].message_length = 0; FBUSINST(state)->messages[count].message_buffer = NULL; } } /* Initialise variables and start the link */ /* state is only passed around to allow for multiple state machines (one day...) */ gn_error fbus_initialise(int attempt, struct gn_statemachine *state) { unsigned char init_char = 0x55; bool connection = false; if (!state) return GN_ERR_FAILED; /* Fill in the link functions */ state->link.loop = &fbus_loop; state->link.send_message = &fbus_send_message; state->link.reset = &fbus_reset; state->link.cleanup = NULL; /* Check for a valid init length */ if (state->config.init_length == 0) state->config.init_length = 250; /* Start up the link */ if ((FBUSINST(state) = calloc(1, sizeof(fbus_link))) == NULL) return GN_ERR_MEMORYFULL; FBUSINST(state)->request_sequence_number = 0; FBUSINST(state)->init_frame = 1; switch (state->config.connection_type) { case GN_CT_Infrared: case GN_CT_Tekram: connection = fbus_ir_open(state); break; case GN_CT_Serial: case GN_CT_TCP: switch (attempt) { case 0: case 1: connection = fbus_serial_open(1 - attempt, state); break; case 2: connection = at2fbus_serial_open(state, state->config.connection_type); break; default: break; } break; case GN_CT_DAU9P: connection = fbus_serial_open(0, state); break; case GN_CT_DLR3P: switch (attempt) { case 0: connection = at2fbus_serial_open(state, GN_CT_Serial); break; case 1: connection = fbus_serial_open(1, state); break; default: break; } break; #ifdef HAVE_BLUETOOTH case GN_CT_Bluetooth: connection = at2fbus_serial_open(state, state->config.connection_type); break; #endif default: break; } if (!connection) { free(FBUSINST(state)); FBUSINST(state) = NULL; return GN_ERR_FAILED; } /* Send init string to phone, this is a bunch of 0x55 characters. Timing is empirical. */ /* I believe that we need/can do this for any phone to get the UART synced */ if (state->config.connection_type != GN_CT_Bluetooth && state->config.connection_type != GN_CT_TCP) { int count; for (count = 0; count < state->config.init_length; count++) { usleep(100); device_write(&init_char, 1, state); } } fbus_reset(state); return GN_ERR_NONE; } gnokii-0.6.31/common/links/utils.c0000644000175000017500000000433511666163120015124 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2001-2002 Pavel Machek, Ladis Michl, Manfred Jonsson Copyright (C) 2001 Chris Kemp Copyright (C) 2001-2011 Pawel Kot Copyright (C) 2002-2004 BORBELY Zoltan */ #include "config.h" /* System header files */ #include #include #include /* Various header file */ #include "compat.h" #include "misc.h" #include "gnokii.h" #include "links/utils.h" #include "device.h" gn_error link_terminate(struct gn_statemachine *state) { if (!state) return GN_ERR_FAILED; /* device_close(&(state->Device)); */ if (state->link.cleanup) state->link.cleanup(state); free(state->link.link_instance); state->link.link_instance = NULL; device_close(state); return GN_ERR_NONE; /* FIXME */ } void at_dprintf(char *prefix, char *buf, int len) { #ifdef DEBUG int in = 0, out = 0; char *pos = prefix; char debug_buf[1024]; while (*pos) debug_buf[out++] = *pos++; debug_buf[out++] ='['; while ((in < len) && (out < 1016)) { if (buf[in] == '\n') { snprintf(debug_buf + out, sizeof(debug_buf) - out, ""); in++; out += 4; } else if (buf[in] == '\r') { snprintf(debug_buf + out, sizeof(debug_buf) - out, ""); in++; out += 4; } else if (buf[in] < 32) { debug_buf[out++] = '^'; debug_buf[out++] = buf[in++] + 64; } else { debug_buf[out++] = buf[in++]; } } debug_buf[out++] =']'; debug_buf[out++] ='\n'; debug_buf[out] ='\0'; dprintf("%s", debug_buf); #endif } gnokii-0.6.31/common/links/cbus.c0000644000175000017500000002051211666163120014713 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2001 Pavel Machek Copyright (C) 2001-2003 Ladislav Michl Copyright (C) 2001 Manfred Jonsson Copyright (C) 2001-2011 Pawel Kot Copyright (C) 2002-2003 BORBELY Zoltan */ #include #include "config.h" #include "compat.h" #include "device.h" #include "misc.h" #include "gnokii-internal.h" #include "links/utils.h" #include "links/cbus.h" static void cbus_wait_for_idle(int timeout, struct gn_statemachine *state) { int n, prev; device_nreceived(&n, state); do { prev = n; usleep(timeout); if (device_nreceived(&n, state) != GN_ERR_NONE) break; } while (n != prev); } static gn_error cbus_write(unsigned char *d, size_t len, struct gn_statemachine *state) { size_t res; cbus_wait_for_idle(300, state); while (len) { res = device_write(d, len, state); if (res == -1) { if (errno != EAGAIN) { dprintf("cbus: %s\n", strerror(errno)); return GN_ERR_FAILED; } } else { d += res; len -= res; } } device_flush(state); return GN_ERR_NONE; } static gn_error cbus_wakeup1(struct gn_statemachine *state) { int i; unsigned char p[] = {0x38, 0x19, 0xa6, 0x70, 0x00, 0x00, 0x00}; for (i = 0; i < 6; i++) p[6] ^= p[i]; return cbus_write(p, sizeof(p), state); } static gn_error cbus_wakeup2(struct gn_statemachine *state) { int i; unsigned char p[] = {0x38, 0x19, 0x90, 0x70, 0x01, 0x00, 0x44, 0x00}; for (i = 0; i < 7; i++) p[7] ^= p[i]; return cbus_write(p, sizeof(p), state); } static gn_error cbus_send_message(unsigned int msglen, unsigned char msgtype, unsigned char *msg, struct gn_statemachine *state) { unsigned char p[CBUS_MAX_FRAME_LENGTH], csum = 0; int i, pos; p[0] = 0x34; p[1] = 0x19; p[2] = msgtype; p[3] = 0x68; p[4] = msglen & 0xff; p[5] = msglen >> 8; memcpy(p+6, msg, msglen); pos = 6+msglen; for (i = 0; i < pos; i++) csum ^= p[i]; p[pos++] = csum; usleep(50000); return cbus_write(p, pos, state); } static void dump_packet(cbus_instance *bi) { int i; dprintf("CBUS %s ", (bi->frame_header1 == 0x19) ? "<-" : "->"); dprintf("hdr: (%02x,%02x) ", bi->frame_header1, bi->frame_header2); dprintf("cmd: (%02x,%02x) ", bi->frame_type1, bi->frame_type2); dprintf("len: %d\n", bi->msg_len); if (bi->msg_len == 0) return; if (bi->frame_type1 == 0x3c || bi->frame_type1 == 0x3e) { at_dprintf(" data: ", bi->msg, bi->msg_len); } else { dprintf(" data: "); for (i = 0; i < bi->msg_len; i++) dprintf("%02x ", bi->msg[i]); dprintf("\n"); } } /* * State machine for receive handling. Called once for each character * received from the phone. * * Some machines are simply not fast enough to send 0xa5 ack byte. In that case * phone starts retransmit last frame until acked by computer (max. 3 times). * We are comparing current frame with previous one and only unique frames are * send back to statemachine. */ static void cbus_rx_statemachine(unsigned char rx_byte, struct gn_statemachine *state) { cbus_instance *bi = CBUSINST(state); if (!bi) return; if (bi->state != CBUS_RX_CSum) bi->csum ^= rx_byte; switch (bi->state) { case CBUS_RX_Header: switch (rx_byte) { case 0x38: case 0x34: if (bi->prev_rx_byte == 0x19) bi->state = CBUS_RX_FrameType1; break; case 0x19: if ((bi->prev_rx_byte == 0x38) || (bi->prev_rx_byte == 0x34)) bi->state = CBUS_RX_FrameType1; break; default: dprintf("CBUS: discarding (%02x)\n", rx_byte); break; } if (bi->state != CBUS_RX_Header) { bi->frame_header1 = bi->prev_rx_byte; bi->frame_header2 = rx_byte; bi->csum = bi->prev_rx_byte ^ rx_byte; bi->unique = bi->msg_pos = 0; } break; case CBUS_RX_FrameType1: bi->unique = bi->frame_type1 != rx_byte; bi->frame_type1 = rx_byte; bi->state = CBUS_RX_FrameType2; break; case CBUS_RX_FrameType2: bi->unique |= bi->frame_type1 != rx_byte; bi->frame_type2 = rx_byte; bi->state = CBUS_RX_LengthLB; break; /* message length - low byte */ case CBUS_RX_LengthLB: bi->msg_len = rx_byte; bi->state = CBUS_RX_LengthHB; break; /* message length - high byte */ case CBUS_RX_LengthHB: bi->msg_len = bi->msg_len | rx_byte << 8; /* there are also empty messages */ if (bi->msg_len == 0) bi->state = CBUS_RX_CSum; else bi->state = CBUS_RX_Message; break; /* get each byte of the message body */ case CBUS_RX_Message: bi->unique |= bi->msg[bi->msg_pos] != rx_byte; bi->msg[bi->msg_pos++] = rx_byte; /* avoid buffer overflow */ if (bi->msg_pos == CBUS_MAX_MSG_LENGTH) { dprintf("CBUS: Message buffer overun - resetting\n"); bi->state = CBUS_RX_Header; break; } if (bi->msg_pos == bi->msg_len) { bi->msg[bi->msg_pos] = 0; bi->state = CBUS_RX_CSum; } break; case CBUS_RX_CSum: /* crc error? */ if (bi->csum != rx_byte) { dprintf("CBUS: Checksum error!\n"); bi->state = CBUS_RX_Header; break; } dump_packet(bi); /* Deal with exceptions to the rules - acks... */ if (bi->frame_header1 == 0x19) { dprintf("CBUS: sending ack\n"); device_write("\xa5", 1, state); device_flush(state); if (bi->unique) sm_incoming_function(bi->frame_type1, bi->msg, bi->msg_len, state); else dprintf("CBUS: discarding frame.\n"); } bi->state = CBUS_RX_Ack; break; /* get ack */ case CBUS_RX_Ack: if (rx_byte == 0xa5) { if (bi->frame_header1 != 0x19) { dprintf("CBUS: got ack\n"); sm_incoming_acknowledge(state); } } else dprintf("CBUS: ack expected, got 0x%02x\n", rx_byte); bi->state = CBUS_RX_Header; break; default: break; } bi->prev_rx_byte = rx_byte; } static gn_error bus_reset(struct gn_statemachine *state) { #ifndef WIN32 tcsendbreak(device_getfd(state), 0); #endif cbus_wakeup1(state); sm_block_no_retry_timeout(0, 100, NULL, state); cbus_wakeup2(state); sm_block_no_retry_timeout(0, 100, NULL, state); return GN_ERR_NONE; } static bool cbus_open_serial(char *device, struct gn_statemachine *state) { int result = device_open(device, false, false, false, GN_CT_Serial, state); if (!result) { perror(_("Couldn't open CBUS device")); return false; } device_changespeed(9600, state); device_setdtrrts(1, 0, state); return true; } /* * This is the main loop function which must be called regularly * timeout can be used to make it 'busy' or not */ static gn_error cbus_loop(struct timeval *timeout, struct gn_statemachine *state) { int count; size_t res; unsigned char buffer[BUFFER_SIZE]; res = device_select(timeout, state); if (res > 0) { res = device_read(buffer, sizeof(buffer), state); for (count = 0; count < res; count++) cbus_rx_statemachine(buffer[count], state); } else return GN_ERR_TIMEOUT; /* This traps errors from device_read */ if (res > 0) return GN_ERR_NONE; else return GN_ERR_INTERNALERROR; } /* Initialise variables and start the link */ gn_error cbus_initialise(struct gn_statemachine *state) { gn_error error = GN_ERR_NONE; cbus_instance *businst; if (!state) return GN_ERR_FAILED; if (!(businst = malloc(sizeof(cbus_instance)))) return GN_ERR_FAILED; /* Fill in the link functions */ state->link.loop = &cbus_loop; state->link.send_message = &cbus_send_message; state->link.reset = NULL; state->link.cleanup = NULL; CBUSINST(state) = businst; if (state->config.connection_type == GN_CT_Serial) { if (!cbus_open_serial(state->config.port_device, state)) error = GN_ERR_FAILED; } else { dprintf("Device not supported by C-bus\n"); error = GN_ERR_FAILED; } if (error) { dprintf("C-bus initialization failed (%d)\n", error); free(CBUSINST(state)); CBUSINST(state) = NULL; } else { error = bus_reset(state); } return error; } gnokii-0.6.31/common/links/fbus-3110.c0000644000175000017500000003176411666163120015313 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 2001-2011 Pawel Kot Copyright (C) 2002 Ladis Michl Copyright (C) 2002-2003 BORBELY Zoltan Copyright (C) 2003-2004 Osma Suominen This file provides an API for accessing functions via fbus. See README for more details on supported mobile phones. The various routines are called fb3110_(whatever). */ #include "config.h" /* System header files */ #include #include #include /* Various header file */ #include "compat.h" #include "misc.h" #include "gnokii-internal.h" #include "device.h" #include "links/fbus-3110.h" #include "links/utils.h" static bool fb3110_serial_open(struct gn_statemachine *state); static void fb3110_rx_frame_handle(fb3110_incoming_frame *i, struct gn_statemachine *state); static void fb3110_rx_state_machine(unsigned char rx_byte, struct gn_statemachine *state); static gn_error fb3110_tx_frame_send(u8 frame_type, u8 message_length, u8 message_type, u8 sequence_byte, u8 *buffer, struct gn_statemachine *state); static gn_error fb3110_message_send(unsigned int messagesize, unsigned char messagetype, unsigned char *message, struct gn_statemachine *state); static void fb3110_tx_ack_send(u8 messagetype, u8 checksum, struct gn_statemachine *state); static void fb3110_sequence_number_update(struct gn_statemachine *state); static int fb3110_message_type_fold(int type); /* FIXME - win32 stuff! */ #define FBUSINST(s) (*((fb3110_link **)(&(s)->link.link_instance))) /*--------------------------------------------*/ static bool fb3110_serial_open(struct gn_statemachine *state) { if (!state) return false; /* Open device. */ if (!device_open(state->config.port_device, false, false, false, GN_CT_Serial, state)) { perror(_("Couldn't open FBUS device")); return false; } device_changespeed(115200, state); return true; } /* * Handles one complete frame. What to do with it depends on the frame * type. Frames are acknowledged if needed and information about them is * passed to the main statemachine. */ static void fb3110_rx_frame_handle(fb3110_incoming_frame *i, struct gn_statemachine *state) { int count; if (!i) return; dprintf("--> %02x:%02x:", i->frame_type, i->frame_len); for (count = 0; count < i->buffer_count; count++) dprintf("%02hhx:", i->buffer[count]); dprintf("\n"); if (i->frame_type == FB3110_FRAME_TYPE_IN_RLP) { /* RLP frame */ /* Transfer RLP frame to state machine. The messagetype * should always be 0x02 in this case, so the frame type * doesn't have to be passed to the statemachine and on to * the driver - RLP frames can be told apart by messagetype. * But check message type anyway just to make sure. */ if (i->buffer[0] != 0x02) dprintf("RLP frame with non-0x02 message type (0x%02x) received!\n", i->buffer[0]); sm_incoming_function(i->buffer[0], i->buffer, i->frame_len, state); } else if (i->buffer[1] < 0x08 || i->buffer[1] > 0x0f) { /* msg frame */ /* Send an ack */ fb3110_tx_ack_send(i->buffer[0], i->buffer[1], state); if (FBUSINST(state)->last_incoming_sequence_number == i->buffer[1]) { dprintf("Duplicate message received. Sent ack, not handling.\n"); return; } FBUSINST(state)->last_incoming_sequence_number = i->buffer[1]; /* Transfer message to state machine */ sm_incoming_function(fb3110_message_type_fold(i->buffer[0]), i->buffer, i->frame_len, state); } else { /* ack frame */ fb3110_sequence_number_update(state); dprintf("Received ack for message type 0x%02x\n", i->buffer[0]); sm_incoming_acknowledge(state); } } /* * RX_State machine for receive handling. * Called once for each character received from the phone. */ static void fb3110_rx_state_machine(unsigned char rx_byte, struct gn_statemachine *state) { fb3110_incoming_frame *i = &FBUSINST(state)->i; if (!i) return; switch (i->state) { /* Phone is currently off. Wait for 0x55 before restarting */ case FB3110_RX_Discarding: if (rx_byte != 0x55) break; /* Seen 0x55, restart at 0x04 */ i->state = FB3110_RX_Sync; dprintf("restarting.\n"); /* FALLTHROUGH */ /* Messages from the phone start with an 0x04 during "normal" operation, 0x03 when in data/fax mode. We use this to "synchronise" with the incoming data stream. */ case FB3110_RX_Sync: if (rx_byte == 0x04 || rx_byte == 0x03) { i->frame_type = rx_byte; i->checksum = rx_byte; i->state = FB3110_RX_GetLength; } break; /* Next byte is the length of the message including the message type byte but not including the checksum. */ case FB3110_RX_GetLength: i->frame_len = rx_byte; i->buffer_count = 0; i->checksum ^= rx_byte; i->state = FB3110_RX_GetMessage; break; /* Get each byte of the message. We deliberately get one too many bytes so we get the checksum here as well. */ case FB3110_RX_GetMessage: i->buffer[i->buffer_count] = rx_byte; i->buffer_count++; if (i->buffer_count >= FB3110_FRAME_MAX_LENGTH) { dprintf("FBUS: Message buffer overun - resetting\n"); i->state = FB3110_RX_Sync; break; } /* If this is the last byte, it's the checksum. */ if (i->buffer_count > i->frame_len) { /* Is the checksum correct? */ if (rx_byte == i->checksum) { /* Frame received OK, deal with it! */ fb3110_rx_frame_handle(i, state); } else { /* Checksum didn't match so ignore. */ dprintf("Bad checksum!\n"); } i->state = FB3110_RX_Sync; } i->checksum ^= rx_byte; break; } } /* * This is the main loop function which must be called regularly * timeout can be used to make it 'busy' or not */ static gn_error fb3110_loop(struct timeval *timeout, struct gn_statemachine *state) { unsigned char buffer[BUFFER_SIZE]; int count, res; res = device_select(timeout, state); if (res > 0) { res = device_read(buffer, sizeof(buffer), state); for (count = 0; count < res; count++) fb3110_rx_state_machine(buffer[count], state); } else return GN_ERR_TIMEOUT; /* This traps errors from device_read */ if (res > 0) return GN_ERR_NONE; else return GN_ERR_INTERNALERROR; } /* * Prepares the message header and sends it, prepends the message start * byte (0x01) and other values according the value specified when called. * Calculates checksum and then sends the lot down the pipe... */ static gn_error fb3110_tx_frame_send(u8 frame_type, u8 message_length, u8 message_type, u8 sequence_byte, u8 *buffer, struct gn_statemachine *state) { u8 out_buffer[FB3110_TRANSMIT_MAX_LENGTH]; int count, current = 0; unsigned char checksum; /* Check message isn't too long, once the necessary header and trailer bytes are included. */ if ((message_length + 5) > FB3110_TRANSMIT_MAX_LENGTH) { fprintf(stderr, _("fb3110_tx_frame_send - message too long!\n")); return GN_ERR_INTERNALERROR; } /* Now construct the message header. */ out_buffer[current++] = frame_type; /* Start of frame */ out_buffer[current++] = message_length + 2; /* Length */ out_buffer[current++] = message_type; /* Type */ out_buffer[current++] = sequence_byte; /* Sequence number */ /* Copy in data if any. */ if (message_length != 0) { memcpy(out_buffer + current, buffer, message_length); current += message_length; } /* Now calculate checksum over entire message and append to message. */ checksum = 0; for (count = 0; count < current; count++) checksum ^= out_buffer[count]; out_buffer[current++] = checksum; dprintf("<-- "); for (count = 0; count < current; count++) dprintf("%02hhx:", out_buffer[count]); dprintf("\n"); /* Send it out... */ if (device_write(out_buffer, current, state) != current) return GN_ERR_INTERNALERROR; return GN_ERR_NONE; } /* * Main function to send an fbus message */ static gn_error fb3110_message_send(unsigned int messagesize, unsigned char messagetype, unsigned char *message, struct gn_statemachine *state) { u8 seqnum, frame_type; /* Data (RLP) frame always have message type 0x01 */ if (messagetype == 0x01) { /* this is a bit of a hack: outgoing RLP frames have and extra byte between msgtype and seqno, indicating DTX; thus we swap seqnum with message[0] */ seqnum = message[0]; message[0] = 0xd9; /* seqno constant for RLP frames */ frame_type = FB3110_FRAME_TYPE_OUT_RLP; } else { /* normal command frame */ seqnum = FBUSINST(state)->request_sequence_number; frame_type = FB3110_FRAME_TYPE_OUT_CMD; } return fb3110_tx_frame_send(frame_type, messagesize, messagetype, seqnum, message, state); } /* * Sends the "standard" acknowledge message back to the phone in response to * a message it sent automatically or in response to a command sent to it. */ static void fb3110_tx_ack_send(u8 messagetype, u8 seqno, struct gn_statemachine *state) { if (fb3110_tx_frame_send(FB3110_FRAME_TYPE_OUT_CMD, 0, messagetype, (seqno & 0x1f) - 0x08, NULL, state)) dprintf("Failed to acknowledge message type %02x.\n", messagetype); else dprintf("Acknowledged message type %02x.\n", messagetype); } static void fb3110_reset(struct gn_statemachine *state) { /* Init variables */ FBUSINST(state)->i.state = FB3110_RX_Sync; } /* * Initialise variables and start the link * newlink is actually part of state - but the link code should not * anything about state. State is only passed around to allow for * muliple state machines (one day...) */ gn_error fb3110_initialise(struct gn_statemachine *state) { unsigned char init_char = 0x55; unsigned char count; static int try = 0; if (!state) return GN_ERR_FAILED; try++; if (try > 2) return GN_ERR_FAILED; /* Fill in the link functions */ state->link.loop = &fb3110_loop; state->link.send_message = &fb3110_message_send; state->link.reset = &fb3110_reset; state->link.cleanup = NULL; /* Check for a valid init length */ if (state->config.init_length == 0) state->config.init_length = 100; /* Start up the link */ if ((FBUSINST(state) = calloc(1, sizeof(fb3110_link))) == NULL) return GN_ERR_MEMORYFULL; FBUSINST(state)->request_sequence_number = 0x10; /* Since 0x08 is within the range of seqnos used for computer->ME, * it should be pretty safe to assume that the phone doesn't * initiate communication with that seqno. If we use e.g. 0x00 or * 0x30, some nasty errors may happen. */ FBUSINST(state)->last_incoming_sequence_number = 0x08; if (!fb3110_serial_open(state)) { free(FBUSINST(state)); FBUSINST(state) = NULL; return GN_ERR_FAILED; } /* Send init string to phone, this is a bunch of 0x55 characters. Timing is empirical. I believe that we need/can do this for any phone to get the UART synced */ for (count = 0; count < state->config.init_length; count++) { usleep(1000); device_write(&init_char, 1, state); } fb3110_reset(state); return GN_ERR_NONE; } /* Any command we originate must have a unique SequenceNumber. Observation to * date suggests that these values start at 0x10 and cycle up to 0x17 * before repeating again. Perhaps more accurately, the numbers cycle * 0,1,2,3..7 with bit 4 of the byte premanently set. */ static void fb3110_sequence_number_update(struct gn_statemachine *state) { FBUSINST(state)->request_sequence_number++; if (FBUSINST(state)->request_sequence_number > 0x17 || FBUSINST(state)->request_sequence_number < 0x10) FBUSINST(state)->request_sequence_number = 0x10; } /* The 3110 protocol has a tendency to use different message types to * indicate successful and failed actions. These are not handled very well by * the gnokii internals, so they are "folded" together and dealt with in the * 3110 code instead. The logic is that each success/failure message type * pair is reported as the type of the message to indicate success. * The argument is the original message type i.e. first byte of message. */ static int fb3110_message_type_fold(int type) { switch (type) { case 0x16: case 0x17: return 0x16; /* initialization */ case 0x21: case 0x22: return 0x21; /* send DTMF */ case 0x28: case 0x29: return 0x28; /* SMS sent */ case 0x2a: case 0x2b: return 0x2a; /* SMS saved */ case 0x2c: case 0x2d: return 0x2c; /* SMS read */ case 0x2e: case 0x2f: return 0x2e; /* SMS deleted */ case 0x3d: case 0x3e: return 0x3d; /* SMSC set */ case 0x44: case 0x45: return 0x44; /* mem location set */ case 0x46: case 0x47: return 0x46; /* mem location read */ default: return type; /* all others left as-is */ } } gnokii-0.6.31/common/links/atbus.c0000644000175000017500000002210611666163120015076 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2001-2002 Manfred Jonsson Copyright (C) 2001-2003 Ladis Michl Copyright (C) 2001-2011 Pawel Kot Copyright (C) 2002-2004 BORBELY Zoltan Copyright (C) 2002 Pavel Machek */ #include "config.h" /* System header files */ #include #include #include #include /* Various header file */ #include "compat.h" #include "misc.h" #include "links/atbus.h" #include "links/utils.h" #include "gnokii-internal.h" #include "gnokii.h" #include "device.h" /* ugly hack, but we need GN_OP_AT_Ring -- bozo */ #include "phones/atgen.h" /* * FIXME - when sending an AT command while another one is still in progress, * the old command is aborted and the new ignored. the result is _one_ error * message from the phone. */ static int xwrite(unsigned char *d, size_t len, struct gn_statemachine *sm) { size_t res; at_dprintf("write: ", d, len); while (len) { res = device_write(d, len, sm); if (res == -1) { if (errno != EAGAIN) { perror(_("gnokii I/O error")); return -1; } } else { d += res; len -= res; } } return 0; } static bool atbus_open(int mode, char *device, struct gn_statemachine *sm) { int result = device_open(device, false, false, mode, sm->config.connection_type, sm); if (!result) { perror(_("Couldn't open ATBUS device")); return false; } if (mode) { /* * make 7110 with dlr-3 happy. the nokia dlr-3 cable provides * hardware handshake lines but is, at least at initialization, * slow. to be properly detected, state changes must be longer * than 700 ms. if the timing is too fast all commands after dtr * high will be ignored by the phone until dtr is toggled again. * to reset the phone and set a sane state, dtr must pulled low. * when irda is turned on in the phone, dtr must pulled high to * switch on the serial line of the phone (this will switch off * irda). only set it high after serial line initialization * (when it probably was low before) is not enough. so we do * high, low and high again, always with one second apply time. * also wait one second before sending commands or init will * fail. */ device_setdtrrts(1, 1, sm); sleep(1); device_setdtrrts(0, 1, sm); sleep(1); device_setdtrrts(1, 1, sm); sleep(1); } else { device_setdtrrts(1, 1, sm); } return true; } static gn_error at_send_message(unsigned int message_length, unsigned char message_type, unsigned char *msg, struct gn_statemachine *sm) { usleep(10000); sm_incoming_acknowledge(sm); return xwrite(msg, message_length, sm) ? GN_ERR_UNKNOWN : GN_ERR_NONE; } char *findcrlfbw(unsigned char *str, int len) { while (len-- && (*str != '\n') && (*str-1 != '\r')) str--; return len > 0 ? str+1 : NULL; } int numchar(unsigned char *str, unsigned char ch) { int count = 0; while (*str && *str != '\r') { if (*str++ == ch) count++; } return count; } /* * rx state machine for receive handling. called once for each character * received from the phone. */ static void atbus_rx_statemachine(unsigned char rx_char, struct gn_statemachine *sm) { int error; atbus_instance *bi = AT_BUSINST(sm); int unsolicited, count; char *start; if (!bi) return; if (bi->rbuf_pos >= bi->rbuf_size - 1) { bi->rbuf_size += RBUF_SEG; bi->rbuf = realloc(bi->rbuf, bi->rbuf_size); } bi->rbuf[bi->rbuf_pos++] = rx_char; bi->rbuf[bi->rbuf_pos] = '\0'; if (bi->rbuf_pos < bi->binlen) return; bi->rbuf[0] = GN_AT_NONE; /* first check if is found at end of reply_buf. * none: the needed length is greater 4 because we don't * need to enter if no result/error will be found. */ if (bi->rbuf_pos == 3 && !strcmp(bi->rbuf + 1, "\r\n")) { bi->rbuf_pos = 1; bi->rbuf[1] = '\0'; } unsolicited = 0; if (bi->rbuf_pos > 4 && !strncmp(bi->rbuf + bi->rbuf_pos - 2, "\r\n", 2)) { /* try to find previous */ start = findcrlfbw(bi->rbuf + bi->rbuf_pos - 2, bi->rbuf_pos - 1); /* if not found, start at buffer beginning */ if (!start) start = bi->rbuf+1; /* there are certainly more that 2 chars in buffer */ if (!strncmp(start, "OK", 2)) bi->rbuf[0] = GN_AT_OK; else if (bi->rbuf_pos > 7 && !strncmp(start, "ERROR", 5)) bi->rbuf[0] = GN_AT_ERROR; /* FIXME: use error codes some useful way */ else if (sscanf(start, "+CMS ERROR: %d", &error) == 1) { bi->rbuf[0] = GN_AT_CMS; bi->rbuf[1] = error / 256; bi->rbuf[2] = error % 256; } else if (sscanf(start, "+CME ERROR: %d", &error) == 1) { bi->rbuf[0] = GN_AT_CME; bi->rbuf[1] = error / 256; bi->rbuf[2] = error % 256; } else if (!strncmp(start, "RING", 4) || !strncmp(start, "CONNECT", 7) || !strncmp(start, "BUSY", 4) || !strncmp(start, "NO ANSWER", 9) || !strncmp(start, "NO CARRIER", 10) || !strncmp(start, "NO DIALTONE", 11)) { bi->rbuf[0] = GN_OP_AT_Ring; unsolicited = 1; } else if (*start == '+') { /* check for possible unsolicited responses */ if (!strncmp(start + 1, "CREG:", 5)) { count = numchar(start, ','); if (count == 2) { bi->rbuf[0] = GN_OP_GetNetworkInfo; unsolicited = 1; } } else if (!strncmp(start + 1, "CPIN:", 5)) { bi->rbuf[0] = GN_AT_OK; } else if (!strncmp(start + 1, "CRING:", 6) || !strncmp(start + 1, "CLIP:", 5) || !strncmp(start + 1, "CLCC:", 5)) { bi->rbuf[0] = GN_OP_AT_Ring; unsolicited = 1; } else if (!strncmp(start + 1, "CMTI:", 5)) { bi->rbuf[0] = GN_OP_AT_IncomingSMS; unsolicited = 1; } } } /* check if SMS prompt is found */ if (bi->rbuf_pos > 4 && !strncmp(bi->rbuf + bi->rbuf_pos - 4, "\r\n> ", 4)) bi->rbuf[0] = GN_AT_PROMPT; if (bi->rbuf[0] != GN_AT_NONE) { int rbuf_pos = bi->rbuf_pos; at_dprintf("read : ", bi->rbuf + 1, bi->rbuf_pos - 1); bi->rbuf_pos = 1; bi->binlen = 1; if (unsolicited) sm_incoming_function(bi->rbuf[0], start, rbuf_pos - 1 - (start - bi->rbuf), sm); else sm_incoming_function(sm->last_msg_type, bi->rbuf, rbuf_pos - 1, sm); free(bi->rbuf); bi->rbuf = NULL; bi->rbuf_size = 0; return; } #if 0 /* needed for binary date etc */ TODO: correct reading of variable length integers if (reply_buf_pos == 12) { if (!strncmp(reply_buf + 3, "ABC", 3) { binlength = atoi(reply_buf + 8); } } #endif } static gn_error atbus_loop(struct timeval *timeout, struct gn_statemachine *sm) { unsigned char buffer[BUFFER_SIZE]; int count, res; res = device_select(timeout, sm); if (res > 0) { res = device_read(buffer, sizeof(buffer), sm); for (count = 0; count < res; count++) { atbus_rx_statemachine(buffer[count], sm); } } else return GN_ERR_TIMEOUT; /* This traps errors from device_read */ if (res > 0) return GN_ERR_NONE; else return GN_ERR_INTERNALERROR; } static void atbus_reset(struct gn_statemachine *state) { atbus_instance *bi = AT_BUSINST(state); bi->rbuf = NULL; bi->rbuf_size = 0; bi->rbuf_pos = 1; bi->binlen = 1; } /* Initialise variables and start the link */ /* Fixme we allow serial and irda for connection to reduce */ /* bug reports. this is pretty silly for /dev/ttyS?. */ gn_error atbus_initialise(int mode, struct gn_statemachine *state) { gn_error error = GN_ERR_NONE; atbus_instance *businst; if (!state) return GN_ERR_FAILED; if (!(businst = malloc(sizeof(atbus_instance)))) return GN_ERR_FAILED; /* Fill in the link functions */ state->link.loop = &atbus_loop; state->link.send_message = &at_send_message; state->link.reset = &atbus_reset; state->link.cleanup = NULL; AT_BUSINST(state) = businst; atbus_reset(state); switch (state->config.connection_type) { case GN_CT_Irda: if (!strcasecmp(state->config.port_device, "IrDA:IrCOMM")) { if (!device_open(state->config.port_device, false, false, false, state->config.connection_type, state)) { error = GN_ERR_FAILED; goto err; } break; } /* FALLTHROUGH */ case GN_CT_Serial: case GN_CT_TCP: if (!atbus_open(mode, state->config.port_device, state)) { error = GN_ERR_FAILED; goto err; } break; case GN_CT_Bluetooth: if (!device_open(state->config.port_device, false, false, false, state->config.connection_type, state)) { error = GN_ERR_FAILED; goto err; } break; default: dprintf("Device not supported by AT bus\n"); error = GN_ERR_FAILED; goto err; } goto out; err: dprintf("AT bus initialization failed (%d)\n", error); free(AT_BUSINST(state)); AT_BUSINST(state) = NULL; out: return error; } gnokii-0.6.31/common/links/m2bus.c0000644000175000017500000003116011666163120015010 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 2000 Chris Kemp Copyright (C) 2002-2004 BORBELY Zoltan Copyright (C) 2002-2011 Pawel Kot Copyright (C) 2002 Ladis Michl This file provides an API for accessing functions via m2bus. See README for more details on supported mobile phones. The various routines are called m2bus_(whatever). */ #include "config.h" /* System header files */ #include #include #include /* Various header file */ #include "compat.h" #include "misc.h" #include "gnokii.h" #include "device.h" #include "links/m2bus.h" #include "links/utils.h" #include "gnokii-internal.h" static void m2bus_rx_statemachine(unsigned char rx_byte, struct gn_statemachine *state); static gn_error m2bus_send_message(unsigned int messagesize, unsigned char messagetype, unsigned char *message, struct gn_statemachine *state); static gn_error m2bus_tx_send_ack(u8 message_seq, struct gn_statemachine *state); /* FIXME - win32 stuff! */ /*--------------------------------------------*/ static bool m2bus_serial_open(struct gn_statemachine *state) { int type; if (!state) return false; if (state->config.connection_type == GN_CT_TCP) type = GN_CT_TCP; else type = GN_CT_Serial; /* Open device. */ if (!device_open(state->config.port_device, true, false, false, type, state)) { perror(_("Couldn't open M2BUS device")); return false; } device_changespeed(9600, state); device_setdtrrts(0, 1, state); return true; } /* RX_State machine for receive handling. Called once for each character received from the phone. */ static void m2bus_rx_statemachine(unsigned char rx_byte, struct gn_statemachine *state) { struct timeval time_diff; m2bus_incoming_message *i = &M2BUSINST(state)->i; if (!i) return; #if 0 dprintf("rx_byte: %02x, state: %d\n", rx_byte, i->state); #endif /* XOR the byte with the current checksum */ i->checksum ^= rx_byte; switch (i->state) { /* * Messages from the phone start with an 0x1f (cable) or 0x14 (IR). * We use this to "synchronise" with the incoming data stream. However, * if we see something else, we assume we have lost sync and we require * a gap of at least 5ms before we start looking again. This is because * the data part of the frame could contain a byte which looks like the * sync byte */ case M2BUS_RX_Discarding: gettimeofday(&i->time_now, NULL); timersub(&i->time_now, &i->time_last, &time_diff); if (time_diff.tv_sec == 0 && time_diff.tv_usec < 5000) { i->time_last = i->time_now; /* no gap seen, continue discarding */ break; } /* else fall through to... */ case M2BUS_RX_Sync: if (state->config.connection_type == GN_CT_Infrared) { if (rx_byte == M2BUS_IR_FRAME_ID) { /* Initialize checksums. */ i->checksum = M2BUS_IR_FRAME_ID; i->state = M2BUS_RX_GetDestination; } else { /* Lost frame sync */ i->state = M2BUS_RX_Discarding; gettimeofday(&i->time_last, NULL); } } else { /* state->config.connection_type == GN_CT_Serial */ if (rx_byte == M2BUS_FRAME_ID) { /* Initialize checksums. */ i->checksum = M2BUS_FRAME_ID; i->state = M2BUS_RX_GetDestination; } else { /* Lost frame sync */ i->state = M2BUS_RX_Discarding; gettimeofday(&i->time_last, NULL); } } break; case M2BUS_RX_GetDestination: i->message_destination = rx_byte; i->state = M2BUS_RX_GetSource; /* * When there is a checksum error and things get out of sync * we have to manage to resync. If doing a data call at the * time, finding a 0x1f etc is really quite likely in the data * stream. Then all sorts of horrible things happen because * the packet length etc is wrong... Therefore we test here * for a destination of 0x00 or 0x1d and return to the top if * it is not */ if (rx_byte != M2BUS_DEVICE_PC && rx_byte != M2BUS_DEVICE_PHONE) { i->state = M2BUS_RX_Sync; dprintf("The m2bus stream is out of sync - expected destination, got %2x\n", rx_byte); } break; case M2BUS_RX_GetSource: i->message_source = rx_byte; i->state = M2BUS_RX_GetType; if (i->message_destination == M2BUS_DEVICE_PC && rx_byte != M2BUS_DEVICE_PHONE) { i->state = M2BUS_RX_Sync; dprintf("The m2bus stream is out of sync - expected source=PHONE, got %2x\n", rx_byte); } else if (i->message_destination == M2BUS_DEVICE_PHONE && rx_byte != M2BUS_DEVICE_PC) { i->state = M2BUS_RX_Sync; dprintf("The m2bus stream is out of sync - expected source=PC, got %2x\n", rx_byte); } break; case M2BUS_RX_GetType: i->message_type = rx_byte; if (rx_byte == 0x7f) { i->message_length = 0; i->state = M2BUS_RX_GetMessage; i->buffer_count = 0; if ((i->message_buffer = malloc(2)) == NULL) { dprintf("M2BUS: receive buffer allocation failed, requested %d bytes.\n", 2); i->state = M2BUS_RX_Sync; } } else i->state = M2BUS_RX_GetLength1; break; case M2BUS_RX_GetLength1: i->message_length = rx_byte << 8; i->state = M2BUS_RX_GetLength2; break; case M2BUS_RX_GetLength2: i->message_length += rx_byte; i->state = M2BUS_RX_GetMessage; i->buffer_count = 0; if ((i->message_buffer = malloc(i->message_length + 2)) == NULL) { dprintf("M2BUS: receive buffer allocation failed, requested %d bytes.\n", i->message_length + 2); i->state = M2BUS_RX_Sync; } break; case M2BUS_RX_GetMessage: i->message_buffer[i->buffer_count++] = rx_byte; /* If this is the last byte, it's the checksum. */ if (i->buffer_count == i->message_length + 2) { /* Is the checksum correct? */ if (i->checksum == 0x00) { /* Deal with exceptions to the rules - acks and rlp.. */ if (i->message_destination != M2BUS_DEVICE_PC) { /* echo */ } else if (i->message_type == 0x7f) { dprintf("[Received Ack, seq: %2x]\n", i->message_buffer[0]); sm_incoming_acknowledge(state); } else { /* Normal message type */ /* Send an ack (for all for now) */ m2bus_tx_send_ack(i->message_buffer[i->message_length], state); sm_incoming_acknowledge(state); /* Finally dispatch if ready */ sm_incoming_function(i->message_type, i->message_buffer, i->message_length, state); } } else { dprintf("M2BUS: Bad checksum!\n"); } free(i->message_buffer); i->message_buffer = NULL; i->state = M2BUS_RX_Sync; } break; } } /* This is the main loop function which must be called regularly */ /* timeout can be used to make it 'busy' or not */ static gn_error m2bus_loop(struct timeval *timeout, struct gn_statemachine *state) { unsigned char buffer[BUFFER_SIZE]; int count, res; res = device_select(timeout, state); if (res > 0) { res = device_read(buffer, sizeof(buffer), state); for (count = 0; count < res; count++) m2bus_rx_statemachine(buffer[count], state); } else return GN_ERR_TIMEOUT; /* This traps errors from device_read */ if (res > 0) return GN_ERR_NONE; else return GN_ERR_INTERNALERROR; } static void m2bus_wait_for_idle(int timeout, bool reset, struct gn_statemachine *state) { int n, prev; device_nreceived(&n, state); do { prev = n; usleep(timeout); if (device_nreceived(&n, state) != GN_ERR_NONE) break; } while (n != prev); if (reset) { device_setdtrrts(0, 0, state); usleep(200000); device_setdtrrts(0, 1, state); usleep(100000); } } /* * Prepares the message header and sends it, prepends the message start byte * (0x1f) and other values according the value specified when called. * Calculates checksum and then sends the lot down the pipe... */ static gn_error m2bus_send_message(unsigned int messagesize, unsigned char messagetype, unsigned char *message, struct gn_statemachine *state) { u8 *out_buffer; int count, i = 0; u8 checksum; if (!state) return GN_ERR_FAILED; if (messagesize > 0xffff) { dprintf("M2BUS: message is too big to transmit, size: %d bytes\n", messagesize); return GN_ERR_MEMORYFULL; } if ((out_buffer = malloc(messagesize + 8)) == NULL) { dprintf("M2BUS: transmit buffer allocation failed, requested %d bytes.\n", messagesize + 8); return GN_ERR_MEMORYFULL; } /* * Checksum problem: * It seems that some phones have problems with a checksum of 1F. * The frame will be recognized but it will not respond with a ACK * frame. * * Workaround: * If the checksum will be 1F, increment the sequence number so that * the checksum will be different., recalculate the checksum then and * send. * * Source: http://www.flosys.com/tdma/n5160.html */ do { /* Now construct the message header. */ i = 0; if (state->config.connection_type == GN_CT_Infrared) out_buffer[i++] = M2BUS_IR_FRAME_ID; /* Start of the IR frame indicator */ else /* connection_type == GN_CT_Serial */ out_buffer[i++] = M2BUS_FRAME_ID; /* Start of the frame indicator */ out_buffer[i++] = M2BUS_DEVICE_PHONE; /* Destination */ out_buffer[i++] = M2BUS_DEVICE_PC; /* Source */ out_buffer[i++] = messagetype; /* Type */ out_buffer[i++] = messagesize >> 8; /* Length MSB */ out_buffer[i++] = messagesize & 0xff; /* Length LSB */ /* Copy in data if any. */ if (messagesize != 0) { memcpy(out_buffer + i, message, messagesize); i += messagesize; } out_buffer[i++] = M2BUSINST(state)->request_sequence_number++; if (M2BUSINST(state)->request_sequence_number > 63) M2BUSINST(state)->request_sequence_number = 2; /* Now calculate checksums over entire message and append to message. */ checksum = 0; for (count = 0; count < i; count++) checksum ^= out_buffer[count]; out_buffer[i++] = checksum; } while (checksum == 0x1f); /* Send it out... */ #if 0 dprintf("M2BUS: Sending message 0x%02x / 0x%04x", messagetype, messagesize); for (count = 0; count < i; count++) { if (count % 16 == 0) dprintf("\n"); dprintf(" %02x", out_buffer[count]); } dprintf("\n"); #endif m2bus_wait_for_idle(5000, true, state); if (device_write(out_buffer, i, state) != i) { free(out_buffer); return GN_ERR_INTERNALERROR; } device_flush(state); free(out_buffer); return GN_ERR_NONE; } static gn_error m2bus_tx_send_ack(u8 message_seq, struct gn_statemachine *state) { u8 out_buffer[6]; if (!state) return GN_ERR_FAILED; dprintf("[Sending Ack, seq: %x]\n", message_seq); if (state->config.connection_type == GN_CT_Infrared) out_buffer[0] = M2BUS_IR_FRAME_ID;/* Start of the IR frame indicator */ else /* connection_type == GN_CT_Serial */ out_buffer[0] = M2BUS_FRAME_ID; /* Start of the frame indicator */ out_buffer[1] = M2BUS_DEVICE_PHONE; /* Destination */ out_buffer[2] = M2BUS_DEVICE_PC; /* Source */ out_buffer[3] = 0x7f; /* Type */ out_buffer[4] = message_seq; /* Now calculate checksums over entire message and append to message. */ out_buffer[5] = out_buffer[0] ^ out_buffer[1] ^ out_buffer[2] ^ out_buffer[3] ^ out_buffer[4]; m2bus_wait_for_idle(2000, false, state); if (device_write(out_buffer, 6, state) != 6) return GN_ERR_INTERNALERROR; device_flush(state); return GN_ERR_NONE; } static void m2bus_reset(struct gn_statemachine *state) { M2BUSINST(state)->i.state = M2BUS_RX_Sync; } /* Initialise variables and start the link */ /* state is only passed around to allow for muliple state machines (one day...) */ gn_error m2bus_initialise(struct gn_statemachine *state) { gn_error err; if (!state) return GN_ERR_FAILED; /* Fill in the link functions */ state->link.loop = &m2bus_loop; state->link.send_message = &m2bus_send_message; state->link.reset = &m2bus_reset; state->link.cleanup = NULL; /* Start up the link */ if ((M2BUSINST(state) = calloc(1, sizeof(m2bus_link))) == NULL) return GN_ERR_MEMORYFULL; M2BUSINST(state)->request_sequence_number = 2; m2bus_reset(state); if (state->config.connection_type == GN_CT_Infrared) { err = GN_ERR_FAILED; } else { /* connection_type == GN_CT_Serial */ err = m2bus_serial_open(state) ? GN_ERR_NONE : GN_ERR_FAILED; } if (err != GN_ERR_NONE) { free(M2BUSINST(state)); M2BUSINST(state) = NULL; return err; } return GN_ERR_NONE; } gnokii-0.6.31/common/gsm-encoding.c0000644000175000017500000012777311666163120015232 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Pavel Janik ml. Copyright (C) 2001-2011 Pawel Kot Copyright (C) 2002 Markus Plail, Manfred Jonsson Copyright (C) 2002-2004 BORBELY Zoltan Copyright (C) 2003 Martin Goldhahn Functions for encoding SMS, calendar and other things. */ #include "config.h" #include #include #include #include "compat.h" #include "misc.h" #include "gnokii.h" #include "gnokii-internal.h" #ifdef HAVE_ICONV # include #endif #ifdef HAVE_LANGINFO_CODESET # include #endif #ifdef HAVE_LOCALE_CHARSET # include #else /* FIXME: We should include here somehow ../intl/localcharset.h, but it may * cause problems with MSVC. */ extern const char *locale_charset(void); /* from ../intl/localcharset.c */ #endif #include /** * base64_alphabet: * * Mapping from 8-bit binary values to base 64 encoding. */ static const char *base64_alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /** * bcd_digits: * * Mapping from ASCII to BCD digits representing phone numbers and vice versa. * BCD digits are those from Table 10.5.118 of 3GPP TS 04.08 with 'a' replaced by 'p'. */ static const char *bcd_digits = "0123456789*#pbc"; /** * GN_CHAR_UNI_ALPHABET_SIZE: * * Number of characters in GSM default alphabet (for UCS-2 encoding). */ #define GN_CHAR_UNI_ALPHABET_SIZE 128 /** * GN_CHAR_UNI_ESCAPE: * * Value of the escape character for the GSM Alphabet (in UCS-2 encoding). */ #define GN_CHAR_UNI_ESCAPE 0x001b /** * gsm_default_unicode_alphabet: * * Mapping from GSM default alphabet to UCS-2. * * ETSI GSM 03.38, version 6.0.1, section 6.2.1; Default alphabet. Mapping to UCS-2. * Mapping according to http://unicode.org/Public/MAPPINGS/ETSI/GSM0338.TXT */ static unsigned int gsm_default_unicode_alphabet[GN_CHAR_UNI_ALPHABET_SIZE] = { /* @ £ $ Â¥ è é ù ì */ 0x0040, 0x00a3, 0x0024, 0x00a5, 0x00e8, 0x00e9, 0x00f9, 0x00ec, /* ò Ç \n Ø ø \r Ã… Ã¥ */ 0x00f2, 0x00c7, 0x000a, 0x00d8, 0x00f8, 0x000d, 0x00c5, 0x00e5, /* Δ _ Φ Γ Λ Ω Π Ψ */ 0x0394, 0x005f, 0x03a6, 0x0393, 0x039b, 0x03a9, 0x03a0, 0x03a8, /* Σ Θ Ξ NBSP Æ æ ß É */ 0x03a3, 0x0398, 0x039e, 0x00a0, 0x00c6, 0x00e6, 0x00df, 0x00c9, /* ' ' ! " # ¤ % & ' */ 0x0020, 0x0021, 0x0022, 0x0023, 0x00a4, 0x0025, 0x0026, 0x0027, /* ( ) * + , - . / */ 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, /* 0 1 2 3 4 5 6 7 */ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, /* 8 9 : ; < = > ? */ 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, /* ¡ A B C D E F G */ 0x00a1, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, /* H I J K L M N O */ 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, /* P Q R S T U V W */ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, /* X Y Z Ä Ö Ñ Ü § */ 0x0058, 0x0059, 0x005a, 0x00c4, 0x00d6, 0x00d1, 0x00dc, 0x00a7, /* ¿ a b c d e f g */ 0x00bf, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, /* h i j k l m n o */ 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, /* p q r s t u v w */ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, /* x y z ä ö ñ ü à */ 0x0078, 0x0079, 0x007a, 0x00e4, 0x00f6, 0x00f1, 0x00fc, 0x00e0 }; static char application_encoding[64] = ""; /** * char_def_alphabet: * @value: the UCS-2 character to validate * * Returns: true if the given character matches default alphabet, false otherwise * * It could be possibly optimized but let's face it: nowadays full * lookup of 128 elements table is not that time consuming. */ static int char_def_alphabet(unsigned int value) { int i; for (i = 0; i < GN_CHAR_UNI_ALPHABET_SIZE; i++) { if (gsm_default_unicode_alphabet[i] == value) { return true; } } return false; } /** * char_is_escape: * @value: the char to test * * Returns: non zero if @value is an escape character, zero otherwise * * Determines if @value is an escape character for GSM Alphabet. */ static bool char_is_escape(unsigned int value) { return (value == GN_CHAR_UNI_ESCAPE); } /** * get_langinfo_codeset: * * Returns: a constant string representing a charset encoding * * Gets the current charset encoding. * Uses different methods on different platforms. */ static const char *get_langinfo_codeset(void) { static const char *codeset = NULL; if (!codeset) { #ifdef HAVE_LANGINFO_CODESET codeset = nl_langinfo(CODESET); #else codeset = locale_charset(); #endif } return codeset; } /** * gn_char_get_encoding: * * Returns: a constant string representing a charset encoding * * Gets the encoding set by the application or the default one. */ GNOKII_API const char *gn_char_get_encoding() { const char *coding; if (*application_encoding) coding = application_encoding; /* app has overriden encoding setting */ else coding = get_langinfo_codeset(); /* return default codeset */ return coding; } /** * gn_char_set_encoding: * @encoding: a string representing the name of a charset encoding * * Sets the encoding preferred by the application. */ void gn_char_set_encoding(const char* encoding) { snprintf(application_encoding, sizeof(application_encoding), "%s", encoding); } /** * char_mblen: * @src: the string to measure * * Returns: the lenght of the string * * Detects the correct length of a string (also for multibyte chars like "umlaute"). */ int char_mblen(const char *src) { int len = mbstowcs(NULL, src, 0); dprintf("char_mblen(%s): %i\n", src, len); return len; } #ifndef ICONV_CONST # define ICONV_CONST const #endif /** * char_mbtowc: * @wchar_t: buffer for the converted wide char string * @src: buffer with the multibyte string to be converted * @maxlen: size of @wchar_t buffer * @mbs: pointer to a variable holding the shift state * or NULL to use a global variable * * Returns: the number of bytes from @src that have been used * or -1 in case of error * * Converts a multibyte string to a wide char string. * Uses iconv() if it is available and iconv_open() succeeds, else mbrtowc() * if available, else mbtowc(). */ static int char_mbtowc(wchar_t *dst, const char *src, int maxlen, MBSTATE *mbs) { #ifdef HAVE_ICONV size_t nconv; ICONV_CONST char *pin; char *pout; size_t inlen; size_t outlen; iconv_t cd; pin = (char *)src; pout = (char *)dst; /* Let's assume that we have at most 4-bytes wide characters */ inlen = maxlen; outlen = maxlen * sizeof(wchar_t); cd = iconv_open("WCHAR_T", gn_char_get_encoding()); if (cd == (iconv_t)-1) goto fallback; nconv = iconv(cd, &pin, &inlen, &pout, &outlen); if ((nconv == (size_t)-1) && (pin == src)) perror("char_mbtowc/iconv"); iconv_close(cd); return (char*)dst == pout ? -1 : pin-src; fallback: #endif if (maxlen >= MB_CUR_MAX) maxlen = MB_CUR_MAX - 1; #ifdef HAVE_WCRTOMB return mbrtowc(dst, src, maxlen, mbs); #else return mbtowc(dst, src, maxlen); #endif } /** * char_wctomb: * @dst: buffer for the converted multibyte string * @src: buffer with the wide char string to be converted * @mbs: pointer to a variable holding the shift state * or NULL to use a global variable * * Returns: the number of bytes from @src that have been used * or -1 in case of error * * Converts a wide char string to a multibyte string. * Uses iconv() if it is available and iconv_open() succeeds, else wcrtomb() * if available, else wctomb(). */ static int char_wctomb(char *dst, wchar_t src, MBSTATE *mbs) { #ifdef HAVE_ICONV size_t nconv; ICONV_CONST char *pin; char *pout; size_t inlen; size_t outlen; iconv_t cd; pin = (char *)&src; pout = (char *)dst; inlen = sizeof(wchar_t); outlen = 4; cd = iconv_open(gn_char_get_encoding(), "WCHAR_T"); if (cd == (iconv_t)-1) goto fallback; nconv = iconv(cd, &pin, &inlen, &pout, &outlen); if (nconv == (size_t)-1) perror("char_wctomb/iconv"); iconv_close(cd); return nconv == -1 ? -1 : pout-dst; fallback: #endif #ifdef HAVE_WCRTOMB return wcrtomb(dst, src, mbs); #else return wctomb(dst, src); #endif } /** * char_def_alphabet_ext: * @value: the character to test UCS-2 encoded * * Returns: non zero if the character can be represented with the Extended GSM Alphabet, * zero otherwise * * Checks if @value is a character defined by the Extended GSM Alphabet. * * In GSM specification there are 10 characters in the extension * of the default alphabet. Their values look a bit random, they are * only 10, and probably they will never change, so hardcoding them * here is rather safe. */ bool char_def_alphabet_ext(unsigned int value) { return (value == 0x0c || value == '^' || value == '{' || value == '}' || value == '\\' || value == '[' || value == '~' || value == ']' || value == '|' || value == 0x20ac); } /** * char_def_alphabet_ext_count: * @input: input string * @lengh: input string length * * Returns: number of extended GSM alphabet characters in the input string */ int char_def_alphabet_ext_count(unsigned char *input, int length) { int i, retval = 0; for (i = 0; i < length; i++) if (char_def_alphabet_ext(input[i])) retval++; return retval; } /** * char_def_alphabet_ext_decode: * @value: the character to decode * * Returns: the decoded character, or '?' if @value can't be decoded * * Converts a character from Extended GSM Alphabet to UCS-2. */ static unsigned int char_def_alphabet_ext_decode(unsigned char value) { dprintf("Default extended alphabet\n"); switch (value) { case 0x0a: return 0x000c; break; /* form feed */ case 0x14: return 0x005e; break; /* ^ */ case 0x28: return 0x007b; break; /* { */ case 0x29: return 0x007d; break; /* } */ case 0x2f: return 0x005c; break; /* \ */ case 0x3c: return 0x005b; break; /* [ */ case 0x3d: return 0x007e; break; /* ~ */ case 0x3e: return 0x005d; break; /* ] */ case 0x40: return 0x007c; break; /* | */ case 0x65: return 0x20ac; break; /* € */ default: return 0x003f; break; /* invalid character, set ? */ } } /** * char_def_alphabet_ext_encode: * @value: the UCS-2 character to encode * * Returns: the encoded character, or 0 if @value can't be encoded * * Converts a character from UCS-2 to Extended GSM Alphabet. */ static unsigned char char_def_alphabet_ext_encode(unsigned int value) { switch (value) { case 0x0c: return 0x0a; /* form feed */ case '^': return 0x14; case '{': return 0x28; case '}': return 0x29; case '\\': return 0x2f; case '[': return 0x3c; case '~': return 0x3d; case ']': return 0x3e; case '|': return 0x40; case 0x20ac: return 0x65; /* euro */ default: return 0x00; /* invalid character */ } } /** * gn_char_def_alphabet: * @string: the string to test * * Returns: %true if the string can be represented with the GSM Alphabet, * %false otherwise * * Checks if @value is a string composed only by characters defined by * the default GSM alphabet or its extension. */ GNOKII_API int gn_char_def_alphabet(unsigned char *string) { unsigned int i, ucs2len, inlen = strlen(string); char *ucs2str; /* First, let's know the encoding. We convert it from something to UCS-2 */ ucs2str = calloc(2 * inlen, sizeof(unsigned char)); if (!ucs2str) /* We are in trouble here. Whatever would be returned is irrelevant */ return true; ucs2len = ucs2_encode(ucs2str, 2 * inlen, string, inlen); /* It means we couldn't encode the input string */ if (ucs2len < 0) { dprintf("gn_char_def_alphabet: failed to encode input string\n"); return false; } for (i = 0; i < ucs2len / 2; i++) { unsigned int a = 0xff & ucs2str[2 * i], b = 0xff & ucs2str[2 * i + 1]; /* * We need the following tests: * - check in the default alphabet table * - check in the extended default alphabet table */ if (!char_def_alphabet(256 * a + b) && !char_def_alphabet_ext(256 * a + b)) { free(ucs2str); return false; } } free(ucs2str); return true; } /** * char_def_alphabet_encode: * @value: the character to encode * * Returns: the encoded character, or '?' if @value can't be encoded * * Converts a character from UCS-2 to Default GSM Alphabet. * It could be possibly optimized but let's face it: nowadays full * lookup of 128 elements table is not that time consuming. */ unsigned char char_def_alphabet_encode(unsigned int value) { int i; for (i = 0; i < GN_CHAR_UNI_ALPHABET_SIZE; i++) { if (gsm_default_unicode_alphabet[i] == value) { return i; } } return '?'; } /** * char_def_alphabet_decode: * @value: the character to decode * * Returns: the decoded character or '?' if @value can't be decoded * * Converts a character from Default GSM Alphabet to UCS-2. */ unsigned int char_def_alphabet_decode(unsigned char value) { if (value < GN_CHAR_UNI_ALPHABET_SIZE) { return gsm_default_unicode_alphabet[value]; } else { return 0x003f; /* '?' */ } } /** * char_def_alphabet_string_stats: * @str: string to get statistics encoded in utf8 * @enc_chars: calculated number of the characters from the input string * @ext_chars: calculated number of the characters to be encoded in gsm extended default alphabet * * Returns: GN_SMS_DCS_DefaultAlphabet, if @str can be encoded in GSM default alphabet, GN_SMS_DCS_UCS2 otherwise. * * Calculates statistics and encoding of the input string. */ gn_sms_dcs_alphabet_type char_def_alphabet_string_stats(char *str, int *enc_chars, int *ext_chars) { gn_sms_dcs_alphabet_type enc = GN_SMS_DCS_DefaultAlphabet; char *iter = str; gunichar chr; *enc_chars = 0; *ext_chars = 0; if (!g_utf8_validate(iter, -1, NULL)) { dprintf("Not valid UTF8 string\n"); return enc; } do { chr = g_utf8_get_char(iter); if (!chr) break; if (char_def_alphabet_ext(chr)) (*ext_chars)++; else if (!char_def_alphabet(chr)) enc = GN_SMS_DCS_UCS2; (*enc_chars)++; } while (iter = g_utf8_next_char(iter)); return enc; } /** * char_def_alphabet_copy: * @dest: room for the destination string * @src: source utf-8 string to copy * @len: number of utf-8 characters to copy * @offset: number of utf-8 characters from input to skip * * Returns: number of characters copied * * Function copies @len characters from @src utf-8 string, starting at @offset character to @dest. * */ int char_def_alphabet_string_copy(char *dest, const char *src, int len, int offset) { int i, to_copy = 0; gunichar chr; char *src_offset = g_utf8_offset_to_pointer(src, offset); char *iter = src_offset; if (!g_utf8_validate(iter, -1, NULL)) { dprintf("Not valid UTF8 string\n"); return to_copy; } for (i = 0; i < len; i++) { chr = g_utf8_get_char(iter); if (!chr) break; if (char_def_alphabet_ext(chr)) i++; if (i < len) to_copy++; iter = g_utf8_next_char(iter); } g_utf8_strncpy(dest, src_offset, to_copy); return to_copy; } #define GN_BYTE_MASK ((1 << bits) - 1) /** * char_7bit_unpack: * @offset: the bit offset inside the first byte of @input from which to start reading data * @in_length: length of @input in bytes * @out_length: size of @output in bytes * @input: buffer with the string to be converted * @output: buffer for the converted string, not NUL terminated * * Returns: the number of bytes used in @output * * Converts a packed sequence of 7-bit characters from @input into an array * of 8-bit characters in @output. * Source characters are stored in a char array of @in_length elements. */ int char_7bit_unpack(unsigned int offset, unsigned int in_length, unsigned int out_length, unsigned char *input, unsigned char *output) { unsigned char *out_num = output; /* Current pointer to the output buffer */ unsigned char *in_num = input; /* Current pointer to the input buffer */ unsigned char rest = 0x00; int bits; bits = offset ? offset : 7; while ((in_num - input) < in_length) { *out_num = ((*in_num & GN_BYTE_MASK) << (7 - bits)) | rest; rest = *in_num >> bits; /* If we don't start from 0th bit, we shouldn't go to the next char. Under *out_num we have now 0 and under Rest - _first_ part of the char. */ if ((in_num != input) || (bits == 7)) out_num++; in_num++; if ((out_num - output) >= out_length) break; /* After reading 7 octets we have read 7 full characters but we have 7 bits as well. This is the next character */ if (bits == 1) { *out_num = rest; out_num++; bits = 7; rest = 0x00; } else { bits--; } } return out_num - output; } /** * char_7bit_pack: * @offset: the bit offset inside the first byte of @output from which to start writing data * @input: buffer with the string to be converted * @output: buffer for the converted string, not NUL terminated * @in_len: length of @input to be set; includes extended alphabet escape char * * Returns: the number of bytes used in @output * * Converts an array of 8-bit characters from @input into a packed sequence * of 7-bit characters in @output. */ int char_7bit_pack(unsigned int offset, unsigned char *input, unsigned char *output, unsigned int *in_len) { unsigned char *out_num = output; /* Current pointer to the output buffer */ unsigned int in_num; int bits; /* Number of bits directly copied to output buffer */ unsigned int ucs2len, i = 0, len = strlen(input); char *ucs2str; /* First, let's know the encoding. We convert it from something to UCS-2 */ ucs2str = calloc(2 * len, sizeof(unsigned char)); if (!ucs2str) return 0; ucs2len = ucs2_encode(ucs2str, 2 * len, input, len); /* Encoding failed */ if (ucs2len < 0) { dprintf("gn_char_def_alphabet: failed to encode input string\n"); return 0; } bits = (7 + offset) % 8; /* If we don't begin with 0th bit, we will write only a part of the first octet */ if (offset) { *out_num = 0x00; out_num++; } *in_len = 0; while (i < ucs2len / 2) { unsigned char byte; bool double_char = false; unsigned int a = 0xff & ucs2str[2 * i], b = 0xff & ucs2str[2 * i + 1]; in_num = 256 * a + b; if (char_def_alphabet_ext(in_num)) { byte = GN_CHAR_UNI_ESCAPE; double_char = true; goto skip; next_char: byte = char_def_alphabet_ext_encode(in_num); double_char = false; (*in_len) += 2; } else { byte = char_def_alphabet_encode(in_num); (*in_len)++; } skip: *out_num = byte >> (7 - bits); /* If we don't write at 0th bit of the octet, we should write a second part of the previous octet */ if (bits != 7) *(out_num-1) |= (byte & ((1 << (7-bits)) - 1)) << (bits+1); bits--; if (bits == -1) bits = 7; else out_num++; if (double_char) goto next_char; i++; } free(ucs2str); return (out_num - output); } /** * char_default_alphabet_decode: * @dest: buffer for the converted string, NUL terminated * @src: buffer with the string to be converted * @len: length of @src in bytes * * Converts a string from GSM Alphabet to ISO/IEC 8859-1. * In the worst case where each character in @src must be converted from the * Extended GSM Alphabet, size of @dest must be @len + 1; in general it must be * at least @len - number_of_escape_chars + 1 */ int char_default_alphabet_decode(unsigned char* dest, const unsigned char* src, int len) { int j, pos = 0; MBSTATE mbs; MBSTATE_DEC_CLEAR(mbs); for (j = 0; j < len; j++) { wchar_t wc; int length; if (char_is_escape(src[j])) { wc = char_def_alphabet_ext_decode(src[++j]); } else { wc = char_def_alphabet_decode(src[j]); } length = char_uni_alphabet_decode(wc, dest, &mbs); dest += length; pos += length; } *dest = 0; return pos; } /** * char_ascii_encode: * @dest: buffer for the converted string, not NUL terminated * @dest_len: size of @dest in bytes, must be 2 * @len in the worst case * @src: buffer with the string to be converted * @len: length of @src in bytes * * Returns: the number of bytes used in the @dest buffer for the converted string * * Converts a string from ISO/IEC 8859-1 to GSM Alphabet. * In the worst case where each character in @src must be converted in the * Extended GSM Alphabet, @dest_len must be @len * 2; in general it must be * at least @len + number_of_escape_chars */ size_t char_ascii_encode(char *dest, size_t dest_len, const char *src, size_t len) { size_t i, j, extra = 0; for (i = 0, j = 0; i < dest_len && j < len; i++, j++) { if (char_def_alphabet_ext(src[j])) { dest[i++] = GN_CHAR_UNI_ESCAPE; dest[i] = char_def_alphabet_ext_encode(src[j]); extra++; } else { dest[i] = char_def_alphabet_encode(src[j]); } } return len + extra; } /** * char_hex_decode: * @dest: buffer for the converted string, NUL terminated * @src: buffer with the string to be converted * @len: length of @src in bytes, length of @dest must be at least (@len / 2) + 1 * * Converts a string from GSM Alphabet in ASCII-encoded hexadecimal bytes to ISO/IEC 8859-1. */ void char_hex_decode(unsigned char* dest, const unsigned char* src, int len) { int i; char buf[3]; buf[2] = '\0'; for (i = 0; i < (len / 2); i++) { buf[0] = *(src + i * 2); buf[1] = *(src + i * 2 + 1); dest[i] = char_def_alphabet_decode(strtol(buf, NULL, 16)); } dest[i] = 0; return; } /** * char_hex_encode: * @dest: buffer for the converted string, NUL terminated * @dest_len: length of @dest in bytes, must be at least (@len * 2) + 1 * @src: buffer with the string to be converted * @len: length of @src in bytes * * Returns: the number of bytes used in the @dest buffer for the converted string * * Converts a string from ISO/IEC 8859-1 to GSM Alphabet in ASCII-encoded hexadecimal bytes. */ size_t char_hex_encode(char *dest, size_t dest_len, const char *src, size_t len) { int i, n = dest_len / 2 >= len ? len : dest_len / 2; for (i = 0; i < n; i++) snprintf(dest + i * 2, 3, "%02X", char_def_alphabet_encode(src[i])); return len * 2; } /** * char_uni_alphabet_encode: * @value: pointer to the character to be converted * @n: maximum number of bytes of @value that will be examined * @dest: buffer for the converted character * @mbs: pointer to a variable holding the shift state * or NULL to use a global variable * * Returns: the number of bytes from @value used by the converted string * or -1 in case of error * * Converts a character from multibyte to wide. */ size_t char_uni_alphabet_encode(const char *value, size_t n, wchar_t *dest, MBSTATE *mbs) { int length; length = char_mbtowc(dest, value, n, mbs); return length; } /** * char_uni_alphabet_decode: * @value: the character to be converted * @dest: buffer for the converted character * @mbs: pointer to a variable holding the shift state * or NULL to use a global variable * * Returns: the number of bytes from @value that have been used * or -1 in case of error * * Converts a character from wide to multibyte. */ int char_uni_alphabet_decode(wchar_t value, unsigned char *dest, MBSTATE *mbs) { int length; switch (length = char_wctomb(dest, value, mbs)) { case -1: *dest = '?'; length = 1; default: return length; } } /** * char_ucs2_decode: * @dest: buffer for the converted string, NUL terminated * @src: buffer with the string to be converted * @len: length of @src in bytes, size of @dest must be at least (@len / 4) + 1 * * Converts a string from UCS-2 encoded as ASCII-encoded hexadecimal bytes to ISO/IEC 8859-1. * @len must be a multiple of 4. * Used in AT driver for UCS2 encoding commands. */ void char_ucs2_decode(unsigned char* dest, const unsigned char* src, int len) { int i_len = 0, o_len = 0, length; char buf[5]; MBSTATE mbs; MBSTATE_DEC_CLEAR(mbs); buf[4] = '\0'; for (i_len = 0; i_len < len ; i_len++) { buf[0] = *(src + i_len * 4); buf[1] = *(src + i_len * 4 + 1); buf[2] = *(src + i_len * 4 + 2); buf[3] = *(src + i_len * 4 + 3); switch (length = char_uni_alphabet_decode(strtol(buf, NULL, 16), dest + o_len, &mbs)) { case -1: o_len++; length = 1; break; default: o_len += length; break; } if ((length == 1) && (dest[o_len-1] == 0)) return; } dest[o_len] = 0; return; } /** * char_ucs2_encode: * @dest: buffer for the converted string, NUL terminated * @dest_len: size of @dest * @src: buffer with the string to be converted * @len: length of @src in bytes, size of @dest must be at least (@len * 4) + 1 * * Returns: the number of bytes of @dest that have been used * * Converts a string from ISO/IEC 8859-1 to UCS-2 encoded as ASCII-encoded hexadecimal bytes. * This function should convert "ABC" to "004100420043" * Used only in AT driver for UCS2 encoding commands. * It reads char by char from the input. */ #define UCS2_SIZE 4 size_t char_ucs2_encode(char *dest, size_t dest_len, const char *src, size_t len) { wchar_t wc; int i, o_len, length; MBSTATE mbs; MBSTATE_ENC_CLEAR(mbs); for (i = 0, o_len = 0; i < len && o_len < dest_len / UCS2_SIZE; o_len++, i++) { /* * We read input by convertible chunks. 'length' is length of * the read chunk. */ length = char_uni_alphabet_encode(src + i, 1, &wc, &mbs); /* We stop reading after first unreadable input */ if (length < 1) return o_len * UCS2_SIZE; /* We write here 4 chars + NULL termination */ /* XXX: We should probably check wchar_t size. */ snprintf(dest + (o_len * UCS2_SIZE), UCS2_SIZE + 1, "%04X", wc); } return o_len * UCS2_SIZE; } /** * char_unicode_decode: * @dest: buffer for the converted string, NUL terminated * @src: buffer with the string to be converted * @len: length of @src in bytes * * Returns: the number of bytes of @dest that have been used * * Converts a string from UTF-8 to ISO/IEC 8859-1. */ unsigned int char_unicode_decode(unsigned char* dest, const unsigned char* src, int len) { int i, length = 0, pos = 0; MBSTATE mbs; MBSTATE_DEC_CLEAR(mbs); for (i = 0; i < len / 2; i++) { wchar_t wc = src[i * 2] << 8 | src[(i * 2) + 1]; length = char_uni_alphabet_decode(wc, dest, &mbs); dest += length; pos += length; } *dest = 0; return pos; } /** * char_unicode_encode: * @dest: buffer for the converted string, not NUL terminated * @src: buffer with the string to be converted * @len: length of @src in bytes * * Returns: the number of bytes of @dest that have been used * * Converts a string from ISO/IEC 8859-1 to UTF-8. */ unsigned int char_unicode_encode(unsigned char* dest, const unsigned char* src, int len) { int pos = 0; MBSTATE mbs; #ifndef HAVE_ICONV int length, offset = 0; wchar_t wc; #endif MBSTATE_ENC_CLEAR(mbs); #ifdef HAVE_ICONV pos = ucs2_encode(dest, 2 * len, src, len); #else while (offset < len) { length = char_uni_alphabet_encode(src + offset, len - offset, &wc, &mbs); switch (length) { case -1: dest[pos++] = wc >> 8 & 0xFF; dest[pos++] = wc & 0xFF; offset++; break; case 0: /* Avoid infinite loop */ offset++; break; default: dest[pos++] = wc >> 8 & 0xFF; dest[pos++] = wc & 0xFF; offset += length; break; } } #endif return pos; } /* Conversion bin -> hex and hex -> bin */ /** * hex2bin: * @dest: buffer for the converted string * @src: buffer with the string to be converted * @len: length of @src, size of @dest must be at least @len / 2 * * Converts from ASCII-encoded hexadecimal bytes to binary. * @len must be a multiple of 2. */ void hex2bin(unsigned char *dest, const unsigned char *src, unsigned int len) { int i; if (!dest) return; for (i = 0; i < len; i++) { unsigned aux; if (src[2 * i] >= '0' && src[2 * i] <= '9') aux = src[2 * i] - '0'; else if (src[2 * i] >= 'a' && src[2 * i] <= 'f') aux = src[2 * i] - 'a' + 10; else if (src[2 * i] >= 'A' && src[2 * i] <= 'F') aux = src[2 * i] - 'A' + 10; else { dest[0] = 0; return; } dest[i] = aux << 4; if (src[2 * i + 1] >= '0' && src[2 * i + 1] <= '9') aux = src[2 * i + 1] - '0'; else if (src[2 * i + 1] >= 'a' && src[2 * i + 1] <= 'f') aux = src[2 * i + 1] - 'a' + 10; else if (src[2 * i + 1] >= 'A' && src[2 * i + 1] <= 'F') aux = src[2 * i + 1] - 'A' + 10; else { dest[0] = 0; return; } dest[i] |= aux; } } /** * bin2hex: * @dest: buffer for the converted string, not NUL terminated * @src: buffer with the string to be converted * @len: length of @src, size of @dest must be at least @len * 2 * * Converts from binary to ASCII-encoded hexadecimal bytes. */ void bin2hex(unsigned char *dest, const unsigned char *src, unsigned int len) { int i; if (!dest) return; for (i = 0; i < len; i++) { dest[2 * i] = (src[i] & 0xf0) >> 4; if (dest[2 * i] < 10) dest[2 * i] += '0'; else dest[2 * i] += ('A' - 10); dest[2 * i + 1] = src[i] & 0x0f; if (dest[2 * i + 1] < 10) dest[2 * i + 1] += '0'; else dest[2 * i + 1] += ('A' - 10); } } /** * char_semi_octet_pack: * @number: string containing the phone number to convert * @output: buffer for the converted phone number, not NUL terminated * @type: type of the phone number (eg. %GN_GSM_NUMBER_International) * * Returns: the number of semi octects used by the whole encoded string * * This function implements packing of numbers (SMS Center number and * destination number) for SMS sending function. */ int char_semi_octet_pack(char *number, unsigned char *output, gn_gsm_number_type type) { char *in_num = number; /* Pointer to the input number */ unsigned char *out_num = output; /* Pointer to the output */ int count = 0; /* This variable is used to notify us about count of already packed numbers. */ /* The first byte in the Semi-octet representation of the address field is the Type-of-Address. This field is described in the official GSM specification 03.40 version 6.1.0, section 9.1.2.5, page 33. We support only international, unknown and alphanumeric number. */ *out_num++ = type; if (((type & GN_GSM_NUMBER_Type_Mask) & GN_GSM_NUMBER_Alphanumeric_Mask) == GN_GSM_NUMBER_Alphanumeric_Mask) { count = strlen(number); return 2 * char_7bit_pack(0, number, out_num, &count); } if ((((type & GN_GSM_NUMBER_International_Mask) == GN_GSM_NUMBER_International_Mask) || (type & GN_GSM_NUMBER_Type_Mask) == 0) && /* Unknown */ *in_num == '+') in_num++; /* skip leading '+' */ /* The next field is the number. It is in semi-octet representation - see GSM specification 03.40 version 6.1.0, section 9.1.2.3, page 31. */ while (*in_num) { if (count & 0x01) { *out_num = *out_num | ((*in_num - '0') << 4); out_num++; } else *out_num = *in_num - '0'; count++; in_num++; } /* We should also fill in the most significant bits of the last byte with 0x0f (1111 binary) if the number is represented with odd number of digits. */ if (count & 0x01) { *out_num = *out_num | 0xf0; out_num++; } return (2 * (out_num - output - 1) - (count % 2)); } /** * char_bcd_number_get: * @number: a phone number encoded in BCD format * * Returns: a static buffer with the converted phone number, NUL terminated * * This function implements unpacking of numbers (SMS Center number and * destination number) for SMS receiving function. */ char *char_bcd_number_get(u8 *number) { static char buffer[GN_BCD_STRING_MAX_LENGTH] = ""; int length = number[0]; /* This is the length of BCD coded number */ int count, digit, i = 0; if (length > GN_BCD_STRING_MAX_LENGTH) length = GN_BCD_STRING_MAX_LENGTH; switch (number[1]) { case GN_GSM_NUMBER_Alphanumeric: char_7bit_unpack(0, length, length, number + 2, buffer); buffer[length] = 0; break; case GN_GSM_NUMBER_International: snprintf(buffer, sizeof(buffer), "+"); i++; if (length == GN_BCD_STRING_MAX_LENGTH) length--; /* avoid overflow */ case GN_GSM_NUMBER_Unknown: case GN_GSM_NUMBER_National: case GN_GSM_NUMBER_Network: case GN_GSM_NUMBER_Subscriber: case GN_GSM_NUMBER_Abbreviated: default: /* start at 2 to skip length and TON (we can't overflow the buffer because i <= GN_BCD_STRING_MAX_LENGTH - 2) */ for (count = 2; count <= length; count++) { digit = number[count] & 0x0f; if (digit < 0x0f) buffer[i++] = bcd_digits[digit]; digit = number[count] >> 4; if (digit < 0x0f) buffer[i++] = bcd_digits[digit]; } buffer[i] = '\0'; break; } return buffer; } /* UTF-8 conversion functions */ /** * utf8_decode: * @outstring: buffer for the converted string, not NUL terminated * @outlen: size of @outstring * @instring: buffer with the string to be converted * @inlen: length of @instring * * Returns: the number of bytes used in @outstring, or -1 in case of errors * * Converts a string from UTF-8 to an application specified (or system default) encoding. * Uses iconv() if available, else uses internal replacement code. */ int utf8_decode(char *outstring, size_t outlen, const char *instring, size_t inlen) { int retval = 1; size_t nconv; #if defined(HAVE_ICONV) ICONV_CONST char *pin; char *pout; iconv_t cd; pin = (char *)instring; pout = outstring; cd = iconv_open(gn_char_get_encoding(), "UTF-8"); if (cd == (iconv_t)-1) return -1; nconv = iconv(cd, &pin, &inlen, &pout, &outlen); if (nconv == (size_t)-1) perror("utf8_decode/iconv"); else retval = iconv_close(cd); *pout = 0; #else unsigned char *pin, *pout; pin = (unsigned char *)instring; pout = outstring; while (inlen > 0 && outlen > 0) { if (*pin < 0x80) { *pout = *pin; nconv = 1; } else if (*pin < 0xc0) { *pout = '?'; nconv = 1; } else if (*pin < 0xe0) { *pout = '?'; nconv = 2; } else if (*pin < 0xf0) { *pout = '?'; nconv = 3; } else if (*pin < 0xf8) { *pout = '?'; nconv = 4; } else if (*pin < 0xfc) { *pout = '?'; nconv = 5; } else { *pout = '?'; nconv = 6; } inlen -= nconv; outlen--; pin += nconv; if (*pout++ == '\0') break; } retval = (char *)pout - outstring; #endif return retval; } /** * utf8_encode: * @outstring: buffer for the converted string, not NUL terminated * @outlen: size of @outstring * @instring: buffer with the string to be converted * @inlen: length of @instring * * Returns: the number of bytes used in @outstring, or -1 in case of errors * * Converts a string from an application specified (or system default) encoding to UTF-8. * Uses iconv() if available, else uses internal replacement code. */ int utf8_encode(char *outstring, int outlen, const char *instring, int inlen) { int retval = -1; #if defined(HAVE_ICONV) size_t outleft, inleft, nconv; ICONV_CONST char *pin; char *pout; iconv_t cd; outleft = outlen; inleft = inlen; pin = (char *)instring; pout = outstring; cd = iconv_open("UTF-8", gn_char_get_encoding()); if (cd == (iconv_t)-1) return -1; nconv = iconv(cd, &pin, &inleft, &pout, &outleft); if (nconv == (size_t)-1) perror("utf8_encode/iconv"); else retval = (char *)pout - outstring; *pout = 0; iconv_close(cd); #else size_t nconv; unsigned char *pin, *pout; nconv = 0; pin = (unsigned char *)instring; pout = outstring; while (inlen > 0 && outlen > 0) { if (*pin >= 0x80) *pout = '?'; else *pout = *pin; inlen--; outlen--; pin++; if (*pout++ == '\0') break; } retval = (char *)pout - outstring; #endif return retval; } /* UCS-2 functions */ /** * ucs2_encode: * @outstring: buffer for the converted string, not NUL terminated * @outlen: size of @outstring * @instring: buffer with the string to be converted * @inlen: length of @instring * * Returns: the number of bytes used in @outstring, or -1 in case of errors * * Converts a string from an application specified (or system default) encoding to UCS-2. * Uses iconv() if available, else uses internal replacement code. */ int ucs2_encode(char *outstring, int outlen, const char *instring, int inlen) { #if defined(HAVE_ICONV) size_t outleft, inleft, nconv; ICONV_CONST char *pin; char *pout; iconv_t cd; int retval = -1; outleft = outlen; inleft = inlen; pin = (char *)instring; pout = outstring; cd = iconv_open("UCS-2BE", gn_char_get_encoding()); if (cd == (iconv_t)-1) return -1; nconv = iconv(cd, &pin, &inleft, &pout, &outleft); if (nconv == (size_t)-1) perror("ucs2_encode/iconv"); else retval = (char *)pout - outstring; iconv_close(cd); return retval; #else return char_unicode_encode(outstring, instring, inlen); #endif } int ucs2_decode(char *outstring, int outlen, const char *instring, int inlen) { #if defined(HAVE_ICONV) size_t outleft, inleft, nconv; ICONV_CONST char *pin; char *pout; iconv_t cd; int retval = -1; outleft = outlen; inleft = inlen; pin = (char *)instring; pout = outstring; cd = iconv_open(gn_char_get_encoding(), "UCS-2BE"); if (cd == (iconv_t)-1) return -1; nconv = iconv(cd, &pin, &inleft, &pout, &outleft); if (nconv == (size_t)-1) perror("ucs2_encode/iconv"); else retval = (char *)pout - outstring; iconv_close(cd); return retval; #else return char_unicode_decode(outstring, instring, inlen); #endif } /* BASE64 functions */ /** * string_base64: * @instring: the string to check * * Returns: 1 if the string must be encoded in base 64, 0 otherwise * * Verifies if a string must be encoded in base 64. */ int string_base64(const char *instring) { for (; *instring; instring++) if (*instring & 0x80) return 1; return 0; } /** * base64_encode: * @outstring: buffer for the converted string, will be NUL terminated * @outlen: size of @outstring * @instring: buffer with the string to be converted * @inlen: length of @instring * * Returns: the length of the converted string * * Converts a generic string to base64 encoding. * @outlen needs to be at least 4 / 3 times + 1 bigger than @inlen to hold * the converted string and the terminator. */ int base64_encode(char *outstring, int outlen, const char *instring, int inlen) { const char *pin; char *pout; char *outtemp = NULL; int inleft, outleft; pout = outstring; inleft = inlen; outleft = outlen; pin = instring; /* This is in case someone passes a buffer not appropriate for outstring */ while (outleft > 3 && inleft > 0) { int a, b, c; unsigned int i1, i2, i3, i4; a = *pin++; b = (inleft > 1) ? *(pin++) : 0; c = (inleft > 2) ? *(pin++) : 0; /* calculate the indexes */ i1 = (a & 0xfc) >> 2; *(pout++) = base64_alphabet[i1]; i2 = ((a & 0x03) << 4) | ((b & 0xf0) >> 4); *(pout++) = base64_alphabet[i2]; inleft--; i3 = ((b & 0x0f) << 2) | ((c & 0xc0) >> 6); if (!inleft) { *(pout++) = '='; } else { *(pout++) = base64_alphabet[i3]; inleft--; } i4 = c & 0x3f; if (!inleft) *(pout++) = '='; else { *(pout++) = base64_alphabet[i4]; inleft--; } outleft -= 4; } /* terminate the output string */ *pout = 0; free(outtemp); return pout - outstring; } /** * base64_decode: * @dest: buffer for the converted string, will be NUL terminated * @destlen: size of @dest * @source: buffer with the string to be converted * @inlen: length of @source * * Returns: the number of bytes used in @dest * * Converts a generic string from base 64 encoding. * @destlen needs to be at least 3 / 4 + 1 of @inlen to hold the converted * string and the terminator. */ int base64_decode(char *dest, int destlen, const char *source, int inlen) { int dtable[256]; int i, c; int dpos = 0; int spos = 0; for (i = 0; i < 255; i++) { dtable[i] = 0x80; } for (i = 'A'; i <= 'Z'; i++) { dtable[i] = 0 + (i - 'A'); } for (i = 'a'; i <= 'z'; i++) { dtable[i] = 26 + (i - 'a'); } for (i = '0'; i <= '9'; i++) { dtable[i] = 52 + (i - '0'); } dtable['+'] = 62; dtable['/'] = 63; dtable['='] = 0; /* CONSTANT CONDITION */ while (1) { int a[4], b[4], o[3]; for (i = 0; i < 4; i++) { if (spos >= inlen || dpos >= destlen) { goto endloop; } c = source[spos++]; if (c == 0) { if (i > 0) { goto endloop; } goto endloop; } if (dtable[c] & 0x80) { /* Ignoring errors: discard invalid character. */ i--; continue; } a[i] = (int) c; b[i] = (int) dtable[c]; } o[0] = (b[0] << 2) | (b[1] >> 4); o[1] = (b[1] << 4) | (b[2] >> 2); o[2] = (b[2] << 6) | b[3]; i = a[2] == '=' ? 1 : (a[3] == '=' ? 2 : 3); if (i >= 1) dest[dpos++] = o[0]; if (i >= 2) dest[dpos++] = o[1]; if (i >= 3) dest[dpos++] = o[2]; dest[dpos] = 0; if (i < 3) { goto endloop; } } endloop: return dpos; } /** * utf8_base64_encode: * @dest: buffer for the converted string, NUL terminated * @destlen: size of @dest * @in: buffer with the string to be converted * @inlen: length of @in * * Returns: the number of bytes used by the converted string * * Converts a string from application default encoding to UTF-8 then to base 64. * @dest must be valid and big enough to hold the converted string. */ int utf8_base64_encode(char *dest, int destlen, const char *in, int inlen) { char *aux; int retval; aux = calloc(destlen + 1, sizeof(char)); retval = utf8_encode(aux, destlen, in, inlen); if (retval >= 0) retval = base64_encode(dest, destlen, aux, retval); free(aux); return retval; } /** * utf8_base64_decode: * @dest: buffer for the converted string * @destlen: size of @dest * @in: buffer with the string to be converted * @inlen: length of @in * * Returns: the number of bytes used by the converted string * * Converts a string from base 64 to UTF-8 then to application default encoding. * @dest must be valid and big enough to hold the converted string. */ int utf8_base64_decode(char *dest, int destlen, const char *in, int inlen) { char *aux; int retval; aux = calloc(destlen + 1, sizeof(char)); retval = base64_decode(aux, destlen, in, inlen); if (retval >= 0) retval = utf8_decode(dest, destlen, aux, retval); free(aux); return retval; } /** * add_slashes: * @dest: buffer for the converted string, NUL terminated * @src: buffer with the string to be converted * @maxlen: size of @dest, must be 2 * @len + 1 in the worst case * @len: length of @src * * Returns: the number of bytes used by the converted string * * Escapes the following characters (according to rfc 2426): * '\n', '\r', ';', ',', '\'. */ int add_slashes(char *dest, char *src, int maxlen, int len) { int i, j; for (i = 0, j = 0; i < len && j < maxlen; i++, j++) { switch (src[i]) { case '\n': dest[j++] = '\\'; dest[j] = 'n'; break; case '\r': dest[j++] = '\\'; dest[j] = 'r'; break; case '\\': case ';': case ',': dest[j++] = '\\'; default: dest[j] = src[i]; break; } } dest[j] = 0; return j; } /** * strip_slashes: * @dest: buffer for the converted string, NUL terminated * @src: buffer with the string to be converted * @maxlen: size of @dest, must be @len + 1 in the worst case * @len: length of @src * * Returns: the number of bytes used by the converted string * * Unescapes the caracters escaped by add_slashes(). */ int strip_slashes(char *dest, const char *src, int maxlen, int len) { int i, j, slash_state = 0; for (i = 0, j = 0; i < len && j < maxlen; i++) { switch (src[i]) { case ';': case ',': if (slash_state) { slash_state = 0; } dest[j++] = src[i]; break; case '\\': if (slash_state) { dest[j++] = src[i]; slash_state = 0; } else { slash_state = 1; } break; case 'n': if (slash_state) { dest[j++] = '\n'; slash_state = 0; } else { dest[j++] = src[i]; } break; case 'r': if (slash_state) { dest[j++] = '\r'; slash_state = 0; } else { dest[j++] = src[i]; } break; default: if (slash_state) { dest[j++] = '\\'; slash_state = 0; } dest[j++] = src[i]; break; } } dest[j] = 0; return j; } gnokii-0.6.31/common/gsm-ringtones.c0000644000175000017500000004673011666163120015445 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janík ml. Copyright (C) 2001 Chris Kemp, Marcin Wiacek Copyright (C) 2002 Pavel Machek Copyright (C) 2002-2004 Pawel Kot Copyright (C) 2002-2003 BORBELY Zoltan This file provides support for ringtones. */ #include "config.h" #include "compat.h" #include "gnokii.h" #include "misc.h" /* Beats-per-Minute Encoding */ int BeatsPerMinute[] = { 25, 28, 31, 35, 40, 45, 50, 56, 63, 70, 80, 90, 100, 112, 125, 140, 160, 180, 200, 225, 250, 285, 320, 355, 400, 450, 500, 565, 635, 715, 800, 900 }; int OctetAlign(unsigned char *Dest, int CurrentBit) { int i=0; while((CurrentBit+i)%8) { gn_ringtone_clear_bit(Dest, CurrentBit+i); i++; } return CurrentBit+i; } int OctetAlignNumber(int CurrentBit) { int i=0; while((CurrentBit+i)%8) { i++; } return CurrentBit+i; } int BitPack(unsigned char *Dest, int CurrentBit, unsigned char *Source, int Bits) { int i; for (i=0; i is always octet-aligned. */ StartBit=OctetAlign(package, StartBit); StartBit=BitPackByte(package, StartBit, GN_RINGTONE_Sound, 7); StartBit=BitPackByte(package, StartBit, GN_RINGTONE_BasicSongType, 3); /* Packing the name of the tune. */ StartBit=BitPackByte(package, StartBit, strlen(ringtone->name)<<4, 4); StartBit=BitPack(package, StartBit, ringtone->name, 8*strlen(ringtone->name)); /* Info about song pattern */ StartBit=BitPackByte(package, StartBit, 0x01, 8); /* One song pattern */ StartBit=BitPackByte(package, StartBit, GN_RINGTONE_PatternHeaderId, 3); StartBit=BitPackByte(package, StartBit, GN_RINGTONE_A_part, 2); StartBit=BitPackByte(package, StartBit, 0, 4); /* No loop value */ /* Info, how long is contents for SMS */ HowLong=30+8*strlen(ringtone->name)+17+8+8+13; /* Calculate the number of instructions in the tune. Each Note contains Note and (sometimes) Scale. Default Tempo and Style are instructions too. */ HowMany=2; /* Default Tempo and Style */ for(i = 0; i < ringtone->notes_count; i++) { /* PC Composer 2.0.010 doesn't like, when we start ringtone from pause: it displays that the format is invalid and hangs, when you move mouse over place, where pause is */ if (gn_note_get(ringtone->notes[i].note)==GN_RINGTONE_Note_Pause && oldscale==10) { StartNote++; } else { /* we don't write Scale info before "Pause" note - it saves space */ if (gn_note_get(ringtone->notes[i].note)!=GN_RINGTONE_Note_Pause && oldscale!=(newscale=GSM_GetScale(ringtone->notes[i].note))) { /* We calculate, if we have space to add next scale instruction */ if (((HowLong+5)/8)<=(*maxlength-1)) { oldscale=newscale; HowMany++; HowLong+=5; } else { break; } } /* We calculate, if we have space to add next note instruction */ if (((HowLong+12)/8)<=(*maxlength-1)) { HowMany++; EndNote++; HowLong+=12; } else { break; } } /* If we are sure, we pack it for SMS or setting to phone, not for OTT file */ if (*maxlength<1000) { /* Pc Composer gives this as the phone limitation */ if ((EndNote-StartNote)==GN_RINGTONE_MAX_NOTES-1) break; } } StartBit=BitPackByte(package, StartBit, HowMany, 8); /* Style */ StartBit=BitPackByte(package, StartBit, GN_RINGTONE_StyleInstructionId, 3); StartBit=BitPackByte(package, StartBit, GN_RINGTONE_ContinuousStyle, 2); /* Beats per minute/tempo of the tune */ StartBit=BitPackByte(package, StartBit, GN_RINGTONE_TempoInstructionId, 3); StartBit=BitPackByte(package, StartBit, GetTempo(ringtone->tempo), 5); /* Default scale */ oldscale=10; /* Notes packing */ for(i=StartNote; i<(EndNote+StartNote); i++) { /* we don't write Scale info before "Pause" note - it saves place */ if (gn_note_get(ringtone->notes[i].note)!=GN_RINGTONE_Note_Pause && oldscale!=(newscale=GSM_GetScale(ringtone->notes[i].note))) { oldscale=newscale; StartBit=BitPackByte(package, StartBit, GN_RINGTONE_ScaleInstructionId, 3); StartBit=BitPackByte(package, StartBit, GSM_GetScale(ringtone->notes[i].note), 2); } /* Note */ StartBit=BitPackByte(package, StartBit, GN_RINGTONE_NoteInstructionId, 3); StartBit=BitPackByte(package, StartBit, gn_note_get(ringtone->notes[i].note), 4); StartBit=BitPackByte(package, StartBit, GSM_GetDuration(ringtone->notes[i].duration,&spec), 3); StartBit=BitPackByte(package, StartBit, spec, 2); } StartBit=OctetAlign(package, StartBit); StartBit=BitPackByte(package, StartBit, GN_RINGTONE_CommandEnd, 8); if (StartBit!=OctetAlignNumber(HowLong)) dprintf("Error in PackRingtone - StartBit different to HowLong %d - %d)\n", StartBit,OctetAlignNumber(HowLong)); *maxlength=StartBit/8; return(EndNote+StartNote); } int BitUnPack(unsigned char *Dest, int CurrentBit, unsigned char *Source, int Bits) { int i; for (i=0; i is always octet-aligned. */ StartBit = OctetUnAlign(StartBit); StartBit = BitUnPackInt(package, StartBit, &l, 7); if (l != GN_RINGTONE_Sound) { dprintf("Not Sound\n"); return GN_ERR_WRONGDATAFORMAT; } StartBit = BitUnPackInt(package, StartBit, &l, 3); if (l != GN_RINGTONE_BasicSongType) { dprintf("Not BasicSongType\n"); return GN_ERR_WRONGDATAFORMAT; } /* Getting length of the tune name */ StartBit = BitUnPackInt(package, StartBit, &l, 4); l = l >> 4; /* Unpacking the name of the tune. */ StartBit = BitUnPack(package, StartBit, ringtone->name, 8*l); ringtone->name[l] = 0; StartBit = BitUnPackInt(package, StartBit, &l, 8); if (l != 1) return GN_ERR_WRONGDATAFORMAT; StartBit = BitUnPackInt(package, StartBit, &l, 3); if (l != GN_RINGTONE_PatternHeaderId) { dprintf("Not PatternHeaderId\n"); return GN_ERR_WRONGDATAFORMAT; } StartBit += 2; //Pattern ID - we ignore it StartBit = BitUnPackInt(package, StartBit, &l, 4); HowMany = 0; StartBit = BitUnPackInt(package, StartBit, &HowMany, 8); scale = 0; ringtone->notes_count = 0; for (i = 0; i < HowMany; i++) { StartBit = BitUnPackInt(package, StartBit, &q, 3); switch (q) { case GN_RINGTONE_VolumeInstructionId: StartBit += 4; break; case GN_RINGTONE_StyleInstructionId: StartBit = BitUnPackInt(package, StartBit, &l, 2); l = l >> 3; break; case GN_RINGTONE_TempoInstructionId: StartBit = BitUnPackInt(package, StartBit, &l, 5); l = l >> 3; ringtone->tempo = BeatsPerMinute[l]; break; case GN_RINGTONE_ScaleInstructionId: StartBit = BitUnPackInt(package, StartBit, &scale, 2); scale = scale >> 6; break; case GN_RINGTONE_NoteInstructionId: StartBit = BitUnPackInt(package, StartBit, &l, 4); switch (l) { case GN_RINGTONE_Note_C : ringtone->notes[ringtone->notes_count].note = 0; break; case GN_RINGTONE_Note_Cis : ringtone->notes[ringtone->notes_count].note = 1; break; case GN_RINGTONE_Note_D : ringtone->notes[ringtone->notes_count].note = 2; break; case GN_RINGTONE_Note_Dis : ringtone->notes[ringtone->notes_count].note = 3; break; case GN_RINGTONE_Note_E : ringtone->notes[ringtone->notes_count].note = 4; break; case GN_RINGTONE_Note_F : ringtone->notes[ringtone->notes_count].note = 6; break; case GN_RINGTONE_Note_Fis : ringtone->notes[ringtone->notes_count].note = 7; break; case GN_RINGTONE_Note_G : ringtone->notes[ringtone->notes_count].note = 8; break; case GN_RINGTONE_Note_Gis : ringtone->notes[ringtone->notes_count].note = 9; break; case GN_RINGTONE_Note_A : ringtone->notes[ringtone->notes_count].note = 10; break; case GN_RINGTONE_Note_Ais : ringtone->notes[ringtone->notes_count].note = 11; break; case GN_RINGTONE_Note_H : ringtone->notes[ringtone->notes_count].note = 12; break; default : ringtone->notes[ringtone->notes_count].note = 255; break; /* Pause ? */ } if (ringtone->notes[ringtone->notes_count].note != 255) ringtone->notes[ringtone->notes_count].note = ringtone->notes[ringtone->notes_count].note + scale*14; StartBit = BitUnPackInt(package, StartBit, &duration, 3); StartBit = BitUnPackInt(package, StartBit, &spec, 2); if (duration==GN_RINGTONE_Duration_Full && spec == GN_RINGTONE_DottedNote) ringtone->notes[ringtone->notes_count].duration=128*3/2; if (duration==GN_RINGTONE_Duration_Full && spec == GN_RINGTONE_Length_2_3) ringtone->notes[ringtone->notes_count].duration=128*2/3; if (duration==GN_RINGTONE_Duration_Full && spec == GN_RINGTONE_NoSpecialDuration) ringtone->notes[ringtone->notes_count].duration=128; if (duration==GN_RINGTONE_Duration_1_2 && spec == GN_RINGTONE_DottedNote) ringtone->notes[ringtone->notes_count].duration=64*3/2; if (duration==GN_RINGTONE_Duration_1_2 && spec == GN_RINGTONE_Length_2_3) ringtone->notes[ringtone->notes_count].duration=64*2/3; if (duration==GN_RINGTONE_Duration_1_2 && spec == GN_RINGTONE_NoSpecialDuration) ringtone->notes[ringtone->notes_count].duration=64; if (duration==GN_RINGTONE_Duration_1_4 && spec == GN_RINGTONE_DottedNote) ringtone->notes[ringtone->notes_count].duration=32*3/2; if (duration==GN_RINGTONE_Duration_1_4 && spec == GN_RINGTONE_Length_2_3) ringtone->notes[ringtone->notes_count].duration=32*2/3; if (duration==GN_RINGTONE_Duration_1_4 && spec == GN_RINGTONE_NoSpecialDuration) ringtone->notes[ringtone->notes_count].duration=32; if (duration==GN_RINGTONE_Duration_1_8 && spec == GN_RINGTONE_DottedNote) ringtone->notes[ringtone->notes_count].duration=16*3/2; if (duration==GN_RINGTONE_Duration_1_8 && spec == GN_RINGTONE_Length_2_3) ringtone->notes[ringtone->notes_count].duration=16*2/3; if (duration==GN_RINGTONE_Duration_1_8 && spec == GN_RINGTONE_NoSpecialDuration) ringtone->notes[ringtone->notes_count].duration=16; if (duration==GN_RINGTONE_Duration_1_16 && spec == GN_RINGTONE_DottedNote) ringtone->notes[ringtone->notes_count].duration=8*3/2; if (duration==GN_RINGTONE_Duration_1_16 && spec == GN_RINGTONE_Length_2_3) ringtone->notes[ringtone->notes_count].duration=8*2/3; if (duration==GN_RINGTONE_Duration_1_16 && spec == GN_RINGTONE_NoSpecialDuration) ringtone->notes[ringtone->notes_count].duration=8; if (duration==GN_RINGTONE_Duration_1_32 && spec == GN_RINGTONE_DottedNote) ringtone->notes[ringtone->notes_count].duration=4*3/2; if (duration==GN_RINGTONE_Duration_1_32 && spec == GN_RINGTONE_Length_2_3) ringtone->notes[ringtone->notes_count].duration=4*2/3; if (duration==GN_RINGTONE_Duration_1_32 && spec == GN_RINGTONE_NoSpecialDuration) ringtone->notes[ringtone->notes_count].duration=4; if (ringtone->notes_count == GN_RINGTONE_MAX_NOTES-1) break; ringtone->notes_count++; break; default: dprintf("Unsupported block\n"); return GN_ERR_WRONGDATAFORMAT; } } return GN_ERR_NONE; } gn_error GSM_ReadRingtoneFromSMS(gn_sms *message, gn_ringtone *ringtone) { if (message->udh.udh[0].type == GN_SMS_UDH_Ringtone) { return gn_ringtone_unpack(ringtone, message->user_data[0].u.text, message->user_data[0].length); } else return GN_ERR_WRONGDATAFORMAT; } int ringtone_sms_encode(unsigned char *message, gn_ringtone *ringtone) { int j = GN_SMS_8BIT_MAX_LENGTH; gn_ringtone_pack(ringtone, message, &j); return j; } /* Returns message length */ int imelody_sms_encode(unsigned char *imelody, unsigned char *message) { unsigned int current = 0; dprintf("EMS iMelody\n"); message[current++] = strlen(imelody) + 3; message[current++] = 0x0c; /* iMelody code */ message[current++] = strlen(imelody) + 1; message[current++] = 0; /* Position in text this melody is at */ /* FIXME: check the overflow */ strcpy(message + current, imelody); return (current + strlen(imelody)); } GNOKII_API void gn_ringtone_get_tone(const gn_ringtone *ringtone, int n, int *freq, int *ulen) { float f; *freq = 0; *ulen = 0; if (n >= ringtone->notes_count) return; if (ringtone->notes[n].note != 255) { switch (ringtone->notes[n].note % 14) { case 0: f = 261.625565; break; case 1: f = 277.182631; break; case 2: f = 293.664768; break; case 3: f = 311.126984; break; case 4: f = 329.627557; break; case 5: f = 329.627557; break; case 6: f = 349.228231; break; case 7: f = 369.994423; break; case 8: f = 391.995436; break; case 9: f = 415.304698; break; case 10: f = 440.000000; break; case 11: f = 466.163762; break; case 12: f = 493.883301; break; case 13: f = 493.883301; break; default: f = 0; break; } switch (ringtone->notes[n].note / 14) { case 0: *freq = f; break; case 1: *freq = f * 2; break; case 2: *freq = f * 4; break; case 3: *freq = f * 8; break; default: *freq = 0; break; } } *ulen = 1875000 * ringtone->notes[n].duration / ringtone->tempo; } GNOKII_API void gn_ringtone_set_duration(gn_ringtone *ringtone, int n, int ulen) { int l = ulen * ringtone->tempo / 240; gn_ringtone_note *note = ringtone->notes + n; if (l < 156250) { if (l < 54687) { if (l < 15625) note->duration = 0; else if (l < 39062) note->duration = 4; else note->duration = 4 * 3/2; } else { if (l < 78125) note->duration = 8; else if (l < 109375) note->duration = 8 * 3/2; else note->duration = 16; } } else { if (l < 437500) { if (l < 218750) note->duration = 16 * 3/2; else if (l < 312500) note->duration = 32; else note->duration = 32 * 3/2; } else { if (l < 625000) note->duration = 64; else if (l < 875000) note->duration = 64 * 3/2; else if (l < 1250000) note->duration = 128; else note->duration = 128 * 3/2; } } } gnokii-0.6.31/common/vcard.c0000644000175000017500000004304411666163120013743 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2002 Pavel Machek Copyright (C) 2003-2004 Pawel Kot */ #include "config.h" #include #include #include #include "compat.h" #include "gnokii.h" #include "gnokii-internal.h" typedef struct { char *str; char *end; unsigned int len; } vcard_string; /* Copies at most @maxcount strings, each of @maxsize length to the given pointers from a vCard property, such as ADR;TYPE=HOME,PREF:PO Box;Ext Add;Street;Town;State;ZIP;Country Returns: the number of strings copied */ int copy_fields(const char *str, int maxcount, size_t maxsize, ...) { va_list ap; int count; size_t size; char *dest; va_start(ap, maxsize); for (count = maxcount; count && *str; count--) { dest = va_arg(ap, char *); size = maxsize; while (size && *str) { if (*str == ';') { str++; break; } *dest++ = *str++; size--; } *dest = '\0'; } va_end(ap); return maxcount - count; } /* Write a string to a file doing folding when needed (see RFC 2425) */ static void vcard_append_printf(vcard_string *str, const char *fmt, ...) { char buf[1024]; va_list ap; size_t len, to_copy; int lines, l; char *s = "\r\n"; va_start(ap, fmt); vsnprintf(buf, sizeof(buf), fmt, ap); va_end(ap); /* Split lines according to sections 5.8.1 and 5.8.2 of http://www.ietf.org/rfc/rfc2425.txt */ len = strlen(buf); /* Number of lines needed after the first one: * at most 75 characters in the first line * at most space+74 characters in each line beyond the first */ if (len < 2) lines = 0; else lines = (len - 75 + 73) / 74; /* Current string length * plus length of the string to be appended * plus 2 characters for \r\n at the end of the first line, * plus 3 characters for space at the beginning and \r\n at the end of each line beyond the first * and a NUL byte to finish it off */ str->str = realloc(str->str, str->len + len + 2 + lines * 3 + 1); str->end = str->str + str->len; to_copy = GNOKII_MIN(75, len); memcpy(str->end, buf, to_copy); str->end += to_copy; len -= to_copy; for (l = 0; l < lines; l++) { char *s = "\r\n "; memcpy(str->end, s, 3); str->end += 3; to_copy = GNOKII_MIN(74, len); memcpy(str->end, buf + 75 + 74 * l, to_copy); str->end += to_copy; len -= to_copy; } memcpy(str->end, s, 2); str->end += 2; str->end[0] = '\0'; str->len = str->end - str->str; } GNOKII_API char * gn_phonebook2vcardstr(gn_phonebook_entry *entry) { vcard_string str; int i; char name[2 * GN_PHONEBOOK_NAME_MAX_LENGTH]; memset(&str, 0, sizeof(str)); vcard_append_printf(&str, "BEGIN:VCARD"); vcard_append_printf(&str, "VERSION:3.0"); add_slashes(name, entry->name, sizeof(name), strlen(entry->name)); vcard_append_printf(&str, "FN:%s", name); if (entry->person.has_person) vcard_append_printf(&str, "N:%s;%s;%s;%s;%s", entry->person.family_name[0] ? entry->person.family_name : "", entry->person.given_name[0] ? entry->person.given_name : "", entry->person.additional_names[0] ? entry->person.additional_names : "", entry->person.honorific_prefixes[0] ? entry->person.honorific_prefixes : "", entry->person.honorific_suffixes[0] ? entry->person.honorific_suffixes : ""); else vcard_append_printf(&str, "N:%s", name); if (*entry->number) vcard_append_printf(&str, "TEL;TYPE=PREF,VOICE:%s", entry->number); vcard_append_printf(&str, "X-GSM-MEMORY:%s", gn_memory_type2str(entry->memory_type)); vcard_append_printf(&str, "X-GSM-LOCATION:%d", entry->location); vcard_append_printf(&str, "X-GSM-CALLERGROUP:%d", entry->caller_group); vcard_append_printf(&str, "CATEGORIES:%s", gn_phonebook_group_type2str(entry->caller_group)); if (entry->address.has_address) vcard_append_printf(&str, "ADR;TYPE=HOME,PREF:%s;%s;%s;%s;%s;%s;%s", entry->address.post_office_box[0] ? entry->address.post_office_box : "", entry->address.extended_address[0] ? entry->address.extended_address : "", entry->address.street[0] ? entry->address.street : "", entry->address.city[0] ? entry->address.city : "", entry->address.state_province[0] ? entry->address.state_province : "", entry->address.zipcode[0] ? entry->address.zipcode : "", entry->address.country[0] ? entry->address.country : ""); /* Add ext. pbk info if required */ for (i = 0; i < entry->subentries_count; i++) { switch (entry->subentries[i].entry_type) { case GN_PHONEBOOK_ENTRY_Email: add_slashes(name, entry->subentries[i].data.number, sizeof(name), strlen(entry->subentries[i].data.number)); vcard_append_printf(&str, "EMAIL;TYPE=INTERNET:%s", name); break; case GN_PHONEBOOK_ENTRY_Postal: add_slashes(name, entry->subentries[i].data.number, sizeof(name), strlen(entry->subentries[i].data.number)); vcard_append_printf(&str, "ADR;TYPE=HOME:%s", name); break; case GN_PHONEBOOK_ENTRY_Note: add_slashes(name, entry->subentries[i].data.number, sizeof(name), strlen(entry->subentries[i].data.number)); vcard_append_printf(&str, "NOTE:%s", name); break; case GN_PHONEBOOK_ENTRY_Number: switch (entry->subentries[i].number_type) { case GN_PHONEBOOK_NUMBER_Home: vcard_append_printf(&str, "TEL;TYPE=HOME:%s", entry->subentries[i].data.number); break; case GN_PHONEBOOK_NUMBER_Mobile: vcard_append_printf(&str, "TEL;TYPE=CELL:%s", entry->subentries[i].data.number); break; case GN_PHONEBOOK_NUMBER_Fax: vcard_append_printf(&str, "TEL;TYPE=FAX:%s", entry->subentries[i].data.number); break; case GN_PHONEBOOK_NUMBER_Work: vcard_append_printf(&str, "TEL;TYPE=WORK:%s", entry->subentries[i].data.number); break; case GN_PHONEBOOK_NUMBER_None: case GN_PHONEBOOK_NUMBER_Common: vcard_append_printf(&str, "TEL;TYPE=VOICE:%s", entry->subentries[i].data.number); break; case GN_PHONEBOOK_NUMBER_General: vcard_append_printf(&str, "TEL;TYPE=PREF:%s", entry->subentries[i].data.number); break; default: vcard_append_printf(&str, "TEL;TYPE=X-UNKNOWN-%d: %s", entry->subentries[i].number_type, entry->subentries[i].data.number); break; } break; case GN_PHONEBOOK_ENTRY_URL: add_slashes(name, entry->subentries[i].data.number, sizeof(name), strlen(entry->subentries[i].data.number)); vcard_append_printf(&str, "URL:%s", name); break; case GN_PHONEBOOK_ENTRY_JobTitle: add_slashes(name, entry->subentries[i].data.number, sizeof(name), strlen(entry->subentries[i].data.number)); vcard_append_printf(&str, "TITLE:%s", name); break; case GN_PHONEBOOK_ENTRY_Company: add_slashes(name, entry->subentries[i].data.number, sizeof(name), strlen(entry->subentries[i].data.number)); vcard_append_printf(&str, "ORG:%s", name); break; case GN_PHONEBOOK_ENTRY_Nickname: add_slashes(name, entry->subentries[i].data.number, sizeof(name), strlen(entry->subentries[i].data.number)); vcard_append_printf(&str, "NICKNAME:%s", name); break; case GN_PHONEBOOK_ENTRY_Birthday: vcard_append_printf(&str, "BDAY:%04u%02u%02uT%02u%02u%02u", entry->subentries[i].data.date.year, entry->subentries[i].data.date.month, entry->subentries[i].data.date.day, entry->subentries[i].data.date.hour, entry->subentries[i].data.date.minute, entry->subentries[i].data.date.second); break; case GN_PHONEBOOK_ENTRY_Date: /* This is used when reading DC, MC, RC so the vcard *reader* won't read it back */ vcard_append_printf(&str, "REV:%04u%02u%02uT%02u%02u%02u", entry->subentries[i].data.date.year, entry->subentries[i].data.date.month, entry->subentries[i].data.date.day, entry->subentries[i].data.date.hour, entry->subentries[i].data.date.minute, entry->subentries[i].data.date.second); break; case GN_PHONEBOOK_ENTRY_ExtGroup: vcard_append_printf(&str, "X-GSM-CALLERGROUPID:%d", entry->subentries[i].data.id); break; case GN_PHONEBOOK_ENTRY_PTTAddress: add_slashes(name, entry->subentries[i].data.number, sizeof(name), strlen(entry->subentries[i].data.number)); vcard_append_printf(&str, "X-SIP;POC:%s", name); break; case GN_PHONEBOOK_ENTRY_UserID: add_slashes(name, entry->subentries[i].data.number, sizeof(name), strlen(entry->subentries[i].data.number)); vcard_append_printf(&str, "X-WV-ID:%s", name); break; case GN_PHONEBOOK_ENTRY_FirstName: case GN_PHONEBOOK_ENTRY_Group: case GN_PHONEBOOK_ENTRY_Image: case GN_PHONEBOOK_ENTRY_LastName: case GN_PHONEBOOK_ENTRY_Location: case GN_PHONEBOOK_ENTRY_Logo: case GN_PHONEBOOK_ENTRY_LogoSwitch: case GN_PHONEBOOK_ENTRY_Pointer: case GN_PHONEBOOK_ENTRY_Ringtone: case GN_PHONEBOOK_ENTRY_RingtoneAdv: case GN_PHONEBOOK_ENTRY_Video: /* Ignore */ break; case GN_PHONEBOOK_ENTRY_City: case GN_PHONEBOOK_ENTRY_Country: case GN_PHONEBOOK_ENTRY_ExtendedAddress: case GN_PHONEBOOK_ENTRY_FormalName: case GN_PHONEBOOK_ENTRY_Name: case GN_PHONEBOOK_ENTRY_PostalAddress: case GN_PHONEBOOK_ENTRY_StateProvince: case GN_PHONEBOOK_ENTRY_Street: case GN_PHONEBOOK_ENTRY_ZipCode: add_slashes(name, entry->subentries[i].data.number, sizeof(name), strlen(entry->subentries[i].data.number)); vcard_append_printf(&str, "X-GNOKII-%d:%s", entry->subentries[i].entry_type, name); break; } } vcard_append_printf(&str, "END:VCARD"); /* output an empty line */ vcard_append_printf(&str, ""); return str.str; } GNOKII_API int gn_phonebook2vcard(FILE *f, gn_phonebook_entry *entry, char *location) { char *vcard; int retval; vcard = gn_phonebook2vcardstr(entry); if (vcard == NULL) return -1; retval = fputs(vcard, f); free(vcard); return retval; } #define BEGINS(a) ( !strncmp(buf, a, strlen(a)) ) #define STRIP(a, b) strip_slashes(b, buf+strlen(a), line_len - strlen(a), GN_PHONEBOOK_NAME_MAX_LENGTH) #define STORE3(a, b) if (BEGINS(a)) { STRIP(a, b); } #define STORE2(a, b, c) if (BEGINS(a)) { c; STRIP(a, b); continue; } #define STORE(a, b) STORE2(a, b, (void) 0) #define STOREINT(a, b) if (BEGINS(a)) { b = atoi(buf+strlen(a)); continue; } #define STORESUB(a, c) if (entry->subentries_count == GN_PHONEBOOK_SUBENTRIES_MAX_NUMBER) return -1; \ STORE2(a, entry->subentries[entry->subentries_count++].data.number, \ entry->subentries[entry->subentries_count].entry_type = c); #define STORENUM(a, c) if (entry->subentries_count == GN_PHONEBOOK_SUBENTRIES_MAX_NUMBER) return -1; \ STORE2(a, entry->subentries[entry->subentries_count++].data.number, \ entry->subentries[entry->subentries_count].entry_type = GN_PHONEBOOK_ENTRY_Number; \ entry->subentries[entry->subentries_count].number_type = c); #define STOREMEMTYPE(a, memory_type) if (BEGINS(a)) { STRIP(a, memory_name); memory_type = gn_str2memory_type(memory_name); } #define STOREDATE(a, c) if (BEGINS(a)) { \ if (entry->subentries_count == GN_PHONEBOOK_SUBENTRIES_MAX_NUMBER) return -1; \ memset(&entry->subentries[entry->subentries_count].data.date, 0, sizeof(entry->subentries[entry->subentries_count].data.date)); \ sscanf(buf+strlen(a), "%4u%2u%2uT%2u%2u%2u", \ &entry->subentries[entry->subentries_count].data.date.year, \ &entry->subentries[entry->subentries_count].data.date.month, \ &entry->subentries[entry->subentries_count].data.date.day, \ &entry->subentries[entry->subentries_count].data.date.hour, \ &entry->subentries[entry->subentries_count].data.date.minute, \ &entry->subentries[entry->subentries_count].data.date.second); \ entry->subentries[entry->subentries_count].entry_type = c; \ entry->subentries_count++; \ } while (0) #undef ERROR #define ERROR(a) fprintf(stderr, "%s\n", a) static void str_append_printf(vcard_string *str, const char *s) { int len; if (str->str == NULL) { str->str = strdup(s); str->len = strlen(s) + 1; return; } len = strlen(s); str->str = realloc(str->str, len + str->len); memcpy(str->str + str->len - 1, s, len); str->len = str->len + len; str->end = str->str + str->len; /* NULL-terminate the string now */ *(str->end - 1) = '\0'; } GNOKII_API int gn_vcard2phonebook(FILE *f, gn_phonebook_entry *entry) { char buf[1024]; vcard_string str; int retval; memset(&str, 0, sizeof(str)); while (1) { if (!fgets(buf, 1024, f)) return -1; if (BEGINS("BEGIN:VCARD")) break; } str_append_printf(&str, "BEGIN:VCARD\r\n"); while (fgets(buf, 1024, f)) { str_append_printf(&str, buf); if (BEGINS("END:VCARD")) break; } retval = gn_vcardstr2phonebook(str.str, entry); free(str.str); return retval; } /* We assume gn_phonebook_entry is ready for writing in, ie. no rubbish inside */ GNOKII_API int gn_vcardstr2phonebook(const char *vcard, gn_phonebook_entry *entry) { char memloc[10]; char memory_name[10]; char *v, *fold, *s, **lines; int num_lines, i; if (vcard == NULL) return -1; memset(memloc, 0, sizeof(memloc)); memset(memory_name, 0, sizeof(memory_name)); /* Remove folding */ v = strdup(vcard); fold = strstr(v, "\r\n"); while (fold != NULL) { memmove(fold, fold + 1, strlen(fold)); fold = strstr(fold, "\r\n"); } fold = strstr(v, "\n "); while (fold != NULL) { memmove(fold, fold + 2, strlen(fold) - 1); fold = strstr(fold, "\n "); } fold = strstr(v, "\n\t"); while (fold != NULL) { memmove(fold, fold + 2, strlen(fold) - 1); fold = strstr(fold, "\n\t"); } /* Count the number of lines */ s = strstr(v, "\n"); for (num_lines = 0; s != NULL; num_lines++) { s = strstr(s + 1, "\n"); } /* FIXME on error STORESUB() and STORENUM() leak memory allocated by gnokii_strsplit() */ lines = gnokii_strsplit(v, "\n", num_lines); for (i = 0; i < num_lines; i++) { char *buf; int line_len; if (lines[i] == NULL || *lines[i] == '\0') continue; buf = lines[i]; line_len = strlen(buf); /* Strip traling '\r's */ while (line_len > 0 && buf[line_len-1] == '\r') buf[--line_len] = '\0'; if (BEGINS("N:")) { if (0 < copy_fields(buf +2 , 5, GN_PHONEBOOK_PERSON_MAX_LENGTH, entry->person.family_name, entry->person.given_name, entry->person.additional_names, entry->person.honorific_prefixes, entry->person.honorific_suffixes )) { entry->person.has_person = 1; /* Temporary solution. In the phone driver we should handle person struct */ if (entry->person.family_name[0]) { strcpy(entry->subentries[entry->subentries_count].data.number, entry->person.family_name); entry->subentries[entry->subentries_count].entry_type = GN_PHONEBOOK_ENTRY_LastName; entry->subentries_count++; } if (entry->person.given_name[0]) { strcpy(entry->subentries[entry->subentries_count].data.number, entry->person.given_name); entry->subentries[entry->subentries_count].entry_type = GN_PHONEBOOK_ENTRY_FirstName; entry->subentries_count++; } } continue; } STORE("FN:", entry->name); STORE("TEL;TYPE=PREF,VOICE:", entry->number); if (BEGINS("ADR;TYPE=HOME,PREF:")) { if (0 < copy_fields(buf + 19, 7, GN_PHONEBOOK_ADDRESS_MAX_LENGTH, entry->address.post_office_box, entry->address.extended_address, entry->address.street, entry->address.city, entry->address.state_province, entry->address.zipcode, entry->address.country )) { entry->address.has_address = 1; } continue; } STORESUB("URL:", GN_PHONEBOOK_ENTRY_URL); STORESUB("EMAIL;TYPE=INTERNET:", GN_PHONEBOOK_ENTRY_Email); STORESUB("ADR;TYPE=HOME:", GN_PHONEBOOK_ENTRY_Postal); STORESUB("NOTE:", GN_PHONEBOOK_ENTRY_Note); STORESUB("TITLE:", GN_PHONEBOOK_ENTRY_JobTitle); STORESUB("ORG:", GN_PHONEBOOK_ENTRY_Company); STORESUB("NICKNAME:", GN_PHONEBOOK_ENTRY_Nickname); STORESUB("X-SIP;POC:", GN_PHONEBOOK_ENTRY_PTTAddress); STORESUB("X-WV-ID:", GN_PHONEBOOK_ENTRY_UserID); STOREDATE("BDAY:", GN_PHONEBOOK_ENTRY_Birthday); #if 1 /* libgnokii 0.6.25 deprecates X_GSM_STORE_AT in favour of X-GSM-MEMORY and X-GSM-LOCATION and X_GSM_CALLERGROUP in favour of X-GSM-CALLERGROUP */ STORE3("X_GSM_STORE_AT:", memloc); /* if the field is present and correctly formed */ if (strlen(memloc) > 2) { entry->location = atoi(memloc + 2); memloc[2] = 0; entry->memory_type = gn_str2memory_type(memloc); continue; } STOREINT("X_GSM_CALLERGROUP:", entry->caller_group); #endif STOREMEMTYPE("X-GSM-MEMORY:", entry->memory_type); STOREINT("X-GSM-LOCATION:", entry->location); STOREINT("X-GSM-CALLERGROUP:", entry->caller_group); STORENUM("TEL;TYPE=HOME:", GN_PHONEBOOK_NUMBER_Home); STORENUM("TEL;TYPE=CELL:", GN_PHONEBOOK_NUMBER_Mobile); STORENUM("TEL;TYPE=FAX:", GN_PHONEBOOK_NUMBER_Fax); STORENUM("TEL;TYPE=WORK:", GN_PHONEBOOK_NUMBER_Work); STORENUM("TEL;TYPE=PREF:", GN_PHONEBOOK_NUMBER_General); STORENUM("TEL;TYPE=VOICE:", GN_PHONEBOOK_NUMBER_Common); if (BEGINS("X-GSM-CALLERGROUPID:")) { entry->subentries[entry->subentries_count].data.id = atoi(buf + strlen("X-GSM-CALLERGROUPID:")); entry->subentries[entry->subentries_count].entry_type = GN_PHONEBOOK_ENTRY_ExtGroup; entry->subentries_count++; continue; } if (BEGINS("END:VCARD")) break; } free(v); gnokii_strfreev(lines); return 0; } gnokii-0.6.31/common/gsm-filetypes.c0000644000175000017500000013262611666163120015441 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janík ml. Copyright (C) 2000-2001 Chris Kemp, Marcin Wiacek Copyright (C) 2000-2004 Pawel Kot Copyright (C) 2001 Bartek Klepacz Copyright (C) 2002 Markus Plail, Pavel Machek Copyright (C) 2002-2004 BORBELY Zoltan Copyright (C) 2003 Tomi Ollila Functions to read and write common file types. */ #include "config.h" #include "compat.h" #include #include #include #include #include "gnokii-internal.h" #include "gnokii.h" #include "gsm-filetypes.h" #include "phones/nokia.h" #ifdef HAVE_X11_XPM_H # include #endif #include "misc.h" /* Ringtone File Functions */ /* ####################### */ /* Function to convert scale field in to correct number. */ static int ringtone_get_duration(char *num) { int duration = 0; switch (atoi(num)) { case 1: duration = 128; break; case 2: duration = 64; break; case 4: duration = 32; break; case 8: duration = 16; break; case 16: duration = 8; break; case 32: duration = 4; break; } return duration; } static int ringtone_get_scale(char *num) { /* This may well need improving. */ int scale=0; if ((atoi(num)) < 4) scale = (atoi(num)); if ((atoi(num)) > 4) scale = (atoi(num)) - 4; return scale; } /* Currently only reads rtttl and ott files - can be later extended to midi etc. */ gn_error gn_file_ringtone_read(char *filename, gn_ringtone *ringtone) { FILE *file; gn_error error; gn_filetypes filetype; file = fopen(filename, "rb"); if (!file) return GN_ERR_FAILED; /* FIXME: for now identify the filetype based on the extension */ /* I don't like this but I haven't got any .ott files to work out a better way */ filetype = GN_FT_RTTTL; if (strstr(filename, ".ott")) filetype = GN_FT_OTT; /* OTT files saved by NCDS3 */ else if (strstr(filename, ".mid")) filetype = GN_FT_MIDI; else if (strstr(filename, ".raw")) filetype = GN_FT_NOKRAW_TONE; error = GN_ERR_NONE; rewind(file); /* Not necessary for now but safer */ switch (filetype) { case GN_FT_RTTTL: error = file_rtttl_load(file, ringtone); fclose(file); break; case GN_FT_OTT: error = file_ott_load(file, ringtone); fclose(file); break; case GN_FT_MIDI: error = file_midi_load(file, ringtone); fclose(file); break; case GN_FT_NOKRAW_TONE: error = file_nokraw_load(file, ringtone); fclose(file); break; default: error = GN_ERR_WRONGDATAFORMAT; break; } return error; } gn_error file_ott_load(FILE *file, gn_ringtone *ringtone) { char buffer[2000]; int i; i = fread(buffer, 1, 2000, file); if (!feof(file)) return GN_ERR_INVALIDSIZE; return gn_ringtone_unpack(ringtone, buffer, i); } gn_error file_rtttl_load(FILE *file, gn_ringtone *ringtone) { int nr_note = 0; int default_note_scale = 2; int default_note_duration = 4; unsigned char buffer[2000]; unsigned char *def, *notes, *ptr; if (fread(buffer, 1, 2000, file) < 1) return GN_ERR_FAILED; /* This is for buggy RTTTL ringtones without name. */ if (buffer[0] != RTTTL_SEP[0]) { strtok(buffer, RTTTL_SEP); snprintf(ringtone->name, sizeof(ringtone->name), "%s", buffer); def = strtok(NULL, RTTTL_SEP); notes = strtok(NULL, RTTTL_SEP); } else { snprintf(ringtone->name, sizeof(ringtone->name), "GNOKII"); def = strtok(buffer, RTTTL_SEP); notes = strtok(NULL, RTTTL_SEP); } ptr = strtok(def, ", "); /* Parsing the section. */ ringtone->tempo = 63; while (ptr) { switch(*ptr) { case 'd': case 'D': default_note_duration = ringtone_get_duration(ptr+2); break; case 'o': case 'O': default_note_scale = ringtone_get_scale(ptr+2); break; case 'b': case 'B': ringtone->tempo = atoi(ptr+2); break; } ptr = strtok(NULL,", "); } dprintf("default_note_duration = %d\n", default_note_duration); dprintf("default_note_scale = %d\n", default_note_scale); /* Parsing the + section. */ ptr = strtok(notes, ", "); while (ptr && (nr_note < GN_RINGTONE_MAX_NOTES)) { /* [] */ ringtone->notes[nr_note].duration = ringtone_get_duration(ptr); if (ringtone->notes[nr_note].duration == 0) ringtone->notes[nr_note].duration = default_note_duration; /* Skip all numbers in duration specification. */ while (isdigit(*ptr)) ptr++; /* */ if ((*ptr >= 'a') && (*ptr <= 'g')) ringtone->notes[nr_note].note = ((*ptr - 'a') * 2) + 10; else if ((*ptr >= 'A') && (*ptr <= 'G')) ringtone->notes[nr_note].note = ((*ptr - 'A') * 2) + 10; else if ((*ptr == 'H') || (*ptr == 'h')) ringtone->notes[nr_note].note = 12; else ringtone->notes[nr_note].note = 255; if ((ringtone->notes[nr_note].note > 13) && (ringtone->notes[nr_note].note != 255)) ringtone->notes[nr_note].note -= 14; ptr++; if (*ptr == '#') { ringtone->notes[nr_note].note++; if ((ringtone->notes[nr_note].note == 5) || (ringtone->notes[nr_note].note == 13)) ringtone->notes[nr_note].note++; ptr++; } /* Check for dodgy rtttl */ /* [] */ if (*ptr == '.') { ringtone->notes[nr_note].duration *= 1.5; ptr++; } /* [] */ if (ringtone->notes[nr_note].note != 255) { if (isdigit(*ptr)) { ringtone->notes[nr_note].note += ringtone_get_scale(ptr) * 14; ptr++; } else { ringtone->notes[nr_note].note += default_note_scale * 14; } } /* [] */ if (*ptr == '.') { ringtone->notes[nr_note].duration *= 1.5; ptr++; } nr_note++; ptr = strtok(NULL, ", "); } ringtone->notes_count = nr_note; return GN_ERR_NONE; } gn_error file_nokraw_load(FILE *file, gn_ringtone *ringtone) { unsigned char buf[4096]; int n; gn_error err; snprintf(ringtone->name, sizeof(ringtone->name), "GNOKII"); if ((n = fread(buf, 1, sizeof(buf), file)) < 0) return GN_ERR_UNKNOWN; if (buf[0] == 0x00 && buf[1] == 0x02 && buf[2] == 0xfc && buf[3] == 0x09) err = pnok_ringtone_from_raw(ringtone, buf + 4, n - 4); else if (buf[0] == 0x02 && buf[1] == 0xfc && buf[2] == 0x09) err = pnok_ringtone_from_raw(ringtone, buf + 3, n - 3); else err = pnok_ringtone_from_raw(ringtone, buf, n); return err; } /* Save the ringtone file - this will overwrite the file */ /* Confirming must be done before this is called */ gn_error gn_file_ringtone_save(char *filename, gn_ringtone *ringtone) { FILE *file; gn_error error; file = fopen(filename, "wb"); if (!file) return GN_ERR_FAILED; /* FIXME... */ /* We need a way of passing these functions a filetype rather than rely on the extension */ if (strstr(filename, ".ott")) { error = file_ott_save(file, ringtone); } else if (strstr(filename, ".mid")) { error = file_midi_save(file, ringtone); } else if (strstr(filename, ".raw3")) { error = file_nokraw_save(file, ringtone, 0); } else if (strstr(filename, ".raw")) { error = file_nokraw_save(file, ringtone, 1); } else { error = file_rtttl_save(file, ringtone); } fclose(file); return error; } gn_error file_ott_save(FILE *file, gn_ringtone *ringtone) { char buffer[2000]; int i = 2000; /* PackRingtone writes up to i chars and returns in i the number written */ gn_ringtone_pack(ringtone, buffer, &i); if (i < 2000) { fwrite(buffer, 1, i, file); return GN_ERR_NONE; } else { return GN_ERR_INVALIDSIZE; } } gn_error file_rtttl_save(FILE *file, gn_ringtone *ringtone) { int default_duration, default_scale = 2, current_note; int buffer[6]; int i, j, k = 0; /* Saves ringtone name */ fprintf(file, "%s:", ringtone->name); /* Find the most frequently used duration and use this for the default */ for (i = 0; i < 6; i++) buffer[i] = 0; for (i = 0; i < ringtone->notes_count; i++) { switch (ringtone->notes[i].duration) { case 192: buffer[0]++; break; case 128: buffer[0]++; break; case 96: buffer[1]++; break; case 64: buffer[1]++; break; case 48: buffer[2]++; break; case 32: buffer[2]++; break; case 24: buffer[3]++; break; case 16: buffer[3]++; break; case 12: buffer[4]++; break; case 8: buffer[4]++; break; case 6: buffer[5]++; break; case 4: buffer[5]++; break; } } /* Now find the most frequently used */ j = 0; for (i = 0; i < 6; i++) { if (buffer[i] > j) { k = i; j = buffer[i]; } } /* Finally convert and save the default duration */ switch (k) { case 0: default_duration = 128; fprintf(file, "d=1,"); break; case 1: default_duration = 64; fprintf(file, "d=2,"); break; case 2: default_duration = 32; fprintf(file, "d=4,"); break; case 3: default_duration = 16; fprintf(file, "d=8,"); break; case 4: default_duration = 8; fprintf(file, "d=16,"); break; case 5: default_duration = 4; fprintf(file, "d=32,"); break; default: default_duration = 16; fprintf(file, "d=8,"); break; } /* Find the most frequently used scale and use this for the default */ for (i = 0; i < 6; i++) buffer[i] = 0; for (i = 0; i < ringtone->notes_count; i++) { if (ringtone->notes[i].note != 255) { buffer[ringtone->notes[i].note/14]++; } } j = 0; for (i = 0; i < 6; i++) { if (buffer[i] > j) { default_scale = i; j = buffer[i]; } } /* Save the default scale and tempo */ fprintf(file, "o=%i,", default_scale+4); fprintf(file, "b=%i:", ringtone->tempo); dprintf("default_note_duration=%d\n", default_duration); dprintf("default_note_scale=%d\n", default_scale); dprintf("Number of notes=%d\n",ringtone->notes_count); /* Now loop round for each note */ for (i = 0; i < ringtone->notes_count; i++) { current_note = ringtone->notes[i].note; /* This note has a duration different than the default. We must save it */ if (ringtone->notes[i].duration != default_duration) { switch (ringtone->notes[i].duration) { case 192: //192=128*1.5 fprintf(file, "1"); break; case 128: fprintf(file, "1"); break; case 96: //96=64*1.5 fprintf(file, "2"); break; case 64: fprintf(file, "2"); break; case 48: //48=32*1.5 fprintf(file, "4"); break; case 32: fprintf(file, "4"); break; case 24: //24=16*1.5; fprintf(file, "8"); break; case 16: fprintf(file, "8"); break; case 12: //12=8*1.5 fprintf(file, "16"); break; case 8: fprintf(file, "16"); break; case 6: //6=4*1.5 fprintf(file, "32"); break; case 4: fprintf(file, "32"); break; default: break; } } /* Now save the actual note */ switch (gn_note_get(current_note)) { case GN_RINGTONE_Note_C : fprintf(file, "c"); break; case GN_RINGTONE_Note_Cis: fprintf(file, "c#"); break; case GN_RINGTONE_Note_D : fprintf(file, "d"); break; case GN_RINGTONE_Note_Dis: fprintf(file, "d#"); break; case GN_RINGTONE_Note_E : fprintf(file, "e"); break; case GN_RINGTONE_Note_F : fprintf(file, "f"); break; case GN_RINGTONE_Note_Fis: fprintf(file, "f#"); break; case GN_RINGTONE_Note_G : fprintf(file, "g"); break; case GN_RINGTONE_Note_Gis: fprintf(file, "g#"); break; case GN_RINGTONE_Note_A : fprintf(file, "a"); break; case GN_RINGTONE_Note_Ais: fprintf(file, "a#"); break; case GN_RINGTONE_Note_H : fprintf(file, "h"); break; default : fprintf(file, "p"); break; /*Pause ? */ } /* Saving info about special duration */ if (ringtone->notes[i].duration == 128 * 1.5 || ringtone->notes[i].duration == 64 * 1.5 || ringtone->notes[i].duration == 32 * 1.5 || ringtone->notes[i].duration == 16 * 1.5 || ringtone->notes[i].duration == 8 * 1.5 || ringtone->notes[i].duration == 4 * 1.5) fprintf(file, "."); /* This note has a scale different than the default, so save it */ if ( (current_note != 255) && (current_note/14 != default_scale)) fprintf(file, "%i",(current_note/14) + 4); /* And a separator before next note */ if (i != ringtone->notes_count - 1) fprintf(file, ","); } return GN_ERR_NONE; } gn_error file_nokraw_save(FILE *file, gn_ringtone *ringtone, int dct4) { int n; char buf[4096]; gn_error err; n = sizeof(buf); if ((err = pnok_ringtone_to_raw(buf, &n, ringtone, dct4)) != GN_ERR_NONE) return err; if (fwrite(buf, n, 1, file) != 1) return GN_ERR_UNKNOWN; return GN_ERR_NONE; } /* Bitmap file functions */ /* ##################### */ gn_error gn_file_bitmap_read(char *filename, gn_bmp *bitmap, gn_phone *info) { FILE *file; unsigned char buffer[9]; int error; size_t count; gn_filetypes filetype = GN_FT_None; file = fopen(filename, "rb"); if (!file) return GN_ERR_FAILED; count = fread(buffer, 1, 9, file); /* Read the header of the file. */ /* Attempt to identify filetype */ if (count >= 3 && memcmp(buffer, "NOL", 3) == 0) { /* NOL files have 'NOL' at the start */ filetype = GN_FT_NOL; } else if (count >= 3 && memcmp(buffer, "NGG", 3) == 0) { /* NGG files have 'NGG' at the start */ filetype = GN_FT_NGG; } else if (count >= 4 && memcmp(buffer, "FORM", 4) == 0) { /* NSL files have 'FORM' at the start */ filetype = GN_FT_NSL; } else if (count >= 3 && memcmp(buffer, "NLM", 3) == 0) { /* NLM files have 'NLM' at the start */ filetype = GN_FT_NLM; } else if (count >= 2 && memcmp(buffer, "BM", 2) == 0) { /* BMP, I61 and GGP files have 'BM' at the start */ filetype = GN_FT_BMP; } else if (count >= 9 && memcmp(buffer, "/* XPM */", 9) == 0) { /* XPM files have 'XPM' at the start */ filetype = GN_FT_XPMF; } if ((filetype == GN_FT_None) && strstr(filename, ".otb")) filetype = GN_FT_OTA; /* OTA files saved by NCDS3 */ rewind(file); switch (filetype) { case GN_FT_NOL: error = file_nol_load(file, bitmap, info); break; case GN_FT_NGG: error = file_ngg_load(file, bitmap, info); break; case GN_FT_NSL: error = file_nsl_load(file, bitmap); break; case GN_FT_NLM: error = file_nlm_load(file, bitmap); break; case GN_FT_OTA: error = file_ota_load(file, bitmap, info); break; case GN_FT_BMP: error = file_bmp_load(file, bitmap); break; case GN_FT_XPMF: #ifdef XPM error = file_xpm_load(filename, bitmap); break; #else fprintf(stderr, _("Sorry, gnokii was not compiled with XPM support.\n")); /* FALLTHRU */ #endif default: error = GN_ERR_WRONGDATAFORMAT; break; } if (file) fclose(file); return error; } #ifdef XPM gn_error file_xpm_load(char *filename, gn_bmp *bitmap) { int error, x, y; XpmImage image; XpmInfo info; error = XpmReadFileToXpmImage(filename, &image, &info); switch (error) { case XpmColorError: return GN_ERR_WRONGDATAFORMAT; case XpmColorFailed: return GN_ERR_WRONGDATAFORMAT; case XpmOpenFailed: return GN_ERR_FAILED; case XpmFileInvalid: return GN_ERR_WRONGDATAFORMAT; case XpmSuccess: default: break; } if (image.ncolors != 2) return GN_ERR_WRONGDATAFORMAT; bitmap->height = image.height; bitmap->width = image.width; bitmap->size = ((bitmap->width + 7) / 8) * bitmap->height; if (bitmap->size > GN_BMP_MAX_SIZE) { fprintf(stderr, _("Bitmap too large\n")); return GN_ERR_INVALIDSIZE; } gn_bmp_clear(bitmap); for (y = 0; y < image.height; y++) { for (x = 0; x < image.width; x++) { if (image.data[y * image.width + x] == 0) gn_bmp_point_set(bitmap, x, y); } } return GN_ERR_NONE; } #endif /* Based on the article from the Polish Magazine "Bajtek" 11/92 */ /* Marcin-Wiacek@Topnet.PL */ /* This loads the image as a startup logo - but is resized as necessary later */ gn_error file_bmp_load(FILE *file, gn_bmp *bitmap) { unsigned char buffer[34]; bool first_black; int w, h, pos, y, x, i, sizeimage; gn_bmp_clear(bitmap); /* required part of header */ if (fread(buffer, 1, 34, file) != 34) return GN_ERR_FAILED; h = buffer[22] + 256 * buffer[21]; /* height of image in the file */ w = buffer[18] + 256 * buffer[17]; /* width of image in the file */ dprintf("Image Size in BMP file: %dx%d\n", w, h); bitmap->width = w; bitmap->height = h; bitmap->size = bitmap->width * bitmap->height / 8; dprintf("Number of colors in BMP file: "); switch (buffer[28]) { case 1: dprintf("2 (supported by gnokii)\n"); break; case 4: dprintf("16 (not supported by gnokii)\n"); return GN_ERR_WRONGDATAFORMAT; case 8: dprintf("256 (not supported by gnokii)\n"); return GN_ERR_WRONGDATAFORMAT; case 24: dprintf("True Color (not supported by gnokii)\n"); return GN_ERR_WRONGDATAFORMAT; default: dprintf("unknown color type (not supported by gnokii)\n"); return GN_ERR_WRONGDATAFORMAT; } dprintf("Compression in BMP file: "); switch (buffer[30]) { case 0: dprintf("no compression (supported by gnokii)\n"); break; case 1: dprintf("RLE8 (not supported by gnokii)\n"); return GN_ERR_WRONGDATAFORMAT; case 2: dprintf("RLE4 (not supported by gnokii)\n"); return GN_ERR_WRONGDATAFORMAT; default: dprintf("unknown compression type (not supported by gnokii)\n"); return GN_ERR_WRONGDATAFORMAT; } pos = buffer[10] - 34; /* the rest of the header (if exists) and the color palette */ if (fread(buffer, 1, pos, file) != pos) return GN_ERR_WRONGDATAFORMAT; dprintf("First color in BMP file: %i %i %i ", buffer[pos-8], buffer[pos-7], buffer[pos-6]); if (buffer[pos-8] == 0x00 && buffer[pos-7] == 0x00 && buffer[pos-6] == 0x00) dprintf("(black)"); if (buffer[pos-8] == 0xff && buffer[pos-7] == 0xff && buffer[pos-6] == 0xff) dprintf("(white)"); if (buffer[pos-8] == 0x66 && buffer[pos-7] == 0xbb && buffer[pos-6] == 0x66) dprintf("(green)"); dprintf("\n"); dprintf("Second color in BMP file: %i %i %i ", buffer[pos-4], buffer[pos-3], buffer[pos-2]); if (buffer[pos-4] == 0x00 && buffer[pos-3] == 0x00 && buffer[pos-2] == 0x00) dprintf("(black)"); if (buffer[pos-4] == 0xff && buffer[pos-3] == 0xff && buffer[pos-2] == 0xff) dprintf("(white)"); if (buffer[pos-4] == 0x66 && buffer[pos-3] == 0xbb && buffer[pos-2] == 0x66) dprintf("(green)"); dprintf("\n"); first_black = false; if (buffer[pos-8] == 0 && buffer[pos-7] == 0 && buffer[pos-6] == 0) first_black = true; sizeimage = 0; pos = 7; for (y = h-1; y >= 0; y--) { /* the lines are written from the last one to the first one */ i = 1; for (x = 0; x < w; x++) { if (pos == 7) { /* new byte ! */ if (fread(buffer, 1, 1, file) != 1) return GN_ERR_WRONGDATAFORMAT; sizeimage++; i++; if (i == 5) i = 1; /* each line is written in multiples of 4 bytes */ } if (x <= bitmap->width && y <= bitmap->height) { /* we have top left corner ! */ if (first_black) { if ((buffer[0] & (1 << pos)) <= 0) gn_bmp_point_set(bitmap, x, y); } else { if ((buffer[0] & (1 << pos)) > 0) gn_bmp_point_set(bitmap, x, y); } } pos--; if (pos < 0) pos = 7; /* going to the new byte */ } pos = 7; /* going to the new byte */ if (i != 1) { while (i != 5) { /* each line is written in multiples of 4 bytes */ if (fread(buffer, 1, 1, file) != 1) return GN_ERR_WRONGDATAFORMAT; sizeimage++; i++; } } } dprintf("Data size in BMP file: %i\n", sizeimage); return GN_ERR_NONE; } gn_error file_nol_load(FILE *file, gn_bmp *bitmap, gn_phone *info) { unsigned char buffer[GN_BMP_MAX_SIZE + 20]; int i, j; if (fread(buffer, 1, 20, file) != 20) return GN_ERR_FAILED; snprintf(bitmap->netcode, sizeof(bitmap->netcode), "%d %02d", buffer[6] + 256 * buffer[7], buffer[8]); bitmap->width = buffer[10]; bitmap->height = buffer[12]; bitmap->type = GN_BMP_OperatorLogo; bitmap->size = ceiling_to_octet(bitmap->height * bitmap->width); if (((bitmap->height != 14) || (bitmap->width != 72)) && /* standard size */ ((bitmap->height != 21) || (bitmap->width != 78)) && /* standard size */ (!info || (bitmap->height != info->operator_logo_height) || (bitmap->width != info->operator_logo_width))) { dprintf("Invalid Image Size (%dx%d).\n", bitmap->width, bitmap->height); return GN_ERR_INVALIDSIZE; } for (i = 0; i < bitmap->size; i++) { if (fread(buffer, 1, 8, file) == 8) { bitmap->bitmap[i] = 0; for (j = 7; j >= 0; j--) if (buffer[7-j] == '1') bitmap->bitmap[i] |= (1 << j); } else { dprintf("too short\n"); return GN_ERR_INVALIDSIZE; } } /* Some programs writes here fileinfo */ if (fread(buffer, 1, 1, file) == 1) { dprintf("Fileinfo: %c", buffer[0]); while (fread(buffer, 1, 1, file) == 1) { if (buffer[0] != 0x0A) dprintf("%c", buffer[0]); } dprintf("\n"); } return GN_ERR_NONE; } gn_error file_ngg_load(FILE *file, gn_bmp *bitmap, gn_phone *info) { unsigned char buffer[2000]; int i, j; bitmap->type = GN_BMP_CallerLogo; if (fread(buffer, 1, 16, file) != 16) return GN_ERR_FAILED; bitmap->width = buffer[6]; bitmap->height = buffer[8]; bitmap->size = bitmap->height * bitmap->width / 8; if (((bitmap->height != 14) || (bitmap->width != 72)) && /* standard size */ ((bitmap->height != 21) || (bitmap->width != 78)) && /* standard size */ (!info || (bitmap->height != info->operator_logo_height) || (bitmap->width != info->operator_logo_width))) { dprintf("Invalid Image Size (%dx%d).\n", bitmap->width, bitmap->height); return GN_ERR_INVALIDSIZE; } for (i = 0; i < bitmap->size; i++) { if (fread(buffer, 1, 8, file) == 8){ bitmap->bitmap[i] = 0; for (j = 7; j >= 0;j--) if (buffer[7-j] == '1') bitmap->bitmap[i] |= (1 << j); } else { return GN_ERR_INVALIDSIZE; } } /* Some programs writes here fileinfo */ if (fread(buffer, 1, 1, file) == 1) { dprintf("Fileinfo: %c",buffer[0]); while (fread(buffer, 1, 1, file) == 1) { if (buffer[0] != 0x0A) dprintf("%c", buffer[0]); } dprintf("\n"); } return GN_ERR_NONE; } gn_error file_nsl_load(FILE *file, gn_bmp *bitmap) { unsigned char block[6], buffer[870]; int block_size, count; bitmap->size = 0; while (fread(block, 1, 6, file) == 6) { block_size = block[4] * 256 + block[5]; dprintf("Block %c%c%c%c, size %i\n", block[0], block[1], block[2], block[3], block_size); if (!strncmp(block, "FORM", 4)) { dprintf(" File ID\n"); } else { if (block_size > 864) return GN_ERR_WRONGDATAFORMAT; if (block_size != 0) { count = fread(buffer, 1, block_size, file); buffer[count] = 0; if (!strncmp(block, "VERS", 4)) dprintf(" File saved by: %s\n", buffer); if (!strncmp(block, "MODL", 4)) dprintf(" Logo saved from: %s\n", buffer); if (!strncmp(block, "COMM", 4)) dprintf(" Phone was connected to COM port: %s\n", buffer); if (!strncmp(block, "NSLD", 4)) { bitmap->size = block[4] * 256 + block[5]; switch (bitmap->size) { case 864: /* 6510/7110 startup logo */ bitmap->height = 65; bitmap->width = 96; break; case 504: /* 6110 startup logo */ bitmap->height = 48; bitmap->width = 84; break; case 768: /* 6210 */ bitmap->height = 60; bitmap->width = 96; break; default: dprintf("Unknown startup logo!\n"); return GN_ERR_WRONGDATAFORMAT; } bitmap->type = GN_BMP_StartupLogo; memcpy(bitmap->bitmap, buffer, bitmap->size); dprintf(" Startup logo (size %i)\n", block_size); } } } } if (bitmap->size == 0) return GN_ERR_INVALIDSIZE; return GN_ERR_NONE; } gn_error file_nlm_load(FILE *file, gn_bmp *bitmap) { unsigned char buffer[84*48]; int pos, pos2, x, y; div_t division; if (fread(buffer, 1, 5, file) != 5) return GN_ERR_FAILED; if (fread(buffer, 1, 1, file) != 1) return GN_ERR_FAILED; switch (buffer[0]) { case 0x00: bitmap->type = GN_BMP_OperatorLogo; break; case 0x01: bitmap->type = GN_BMP_CallerLogo; break; case 0x02: bitmap->type = GN_BMP_StartupLogo; break; case 0x03: bitmap->type = GN_BMP_PictureMessage; break; default: return GN_ERR_WRONGDATAFORMAT; } if (fread(buffer, 1, 4, file) != 4) return GN_ERR_FAILED; bitmap->width = buffer[1]; bitmap->height = buffer[2]; bitmap->size = bitmap->width * bitmap->height / 8; division = div(bitmap->width, 8); if (division.rem != 0) division.quot++; /* For startup logos */ if (fread(buffer, 1, (division.quot * bitmap->height), file) != (division.quot * bitmap->height)) return GN_ERR_INVALIDSIZE; gn_bmp_clear(bitmap); pos = 0; pos2 = 7; for (y = 0; y < bitmap->height; y++) { for (x = 0; x < bitmap->width; x++) { if ((buffer[pos] & (1 << pos2)) > 0) gn_bmp_point_set(bitmap, x, y); pos2--; if (pos2 < 0) {pos2 = 7; pos++;} /*going to new byte */ } if (pos2 != 7) {pos2 = 7; pos++;} /* for startup logos-new line means new byte */ } return GN_ERR_NONE; } gn_error file_ota_load(FILE *file, gn_bmp *bitmap, gn_phone *info) { char buffer[4]; /* We could check for extended info here - indicated by the 7th bit being set in the first byte */ if (fread(buffer, 1, 4, file) != 4) return GN_ERR_FAILED; bitmap->width = buffer[1]; bitmap->height = buffer[2]; bitmap->size = bitmap->width * bitmap->height / 8; if (((bitmap->height == 48) && (bitmap->width == 84)) || /* standard size */ ((bitmap->height == 60) && (bitmap->width == 96)) || /* standard size */ (info && ((bitmap->height == info->startup_logo_height) && (bitmap->width == info->startup_logo_width)))) { bitmap->type = GN_BMP_StartupLogo; } else if (((bitmap->height == 14) && (bitmap->width == 72)) || /* standard size */ (info && ((bitmap->height == info->caller_logo_height) && (bitmap->width == info->caller_logo_width)))) { bitmap->type = GN_BMP_CallerLogo; } else { dprintf("Invalid Image Size (%dx%d).\n", bitmap->width, bitmap->height); return GN_ERR_INVALIDSIZE; } if (fread(bitmap->bitmap, 1, bitmap->size,file) != bitmap->size) return GN_ERR_INVALIDSIZE; return GN_ERR_NONE; } /* This overwrites an existing file - so this must be checked before calling */ gn_error gn_file_bitmap_save(char *filename, gn_bmp *bitmap, gn_phone *info) { FILE *file; bool done = false; /* XPMs are a bit messy because we have to pass it the filename */ #ifdef XPM if (strstr(filename, ".xpm")) { file_xpm_save(filename, bitmap); } else { #endif file = fopen(filename, "wb"); if (!file) return GN_ERR_FAILED; if (strstr(filename, ".nlm")) { file_nlm_save(file, bitmap); done = true; } if (strstr(filename, ".ngg")) { file_ngg_save(file, bitmap, info); done = true; } if (strstr(filename, ".nsl")) { file_nsl_save(file, bitmap, info); done = true; } if (strstr(filename, ".otb")) { file_ota_save(file, bitmap); done = true; } if (strstr(filename, ".nol")) { file_nol_save(file, bitmap, info); done = true; } if (strstr(filename, ".bmp") || strstr(filename, ".ggp") || strstr(filename, ".i61")) { file_bmp_save(file, bitmap); done = true; } if (!done) { switch (bitmap->type) { case GN_BMP_CallerLogo: file_ngg_save(file, bitmap, info); break; case GN_BMP_OperatorLogo: case GN_BMP_NewOperatorLogo: file_nol_save(file, bitmap, info); break; case GN_BMP_StartupLogo: file_nsl_save(file, bitmap, info); break; case GN_BMP_PictureMessage: file_nlm_save(file, bitmap); break; case GN_BMP_WelcomeNoteText: case GN_BMP_DealerNoteText: case GN_BMP_None: default: break; } } fclose(file); #ifdef XPM } #endif return GN_ERR_NONE; } #ifdef XPM void file_xpm_save(char *filename, gn_bmp *bitmap) { XpmColor colors[2] = {{".","c","#000000","#000000","#000000","#000000"}, {"#","c","#ffffff","#ffffff","#ffffff","#ffffff"}}; XpmImage image; unsigned int data[6240]; int x, y; image.height = bitmap->height; image.width = bitmap->width; image.cpp = 1; image.ncolors = 2; image.colorTable = colors; image.data = data; for (y = 0; y < image.height; y++) { for (x = 0; x < image.width; x++) if (gn_bmp_point(bitmap, x, y)) data[y * image.width + x] = 0; else data[y * image.width + x] = 1; } XpmWriteFileFromXpmImage(filename, &image, NULL); } #endif /* Based on the article from the Polish Magazine "Bajtek" 11/92 */ /* Marcin-Wiacek@Topnet.PL */ void file_bmp_save(FILE *file, gn_bmp *bitmap) { int x, y, pos, i, sizeimage; unsigned char buffer[1]; div_t division; char header[] = { /* 1st header */ 'B', 'M', /* BMP file ID */ 0x00, 0x00, 0x00, 0x00, /* Size of file */ 0x00, 0x00, /* Reserved for future use */ 0x00, 0x00, /* Reserved for future use */ 62, 0x00, 0x00, 0x00, /* Offset for image data */ /* 2nd header */ 40, 0x00, 0x00, 0x00, /* Length of this part of header */ 0x00, 0x00, 0x00, 0x00, /* Width of image */ 0x00, 0x00, 0x00, 0x00, /* Height of image */ 0x01, 0x00, /* How many planes in target device */ 0x01, 0x00, /* How many colors in image. 1 means 2^1=2 colors */ 0x00, 0x00, 0x00, 0x00, /* Type of compression. 0 means no compression */ /* Sometimes */ 0x00, 0x00, 0x00, 0x00, /* Size of part with image data */ /* ttttttt...*/ 0xE8, 0x03, 0x00, 0x00, /* XPelsPerMeter */ /*hhiiiiissss*/ 0xE8, 0x03, 0x00, 0x00, /* YPelsPerMeter */ /* part of the header */ 0x02, 0x00, 0x00, 0x00, /* How many colors from palette is used */ /* doesn't exist */ 0x00, 0x00, 0x00, 0x00, /* How many colors from palette is required to display image. 0 means all */ /* Color palette */ 0xFF, 0xFF, 0xFF, /* First color in palette in Blue, Green, Red. Here white */ 0x00, /* Each color in palette is end by 4'th byte */ 0x00, 0x00, 0x00, /* Second color in palette in Blue, Green, Red. Here black */ 0x00}; /* Each color in palette is end by 4'th byte */ header[22] = bitmap->height; header[18] = bitmap->width; pos = 7; sizeimage = 0; for (y = bitmap->height - 1; y >= 0; y--) { //lines are written from the last to the first i = 1; for (x = 0; x < bitmap->width; x++) { if (pos == 7) { //new byte ! sizeimage++; i++; if (i == 5) i = 1; //each line is written in multiples of 4 bytes } pos--; if (pos < 0) pos = 7; //going to new byte } pos = 7; //going to new byte while (i != 5) { //each line is written in multiples of 4 bytes sizeimage++; i++; } } dprintf("Data size in BMP file: %i\n", sizeimage); division = div(sizeimage, 256); header[35] = division.quot; header[34] = sizeimage - (division.quot * 256); sizeimage = sizeimage + sizeof(header); dprintf("Size of BMP file: %i\n", sizeimage); division = div(sizeimage, 256); header[3] = division.quot; header[2] = sizeimage - (division.quot * 256); fwrite(header, 1, sizeof(header), file); pos = 7; for (y = bitmap->height - 1; y >= 0; y--) { //lines are written from the last to the first i = 1; for (x = 0; x < bitmap->width; x++) { if (pos == 7) { //new byte ! if (x != 0) fwrite(buffer, 1, sizeof(buffer), file); i++; if(i == 5) i = 1; //each line is written in multiples of 4 bytes buffer[0] = 0; } if (gn_bmp_point(bitmap, x, y)) buffer[0] |= (1 << pos); pos--; if (pos < 0) pos = 7; //going to new byte } pos = 7; //going to new byte fwrite(buffer, 1, sizeof(buffer), file); while (i != 5) { //each line is written in multiples of 4 bytes buffer[0] = 0; fwrite(buffer, 1, sizeof(buffer), file); i++; } } } void file_ngg_save(FILE *file, gn_bmp *bitmap, gn_phone *info) { char header[] = {'N', 'G', 'G', 0x00, 0x01, 0x00, 0x00, 0x00, /* Width */ 0x00, 0x00, /* Height */ 0x01, 0x00, 0x01, 0x00, 0x00, 0x00 /* Unknown.Can't be checksum - for */ /* the same logo files can be different */ }; char buffer[8]; int i, j; gn_bmp_resize(bitmap, GN_BMP_CallerLogo, info); header[6] = bitmap->width; header[8] = bitmap->height; fwrite(header, 1, sizeof(header), file); for (i = 0; i < bitmap->size; i++) { for (j = 7; j >= 0;j--) if ((bitmap->bitmap[i] & (1 << j)) > 0) { buffer[7-j] = '1'; } else { buffer[7-j] = '0'; } fwrite(buffer, 1, 8, file); } } void file_nol_save(FILE *file, gn_bmp *bitmap, gn_phone *info) { char header[] = {'N','O','L',0x00,0x01,0x00, 0x00,0x00, /* MCC */ 0x00,0x00, /* MNC */ 0x00,0x00, /* Width */ 0x00,0x00, /* Height */ 0x01,0x00,0x01,0x00, 0x00, /* Unknown.Can't be checksum - for */ /* the same logo files can be different */ 0x00}; char buffer[8]; int i, j, country, net; gn_bmp_resize(bitmap, GN_BMP_OperatorLogo, info); sscanf(bitmap->netcode, "%d %d", &country, &net); header[6] = country % 256; header[7] = country / 256; header[8] = net % 256; header[9] = net / 256; header[10] = bitmap->width; header[12] = bitmap->height; fwrite(header, 1, sizeof(header), file); for (i = 0; i < bitmap->size; i++) { for (j = 7; j >= 0; j--) if ((bitmap->bitmap[i] & (1 << j)) > 0) { buffer[7-j] = '1'; } else { buffer[7-j] = '0'; } fwrite(buffer, 1, 8, file); } } void file_nsl_save(FILE *file, gn_bmp *bitmap, gn_phone *info) { u8 header[] = {'F','O','R','M', 0x01,0xFE, /* File ID block, size 1*256+0xFE=510*/ 'N','S','L','D', 0x01,0xF8}; /* Startup Logo block, size 1*256+0xF8=504*/ gn_bmp_resize(bitmap, GN_BMP_StartupLogo, info); header[4] = (bitmap->size + 6) / 256; header[5] = (bitmap->size + 6) % 256; header[10] = bitmap->size / 256; header[11] = bitmap->size % 256; fwrite(header, 1, sizeof(header), file); fwrite(bitmap->bitmap, 1, bitmap->size, file); } void file_ota_save(FILE *file, gn_bmp *bitmap) { char header[] = {0x01, 0x00, /* Width */ 0x00, /* Height */ 0x01}; header[1] = bitmap->width; header[2] = bitmap->height; fwrite(header, 1, sizeof(header), file); fwrite(bitmap->bitmap, 1, bitmap->size, file); } void file_nlm_save(FILE *file, gn_bmp *bitmap) { char header[] = {'N','L','M', /* Nokia Logo Manager file ID. */ 0x20, 0x01, 0x00, /* 0x00 (OP), 0x01 (CLI), 0x02 (Startup), 0x03 (Picture)*/ 0x00, 0x00, /* Width. */ 0x00, /* Height. */ 0x01}; unsigned char buffer[17 * 48]; int x, y, pos, pos2; div_t division; switch (bitmap->type) { case GN_BMP_OperatorLogo: case GN_BMP_NewOperatorLogo: header[5] = 0x00; break; case GN_BMP_CallerLogo: header[5] = 0x01; break; case GN_BMP_StartupLogo: header[5] = 0x02; break; case GN_BMP_PictureMessage: header[5] = 0x03; break; case GN_BMP_WelcomeNoteText: case GN_BMP_DealerNoteText: case GN_BMP_None: default: break; } header[7] = bitmap->width; header[8] = bitmap->height; pos = 0; pos2 = 7; for (y = 0; y < bitmap->height; y++) { for (x = 0; x < bitmap->width; x++) { if (pos2 == 7) buffer[pos] = 0; if (gn_bmp_point(bitmap, x, y)) buffer[pos] |= (1 << pos2); pos2--; if (pos2 < 0) {pos2 = 7; pos++;} /* going to new line */ } if (pos2 != 7) {pos2 = 7; pos++;} /* for startup logos - new line with new byte */ } division = div(bitmap->width, 8); if (division.rem != 0) division.quot++; /* For startup logos */ fwrite(header, 1, sizeof(header), file); fwrite(buffer, 1, (division.quot * bitmap->height), file); } gn_error gn_file_bitmap_show(char *filename) { int i, j; gn_bmp bitmap; gn_error error; error = gn_file_bitmap_read(filename, &bitmap, NULL); if (error != GN_ERR_NONE) return error; for (i = 0; i < bitmap.height; i++) { for (j = 0; j < bitmap.width; j++) { fprintf(stdout, "%c", gn_bmp_point(&bitmap, j, i) ? '#' : ' '); } fprintf(stdout, "\n"); } return GN_ERR_NONE; } /* returns number of the characters before the next delimiter, including it */ static int get_next_token(char *src, int delim) { int i, len = strlen(src); int slash_state = 0; for (i = 0; i < len; i++) { switch (src[i]) { case '\\': if (slash_state) { slash_state = 0; } else { slash_state = 1; } break; case ';': if (slash_state) slash_state = 0; else return i + 1; break; default: if (slash_state) slash_state = 0; break; } } return i + 1; } #define BUG(x) \ do { \ if (x) { \ return GN_ERR_WRONGDATAFORMAT; \ } \ } while (0) #define MAX_INPUT_LINE_LEN 512 #define GET_NEXT_TOKEN() o = get_next_token(line + offset, ';') #define STORE_TOKEN(a) strip_slashes(a, line + offset, sizeof(a) - 1, o - 1) inline int local_atoi(char *str, int len) { int retval; char *aux = strndup(str, len); retval = atoi(aux); free(aux); return retval; } GNOKII_API gn_error gn_file_phonebook_raw_parse(gn_phonebook_entry *entry, char *line) { char memory_type_char[3]; char number[GN_PHONEBOOK_NUMBER_MAX_LENGTH]; int length, o, offset = 0; gn_error error = GN_ERR_NONE; memset(entry, 0, sizeof(gn_phonebook_entry)); length = strlen(line); entry->empty = true; memory_type_char[2] = 0; GET_NEXT_TOKEN(); switch (o) { case 0: return GN_ERR_WRONGDATAFORMAT; case 1: /* empty name: this is a request to delete the entry */ break; default: break; } STORE_TOKEN(entry->name); offset += o; BUG(offset >= length); GET_NEXT_TOKEN(); switch (o) { case 0: return GN_ERR_WRONGDATAFORMAT; default: break; } STORE_TOKEN(entry->number); offset += o; BUG(offset >= length); GET_NEXT_TOKEN(); switch (o) { case 3: break; default: return GN_ERR_WRONGDATAFORMAT; } STORE_TOKEN(memory_type_char); offset += o; BUG(offset >= length); entry->memory_type = gn_str2memory_type(memory_type_char); /* We can store addressbook entries only in ME or SM (or ON on some models) */ if (entry->memory_type != GN_MT_ME && entry->memory_type != GN_MT_SM && entry->memory_type != GN_MT_ON) { return GN_ERR_INVALIDMEMORYTYPE; } BUG(offset >= length); memset(number, 0, sizeof(number)); GET_NEXT_TOKEN(); STORE_TOKEN(number); switch (o) { case 0: return GN_ERR_WRONGDATAFORMAT; case 1: entry->location = 0; break; default: entry->location = atoi(number); break; } offset += o; BUG(offset >= length); memset(number, 0, sizeof(number)); GET_NEXT_TOKEN(); STORE_TOKEN(number); switch (o) { case 0: return GN_ERR_WRONGDATAFORMAT; case 1: entry->caller_group = 0; break; default: entry->caller_group = atoi(number); break; } offset += o; entry->empty = false; for (entry->subentries_count = 0; offset < length; entry->subentries_count++) { if (entry->subentries_count == GN_PHONEBOOK_SUBENTRIES_MAX_NUMBER) { fprintf(stderr, _("Formatting error: too many subentries\n")); error = GN_ERR_WRONGDATAFORMAT; goto endloop; } memset(number, 0, sizeof(number)); GET_NEXT_TOKEN(); STORE_TOKEN(number); switch (o) { case 0: fprintf(stderr, _("Formatting error: unknown error while reading subentry type\n")); error = GN_ERR_WRONGDATAFORMAT; goto endloop; case 1: fprintf(stderr, _("Formatting error: empty entry type\n")); entry->subentries[entry->subentries_count].entry_type = 0; break; default: entry->subentries[entry->subentries_count].entry_type = atoi(number); break; } offset += o; if (offset > length) { fprintf(stderr, _("Formatting error: subentry has only entry type field\n")); break; } memset(number, 0, sizeof(number)); GET_NEXT_TOKEN(); STORE_TOKEN(number); switch (o) { case 0: fprintf(stderr, _("Formatting error: unknown error while reading subentry number type\n")); error = GN_ERR_WRONGDATAFORMAT; goto endloop; case 1: fprintf(stderr, _("Formatting error: empty number type\n")); entry->subentries[entry->subentries_count].number_type = 0; /* Number type is required with Number entry type */ if (entry->subentries[entry->subentries_count].entry_type == GN_PHONEBOOK_ENTRY_Number) { error = GN_ERR_WRONGDATAFORMAT; goto endloop; } break; default: entry->subentries[entry->subentries_count].number_type = atoi(number); break; } offset += o; if (offset > length) { fprintf(stderr, _("Formatting error: subentry has only entry and number type fields\n")); break; } memset(number, 0, sizeof(number)); GET_NEXT_TOKEN(); STORE_TOKEN(number); switch (o) { case 0: fprintf(stderr, _("Formatting error: unknown error while reading subentry id\n")); error = GN_ERR_WRONGDATAFORMAT; goto endloop; case 1: fprintf(stderr, _("Formatting error: empty id\n")); entry->subentries[entry->subentries_count].id = 0; break; default: entry->subentries[entry->subentries_count].id = atoi(number); break; } offset += o; if (offset > length) { fprintf(stderr, _("Formatting error: subentry has only entry and number type fields\n")); break; } GET_NEXT_TOKEN(); switch (entry->subentries[entry->subentries_count].entry_type) { case GN_PHONEBOOK_ENTRY_Date: case GN_PHONEBOOK_ENTRY_Birthday: entry->subentries[entry->subentries_count].data.date.year = local_atoi(line + offset, 4); entry->subentries[entry->subentries_count].data.date.month = local_atoi(line + offset + 4, 2); entry->subentries[entry->subentries_count].data.date.day = local_atoi(line + offset + 6, 2); entry->subentries[entry->subentries_count].data.date.hour = local_atoi(line + offset + 8, 2); entry->subentries[entry->subentries_count].data.date.minute = local_atoi(line + offset + 10, 2); entry->subentries[entry->subentries_count].data.date.second = local_atoi(line + offset + 12, 2); break; case GN_PHONEBOOK_ENTRY_ExtGroup: entry->subentries[entry->subentries_count].data.id = local_atoi(line + offset, 3); break; default: STORE_TOKEN(entry->subentries[entry->subentries_count].data.number); break; } switch (o) { case 0: fprintf(stderr, _("Formatting error: unknown error while reading subentry contents\n")); error = GN_ERR_WRONGDATAFORMAT; goto endloop; case 1: fprintf(stderr, _("Formatting error: empty subentry contents\n")); break; default: break; } offset += o; } endloop: /* Fake subentry: this is to send other exports (like from 6110) to 7110 */ if (!entry->subentries_count) { entry->subentries[entry->subentries_count].entry_type = GN_PHONEBOOK_ENTRY_Number; entry->subentries[entry->subentries_count].number_type = GN_PHONEBOOK_NUMBER_General; entry->subentries[entry->subentries_count].id = 2; snprintf(entry->subentries[entry->subentries_count].data.number, sizeof(entry->subentries[entry->subentries_count].data.number), "%s", entry->number); entry->subentries_count = 1; } return error; } GNOKII_API gn_error gn_file_phonebook_raw_write(FILE *f, gn_phonebook_entry *entry, char *memory_type_string) { char escaped_name[2 * GN_PHONEBOOK_NAME_MAX_LENGTH]; int i; add_slashes(escaped_name, entry->name, sizeof(escaped_name), strlen(entry->name)); fprintf(f, "%s;%s;%s;%d;%d", escaped_name, entry->number, memory_type_string, entry->location, entry->caller_group); if (entry->person.has_person) { if (entry->person.honorific_prefixes[0]) fprintf(f, ";%d;0;0;%s", GN_PHONEBOOK_ENTRY_FormalName, entry->person.honorific_prefixes); if (entry->person.given_name[0]) fprintf(f, ";%d;0;0;%s", GN_PHONEBOOK_ENTRY_FirstName, entry->person.given_name); if (entry->person.family_name[0]) fprintf(f, ";%d;0;0;%s", GN_PHONEBOOK_ENTRY_LastName, entry->person.family_name); } if (entry->address.has_address) { if (entry->address.post_office_box[0]) fprintf(f, ";%d;0;0;%s", GN_PHONEBOOK_ENTRY_Postal, entry->address.post_office_box); if (entry->address.extended_address[0]) fprintf(f, ";%d;0;0;%s", GN_PHONEBOOK_ENTRY_ExtendedAddress, entry->address.extended_address); if (entry->address.street[0]) fprintf(f, ";%d;0;0;%s", GN_PHONEBOOK_ENTRY_Street, entry->address.street); if (entry->address.city[0]) fprintf(f, ";%d;0;0;%s", GN_PHONEBOOK_ENTRY_City, entry->address.city); if (entry->address.state_province[0]) fprintf(f, ";%d;0;0;%s", GN_PHONEBOOK_ENTRY_StateProvince, entry->address.state_province); if (entry->address.zipcode[0]) fprintf(f, ";%d;0;0;%s", GN_PHONEBOOK_ENTRY_ZipCode, entry->address.zipcode); if (entry->address.country[0]) fprintf(f, ";%d;0;0;%s", GN_PHONEBOOK_ENTRY_Country, entry->address.country); } for (i = 0; i < entry->subentries_count; i++) { switch (entry->subentries[i].entry_type) { case GN_PHONEBOOK_ENTRY_Birthday: case GN_PHONEBOOK_ENTRY_Date: fprintf(f, ";%d;0;%d;%04u%02u%02u%02u%02u%02u", entry->subentries[i].entry_type, entry->subentries[i].id, entry->subentries[i].data.date.year, entry->subentries[i].data.date.month, entry->subentries[i].data.date.day, entry->subentries[i].data.date.hour, entry->subentries[i].data.date.minute, entry->subentries[i].data.date.second); break; case GN_PHONEBOOK_ENTRY_ExtGroup: fprintf(f, ";%d;%d;%d;%03d", entry->subentries[i].entry_type, entry->subentries[i].number_type, entry->subentries[i].id, entry->subentries[i].data.id); break; default: add_slashes(escaped_name, entry->subentries[i].data.number, sizeof(escaped_name), strlen(entry->subentries[i].data.number)); fprintf(f, ";%d;%d;%d;%s", entry->subentries[i].entry_type, entry->subentries[i].number_type, entry->subentries[i].id, escaped_name); break; } } if ((entry->memory_type == GN_MT_MC || entry->memory_type == GN_MT_DC || entry->memory_type == GN_MT_RC) && entry->date.day != 0) fprintf(f, ";%d;0;0;%04u%02u%02u%02u%02u%02u", GN_PHONEBOOK_ENTRY_Date, entry->date.year, entry->date.month, entry->date.day, entry->date.hour, entry->date.minute, entry->date.second); fprintf(f, "\n"); return GN_ERR_NONE; } gnokii-0.6.31/m4/0000755000175000017500000000000011666163455011536 5ustar leoleognokii-0.6.31/m4/ltsugar.m40000644000175000017500000001042411666163203013451 0ustar leoleo# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file 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. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) gnokii-0.6.31/m4/libtool.m40000644000175000017500000104622011666163203013440 0ustar leoleo# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010 Free Software Foundation, # Inc. # Written by Gordon Matzigkeit, 1996 # # This file 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. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010 Free Software Foundation, # Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 57 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # `#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test $lt_write_fail = 0 && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2010 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_REPLACE_SHELLFNS mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES # -------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script which will find a shell with a builtin # printf (which we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case "$ECHO" in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified).], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([${with_sysroot}]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and in which our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[123]]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) version_type=linux need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ F* | *Sun*Fortran*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi _LT_TAGVAR(link_all_deplibs, $1)=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS="$save_LDFLAGS"]) if test "$lt_cv_irix_exported_symbol" = yes; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], [[If ld is used when linking, flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) # ------------------------------------------------------ # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. m4_defun([_LT_PROG_FUNCTION_REPLACE], [dnl { sed -e '/^$1 ()$/,/^} # $1 /c\ $1 ()\ {\ m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: ]) # _LT_PROG_REPLACE_SHELLFNS # ------------------------- # Replace existing portable implementations of several shell functions with # equivalent extended shell implementations where those features are available.. m4_defun([_LT_PROG_REPLACE_SHELLFNS], [if test x"$xsi_shell" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"}]) _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl func_split_long_opt_name=${1%%=*} func_split_long_opt_arg=${1#*=}]) _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) fi if test x"$lt_shell_append" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl func_quote_for_eval "${2}" dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) fi ]) # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine which file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS gnokii-0.6.31/m4/ac_expand_dir.m40000644000175000017500000000070211666163120014544 0ustar leoleodnl AC_EXPAND_DIR(VARNAME, DIR) dnl expands occurrences of ${prefix} and ${exec_prefix} in the given DIR, dnl and assigns the resulting string to VARNAME dnl example: AC_DEFINE_DIR(DATADIR, "$datadir") dnl by Alexandre Oliva AC_DEFUN([AC_EXPAND_DIR], [ $1=$2 $1=`( test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$exec_prefix" = xNONE && exec_prefix="${prefix}" eval echo \""[$]$1"\" )` ]) gnokii-0.6.31/m4/ltoptions.m40000644000175000017500000002725611666163203014036 0ustar leoleo# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, # Inc. # Written by Gary V. Vaughan, 2004 # # This file 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. # serial 7 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) gnokii-0.6.31/m4/acx_pthread.m40000644000175000017500000001713711666163120014260 0ustar leoleo# acx_pthread.m4, version 1.10 dnl Available from the GNU Autoconf Macro Archive at: dnl http://www.gnu.org/software/ac-archive/htmldoc/acx_pthread.html dnl Author: Steven G. Johnson AC_DEFUN([ACX_PTHREAD], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_LANG_SAVE AC_LANG_C acx_pthread_ok=no # We used to check for pthread.h first, but this fails if pthread.h # requires special compiler flags (e.g. on True64 or Sequent). # It gets checked for in the link test anyway. # First of all, check if the user has set any of the PTHREAD_LIBS, # etcetera environment variables, and if threads linking works using # them: if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes) AC_MSG_RESULT($acx_pthread_ok) if test x"$acx_pthread_ok" = xno; then PTHREAD_LIBS="" PTHREAD_CFLAGS="" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" fi # We must check for the threads library under a number of different # names; the ordering is very important because some systems # (e.g. DEC) have both -lpthread and -lpthreads, where one of the # libraries is broken (non-POSIX). # Create a list of thread flags to try. Items starting with a "-" are # C compiler flags, and other items are library names, except for "none" # which indicates that we try without any flags at all, and "pthread-config" # which is a program returning the flags for the Pth emulation library. acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" # The ordering *is* (sometimes) important. Some notes on the # individual items follow: # pthreads: AIX (must check this before -lpthread) # none: in case threads are in libc; should be tried before -Kthread and # other compiler flags to prevent continual compiler warnings # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) # -pthreads: Solaris/gcc # -mthreads: Mingw32/gcc, Lynx/gcc # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it # doesn't hurt to check since this sometimes defines pthreads too; # also defines -D_REENTRANT) # pthread: Linux, etcetera # --thread-safe: KAI C++ # pthread-config: use pthread-config program (for GNU Pth library) case "${host_cpu}-${host_os}" in *solaris*) # On Solaris (at least, for some versions), libc contains stubbed # (non-functional) versions of the pthreads routines, so link-based # tests will erroneously succeed. (We need to link with -pthread or # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather # a function called by this macro, so we could check for that, but # who knows whether they'll stub that too in a future libc.) So, # we'll just look for -pthreads and -lpthread first: acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags" ;; esac if test x"$acx_pthread_ok" = xno; then for flag in $acx_pthread_flags; do case $flag in none) AC_MSG_CHECKING([whether pthreads work without any flags]) ;; -*) AC_MSG_CHECKING([whether pthreads work with $flag]) PTHREAD_CFLAGS="$flag" ;; pthread-config) AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no) if test x"$acx_pthread_config" = xno; then continue; fi PTHREAD_CFLAGS="`pthread-config --cflags`" PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" ;; *) AC_MSG_CHECKING([for the pthreads library -l$flag]) PTHREAD_LIBS="-l$flag" ;; esac save_LIBS="$LIBS" save_CFLAGS="$CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Check for various functions. We must include pthread.h, # since some functions may be macros. (On the Sequent, we # need a special flag -Kthread to make this header compile.) # We check for pthread_join because it is in -lpthread on IRIX # while pthread_create is in libc. We check for pthread_attr_init # due to DEC craziness with -lpthreads. We check for # pthread_cleanup_push because it is one of the few pthread # functions on Solaris that doesn't have a non-functional libc stub. # We try pthread_create on general principles. AC_TRY_LINK([#include ], [pthread_t th; pthread_join(th, 0); pthread_attr_init(0); pthread_cleanup_push(0, 0); pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], [acx_pthread_ok=yes]) LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" AC_MSG_RESULT($acx_pthread_ok) if test "x$acx_pthread_ok" = xyes; then break; fi PTHREAD_LIBS="" PTHREAD_CFLAGS="" done fi # Various other checks: if test "x$acx_pthread_ok" = xyes; then save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Detect AIX lossage: threads are created detached by default # and the JOINABLE attribute has a nonstandard name (UNDETACHED). AC_MSG_CHECKING([for joinable pthread attribute]) AC_TRY_LINK([#include ], [int attr=PTHREAD_CREATE_JOINABLE;], ok=PTHREAD_CREATE_JOINABLE, ok=unknown) if test x"$ok" = xunknown; then AC_TRY_LINK([#include ], [int attr=PTHREAD_CREATE_UNDETACHED;], ok=PTHREAD_CREATE_UNDETACHED, ok=unknown) fi if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then AC_DEFINE(PTHREAD_CREATE_JOINABLE, $ok, [Define to the necessary symbol if this constant uses a non-standard name on your system.]) fi AC_MSG_RESULT(${ok}) if test x"$ok" = xunknown; then AC_MSG_WARN([we do not know how to create joinable pthreads]) fi AC_MSG_CHECKING([if more special flags are required for pthreads]) flag=no case "${host_cpu}-${host_os}" in *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";; *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; esac AC_MSG_RESULT(${flag}) if test "x$flag" != xno; then PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" # More AIX lossage: must compile with cc_r AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC}) else PTHREAD_CC="$CC" fi AC_SUBST(PTHREAD_LIBS) AC_SUBST(PTHREAD_CFLAGS) AC_SUBST(PTHREAD_CC) # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_pthread_ok" = xyes; then ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1]) : else acx_pthread_ok=no $2 fi AC_LANG_RESTORE ])dnl ACX_PTHREAD gnokii-0.6.31/m4/ltversion.m40000644000175000017500000000125611666163203014020 0ustar leoleo# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file 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. # @configure_input@ # serial 3293 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4]) m4_define([LT_PACKAGE_REVISION], [1.3293]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4' macro_revision='1.3293' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) gnokii-0.6.31/m4/intltool.m40000644000175000017500000002421511666163203013637 0ustar leoleo## intltool.m4 - Configure intltool for the target system. -*-Shell-script-*- ## Copyright (C) 2001 Eazel, Inc. ## Author: Maciej Stachowiak ## Kenneth Christiansen ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2 of the License, or ## (at your option) any later version. ## ## 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. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ## ## As a special exception to the GNU General Public License, if you ## distribute this file as part of a program that contains a ## configuration script generated by Autoconf, you may include it under ## the same distribution terms that you use for the rest of that program. dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml]) # serial 40 IT_PROG_INTLTOOL AC_DEFUN([IT_PROG_INTLTOOL], [ AC_PREREQ([2.50])dnl AC_REQUIRE([AM_NLS])dnl case "$am__api_version" in 1.[01234]) AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool]) ;; *) ;; esac if test -n "$1"; then AC_MSG_CHECKING([for intltool >= $1]) INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3` [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` ] AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found]) test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" || AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.]) fi AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update]) AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge]) AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract]) if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.]) fi INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@' INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' _IT_SUBST(INTLTOOL_DESKTOP_RULE) _IT_SUBST(INTLTOOL_DIRECTORY_RULE) _IT_SUBST(INTLTOOL_KEYS_RULE) _IT_SUBST(INTLTOOL_PROP_RULE) _IT_SUBST(INTLTOOL_OAF_RULE) _IT_SUBST(INTLTOOL_PONG_RULE) _IT_SUBST(INTLTOOL_SERVER_RULE) _IT_SUBST(INTLTOOL_SHEET_RULE) _IT_SUBST(INTLTOOL_SOUNDLIST_RULE) _IT_SUBST(INTLTOOL_UI_RULE) _IT_SUBST(INTLTOOL_XAM_RULE) _IT_SUBST(INTLTOOL_KBD_RULE) _IT_SUBST(INTLTOOL_XML_RULE) _IT_SUBST(INTLTOOL_XML_NOMERGE_RULE) _IT_SUBST(INTLTOOL_CAVES_RULE) _IT_SUBST(INTLTOOL_SCHEMAS_RULE) _IT_SUBST(INTLTOOL_THEME_RULE) _IT_SUBST(INTLTOOL_SERVICE_RULE) _IT_SUBST(INTLTOOL_POLICY_RULE) # Check the gettext tools to make sure they are GNU AC_PATH_PROG(XGETTEXT, xgettext) AC_PATH_PROG(MSGMERGE, msgmerge) AC_PATH_PROG(MSGFMT, msgfmt) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then AC_MSG_ERROR([GNU gettext tools not found; required for intltool]) fi xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`" mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`" mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`" if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then AC_MSG_ERROR([GNU gettext tools not found; required for intltool]) fi AC_PATH_PROG(INTLTOOL_PERL, perl) if test -z "$INTLTOOL_PERL"; then AC_MSG_ERROR([perl not found]) fi AC_MSG_CHECKING([for perl >= 5.8.1]) $INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1 if test $? -ne 0; then AC_MSG_ERROR([perl 5.8.1 is required for intltool]) else IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`" AC_MSG_RESULT([$IT_PERL_VERSION]) fi if test "x$2" != "xno-xml"; then AC_MSG_CHECKING([for XML::Parser]) if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then AC_MSG_RESULT([ok]) else AC_MSG_ERROR([XML::Parser perl module is required for intltool]) fi fi # Substitute ALL_LINGUAS so we can use it in po/Makefile AC_SUBST(ALL_LINGUAS) # Set DATADIRNAME correctly if it is not set yet # (copied from glib-gettext.m4) if test -z "$DATADIRNAME"; then AC_LINK_IFELSE( [AC_LANG_PROGRAM([[]], [[extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr]])], [DATADIRNAME=share], [case $host in *-*-solaris*) dnl On Solaris, if bind_textdomain_codeset is in libc, dnl GNU format message catalog is always supported, dnl since both are added to the libc all together. dnl Hence, we'd like to go with DATADIRNAME=share dnl in this case. AC_CHECK_FUNC(bind_textdomain_codeset, [DATADIRNAME=share], [DATADIRNAME=lib]) ;; *) [DATADIRNAME=lib] ;; esac]) fi AC_SUBST(DATADIRNAME) IT_PO_SUBDIR([po]) ]) # IT_PO_SUBDIR(DIRNAME) # --------------------- # All po subdirs have to be declared with this macro; the subdir "po" is # declared by IT_PROG_INTLTOOL. # AC_DEFUN([IT_PO_SUBDIR], [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS. dnl dnl The following CONFIG_COMMANDS should be executed at the very end dnl of config.status. AC_CONFIG_COMMANDS_PRE([ AC_CONFIG_COMMANDS([$1/stamp-it], [ if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.]) fi rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp" >"$1/stamp-it.tmp" [sed '/^#/d s/^[[].*] *// /^[ ]*$/d '"s|^| $ac_top_srcdir/|" \ "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES" ] [sed '/^POTFILES =/,/[^\\]$/ { /^POTFILES =/!d r $1/POTFILES } ' "$1/Makefile.in" >"$1/Makefile"] rm -f "$1/Makefile.tmp" mv "$1/stamp-it.tmp" "$1/stamp-it" ]) ])dnl ]) # _IT_SUBST(VARIABLE) # ------------------- # Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST # AC_DEFUN([_IT_SUBST], [ AC_SUBST([$1]) m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])]) ] ) # deprecated macros AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL]) # A hint is needed for aclocal from Automake <= 1.9.4: # AC_DEFUN([AC_PROG_INTLTOOL], ...) gnokii-0.6.31/m4/lt~obsolete.m40000644000175000017500000001375611666163203014355 0ustar leoleo# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file 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. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) gnokii-0.6.31/install-sh0000755000175000017500000003253711500011217013203 0ustar leoleo#!/bin/sh # install - install a program, script, or datafile scriptversion=2009-04-28.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: gnokii-0.6.31/compile0000755000175000017500000000727111500011217012552 0ustar leoleo#! /bin/sh # Wrapper for compilers which do not understand `-c -o'. scriptversion=2009-10-06.20; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software # Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # 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. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand `-c -o'. Remove `-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file `INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; esac ofile= cfile= eat= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as `compile cc -o foo foo.c'. # So we strip `-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no `-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # `.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use `[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: gnokii-0.6.31/config.rpath0000755000175000017500000003744411666163120013527 0ustar leoleo#! /bin/sh # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # # Copyright 1996-2006 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit , 1996 # # This file 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. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld # should be set by the caller. # # The set of defined variables is at the end of this script. # Known limitations: # - On IRIX 6.5 with CC="cc", the run time search patch must not be longer # than 256 bytes, otherwise the compiler driver will dump core. The only # known workaround is to choose shorter directory names for the build # directory and/or the installation directory. # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a shrext=.so host="$1" host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # Code taken from libtool.m4's _LT_CC_BASENAME. for cc_temp in $CC""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` # Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC. wl= if test "$GCC" = yes; then wl='-Wl,' else case "$host_os" in aix*) wl='-Wl,' ;; darwin*) case $cc_basename in xlc*) wl='-Wl,' ;; esac ;; mingw* | pw32* | os2*) ;; hpux9* | hpux10* | hpux11*) wl='-Wl,' ;; irix5* | irix6* | nonstopux*) wl='-Wl,' ;; newsos6) ;; linux*) case $cc_basename in icc* | ecc*) wl='-Wl,' ;; pgcc | pgf77 | pgf90) wl='-Wl,' ;; ccc*) wl='-Wl,' ;; como) wl='-lopt=' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) wl='-Wl,' ;; esac ;; esac ;; osf3* | osf4* | osf5*) wl='-Wl,' ;; sco3.2v5*) ;; solaris*) wl='-Wl,' ;; sunos4*) wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) wl='-Wl,' ;; sysv4*MP*) ;; unicos*) wl='-Wl,' ;; uts4*) ;; esac fi # Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS. hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no case "$host_os" in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. # Unlike libtool, we use -rpath here, not --rpath, since the documented # option of GNU ld is called -rpath, not --rpath. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' case "$host_os" in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no fi ;; amigaos*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we cannot use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; cygwin* | mingw* | pw32*) # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then : else ld_shlibs=no fi ;; interix3*) hardcode_direct=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; netbsd*) ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' else ld_shlibs=no fi ;; esac ;; sunos4*) hardcode_direct=yes ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then hardcode_libdir_flag_spec= fi else case "$host_os" in aix3*) # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac fi hardcode_direct=yes hardcode_libdir_separator=':' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct=yes else # We have old collect2 hardcode_direct=unsupported hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac fi # Begin _LT_AC_SYS_LIBPATH_AIX. echo 'int main () { return 0; }' > conftest.c ${CC} ${LDFLAGS} conftest.c -o conftest aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` fi if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib" fi rm -f conftest.c conftest # End _LT_AC_SYS_LIBPATH_AIX. if test "$aix_use_runtimelinking" = yes; then hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' else hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" fi fi ;; amigaos*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi[45]*) ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' libext=lib ;; darwin* | rhapsody*) hardcode_direct=no if test "$GCC" = yes ; then : else case $cc_basename in xlc*) ;; *) ld_shlibs=no ;; esac fi ;; dgux*) hardcode_libdir_flag_spec='-L$libdir' ;; freebsd1*) ld_shlibs=no ;; freebsd2.2*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; freebsd2*) hardcode_direct=yes hardcode_minus_L=yes ;; freebsd* | kfreebsd*-gnu | dragonfly*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; hpux9*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; hpux10*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no ;; *) hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; netbsd*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; newsos6) hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; openbsd*) hardcode_direct=yes if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then hardcode_libdir_flag_spec='${wl}-rpath,$libdir' else case "$host_os" in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) hardcode_libdir_flag_spec='-R$libdir' ;; *) hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; osf3*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) if test "$GCC" = yes; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else # Both cc and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) hardcode_libdir_flag_spec='-R$libdir' ;; sunos4*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes ;; sysv4) case $host_vendor in sni) hardcode_direct=yes # is this really true??? ;; siemens) hardcode_direct=no ;; motorola) hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac ;; sysv4.3*) ;; sysv4*MP*) if test -d /usr/nec; then ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) ;; sysv5* | sco3.2v5* | sco5v6*) hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' ;; uts4*) hardcode_libdir_flag_spec='-L$libdir' ;; *) ld_shlibs=no ;; esac fi # Check dynamic linker characteristics # Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER. libname_spec='lib$name' case "$host_os" in aix3*) ;; aix4* | aix5*) ;; amigaos*) ;; beos*) ;; bsdi[45]*) ;; cygwin* | mingw* | pw32*) shrext=.dll ;; darwin* | rhapsody*) shrext=.dylib ;; dgux*) ;; freebsd1*) ;; kfreebsd*-gnu) ;; freebsd* | dragonfly*) ;; gnu*) ;; hpux9* | hpux10* | hpux11*) case $host_cpu in ia64*) shrext=.so ;; hppa*64*) shrext=.sl ;; *) shrext=.sl ;; esac ;; interix3*) ;; irix5* | irix6* | nonstopux*) case "$host_os" in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; *) libsuff= shlibsuff= ;; esac ;; esac ;; linux*oldld* | linux*aout* | linux*coff*) ;; linux*) ;; knetbsd*-gnu) ;; netbsd*) ;; newsos6) ;; nto-qnx*) ;; openbsd*) ;; os2*) libname_spec='$name' shrext=.dll ;; osf3* | osf4* | osf5*) ;; solaris*) ;; sunos4*) ;; sysv4 | sysv4.3*) ;; sysv4*MP*) ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) ;; uts4*) ;; esac sed_quote_subst='s/\(["`$\\]\)/\\\1/g' escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` shlibext=`echo "$shrext" | sed -e 's,^\.,,'` escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' < # Created: 1993-05-16 # Public domain. # # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' IFS=" "" $nl" errstatus=0 dirmode= usage="\ Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... Create each directory DIR (with mode MODE, if specified), including all leading file name components. Report bugs to ." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" exit $? ;; -m) # -m PERM arg shift test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } dirmode=$1 shift ;; --version) echo "$0 $scriptversion" exit $? ;; --) # stop option processing shift break ;; -*) # unknown option echo "$usage" 1>&2 exit 1 ;; *) # first non-opt arg break ;; esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac # Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and # mkdir -p a/c at the same time, both will detect that a is missing, # one will create a, then the other will try to create a and die with # a "File exists" error. This is a problem when calling mkinstalldirs # from a parallel make. We use --version in the probe to restrict # ourselves to GNU mkdir, which is thread-safe. case $dirmode in '') if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. test -d ./-p && rmdir ./-p test -d ./--version && rmdir ./--version fi ;; *) if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" else # Clean up after NextStep and OpenStep mkdir. for d in ./-m ./-p ./--version "./$dirmode"; do test -d $d && rmdir $d done fi ;; esac for file do case $file in /*) pathcomp=/ ;; *) pathcomp= ;; esac oIFS=$IFS IFS=/ set fnord $file shift IFS=$oIFS for d do test "x$d" = x && continue pathcomp=$pathcomp$d case $pathcomp in -*) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr= chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp=$pathcomp/ done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: gnokii-0.6.31/utils/0000755000175000017500000000000011670640024012341 5ustar leoleognokii-0.6.31/utils/Makefile.am0000644000175000017500000000055111666163120014400 0ustar leoleoDEFS = -DLOCALEDIR=\"$(localedir)\" sbin_PROGRAMS = mgnokiidev mgnokiidev_SOURCES = mgnokiidev.c mgnokiidev_LDADD = $(INTLLIBS) $(TCP_LIBS) mgnokiidev_CFLAGS = -I$(top_srcdir)/include scripts_DATA = sendsms scriptsdir = $(bindir) EXTRA_DIST = gnapplet.sis $(scripts_DATA) gnapplet.sis: wget -q -N -O $@ http://www.gnokii.org/download/gnapplet/gnapplet.sis gnokii-0.6.31/utils/Makefile.in0000644000175000017500000005474611666163212014432 0ustar leoleo# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ sbin_PROGRAMS = mgnokiidev$(EXEEXT) subdir = utils DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_expand_dir.m4 \ $(top_srcdir)/m4/acx_pthread.m4 $(top_srcdir)/m4/intltool.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(scriptsdir)" PROGRAMS = $(sbin_PROGRAMS) am_mgnokiidev_OBJECTS = mgnokiidev-mgnokiidev.$(OBJEXT) mgnokiidev_OBJECTS = $(am_mgnokiidev_OBJECTS) am__DEPENDENCIES_1 = mgnokiidev_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) mgnokiidev_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(mgnokiidev_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(mgnokiidev_SOURCES) DIST_SOURCES = $(mgnokiidev_SOURCES) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' DATA = $(scripts_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLUETOOTH_LIBS = @BLUETOOTH_LIBS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = -DLOCALEDIR=\"$(localedir)\" DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FIND = @FIND@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLDFLAGS = @GLDFLAGS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GMODULE_CFLAGS = @GMODULE_CFLAGS@ GMODULE_LIBS = @GMODULE_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GNOKII_LT_VERSION = @GNOKII_LT_VERSION@ GNOKII_LT_VERSION_AGE = @GNOKII_LT_VERSION_AGE@ GNOKII_LT_VERSION_CURRENT = @GNOKII_LT_VERSION_CURRENT@ GNOKII_LT_VERSION_REVISION = @GNOKII_LT_VERSION_REVISION@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_LIBICAL = @HAVE_LIBICAL@ HAVE_LIBUSB = @HAVE_LIBUSB@ HAVE_SOCKETPHONET = @HAVE_SOCKETPHONET@ HAVE_XGNOKII = @HAVE_XGNOKII@ ICAL_CFLAGS = @ICAL_CFLAGS@ ICAL_LIBS = @ICAL_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBGNOKII_VERSION_MAJOR = @LIBGNOKII_VERSION_MAJOR@ LIBGNOKII_VERSION_MINOR = @LIBGNOKII_VERSION_MINOR@ LIBGNOKII_VERSION_RELEASE = @LIBGNOKII_VERSION_RELEASE@ LIBGNOKII_VERSION_STRING = @LIBGNOKII_VERSION_STRING@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBPCSCLITE_CFLAGS = @LIBPCSCLITE_CFLAGS@ LIBPCSCLITE_LIBS = @LIBPCSCLITE_LIBS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKE = @MAKE@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ MYSQLCONFIG = @MYSQLCONFIG@ MYSQLCONFIG5 = @MYSQLCONFIG5@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_LIBS = @MYSQL_LIBS@ NEED_LOCALE_CHARSET = @NEED_LOCALE_CHARSET@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OWN_GETOPT = @OWN_GETOPT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PGCONFIG = @PGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSTGRES_CFLAGS = @POSTGRES_CFLAGS@ POSTGRES_LIBS = @POSTGRES_LIBS@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LIBS = @SQLITE3_LIBS@ SQLITE_CFLAGS = @SQLITE_CFLAGS@ SQLITE_LIBS = @SQLITE_LIBS@ STRIP = @STRIP@ TCP_LIBS = @TCP_LIBS@ TERMLDFLAGS = @TERMLDFLAGS@ TERMLIBS = @TERMLIBS@ USB_LIBS = @USB_LIBS@ USE_NLS = @USE_NLS@ USE_UNIX98PTYS = @USE_UNIX98PTYS@ VERSION = @VERSION@ WIN32 = @WIN32@ WIN32_CROSS = @WIN32_CROSS@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ XPACKAGE = @XPACKAGE@ XPM_CFLAGS = @XPM_CFLAGS@ XPM_LIBS = @XPM_LIBS@ XVERSION = @XVERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ acx_pthread_config = @acx_pthread_config@ 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@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ mgnokiidev_SOURCES = mgnokiidev.c mgnokiidev_LDADD = $(INTLLIBS) $(TCP_LIBS) mgnokiidev_CFLAGS = -I$(top_srcdir)/include scripts_DATA = sendsms scriptsdir = $(bindir) EXTRA_DIST = gnapplet.sis $(scripts_DATA) all: all-am .SUFFIXES: .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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu utils/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu utils/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 $(am__aclocal_m4_deps): install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)" @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ } \ ; done uninstall-sbinPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(sbindir)" && rm -f $$files clean-sbinPROGRAMS: @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list mgnokiidev$(EXEEXT): $(mgnokiidev_OBJECTS) $(mgnokiidev_DEPENDENCIES) @rm -f mgnokiidev$(EXEEXT) $(mgnokiidev_LINK) $(mgnokiidev_OBJECTS) $(mgnokiidev_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mgnokiidev-mgnokiidev.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @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 $@ $< mgnokiidev-mgnokiidev.o: mgnokiidev.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mgnokiidev_CFLAGS) $(CFLAGS) -MT mgnokiidev-mgnokiidev.o -MD -MP -MF $(DEPDIR)/mgnokiidev-mgnokiidev.Tpo -c -o mgnokiidev-mgnokiidev.o `test -f 'mgnokiidev.c' || echo '$(srcdir)/'`mgnokiidev.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mgnokiidev-mgnokiidev.Tpo $(DEPDIR)/mgnokiidev-mgnokiidev.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mgnokiidev.c' object='mgnokiidev-mgnokiidev.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mgnokiidev_CFLAGS) $(CFLAGS) -c -o mgnokiidev-mgnokiidev.o `test -f 'mgnokiidev.c' || echo '$(srcdir)/'`mgnokiidev.c mgnokiidev-mgnokiidev.obj: mgnokiidev.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mgnokiidev_CFLAGS) $(CFLAGS) -MT mgnokiidev-mgnokiidev.obj -MD -MP -MF $(DEPDIR)/mgnokiidev-mgnokiidev.Tpo -c -o mgnokiidev-mgnokiidev.obj `if test -f 'mgnokiidev.c'; then $(CYGPATH_W) 'mgnokiidev.c'; else $(CYGPATH_W) '$(srcdir)/mgnokiidev.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mgnokiidev-mgnokiidev.Tpo $(DEPDIR)/mgnokiidev-mgnokiidev.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mgnokiidev.c' object='mgnokiidev-mgnokiidev.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mgnokiidev_CFLAGS) $(CFLAGS) -c -o mgnokiidev-mgnokiidev.obj `if test -f 'mgnokiidev.c'; then $(CYGPATH_W) 'mgnokiidev.c'; else $(CYGPATH_W) '$(srcdir)/mgnokiidev.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-scriptsDATA: $(scripts_DATA) @$(NORMAL_INSTALL) test -z "$(scriptsdir)" || $(MKDIR_P) "$(DESTDIR)$(scriptsdir)" @list='$(scripts_DATA)'; test -n "$(scriptsdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(scriptsdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(scriptsdir)" || exit $$?; \ done uninstall-scriptsDATA: @$(NORMAL_UNINSTALL) @list='$(scripts_DATA)'; test -n "$(scriptsdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(scriptsdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(scriptsdir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(DATA) installdirs: for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(scriptsdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-libtool clean-sbinPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-scriptsDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-sbinPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: 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-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sbinPROGRAMS uninstall-scriptsDATA .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-sbinPROGRAMS 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-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-sbinPROGRAMS install-scriptsDATA install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-sbinPROGRAMS \ uninstall-scriptsDATA gnapplet.sis: wget -q -N -O $@ http://www.gnokii.org/download/gnapplet/gnapplet.sis # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gnokii-0.6.31/utils/sendsms0000644000175000017500000003635711666163120013760 0ustar leoleo#!/bin/bash ############################################################################### # SENDSMS -- Script to send sms by 'gnokii' # Author : Gabriele Zappi - Rimini # History: # feb 17, 2001 Script created (v1.0) # jun 3, 2003 Use --getphonebook instead of --getmemory # as changed in gnokii (Ville Skytta) # jan 20, 2004 Use www.gnokii.org as a primary site to get # gnokii (Pawel Kot) # Remove notice on mygnokii as this is no longer # maintained (Pawel Kot) # may 6, 2007 Give a choice between SIM and phone memory for # the phonebook (Pawel Kot) # jan 23, 2009 Remove outdated notice about pre releases ############################################################################### # G N O K I I # # A Linux/Unix toolset and driver for the mobile phones. # # This file is part of gnokii. # # Gnokii is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 # as published by the Free Software Foundation. # # Gnokii 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. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with gnokii; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # Copyright (c) 2001 Gabriele Zappi - Rimini # ############################################################################### # $Id$ ############################################################################### # PROGNAME=`basename $0` # var settings. PROGNAME=${0##*/} VERSION="1.03" GNOKII=${GNOKII:-gnokii} PID=$$ SMSDIR=${SMSDIR:-$HOME/tmp/sms} TMP=~/tmp/SMStmp.$PID BACKTITLE="SENDSMS V$VERSION" AUTHOR="Gabriele Zappi - Rimini " help() { echo "$PROGNAME: $BACKTITLE - A gnokii interface for sending SMS." echo "Written by $AUTHOR" echo -e "\ \n\ Usage: $PROGNAME [OPTION]...\n\ \n\ Examples:\n\ $PROGNAME # simply run $PROGNAME in standard mode\n\ $PROGNAME --simulate # Simulates. doesn't really send sms (for debug)\n\ echo \"Hello Beauty ;-)\" | $PROGNAME --smsset\n\ # Preset \"Hello Beauty ;-)\" as SMS message.\n\ $PROGNAME --smsset < mymessage.txt\n\ # Preset contents of file mymessage.txt \n\ as SMS message.\n\ $PROGNAME --version # Display version, author and quits.\n\ \n\ NOTE:\n\ If you require to pickup number from phone's memory (or from SIM card),\n\ for the first time, it anyway reads phonebook from your mobile phone. \n\ (It may take a while... please, be patient ;-) \n\ \n\ Available options:\n\ --debug, -D May bother with more debugging messages ;-)\n\ For debugging purpose.\n\ --simul[ate], -S Simulation mode. Doesn't really send SMS by phone. \n\ Only simulates. For debugging purpose.\n\ --forceSMread, -s Forces $PROGNAME to read phonebook from SIM card,\n\ and to parse the generated file in order to update\n\ the numbers' list (useful only if required to pickup\n\ number from the phone's memory). see NOTE.\n\ --forceMEread, -m Forces $PROGNAME to read phonebook from phone memory,\n\ and to parse the generated file in order to update\n\ the numbers' list (useful only if required to pickup\n\ number from the phone's memory). see NOTE.\n\ --skipgnokiicheck, -K Skip the test of the presence of binary 'gnokii'.\n\ (It must be somewhere in your \$PATH). It allows you\n\ to try this script program, even if you don't have\n\ 'gnokii' already. ;)\n\ --smsset, --setsms Allows you to preset a SMS message from STDIN. (pipe\n\ or input redirection).\n\ This message will be proposed on the 'SMS message'\n\ field during the program input cycle.\n\ --help, -h, /h display this help and exit\n\ --version, -V output version information and exit" echo exit 0 } acex() { rm -rf $TMP >/dev/null 2>&1 clear exit $1 } parse_stdin() { # Switch initialization SW_DEBUG=no SW_SIMUL=no SW_FORCEMREAD=no SW_SKIPGNOKITST=no SW_PRESETSMS=no PRESETSMS="" while [ -n "$1" ] do case "$1" in --help|-h|/h) help ;; --version|-V) echo echo "$BACKTITLE - A gnokii interface for sending SMS." echo "Written by $AUTHOR" echo exit 0 ;; --simul*|-S) SW_SIMUL=yes ;; --debug*|-D) SW_DEBUG=yes SW_SIMUL=yes ;; --forceSMread|-s) SW_FORCESMREAD=yes ;; --forceMEread|-m) SW_FORCEMEREAD=yes ;; --skipgnokiicheck|-K) SW_SKIPGNOKITST=yes ;; --smsset|--msgset|--setsms) SW_PRESETSMS=yes # will read from stdin echo "reading sms from stdin .." PRESETSMS=`cat` ;; *) echo "$PROGNAME: Invalid parameter: " help ;; esac shift done } sure_to_quit() { dialog --backtitle "$BACKTITLE" \ --yesno "Really sure to quit? " 6 50 if [ $? -eq 0 ]; then acex 0 fi } SMS_phonereadSM() { dialog --backtitle "$BACKTITLE" --infobox "Reading phonebook from SIM\n Please wait" 4 40 $GNOKII --getphonebook SM 1 end --raw > $SMSDIR/.SMlist.temp 2>/dev/null } SMS_phonereadME() { dialog --backtitle "$BACKTITLE" --infobox "Reading phonebook from phone memory\n Please wait" 4 40 $GNOKII --getphonebook ME 1 end --raw > $SMSDIR/.MElist.temp 2>/dev/null } SMS_choicefrommem() { # read from phonebook. if [ "$SW_FORCESMREAD" = "yes" ] ; then readsim=1 elif [ -s $SMSDIR/.SMlist.sim ]; then dialog --backtitle "INSERT NUMBER(s).." \ --yesno "SIM phonebook file is already present. \ Do you want to read SIM card anyway?" 8 60 if [ $? -eq 0 ] ; then readsim=1 else readsim=0 fi else readsim=0 fi if [ "$SW_FORCEMEREAD" = "yes" ] ; then readme=1 elif [ -s $SMSDIR/.MElist.mem ]; then dialog --backtitle "INSERT NUMBER(s).." \ --yesno "Phonebook file is already present. \ Do you want to read phone memory anyway?" 8 60 if [ $? -eq 0 ] ; then readme=1 else readme=0 fi else readme=0 fi # by default read from SIM memory if [ $readsim -eq 0 ] && [ $readme -eq 0 ] && [ ! -s $SMSDIR/.PBKlist ]; then readsim=1 fi SMERROR=0 if [ $readsim -eq 1 ] ; then SMS_phonereadSM if [ $? -ne 0 ] ; then dialog --backtitle "INSERT NUMBER(s).." \ --msgbox "ERROR during reading memory the SIM card... \ Insert manually destination number." 8 60 SMERROR=1 else mv -f $SMSDIR/.SMlist.temp $SMSDIR/.SMlist.sim fi else SMERROR=1 fi MEERROR=0 if [ $readme -eq 1 ]; then SMS_phonereadME if [ $? -ne 0 ] ; then dialog --backtitle "INSERT NUMBER(s).." \ --msgbox "ERROR during reading memory from your phone... \ Insert manually destination number." 8 60 MEERROR=1 else mv -f $SMSDIR/.MElist.temp $SMSDIR/.MElist.mem fi else MEERROR=1 fi if [ $SMERROR -eq 1 ] && [ $MEERROR -eq 1 ]; then ERROR=1 else ERROR=0 cat $SMSDIR/.SMlist.sim > $SMSDIR/.PBKlist cat $SMSDIR/.MElist.mem >> $SMSDIR/.PBKlist fi if [ $ERROR -eq 0 ]; then # Parsing sim file... if [ ! -s $SMSDIR/.SMlist.chklst -o ! -s $SMSDIR/.SMlist.choice \ -o $readsim -eq 1 -o $readme -eq 1 ] ; then > $SMSDIR/.SMlist.menu > $SMSDIR/.SMlist.chklst > $SMSDIR/.SMlist.choice totrows=`cat $SMSDIR/.PBKlist | wc -l` rownow=0 (while read riga do rownow=`expr $rownow + 1` perc=`expr $rownow \* 100 / $totrows` pos=`echo $riga | cut -f4 -d";"` name=`echo $riga | cut -f1 -d";"` num=`echo $riga | cut -f2 -d";"` if [ -n "$pos" -a -n "$num" ] ; then echo -e "$pos \"$name - $num\"" >> $SMSDIR/.SMlist.menu echo -e "$pos \"$name - $num\" off" >> $SMSDIR/.SMlist.chklst echo "$pos;$num" >> $SMSDIR/.SMlist.choice fi echo $perc done < $SMSDIR/.PBKlist) | dialog \ --gauge "Parsing phonebook file..." 12 70 0 fi chkok=0 option=0 while [ $chkok -eq 0 ] do eval dialog --backtitle \"SENDSMS CKECKLIST\" \ --checklist \"Check your MEMORY number\(s\).\ \\nPress ESC key \for options..... \" \ 16 60 9 \ `cat $SMSDIR/.SMlist.chklst` 2> $TMP/rspTEMP02 option=$? if [ $option -eq 255 ] ; then dialog --backtitle "SENDSMS CKECKLIST" --menu \ "Options sub-menus for Phonebook choice list:" \ 10 50 4 \ "1" "Sort by Memory Pos" \ "2" "Sort by Names" \ "9" "Quit $PROGNAME" 2> $TMP/rspTEMP04 if [ $? -eq 0 ]; then sorttype=`cat $TMP/rspTEMP04` case $sorttype in 1) sort -n $SMSDIR/.SMlist.chklst > $TMP/.SMlist.tmp mv -f $TMP/.SMlist.tmp $SMSDIR/.SMlist.chklst ;; 2) sort +1 $SMSDIR/.SMlist.chklst > $TMP/.SMlist.tmp mv -f $TMP/.SMlist.tmp $SMSDIR/.SMlist.chklst ;; 9) sure_to_quit ;; esac fi else chkok=1 fi done if [ $? -eq 0 ] ; then for val in `cat $TMP/rspTEMP02` do tok1=`eval echo $val` tok2=`grep "^$tok1;" $SMSDIR/.SMlist.choice` tok3=`echo $tok2 | cut -f2 -d";"` if [ -z "$NUMBERS" ] ; then NUMBERS="$tok3" else NUMBERS="$NUMBERS $tok3" fi done fi fi } ########################################################################### ########################################################################### # MAIN PROCEDURE # ########################################################################### ########################################################################### parse_stdin $* # This is the 'help' test... # if [ "$1" = "--help" -o "$1" = "/h" ] ; then # help # fi if ! type -all "dialog" >/dev/null 2>&1 ; then echo echo "${PROGNAME}: error:" echo "Can't find 'dialog', i can't run without 'dialog' on your system." echo "You can get a compiled elf version of 'dialog' from here." echo "http://www.tux.org/pub/people/kent-robotti/index.html" echo "ftp://ftp.tux.org/pub/people/kent-robotti 'dialog-0.9a-15.elf.tar.gz'" echo exit 1 fi if [ $SW_SKIPGNOKITST = no ] ; then if ! type -all "$GNOKII" >/dev/null 2>&1 ; then echo echo "${PROGNAME}: error:" echo "Can't find 'gnokii'. This script needs 'gnokii' in order to work." echo "You can get a version of 'gnokii' from following links:" echo "GNOKII: http://www.gnokii.org/" echo echo "Source code and pre-compiled binaries for gnokii are available from " echo "a number of sites" echo echo "www.gnokii.org located in California, USA" echo "ftp.pl.gnokii.org located in Warsaw, Poland" echo exit 1 fi fi if [ ! -d ~/tmp ]; then mkdir ~/tmp chmod 755 ~/tmp fi if [ ! -d $SMSDIR ]; then mkdir -p $SMSDIR chmod 755 $SMSDIR fi if [ -d $TMP ]; then rm -rf $TMP fi mkdir -p $TMP chmod 700 $TMP echo "$BACKTITLE" > $TMP/txtTEMP01 echo >> $TMP/txtTEMP01 echo "Written by Gabriele Zappi " >> $TMP/txtTEMP01 echo >> $TMP/txtTEMP01 echo "This script is a front-end to type SMS messages directly" >> $TMP/txtTEMP01 echo "from your computer and send them using gnokii through" >> $TMP/txtTEMP01 echo "your cellular phone connected to your computer." >> $TMP/txtTEMP01 echo >> $TMP/txtTEMP01 echo "Press [Enter] to continue with SENDSMS." >> $TMP/txtTEMP01 dialog --backtitle "$BACKTITLE" --textbox "$TMP/txtTEMP01" 14 70 TURN=0 while true do echo "Please, enter in the box below, your SMS message." > $TMP/txtTEMP$$ echo "Remember that it cannot be longer than 160 chars." >> $TMP/txtTEMP$$ echo " " >> $TMP/txtTEMP$$ echo "Press [ESC] or [CANCEL] to quit the program. " >> $TMP/txtTEMP$$ len=999 if [ $TURN -eq 0 ]; then if [ "$SW_PRESETSMS" = "yes" ]; then echo "$PRESETSMS" > $TMP/rspTEMP01 else > $TMP/rspTEMP01 fi fi while test "$len" -le 0 -o "$len" -gt 160 do dialog --backtitle "INSERT SMS ....." \ --inputbox "`cat $TMP/txtTEMP$$`" 10 70 "`cat $TMP/rspTEMP01`" \ 2> $TMP/rspTEMP01 if [ $? -ne 0 ] ; then sure_to_quit fi len=`cat $TMP/rspTEMP01 | wc -c ` if [ $len -le 0 -o $len -gt 160 ] ; then echo "Invalid SMS: It must be < 160 chars and > 0 long.." > $TMP/txtTEMP02 dialog --textbox "$TMP/txtTEMP02" 6 70 fi done NUMBERS="" okcycle=0 while [ "$NUMBERS" = "" -o "$okcycle" -eq 0 ] do dialog --backtitle "INSERT NUMBER(s).." \ --yesno "Would you like to pick up number(s)\ from your phone memory?" 8 60 if [ $? -eq 0 ] ; then # Yes, gimme num from phonebook. SMS_choicefrommem fi # Manual telephone number completion or insertion. echo "Please, insert/modify in the box below, the NUMBER(S)" > $TMP/txtTEMP$$ echo "where you want to send the message to. " >> $TMP/txtTEMP$$ echo "(Multiple numbers must be separated by a space.) " >> $TMP/txtTEMP$$ echo "Press [ESC] or [CANCEL] to quit the program. " >> $TMP/txtTEMP$$ echo " " >> $TMP/txtTEMP$$ echo "OUTGOING MESSAGE: " >> $TMP/txtTEMP$$ echo -n " " cat $TMP/rspTEMP01 | cut -c1-60 >> $TMP/txtTEMP$$ cat $TMP/rspTEMP01 | cut -c61-120 >> $TMP/txtTEMP$$ cat $TMP/rspTEMP01 | cut -c121-160 >> $TMP/txtTEMP$$ okcycle=1 dialog --backtitle "INSERT NUMBER(s).." \ --inputbox "`cat $TMP/txtTEMP$$`" \ 16 70 "$NUMBERS" 2> $TMP/rspTEMP03 if [ $? -ne 0 ] ; then sure_to_quit okcycle=0 else NUMBERS=`cat $TMP/rspTEMP03` if [ "$NUMBERS" = "" ] ; then dialog --backtitle "INSERT NUMBER(s).." \ --infobox "Number cannot be empty.\n Try again.." 4 28 sleep 2 okcycle=0 fi fi done # Last confirmation before sending messages.... okcycle=0 while [ $okcycle -eq 0 ] do echo "Ok. If you confirm the operation, then the SMS" > $TMP/txtTEMP$$ echo "is going to be sent to the selected number(s)." >> $TMP/txtTEMP$$ echo >> $TMP/txtTEMP$$ echo "Press [ESC] to quit the program. " >> $TMP/txtTEMP$$ echo "Press [CANCEL] to return to SMS input. " >> $TMP/txtTEMP$$ dialog --backtitle "$BACKTITLE" \ --yesno "`cat $TMP/txtTEMP$$`" 9 60 case $? in 0) okcycle=1;; 1) TURN=`expr $TURN + 1` continue 2;; 255) sure_to_quit ;; esac done TURN=`expr $TURN + 1` for num in $NUMBERS do # echo "Sending sms to number $num ... " dialog --backtitle "$BACKTITLE" --infobox "Sending sms to number $num ...\n Please wait" 4 45 if [ "$SW_SIMUL" = "yes" ] ; then sleep 2 else $GNOKII --sendsms $num < $TMP/rspTEMP01 > /dev/null 2>&1 fi if [ $? -eq 0 ] ; then dialog --backtitle "$BACKTITLE" \ --infobox "Message correctly sent to number $num !" 3 55 else dialog --backtitle "$BACKTITLE" \ --infobox "Sent Failed to num $num! Sorry!" 3 55 fi sleep 2 done done acex 0 # zap - fin qui gnokii-0.6.31/utils/mgnokiidev.c0000644000175000017500000001347611666163120014656 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings, Pavel Janik ml. Copyright (C) 2000-2002 Pawel Kot Copyright (C) 2002-2003 BORBELY Zoltan The code is based on the skeleton from W. Richard Stevens' "UNIX Network Programming", Volume 1, Second Edition. Call mgnokiidev with one and only one argument -- a socket descriptor to send a caller pty device descriptor. */ #include "config.h" /* See common/data/virtmodem.c for explanation */ #ifdef __OpenBSD__ # include # define HAVE_MSGHDR_MSG_CONTROL 1 #endif /* See common/data/virtmodem.c for explanation */ #ifdef __FreeBSD__ # include # undef __BSD_VISIBLE # define __BSD_VISIBLE 1 #endif /* See common/data/virtmodem.c for explanation */ #ifdef __NetBSD__ # include #endif /* See common/data/virtmodem.c for explanation */ #define _XOPEN_SOURCE 500 #include "misc.h" #include #include #include #include #include #include #include #include #include #include #ifdef ENABLE_NLS # include #endif static int gwrite(int fd, void *ptr, size_t nbytes, int sendfd) { struct msghdr msg; struct iovec iov[1]; #ifdef HAVE_MSGHDR_MSG_CONTROL union { struct cmsghdr msg; char control[CMSG_SPACE(sizeof(int))]; } control_un; struct cmsghdr *cmptr; msg.msg_control = control_un.control; msg.msg_controllen = sizeof(control_un.control); cmptr = CMSG_FIRSTHDR(&msg); cmptr->cmsg_len = CMSG_LEN(sizeof(int)); cmptr->cmsg_level = SOL_SOCKET; cmptr->cmsg_type = SCM_RIGHTS; *((int *)CMSG_DATA(cmptr)) = sendfd; #else msg.msg_accrights = (caddr_t)&sendfd; msg.msg_accrightslen = sizeof(int); #endif /* HAVE_MSGHDR_MSG_CONTROL */ msg.msg_name = NULL; msg.msg_namelen = 0; iov[0].iov_base = ptr; iov[0].iov_len = nbytes; msg.msg_iov = iov; msg.msg_iovlen = 1; return (sendmsg(fd, &msg, 0)); } /* VM_GetMasterPty() Takes a double-indirect character pointer in which to put a slave name, and returns an integer file descriptor. If it returns < 0, an error has occurred. Otherwise, it has returned the master pty file descriptor, and fills in *name with the name of the corresponding slave pty. Once the slave pty has been opened, you are responsible to free *name. Code is from Developing Linux Applications by Troan and Johnson */ static int GetMasterPty(char **name) { int master = -1; #ifdef USE_UNIX98PTYS master = open("/dev/ptmx", O_RDWR | O_NOCTTY | O_NONBLOCK); if (master >= 0) { if (!grantpt(master) || !unlockpt(master)) { *name = strdup(ptsname(master)); } else { return(-1); } } #else /* USE_UNIX98PTYS */ int i = 0 , j = 0; char *ptyp8 = "pqrstuvwxyzPQRST"; char *ptyp9 = "0123456789abcdef"; /* create a dummy name to fill in */ *name = strdup("/dev/ptyXX"); /* search for an unused pty */ for (i = 0; i < 16 && master <= 0; i++) { for (j = 0; j < 16 && master <= 0; j++) { (*name)[8] = ptyp8[i]; (*name)[9] = ptyp9[j]; /* open the master pty */ master = open(*name, O_RDWR | O_NOCTTY | O_NONBLOCK ); } } if ((master < 0) && (i == 16) && (j == 16)) { /* must have tried every pty unsuccessfully */ return (master); } /* By substituting a letter, we change the master pty * name into the slave pty name. */ (*name)[5] = 't'; #endif /* USE_UNIX98PTYS */ return (master); } int main(int argc, char **argv) { int n, PtyRDFD = -1; /* Pty descriptor */ char *name = NULL; /* Device name */ /* For GNU gettext */ #ifdef ENABLE_NLS setlocale(LC_ALL, ""); bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR); textdomain(GETTEXT_PACKAGE); #endif /* Check we have one and only one command line argument. */ if (argc != 2) { fprintf(stderr, _("mgnokiidev takes one and only one argument!\n")); exit(-2); } PtyRDFD = GetMasterPty(&name); if (PtyRDFD < 0 || name == NULL) { fprintf (stderr, _("Couldn't open pty!\n")); perror("mgnokiidev - GetMasterPty"); goto error; } /* Now change permissions to the slave pty */ /* Now become root */ setuid(0); /* Change group of slave pty to group of mgnokiidev */ if (chown(name, -1, getgid()) < 0) { perror("mgnokiidev - chown"); goto error; } /* Change permissions to rw by group */ if (chmod(name, S_IRGRP | S_IWGRP | S_IRUSR | S_IWUSR) < 0) { perror("mgnokiidev - chmod"); goto error; } /* FIXME: Possible bug - should check that /dev/gnokii doesn't already exist in case multiple users are trying to run gnokii. Well, but will be mgnokiidev called then? I do not think so - you will probably got the message serialport in use or similar. Don't you. I haven't tested it though. */ /* Remove symlink in case it already exists. Don't care if it fails. */ unlink("/dev/gnokii"); /* Create symlink */ if (symlink(name, "/dev/gnokii") < 0) { perror("mgnokiidev - symlink"); goto error; } /* Now pass the descriptor to the caller */ if ((n = gwrite(atoi(argv[1]), "", 1, PtyRDFD)) < 0) { perror("mgnokiidev - gwrite"); goto error; } /* Done */ exit(0); error: if (name) free(name); exit(-2); } gnokii-0.6.31/COPYING0000644000175000017500000004312711666163117012253 0ustar leoleo GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. gnokii-0.6.31/intltool-merge.in0000644000175000017500000000000011666163203014464 0ustar leoleognokii-0.6.31/INSTALL0000644000175000017500000002013211666163120012232 0ustar leoleoGnokii installation instructions ================================ Please note that you need development packages to build gnokii from scratch. You'll need tools like: - git - make - gcc - flex - pkg-config For certain distributions like Ubuntu most of the tools are available in build-essentials package. You will need also the set of autotools and family (they are needed just for git compile): - automake - autoconf - libtool - gettext - intltool For building gnokii you will need development packages for the used libraries. They are usually marked with -dev suffix, like: - libbluetooth3 vs libbluetooth3-dev - libical0 vs libical-dev Verify with your distribution what exactly do you need. Quickstart ========== $ libtoolize -c -f # only for git copies [ under Mac OS X use glibtoolize instead of libtoolize ] $ glib-gettextize -f # only for git copies $ intltoolize --force --copy --automake # only for git copies $ aclocal -I m4 # only for git copies $ autoheader -I m4 # only for git copies $ automake --add-missing # only for git copies $ autoconf # only for git copies $ ./configure [] [ instead of above commands you can simply run ./autogen.sh [] ] [ we recommend using --enable-security option to get all gnokii ] [ capabilities ] $ make # make install $ mkdir -p ~/.config/gnokii $ cp Docs/sample/gnokiirc ~/.config/gnokii/config $ $EDITOR ~/.config/gnokii/config [ adjust config according to your setup and follow hints in the file ] Requirements ============ Additional libraries and header files needed for the various gnokii parts: libgnokii: glib-2.0 xgnokii: libX11, libXpm, glib-2.6, gtk+-2.0 Optional libraries and files: bitmap support: libXpm for xpm files support, gnokii can deal without this (xgnokii cannot) irda support: Linux kernel includes (there is also IrDA support for Mac OS X and Windows) bluetooth support: bluez (Linux Bluetooth stack) (there is also bluetooth support for Mac OS X and FreeBSD) libical support: libical-0.24, you may want to use gnokii internal iCal implementation but it is limited, no longer developed and deprecated. This is only for converting calendar and todo entries into iCal files and reading such files. libusb support: libusb (for DKU2 cables support) libreadline support: required by gnokii for --shell command support SIM readers support: libpcsclite (to use a Smart Card reader instead of a phone) country name translation: iso-codes package (its presence is detected at runtime if NLS is enabled so it can be installed at any time without reconfiguring or recompiling) smsd: glib-2.0, gmodule-2.0 smsd plugins: mysql: libmysqlclient postgresql: libpq sqlite: libsqlite3 Please note that all libraries are autodetected by configure script. Sources: http://www.xfree86.org/ libX11, libXpm http://www.gtk.org/ glib, gtk, gmodule http://www.kernel.org/ Linux kernel includes http://www.bluez.org/ bluez (Linux Bluetooth stack) http://sourceforge.net/projects/freeassociation/ libical http://libusb.sf.net/ libusb http://pcsclite.alioth.debian.org/ libpcsclite http://pkg-isocodes.alioth.debian.org/ iso-codes (country name translation) http://www.mysql.com/ libmysqlclient http://www.postgresql.com/ libpq http://tiswww.case.edu/php/chet/readline/rltop.html libreadline However all of the libraries should be shipped by any modern Linux (and not only) distribution. For xgnokii you may want download gnokii-artwork package from http://www.gnokii.org/download/gnokii, the package containing mobile phone pixmaps to be used with xgnokii keyboard simulator and operator logo previewer. Verbose instructions ==================== Preparations ------------ If you retrieved this copy from git, then first call $ libtoolize -c -f [ under Mac OS X use glibtoolize instead of libtoolize ] $ glib-gettextize -f $ intltoolize --force --copy --automake # only for git copies $ aclocal -I m4 $ autoheader -I m4 $ automake --add-missing # only for git copies $ autoconf Now you have to determine your system specific settings. $ ./configure [] Basic options are: --prefix=DIR Sets the install path prefix. Default is /usr/local/. --without-x Compiles without GTK (X11) programs. --disable-nls Set if you don't have/want GNU gettext support. --enable-security Set if you want to enable all security features supported by your mobile (PIN change, etc.). --disable-rlpdebug Set if you don't want RLP code compiled in. --disable-xdebug Set if you don't want X code compiled in. --enable-fulldebug Set if you want to produce binaries with debug symbols (cc -g) --help Shows all options. This example is commonly used: $ ./configure --prefix=/usr --enable-security Alternatively, instead of writing these commands you can use: $ sh autogen.sh [] where options are the same as with configure script. Sometimes (it happens mainly with libintl and libiconv) some libraries may not be correctly recognized. You may want to set enviromental variables to let configure do the work. The sample usage would be: $ CPPFLAGS="-I/usr/local/include -L/usr/local/lib" ./configure \ --prefix=/usr --enable-security or $ CFLAGS="-I/usr/local/include -L/usr/local/lib" ./configure \ --prefix=/usr --enable-security and the equivalent with autogen.sh Compilation ----------- Start the compilation process by typing $ make Installation ------------ Install the binaries into the system with the following line: # make install 'install' target is the usual installation process that you would need in most cases. Note that you will need to adjust /dev/ttyS* or /dev/ircomm* and /var/lock permissions and ownership before starting using gnokii. An udev rules file for use with libusb is provided in Docs/sample. If you wish to install gnokii stuff in some other directory root (eg. when creating a distribution package), you can take an advantage of the DESTDIR variable: $ make DESTDIR=/somewhere install Clean-up -------- To remove products of the compile process, type $ make clean Calling $ make distclean additionaly cleans all ./configure outputs. After this command you must run ./configure again if you need to use any Makefile. Configuration ------------- Copy the example config file for gnokii from the Docs/sample/ directory to your home directory: $ mkdir -p ~/.config/gnokii $ cp Docs/sample/gnokiirc ~/.config/gnokii/config It is a plain ASCII file which can be read in any editor. Make sure you do not save it in a wordprocessor's binary-format. It has to remain plain text. vi, mcedit, kedit, joe or even emacs are good examples. Change the settings to fit your setup. The file should be self-explaining. Strings starting with `#' are comments (from `#' char till end of the line). Ubuntu hints ============ The hints most likely apply against any other Debian-based distribution and similiar steps need to be taken for any other distribution. The described steps were taken on fresh Ubuntu 9.10 installation. Grab build environment. It will install compiler, most important libraries like libc, make and so: $ sudo apt-get install build-essential Get the most packages possible for gnokii compile: $ sudo apt-get build-dep gnokii One additional dependency is missing to support sqlite backend for smsd: $ sudo apt-get install libsqlite3-dev If you want to play on git version you need to have git and additional tools: $ sudo apt-get install git libtool Now you should be able to proceed with instructions described in previous sections. Fedora / RHEL ============= Grab build environment. It will install autotools, the devel packages, git but not the compiler itself: $ su -c 'yum-builddep gnokii' Grab the compiler and other tools: $ su -c 'yum install gcc libtool' Now you should be able to proceed with instructions described in previous sections. gnokii-0.6.31/configure.in0000644000175000017500000010043611666163120013520 0ustar leoleodnl dnl Makefile for the GNOKII tool suite. dnl dnl Copyright (C) 1999 Hugh Blemings & Pavel Janik ml. dnl 2000 Karel Zak, Pawel Kot dnl 2002 BORBELY Zoltan dnl dnl dnl IMPORTANT NOTE dnl The first PKG_CHECK_MODULES call must not be conditional dnl AC_INIT([gnokii], [0.6.31], [gnokii-users@nongnu.org], [gnokii], [http://www.gnokii.org/]) # Before making a release, the GNOKII_LT_VERSION string should be modified. # The string is of the form C:R:A. # - If interfaces have been changed or added, but binary compatibility has # been preserved, change to C+1:0:A+1 # - If binary compatibility has been broken (eg removed or changed interfaces) # change to C-A+1:0:0 # - If the interface is the same as the previous version, change to C:R+1:A GNOKII_LT_VERSION_CURRENT=7 GNOKII_LT_VERSION_REVISION=0 GNOKII_LT_VERSION_AGE=0 AC_SUBST(GNOKII_LT_VERSION_CURRENT) AC_SUBST(GNOKII_LT_VERSION_REVISION) AC_SUBST(GNOKII_LT_VERSION_AGE) dnl xgnokii version XVERSION=1.0 dnl smsd version SVERSION=1.5.2 AC_CANONICAL_SYSTEM AC_GNU_SOURCE AC_CONFIG_SRCDIR([gnokii/gnokii.c]) dnl gettext doesn't like the config.status being somewhere else :( dnl AC_CONFIG_AUX_DIR(config) AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE([1.8 dist-bzip2]) AC_PREFIX_DEFAULT("/usr/local") dnl ======================== Checks for programs. AC_PROG_CC AM_PROG_CC_C_O AC_PROG_CPP AC_PROG_LEX # If there's no flex/lex utility and there's no generated common/gnvcal.c file, we won't be able to compile if test "x$LEX" = "x:" && test ! -f common/gnvcal.c; then echo "You need one of the following:" echo " - installed lex/flex" echo " - generated common/gnvcal.c file (included in release tarballs, not included in GIT)" exit 1 fi AC_PATH_PROG(RM, rm, no) AC_PATH_PROG(FIND, find, no) AC_CHECK_PROGS(MAKE, gmake make) AC_CHECK_PROGS(AR, ar) AC_PROG_INSTALL dnl ======================= Localisation and i18n IT_PROG_INTLTOOL([0.35.0]) AM_LANGINFO_CODESET dnl Add the languages which your application supports to po/LINGUAS GETTEXT_PACKAGE=gnokii AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"], [Define to the Gettext package name]) AC_SUBST(GETTEXT_PACKAGE) AM_GLIB_GNU_GETTEXT AM_ICONV dnl ----------------------------- dnl Checks for FreeBSD Build dnl ----------------------------- AC_MSG_CHECKING(if building on FreeBSD) if test `uname -s` = "FreeBSD" ; then AC_MSG_RESULT(yes) CPPFLAGS="$CFLAGS -I/usr/local/include" LDFLAGS="$LDFLAGS -L/usr/local/lib" else AC_MSG_RESULT(no) fi dnl ----------------------------- dnl Checks for NetBSD Build dnl ----------------------------- AC_MSG_CHECKING(if building on NetBSD) if test `uname -s` = "NetBSD" ; then AC_MSG_RESULT(yes) CPPFLAGS="$CFLAGS -I/usr/pkg/include/" LDFLAGS="$LDFLAGS -L/usr/pkg/lib/" else AC_MSG_RESULT(no) fi dnl ======================== Libtool versioning AC_LIBTOOL_WIN32_DLL define([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL]) AC_PROG_LIBTOOL # # Make libtool use --silent when --silent is passed to make # changequote(,)dnl LIBTOOL="${LIBTOOL} \$(shell echo \"\$(MFLAGS)\" | awk '/^[^ ]*s/ { print \"--silent\" }')" changequote([,])dnl GNOKII_LT_VERSION=$GNOKII_LT_VERSION_CURRENT:$GNOKII_LT_VERSION_REVISION:$GNOKII_LT_VERSION_AGE AC_SUBST(GNOKII_LT_VERSION) # As used in common/gnokii.h LIBGNOKII_VERSION_MAJOR=`expr $GNOKII_LT_VERSION_CURRENT - $GNOKII_LT_VERSION_AGE` LIBGNOKII_VERSION_MINOR=$GNOKII_LT_VERSION_AGE LIBGNOKII_VERSION_RELEASE=$GNOKII_LT_VERSION_REVISION LIBGNOKII_VERSION_STRING="$LIBGNOKII_VERSION_MAJOR.$LIBGNOKII_VERSION_MINOR.$LIBGNOKII_VERSION_RELEASE" AC_SUBST(LIBGNOKII_VERSION_MAJOR) AC_SUBST(LIBGNOKII_VERSION_MINOR) AC_SUBST(LIBGNOKII_VERSION_RELEASE) AC_SUBST(LIBGNOKII_VERSION_STRING) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [The current version]) dnl ======================== Default setting dnl Let us have $prefix variable available here test x"$prefix" = xNONE && prefix="$ac_default_prefix" debug="yes" xdebug="yes" rlpdebug="yes" AC_ARG_ENABLE(fulldebug, [ --enable-fulldebug compile with full debugging support], [ if test x$enable_fulldebug = xyes; then if test "x$GCC" = "xyes"; then CFLAGS="$CFLAGS -ggdb3 -Wall" fi fi ] ) dnl AC_ARG_ENABLE(debug, dnl [ --enable-debug compile with debug code], dnl [ if test x$enable_debug = xno; then debug="no"; fi ], dnl [ debug="yes" ] dnl ) debug="yes" AC_ARG_ENABLE(xdebug, [ --enable-xdebug compile with xdebug code], [ if test x$enable_xdebug = xno; then xdebug="no"; fi ], [ xdebug="yes" ] ) AC_ARG_ENABLE(rlpdebug, [ --enable-rlpdebug compile with RLP debug code], [ if test x$enable_rlpdebug = xno; then rlpdebug="no"; fi ], [ rlpdebug="yes" ] ) if test $debug = "yes"; then AC_DEFINE(DEBUG, 1, [Whether debug is turned on]) fi if test $xdebug = "yes"; then AC_DEFINE(XDEBUG, 1, [Whether xdebug is turned on]) fi if test $rlpdebug = "yes"; then AC_DEFINE(RLP_DEBUG, 1, [Whether rlpdebug is turned on]) fi dnl ======================== Set gcc CFLAGS if we use gcc if test "x$GCC" = "xyes"; then CFLAGS="$CFLAGS -Wall" fi dnl ======================== Set some gcc CFLAGS to reduce build warnings if test "x$GCC" = "xyes"; then OLD_CFLAGS="$CFLAGS" CFLAGS="-Wno-pointer-sign" AC_MSG_CHECKING(if gcc supports $CFLAGS compiler option) AC_TRY_COMPILE( [], [ int main() { return 0; } ], ac_cv_have_no_pointer_sign=yes, ac_cv_have_no_pointer_sign=no) AC_MSG_RESULT($ac_cv_have_no_pointer_sign) CFLAGS="-fvisibility=hidden" AC_MSG_CHECKING(if gcc supports $CFLAGS compiler option) AC_TRY_COMPILE( [], [ int main() { return 0; } ], ac_cv_have_hidden_visibility=yes, ac_cv_have_hidden_visibility=no) AC_MSG_RESULT($ac_cv_have_hidden_visibility) CFLAGS="-fno-strict-aliasing" AC_MSG_CHECKING(if gcc supports $CFLAGS compiler option) AC_TRY_COMPILE( [], [ int main() { return 0; } ], ac_cv_have_strict_aliasing=yes, ac_cv_have_strict_aliasing=no) AC_MSG_RESULT($ac_cv_have_strict_aliasing) CFLAGS="$OLD_CFLAGS" if test $ac_cv_have_no_pointer_sign = yes; then CFLAGS="$CFLAGS -Wno-pointer-sign" fi if test $ac_cv_have_hidden_visibility = yes; then CFLAGS="$CFLAGS -fvisibility=hidden" fi if test $ac_cv_have_strict_aliasing = yes; then CFLAGS="$CFLAGS -fno-strict-aliasing" fi fi dnl ======================== avoid deprecated warnings here # CFLAGS="$CFLAGS -DGNOKII_DEPRECATED=''" dnl ======================== Checks for libraries. AC_ARG_WITH(libpthread, [ --with-libpthread=DIR specifies the base libpthread], [ if test x$withval = xyes then AC_MSG_WARN(Usage is: --with-libpthread=DIR) else PTHREAD_LIBS="-L$withval/lib/" PTHREAD_CFLAGS="-I$withval/include/" fi ] ) ACX_PTHREAD if test "x$PTHREAD_CFLAGS" = "x-pthread"; then PTHREAD_LIBS="$PTHREAD_LIBS -pthread" fi dnl FIXME: do we really test here if libc contains this function? if test "x$PTHREAD_LIBS" = xerror; then AC_CHECK_FUNC(pthread_attr_init, PTHREAD_LIBS="", [AC_MSG_WARN(not found library: pthread!!!) AC_MSG_WARN(disabling xgnokii and smsd)]) fi AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_have_tm_gmtoff, [AC_TRY_COMPILE([#include ], [struct tm t; t.tm_gmtoff = 0], ac_cv_have_tm_gmtoff=yes, ac_cv_have_tm_gmtoff=no)]) if test $ac_cv_have_tm_gmtoff = yes; then AC_DEFINE(HAVE_TM_GMTON, 1, [Whether tm_gmtoff is available]) fi AC_CACHE_CHECK(for timer operations, ac_cv_have_timeops, [AC_TRY_LINK([#include ], [struct timeval tv; timerisset(&tv); timerclear(&tv); timercmp(&tv, &tv, <); timeradd(&tv, &tv, &tv); timersub(&tv, &tv, &tv); ], ac_cv_have_timeops=yes, ac_cv_have_timeops=no)]) if test $ac_cv_have_timeops = yes; then AC_DEFINE(HAVE_TIMEOPS, 1, [Whether timer operations are available]) fi have_termios="no" dnl Checking for setspeed in termios.h AC_CACHE_CHECK(for cfsetspeed in termios.h, ac_cv_have_cfsetspeed, [AC_TRY_LINK([#include ], [struct termios t; cfsetspeed(&t, B9600);], ac_cv_have_cfsetspeed=yes, ac_cv_have_cfsetspeed=no)]) if test $ac_cv_have_cfsetspeed = yes; then AC_DEFINE(HAVE_CFSETSPEED, 1, [Whether cfsetspeed is available]) have_termios="yes" fi if test $have_termios = "no"; then AC_CACHE_CHECK(for cfsetispeed and cfsetospeed in termios.h, ac_cv_have_cfsetiospeed, [AC_TRY_LINK([#include ], [struct termios t; cfsetispeed(&t, B9600); cfsetospeed(&t, B9600);], ac_cv_have_cfsetiospeed=yes, ac_cv_have_cfsetiospeed=no)]) if test $ac_cv_have_cfsetiospeed = yes; then AC_DEFINE(HAVE_CFSETISPEED, 1, [Whether cfsetispeed is available]) AC_DEFINE(HAVE_CFSETOSPEED, 1, [Whether cfsetospeed is available]) have_termios="yes" fi fi if test $have_termios = "no"; then AC_CACHE_CHECK(for c_ispeed and c_ospeed in struct termios, ac_cv_have_c_iospeed, [AC_TRY_COMPILE([#include ], [struct termios t; t.c_iflag = B9600; t.c_oflag = B9600;], ac_cv_have_c_iospeed=yes, ac_cv_have_c_iospeed=yes)]) if test ac_cv_have_c_iospeed = yes; then AC_DEFINE(HAVE_TERMIOS_CSPEED, 1, [Whether c_ispeed and c_ospeed are available]) fi fi dnl ======================== readline support # Readline included by default unless explicitly asked not to test "${with_readline+set}" != "set" && with_readline=yes USE_READLINE="no" AC_MSG_CHECKING(whether to use readline) AC_ARG_WITH(readline, [ --with-readline[=DIR] Look for readline include/libs in DIR --without-readline Don't include readline support], [ case "$with_readline" in yes) AC_MSG_RESULT(yes) AC_CHECK_HEADERS(readline.h history.h readline/readline.h) AC_CHECK_HEADERS(readline/history.h) AC_CHECK_HEADERS(readline.h readline/readline.h,[ for termlib in ncurses curses termcap terminfo termlib; do AC_CHECK_LIB(${termlib}, tgetent, [TERMLIBS="-l${termlib}"; break]) done AC_CHECK_LIB(readline, readline, [TERMLIBS="-lreadline $TERMLIBS" AC_DEFINE([HAVE_READLINE], [1], [Use readline]) USE_READLINE="yes" break], [TERMLIBS=], $TERMLIBS)]) ;; no) AC_MSG_RESULT(no) ;; *) AC_MSG_RESULT(yes) # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at # alternate readline path _ldflags=${LDFLAGS} _cppflags=${CPPFLAGS} # Add additional search path LDFLAGS="-L$with_readline/lib $LDFLAGS" CPPFLAGS="-I$with_readline/include $CPPFLAGS" AC_CHECK_HEADERS(readline.h history.h readline/readline.h) AC_CHECK_HEADERS(readline/history.h) AC_CHECK_HEADERS(readline.h readline/readline.h,[ for termlib in ncurses curses termcap terminfo termlib; do AC_CHECK_LIB(${termlib}, tgetent, [TERMLIBS="-l${termlib}"; break]) done AC_CHECK_LIB(readline, readline, [TERMLDFLAGS="-L$with_readline/lib" TERMCPPFLAGS="-I$with_readline/include" CPPFLAGS="-I$with_readline/include $CPPFLAGS" TERMLIBS="-lreadline $TERMLIBS" AC_DEFINE([HAVE_READLINE], [1], [Use readline]) USE_READLINE="yes" break], [TERMLIBS= CPPFLAGS=$_cppflags], $TERMLIBS)]) LDFLAGS=$_ldflags ;; esac], AC_MSG_RESULT(no) ) AC_SUBST(TERMLIBS) AC_SUBST(TERMLDFLAGS) dnl ======================== Check for libical AC_ARG_WITH(libical, [ --with-libical=DIR specifies the base libical], [ if test x$withval = xyes then AC_MSG_WARN(Usage is: --with-libical=DIR) else ICAL_LIBS="-L$withval/lib/" ICAL_CFLAGS="-I$withval/include/" fi ] ) USE_LIBICAL="no" AC_ARG_ENABLE(libical, AC_HELP_STRING([--disable-libical], [disable libical support (default is autodetected)] ),, [enable_libical=yes]) if test "$enable_libical" = "yes"; then ICAL_LIBS="$ICAL_LIBS -lpthread -lical" OLD_CFLAGS="$CFLAGS" OLD_LIBS="$LIBS" LIBS="$LIBS $ICAL_LIBS" CFLAGS="$CFLAGS $ICAL_CFLAGS" AC_MSG_CHECKING(whether libical is installed) AC_TRY_LINK([ #include ],[ int priority; icalcomponent *pIcal=NULL; struct icaltimetype atime = icaltime_from_string("20031231T223000"); pIcal = icalcomponent_vanew( ICAL_VCALENDAR_COMPONENT, icalproperty_new_version("2.0"), icalproperty_new_prodid("//Gnokii.org//NONSGML v.0.5.8"), 0 ); atime.is_daylight = 1; priority = icalproperty_get_priority(icalcomponent_get_first_property(pIcal, ICAL_PRIORITY_PROPERTY)); ], [ AC_MSG_RESULT(yes) USE_LIBICAL="yes" AC_DEFINE([HAVE_LIBICAL],[1],[Use libical]) AC_SUBST(ICAL_LIBS) AC_SUBST(ICAL_CFLAGS) ], [ AC_MSG_RESULT(no) ICAL_LIBS="" ] ) LIBS="$OLD_LIBS" CFLAGS="$OLD_CFLAGS" fi dnl ======================== Check for libusb USE_LIBUSB="no" AC_ARG_ENABLE(libusb, AC_HELP_STRING([--disable-libusb], [disable libusb support (default is autodetected)] ),, [enable_libusb=yes]) if test "$enable_libusb" = "yes"; then AC_MSG_CHECKING(whether libusb is installed) AC_TRY_COMPILE([#include ], [struct usb_dev_handle *dev;], [ AC_MSG_RESULT(yes) AC_DEFINE([HAVE_LIBUSB],[1],[Use libusb]) USE_LIBUSB="yes" USB_LIBS="-lusb" AC_SUBST(USB_LIBS) ], [ AC_MSG_RESULT(no) ] ) fi dnl ======================== Checks for Linux Phonet support USE_SOCKETPHONET="no" AC_ARG_ENABLE(phonet, AC_HELP_STRING([--disable-phonet], [disable phonet support (default is autodetected)] ),, [enable_phonet=yes]) if test "$enable_phonet" = "yes"; then AC_CHECK_HEADER(linux/phonet.h, [AC_DEFINE(HAVE_SOCKETPHONET, 1, [Whether Phonet is available]) USE_SOCKETPHONET="yes"],, [#include #include ]) fi dnl ======================== Checks for gethostbyname support AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, gethostbyname, TCP_LIBS="-lnsl" AC_SUBST(TCP_LIBS))) dnl Haiku requires -lnetwork for socket functions AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(network, gethostbyname, TCP_LIBS="-lnetwork" AC_SUBST(TCP_LIBS))) dnl ======================== Checks for Linux IrDA support USE_IRDA="no" AC_ARG_ENABLE(irda, AC_HELP_STRING([--disable-irda], [disable irda support (default is autodetected)] ),, [enable_irda=yes]) if test "$enable_irda" = "yes"; then AC_CHECK_HEADER(linux/irda.h, [AC_DEFINE(HAVE_IRDA, 1, [Whether IrDA is available]) USE_IRDA="yes"],, [#include #include #include ]) fi dnl ======================== Defines location for gettext AC_ARG_WITH(gettext, [ --with-gettext=DIR specifies the base gettext], [ if test x$withval = xyes; then AC_MSG_WARN(Usage is: --with-gettext=DIR) else CFLAGS="$CFLAGS -I$withval" fi ] ) dnl ======================== Checks for Bluetooth support USE_BLUETOOTH="no" AC_ARG_WITH(bluetooth, [ --with-bluetooth=DIR specifies the base libbluetooth], [ if test x$withval = xyes; then AC_MSG_WARN(Usage is: --with-bluetooth=DIR) else LIBS="$LIBS -L$withval/lib" CFLAGS="$CFLAGS -I$withval/net -I$withval/" fi ] ) AC_ARG_ENABLE(bluetooth, AC_HELP_STRING([--disable-bluetooth], [disable Bluetooth support (default is autodetected)] ),, [enable_bluetooth=yes]) dnl ======================== Checks for Linux Bluetooth support if test `uname -s` = "Linux" ; then if test "$enable_bluetooth" = "yes" -a "$USE_BLUETOOTH" = "no"; then AC_MSG_NOTICE([checking for the Linux Bluetooth support]) AC_CACHE_CHECK(for the struct sockaddr_rc in , ac_cv_have_sockaddr_rc, [AC_TRY_COMPILE([#include #include #include ], [struct sockaddr_rc rc;], ac_cv_have_sockaddr_rc=yes, ac_cv_have_sockaddr_rc=no)]) if test $ac_cv_have_sockaddr_rc = yes; then AC_DEFINE(HAVE_BLUETOOTH, 1, [Whether Bluetooth is available]) AC_DEFINE(HAVE_BLUETOOTH_BLUEZ,[],[Compile on Linux]) USE_BLUETOOTH="yes" BLUETOOTH_LIBS="-lbluetooth" AC_SUBST(BLUETOOTH_LIBS) fi fi fi dnl ======================== Checks for MacOSX Bluetooth support if test `uname -s` = "Darwin" ; then if test "$enable_bluetooth" = "yes" -a "$USE_BLUETOOTH" = "no"; then AC_MSG_NOTICE([checking for the MacOS X Bluetooth support]) AC_CHECK_HEADERS(CoreFoundation/CoreFoundation.h) AC_CHECK_HEADERS(IOBluetooth/Bluetooth.h) AC_CHECK_HEADERS([IOBluetooth/IOBluetoothUserLib.h], [], [], [[#ifdef HAVE_COREFOUNDATION_COREFOUNDATION_H # include #endif #ifdef HAVE_IOBLUETOOTH_BLUETOOTH_H # include #endif ]]) AC_TRY_COMPILE([#include #include #include ], [CFStringRef strDevice; strDevice = CFStringCreateWithCString(NULL, NULL, NULL); IOBluetoothNSStringToDeviceAddress(NULL, NULL);], ac_cv_have_iobluetooth=yes, ac_cv_have_iobluetooth=no) if test $ac_cv_have_iobluetooth = yes; then AC_DEFINE(HAVE_BLUETOOTH, 1, [Whether Bluetooth is available]) AC_DEFINE(HAVE_BLUETOOTH_MACOSX,[],[Compile on Darwin / Mac OSX]) USE_BLUETOOTH="yes" BLUETOOTH_LIBS="$PTHREAD_LIBS -Wl,-framework,CoreFoundation -Wl,-framework,IOBluetooth -Wl,-framework,Foundation" AC_SUBST(BLUETOOTH_LIBS) fi fi fi dnl ======================== Checks for FreeBSD/netgraph Bluetooth support if test `uname -s` = "FreeBSD" ; then if test "$enable_bluetooth" = "yes" -a "$USE_BLUETOOTH" = "no"; then AC_MSG_NOTICE([checking for the FreeBSD/netgraph Bluetooth support]) AC_CACHE_CHECK(for the struct sockaddr_rfcomm from , ac_cv_have_sockaddr_rfcomm, [AC_TRY_COMPILE([#include ], [struct sockaddr_rfcomm rc;], ac_cv_have_sockaddr_rfcomm=yes, ac_cv_have_sockaddr_rfcomm=no)]) if test $ac_cv_have_sockaddr_rfcomm = yes; then AC_DEFINE(HAVE_BLUETOOTH, 1, [Whether Bluetooth is available]) AC_DEFINE(HAVE_BLUETOOTH_NETGRAPH, [], [Compile on FreeBSD]) USE_BLUETOOTH="yes" AC_CHECK_LIB(bluetooth, bt_aton, [BLUETOOTH_LIBS="-lbluetooth" ac_cv_have_bt_lib=yes], ac_cv_have_bt_lib=no) if test $ac_cv_have_bt_lib = yes; then AC_CHECK_LIB(sdp, sdp_open, [BLUETOOTH_LIBS="$BLUETOOTH_LIBS -lsdp"]) AC_SUBST(BLUETOOTH_LIBS) fi fi fi fi dnl ======================== Checks for NetBSD/netbt Bluetooth support if test `uname -s` = "NetBSD" ; then if test "$enable_bluetooth" = "yes" -a "$USE_BLUETOOTH" = "no"; then AC_MSG_NOTICE([checking for the NetBSD/netbt Bluetooth support]) AC_CACHE_CHECK(for the struct sockaddr_bt from , ac_cv_have_sockaddr_bt, [AC_TRY_COMPILE([#include ], [struct sockaddr_bt rc;], ac_cv_have_sockaddr_bt=yes, ac_cv_have_sockaddr_bt=no)]) if test $ac_cv_have_sockaddr_bt = yes; then AC_DEFINE(HAVE_BLUETOOTH, 1, [Whether Bluetooth is available]) AC_DEFINE(HAVE_BLUETOOTH_NETBT, [], [Compile on NetBSD]) USE_BLUETOOTH="yes" CFLAGS="$CFLAGS -DCOMPAT_BLUEZ" AC_CHECK_LIB(bluetooth, bt_aton, [BLUETOOTH_LIBS="-lbluetooth" ac_cv_have_bt_lib=yes], ac_cv_have_bt_lib=no) if test $ac_cv_have_bt_lib = yes; then AC_CHECK_LIB(sdp, sdp_open, [BLUETOOTH_LIBS="$BLUETOOTH_LIBS -lsdp"]) AC_SUBST(BLUETOOTH_LIBS) fi fi fi fi dnl ======================== Checks for X base support PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.0, found_gtk=yes, found_gtk=no) if test "$no_x" = yes -o "$with_x" = "no"; then x_support="no" XPM_CFLAGS="" XPM_LIBS="" GTK_CFLAGS="" GTK_LIBS="" else AC_PATH_X if test "x$x_libraries" = "xNONE"; then x_support="no" XPM_CFLAGS="" XPM_LIBS="" GTK_CFLAGS="" GTK_LIBS="" AC_MSG_WARN(Cannot find library libX11.) AC_MSG_WARN(Disabling xgnokii.) else if test "x$x_includes" != "x"; then XINCL="-I$x_includes" else XINCL="" fi if test "x$x_libraries" != "x"; then XLIBS="-L$x_libraries" else XLIBS="" fi CPPFLAGS="$CPPFLAGS $XINCL" AC_CHECK_HEADERS(X11/xpm.h, [ AC_CHECK_LIB(Xpm, XpmWriteFileFromXpmImage, [ XPM_CFLAGS="$XINCL" XPM_LIBS="$XLIBS -lXpm -lX11" AC_DEFINE(XPM, 1, [Whether the Xpm library is available]) ], AC_MSG_WARN(Cannot found library libXpm - disabling XPM support.), [ $XLIBS -lX11 ] ) ] ) if test "x$PTHREAD_LIBS" = xerror; then x_support="no" GTK_CFLAGS="" GTK_LIBS="" else if test "$found_gtk" = no; then x_support="no" GTK_CFLAGS="" GTK_LIBS="" AC_MSG_WARN(Cannot find GTK+ 2.0.) AC_MSG_WARN(Disabling xgnokii.) else x_support="yes" fi fi fi fi AM_CONDITIONAL(XGNOKII, test "x$_support" = "xyes") dnl ======================== Check for libsocket AC_CHECK_LIB(socket, socket) dnl ======================== Checks for glib support for libgnokii and smsd PKG_CHECK_MODULES(GLIB, glib-2.0) dnl ======================== Checks for gmodule support for smsd PKG_CHECK_MODULES(GMODULE, gmodule-2.0, found_gmodule=yes, found_gmodule=no) dnl ======================== Autodetect for possibilities to compile smsd AC_ARG_ENABLE(smsd, AC_HELP_STRING([--disable-smsd], [disable smsd support (default is autodetected)]),, [enable_smsd=yes]) if test "$enable_smsd" = yes; then if test "$found_gmodule" = no; then AC_MSG_WARN(Cannot find gmodule 2.0.) AC_MSG_WARN(Disabling smsd.) enable_smsd="no" fi fi AM_CONDITIONAL(SMSD, test "x$enable_smsd" = "xyes") dnl ======================== Checks for databases support for smsd dnl === PostgreSQL AC_ARG_ENABLE(postgres, AC_HELP_STRING([--disable-postgres], [disable PostgreSQL support (default is autodetected)]), [enable_postgres=$enableval], [enable_postgres=yes]) have_postgres=no AC_PATH_PROG(PGCONFIG, pg_config, no) if test x$enable_postgres != xno && test x$PGCONFIG != xno ; then have_postgres=yes pg_libdir=`$PGCONFIG --libdir` POSTGRES_LIBS="-L$pg_libdir -lpq" pg_includedir=`$PGCONFIG --includedir` POSTGRES_CFLAGS="-I$pg_includedir" AC_SUBST(POSTGRES_LIBS) AC_SUBST(POSTGRES_CFLAGS) fi AM_CONDITIONAL(HAVE_POSTGRES, test "x$have_postgres" = "xyes") dnl === SQLite AC_ARG_ENABLE(sqlite, AC_HELP_STRING([--disable-sqlite], [disable SQLite support (default is autodetected)]), [enable_sqlite=$enableval], [enable_sqlite=yes]) have_sqlite=no PKG_CHECK_MODULES(SQLITE3, sqlite3, have_sqlite=yes, have_sqlite=no) if test x$enable_sqlite != xno && test x$PKGCONF != xno ; then SQLITE_LIBS=SQLITE3_LIBS dnl SQLITE_CFLAGS=SQLITE3_CFLAGS AC_SUBST(SQLITE_LIBS) AC_SUBST(SQLITE_CFLAGS) fi AM_CONDITIONAL(HAVE_SQLITE, test "x$have_sqlite" = "xyes") dnl === MySQL AC_ARG_ENABLE(mysql, AC_HELP_STRING([--disable-mysql], [disable MySQL support (default is autodetected)]), [enable_mysql=$enableval], [enable_mysql=yes]) have_mysql=no dnl Prefer mysql_config5 if it is installed AC_PATH_PROG(MYSQLCONFIG5, mysql_config5, no) if test x$MYSQLCONFIG5 = xno ; then AC_PATH_PROG(MYSQLCONFIG, mysql_config, no) else MYSQLCONFIG=$MYSQLCONFIG5 fi if test x$enable_mysql != xno && test x$MYSQLCONFIG != xno ; then have_mysql=yes MYSQL_LIBS=`$MYSQLCONFIG --libs` MYSQL_CFLAGS=`$MYSQLCONFIG --cflags` AC_SUBST(MYSQL_LIBS) AC_SUBST(MYSQL_CFLAGS) fi AM_CONDITIONAL(HAVE_MYSQL, test "x$have_mysql" = "xyes") dnl ======================== Additional switches AC_ARG_ENABLE(security, [ --enable-security enable all security features @<:@default=no@:>@], [ if test x$enable_security = xyes; then AC_DEFINE(SECURITY, 1, [Whether security features are enabled]) security="yes" else security="no" fi ], [ security="no" ] ) dnl ======================== Checks for libpcsclite USE_LIBPCSCLITE="no" AC_ARG_ENABLE(libpcsclite, AC_HELP_STRING([--disable-libpcsclite], [disable libpcsclite support (default is autodetected)] ),, [enable_libpcsclite=yes]) if test "$enable_libpcsclite" = "yes"; then PKG_CHECK_MODULES(LIBPCSCLITE, libpcsclite >= 1.3.1, USE_LIBPCSCLITE=yes, USE_LIBPCSCLITE=no) if test "$USE_LIBPCSCLITE" = yes; then AC_DEFINE([HAVE_PCSC], [1], [Define if you have libpcsclite]) OLD_CFLAGS="$CFLAGS" CFLAGS="$LIBPCSCLITE_CFLAGS $OLD_CFLAGS" AC_CHECK_TYPE([LPCSTR], [AC_DEFINE([HAVE_LPCSTR], 1, [Define to 1 if libpcsclite defines the type 'LPCSTR'.])], [], [#include ]) CFLAGS="$OLD_CFLAGS" fi fi AC_ARG_ENABLE(win, [ --enable-win if you want Windows support ], [ if test x$enable_win32 = xyes; then AC_DEFINE(WIN32, 1, [Whether compiling on Windows]) WIN32=1 if test x$cross_compiling = xyes; then AC_DEFINE(WIN32_CROSS, 1, [Define if you cross compile Windows.]) WIN32_CROSS=1 win32="cross" else win32="yes" fi AC_CHECK_HEADER(af_irda.h, [AC_DEFINE(HAVE_IRDA, 1, [Whether IrDA is available]) USE_IRDA="yes"]) else win32="no" fi ], [ win32="no"] ) AM_CONDITIONAL(WIN32, test "x$WIN32" = "x1") AC_ARG_ENABLE(unix98test, [ --enable-unix98test if you want to disable UNIX98 test and assume to use it; default is enabled], [ if test x$enable_unix98test = xno; then unix98test="no" else unix98test="yes" fi ], [ unix98test="yes"] ) if test x$unix98test = xyes; then AC_CHECK_FUNC(grantpt, [ AC_TRY_RUN([ #define _XOPEN_SOURCE 500 #include #include #include #include #include int main() { char *name = NULL; int master, err; master = open("/dev/ptmx", O_RDWR | O_NOCTTY | O_NONBLOCK); if (master >= 0) { err = grantpt(master); err = err || unlockpt(master); if (!err) { name = ptsname(master); } else { exit(-1); } } else { exit(-1); } close(master); exit(0); } ], have_unix98=yes, AC_MSG_WARN("No unix98ptys"), have_unix98=yes) ] ) fi if test x$have_unix98 = xyes; then AC_DEFINE(USE_UNIX98PTYS, 1, [Whether Unix98 support is available]) fi AC_TRY_COMPILE( [#define _XOPEN_SOURCE 500 #include #include ], [struct msghdr msg; msg.msg_control;], AC_DEFINE(HAVE_MSGHDR_MSG_CONTROL, 1, [Whether struct msghdr has a msg_control member]) ) dnl ======================== Checks for header files. AC_HEADER_STDC AC_HEADER_STDBOOL AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/time.h unistd.h sys/file.h) AC_CHECK_HEADERS(string.h strings.h ctype.h stdlib.h stdarg.h stdint.h) AC_CHECK_HEADERS(stddef.h sys/socket.h sys/modem.h termios.h sys/filio.h) AC_CHECK_HEADERS(inttypes.h wchar.h direct.h sys/param.h dirent.h sys/types.h) dnl ======================== Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_C_INLINE AC_TYPE_PID_T AC_TYPE_SIZE_T AC_HEADER_TIME AC_STRUCT_TM AC_CHECK_TYPE([u_int8_t], [AC_DEFINE([HAVE_U_INT8_T], 1, [Define to 1 if the system has the type 'u_int8_t'.])]) dnl we don't check for long double and long long int, only dnl ancient platforms don't have them AC_DEFINE(HAVE_LONG_LONG, 1, [Whether the platform has a long long int type]) AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Whether the platform has a long double type]) AC_CACHE_CHECK(for __ptr_t, ac_cv_c___ptr_t, [AC_TRY_COMPILE([#include ], [__ptr_t foo = NULL;], ac_cv_c___ptr_t=yes, ac_cv_c___ptr_t=no)]) if test $ac_cv_c___ptr_t = yes; then AC_DEFINE(HAVE_PTR_T, 1, [Whether __ptr_t is available]) fi dnl ======================== Checks for library functions. AC_PROG_GCC_TRADITIONAL AC_FUNC_MEMCMP AC_TYPE_SIGNAL AC_FUNC_STRFTIME AC_CHECK_FUNCS(mktime timegm gettimeofday select poll wcrtomb) AC_CHECK_FUNCS(strchr strdup strndup strstr strtol strtok strsep) AC_CHECK_FUNCS(asprintf vasprintf snprintf vsnprintf getpass setenv) AC_CACHE_CHECK(for ISO C99 compliant snprintf,ac_cv_func_snprintf_c99, [AC_TRY_RUN([ #include int main() { char buf[] = {0, 0, 0, 0}; snprintf(buf, 3, "ABC"); exit ((buf[2] != 0) || (snprintf(NULL, 0, "%d", 100) != 3)); }],ac_cv_func_snprintf_c99=yes,ac_cv_func_snprintf_c99=no,ac_cv_func_snprintf_c99=no)]) if test $ac_cv_func_snprintf_c99 = yes; then AC_DEFINE(HAVE_C99_SNPRINTF, 1, [Whether snprintf is available]) fi AC_CACHE_CHECK(for ISO C99 compliant vsnprintf,ac_cv_func_vsnprintf_c99, [AC_TRY_RUN([ #include #include int doit(char *buf, int len, const char *s, ...) { va_list ap; int r; va_start(ap, s); r = vsnprintf(buf, len, s, ap); va_end(ap); return r; } int main() { char buf[] = {0, 0, 0, 0}; doit(buf, 3, "ABC"); exit ((buf[2] != 0) || (doit(NULL, 0, "%d", 100) != 3)); }],ac_cv_func_vsnprintf_c99=yes,ac_cv_func_vsnprintf_c99=no,ac_cv_func_vsnprintf_c99=no)]) if test $ac_cv_func_vsnprintf_c99 = yes; then AC_DEFINE(HAVE_C99_VSNPRINTF, 1, [Whether vsnprintf is available]) fi CFLAGS="$CFLAGS $NLS_CFLAGS" LIBS="$LIBS $NLS_LIBS" XPACKAGE=xgnokii AC_DEFINE_UNQUOTED(XVERSION, "$XVERSION", [The current xgnokii version]) HAVE_XGNOKII=$x_support AC_DEFINE_UNQUOTED(SVERSION, "$SVERSION", [The current SMSD version]) case "$INSTALL" in 'config/install-sh -c') INSTALL=`pwd`/$INSTALL ;; esac SHELL=${CONFIG_SHELL-/bin/sh} AC_SUBST(SHELL) case "$build_os" in solaris*) SHELL=/bin/ksh ;; esac AC_EXPAND_DIR(mgnokiidev_bindir, "${sbindir}") AC_DEFINE_UNQUOTED(SBINDIR, "$mgnokiidev_bindir", [Where mgnokiidev gets installed]) AC_EXPAND_DIR(prefix_dir, "${prefix}") AC_DEFINE_UNQUOTED(PREFIX, "$prefix_dir", [Root dir for gnokii, xgnokii and smsd]) AC_CONFIG_HEADERS([include/config.h]) AC_SUBST(PACKAGE) AC_SUBST(VERSION) AC_SUBST(XVERSION) AC_SUBST(XPACKAGE) AC_SUBST(exec_prefix) AC_SUBST(GLDFLAGS) AC_SUBST(PTHREAD_CFLAGS) AC_SUBST(PTHREAD_LIBS) AC_SUBST(OWN_GETOPT) AC_SUBST(USE_UNIX98PTYS) AC_SUBST(NEED_LOCALE_CHARSET) AC_SUBST(LIBS) AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_LIBS) AC_SUBST(XPM_CFLAGS) AC_SUBST(XPM_LIBS) AC_SUBST(HAVE_XGNOKII) AC_SUBST(WIN32) AC_SUBST(WIN32_CROSS) AC_SUBST(HAVE_LIBICAL) AC_SUBST(HAVE_LIBUSB) AC_SUBST(HAVE_SOCKETPHONET) AC_OUTPUT( Makefile getopt/Makefile Docs/Makefile Docs/man/Makefile Docs/protocol/Makefile Docs/sample/Makefile Docs/sample/logo/Makefile Docs/sample/vCalendar/Makefile Docs/sample/ringtone/Makefile Docs/sample/ppp/Makefile include/Makefile include/gnokii.h include/data/Makefile include/devices/Makefile include/phones/Makefile include/links/Makefile include/gnokii/Makefile common/gnokii.pc common/Makefile common/data/Makefile common/devices/Makefile common/links/Makefile common/phones/Makefile gnokii/Makefile gnokiid/Makefile smsd/Makefile utils/Makefile xgnokii/xgnokii.pc xgnokii/Makefile xgnokii/xpm/Makefile po/Makefile.in testsuite/Makefile testsuite/data/Makefile Windows/Makefile ) dnl ======================== Final report echo " G N O K I I A toolset and driver for the mobile phones. Copyright (C) 1999-2011 The Gnokii Development Team. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. See file COPYING for more details. Host system: $host_os Gnokii version: $VERSION Xgnokii version: $XVERSION SMSD version: $SVERSION X (GTK+) support: $x_support smsd support: $enable_smsd Postgres support: $have_postgres SQLite support: $have_sqlite MySQL support: $have_mysql Debug: $debug XDebug: $xdebug RLPDebug: $rlpdebug NLS: $USE_NLS IrDA: $USE_IRDA ical read support: $USE_LIBICAL Bluetooth: $USE_BLUETOOTH libusb support: $USE_LIBUSB phonet support: $USE_SOCKETPHONET libpcsclite support:$USE_LIBPCSCLITE readline support: $USE_READLINE Security: $security Build Shared Lib: $enable_shared Build Static Lib: $enable_static Windows: $win32 Prefix: $prefix Type '${MAKE}' for compilation and then '${MAKE} install', to install gnokii. " gnokii-0.6.31/missing0000755000175000017500000002623311500011217012572 0ustar leoleo#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2009-04-28.21; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # 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. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; tar*) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar*) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: gnokii-0.6.31/Docs/0000755000175000017500000000000011666163460012102 5ustar leoleognokii-0.6.31/Docs/README-WINDOWS0000644000175000017500000001053211666163117014112 0ustar leoleoREADME-WINDOWS ============== The graphical X version, the AT-emulator and virtual device are not ported to Windows. This might change in the future but as far as I know no work is in progress. Of course the effort of porting only makes sense if there is a need. Do you have the need for extended Windows functionality don't ask me but let us all know on the gnokii mailing list. Recent Windows-related information is updated on the gnokii wiki. The main Windows page is: http://wiki.gnokii.org/index.php/Windows Compile using Microsoft Visual C++ 2010 Express Edition ======================================================= Below a description how to compile gnokii with the Microsoft Visual C++ 2010 Express Edition. 1) Extract gnokii source into 2) (optional) Build settings are in \Windows\MSVC2010Express\config.h you may edit that. 2) Read \Windows\MSVS2011Express\README to install additional libraries required to compile. 3) Open \Windows\MSVS2011Express\gnokii.sln and compile :) Distributed gnokii binaries for Windows are built with this compiler. Compile using Microsoft Visual Studio 2005 ========================================== Below a description how to compile gnokii with the Microsoft Visual Studio 2005 C/C++. Both the commercial MSVS 2005 or MS Visual C++ 2005 Express Edition do work. 1) Extract gnokii source into 2) (optional) Build settings are in \Windows\MSVS2005\config.h you may edit that. 3) Open \Windows\MSVS2005\gnokii.sln and compile :) The solution will contain three projects: gnokii.dll, gnokii.exe and setup. The setup build will fail on Visual C++ Express edition as the setup tools are available only in the commercial Visual Studio. You may want to change the compiler run-time library settings to single threaded / debug single threaded to have much smaller binaries. Compile using Microsoft Visual C++ 4.2 and 6.0 ============================================== Current versions do not compile. Maintainers chose not to support these compilers. Microsoft don't support those either. There are free of charge alternatives available from Microsoft. Compile with Cygwin (B20) ========================= Current versions do not compile. This is on a TODO list and will be supported on later versions. Cross compiling with MinGW ========================== Current versions do not compile. This is on a TODO list and will be supported on later versions. Configuring gnokii ================== Current versions attempt to read the config file from: 1. Application installation directory: %APPDATA%\gnokii\gnokii.ini 2. User's home directory: %HOMEDRIVE%\%HOMEPATH%\gnokii.ini 3. Windows installation directory: %SYSTEMROOT%\gnokii.ini First being found (the lookup order is as above) is used. Three values are required in the config file for gnokii to work: port, model and connection. See the comments in the config file for further information. In Windows the port is always a Com-port, a hard wired or virtual. See the README-files for correct phone model number. See the README-files for correct connection cable type. Example: port = com5: model = 6510 connection = dlr3p gnokii wiki has example configurations for various handsets at http://wiki.gnokii.org/index.php/Config IrDA support for Windows ======================== gnokii does support IrDA connection on Windows system. The support is built in as default. You will need Nokia IrDA driver for this to work, it is in Nokia PC Suite software package. The driver will create a virtual Com-port when phone is near the PC. If you want to disable the IrDA do the following: 1) Disable IrDA support in config.h file (see above) by replacing a line: #define HAVE_IRDA 1 with #undef HAVE_IRDA 2) Build gnokii as described above Bluetooth support for Windows ============================= gnokii does support Bluetooth connection on Windows system. The support is built in as default. Please note that it supports only MS bluetooth stack. If you want to disable the Bluetooth do the following: 1) Disable Bluetooth support in config.h file (see above) by replacing a line: #define HAVE_BLUETOOTH 1 with #undef HAVE_BLUETOOTH 2) Build gnokii as described above Disclaimer ========== No warranty, you are on your own. If you have questions or remarks, please let me know on my email address mentioned below. Maintainer: Jari Turkia gnokii-0.6.31/Docs/Makefile.am0000644000175000017500000000113311666163117014133 0ustar leoleoSUBDIRS = man sample protocol docsdir = $(datadir)/doc/gnokii DEVEL_DOCS = CodingStyle \ README.libsms docs_DATA = README \ README-2110 \ README-3810 \ README-6110 \ README-6510 \ README-7110 \ README-DKU2 \ README-MacOSX \ README-PCSC \ README-WINDOWS \ README-dancall \ README-ericsson \ README-siemens \ README-Symbian \ CREDITS \ Bugs \ DataCalls-QuickStart \ FAQ \ KNOWN_BUGS \ gettext-howto \ gnokii.nol \ gnokii-hackers-howto \ gnokii-ir-howto \ gnokii-IrDA-Linux \ ringtones.txt \ logos.txt \ $(DEVEL_DOCS) EXTRA_DIST = $(docs_DATA) gnokii-0.6.31/Docs/Makefile.in0000644000175000017500000005314311666163210014146 0ustar leoleo# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = Docs DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_expand_dir.m4 \ $(top_srcdir)/m4/acx_pthread.m4 $(top_srcdir)/m4/intltool.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(docsdir)" DATA = $(docs_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLUETOOTH_LIBS = @BLUETOOTH_LIBS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FIND = @FIND@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLDFLAGS = @GLDFLAGS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GMODULE_CFLAGS = @GMODULE_CFLAGS@ GMODULE_LIBS = @GMODULE_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GNOKII_LT_VERSION = @GNOKII_LT_VERSION@ GNOKII_LT_VERSION_AGE = @GNOKII_LT_VERSION_AGE@ GNOKII_LT_VERSION_CURRENT = @GNOKII_LT_VERSION_CURRENT@ GNOKII_LT_VERSION_REVISION = @GNOKII_LT_VERSION_REVISION@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_LIBICAL = @HAVE_LIBICAL@ HAVE_LIBUSB = @HAVE_LIBUSB@ HAVE_SOCKETPHONET = @HAVE_SOCKETPHONET@ HAVE_XGNOKII = @HAVE_XGNOKII@ ICAL_CFLAGS = @ICAL_CFLAGS@ ICAL_LIBS = @ICAL_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBGNOKII_VERSION_MAJOR = @LIBGNOKII_VERSION_MAJOR@ LIBGNOKII_VERSION_MINOR = @LIBGNOKII_VERSION_MINOR@ LIBGNOKII_VERSION_RELEASE = @LIBGNOKII_VERSION_RELEASE@ LIBGNOKII_VERSION_STRING = @LIBGNOKII_VERSION_STRING@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBPCSCLITE_CFLAGS = @LIBPCSCLITE_CFLAGS@ LIBPCSCLITE_LIBS = @LIBPCSCLITE_LIBS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKE = @MAKE@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ MYSQLCONFIG = @MYSQLCONFIG@ MYSQLCONFIG5 = @MYSQLCONFIG5@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_LIBS = @MYSQL_LIBS@ NEED_LOCALE_CHARSET = @NEED_LOCALE_CHARSET@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OWN_GETOPT = @OWN_GETOPT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PGCONFIG = @PGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSTGRES_CFLAGS = @POSTGRES_CFLAGS@ POSTGRES_LIBS = @POSTGRES_LIBS@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LIBS = @SQLITE3_LIBS@ SQLITE_CFLAGS = @SQLITE_CFLAGS@ SQLITE_LIBS = @SQLITE_LIBS@ STRIP = @STRIP@ TCP_LIBS = @TCP_LIBS@ TERMLDFLAGS = @TERMLDFLAGS@ TERMLIBS = @TERMLIBS@ USB_LIBS = @USB_LIBS@ USE_NLS = @USE_NLS@ USE_UNIX98PTYS = @USE_UNIX98PTYS@ VERSION = @VERSION@ WIN32 = @WIN32@ WIN32_CROSS = @WIN32_CROSS@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ XPACKAGE = @XPACKAGE@ XPM_CFLAGS = @XPM_CFLAGS@ XPM_LIBS = @XPM_LIBS@ XVERSION = @XVERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ acx_pthread_config = @acx_pthread_config@ 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@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = man sample protocol docsdir = $(datadir)/doc/gnokii DEVEL_DOCS = CodingStyle \ README.libsms docs_DATA = README \ README-2110 \ README-3810 \ README-6110 \ README-6510 \ README-7110 \ README-DKU2 \ README-MacOSX \ README-PCSC \ README-WINDOWS \ README-dancall \ README-ericsson \ README-siemens \ README-Symbian \ CREDITS \ Bugs \ DataCalls-QuickStart \ FAQ \ KNOWN_BUGS \ gettext-howto \ gnokii.nol \ gnokii-hackers-howto \ gnokii-ir-howto \ gnokii-IrDA-Linux \ ringtones.txt \ logos.txt \ $(DEVEL_DOCS) EXTRA_DIST = $(docs_DATA) all: all-recursive .SUFFIXES: $(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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Docs/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Docs/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 $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-docsDATA: $(docs_DATA) @$(NORMAL_INSTALL) test -z "$(docsdir)" || $(MKDIR_P) "$(DESTDIR)$(docsdir)" @list='$(docs_DATA)'; test -n "$(docsdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docsdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(docsdir)" || exit $$?; \ done uninstall-docsDATA: @$(NORMAL_UNINSTALL) @list='$(docs_DATA)'; test -n "$(docsdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(docsdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(docsdir)" && rm -f $$files # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(docsdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-docsDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-docsDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean 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-docsDATA install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am uninstall-docsDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gnokii-0.6.31/Docs/README-65100000644000175000017500000000477511666163117013367 0ustar leoleo-- README-6510 -- -- Notes, bugs and a todo list for the 6510 series -- * Notes * First of all, tested with this driver so far are: * 6510 * 8310 * 6310 * 6310i * 6360 * 6610 * 6100 * 5100 * 3510 * 3510i * 3595 * 6800 * 6810 * 6820 * 6820b * 6610i * 6230 * 6650 * 7210 * 7250 * 7250i * 7600 * 6170 * 6020 * 6230i All Nokia Series40 phones should work with this driver. Code for the 6510 phones has been tested with DAU-9P and DLR-3P cables and IrDA connection. The following conection type values are recommended for the various connection media: ----------------------------------------- | Media | Connection type | |---------------------------------------| | dau9p | dau9p or serial | | dlr3p | dlr3p | | IrDA | irda | | Bluetooth | bluetooth | | USB | dku2libusb or phonet | ----------------------------------------- When you don't know what your cable is you can first try serial value. The current code is able to: * identify the phone ;-) * read/write phonebook entries * read SMS messages of all kinds * read SMS centers * send basic text messages * read/write calendar entries * read the memory status * read/write bitmaps (group, operator logos) * read network info * read RF/battery level * read date/time * read list of ringtones * read/write profiles * read WAP bookmarks/settings * read/write/delete ToDo entries * create/delete SMS folders * save SMS messages to phone (may be dangerous) * read/delete MMS (only Series 40 3rd Edition) Hint: For all these phones you can also use AT driver, as they all have a builtin hardware modem, but it usually supports less commands so it isn't recommended. * phonet Driver * Linux 2.6.28 and later versions provide a network kernel driver called "phonet" that conflicts with the dku2libusb driver provided by libgnokii and that can connect to the same phones. The port value is the device name as seen with "ifconfig", usually usbpn0. When using this driver you may encounter the following errors: * "Operation not permitted" - run as root: setcap cap_sys_admin,cap_net_raw=+ep $(which gnokii) * "Address family not supported by protocol" - run "modprobe cdc_phonet" as root and remove the cdc_phonet and phonet modules from the blacklist if you put them there to use the dku2libusb driver * "No such device" - the phone isn't connected: choose "Nokia PC Suite" or "Nokia mode" from phone's menu * "No route to host" - run as root "ifconfig usbpn0 up" * TODO * * implement further functionality gnokii-0.6.31/Docs/README-38100000644000175000017500000000717411666163117013363 0ustar leoleo-- README-3810 -- -- Notes, bugs and a todo list for the 3810 series -- * Notes * Phones in the 3810 series that have been tested to date are 3110, 3810, 8110, 8110i with either the DAU-4F cable or in one or two cases a home made cable. Specific phone/ network combinations appear in the main README file. After some digging in to the protocol it has become apparent that there aren't many more functions we can support, compared to our 5110/6110 cousins! Remaining functionality which I would like to add appears in the To-do section below, suggestions are welcome. The code for reading/writing phonebook entries has had limited testing but the read code is believed to be solid. It has been observed that the write code occasionally fails to write a location for reasons as yet unknown. The format of the input to the write option is relatively unforgiving and does only very basic parsing. This format should be compatible with the output from the Windows NCDS software. Routines for retrieving SMS messages have been tested and appear to be bug free. The 3810 used for testing appears to ignore the memory type field however. Sending SMS is still something of "black art". This has been tested on a 3810 on the Australian Optus/Hutchison network. Most of the time the messages are sent as expected but occasionally they fail for no apparent reason. The code is designed to re-try up to four times before giving up if a 0x65 0x26 response is received. Sometimes however error codes are seen 0x65 0xYY, the meaning of which is unknown. Any light you can cast on this is welcome. It is possible that switching off the phone and switching on again may help but this may be just a coincidence. It should also be noted that the SMS header message sent by FB38_TX_Send0x23_SendSMSHeader code has no less than 10 bytes in it that aren't understood. The values used are simply those that have been observed. They may have to be totally different on your network :( They may inadvertently route the message to a distant land or just not work at all. Having said all of the above about SMS sending, a number of people have now tested SMS sending on various networks around the world and in the main have found it to work correctly. * Functionality * The following functions/facilities are available for the 3810 series phones. - Retrieving and writing single or multiple phone book entries from either SIM or (in the case of the 8110s) internal memory. - Retrieving and deleting single or multiple stored SMS messages from either SIM or (again in the case of 8110s) internal memory. - Sending an SMS message to a specified recipient via a specified message center number. - By way of a message in --monitor mode, receive notification of the following occuring; + Incoming call being received, answered and hung up. + Outgoing call being made, answered and hung up. + Incoming SMS message + Current phone status (connected to network, call progress etc.) - Retrieve current RF and battery level - Retrieve IMEI, Model and Revision information * Known Bugs * fbus-3810 code cannot (yet) automatically determine the maximum length of the name and phone number fields in the SIM. Similarly it cannot yet determine the maximum number of SIM locations. These are defined in fbus-3810.h The status (read or unread, sent or unsent) of SMS messages retrieved from memory is not known so these flags are always set to read / sent. * To-do * Add support to automatically determine the maximum number of SIM entries and lengths of phonebook and name fields. Try building under Win32 and report success/failure to the list. gnokii-0.6.31/Docs/KNOWN_BUGS0000644000175000017500000000261711666163117013546 0ustar leoleo1. IrDA connection for nk7110 driver (Nokia 6210 and Nokia 7110) is slooow. Configurations known to be affected: model = 6210 connection = irda and model = 7110 connection = irda 2. Nokia 6100 with old firmware (04.01 reported) breaks when used with nk6510 driver. Configurations known to be affected: model = 6100 connection = irda Hadley Rich reports the same bad behaviour with Nokia 7250i. It is not supported explicitely but hacking the sources to support it (the usual way) leads to the damage. It seems that this behaviour affects Nokia Series 40 v1. See http://www.mobile-review.com/forum2/showthread.php?t=10266 for more complete list. these phones are currently disabled in gnokii when using FBUS over IrDA communication. It seems to happen only when using xgnokii. If you don't intend to do it you may try do remove/disable the blacklisting code in nk6510.c driver. 3. Nokia 6310(i) doesn't work well over the DRL3P cable. After few successfull connections it stops working. When you power the phone off and on, it works again. Configuration known to be affected: model = 6310 connection = serial and model = 6310 connection = dlr3p [Perhaps it is just my phone/cable] 4. Nokia 6510 series (e.g. 6310) will be silent after gnokii --playringtone. We don't know how to restore the original settings, so you have to power cycle your phone. Don't worry, it won't destroy your phone, it's just annoying. gnokii-0.6.31/Docs/README-dancall0000644000175000017500000000172211666163117014357 0ustar leoleo-- README-dancall -- -- Notes, bugs and a todo list for the Dancall phones -- * Notes * Dancalls are crappy telephones, commonly found in czech republic. In bazaar, you can find good phones on one table, bad phones on another table, and dancalls in nearby trashcan. Dancall for $10 is too expensive, in fact it is $10 more than it is worth. OTOH, dancalls try to speak something like AT-commands over serial cable, which made their decoding pretty easy. And they include netmon by default (just type *#9993#). Look at http://info.lantanet.cz/gsm/en_dancall_2711.html for complete list. Phone contains sw modem and it was one of the best phones in the market in its time. You *need* setserial /dev/ttyS0 low_latency in order for dancall support to work. * Known Bugs * Dancall support is disabled in gnokii 0.5. Proper support will require some statemachine changes which will be done after 0.5. * To-do * Revive it in full glory ;-) gnokii-0.6.31/Docs/README0000644000175000017500000007237411666163117012776 0ustar leoleo - G N O K I I - (C) 1999 - 2003 Hugh Blemings & Pavel Janik ml. (C) 2001 - 2011 PaweÅ‚ Kot Last update 2 December 2011 Version 0.6.31 - Contents - 1.0 Introduction 2.0 About the applications 3.0 Notes for specific model phones 4.0 Installation from source 5.0 Installation of pre-built binaries 6.0 Configuration 7.0 Known Bugs 8.0 libgnokii bindings 8.1 Perl 8.2 PHP 9.0 How to help 10.0 gnokii by git 11.0 Protocol Details 12.0 References 13.0 Handsets/Networks tested 14.0 Credits 15.0 Release Notes - 1.0 Introduction - This is version 0.6.31 of gnokii, a multisystem tool suite and modem driver for the mobile phones, released under the GPL. Please see COPYING for more details on license/copying issues, the lack of warranty and where to send a postcard if you like gnokii :). Primary gnokii goal was to support Nokia phones, but currently we support all AT command compliant phones through the atgen driver. Moreover version 0.6.1 brings support for Symbian-based phones. gnokii supports most Nokia phones from the 3110/3180, 5110/6110, 7110/6210 and 6510/6310 series, details including bugs specific to each series appear in the files README-3810, README-6110, README-7110 and README-6510 respectively. Also all AT compatible phones are supported. In the early stages of the project there were indications that Nokia would provide some support for the project. Regrettably, these negotiations stalled over the issue of binary versus open source releases and the project has proceeded without official or unofficial assistance. We have a web site at http://www.gnokii.org/ and wiki at http://wiki.gnokii.org/ which amongst other things gives information on how to join the gnokii mailing list, retrieving bleeding edge releases through git and more! - 2.0 About the applications - gnokii project provides now several suprojects and several programs in them. The most important project provides libgnokii and core applications using it. To get the most from gnokii it is worth understanding the details of them and how they interact. The first application, gnokii, is a command line utility that was originally provided to assist developers and interested users in working with the low level API functions that were being developed. From these rather humble beginnings, it has evolved into a the main command line tool of the suite. Many people now use it for reading/writing phone book entries, sending and receiving SMS messages etc. The second application provided is xgnokii which as the name suggests is a X Window System based application that provides a graphical interface to your phone. Amongst other things, xgnokii allows you to read and write phone book entries, read, write and send SMS messages, monitor battery and received signal strength. The third part of the suite is gnokiid. gnokiid provides a virtual modem interface, /dev/gnokii that looks like a regular Hayes-AT compatible modem with the ETSI defined extensions for GSM phones. What this means in practical terms is that you can treat the /dev/gnokii device like an ordinary modem and use it to make data calls from pppd or a terminal application like minicom. Currently gnokiid is only useful for old Nokia phones from 6100 series that didn't include AT commands support. This includes Nokia 61X0 and 51X0 models. Don't use it with other phones. gnokiid makes use of the small helper application called mgnokiidev. It creates on demand a symbolic link between /dev/gnokii and the pseudo tty used by gnokiid for the virtual modem interface. Its operation is transparent under normal usage as gnokiid takes care of calling it when required. The last application within the main gnokii project is smsd, a deamon that simplifies operation of sending and receiving SMSes to the database operations. There are several gnokii subprojects which are worth mentioning. gnocky is an alternative GTK2 phone manager suite, thought as a replacement for xgnokii, however not yet that powerful. gnokiifs provides a filesystem access to the phone filesystem (if the phone supports it) on top of libgnokii. You may need this just when the phone doesn't support Obex protocol. gnapplet is a phone driver for the Symbian phones. This is at the moment the only way we can access various data on such phones as AT capabilites of Symbians are very limites (you can access them also with SyncML getting some more information). gnokii-artwork contains some images and pixmaps that may be used by xgnokii and other GUIs. They are put into the separate module because we are not sure about the licensing. gnokii-extras contains sample applications (some of them really useful!) demonstrating how to use libgnokii. There are also several third-party applications using libgnokii, including: kdepim (distributed within KDE), Multisync and Opensync (as a plugin), GNOME PhoneManager, Maemo's PhoneLink, qnokii. - 3.0 Notes for specific model phones - Please see the README-3810 file for notes specific to the 3810/8110 series, README-6110 for notes on the 5110/6110 series, README-2110 for notes on the 2110 series (which is at the moment deprecated), README-7110 for notes on 7110/6210 series and README-6510 for notes on the 6510/6310 series. If you have DKU2 cable, read README-DKU2 to see how to get support under Linux (other OSes are not supported yet). See also README-dancall, README-ericsson, README-siemens and README-Symbian for notes on these phones. For building WIN32 versions see README-WIN32 file. - 4.0 Installation from source - gnokii makes use of autoconf/automake which allows you to configure the source tree for your system by typing ./configure You can also run the script with the --help flag to get a list of available options. There are about a dozen or so that are specific to gnokii. Once you've run ./configure successfully, you should be able to simply do a make and make install to compile and install your binaries respectively. make make install With this done you've built and installed your binaries, and should proceed to the configuration section below. - 5.0 Installation of pre-built binaries - Primary choose should be to install what your distribution (or in general: system) provides. gnokii is present in most of the popular Linux distributions as well as in FreeBSD ports. To install gnokii use the way your distribution recommends (apt-get, yum, synaptic, emerge, ...) However, if you would like to use more up-to-date gnokii versions (ie. git versions) and don't want to compile it by hand, there are several unofficial repositories hosting gnokii packages. There is a list of such repositories at http://wiki.gnokii.org/index.php/PreBuiltPackages. - 6.0 Configuration - Once you have installed the binaries, you should take the sample/gnokiirc file from the Docs directory. As of 0.7.0 version gnokii follows freedesktop.org specifications and looks for the config file in $XDG_CONFIG_HOME/gnokii/config. Verify the setting in your system (usually it should be $HOME/.config) and place there your config file. Using your favorite editor ensure that the settings are correct for your system, the sample file has details of the various options available. You may refer to for the configurations known to work. You may use gnokii-configure utility for assistance. It is provided in utils dir in gnokii distribution. If you used a pre-built version of gnokii (.rpm, .deb etc) it may have installed a /etc/xdg/gnokii/config or /etc/gnokiirc file. If it has, the settings in this file will be used in the absence of a config file in your home directory. Note that you will need read/write permissions on whatever device you specify in config file. You can now use gnokii and xgnokii. Review the notes specific to your model of phone in the appropriate README file. These files also provide information about what functionality is available for each model. Sample config file provided with gnokii sources provides many examples and explanations. In order to make use of the AT emulator provided by gnokiid through /dev/gnokii, you must read the documentation file DataCalls-QuickStart. A simple test to confirm that your cable/IrDA/bluetooth link is working is to run gnokii with the --identify flag e.g. foobar$ gnokii --identify This will attempt to connect to your phone and display the basic information about the phone: manufacturer, phone model, firmware version and IMEI. If you get an error along the lines of Telephone interface init failed: [...]. Quitting. this indicates that gnokii could not communicate with your phone for some reason and you will need to do some troubleshooting. As the other test you may try: foobar$ gnokii --monitor which should show you some other information like memory usage or signal strength. - 7.0 Known Bugs - Review the bugs section in the README for your series of phone. - 8.0 libgnokii bindings - - 8.1 Perl - There is a perlmodule available for gnokii. It gives access to some of the public libgnokii routines from a perl-program. It is intended for application developers who want to use their favorite language in interfacing the phone data with databases, ldap-directories and (in the future) different calendar applications. It is written by Konstantin Agouros (konstantin@agouros.de) and support starts with revision 0.2.6-pre3 of gnokii. The homepage of this module is http://www.agouros.de/gnokii Please note that Perl binding has not been updated for some time and may not work with current libgnokii. - 8.2 PHP - Daniele Forsi prepared PHP bindings for libgnokii. It should be mostly up-to-date and supports most of the useful things that you might use from a webpage. You can find more information about gnokiiphp at http://www.forsi.it/taxonomy/term/21%252C6. - 9.0 How to help - There are a number of ways you can help out. Code specific to each model is contained within common/phones/*.c and include/phones/*.h files. All command handlers will dump information to stderr when they encounter a message they don't understand. If this happens to you, try and work out what is going on. When gnokii receives the frame with the unknown meaning it stores the frame and the triggering frame to $HOME/.gnokii-errors file. Report it! Suggestions on changes to the code are welcome, the preference is that they be aired on the mailing list so that a consensus can be reached when appropriate. This is particularly important if you intend making large changes and/or submitting big patches. - 10.0 gnokii by git - The source of gnokii applications is in the git server. If you are already familiar with git, clone the main repository (containing libgnokii, gnokii, xgnokii and smsd) with: git clone git://git.savannah.nongnu.org/gnokii.git and, optionally, the other repositories with: git clone git://git.savannah.nongnu.org/gnokii/gnapplet.git # Applet for Symbian phones git clone git://git.savannah.nongnu.org/gnokii/gnocky.git # Alternate GUI git clone git://git.savannah.nongnu.org/gnokii/gnokii-artwork.git # Optional graphic files git clone git://git.savannah.nongnu.org/gnokii/gnokii-extras.git # Additional programs and language bindings git clone git://git.savannah.nongnu.org/gnokii/gnokiifs.git # CODA file system git clone git://git.savannah.nongnu.org/gnokii/knokiisync.git # KDE Address Book synchronization git clone git://git.savannah.nongnu.org/gnokii/zphone.git # Zaurus frontend If you are not familiar with git, don't worry. It's very simple. Just install the git package for your distribution and follow these steps: 1. Open your favorite shell, cd to the directory that will contain the gnokii directory and execute this command: git clone --depth 1 git://git.savannah.nongnu.org/gnokii.git this creates a 'gnokii' directory in which the sources and other needed files are downloaded; the --depth 1 argument creates a shallow clone which is slightly smaller and quicker to download (it is adequate for compiling but has some limitations, omit it if you want the full history, see man git-clone for details). In future you can update to the latest sources running the following command from inside the 'gnokii' directory: git pull 2. There are other programs available in the gnokii repository that you can get in a similar way (see above for addresses) each in a different directory, NOT inside 'gnokii' If you prefer, there is a WWW interface to the git server at http://git.savannah.gnu.org/cgit/gnokii.git/ Once you have the sources, you will need to run the following commands libtoolize -c -f glib-gettextize -f # under FreeBSD you may want to provide additional parameter to # aclocal: -I /usr/local/share/aclocal aclocal -I m4 autoheader -I m4 automake --add-missing autoconf ./configure make or just issue sh autogen.sh make to build the sources. Now you are on your own - you have the current sources on your disk in the directory gnokii. If you are going to make substantial changes and feel that they should be included into gnokii please mention it on the list first to avoid duplicated effort. If you would like to receive email when updates are made to the git repository, subscribe to gnokii-commit mailing list at http://mail.nongnu.org/mailman/listinfo/gnokii-commit. Our thanks go to the Czech Linux Users Group for hosting the original CVS repository at cvs.linux.cz and then to the Samba Team who kept hosting our CVS for the several years at cvs.samba.org. - 11.0 Protocol Details - You'll find the detailed protocol description in Docs/protocol/ directory. - 12.0 References - The web site for this project is at: Wiki site for the project is at: Project page on savannah is at: The mailing list devoted to the gnokii project is: You can subscribe at: The serial programming how-to was valuable in cobbling together serial code for both monitoring and the tools themselves. - 13.0 Handsets tested - These are phone models used for testing by gnokii developers. Keep in mind that list of actually supported models is much longer. Nokia 6510 Series + 6230i + 6021 AT series + Nokia 6230i + Nokia 6021 Gnapplet series + Nokia 3650 - 14.0 Credits - Please take a moment to read the CREDITS file which endeavors to recognise those who have helped so far! - 15.0 Release Notes - 20111202 Version 0.6.31 Possibility to change the phone driver in runtime. Fixes to make it possible to resend the message without modifications to gn_sms structure. Improvements to vcard handling. Improved handling of calendar, notes and todo for Series40 3rd Ed and later. Improved Samsung support. Avoid multiple overruns and segfaults. 20110123 Version 0.6.30 New phonet driver which is compatible with phonet (2.6.28) and cdc_phonet (2.6.30) linux kernel drivers (replacement for dku2libusb connection type). Enhancements in handling and discovering series40 3rd+ edition phones. Numerous bugfixes in libgnokii including important fixes to sms handling. Fixes for Windows builds. SQLite3 backend for smsd. 20100423 Version 0.6.29 Major bugfixes in the encoding procedures. That should fix all problems regarding SMS encoding on libiconv-based systems. This release may not work properly or even build on Windows and systems without libiconv support. Improvements in handling Series40 5th and 6th Edition. 20090907 Version 0.6.28 Tons of bugfixes and updates. The most important include sms and encoding handling functions. We are also better with Series40 3rd+ Edition support. SMSD gained stability improvements. There were also portability fixes: gnokii should now compile just fine (again) on most platforms. We have now also Bluetooth support for FreeBSD. Experimental support for MMS reading for Nokia Series40. 20081006 Version 0.6.27 Fix some portability issues for win32/MacOS X/FreeBSD/Linux. Improve support for Inbox SMS reading for Series40 3rd+ Edition. Support for new memory types: Status Reports, Drafts, Outbox with items not yet sent. Improve conversion functions for vCards. Implement bluetooth channel autodetection. Improve call divert support. Start replacing hardcoded limits with dynamic allocation. Better support for Sagems, Samsungs and Sony-Ericssons. Fix various potential and real overflows and other bugs. 20080530 Version 0.6.26 Fix infinite loop problem with SMSD. Fix vCard reading/saving problem. Better handling of +CREG information in AT driver. Other fixes to AT driver. 20080503 Version 0.6.25 Allow to use --entersecuritycode with another gnokii command. Use standardized functions to print out enums' values. vCard support compliant with RFC2426. Enhancements in pcsc driver. Correctly handle +CRING: in AT driver 20080320 Version 0.6.24 New API for config handling (more friendly to external apps). Fixes in memory types handling and SMS handling in AT driver. Some other bugfixes and improvements. 20080215 Version 0.6.23 Build system changed to automake (from handmade) which should make packagers' life easier. Fix FBUS initialization for DKU-5 (hopefully for the last time). Remove some deprecated functions from API. Attempt to read SMS from all Series40 Nokias in FBUS mode. Fix some other minor issues. 20071124 Version 0.6.22 Fix phonebook entries deletion from xgnokii. Fix moving phonebook entries from SIM to phone and vice versa from xgnokii. Fix initialization for some DKU-5 cases. Fix not working message retries. Fix non working SMS reading on DKU-2 connection. Fixes for Motorola compatibility (SMS notification and model reading). Fix installation issues. Add possibility to build gnokii with MS Visual Studio 2008. gnapplet now registers its bluetooth service so you can check if it's running. 20071111 Version 0.6.21 Implement various new FBUS protocol findings. Make bluetooth connection non blocking. Avoid weird memory corruptions. Improve DKU-5 initialization stage. 20071027 Version 0.6.20 Add support for SIM Card Readers (pcsc driver). Improve SMS saving to the external files. Fix several segmentation faults. Make DKU-5 connection working again. Better support for SonyEricsson phones (phonebook, date and time functions). Some code cleanups. 20071005 Version 0.6.19 Various bugfixes. See ChangeLog for the details. 20070724 Version 0.6.18 Fix callback (call, sms, cell broadcast) support and add it in AT driver. Fix long sms splitting. Add --showsmsfolderstatus support in nk6100 driver. Add support for multipart smses in smsd's mysql backend. Add better support for extended phonebook. 20070621 Version 0.6.17 Fix most of xgnokii memleaks. Fix gnokii options parsing. Fix most of uninitialized variables usage. Introduce support for more than one phone connected with DKU2 cable (see sample config file for details). Fix segfault when config file is missing or broken. Use defaults from config values are incorrect or unsupported. 20070511 Version 0.6.16 Compilation fixes for Solaris and Windows. 20070507 Version 0.6.15 Tons of updates. Most important changes include: support for reading extented phonebook entries, fixes for some nasty segfaults, fixes for decoding SMSes for some encodings, better support for Samsung mobiles in AT driver. 20060829 Version 0.6.14 Add WAP push support. Add --config and --phone options for gnokii CLI (to choose config file and phone section). New waitcall utility. Other minor fixes. 20060618 Version 0.6.13 Make libgnokii API more convinient to the third party applications. Fix few memory leaks and incorrect sprintf() usage. Phonebook entries with no name are not empty (eg. missed calls). Win32 compatibility fixes. Support for DKU2 cable using libusb. 20060311 Version 0.6.12 Fix a bug causing segfault with xgnokii startup when gnokii-artwork package is not installed. Small updates allowing better ringtones handling and for xgnokii optimizations. 20060215 Version 0.6.11 nk6510 driver fixes: make call, calendar notes, subscribe and other low level fixes. Virtual IrCOMM device support. No need to recompile to add ability do connect with IrDA to a new model. Xgnokii coredump fixes, GTK2 compatibility, some new features (dial pad), phone images moved to the separate package. LDIF handling improvements. Gnokii --putfile and --writephonebook fixes. RING and +CRING messages handling. And many other fixes. This is huge update. 20051109 Version 0.6.10 Silly bug fixed from gnokii prevented --getfiledetaildbyid working correctly. Mingw compilation fixes. New models support. 20051020 Version 0.6.9 Improved DKU-2 driver. File operation support for Nokia 6610i family. Minor bugfixes. 20050724 Version 0.6.8 Another bugfix release. Main highlights are: removed an infinite loop with xgnokii, fixed to unicode handling, updates to nokia_dku2 driver, end keyword for --getsms and --deletesms. 20050516 Version 0.6.7 Minor bugfix release. Don't use non-portable strndup. Update FAQ. Update build scripts for Slackware and Gentoo. New option --disable-unix98test for configure script to avoid testing for grantpt() what may be useful when preparing packages in faked environment. 20050512 Version 0.6.6 Minor bugfix release. Various cleanups to the code. Translation updates. Fixes to the file handling. 20050429 Version 0.6.5 This is really big release. The delay since the previous version was caused by the copyright issues that should be resolved right now. The code improvements contain: DKU2 calbe support (along with Linux kernel driver), filesystem functions, fixes for SMS and TODO reading, call management. For more details see the ChangeLog. 20041017 Version 0.6.4 Many improvements: build system, new phones supported by various drivers, more functionality in gnapplet driver (calendar, todo, sms and much more), end keyword will work for most gnokii commands, some nasty bugx fixed, updated documentation, NetBSD support. 20040705 Version 0.6.3 Small fixes for MSVC compilation problems. 20040703 Version 0.6.2 This version brings many portability and build system updates. Gnokii should build cleanly on Linux, Windows (cygwin and MSVC), FreeBSD and OpenBSD operating systems. We have more gnapplet functionality (thanks bozo), IrDA support for Windows, and many bugs fixed: mainly connected with calendar and addressbook handling. Gnokii now supports libical as a primary library to support vCalendar input and output. 20040413 Version 0.6.1 With this version gnokii starts to support Symbian phones. This consists of gnokii symbian phone driver (called gnapplet) and Symbian application to be installed and run from the phone. Minor fixes and build system updates. Complete Nokia models list. 20040222 Version 0.6.0 Bugfixes in phonebook handling (import and export should work now correctly, gnokii and xgnokii share the formats), calendar handling, sending unicode short messages (chinese texts should be sent correctly), msvc6 build. Set correctly Nokia 8310 information (logo sizes, signal indicator). Updates to documentation. Debug can be turned on in the config unless it was explicitely disabled with --enable-debug=no. 20040201 Version 0.5.10 Few bugfixes: ucs2 encoding and decoding, phonebook subentries, at driver responses handling. New features: answer/cancel call for AT driver, delete phonebook entry. Besides many documentation updates and build fixes. 20040119 Version 0.5.9 We disabled Nokia 6100 support as it is known to break the phone with the gnokii communication over the irda port. All tested firmwares seem to be vulnerable. We're working on the real fix. Besides many bugfixes. We focused on build problems. Also some code improvements: fix memory leaks and somesegfaults, fix --playringtone incorrect behaviour, fix large calendar reading. 20040101 Version 0.5.8 Many cleanups and build fixes (some of them taken from FreeBSD ports). Updated GSM operator list. Fixes in gnokii behaviour. New commands for AT driver. 20031216 Version 0.5.7 Support for Bluetooth on MacOS X and FreeBSD. Many fixes: phone lockups, utf8 encoding, ringtones. Some new features for different drivers were implemented. Updates for win32 build. 20031108 Version 0.5.6 Many bugfixes. Ringtone editor in xgnokii is fully functional. Ringtone support is enhanced in the nk6100 and nk6510 drivers. A lot of datacall related updates (RLP bugfixes, AT emulator enhanced). vCard and LDIF addressbook export is working again. 20031008 Version 0.5.5 Bugfix release, focus mainly on the ringtone features. Some new functions added wrt ringtones. 20030922 Version 0.5.4 Win32 port update and other small bugfixes. 20030921 Version 0.5.3 Many bugfixes. Added missing manual pages. Updates to nk3110, nk6100 and nk6510 drivers. New functionality: possibility to exchange addressbook in the LDIF format (used by Mozilla Mail), playringtone. 20030613 Version 0.5.2 Few more bugfixes. French translation. Updates to nk3110 and nk6100 drivers functionality. 20030529 Version 0.5.1 This is mainly maintanance release fixing few bugs found. 20030512 Version 0.5.0 The external API was rewritten. Now it should be easier to write any external application using libgnokii. Many bugfixes and code cleanups. Improved build system. Better portability to *BSD, MacOSX and Windows. Allow to use multiple phones. Bluetooth support. New helper applications: ppm2nokia. Much improved nk3110, nk6510 and AT support. 20020805 Version 0.4.3 Many functional updates. They touch mainly nk6510 and nk6110 drivers functionality, also updates in nk7110 driver. Add new functionality to gnokii/xgnokii (TODO list). More phone models are known to work. SMSD should work with the drivers supporting SMS folders. 20020722 Version 0.4.2 Minor updates. Mainly fixes and updates in nk6510 driver: sms sending and reading, dlr3p cable support. sendsms can recognize messages not written in the default alphabet and automatically sends them in unicode. Also many reported nasty bugs fixed. 20020714 Version 0.4.1 Minor but valuable updates. Many improvments in nk6310 driver (Nokia 6310, 6510 and 8310), small improvements in nk6160 and nk7110 drivers, more verbose output for gnokii command line output, documentation updates containing FAQ updates, SMS sending timeout is now configurable, flex will not be required to build gnokii from the tarball and other minor fixes. 20020710 Version 0.4.0 Major rewrite. Internal API completly changed. Added support fot the new phones, maily Nokia 6210, Nokia 7110, Nokia 6310, Nokia 6510 and AT compatible not-only-Nokia phones. We got new libgnokii, that can be used for creating any user application, smsd -- sms handling daemon, libsms -- first step to extract a middle layer, many new options to command line gnokii and many others. Refer to the ChangeLog for the detailes (unfortunately it starts with 0.4.0pre9 version) 20010627 Version 0.3.3 Many 6110 series updates: mainly in SMS, bitmaps and ringtones handling. Better localization. Integrated xlogos with xgnokii. Documentation updates. Probably the last 0.3 series release. 20000520 Version 0.3.2 We have data calls and autoconf. Nuff said :) 19991222 Version 0.3.1 Interim release to bring released code into line with latest CVS offerings. 19990824 Version 0.3.0 6110 functionality has increased again, details of which are in the 6110 specific readme. Few minor tweaks on the 3810 side but we've just about run out of things the 3810 can do (data and fax calls aside of course!) This release is the first to include xgnokii - an X based interface to your phone and gnokiid - the makings of a virtual modem/AT emulator interface. Details of these two apps appear above. 19990519 Version 0.2.5 Little has changed on the 3810 side - mostly adding stub functions to stay current with the 6110 code. A no-brainer bug was found in the SMS send routines which is now corrected - could have caused multiple messages to be sent. 6110 support has moved ahead in leaps and bounds, SMS sending is now in there along with many other new function. 19990328 Version 0.2.4 Largely a synchronisation release to incorporate Pavel's numerous patches for 6110 support and internationalisation (such a long word, i18n is better :-). Added SMS delete function for 3810 series. 19990305 Version 0.2.3 Added gsm-api.c/.h and gsm-common.h as a standard interface and set of datatypes that can be used across multiple models. This API is still a work in progress. Changed references to "handset" to "phone" to ensure a consistent nomenclature. Phonebook is now dumped with words int or sim for memory type rather than a numeric value. 19990219 Version 0.2.2 Fixed bug and added support to display bytes returned when the link is initialised. If you see something other than the values noted in fbus.c, please let me know and include your phone type and software version. Added initial cut of SMS send capability. Caveats are discussed above. Added two different default values for length of phonebook name and numbers. These are selected according to whether internal or SIM memory is specified. Fixed bugs reported in 0.2.1 (errno.h and reversal of message center and sender fields) 19990216 Version 0.2.1 Fixed bug that caused phone book entries containing spaces to be mangled. Added retrieve SMS message function. 19990213 Version 0.2.0 First version that looks more like the finished product - supports command line options etc. 19990126 Version 0.1.0 Initial release of monitoring tool - first rough incarnation of gnokii - what will ultimately be the monitoring and programming tool. gnokii-0.6.31/Docs/README-siemens0000644000175000017500000000033311666163117014421 0ustar leoleoSL45i ===== Works quite okay in AT mode. sl45i has flash card, which is accessible using Obex protocol (apt-get install flexmem). sl45i uses vcard/vcalendar for its organiser (nice), use scmxx to access those records. gnokii-0.6.31/Docs/README-DKU20000644000175000017500000000165711666163117013475 0ustar leoleo*** README-DKU2 *** *** Notes, Install, bugs etc for the DKU2 Linux kernel module *** * Notes * The recommended way to use DKU2 cable is to use included in gnokii userspace libusb driver. Ensure that you have libusb on your system (if you compile gnokii you would need development libusb packages) and use connection=dku2libusb setting in your config file. As port use number of compatible USB end-point (starting with 1). This setting is useful just to distinct more than one DKU2 phone connected to PC. You may want to install Docs/sample/45-nokiadku2.rules to set device permissions for non-root users using udev. Sources for the nokia_dku2 Linux kernel module have been removed since gnokii 0.6.28. * Disclaimer * No warranty, you are on your own. If you have questions or remarks, please let me know on my email address mentioned below. Author: Chris Kemp (chris at madpanda dot org) gnokii-0.6.31/Docs/gnokii-hackers-howto0000644000175000017500000001600611666163117016063 0ustar leoleoGNOKII Hackers Guide -------------------- Purpose ------- Now that we know in some detail the workings of the protocols it makes sense to organise the gnokii code to fit them better. This should mean that when new models come out, it is easier to get the code in place to support them. It is hoped that the new structure will also work for other makes of phone. Overview: Application (gnokii/xgnoki) | do_something() (Middle-layer aka gnokii API) | gsm->function() gsm-api | p*_functions() Phone specific code (eg nk7110.c) | gn_sm_message_send(), gn_sm_wait(), gn_sm_loop() StateMachine | sm_send_message(), sm_loop() Link specific code (eg fbus.c) | Hardware code Detailed operation ------------------ Initialisation: The gnokii application (eg gnokii, xgnokii) decides on the phone type and required connection method from the config file. It then calls the gsm-api init code which in turn calls the init code for the correct phone. This code is located in a series of files phone/*.c. This code creates a gn_state structure (which contains a gn_link structure) and passes this to the common code for the specific link (eg fbus_initialise, contained in fbus.c). The link code fills in the gn_link part of state (and also stores state to use later). The phone code chooses the appropriate link and is free to perform any phone specific init. It then initialises the StateMachine by passing it the state struct and a gn_driver struct. The Link: The link serves to deal with bits of the phone protocol which are common to every exchange for that particular phone. The gn_link structure is used to contain any information about the link which is required by the StateMachine. Two vital functions in the link are sm_send_message and sm_loop: sm_send_message(u16 messagesize, u8 messagetype, void *message) is the function called by the statemachine code to send a message 'down the pipe'. The parameters are intended to be generic (though with obvious origins :-) For example 'at' commands could be enumerated and passed as messagetype. sm_loop(struct timeval *timeout) is a function which must be called regularly by the statemachine code to enable to link code to process data from the phone. This is due to the code now being single threaded and using select/poll. The timeout passed can therefore be used to make this function block for a while (or not). In the loop function, the link code checks for any incoming messages from the phone. Any received correctly are passed up to the statemachine code. The Middle Layer All common/*.c files contain the code that is general and is used by all of the phones. The functions within should convert the gnokii internal structures into the frames (without the header) that can be sent to the phone and understood by it. It's obvious that this layer should be phone independent. All the phone specific stuff should be done in the phone layer. In the case when phone frames are similiar but not the same, the phone layer can export some help structures to let be the code shared in the middle layer. Using the middle layer is optional. Currently almost no code does use it. Although it is recommended to use it to avoid the code duplication and to keep clean the phone drivers. The Phone: The phone/*.c code therefore basically contains code to package up and unpack information from the phone specific format to generic gnokii structures (eg gn_bmp). However, it is also at the top of the tree and contains functions called by the application. Generally there are three types of exchanges that can occur. Firstly the computer can send the phone a command and expect no answer (not including acks etc which are dealt with by the phone code). Secondly the computer may send a command and expect a response within a certain time - often containing useful information. Lastly the phone may send the computer unrequested information (ring!). Therefore the functions in the phone code need to process one of these three things: 1) Just sending out is easy - we simply call gn_sm_send_message - which in turn calls the link sendmessage. 2) Command and response. There are two ways to do this. In both cases we start out by sending a message via the statemachine. Next we either a) wait for the reply or b) wait for some other code to process the reply. My (*new improved*!!!) suggestion is that the statemachine calls phone functions (like parts of DispatchMessage) which process the received data into a generic structure tagged with the data type (one function for each data type). This is returned to the statemachine. The statemachine then returns this 'baggage' to the other part of the phone code which is waiting for it. 3) Notification. Here, as for 2) the statemachine calls some phone code, but the phone code merely remembers it and does not return any data. So, the phone file contains two types of functions. Some are called by the application (via gn_functions) - and some by the statemachine (IncomingFunctions[]). The application ones assemble a request and pass it on down to the statemachine. They then block to the statemachine until the answer is ready. The statemachine receives data from the link and passes it up to the appropriate IncomingFunction in phone, which returns the answer which is finally passed back to the blocked phone function. The StateMachine: This therefore has the following states: Startup Initialised MessageSent Waiting AnswerReady When gn_sm_send_message is called by the phone (application code), we go to state MessageSent. The message is passed on to the link, but stored internally as well in case it needs to be resent. If at any point a message from the link is received this is passed onto the phone (incoming) code. If the phone code calls gn_sm_waitfor, we go to state Waiting. Now if an answer comes back from the phone code (eg a received logo) we store it internally in the statemachine and go to state AnswerReady. When the phone code calls sm_get_answer, we pass up the stored answer and go back to Initialised. Note that all of this can, or can not be done as a seperate thread. For now, we will have a gn_sm_loop function (which blocks for a required time and returns the current state) so that we can work within one thread. PhoneGeneric: This now contains one handy helper function which serves only to call gn_sm_waitfor, then gn_sm_loop repeatedly until the state goes to AnswerReady, and then sm_get_answer. This is just to save repeating code. ----------------------- Note that this leaves the phone code very similar to the basic layout of eg fbus-6110.c but removes all the: static gn_timestamp *CurrentAlarm; static gn_error CurrentAlarmError; makes everything well orderd and splits up DispatchMessage into byte sized chunks! ----------------------- Other Notes ----------- Within a phone/*.c or link file the functions should be made static. It is therefore not necessary to use prefixes such as FB61_ but this may help code legibility to distiguish the major functions. -- $Id$ Chris Kemp Pawel Kot gnokii-0.6.31/Docs/README-ericsson0000644000175000017500000000145611666163117014612 0ustar leoleoA1018s ====== * Communicates with AT commands, with few possible extensions like pressing keys (AT+CKPD="X", x is 0..9, # * < > s==yes, e==no, c==clr). * Contains AVR RISC cpu, and its internals are pretty well known (see http://www.subdimension.com/community/scitech/ga628/a1018.htm), people are writing their own firmware with arkanoid, for example. * Its quite easy to flash firmware there. * Works with gnokii, use model AT as hardware type and add serial_baudrate = 9600 option to make it work. AT+CREG=2 should give cellid and operator notifications. AT+CPAS=1 gives "phone activity status" (what's that?) AT+CFUN=0 turns phone off AT+CIND=? gives some status, but I can't set indicators. AT+CMEE=2 gives string errors, might be usefull for debugging? AT+CCLK="02/04/26,22:20:10" works for setting time gnokii-0.6.31/Docs/gnokii-IrDA-Linux0000644000175000017500000001410011666163117015152 0ustar leoleoGetting gnokii to work with a modern phone over IrDA under linux ================================================================ The following guide explains how to get a modern phone like a nokia 7110, nokia 6210, siemens s25, ericsson t39 etc to work with gnokii. The guide is divided into 3 parts: kernel configuration and setup, checking the connection and gnokii configuration. This guide is not for nokia 6110/6150. See gnokii-ir-howto instead. Part 1 Kernel configuration and setup ===================================== - Compile your kernel with IrDA support for your chipset. For me on my VAIO this was: CONFIG_IRDA=m CONFIG_IRCOMM=m CONFIG_IRDA_OPTIONS=y CONFIG_IRDA_DEBUG=y CONFIG_IRTTY_SIR=m Use the emulation of serial port part of your IrDA chipset or... CONFIG_NSC_FIR=m Specify the one you have (I have a NSC 87338) - Reboot onto new kernel etc. - Check your serial devices don't conflict with the ioport/irq that your chipset driver will try to use: setserial /dev/ttySX (where X is 0 -> 3) should give you the information you need. If you have a device that conflicts with your ioport/irq then you will need to remove the serial driver's control over it with: setserial /dev/ttySX uart none port 0 irq 0 (where X is there relevant port mine is /dev/ttyS2) - I used the chipset way to get IrDA working. I needed: options nsc-ircc dongle_id=0x09 alias irda0 nsc-ircc in /etc/modules.conf Then just irattach irda0 -s 1 which *should* load all the modules you need and start it doing irda discovery. The modules I have loaded at this point are: nsc-ircc and irda. Part 2 Checking the connection ============================== On some distributions irdadump is broken and segfaults. If this happens skip the next two steps and go to discovery. - Run irdadump to see that it is indeed attempting to discover something. You should see messages like: 15:24:07.380360 xid:cmd 0c57083d > ffffffff S=6 s=0 (14) 15:24:07.470333 xid:cmd 0c57083d > ffffffff S=6 s=1 (14) 15:24:07.560310 xid:cmd 0c57083d > ffffffff S=6 s=2 (14) 15:24:07.650283 xid:cmd 0c57083d > ffffffff S=6 s=3 (14) 15:24:07.740279 xid:cmd 0c57083d > ffffffff S=6 s=4 (14) 15:24:07.830279 xid:cmd 0c57083d > ffffffff S=6 s=5 (14) 15:24:07.920311 xid:cmd 0c57083d > ffffffff S=6 s=* langly hint=0400 [ Computer ] (22) - Place the phone in front of it, enable the Infrared parts of it (Menu 90) then it should change to be like: 15:26:07.380336 xid:cmd 0c57083d > ffffffff S=6 s=0 (14) 15:26:07.470288 xid:cmd 0c57083d > ffffffff S=6 s=1 (14) 15:26:07.560284 xid:cmd 0c57083d > ffffffff S=6 s=2 (14) 15:26:07.650281 xid:cmd 0c57083d > ffffffff S=6 s=3 (14) 15:26:07.740280 xid:cmd 0c57083d > ffffffff S=6 s=4 (14) 15:26:07.847192 xid:rsp 0c57083d < d10e0000 S=6 s=4 Nokia 6210 hint=b125 [ PnP Modem Fax Telephony IrCOMM IrOBEX ] (27) 15:26:07.830293 xid:cmd 0c57083d > ffffffff S=6 s=5 (14) 15:26:07.920283 xid:cmd 0c57083d > ffffffff S=6 s=* langly hint=0400 [ Computer ] (22) - With the phone still in front of your infrared port, check if the discovery of the infrared port works. Do a bash-2.03$ cat /proc/net/irda/discovery a response could be: IrLMP: Discovery log: nickname: T39, hint: 0x9124, saddr: 0xe4fe8166, daddr: 0x48611661 If this doesn't work try if discovery is on: bash-2.03$ cat /proc/sys/net/irda/discovery this should give: 1 if it returns: 0 check if irattach is running: bash-2.03$ ps aux|grep iratt a possible return is: root 271 0.0 0.0 1288 192 ? S 20:49 0:00 irattach /dev/ttyS1 if you don't see the irattach process, go back to kernel configuration. - Now try using ircomm to talk to the phone. Try minicom /dev/ircomm0 (you may need to setup a default profile for this port as the root user with minicom -s /dev/ircomm0). - This depends on your distribution having the right lines in modules.conf for ircomm to be loaded: alias tty-ldisc-11 irtty alias char-major-160 irda0 alias char-major-161 ircomm-tty And your /dev/ircomm0 should be character device 161,0. Debian testing/unstable gets this right. If these don't work you may need to load ircomm and ircomm-tty manually. - minicom /dev/ircomm0 should now work and AT commands should function. simply type the following in the terminal program: AT you get the response: OK - If minicom blocks, try a different terminal program. On my box minicom works perfect with a serial cable but not with IrDA. seyon works with both, cable and IrDA. Part 3 gnokii configuration =========================== Depending on your phone, you need to set some gnokii options. for a nokia 6210 or a nokia 7110 you would set (at least) the following in the config file: [global] port = /dev/ircomm0 model = 6210 connection = irda For a siemens or a ericsson phone or any phone which supports the AT command set directly, the following should work. Please pay attention to connection which is set to "serial" instead of "irda": [global] port = /dev/ircomm0 model = AT connection = serial gnokii --monitor should now function. [huggie@langly ~]$ gnokii --monitor Entering monitor mode... RFLevel: 100 Battery: 100 SIM: Used 5, Free 85 etc. Not all the functions for 6210 work yet seemingly. - If instead gnokii hangs then you may have a version of gnokii that still has recv() in irda_open of common/devices/unixirda.c. Just comment out that line, recompile and try again. Possible problems ================= - If you are absolutly sure you set up everything fine, you are using a FIR driver, your phone can be seen in the discovery log but you are not able to use either minicom or gnokii it can be a speed negotiation problem between your IrDA stack and your phone. Probably the reason is that the FIR driver and your phone support faster communication than 115200 baud and they manage to negotiate a speed which one of the parties cannot handle correctly. Try to limit the negotiated speed to 115200 baud: echo 115200 > /proc/sys/net/irda/max_baud_rate Credits ======= Initial version by: Simon Huggins small enhancements by: Manfred Jonsson gnokii-0.6.31/Docs/gettext-howto0000644000175000017500000000617511666163117014657 0ustar leoleo1. What do I need? - a reasonably recent version of GNU gettext (e.g. 0.10.35) Check the version using e.g. msgfmt -V - autoconf - gnokii distribution :-) - if you have the variable LINGUAS in the environment (most Red Hats have, no idea about other distributions), unset it 2. How to make gnokii.pot file? gnokii.pot file is a collection of all localizable strings in the gnokii package. It will be generated automagically and is included in the standard distribution package. If you need to regenerate it, goto "po" directory, remove gnokii.pot and say make gnokii.pot 3.1 How to start translating for a new language? First, you would like to contact the authors or write to the mailing list - maybe there already is someone working on this translation. If you get the OK from the maintainer, there are several steps to do: - add the code of your language to the po/LINGUAS file respecting the alphabetical order Caution: the language code may differ from the country code, e.g. czech language is cs, Czech Republic is cz - in the po directory, copy gnokii.pot to .po - start translating 3.2 How to merge existing translations with the updated gnokii.pot? This is simple. Rename the old file and use msgmerge to create an updated one: mv cs.po cs.po.bak msgmerge -o cs.po cs.po.bak gnokii.pot 4. How to generate a .mo file When you say make in the po directory, all existing translations will be generated. The suffix will be .gmo. If you want to do this manually, use the msgfmt utility, e.g. msgfmt -o cs.mo -v cs.po 5. How to install the files Again, the makefile takes care of this. Simply use (as root) make install in the po directory. If you want to do this manually (and/or for your language only), move the .mo file to /usr/share/locale//LC_MESSAGES/gnokii.mo I'm from Czech republic, so I did (well, I did not, but if you would like to localize gnokii, you should :-): cd po make gnokii.pot cp gnokii.pot cs.po msgfmt -o cs.mo -v cs.po make make install And now: SnowWhite:/tmp/gnokii$ export LC_MESSAGES=cs_CZ SnowWhite:/tmp/gnokii$ ./gnokii --version GNOKII Version 0.3.1 Copyright (C) Hugh Blemings 1999. Kompilace: 19:09:02 Mar 13 1999 pro model 6110 na portu /dev/ttyS0 SnowWhite:/tmp/gnokii$ The second line is in czech language :-) There are some problems - for example with "Mar" which is substitute by the C preprocessor. 6. How to use locale in the gnokii code It's simple. Instead uf using: "some string" use: _("some string") In some cases _() cannot be used but the text still needs to be localized. In such cases use: N_("some string") For more detailes refer to gettext info pages. When sending us the patches and writing code for gnokii follow the rules: - do NOT translate DEBUG output (usually done by dprintf()), - translate all other output - do not output to stdout, unless you are in the application level code (gnokii/*.c, gnokiid/*.c, xgnokii/*.c, smsd/*.c) -- $Id$ Pavel Janik Pawel Kot gnokii-0.6.31/Docs/DataCalls-QuickStart0000644000175000017500000000557111666163117015754 0ustar leoleo QUICK-START GUIDE TO RLP DATA CALLS USING GNOKII (1) Compile and install gnokii as per instructions in the INSTALL file. e.g. cd /usr/src tar xvfz /tmp/gnokii-0.5.X.tar.gz cd gnokii-0.5.X ./configure --enable-nls --with-x make groupadd gnokii make install (2) Create /etc/xdg/gnokii/config or ~/.config/gnokii/config mkdir -p /etc/gnokii/config cp Docs/sample/gnokiirc /etc/xdg/gnokii/config or mkdir -p ~/.config/gnokii cp Docs/sample/gnokiirc ~/.config/gnokii/config Edit to suit; in my case: [global] port = /dev/ttyS2 model = 6150 initlength = default connection = serial bindir = /usr/local/sbin/ (3) Connect your phone to your PC and then run gnokiid: # gnokiid If successful, you should see a message saying that mgnokiidev has been run to create /dev/gnokii. If you're using a 5110/6110 series phone you should hear a beep and see an "accessory connected" message on the phone. If you're using a 3810 series phone you won't see anything on the phones LCD. I run gnokiid as root; it will also work for another user who is in group gnokii, as long as the serial port is accessible to that user as well. It's not recommended that you run gnokiid as root permanently however - it is better to put yourself in group gnokii (4) Use /dev/gnokii as a modem: e.g. ppp session --------------- /etc/ppp/peers/demon-gnokii --------------------- /dev/gnokii 115200 modem crtscts defaultroute connect 'chat -v ABORT BUSY ABORT ERROR ABORT "NO CARRIER" "" AT OK-AT-OK ATD02083389666 CONNECT' user XXXX.demon.co.uk noauth mtu 296 debug ---------------------------------------------------------------- If you call a computer connected to an ISDN line you can use the V110 protocol. To use this protocoll you have to put ATS35=0 in your chat script. Replace the connect line with the following: connect 'chat -v TIMEOUT 60 ABORT BUSY ABORT ERROR ABORT "NO CARRIER" "" AT OK ATS35=0 OK ATD0123456789 CONNECT' on the computer called you can use the ttyI* device, for more info read the following mail: http://mail.nongnu.org/archive/html/gnokii-users/2002-07/msg00165.html --------------- /etc/ppp/pap-secrets --------------------------- XXXX.demon.co.uk demon-gnokii ---------------------------------------------------------------- Then "pppd call demon-gnokii" should connect ('tail -f /var/log/messages' to see what is happening) (5) If a call terminates you should get 'NO CARRIER' and gnokiid should continue to work, but this is early code and you may find you have to Ctrl-C and restart gnokiid (especially if the phone says the terminal connection has been lost) (6) As gnokiid is still under development, ensure your data call has hung up by checking your phone display at the end of the call. (7) See also example files in Docs/sample directory. gnokii-0.6.31/Docs/README-PCSC0000644000175000017500000001165011666163117013512 0ustar leoleo-- README-PCSC -- -- Notes, bugs and a todo list for the pcsc driver -- * Features * This driver supports SIM and USIM cards inserted in smart card readers compatible with libpcsclite. By default this driver is compiled in libgnokii if libpcsclite is installed and pcsc include files are found. You can avoid this by passing --enable-libpcsclite=no to autogen.sh or to configure. You can download pcsc-lite from http://pcsclite.alioth.debian.org/ and a driver suitable to you reader could be available from http://www.musclecard.com/ A typical configuration to use this driver is: port = 0 model = APDU connection = libpcsclite If you have more than one reader, you might find it useful to specify the name of you reader in the port parameter (look at the debug output from pcscd or gnokii if you don't know the exact string to use). Implemented commands for gnokii are: --identify --deletephonebook --deletesms --entersecuritycode --getphonebook --getsms --getsmsc --getfile --getnetworkinfo --getsecuritycodestatus --showsmsfolderstatus This means that writing to the phonebook is not supported and writing short messages isn't supported either. The --identify command returns the following information: - IMEI The string "Unknown" (this is a constant string) - Manufacturer Operator name and country name converted using existing libgnokii functions from MNC and MCC extracted from the IMSI (IMSI, MCC and MNC are printed when debug = on); PIN code is needed to read the IMSI - Model The string "SIM/USIM" (this is a constant string) - Product name The string "pcsc" (this is a constant string) - Revision a string similar to "Phase 2+ SIM" indicating the Phase Identification of the SIM (possible values are 1, 2 and 2+) When debug = on this command also prints the ICCID. The --deletephonebook command can delete from any memory, if the SIM allows it. Current implementation completely overwrites deleted entries with 0xff. The --deletesms command can only delete from SM memory. Current implementation completely overwrites deleted entries with 0xff. The --entersecuritycode command currently supports only PIN. The --getphonebook command can read from SM, EN, FD, ON, SD, BD and LD. Use memory SD to read Service Dialing Numbers and BD to read Barred Dialing Numbers. Start number is 1, end number depends on SIM card but cannot exceed 255. Note that: - some SIM cards only have numbers in SM, so reading from the other memories will fail - some phones do not write to the LD memory The --getsms command can only read from SM memory. Start number is 1, end number depends on SIM card but cannot exceed 255. The --getsmsc command can read the name of the set, if present. Start number is 1, end number depends on SIM card but cannot exceed 255. The --getfile command can read the MF, a DF or an EF, if the SIM allows it. A path name must start with 'B:' and the slash '/' or the backslash '\\' can be used as separators (in some shells the backslash must be doubled). All names are 4 digits hex numbers (case insensitive). Interesting files are the phonebook in raw format: gnokii --getfile b:/7f10/6f3a and the SMSs in raw format: gnokii --getfile b:/7f10/6f3c Do not try random numbers, read the GSM standard instead. The --getnetworkinfo command returns the following information about the last cell visited by the phone containing the SIM: - Network Operator and country names converted using existing libgnokii functions from MNC and MCC - Network code MCC (3 digits) and MCC (2 or 3 digits) - LAC Location Area Code as 4 hex digits - Cell id Always 0 because it isn't stored together with the other information PIN code is needed to execute this command. The --showsmsfolderstatus command can only show SM memory. * Bugs * - GN_OP_GetMemoryStatus and GN_OP_GetSMSStatus always return total space instead of used space. - Memory EN isn't actually supported. - GN_OP_GetSMS doesn't mark deleted SMS as such. * Troubleshooting * 1) check that the pcsc-lite package is properly installed and configured Run pcscd in debug mode: pcscd -f -d And see what it prints when you insert the card in the reader. 2) check that libgnokii is compiled with libpcsclite support 2a) if you are compiling libgnokiii from source, you need the binary for libpcsclite and its include files; if the ./configure script can find them its output will look like this: [..] checking for libpcsclite >= 1.4.2... yes checking LIBPCSCLITE_CFLAGS... -pthread -I/usr/include/PCSC checking LIBPCSCLITE_LIBS... -lpcsclite checking if libpcsclite includes are installed... yes [..] 2b) if you are using a precompiled libgnokii binary check that it is linked with libpcsclite, eg.: $ ldd /usr/lib/libgnokii.so | grep libpcsclite libpcsclite.so.1 => /usr/lib/libpcsclite.so.1 (0xb7ee6000) * ToDo * In random order: - Handle SMS - Give more information to the --identify command - Handle PIN - Implement --getnetworkstatus - Support writing gnokii-0.6.31/Docs/CodingStyle0000644000175000017500000002003611666163117014251 0ustar leoleo Gnokii coding style (derived from Linux kernel coding style) First off, I'd suggest printing out a copy of the GNU coding standards, and NOT read it. Burn them, it's a great symbolic gesture. Anyway, here goes: Chapter 1: Indentation Tabs are 8 characters, and thus indentations are also 8 characters. There are heretic movements that try to make indentations 4 (or even 2!) characters deep, and that is akin to trying to define the value of PI to be 3. Rationale: The whole idea behind indentation is to clearly define where a block of control starts and ends. Especially when you've been looking at your screen for 20 straight hours, you'll find it a lot easier to see how the indentation works if you have large indentations. Now, some people will claim that having 8-character indentations makes the code move too far to the right, and makes it hard to read on a 80-character terminal screen. The answer to that is that if you need more than 3 levels of indentation, you're screwed anyway, and should fix your program. In short, 8-char indents make things easier to read, and have the added benefit of warning you when you're nesting your functions too deep. Heed that warning. Chapter 2: Placing Braces The other issue that always comes up in C styling is the placement of braces. Unlike the indent size, there are few technical reasons to choose one placement strategy over the other, but the preferred way, as shown to us by the prophets Kernighan and Ritchie, is to put the opening brace last on the line, and put the closing brace first, thusly: if (x is true) { we do y } However, there is one special case, namely functions: they have the opening brace at the beginning of the next line, thus: int function(int x) { body of function } Heretic people all over the world have claimed that this inconsistency is ... well ... inconsistent, but all right-thinking people know that (a) K&R are _right_ and (b) K&R are right. Besides, functions are special anyway (you can't nest them in C). Note that the closing brace is empty on a line of its own, _except_ in the cases where it is followed by a continuation of the same statement, ie a "while" in a do-statement or an "else" in an if-statement, like this: do { body of do-loop } while (condition); and if (x == y) { .. } else if (x > y) { ... } else { .... } Rationale: K&R. Also, note that this brace-placement also minimizes the number of empty (or almost empty) lines, without any loss of readability. Thus, as the supply of new-lines on your screen is not a renewable resource (think 25-line terminal screens here), you have more empty lines to put comments on. Chapter 3: Naming C is a Spartan language, and so should your naming be. Unlike Modula-2 and Pascal programmers, C programmers do not use cute names like ThisVariableIsATemporaryCounter. A C programmer would call that variable "tmp", which is much easier to write, and not the least more difficult to understand. HOWEVER, while mixed-case names are frowned upon, descriptive names for global variables are a must. To call a global function "foo" is a shooting offense. GLOBAL variables (to be used only if you _really_ need them) need to have descriptive names, as do global functions. If you have a function that counts the number of active users, you should call that "count_active_users()" or similar, you should _not_ call it "cntusr()". Encoding the type of a function into the name (so-called Hungarian notation) is brain damaged - the compiler knows the types anyway and can check those, and it only confuses the programmer. No wonder MicroSoft makes buggy programs. LOCAL variable names should be short, and to the point. If you have some random integer loop counter, it should probably be called "i". Calling it "loop_counter" is non-productive, if there is no chance of it being mis-understood. Similarly, "tmp" can be just about any type of variable that is used to hold a temporary value. If you are afraid to mix up your local variable names, you have another problem, which is called the function-growth-hormone-imbalance syndrome. See next chapter. Chapter 4: Functions Functions should be short and sweet, and do just one thing. They should fit on one or two screenfuls of text (the ISO/ANSI screen size is 80x24, as we all know), and do one thing and do that well. The maximum length of a function is inversely proportional to the complexity and indentation level of that function. So, if you have a conceptually simple function that is just one long (but simple) case-statement, where you have to do lots of small things for a lot of different cases, it's OK to have a longer function. However, if you have a complex function, and you suspect that a less-than-gifted first-year high-school student might not even understand what the function is all about, you should adhere to the maximum limits all the more closely. Use helper functions with descriptive names (you can ask the compiler to in-line them if you think it's performance-critical, and it will probably do a better job of it that you would have done). Another measure of the function is the number of local variables. They shouldn't exceed 5-10, or you're doing something wrong. Re-think the function, and split it into smaller pieces. A human brain can generally easily keep track of about 7 different things, anything more and it gets confused. You know you're brilliant, but maybe you'd like to understand what you did 2 weeks from now. Chapter 5: Commenting Comments are good, but there is also a danger of over-commenting. NEVER try to explain HOW your code works in a comment: it's much better to write the code so that the _working_ is obvious, and it's a waste of time to explain badly written code. Generally, you want your comments to tell WHAT your code does, not HOW. Also, try to avoid putting comments inside a function body: if the function is so complex that you need to separately comment parts of it, you should probably go back to chapter 4 for a while. You can make small comments to note or warn about something particularly clever (or ugly), but try to avoid excess. Instead, put the comments at the head of the function, telling people what it does, and possibly WHY it does it. Chapter 6: You've made a mess of it That's OK, we all do. You've probably been told by your long-time Unix user helper that "GNU emacs" automatically formats the C sources for you, and you've noticed that yes, it does do that, but the defaults it uses are less than desirable (in fact, they are worse than random typing - a infinite number of monkeys typing into GNU emacs would never make a good program). So, you can either get rid of GNU emacs, or change it to use saner values. To do the latter, you can stick the following in your .emacs file: (defun linux-c-mode () "C mode with adjusted defaults for use with the Linux kernel." (interactive) (c-mode) (c-set-style "K&R") (setq c-basic-offset 8)) This will define the M-x linux-c-mode command. When hacking on a module, if you put the string -*- linux-c -*- somewhere on the first two lines, this mode will be automatically invoked. Also, you may want to add (setq auto-mode-alist (cons '("/usr/src/linux.*/.*\\.[ch]$" . linux-c-mode) auto-mode-alist)) to your .emacs file if you want to have linux-c-mode switched on automagically when you edit source files under /usr/src/linux. But even if you fail in getting emacs to do sane formatting, not everything is lost: use "indent". Now, again, GNU indent has the same brain dead settings that GNU emacs has, which is why you need to give it a few command line options. However, that's not too bad, because even the makers of GNU indent recognize the authority of K&R (the GNU people aren't evil, they are just severely misguided in this matter), so you just give indent the options "-kr -i8" (stands for "K&R, 8 character indents"). "indent" has a lot of options, and especially when it comes to comment re-formatting you may want to take a look at the manual page. But remember: "indent" is not a fix for bad programming. gnokii-0.6.31/Docs/Bugs0000644000175000017500000000346311666163117012732 0ustar leoleoBefore reporting a problem with gnokii make sure that: * it isn't a known problem (use a search engine) * it still exists in the current development version * you can explain how to reproduce it Your report will be useless without the following information: * phone model and how do you connect (Bluetooth/IrDa/cable with its type) * the values of the configuration parameters model, connection and port * which program you are using (gnokii, xgnokii, smsd) and its version * (gnokii --version or smsd --version) along with source for it: git, tarball, binary package * edit your gnokiirc and enable debugging (see below) and attach gzipped output to the email: $ LC_MESSAGES=en_US.UTF8 gnokii {parameters} >errfile 2>&1 (with LC_MESSAGE=en_US.UTF8 the program output and the error messages will be in English) * if you get a SEGFAULT, a backtrace is needed (refer to http://wiki.gnokii.org/index.php/Segfault) * if you get encoding errors always use the git version * if you are using a Nokia do your tests also with the fake driver * if you get communication errors, kernel version (and libusb version when using connection = dku2libusb) Send resulting report to gnokii-users (at) nongnu.org If you want to debug yourself, use the git version and run autogen.sh (or configure) with --disable-shared to build statically linked versions that are easier to deal with, in this case the executables can be run as: gnokii/gnokii xgnokii/xgnokii smsd/smsd Debug routines are compiled in by default and can be enabled in the [logging] section of the configuration file. To enable the debug output for the drivers and for gnokii, set debug = on. To enable the debug output for higer level routines of smsd and xgnokii, set xdebug = on. [logging] debug = on xdebug = on gnokii-0.6.31/Docs/README-Symbian0000644000175000017500000001036411666163117014365 0ustar leoleo-- README-Symbian -- Notes, bugs and a todo list for the Symbian (Nokia Series 60) phones -- * Notes * First of all, phones supported by this driver so far are all Symbian Series60 prior to 3rd Edition phones. Symbian Series60 3rd Edition and Symbian Series80 phones are not supported by this driver. Tested phones are: * Nokia 3650 (S60 1st) * Nokia 6600 (S60 2nd) * Nokia 7650 (S60 1st) * Nokia N-Gage QD (S60 1st, need to set irda = 0 in gnapplet.ini) * Siemens SX1 (S60 1st) Untested phones, but they have to work: * S60 1st o Nokia 3660 o Nokia N-Gage o Sendo X * S60 2nd o Nokia 3230 o Nokia 6260 o Nokia 6630 o Nokia 6670 o Nokia 6680 o Nokia 6681 o Nokia 6682 o Nokia N70 o Nokia N72 o Nokia N90 o Panasonic X700 o Panasonic X800 o Samsung SGH-D710 o Samsung SGH-D720 o Samsung SGH-D730 o Samsung SGH-Z600 These are Symbian phones that will NOT work with this driver. You can get limited functionality for them with gnokii using AT driver: * S60 3rd o Nokia 3250 o Nokia 5500 o Nokia E50-1 o Nokia E50-2 o Nokia E60 o Nokia E61 o Nokia E61i o Nokia E65 o Nokia E70 o Nokia E90 o Nokia N71 o Nokia N73 o Nokia N73ME o Nokia N76 o Nokia N80 o Nokia N91 o Nokia N92 o Nokia N93 o Nokia N93i o Nokia N95 * S80 1st o Nokia 9110 o Nokia 9110i o Nokia 9210 o Nokia 9210i * S80 2nd o Nokia 9300 o Nokia 9300i o Nokia 9500 * UIQ 2nd o Arima U300 o Benq P30 o Motorola A920 o Motorola A925 o Motorola A1000 o Motorola A1010 o SonyEricsson P800 o SonyEricsson P900 o SonyEricsson P910 * UIQ 3rd o SonyEricsson P990i o SonyEricsson M600i o SonyEricsson W950i Most of the modern phones are based on the Symbian OS. These phones have broken the convention and replaced the traditional FBUS protocol framework by a new one. The new protocol provides synchronizational functionality, but the older one was more powerful. This is one of the reasons we decided that analysis of the new protocol is time wasting. Our plan is to create a client-server application. The client part is built into libgnokii, the server part runs on the phone. These communicate with our own protocol. The client and the server application is tightly coupled, so you have to use the same version on both side. The source code of the server application (called gnapplet) is licensed under the GNU GPL, it can be downloaded from the gnokii cvs. Compiling gnapplet requires special tools, you can look into gnupoc (http://www.gnupoc.org). Installing the Nokia SDK isn't easy, so we provide a pre-compiled version. You can find the appropriate version in the Docs/ directory of the tarball (called gnapplet.sis). You can install the SIS file in the same way as another symbian application. You can transfer it to the phone over the OBEX protocol (OBEX is available over IrDA or Bluetooth or cable connection). You can use the following settings in your config file to access the phone: - Bluetooth connection [global] port = _bluetooth_address_ rfcomm_channel = 14 model = symbian connection = bluetooth - IrDA connection [global] port = /dev/ircomm0 model = symbian connection = irda - TCP/IP connection (disabled by default, you have to edit gnapplet.ini on your phone to enable it) [global] port = 169.254.1.68:1912 (put the IP address of your phone here) model = symbian connection = tcp You have to start gnapplet first (you'll find it in the menu), then start gnokii or xgnokii. After gnokii disconnects (or you won't connect in 30 seconds), the application will terminate. The current code is able to: * identify the phone * read/write/delete phonebook entries * read/delete call log (missed, received, dialled calls) * read the memory status * read network info * read RF/battery level * read/set clock, read/set alarm * read/write/delete calendar entries * read/write/delete todo entries * send/receive sms * Bugs * * phonebook handling is quite limited: o name isn't set or read correctly o missing attributes o no group handling o missing SIM memory handling * gnapplet seems to not work on SymbianOS v3 devices (eg. Nokia 5500) * TODO * * implement the missing things :-) gnokii-0.6.31/Docs/logos.txt0000644000175000017500000000364211666163117013772 0ustar leoleo$Id$ ------------------------[ Tutorial about logos files ]------------------------- nol (operator logo) and ngg (caller logo) files include the header as few first bytes of their content. That is 16 or 20 bytes structure. Header contains type of the file, netcode, width and height of icon. But width and height of icon is very important. Why? Because in NOKIA 7110, width = 72 bytes and height = 28 lines, and in other NOKIA phones witdh = 72 bytes, but height is only 14 lines ( thx for that info to Gabriele Zappi ). [1] NOL header 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 N O L 0 1 0 x 0 1 0 x 0 x 0 1 0 1 0 x 0 so : first 3 bytes that's type of file next 3 bytes (4,5,6) - nothing important next 4 (7,8,9,10) - network code : sprintf(netcode, "%d %02d", header[7] + 256 * header[8], header[9]); <<<<<<<<<<< this line is from common/gsm-common.h >>>>>>>>>>> next 3 (11,12,13) - very important bytes : width of icon = header[11] height of icon = header[13] another 7 bytes (14,15,..,20) - I think that's nothing special [2] NGG header 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 N G G 0 1 0 x 0 x 0 1 0 1 0 x 0 so : first 3 bytes that's type of file next 3 bytes (4,5,6) - nothing important next 3 (7,8,9) - very important width of icon = header[7] height of icon = header[9] another 7 bytes (10,11,..,16) - nothing special [3] icon's bytes To show icon on terminal you can read (height) times 72 bytes line and print these lines in the terminal: ... for (i = 0; i < heigth; i++) { read(buffer, 1, width, fd); printf("%s\n", buffer); } ... ------------------[ 2001 crayola <--> szuflandia corporation ]----------------- crayola@polbox.com klepacz@juni.gliwice.pl gnokii-0.6.31/Docs/FAQ0000644000175000017500000002024611666163117012437 0ustar leoleoGNOKII FAQ Pawel Kot, gnokii@gmail.com Hugh Blemings, hugh@blemings.org ------------------------------------------------------------------------------- Q. What is gnokii? A. It is the name of a project that aims to develop tools and drivers for the mobile phones and modems. These tools include modem drivers, console tools, GUI applications etc. All software that forms part of the project is released under the GNU General Public License. Please see the COPYING file for more details on license/copying issues, the lack of warranty and where to send a postcard if you like gnokii :-) Gnokii is designed to work on a variety of operating systems (Linux, FreeBSD, MacOS X, Windows, etc.) and hardware platforms (PPC, Intel, etc.) ------------------------------------------------------------------------------- Q. How do you pronounce gnokii? A. You can pronounce gnokii as "gnooki" or "gnocki" as you prefer :-) Note, that there's already a gnocky project, a gtk2 frontend to gnokii, so keep it in mind to be able to distinct them. ------------------------------------------------------------------------------- Q. What models are supported? A. You can assume that your phone is supported, however there are rare cases that you will get very limited functionality with gnokii. If you have a fairly modern phone you should use the following model setting in your config file: - model = series40, if you have Nokia non-Symbian Series60 phone, - model = gnapplet, if you have Nokia Symbian Series60 prior to 3rd Edition phone, - model = AT, for all other. If you have some older Nokia (like 6210) phone you may try using its brand name, eg. model = 6210. See also our for configurations known to work. Symbian series60 3rd edition (most Nokia n and e series) are not supported by gnapplet driver due to changes in Symbian API. For now you can get some functionality using AT driver. gnokii will not work with iPhones, Windows Mobile phones, BlackBerries and most likely Androids. You can try using AT driver for that purpose but expected results are miserable. ------------------------------------------------------------------------------- Q. I get "Hmmm... GSM_LinkOK never went true. Quitting." message when running gnokii. What's wrong? A. Gnokii cannot connect to the phone. Possible reasons are: - wrong serial port is defined in gnokii config file, - you are using the wrong cable, - you are using not supported phone model, - you don't have permission to write to /dev/ttySX device. ------------------------------------------------------------------------------- Q. Does mgnokiidev need to be suid root? A. Yes. gnokiid needs to create a symbolic link in the /dev directory. mgnokiidev is the program which does this and hence it must be suid root so it can write to the directory. mgnokiidev is executable only for gnokii group members (and root) so it presents a minimal security risk. Be sure that you don't use a version of gnokii older than 0.3.5 if you want to install mkgnokiidev suid root and give the access for execution for untrusted users. Earlier versions had security problems and allowed people to write to an arbitrary file. ------------------------------------------------------------------------------- Q. Should any other gnokii binary be installed suid root? A. No. There is no need. gnokii isn't intended for setuid/setgid operation. If you set the setuid/setgid bit, you're taking a huge security risk. All you need is read/write permission for the device you are using for connection (port option in the config file). You can safely do it using groups management. ------------------------------------------------------------------------------- Q. I'd like to send/receive sms, to handle voice calls, etc from my own application. What should I do? A. If the license of your application is GPL the easiest solution is to use libgnokii. In this case you needn't to handle low level stuff, libgnokii will do it for you. If you want to use a scripting language, you can choose between Perl, PHP and Ruby. First version of Perl bindings was prepared by Konstantin Agouros and is available at: http://www.agouros.de/gnokii Please note that this version does not work with current version. The up-do-date version was prepared by H. Merijn Brand and is available at: http://repo.or.cz/w/GSM-Gnokii.git PHP bindings were prepared by Daniele Forsi and are available at: git://git.savannah.nongnu.org/gnokii/gnokii-extras.git Ruby bindings were prepared by Thyagarajan Shanmugham and are available at: http://github.com/thyagarajan/rubynokii/wikis/home ------------------------------------------------------------------------------- Q. Can I get a copy of the protocol for the ? A. We don't have any formal documentation of the protocols in use. Since we get this request once a week on average we'll repeat the answer here... :) We don't have any formal documentation of the protocols in use. The best source we can offer is the knowledge assembled by Nagy Balazs and Marcin Wiacek. You can find result of their work in Docs/protocol/ subdirectory in gnokii sources. Note that not all known protocol functions are implemented in gnokii. There's a good introduction to FBUS: http://www.embedtronics.com/nokia/fbus.html ------------------------------------------------------------------------------- Q. Which cable for the Nokia phones should I use? A. Please refer to the vendor website. They always have the most accurate information. ------------------------------------------------------------------------------- Q. My phone is not mentioned as supported by gnokii, but it seems that it is similar to the one of the mentioned in the supported phones list? What should I do to check this out? A. It is quite simple. If you use AT compatible phone you can just use 'model = AT' in the config file. If you have Nokia and you would like to enable FBUS mode (it has more facilities then AT mode), there are few things you should do. For modern Nokias you can have either series40 or series60 phone. You can check this information at http://www.forum.nokia.com/Devices/. If you have series60 you are unlucky. You need to stick to AT driver. If you have series40 you may just try to run gnokii. If it doesn't work you may try adding the following section to the config file: [flags] RM-443=6303, PM_DEFAULT_S40_30 The flags are explained in the sample config file. You can choose the right flags by comparing the OS version with the models configured in common/misc.c already. ------------------------------------------------------------------------------- Q. I'm using the Win32 gnokii distribution and got the error "Couldn't open FBUS device". What's wrong? A. Make sure that you put in the config file "port = com1:", not "port = :com1". ------------------------------------------------------------------------------- Q. How do I enable debug output? A. Place the new section in your config file (or update existing section in a similiar way): [logging] debug = on ------------------------------------------------------------------------------- Q. Please help me configure my Nokia eXX/nYY to work with gnokii. A. Nokia e and n series are Symbian Series60 3rd Edition based. Our gnapplet driver is not compatible with this OS (yet). You can get limited functionality (due to Symbian limitation) by using AT driver. ------------------------------------------------------------------------------- Q. Why bluetooth connection under Windows does not work? A. gnokii supports only MS bluetooth stack on Windows. Make sure you use it. ------------------------------------------------------------------------------- Q. Where gnokii config file is located? A. As of gnokii 0.6.30 the primary locations where the config files are searched is: Windows: %APPDATA%\gnokii\gnokii.ini MacOS X: $HOME/Library/Preferences/gnokii/config Everything else: $XDG_CONFIG_HOME/gnokii/config or $HOME/.config/gnokii/config gnokii-0.6.31/Docs/ringtones.txt0000644000175000017500000000054111666163120014644 0ustar leoleoTo use ringtone support, create file containing ringtone: echo ':d=4,o=5,b=100:c.,c,8c,c.,d#,8d,d,8c,c,8c,2c.' > /tmp/delme [This is so-called RTTTL, see http://overtonez.co.uk/info/rtttl.txt] then set it on the phone gnokii --setringtone /tmp/delme . Good source of ringtones is http://overtonez.co.uk/ or for example http://www.micromelody.com/. gnokii-0.6.31/Docs/gnokii.nol0000755000175000017500000000200411666163117014072 0ustar leoleoNOLæHV000000000000000011111000000000000000000000000000011000011011000000000000000000000000000111111100000000000000000000000000011000011011000000000000000000000000000110101100000000000000000000000000011000000000000000000000000000000000000011111000000011100011111000011100011011011011000000000000000000000000000101110100000111110011111100110110011011011011000000000000000000000000001100100110001100011011001101100011011110011011000000000000000000000000001100000110001100011011001101100011011111011011000000000000000000000000011000000111001111111011001100110110011011011011000000000000000000000000011000000111000111111011001100011100011001011011000000000000000000000000011000000111000000011000000000000000000000000000000000000000000000000000111000001111000000011000000000000000000000000000000000000000000000000001111100001111100011111000000000000000000000000000000000000000000000000001111100011111000001111000000000000000000000000000000000000000000000000000111111111110000000000000000000000000000000000000000000000000gnokii-0.6.31/Docs/sample/0000755000175000017500000000000011666163461013364 5ustar leoleognokii-0.6.31/Docs/sample/Makefile.am0000644000175000017500000000026211666163120015410 0ustar leoleoSUBDIRS = ppp logo ringtone vCalendar sampledocsdir = $(datadir)/doc/gnokii/sample sampledocs_DATA = gnokiirc \ magic \ 45-nokiadku2.rules EXTRA_DIST = $(sampledocs_DATA) gnokii-0.6.31/Docs/sample/Makefile.in0000644000175000017500000005251011666163210015424 0ustar leoleo# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = Docs/sample DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_expand_dir.m4 \ $(top_srcdir)/m4/acx_pthread.m4 $(top_srcdir)/m4/intltool.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(sampledocsdir)" DATA = $(sampledocs_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLUETOOTH_LIBS = @BLUETOOTH_LIBS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FIND = @FIND@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLDFLAGS = @GLDFLAGS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GMODULE_CFLAGS = @GMODULE_CFLAGS@ GMODULE_LIBS = @GMODULE_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GNOKII_LT_VERSION = @GNOKII_LT_VERSION@ GNOKII_LT_VERSION_AGE = @GNOKII_LT_VERSION_AGE@ GNOKII_LT_VERSION_CURRENT = @GNOKII_LT_VERSION_CURRENT@ GNOKII_LT_VERSION_REVISION = @GNOKII_LT_VERSION_REVISION@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_LIBICAL = @HAVE_LIBICAL@ HAVE_LIBUSB = @HAVE_LIBUSB@ HAVE_SOCKETPHONET = @HAVE_SOCKETPHONET@ HAVE_XGNOKII = @HAVE_XGNOKII@ ICAL_CFLAGS = @ICAL_CFLAGS@ ICAL_LIBS = @ICAL_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBGNOKII_VERSION_MAJOR = @LIBGNOKII_VERSION_MAJOR@ LIBGNOKII_VERSION_MINOR = @LIBGNOKII_VERSION_MINOR@ LIBGNOKII_VERSION_RELEASE = @LIBGNOKII_VERSION_RELEASE@ LIBGNOKII_VERSION_STRING = @LIBGNOKII_VERSION_STRING@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBPCSCLITE_CFLAGS = @LIBPCSCLITE_CFLAGS@ LIBPCSCLITE_LIBS = @LIBPCSCLITE_LIBS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKE = @MAKE@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ MYSQLCONFIG = @MYSQLCONFIG@ MYSQLCONFIG5 = @MYSQLCONFIG5@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_LIBS = @MYSQL_LIBS@ NEED_LOCALE_CHARSET = @NEED_LOCALE_CHARSET@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OWN_GETOPT = @OWN_GETOPT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PGCONFIG = @PGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSTGRES_CFLAGS = @POSTGRES_CFLAGS@ POSTGRES_LIBS = @POSTGRES_LIBS@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LIBS = @SQLITE3_LIBS@ SQLITE_CFLAGS = @SQLITE_CFLAGS@ SQLITE_LIBS = @SQLITE_LIBS@ STRIP = @STRIP@ TCP_LIBS = @TCP_LIBS@ TERMLDFLAGS = @TERMLDFLAGS@ TERMLIBS = @TERMLIBS@ USB_LIBS = @USB_LIBS@ USE_NLS = @USE_NLS@ USE_UNIX98PTYS = @USE_UNIX98PTYS@ VERSION = @VERSION@ WIN32 = @WIN32@ WIN32_CROSS = @WIN32_CROSS@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ XPACKAGE = @XPACKAGE@ XPM_CFLAGS = @XPM_CFLAGS@ XPM_LIBS = @XPM_LIBS@ XVERSION = @XVERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ acx_pthread_config = @acx_pthread_config@ 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@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = ppp logo ringtone vCalendar sampledocsdir = $(datadir)/doc/gnokii/sample sampledocs_DATA = gnokiirc \ magic \ 45-nokiadku2.rules EXTRA_DIST = $(sampledocs_DATA) all: all-recursive .SUFFIXES: $(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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Docs/sample/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Docs/sample/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 $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-sampledocsDATA: $(sampledocs_DATA) @$(NORMAL_INSTALL) test -z "$(sampledocsdir)" || $(MKDIR_P) "$(DESTDIR)$(sampledocsdir)" @list='$(sampledocs_DATA)'; test -n "$(sampledocsdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sampledocsdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(sampledocsdir)" || exit $$?; \ done uninstall-sampledocsDATA: @$(NORMAL_UNINSTALL) @list='$(sampledocs_DATA)'; test -n "$(sampledocsdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(sampledocsdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(sampledocsdir)" && rm -f $$files # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(sampledocsdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-sampledocsDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-sampledocsDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean 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-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-sampledocsDATA install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am \ uninstall-sampledocsDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gnokii-0.6.31/Docs/sample/ringtone/0000755000175000017500000000000011666163461015211 5ustar leoleognokii-0.6.31/Docs/sample/ringtone/Makefile.am0000644000175000017500000000020711666163120017234 0ustar leoleoringtonedocsdir = $(datadir)/doc/gnokii/sample/ringtone ringtonedocs_DATA = star.imelody star.rtttl EXTRA_DIST = $(ringtonedocs_DATA) gnokii-0.6.31/Docs/sample/ringtone/Makefile.in0000644000175000017500000003442611666163211017260 0ustar leoleo# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = Docs/sample/ringtone DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_expand_dir.m4 \ $(top_srcdir)/m4/acx_pthread.m4 $(top_srcdir)/m4/intltool.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(ringtonedocsdir)" DATA = $(ringtonedocs_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLUETOOTH_LIBS = @BLUETOOTH_LIBS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FIND = @FIND@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLDFLAGS = @GLDFLAGS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GMODULE_CFLAGS = @GMODULE_CFLAGS@ GMODULE_LIBS = @GMODULE_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GNOKII_LT_VERSION = @GNOKII_LT_VERSION@ GNOKII_LT_VERSION_AGE = @GNOKII_LT_VERSION_AGE@ GNOKII_LT_VERSION_CURRENT = @GNOKII_LT_VERSION_CURRENT@ GNOKII_LT_VERSION_REVISION = @GNOKII_LT_VERSION_REVISION@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_LIBICAL = @HAVE_LIBICAL@ HAVE_LIBUSB = @HAVE_LIBUSB@ HAVE_SOCKETPHONET = @HAVE_SOCKETPHONET@ HAVE_XGNOKII = @HAVE_XGNOKII@ ICAL_CFLAGS = @ICAL_CFLAGS@ ICAL_LIBS = @ICAL_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBGNOKII_VERSION_MAJOR = @LIBGNOKII_VERSION_MAJOR@ LIBGNOKII_VERSION_MINOR = @LIBGNOKII_VERSION_MINOR@ LIBGNOKII_VERSION_RELEASE = @LIBGNOKII_VERSION_RELEASE@ LIBGNOKII_VERSION_STRING = @LIBGNOKII_VERSION_STRING@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBPCSCLITE_CFLAGS = @LIBPCSCLITE_CFLAGS@ LIBPCSCLITE_LIBS = @LIBPCSCLITE_LIBS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKE = @MAKE@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ MYSQLCONFIG = @MYSQLCONFIG@ MYSQLCONFIG5 = @MYSQLCONFIG5@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_LIBS = @MYSQL_LIBS@ NEED_LOCALE_CHARSET = @NEED_LOCALE_CHARSET@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OWN_GETOPT = @OWN_GETOPT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PGCONFIG = @PGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSTGRES_CFLAGS = @POSTGRES_CFLAGS@ POSTGRES_LIBS = @POSTGRES_LIBS@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LIBS = @SQLITE3_LIBS@ SQLITE_CFLAGS = @SQLITE_CFLAGS@ SQLITE_LIBS = @SQLITE_LIBS@ STRIP = @STRIP@ TCP_LIBS = @TCP_LIBS@ TERMLDFLAGS = @TERMLDFLAGS@ TERMLIBS = @TERMLIBS@ USB_LIBS = @USB_LIBS@ USE_NLS = @USE_NLS@ USE_UNIX98PTYS = @USE_UNIX98PTYS@ VERSION = @VERSION@ WIN32 = @WIN32@ WIN32_CROSS = @WIN32_CROSS@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ XPACKAGE = @XPACKAGE@ XPM_CFLAGS = @XPM_CFLAGS@ XPM_LIBS = @XPM_LIBS@ XVERSION = @XVERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ acx_pthread_config = @acx_pthread_config@ 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@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ringtonedocsdir = $(datadir)/doc/gnokii/sample/ringtone ringtonedocs_DATA = star.imelody star.rtttl EXTRA_DIST = $(ringtonedocs_DATA) all: all-am .SUFFIXES: $(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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Docs/sample/ringtone/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Docs/sample/ringtone/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 $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-ringtonedocsDATA: $(ringtonedocs_DATA) @$(NORMAL_INSTALL) test -z "$(ringtonedocsdir)" || $(MKDIR_P) "$(DESTDIR)$(ringtonedocsdir)" @list='$(ringtonedocs_DATA)'; test -n "$(ringtonedocsdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(ringtonedocsdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(ringtonedocsdir)" || exit $$?; \ done uninstall-ringtonedocsDATA: @$(NORMAL_UNINSTALL) @list='$(ringtonedocs_DATA)'; test -n "$(ringtonedocsdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(ringtonedocsdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(ringtonedocsdir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(ringtonedocsdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-ringtonedocsDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-ringtonedocsDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am \ install-ringtonedocsDATA install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-ringtonedocsDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gnokii-0.6.31/Docs/sample/ringtone/star.rtttl0000644000175000017500000000020711666163120017244 0ustar leoleoStar:d=4,o=5,b=180:8a,8g,4e,4e,4e,8db,4g,4g,4a,8g,8a,4b,8a,8g,8e,4db,4d,4d,4d,8a,8g,4e,4e,4e,4d,8#f,4g,4g,4a,8g,8a,4b,8a,8g,4e,4d,4e,4egnokii-0.6.31/Docs/sample/ringtone/star.imelody0000644000175000017500000000020011666163120017526 0ustar leoleoBEGIN:IMELODY VERSION:1.0 FORMAT:CLASS1.0 MELODY:a4g4e3e3e3d4*3b4g3g3a3g4a4b3a4g4e4d4*3b3d3d3d3a4g4e3e3e3d4#f4 END:IMELODY gnokii-0.6.31/Docs/sample/logo/0000755000175000017500000000000011666163461014324 5ustar leoleognokii-0.6.31/Docs/sample/logo/Makefile.am0000644000175000017500000000026511666163120016353 0ustar leoleologodocsdir = $(datadir)/doc/gnokii/sample/logo logodocs_DATA = pacman.xpm \ gnokii.xpm \ gnokiiop.xpm \ horse.xpm \ bronto.xpm \ horse2.xpm EXTRA_DIST = $(logodocs_DATA)gnokii-0.6.31/Docs/sample/logo/Makefile.in0000644000175000017500000003434611666163210016373 0ustar leoleo# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = Docs/sample/logo DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_expand_dir.m4 \ $(top_srcdir)/m4/acx_pthread.m4 $(top_srcdir)/m4/intltool.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(logodocsdir)" DATA = $(logodocs_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLUETOOTH_LIBS = @BLUETOOTH_LIBS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FIND = @FIND@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLDFLAGS = @GLDFLAGS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GMODULE_CFLAGS = @GMODULE_CFLAGS@ GMODULE_LIBS = @GMODULE_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GNOKII_LT_VERSION = @GNOKII_LT_VERSION@ GNOKII_LT_VERSION_AGE = @GNOKII_LT_VERSION_AGE@ GNOKII_LT_VERSION_CURRENT = @GNOKII_LT_VERSION_CURRENT@ GNOKII_LT_VERSION_REVISION = @GNOKII_LT_VERSION_REVISION@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_LIBICAL = @HAVE_LIBICAL@ HAVE_LIBUSB = @HAVE_LIBUSB@ HAVE_SOCKETPHONET = @HAVE_SOCKETPHONET@ HAVE_XGNOKII = @HAVE_XGNOKII@ ICAL_CFLAGS = @ICAL_CFLAGS@ ICAL_LIBS = @ICAL_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBGNOKII_VERSION_MAJOR = @LIBGNOKII_VERSION_MAJOR@ LIBGNOKII_VERSION_MINOR = @LIBGNOKII_VERSION_MINOR@ LIBGNOKII_VERSION_RELEASE = @LIBGNOKII_VERSION_RELEASE@ LIBGNOKII_VERSION_STRING = @LIBGNOKII_VERSION_STRING@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBPCSCLITE_CFLAGS = @LIBPCSCLITE_CFLAGS@ LIBPCSCLITE_LIBS = @LIBPCSCLITE_LIBS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKE = @MAKE@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ MYSQLCONFIG = @MYSQLCONFIG@ MYSQLCONFIG5 = @MYSQLCONFIG5@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_LIBS = @MYSQL_LIBS@ NEED_LOCALE_CHARSET = @NEED_LOCALE_CHARSET@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OWN_GETOPT = @OWN_GETOPT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PGCONFIG = @PGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSTGRES_CFLAGS = @POSTGRES_CFLAGS@ POSTGRES_LIBS = @POSTGRES_LIBS@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LIBS = @SQLITE3_LIBS@ SQLITE_CFLAGS = @SQLITE_CFLAGS@ SQLITE_LIBS = @SQLITE_LIBS@ STRIP = @STRIP@ TCP_LIBS = @TCP_LIBS@ TERMLDFLAGS = @TERMLDFLAGS@ TERMLIBS = @TERMLIBS@ USB_LIBS = @USB_LIBS@ USE_NLS = @USE_NLS@ USE_UNIX98PTYS = @USE_UNIX98PTYS@ VERSION = @VERSION@ WIN32 = @WIN32@ WIN32_CROSS = @WIN32_CROSS@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ XPACKAGE = @XPACKAGE@ XPM_CFLAGS = @XPM_CFLAGS@ XPM_LIBS = @XPM_LIBS@ XVERSION = @XVERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ acx_pthread_config = @acx_pthread_config@ 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@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ logodocsdir = $(datadir)/doc/gnokii/sample/logo logodocs_DATA = pacman.xpm \ gnokii.xpm \ gnokiiop.xpm \ horse.xpm \ bronto.xpm \ horse2.xpm EXTRA_DIST = $(logodocs_DATA) all: all-am .SUFFIXES: $(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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Docs/sample/logo/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Docs/sample/logo/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 $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-logodocsDATA: $(logodocs_DATA) @$(NORMAL_INSTALL) test -z "$(logodocsdir)" || $(MKDIR_P) "$(DESTDIR)$(logodocsdir)" @list='$(logodocs_DATA)'; test -n "$(logodocsdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(logodocsdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(logodocsdir)" || exit $$?; \ done uninstall-logodocsDATA: @$(NORMAL_UNINSTALL) @list='$(logodocs_DATA)'; test -n "$(logodocsdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(logodocsdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(logodocsdir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(logodocsdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-logodocsDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-logodocsDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-logodocsDATA install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am uninstall-logodocsDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gnokii-0.6.31/Docs/sample/logo/bronto.xpm0000644000175000017500000000424111666163120016346 0ustar leoleo/* XPM */ static char * bronto_xpm[] = { "72 28 2 1", ". c Opaque", " c None", " . . ", " . . . ", " ......... ", " . . . .. ", " . .. ", " . .. .. ", " .. ... .. ", " ..... .. ", " . .. ", " . . ", " . . ", " . . .... ", " . . . .. ", " . . . .. ", " . .. .. ", " . .. .. ", " . .. .. . ", " . .. .. .. ", " . .. .. .. ", " . .. .. ... ", " . . .. . .. ", " . ... .. ", " . .. ", " .... . .. . .. ", " . . . . . . . .. ", " . . ... . ... .. ", " . . ....... ....... ", " .......... ........ "}; gnokii-0.6.31/Docs/sample/logo/horse.xpm0000644000175000017500000001054011666163120016162 0ustar leoleo/* XPM */ static char * horse_xpm[] = { "64 64 3 1", " g None", ". g #FFFFFF", "+ g #000000", "................................................................", "................................................................", ".............................+.....+............................", "............................++...++.++..........................", "...........................+..+..+...++.........................", "...........................+..++.+...+.+........................", "..........................+...+.+....+.+........................", "..........................+...+.+.....+.+.......................", "..........................+++++.+.....+.+.......................", "........................+++++++++.....+..++.....................", "......................++.++.+++++.....+..++++...................", "......................+++.+++.........+..++..++.................", "....................+++.+++++..............++..+................", "...................+....++...................+..+...............", "...................+..++.....................++.+...............", ".................++............................++...............", ".................+..+...........................++..............", "....................+............................+..............", "...................+.....+++.....................+++............", "...................+.....+..+.............+........+............", "..................+......+..+..............++.......++..........", ".................+.......+.++..............+.+......+.+.........", "...............++.........++...............+........++.+........", "...............+...........................+..........+.+.......", ".............++.....++................................+..+......", "............+....+++++.................................+..+.....", "...........+....++..+..................................++.+.....", ".........++...++........................................+..+....", "........+...............................+................+.++...", "......+++..............................++................+..+...", "......+..+...............+.............+.................+...+..", "......+...++..............+..........++...................+..+..", "......+....+.............+++.......++.....................+...+.", "......+..++..+....+.....+...+++++++........................+..+.", ".......++..++....++...+++..........+.......................+..+.", ".........++......+++++.............+.....+......................", "..........+.....+..................+....+.......................", "...........+...+...................+.....+......................", "...........+++++....................+....+......................", "....................................+....+......................", "....................................+...........................", "................................................................", "..........................+.....................................", "............++++.........+.+...+++...++..+++....................", "...........+...+........+......+..+.+.++.+..+..........++.......", "...........+....+.......+.++...+..+.+..+.+..+.......+++.........", "...........+....+.......+...+..++.+.+..+.+..+......+............", "......+++..++..++........+++....++...++..+++.....++.............", "......+..+..+..+...++..........................++...............", ".....+...++.+++++++.+++......................++.................", ".....+....+.+++++++...+.....................+...................", ".....+....+++++....+...+++................++....................", ".....+...+..++.....+......++............++......................", "......++++.++++....+........++++.....+++........................", "...........+.++++++.............+++++...........................", "..........+...+.................................................", "..........+...+...........................+....+..+..++..+..+...", "..........++..+...........................+....+..+.+....+.+....", "............++............................+....+..+.+...+++.....", "..........................................+....+..+.+...+++.....", "..........................................+..+.+++..+...+..+....", "..........................................+++.......+++.+..++...", "................................................................", "................................................................"}; gnokii-0.6.31/Docs/sample/logo/horse2.xpm0000644000175000017500000000232511666163120016246 0ustar leoleo/* XPM */ static char * horse2_xpm[] = { "32 32 2 1", "+ c #FFFFFF", ". c #000000", "................................", "..............+.++..............", ".............+.++.+.............", ".............+.++.+.............", "...........++++++++++...........", "..........++++++...+++..........", ".........+++++........+.........", "........++.+...........++.......", "........+++.............+.......", ".........++..+.......+...+......", ".......++...+.+......++...+.....", "......++.....+.......+....++....", ".....++....................++...", ".....+.....................+++..", "...++..............++......++++.", "...+.+...+..+....+++........+.+.", "...+.+++.+..++++++..........+.++", "....+++.+++++....+..+..........+", ".....+..+........+..+........+..", "......++.........++.+...........", ".................++.............", "......++........................", ".....+..+.................++....", "...+.+..+................+......", "..++++++++++..........+++.......", "..+..+++++.++++.....++..........", "...++++..+...+++...++...........", "....+.+.++......+++.............", "...+.++++.......................", "...++++.........................", "................................", "................................"}; gnokii-0.6.31/Docs/sample/logo/gnokii.xpm0000644000175000017500000002067611666163120016335 0ustar leoleo/* XPM */ static char * gnokii_xpm[] = { "49 44 256 2", " c None", ". c #020203", "+ c #4C5A4C", "@ c #C2CAD2", "# c #8EA68C", "$ c #627661", "% c #0D1210", "& c #1A2622", "* c #6E8A6E", "= c #EAEAEB", "- c #223A36", "; c #A3A68E", "> c #9A9A8A", ", c #A2B2A4", "' c #DADEDC", ") c #524E4E", "! c #869E85", "~ c #8E7666", "{ c #506250", "] c #324A46", "^ c #8F9080", "/ c #6A626A", "( c #ADBAAE", "_ c #7B7A7B", ": c #7E967E", "< c #667E66", "[ c #CED2D0", "} c #566653", "| c #444244", "1 c #293E38", "2 c #878A77", "3 c #566A56", "4 c #424A44", "5 c #121A16", "6 c #B8C1BA", "7 c #122E2A", "8 c #0E0E10", "9 c #26628E", "0 c #D6DADA", "a c #5A82A6", "b c #768E76", "c c #373E3A", "d c #566E86", "e c #757773", "f c #E2E2E2", "g c #545C59", "h c #6A826A", "i c #EEEEEF", "j c #5E725E", "k c #9EAE9C", "l c #252D2B", "m c #9AB2C2", "n c #A2A692", "o c #8F9A8F", "p c #425650", "q c #7E856D", "r c #A6B4A6", "s c #7C8A98", "t c #BEC6BE", "u c #AEAEAE", "v c #1A322E", "w c #666C68", "x c #36423C", "y c #6D6E6E", "z c #494A49", "A c #869EB2", "B c #373A38", "C c #828676", "D c #262223", "E c #4E6682", "F c #828A72", "G c #626A68", "H c #0E0909", "I c #151E1A", "J c #9AA28A", "K c #6E786E", "L c #666666", "M c #8E8E8E", "N c #929E8A", "O c #92A6B6", "P c #828F7D", "Q c #29342F", "R c #DAD6DA", "S c #464F46", "T c #8E968A", "U c #AEB5B0", "V c #827A72", "W c #768574", "X c #B2BABA", "Y c #7A8E77", "Z c #3E423E", "` c #D2D6D5", " . c #5A655E", ".. c #82967F", "+. c #F1F2F2", "@. c #6E866E", "#. c #9AAA99", "$. c #BEBEBF", "%. c #466686", "&. c #7A927B", "*. c #7C7F7B", "=. c #767E7A", "-. c #C9CECC", ";. c #1E2626", ">. c #787068", ",. c #9EA28E", "'. c #0A0507", "). c #687671", "!. c #8AA288", "~. c #829A81", "{. c #E2E6E3", "]. c #364644", "^. c #667A65", "/. c #5A6E5A", "(. c #263A36", "_. c #171615", ":. c #898A8A", "<. c #5B5A5A", "[. c #555654", "}. c #A6A6A6", "|. c #1C1E1C", "1. c #7C867E", "2. c #B2B2B2", "3. c #BEC2C0", "4. c #362E32", "5. c #2E3631", "6. c #889692", "7. c #32463E", "8. c #364A46", "9. c #9EA292", "0. c #060708", "a. c #313E3C", "b. c #667267", "c. c #96A795", "d. c #4D4E4C", "e. c #889284", "f. c #9A9A99", "g. c #828671", "h. c #3E524E", "i. c #727E76", "j. c #2E3A33", "k. c #B6B6B6", "l. c #A9AAAA", "m. c #5A6A6A", "n. c #646C70", "o. c #3A4A45", "p. c #D2D2D2", "q. c #8C827E", "r. c #929292", "s. c #F5F6F6", "t. c #768A86", "u. c #7E8E84", "v. c #6E826C", "w. c #BABABA", "x. c #9E9E8E", "y. c #A2B2BE", "z. c #616262", "A. c #728A72", "B. c #2E2D2D", "C. c #526262", "D. c #9AA296", "E. c #8A9E87", "F. c #828A84", "G. c #5B5656", "H. c #4C524E", "I. c #060204", "J. c #7E927B", "K. c #3A463E", "L. c #4D564D", "M. c #4B5A57", "N. c #828282", "O. c #869A83", "P. c #323A34", "Q. c #728278", "R. c #6A6662", "S. c #454645", "T. c #32423E", "U. c #969697", "V. c #625C56", "W. c #526652", "X. c #6A869A", "Y. c #6A726D", "Z. c #5E6A5E", "`. c #5A5054", " + c #CECECE", ".+ c #8A8E7E", "++ c #768A73", "@+ c #92AA90", "#+ c #6A7E69", "$+ c #C2C6C4", "%+ c #6A7A68", "&+ c #726A6A", "*+ c #272627", "=+ c #707270", "-+ c #728670", ";+ c #1A221E", ">+ c #858685", ",+ c #9EA2A4", "'+ c #D6D6D6", ")+ c #DEDEDE", "!+ c #191A19", "~+ c #8EA28A", "{+ c #9E9E9E", "]+ c #4E4E56", "^+ c #DEDADE", "/+ c #5E5E5E", "(+ c #56665E", "_+ c #667272", ":+ c #859686", "<+ c #CACACA", "[+ c #121616", "}+ c #3E3E3E", "|+ c #AAB2BE", "1+ c #6E7E6F", "2+ c #92A690", "3+ c #4E4A4B", "4+ c #323631", "5+ c #5A6A62", "6+ c #E6E6E6", "7+ c #929A98", "8+ c #7C8E7E", "9+ c #C2C2C2", "0+ c #3E4E4E", "a+ c #424E44", "b+ c #888E8B", "c+ c #8E9296", "d+ c #9EAEAA", "e+ c #3A423D", "f+ c #3E3A3E", "g+ c #5F6661", "h+ c #3A4643", "i+ c #16221F", "j+ c #627266", "k+ c #5A6A5B", "l+ c #E6E2E6", "m+ c #969A8A", "n+ c #1E221E", "o+ c #C6C6C7", "p+ c #0A0A0A", "q+ c #525252", "r+ c #3E4640", "s+ c #4A4647", "t+ c #121211", "u+ c #4E5E4E", "v+ c #4A5E56", "w+ c #465252", "x+ c #2C3A3A", "y+ c #6B6A6A", "z+ c #323A3A", "A+ c #3E4A42", "B+ c #A2A2A2", "C+ c #93A196", "D+ c #7A7276", "E+ c #626E65", "F+ c #DADADA", "G+ c #BEBABE", " J V d.q.) x z G.q+S.e+L.Y.1.o l.k.$+ +p.'+p.p.<+$.u {+b+=.G a+x+a.a.a.K.d.h+7 T.- H ", " v+,.>.G.~ 4 x 4 e 7+3.f = 6+l+f )+)+)+' F+R F+R '+'+p.'+^+^+' )+` 2.e._+A+S | v x+(.H ", " M.; &+S V.K 2.= i i i = = 6+l+0 R '+p.9+9+<+'+9+o+'+9+'+0 ' ' ^+' F+)+' F+3.b+7.x+(.H ", " h.; R.e.i F+F+= = = 6+6+6+f {.R.c >+) y q+3+/+:.<.}.B.B+'+F+^+F+^+)+F+)+^+= 6+9+].1 8 ", " p ,.z.X i '+F+= 6+= 6+f {.)+)+y f.;.q+/+z q+_ y+<.H./+z +F+F+F+)+)+^+)+F+6+= <+0+a.8 ", " v+; <.$+= '+F+6+6+6+6+6+f f )+R ^+p.p.<+<+ +'+-. + +p. +'+'+F+F+F+F+' F+F+f i +h.T.8 ", " u+,.G.[ 6+p.'+6+{.{.f l+)+^+'+[ <+o+9+$.w.X G+k.G+G+9+9+$+-.` '+F+F+)+F+F+f i p.M.7.% ", " C.,.+ F+f +w.P 1.K b. .u+v++ + u+{ { 3 j j+$ ^.^.< %+^.1+1+Q.%+1+W u.e.T [ +.p.C.T.8 ", " (+x.H.)+' <+E+{ W.W.3 3 3 /./.j j+$ $ $ ^.< #+#+#+h v.@.-+-+A.++Y b &.8+J.( s.p. .].t+ ", " } x.p {.R $. .{ W.W.W.} 3 3 k+/.j $ $ $ ^.$ < #+#+#+h v.@.A.++A.++Y Y &.J.U +.F+G ].[+D ", " .> S {.p.$.{ { { W.3 3 /././.j /.j $ $ ^.^.< #+#+#+h -+-+-+++b ++b J.&.J.r s.0 E+7.[+q+ ", " 3 > h.= +2.} { W.} 3 3 3 /././.$ $ $ $ $ ^.^.#+#+v.v.-+A.Y ++J.J...J.J.: , s.F+Y.h+[+3+ ", " k+> A+6+<+u W.W.W.W.3 /././.j j j $ ^.^.%+%+#+h h -+v.-+-+++E+:+-+F.: : ..k +.F+Y.].5 s+ ", " E+^ 4 {.$+}.W.3 3 3 k+/./.j j j $ $ $ ^.< #+#+#+H.!++ ++++b j+l e.;.1+....#.s.^+=+].!+| ", " E+^ a+{.9+{+{ 3 3 } P.A+r+S g+r+r+P.+ v.u+c r+^.a+I.) Z.S Q.j+_.F n+K ....#.s.^+=+x !+| ", " j+^ K.l+6 {+W.3 3 P.. D . 8 d.. |.I.'.g+. *+'.p+) . z _.I.e.y I 1.Q *...O.c.s.' y 7.!+| ", " j ^ o.f $.f.W.k+k+B . >.8 8 3+. H._.0.q+I.w !+. `.. I . 4+N C.|.).l *...~.C++.F+).].I | ", " b..+r+F+6 U.W././.B . R.8 8 z . [.[+0.q+. R._.I.[.. . . _ : T.l /+% :+! O.2++.0 y 7.i+S. ", " Q.^ r+p.$.c+W././.B . n.8 8 3+. G.t+'.3+I.y+_.. G.I.. . g+:+n+}+]+8 D.! O.c.i '+n.].i+S. ", " t..+K.<+3.M W././.4+. _+8 8 3+. [._.'.3+I.y+!+I.<.I.. . *+E.8 S.c _.c.! ! C+s.` m.8.|.| ", " ++2 r+3.$+:.3 j j B . e 8 8 z . [._.'.]+I.y+_.. G.. e+0.. 1.% }+a.t+D.!.! C+s.[ C.8.& s+ ", " J.2 4 U <+b+W./.j B I.*+0.8 3+. [._.0./ . D 0.0.V.. H.4+. B I l H.'.o E.!.c.+.<+M.].i+z ", " A.F r+#.-.:./.j $ K 4 s+. 8 Q.w F.Y.K T E+s+q+>+1.w F.Q.&+D+*._+O. .#.~+!.#.s.<+h.].i+3+ ", " &.>+e+7+p.:./.j j .p+p+I.B P v.v.v.Q.-+++++++Y Y Y J.....~.~.! O.E.!.!.!.d+s.9+o.].i+d. ", " : C ].s ` >+b.j $ %+%+Y.K P h h v.@.-+-+++Y Y Y J.&.J.......~.! ! !.!.~+~+r +.w.x 8.i+]+ ", " 8+g.Z i.^+N.^.j j ^.^.%+%+#+v.v.@.-+-+A.++b b &.&.: : : O.! O.! E.E.~+# # U +.2.x+h+& ) ", " ..g.Z E+)+N.%+/./.$ ^.< #+#+v.v.-+A.++++++Y Y J.J.......~.! E.!.~+~+~+# @+6 i }.a.8.& q+ ", " ..g.e++ )+>+%+j $ $ ^.#+#+v.v.-+@.-+++b b Y &.&.J.: ..~.O.E.! E.!.!.# # 2+t = U.a.h+;+q+ ", " ..g.T.o.)+:.K j $ ^.^.#+#+v.v.-+-+-+++++b Y Y &.J.: ..~.~.O.! ! !.~+# @+@+ +)+N.T.7.;+[. ", " 6.q a.c +r.y j $ $ < #+h #+v.v.-+A.A.Y ++Y &.J.&.: ~...O.! ! E.E.!.# # @+' ' ).T.o.& G. ", " e.q a.x 2.}.w j $ $ < #+h v.-+@.-+++A.Y b Y &.J.: : ~.~.O.! !.!.~+~+# 2+# {.[ g 7.].& <. ", " ..q P.T.{+$._ i.v.Q.v.v.v.@.@.A.++A.++b &.J.J.: ....O.! ! E.! ~+# 2+c.@+, s.$+h.].h+n+<. ", " o g.P.P.1. +w. +{.= {.' ` -.6 ( #.C+T ..J.J.J...E.~+#.U 6 $+-.-.[ p.p.'++.= X ] ].].n+D ", " q j.P.G R $.p.f f )+F+[ <+ +<+p.'+' )+f {.6+6+6+6+f ' p.[ <+ +<+<+ +'+F+-.u 1 e+K.n+ ", " q 5.4+A+R w.X G+$.3.o+<+-.p.p.p. +p. +p.'+R ^+)+f )+F+'+` + +-.<+o+<+o+o+M j.h+].n+ ", " g.j.j.P.G+k.u 2.u u u u l.u l.2.k.$.o+o+ + +<+<+9+$.$.9+9+o+o+o+o+o+9+$.k.g+x K.K.;+ ", " F j.P.a.B.| <.z._ {+}.l.}.l.}.}.}.}.l.l.x.{+l.2.w.$.$.$.$.$.$.$.l._ q+S.Q [+x e+e+n+ ", " q 5.5.4+l -.)+<+B+e /+>+B+B+B+B+B+}.f.<.e e q+U.2.k.w.$.$.G+r.q+/ r.G+o+{+;.x x o.;+ ", " q 5.5.5.P.l.[ |+p.R p.M <.M {+B+{+{+<. + + +9+[.x.k.k.w.}.[.N.$+<+o+u r.e B.x x K.;+ ", " q j.j.Q B w '+O a @ F+'+<+R.U.{+B+z.w.9+2.l.G+2.<.u w.k.L o+ + +$+s d ,+| T.].e+e+;+ ", " g.5.P.5.5.B $+p.m 9 A 9+3.{+:.f.U._ 2.B+4.;.U.u _ M 2.u B+3.3.k.%.E ,+:.l e+].h+r+;+ ", " q 4+Q Q 4+a._ ` -.d+X.l.{+_ f.{+L u }.U.C M :.B+2.z.2.w.r.B+l.l.s }.{+]+a.].h+h+K.|. ", " F P.5.5.4+5.c G+o+w.B+b+y {+f.f.y $.2.u l.u 2.u k.y+}.k.G+>+:.f.{+{+>+Q Z h+h+h+h+;+ ", " F B Q 4+4+4+j.z.9+2.>+*.{+r.r.M :.$.o+<+ + +<+o+9+r.N.u k.w.c+*.f.U.| x e+e+r+r+A+I "}; gnokii-0.6.31/Docs/sample/logo/gnokiiop.xpm0000644000175000017500000000225411666163120016664 0ustar leoleo/* XPM */ static char *delme[] = { /* columns rows colors chars-per-pixel */ "72 14 2 1", ". c white", " c opaque", /* pixels */ " ..... .. .. .. ", " ....... .. .. .. ", " .. . .. .. ", " ..... ... ..... ... .. .. .. .. ", " . ... . ..... ...... .. .. .. .. .. .. ", " .. . .. .. .. .. .. .. .. .... .. .. ", " .. .. .. .. .. .. .. .. ..... .. .. ", " .. ... ....... .. .. .. .. .. .. .. .. ", " .. ... ...... .. .. ... .. . .. .. ", " .. ... .. ", " ... .... .. ", " ..... ..... ..... ", " ..... ..... .... ", " ........... " }; gnokii-0.6.31/Docs/sample/logo/pacman.xpm0000644000175000017500000000225411666163120016304 0ustar leoleo/* XPM */ static char *delme[] = { /* columns rows colors chars-per-pixel */ "72 14 2 1", " c opaque", ". c white", /* pixels */ "..... .............................................. ............", "... .......................................... ..........", ".. ........................................ .........", ". ....................................... .. .. .........", ". .......................................... . . . . .........", " ............................................ . . .........", " ....... ... ... ... ... ... ... ... .. .. ... ", " ....... ... ... ... ... ... ... ... .. .. ... ", " ............................................ .........", ". .......................................... . . . .........", ". ....................................... . . . . .........", ".. ........................................ .........", "... ......................................... .. .. .........", "..... ........................................... .... .... ........." }; gnokii-0.6.31/Docs/sample/vCalendar/0000755000175000017500000000000011666163461015263 5ustar leoleognokii-0.6.31/Docs/sample/vCalendar/Makefile.am0000644000175000017500000000015511666163120017310 0ustar leoleovcaldocsdir = $(datadir)/doc/gnokii/sample/vCalendar vcaldocs_DATA = test.vcs EXTRA_DIST = $(vcaldocs_DATA) gnokii-0.6.31/Docs/sample/vCalendar/Makefile.in0000644000175000017500000003425311666163211017330 0ustar leoleo# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = Docs/sample/vCalendar DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_expand_dir.m4 \ $(top_srcdir)/m4/acx_pthread.m4 $(top_srcdir)/m4/intltool.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(vcaldocsdir)" DATA = $(vcaldocs_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLUETOOTH_LIBS = @BLUETOOTH_LIBS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FIND = @FIND@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLDFLAGS = @GLDFLAGS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GMODULE_CFLAGS = @GMODULE_CFLAGS@ GMODULE_LIBS = @GMODULE_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GNOKII_LT_VERSION = @GNOKII_LT_VERSION@ GNOKII_LT_VERSION_AGE = @GNOKII_LT_VERSION_AGE@ GNOKII_LT_VERSION_CURRENT = @GNOKII_LT_VERSION_CURRENT@ GNOKII_LT_VERSION_REVISION = @GNOKII_LT_VERSION_REVISION@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_LIBICAL = @HAVE_LIBICAL@ HAVE_LIBUSB = @HAVE_LIBUSB@ HAVE_SOCKETPHONET = @HAVE_SOCKETPHONET@ HAVE_XGNOKII = @HAVE_XGNOKII@ ICAL_CFLAGS = @ICAL_CFLAGS@ ICAL_LIBS = @ICAL_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBGNOKII_VERSION_MAJOR = @LIBGNOKII_VERSION_MAJOR@ LIBGNOKII_VERSION_MINOR = @LIBGNOKII_VERSION_MINOR@ LIBGNOKII_VERSION_RELEASE = @LIBGNOKII_VERSION_RELEASE@ LIBGNOKII_VERSION_STRING = @LIBGNOKII_VERSION_STRING@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBPCSCLITE_CFLAGS = @LIBPCSCLITE_CFLAGS@ LIBPCSCLITE_LIBS = @LIBPCSCLITE_LIBS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKE = @MAKE@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ MYSQLCONFIG = @MYSQLCONFIG@ MYSQLCONFIG5 = @MYSQLCONFIG5@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_LIBS = @MYSQL_LIBS@ NEED_LOCALE_CHARSET = @NEED_LOCALE_CHARSET@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OWN_GETOPT = @OWN_GETOPT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PGCONFIG = @PGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSTGRES_CFLAGS = @POSTGRES_CFLAGS@ POSTGRES_LIBS = @POSTGRES_LIBS@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LIBS = @SQLITE3_LIBS@ SQLITE_CFLAGS = @SQLITE_CFLAGS@ SQLITE_LIBS = @SQLITE_LIBS@ STRIP = @STRIP@ TCP_LIBS = @TCP_LIBS@ TERMLDFLAGS = @TERMLDFLAGS@ TERMLIBS = @TERMLIBS@ USB_LIBS = @USB_LIBS@ USE_NLS = @USE_NLS@ USE_UNIX98PTYS = @USE_UNIX98PTYS@ VERSION = @VERSION@ WIN32 = @WIN32@ WIN32_CROSS = @WIN32_CROSS@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ XPACKAGE = @XPACKAGE@ XPM_CFLAGS = @XPM_CFLAGS@ XPM_LIBS = @XPM_LIBS@ XVERSION = @XVERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ acx_pthread_config = @acx_pthread_config@ 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@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vcaldocsdir = $(datadir)/doc/gnokii/sample/vCalendar vcaldocs_DATA = test.vcs EXTRA_DIST = $(vcaldocs_DATA) all: all-am .SUFFIXES: $(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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Docs/sample/vCalendar/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Docs/sample/vCalendar/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 $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-vcaldocsDATA: $(vcaldocs_DATA) @$(NORMAL_INSTALL) test -z "$(vcaldocsdir)" || $(MKDIR_P) "$(DESTDIR)$(vcaldocsdir)" @list='$(vcaldocs_DATA)'; test -n "$(vcaldocsdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(vcaldocsdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(vcaldocsdir)" || exit $$?; \ done uninstall-vcaldocsDATA: @$(NORMAL_UNINSTALL) @list='$(vcaldocs_DATA)'; test -n "$(vcaldocsdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(vcaldocsdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(vcaldocsdir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(vcaldocsdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-vcaldocsDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-vcaldocsDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ install-vcaldocsDATA installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am uninstall-vcaldocsDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gnokii-0.6.31/Docs/sample/vCalendar/test.vcs0000644000175000017500000000101211666163120016741 0ustar leoleoBEGIN:VCALENDAR VERSION:1.0 BEGIN:VEVENT: CATEGORIES:PHONE CALL SUMMARY: 0123456789 DTSTART:20000623T194400 AALARM:20000623T194300 END:VEVENT BEGIN:VEVENT: CATEGORIES:MISCELLANEOUS SUMMARY:Gnokii Reminder DTSTART:20000623T204400 AALARM:20000623T204300 END:VEVENT BEGIN:VEVENT: CATEGORIES:MEETING SUMMARY:Gnokii Meeting DTSTART:20000623T204400 AALARM:20000623T204300 END:VEVENT BEGIN:VEVENT: CATEGORIES:SPECIAL OCASSION SUMMARY:Marcels Birthday DTSTART:19790806T031000 AALARM:20000806T100000 END:VEVENT END:VCALENDAR gnokii-0.6.31/Docs/sample/45-nokiadku2.rules0000644000175000017500000000062511666163120016550 0ustar leoleo# udev rules file for nokia dku2 devices (udev >= 0.98) # Put it to /etc/udev/rules.d/ directory # ACTION!="add", GOTO="nokiadku2_rules_end" SUBSYSTEM=="usb", GOTO="nokiadku2_rules" # This one is for the old kernels SUBSYSTEM=="usb_device", GOTO="nokiadku2_rules" GOTO="nokiadku2_rules_end" LABEL="nokiadku2_rules" ATTRS{manufacturer}=="Nokia", MODE="0660", GROUP="plugdev" LABEL="nokiadku2_rules_end" gnokii-0.6.31/Docs/sample/gnokiirc0000644000175000017500000002632711666163120015116 0ustar leoleo# This is a sample config file for unix-like systems. See Windows/gnokiirc # for a Windows sample. # # Copy this file into $XDG_CONFIG_HOME/gnokii/config (which is # $HOME/.config/gnokii/config in most cases) and change port, connection and # model settings following the comments below. See # http://wiki.gnokii.org/index.php/Config for working examples. # [global] # Set port to the physical port used to connect to your phone. port = none # Then using phone connected to the serial port (not USB) you should # use (for Linux): # port = /dev/ttyS0 # # For MacOSX you will need something like: # port = /dev/cu.USA28X1P1.1 # # FreeBSD (probably NetBSD and OpenBSD too) use: # port = /dev/cuaa0 # # With Linux-IrDA you will want to use # port = /dev/ircomm0 # or similiar. # # Use this setting also for the Bluetooth connection: # port = aa:bb:cc:dd:ee:ff # when using it with AT driver set it to: # port = /dev/rfcomm0 # or similiar. # # For the Linux USB cables you will need one of the following settings (or # similiar) # port = /dev/ttyUSB0 # port = /dev/tts/USB0 # port = /dev/ttyACM0 # the last one will work only with AT driver. The correct setting should be # given in the dmesg output. # # If you use connection type dku2libusb use it to denote which use endpoint # you'd wish to use. It is useful when you have more than one phone connected # to your computer using DKU2 cable. Numbering goes from 1 upwards. # Default is 1. # port = 1 # # If you use connection type phonet use it to denote the network device to use. # See README-6510 for more details. # port = usbpn0 # Change it according to instructions model = fake # Set model to the model number of your phone. For the # Symbian phones use: # model = symbian # # For other non-Nokia phones and when you want to use AT # mode use: # model = AT # # If you can't figure out what to put here read the FAQ. # If it still doesn't help, consult gnokii-ml or #gnokii at freenode. # For Nokia phones (non-Symbian), most likely you'll need: # model = 6510 # There are few main models that when chosen should make use of the # appropriate drivers. These are: 6110, 7110, 6510, 3110, 2110, 6160. # Set IrDA device name. # If you use irda connection you may want gnokii to autodetect the irda # device it connects to. This is fine for most of the cases. if you have # more than one device in range you may want to give manually the device # name so gnokii correctly recognizes it. Use the name that you can see # in the discovery log when the phone with infrared is in the range of # your irda port. # Note that you need to set this for each phone_ section separately. It # isn't nested from the global section. # irda_string = Nokia 6610i # Initlength controls the number of characters sent to the # phone during initialisation. You can either set it to # the word "default" or a positive integer. # # You can try setting this value if you want to connect # to the phone quicker. If you've never noticed the # connection to be slow, it is suggested that you # leave this alone. Read the initialisation code in fbus-xxxx # to understand what this changes if you're curious. initlength = default # Most USB cables for Nokia phones should work with the libusb driver # (recommended) # connection = dku2libusb # and with the new kernel driver (Linux 2.6.28+) # connection = phonet # If you have 6210/6250/7110 phone and dau9p cable (the one you can # use with 6100 series and cannot use hardware modem from the phone) # you may want to use 'dau9p' value to get faster initialization. # If you use dlr3 or dlr3p cable for nokia phones in FBUS mode (ie. # you don't use model = AT) you may want to use 'dlr3p' value here. # Note that it is recommended and currently the best way to use this # cable with nk6510 driver. connection = serial # With DKU-2 cable use the following setting with the now unsupported Linux # kernel driver that was provided with older libgnokii versions: # connection = dku2 # With DKU-5 cable use the following setting # connection = dku5 # For Bluetooth and AT driver use the following setting # connection = serial # For other Bluetooth settings use # connection = bluetooth # For infrared connection with phones other than Nokia 6110/6130/6150 use: # connection = irda # Don't forget to run: 'irattach irda0 -s' or similiar before running gnokii # For the nk6110 driver only connection=infrared is valid for IrDA. # See Docs/gnokii-ir-howto for more detailes on this. # For connection with a PC/SC compatible Smart Card reader use: # connection = pcsc # Set this to 'yes' if you want gnokii to set and check the lock file in # /var/lock directory. It avoids potential conflicts with other serial # port software (eg. minicom). If you have wrong permissions for the # directory, a warning will be generated. If you don't want a lockfile, set # it to 'no'. use_locking = yes # Baudrate to use on serial port connections. # Currently used only by models AT and BIP/CIMD. Defaults to 19200. # Set to 0 to disable port speed setting. Try doing this when gnokii hangs # on opening the serial port: # > Serial device: opening device /dev/ttyACM0 serial_baudrate = 19200 # Force waiting after each sent character the specified usec time. # Value -1 forces the fastest 'block' writing, # value 0 writes each character separately without any explicit waiting, # other positive values specify the appropriate 1/1000000 sec delaying. # Siemens M20 requires at least "1"! FIXME: Model-driven autodetection #serial_write_usleep = 10000 # Force serial port handshaking mode, useful primarily for "AT" model. # Gnokii "AT" model uses software handshake by default. # Possible values: hardware (RTS/CTS - 7 wires) or software (XON/XOFF - 3 wires) #handshake = software # If defined (not commented out by '#') it will quit Gnokii anytime # when DCD line will drop. #require_dcd = 1 # If set to 0, DTR and RTS will not be set on the serial line. Default is 1. # Try doing this when gnokii hangs on opening the serial port: # > Serial device: opening device /dev/ttyACM0 #set_dtr_rts = 0 # If you are using a bluetooth connection, you can specify the rfcomm # channel number here. If you don't specify the value, it is autodetected # on connection (it may take an additional second). FBUS connections always # ignore this value and use channel 14. #rfcomm_channel = 1 # There may happen various timeouts during the communication with the phone. # This parameter enables the retransmission policy. Ie. if the phone doesn't # respond, we send the frame again. This happened mainly with the older # phones. You may want to enable it when you see mysterious timeouts. # Be very careful with this option. It is suspected to cause phone breakage # with new DCT4 phones (like Nokia 6100). By default it is switched off # (sm_retry = 0) #sm_retry = 1 # Run the specified script(s) right after opening and initializing the device # and before any communication (right before closing for disconnect_script). # You may find handy to use it to connect your modem to SMS Center # when using BIP or CIMD protocols # Non-absolute path is relative to the specific directory where gnokii is run! #connect_script = /absolute/path/to/gnokii/Docs/sample/cimd-connect #disconnect_script = # When sending SMS you can experience timeouts. This is the feature of the # overloaded SMSCs. The phones waits for the response from the SMSC confirming # that it received the short message. When the SMSC is DoSed with many requests # it will take more time to get the response. Adjust it to your needs. The # value is given in seconds to wait. Defaults to 10 seconds. Set to 0 to wait # forever. smsc_timeout = 10 # If your Nokia phone isn't correctly handled by libgnokii you can describe # its features with a comma separated list of flags (and please write to the # mailing list so it can be fixed). # For phones older than Series 40 use OLD_DEFAULT; for Series 40 3rd Edition # and later Series 40 use DEFAULT_S40_3RD; for all other Nokias use DEFAULT. # Format is: product name=model name[,flag]... # where product name is the corresponding string returned by gnokii --identify # model name is the marketing name of the phone and valid flags are: # AUTHENTICATION: phone needs a special protocol initialization # CALENDAR: phone supports calendar events (first protocol) # CALLERGROUP: phone supports caller groups in phonebooks # DATA: phone supports an old non-AT protocol for data communications (DON'T use this) # DEFAULT_S40_3RD: shortcut for DEFAULT, SMSFILE, EXTPBK2, EXTCALENDAR # DEFAULT: shortcut for OLD_DEFAULT, CALLERGROUP, EXTPBK, FOLDERS # DTMF: phone can send DTMF tones # EXTCALENDAR: phone supports calendar events (second protocol) # EXTPBK: phonebooks supports more than just name and number (first protocol) # EXTPBK2: phonebooks supports more than just name and number (second protocol) # FOLDERS: SMS are stored in IN, OU, ... instead of SM, ME # FULLPBK: currently unused # KEYBOARD: keypresses can be emulated by the computer # NETMONITOR: phone supports Nokia NetMonitor # OLD_DEFAULT: shortcut for SPEEDDIAL, SMS, DTMF, KEYBOARD, CALENDAR # SMSFILE: SMS are stored in the phone's filesystem # SMS: phone supports SMS # SPEEDDIAL: phone supports speed dials # XGNOKIIBREAKAGE: enable dangerous functions known to damage some phones (DON'T use this) [flags] #RM-237=3110c, DEFAULT_S40_30 [gnokii] # Set this to the path where you want gnokii-errors to be stored. # gnokii-errors file stores the information about unhandled frames # received while communicating with gnokii. # The default paths are: # on Windows: %APPDATA%\\gnokii # on MacOS X: $HOME/Library/Logs/gnokii # on everything else: $XDG_CACHE_HOME/gnokii or $HOME/.cache/gnokii # Do not include filename in the path. # Make sure that specified folder or directory exists. Otherwise the output # will be redirected to stderr. #gnokiierrorpath=. [xgnokii] # Set this to 1 if you want to break your phone with xgnokii. Works only # with few Nokia models and FBUS communication allow_breakage = 0 [gnokiid] # Set bindir to point to the location of the various gnokiid binaries. # In particular ensure that mgnokiidev is in this location, with # permissions 4750, owned by root, group gnokii. Ensure you # are in the gnokii group and that the group exists... bindir = /usr/local/sbin/ # Any entries in the following two sections will be set as environment # variables when running the scripts. # Handy for use for $VAR substitutions in your chat(8) script. [connect_script] # Don't put your phone number here!!! TELEPHONE = 12345678 [disconnect_script] # The following parameters control how libgnokii handles the debugging messages. # Currently there are three categories: "debug" controls the libgnokii # normal debug output, "rlpdebug" controls the debug output of the RLP # subsystem, and "xdebug" is used by the xgnokii or smsd. [logging] # where to log the debug output (on: stderr, off: /dev/null) debug = on # where to log the rlp debug output (on: stderr, off: /dev/null) rlpdebug = off # where to log X debug output (on: stderr, off: /dev/null) xdebug = off # Fake-phone can be used for testing Gnokii functionality without # having a physical phone connected. # Example usage: # gnokii --config gnokiirc --phone fake --identify [phone_fake] port = foobar model = fake connection = serial # This is internal configuration for fake driver. The purpose is mostly # testing only. [fake_driver] sms_inbox = /tmp/sms gnokii-0.6.31/Docs/sample/ppp/0000755000175000017500000000000011666163461014163 5ustar leoleognokii-0.6.31/Docs/sample/ppp/Makefile.am0000644000175000017500000000031611666163120016207 0ustar leoleopppdocsdir = $(datadir)/doc/gnokii/sample/ppp pppdocs_DATA = cimd-connect \ ppp-FILES \ options \ pap-secrets \ ppp-hscsd \ ppp-6210-modem \ ppp-gnokii \ ppp-on EXTRA_DIST = $(pppdocs_DATA) gnokii-0.6.31/Docs/sample/ppp/Makefile.in0000644000175000017500000003434611666163210016232 0ustar leoleo# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = Docs/sample/ppp DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_expand_dir.m4 \ $(top_srcdir)/m4/acx_pthread.m4 $(top_srcdir)/m4/intltool.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(pppdocsdir)" DATA = $(pppdocs_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLUETOOTH_LIBS = @BLUETOOTH_LIBS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FIND = @FIND@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLDFLAGS = @GLDFLAGS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GMODULE_CFLAGS = @GMODULE_CFLAGS@ GMODULE_LIBS = @GMODULE_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GNOKII_LT_VERSION = @GNOKII_LT_VERSION@ GNOKII_LT_VERSION_AGE = @GNOKII_LT_VERSION_AGE@ GNOKII_LT_VERSION_CURRENT = @GNOKII_LT_VERSION_CURRENT@ GNOKII_LT_VERSION_REVISION = @GNOKII_LT_VERSION_REVISION@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_LIBICAL = @HAVE_LIBICAL@ HAVE_LIBUSB = @HAVE_LIBUSB@ HAVE_SOCKETPHONET = @HAVE_SOCKETPHONET@ HAVE_XGNOKII = @HAVE_XGNOKII@ ICAL_CFLAGS = @ICAL_CFLAGS@ ICAL_LIBS = @ICAL_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBGNOKII_VERSION_MAJOR = @LIBGNOKII_VERSION_MAJOR@ LIBGNOKII_VERSION_MINOR = @LIBGNOKII_VERSION_MINOR@ LIBGNOKII_VERSION_RELEASE = @LIBGNOKII_VERSION_RELEASE@ LIBGNOKII_VERSION_STRING = @LIBGNOKII_VERSION_STRING@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBPCSCLITE_CFLAGS = @LIBPCSCLITE_CFLAGS@ LIBPCSCLITE_LIBS = @LIBPCSCLITE_LIBS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKE = @MAKE@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ MYSQLCONFIG = @MYSQLCONFIG@ MYSQLCONFIG5 = @MYSQLCONFIG5@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_LIBS = @MYSQL_LIBS@ NEED_LOCALE_CHARSET = @NEED_LOCALE_CHARSET@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OWN_GETOPT = @OWN_GETOPT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PGCONFIG = @PGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSTGRES_CFLAGS = @POSTGRES_CFLAGS@ POSTGRES_LIBS = @POSTGRES_LIBS@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LIBS = @SQLITE3_LIBS@ SQLITE_CFLAGS = @SQLITE_CFLAGS@ SQLITE_LIBS = @SQLITE_LIBS@ STRIP = @STRIP@ TCP_LIBS = @TCP_LIBS@ TERMLDFLAGS = @TERMLDFLAGS@ TERMLIBS = @TERMLIBS@ USB_LIBS = @USB_LIBS@ USE_NLS = @USE_NLS@ USE_UNIX98PTYS = @USE_UNIX98PTYS@ VERSION = @VERSION@ WIN32 = @WIN32@ WIN32_CROSS = @WIN32_CROSS@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ XPACKAGE = @XPACKAGE@ XPM_CFLAGS = @XPM_CFLAGS@ XPM_LIBS = @XPM_LIBS@ XVERSION = @XVERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ acx_pthread_config = @acx_pthread_config@ 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@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ pppdocsdir = $(datadir)/doc/gnokii/sample/ppp pppdocs_DATA = cimd-connect \ ppp-FILES \ options \ pap-secrets \ ppp-hscsd \ ppp-6210-modem \ ppp-gnokii \ ppp-on EXTRA_DIST = $(pppdocs_DATA) all: all-am .SUFFIXES: $(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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Docs/sample/ppp/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Docs/sample/ppp/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 $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-pppdocsDATA: $(pppdocs_DATA) @$(NORMAL_INSTALL) test -z "$(pppdocsdir)" || $(MKDIR_P) "$(DESTDIR)$(pppdocsdir)" @list='$(pppdocs_DATA)'; test -n "$(pppdocsdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pppdocsdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pppdocsdir)" || exit $$?; \ done uninstall-pppdocsDATA: @$(NORMAL_UNINSTALL) @list='$(pppdocs_DATA)'; test -n "$(pppdocsdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(pppdocsdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pppdocsdir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(pppdocsdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-pppdocsDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-pppdocsDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-pppdocsDATA install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am uninstall-pppdocsDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gnokii-0.6.31/Docs/sample/ppp/ppp-on0000644000175000017500000000036511666163120015313 0ustar leoleo#!/bin/sh TELEPHONE=501808080 LOCAL_IP=0.0.0.0 REMOTE_IP=0.0.0.0 NETMASK=255.255.255.0 DIALER_SCRIPT=/etc/ppp/ppp-gnokii export $TELEPHONE exec /usr/sbin/pppd debug /dev/gnokii 115200 $LOCAL_IP:$REMOTE_IP connect $DIALER_SCRIPT gnokii-0.6.31/Docs/sample/ppp/options0000644000175000017500000000010111666163120015561 0ustar leoleomodem crtscts defaultroute asyncmap 0 mtu 1500 mru 1500 user ppp gnokii-0.6.31/Docs/sample/ppp/ppp-FILES0000644000175000017500000000054611666163120015542 0ustar leoleoppp-6210-modem Basic chat script to use with AT modem (eg. Nokia 6210) ppp-gnokii Basic chat script to make a connection with gnokiid and at-emulator (eg. Nokia 6110) ppp-hscsd Sample chat script to make a hscsd connection ppp-on Sample ppp script to estabilish a dialup connection options Sample ppp options file pap-secrets Sample pap-secrets file gnokii-0.6.31/Docs/sample/ppp/cimd-connect0000644000175000017500000000052011666163120016436 0ustar leoleo#! /usr/sbin/chat -vEf # ^^^ all options MUST be given as ONE word only (all are passed as ARGV[1]) # add/remove letter 'v' to echo all the commends to your syslog TIMEOUT 3 "" "ATZ" "OK-ATZ-OK" "" ABORT "BUSY" ABORT "NO CARRIER" ABORT "NO DIAL TONE" ABORT "ERROR" ABORT "VOICE" "" ATL2 OK ATD$TELEPHONE TIMEOUT 90 CONNECT \c ^M \c gnokii-0.6.31/Docs/sample/ppp/ppp-hscsd0000644000175000017500000000105511666163120016000 0ustar leoleo#!/bin/sh chat -v \ TIMEOUT 60 \ ABORT '\nBUSY\r' \ ABORT '\nNO ANSWER\r' \ ABORT '\nRINGING\r\n\r\nRINGING\r' \ ABORT '\nNO CARRIER\r' \ '' "\r\dATZ" \ OK "AT+CBST=51,0,1" \ OK "AT+CHSN=6,0,0,0" \ TIMEOUT 60 \ OK ATD$TELEPHONE \ CONNECT '' gnokii-0.6.31/Docs/sample/ppp/pap-secrets0000644000175000017500000000001211666163120016315 0ustar leoleoppp * ppp gnokii-0.6.31/Docs/sample/ppp/ppp-6210-modem0000755000175000017500000000111511666163120016363 0ustar leoleo#!/bin/sh /usr/sbin/chat -v \ TIMEOUT 30 \ ABORT '\nBUSY\r' \ ABORT '\nNO ANSWER\r' \ ABORT '\nRINGING\r\n\r\nRINGING\r' \ ABORT '\nNO CARRIER\r' \ '' '\r\dATZ' \ TIMEOUT 60 \ OK ATDT$TELEPHONE \ CONNECT '' gnokii-0.6.31/Docs/sample/ppp/ppp-gnokii0000644000175000017500000000073111666163120016154 0ustar leoleo#!/bin/sh /usr/sbin/chat -v \ TIMEOUT 30 \ ABORT '\nBUSY\r' \ ABORT '\nNO ANSWER\r' \ ABORT '\nRINGING\r\n\r\nRINGING\r' \ ABORT '\nNO CARRIER\r' \ '' ATDT$TELEPHONE \ CONNECT '' gnokii-0.6.31/Docs/sample/magic0000644000175000017500000000071211666163120014357 0ustar leoleo# Add these to magic file (located in /etc or /usr/share/misc) # to let the file command recognize NOL and NGG files # # Pawe³ Kot # Based on the gnokii (http://www.gnokii.org/) sources # GSM Operator Logos - NOL 0 string NOL GSM Operator Logo, NOL format >10 byte x (size %d x >12 byte x %d) # GSM Caller Icons - NGG 0 string NGG GSM Caller Icon, NGG format >6 byte x (size %d x >8 byte x %d) gnokii-0.6.31/Docs/README-61100000644000175000017500000000202411666163117013344 0ustar leoleo-- README-6110 -- -- Notes, bugs and a todo list for the 6110 series -- * Notes * Code for the 6110 phones has been tested with the DAU-9P MBus Cable NSE-3. Phones of 6110 Series have somewhat different protocol then other Nokia phones series. More detailes on the protocol you'll find in the Docs/protocol/nk6110.txt file inside the gnokii sources. The current code allows you to do almost everything you are able to do with these phones. It covers SMS, phonebook, calendar operations and much, much more. There are some problems with the few firmwares (V 05.24). It seems that these firmware is weird. If you have a Nokia with this firmware, it accepts the PIN request (displays Code Accepted message) but nothing is returned to the PC. The communication is only in one direction :-( I do not know why. If you can help with this, please let me know. * Known Bugs * - None, we write quality software here... :) * To-do * - writing documentation of the protocol - delete all FIXME from the sources gnokii-0.6.31/Docs/man/0000755000175000017500000000000011666163460012655 5ustar leoleognokii-0.6.31/Docs/man/Makefile.am0000644000175000017500000000013311666163117014705 0ustar leoleoman_MANS = gnokii.1 sendsms.1 gnokiid.8 mgnokiidev.8 xgnokii.1x EXTRA_DIST = $(man_MANS) gnokii-0.6.31/Docs/man/Makefile.in0000644000175000017500000004234211666163210014720 0ustar leoleo# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = Docs/man DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_expand_dir.m4 \ $(top_srcdir)/m4/acx_pthread.m4 $(top_srcdir)/m4/intltool.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)" man8dir = $(mandir)/man8 NROFF = nroff MANS = $(man_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLUETOOTH_LIBS = @BLUETOOTH_LIBS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FIND = @FIND@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLDFLAGS = @GLDFLAGS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GMODULE_CFLAGS = @GMODULE_CFLAGS@ GMODULE_LIBS = @GMODULE_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GNOKII_LT_VERSION = @GNOKII_LT_VERSION@ GNOKII_LT_VERSION_AGE = @GNOKII_LT_VERSION_AGE@ GNOKII_LT_VERSION_CURRENT = @GNOKII_LT_VERSION_CURRENT@ GNOKII_LT_VERSION_REVISION = @GNOKII_LT_VERSION_REVISION@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_LIBICAL = @HAVE_LIBICAL@ HAVE_LIBUSB = @HAVE_LIBUSB@ HAVE_SOCKETPHONET = @HAVE_SOCKETPHONET@ HAVE_XGNOKII = @HAVE_XGNOKII@ ICAL_CFLAGS = @ICAL_CFLAGS@ ICAL_LIBS = @ICAL_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBGNOKII_VERSION_MAJOR = @LIBGNOKII_VERSION_MAJOR@ LIBGNOKII_VERSION_MINOR = @LIBGNOKII_VERSION_MINOR@ LIBGNOKII_VERSION_RELEASE = @LIBGNOKII_VERSION_RELEASE@ LIBGNOKII_VERSION_STRING = @LIBGNOKII_VERSION_STRING@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBPCSCLITE_CFLAGS = @LIBPCSCLITE_CFLAGS@ LIBPCSCLITE_LIBS = @LIBPCSCLITE_LIBS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKE = @MAKE@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ MYSQLCONFIG = @MYSQLCONFIG@ MYSQLCONFIG5 = @MYSQLCONFIG5@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_LIBS = @MYSQL_LIBS@ NEED_LOCALE_CHARSET = @NEED_LOCALE_CHARSET@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OWN_GETOPT = @OWN_GETOPT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PGCONFIG = @PGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSTGRES_CFLAGS = @POSTGRES_CFLAGS@ POSTGRES_LIBS = @POSTGRES_LIBS@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LIBS = @SQLITE3_LIBS@ SQLITE_CFLAGS = @SQLITE_CFLAGS@ SQLITE_LIBS = @SQLITE_LIBS@ STRIP = @STRIP@ TCP_LIBS = @TCP_LIBS@ TERMLDFLAGS = @TERMLDFLAGS@ TERMLIBS = @TERMLIBS@ USB_LIBS = @USB_LIBS@ USE_NLS = @USE_NLS@ USE_UNIX98PTYS = @USE_UNIX98PTYS@ VERSION = @VERSION@ WIN32 = @WIN32@ WIN32_CROSS = @WIN32_CROSS@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ XPACKAGE = @XPACKAGE@ XPM_CFLAGS = @XPM_CFLAGS@ XPM_LIBS = @XPM_LIBS@ XVERSION = @XVERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ acx_pthread_config = @acx_pthread_config@ 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@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ man_MANS = gnokii.1 sendsms.1 gnokiid.8 mgnokiidev.8 xgnokii.1x EXTRA_DIST = $(man_MANS) all: all-am .SUFFIXES: $(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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Docs/man/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Docs/man/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 $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-man1: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @list=''; test -n "$(man1dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } install-man8: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)" @list=''; test -n "$(man8dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.8[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \ done; } uninstall-man8: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man8dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.8[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man8dir)" && rm -f $$files; } tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(MANS) installdirs: for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man1 install-man8 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-man uninstall-man: uninstall-man1 uninstall-man8 .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-man1 \ install-man8 install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am uninstall uninstall-am uninstall-man uninstall-man1 \ uninstall-man8 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gnokii-0.6.31/Docs/man/gnokii.10000644000175000017500000006072411666163117014227 0ustar leoleo.TH "gnokii" "1" "Jul 7, 2011" "Dag Wieers, Pawel Kot" "gnokii" .SH "NAME" gnokii \- tool suite for mobile phones .SH "SYNOPSIS" .B gnokii \fI[CONFIG OPTIONS]\fR [\fIOPTIONS\fR] .SH "DESCRIPTION" .PP .B gnokii is a multiple systems tool suite and driver for mobile phones. .PP .B gnokii supports the AT protocol defined by the GSM standard (with workarounds for some vendor's quirks), some proprietary protocols of Nokia phones (the so called FBUS and FBUS2) and SIM cards in PC/SC compatible Smart Card readers. Limited support for the older and slow Nokia MBUS protocol is also available. .PP You can assume that your phone will work with .B gnokii when using the AT protocol, however some phones implement only a subset of the protocol and in those cases you will get very limited functionality. The recommended model setting for your config file are: - model = series40, if you have a fairly recent Nokia phone except Symbian phones prior to Series60 3rd Edition - model = gnapplet, if you have a Nokia Symbian Series60 prior to 3rd Edition phone - model = AT, for all other phones of any brand - if you have some older Nokia phone that doesn't work with model = series40 you may try using its brand name, eg. for Nokia 6210 use \fImodel = 6210\fP. The recommended connection and port settings for your config file are: - connection = bluetooth and port = phone address, for Bluetooth connections - connection = dku2libusb and port = 1, for most Nokia USB cables - connection = serial and port = /dev/..., for all other cables See also the sample gnokiirc for a description of all configuration parameters and our for configurations known to work. Symbian series60 3rd edition and later (most Nokia N and E series) are not supported by the gnapplet driver due to changes in Symbian API. For now you can get some functionality using the AT driver (with all connection types supported by the phone) or using the series40 driver (only with connection = dku2libusb). Please note that currently there are Nokia models with almost the same names as the old ones, like 6110c vs 6110 or 3110c vs 3110. They are completly incompatible. DO NOT use \fImodel = 6110\fP or \fImodel = 3110\fP setting for them, use \fImodel = series40\fP instead. .SH "CONFIG OPTIONS" .TP .BR "\-\-config \fIfilename\fP" reads configuration from \fIfilename\fR instead of trying default locations. Normally gnokii looks for config file in \fI$XDG_CONFIG_HOME/gnokii/config\fR (which is usually \fI$HOME/.config/gnokii/config\fR), \fI$HOME/.gnokiirc\fR (legacy), \fI$XDG_CONFIG_DIRS/gnokii/config\fR (which is usually \fI/etc/xdg/gnokii/config\fR) and \fI/etc/gnokiirc\fR (legacy). .TP .BR "\-\-phone \fIname\fP" usees parameters from the given phone section of your config file. A phone section named 'foo' starts with [phone_foo] and is used as \-\-phone foo .SH "OPTIONS" The options that are recognized by .B gnokii can be divided into several different groups. .SS GENERAL .TP .BR "\-\-help" displays usage information. .TP .BR "\-\-version" displays version and copyright information. .TP .BR "\-\-monitor [\fIdelay\fR|\fIonce\fP]" continually updates phone status to stderr. Optional \fIdelay\fR parameter sets the refresh interval to \fIdelay\fR seconds. Default is 1. \fIonce\fP means the output will be printed only once. .TP .BR "\-\-shell" runs interactive session that will allow to run sequent gnokii commands without a need to reconnect for the sequent commands. .SS DIALING .TP .BR "\-\-getspeeddial \fIlocation\fP" reads speed dial from the specified location. .TP .BR "\-\-setspeeddial \fInumber\fP \fImemory_type\fP \fIlocation\fP" specify speed dial. \fIlocation\fP number 1 is usually reserved for voice mailbox number and it is unavailable as speed dial. .TP .BR "\-\-dialvoice \fInumber\fP" initiate voice call. On success print the \fIcallid\fP identifier to be used with the \-\-hangup command. The \-\-monitor command can be used to show the \fIcallid\fP. With \fImodel = AT\fP direct dialing from phonebooks is supported with careful use of shell quoting, for example: gnokii \-\-dialvoice ">SM42" # dial the number in location 42 of SM memory gnokii \-\-dialvoice '>"Home"' # dial the number if string matches exactly a contact name (note the use of single and double quotes) .TP .BR "\-\-senddtmf \fIstring\fP" send DTMF sequence. .TP .BR "\-\-answercall\fP \fIcallid\fP" answer an incoming call. \fIcallid\fP is a small integer number used to identify one of the incoming calls. The \-\-monitor command can be used to show the \fIcallid\fP. .TP .BR "\-\-hangup\fP \fIcallid\fP" hangup an incoming call or an already established call. \fIcallid\fP is a small integer number used to identify one of the incoming calls. If you initiated the call with \-\-dialvoice this is the number printed by that command. The \-\-monitor command can be used to show the \fIcallid\fP. .TP .BR "\-\-divert {\-\-op|-o} {register|enable|query|disable|erasure} {\-\-type|-t} {all|busy|noans|outofreach|notavail} {\-\-call|-c} {all|voice|fax|data} [{\-\-timeout|-m} \fItime_in_seconds\fP] [{\-\-number|-n} \fInumber\fP]" Manage call diverting/forwarding. .B \-\-op specifies one of the operations: .B register enable query disable erasure .B \-\-type specifies one of the event types: .B busy noans outofreach notavail unconditional all .B \-\-call specifies one of the call types: .B voice fax data all .B \-\-timeout is the number of seconds an incoming call will ring before being forwarded to the registered number (use with \-\-type noans) .B \-\-number is the phone number to which calls are to be forwarded .SS PHONE SETTINGS .TP .BR "\-\-getdisplaystatus" shows what icons are displayed. .TP .BR "\-\-displayoutput" show texts displayed in phone's screen. .TP .BR "\-\-getprofile [\fInumber\fP]" show settings for selected(all) profile(s). .TP .BR "\-\-setprofile" sets settings for selected(all) profile(s). .TP .BR "\-\-getactiveprofile" reads the active profile. .TP .BR "\-\-setactiveprofile \fIprofile_no\fR" sets active profile to the profile number \fIprofile_no\fR. .TP .BR "\-\-netmonitor {\fIreset\fP|\fIoff\fP|\fIfield\fP|\fIdevel\fP|\fInext\fP|\fInr\fP}" setting/querying netmonitor mode. .TP .BR "\-\-reset [\fIsoft\fP|\fIhard\fP]" resets the phone. By default a \fIsoft\fP reset is performed. Depending on phone, the \fIhard\fP option also deletes everything in the internal memory and restores the factory settings. .SS TODO .TP .BR "\-\-gettodo \fIstart_number\fP [\fIend_number\fP|\fIend\fP] [\-v|\-\-vCal]" get the notes with numbers from \fIstart_number\fR to \fIend_number\fR from ToDo list. \fIend\fR is a keyword that denotes 'everything till the end'. \-v | \-\-vCal \- output in vCalendar 1.0 format .TP .BR "\-\-writetodo \fIvcalfile\fR \fIstart_number\fP [\fIend_number\fP|\fIend\fP]" write the notes with numbers from \fIstart_number\fR to \fIend_number\fR from vCalendar file \fIvcalfile\fR to ToDo list. More than one note a time can be saved. \fIend\fR is a keyword that denotes 'everything till the end'. number \- location of the note in the vCalendar file .TP .BR "\-\-deletealltodos" delete all notes from the ToDo list. .SS CALENDAR .TP .BR "\-\-getcalendarnote \fIstart_number\fP [\fIend_number\fP|\fIend\fP] [\-v|\-\-vCal]" get the notes with numbers from \fIstart_number\fR to \fIend_number\fR from calendar. \fIend\fR is a keyword that denotes 'everything till the end'. \-v | \-\-vCal \- output in vCalendar 1.0 format .TP .BR "\-\-writecalendarnote \fIvcalfile\fR \fIstart_number\fP [\fIend_number\fP|\fIend\fd]" write the notes with numbers from \fIstart_number\fR to \fIend_number\fR from vCalendar file \fIvcalfile\fR to a phone calendar. More than one note a time can be saved. \fIend\fR is a keyword that denotes 'everything till the end'. number \- location of the note in the vCalendar file .TP .BR "\-\-deletecalendarnote \fIstart_number\fP [\fIend_number\fP|\fIend\fP]" delete the notes with numbers from \fIstart_number\fR to \fIend_number\fR from calendar. \fIend\fR is a keyword that denotes 'everything till the end'. .SS SMS .TP .BR "\-\-getsms \fImemory_type\fR \fIstart\fP [\fIend\fP] [\-f|\-\-file \fIfile\fP] [\-F|\-\-force\-file \fIfile\fR] [\-a|\-\-append\-file \fIfile\fR] [\-d|\-\-delete]" gets SMS messages from specified \fImemory type\fR starting at entry \fIstart\fR and ending at \fIend\fR and print them to stdout by default. \fIend\fR can be a number or the string 'end'. If \fIend\fR is not specified only one location \- \fIstart\fR is read. .TP .BR For the \fImemory types\fR you usually use \fIIN\fP (Inbox) and \fIOU\fP (Outbox) for Nokias and \fISM\fP (SIM card) and \fIME\fP (phone memory) for other brands, except for modern Motorolas that prefer \fIMT\fP (combined SIM and phone memory); in any case the \fB\-\-showsmsfolderstatus\fR command shows the list of \fImemory types\fR available in your phone with their descriptions and message counts (each part of multipart messages is counted separately). .TP .BR -f | \-\-file \fIfile\fR - save messages to \fIfile\fR in mbox format. If \fIfile\fR already exists, user is prompted whether to overwrite it .TP .BR -F | \-\-force\-file \fIfile\fR - save messages to \fIfile\fR in mbox format. If \fIfile\fR already exists, it is overwritten without asking .TP .BR -a | \-\-append\-file \fIfile\fR - save messages to \fIfile\fR in mbox format. If \fIfile\fR already exists, messages are added to the end .TP .BR -d | \-\-delete - delete message after reading. .TP .BR "\-\-deletesms \fImemory_type\fP \fIstart\fP [\fIend\fP]" deletes SMS messages from specified \fImemory type\fR starting at entry \fIstart\fR and ending at \fIend\fR. If \fIend\fI is not specified only one location \- \fIstart\fR is deleted. .TP .BR "\-\-sendsms \fIdestination\fP [\-\-smsc \fImessage_center_number\fP | \-\-smscno \fImessage_center_index\fP] [\-r|\-\-report] [\-8|\-\-8bit] [\-C|\-\-class \fIn\fP] [\-v|\-\-validity \fIn\fP] [\-i|\-\-imelody] [\-a|\-\-animation \fIfile;file;file;file\fR] [\-o|\-\-concat \fIthis;total;serial\fR] [\-w|\-\-wappush \fIurl\fR]" sends an SMS message to \fIdestination\fR via \fImessage_center_number\fR or SMSC number taken from phone memory from address \fImessage_center_index\fR. If this argument is omitted SMSC number is taken from phone memory from location 1. Message text is taken from STDIN. Meaning of other optional parameters: \-r | \-\-report \- request for delivery report \-8 | \-\-8bit - set 8bit coding \-C | \-\-class \fIn\fR \- Class Message \fIn\fR, where \fIn\fR can be 0..3 \-v | \-\-validity \fIn\fR \- validity in minutes \-i | \-\-imelody \- send iMelody within SMS \-a | \-\-animation \fIfile;file;file;file\fR - send animation message \-o | \-\-concat \fIthis;total;serial\fR - send \fIthis\fR part of all \fItotal\fR parts identified by \fIserial\fR \-w | \-\-wappush \fIurl\fR - send wappush to the given \fIurl\fR .TP Sample usage: echo "This is a test message" | gnokii \-\-sendsms +48501123456 \-r .TP .BR "\-\-savesms [\-\-sender \fIfrom\fP] [\-\-smsc \fImessage_center_number\fP | \-\-smscno \fImessage_center_index\fP] [\-\-folder \fIfolder_id\fP] [\-\-location \fInumber\fP] [\-\-sent | \-\-read] [\-\-deliver] [\-\-datetime \fIYYMMDDHHMMSS\fP]" saves SMS messages to phone. Messages are read from STDIN. You can specify the following optional arguments: \-\-sender \- set the sender number (only \fI\-\-deliver\fP) \-\-smsc \fImessage_center_number\fR \- set the SMSC number (only \fI\-\-deliver\fP) \-\-smscno \fImessage_center_index\fR \- SMSC number taken from phone memory from address \fImessage_center_index\fR (only \fI\-\-deliver\fP) \-\-folder \fIfolder_id\fR \- folder ID where to save the SMS to (only valid for newer phones, i.e. 6210/6510 series). For legal values see \fI\-\-getsms\fR. \-\-location \fInumber\fR \- save the message to location \fInumber\fR \-\-sent | \-\-read \- mark the message saved/read depending on \fI\-\-deliver\fP \-\-deliver \- set the message type to SMS_Deliver \-\-datetime \fIYYMMDDHHMMSS\fR \- sets datetime of delivery, i.e. 031123185713 would set message delivery time to 23rd November 2003, 6:57:13 PM .TP .BR "\-\-getsmsc [\fIstart_number\fP [\fIend_number\fP]] [\-r|\-\-raw]" show the SMSC parameters from specified location(s) or for all locations. \-r | \-\-raw \- output in a format suitable for \-\-setsmsc .TP .BR "\-\-setsmsc" set SMSC parameters read from STDIN. See \fI\-\-raw\fP output of \fI\-\-getsmsc\fR for syntax. .TP .BR "\-\-createsmsfolder \fIname\fP" create SMS folder with name \fIname\fR. .TP .BR "\-\-deletesmsfolder \fInumber\fP" delete folder # \fInumber\fR of 'My Folders'. .TP .BR \-\-showsmsfolderstatus list SMS folder names with \fImemory types\fR and total number of messages available. .TP .BR "\-\-smsreader" keeps reading incoming SMS and saves them into the mailbox. .SS MMS .TP .BR "\-\-getmms \fImemory_type\fR \fIstart\fP [\fIend\fP] [{\-\-pdu|\-\-raw} \fIfile\fR] [\-o|\-\-overwrite]" gets MMS messages from specified \fImemory type\fR starting at entry \fIstart\fR and ending at \fIend\fR. Default output format is human readable, alternative output formats are \-\-pdu which is the binary format of MMS as received by the phone from the network and \-\-raw which saves the data as read from the phone. When the \-o or \-\-overwrite option is used, existing files are overwritten without asking. .TP .BR "\-\-deletemms \fImemory_type\fP \fIstart\fP [\fIend\fP]" deletes MMS messages from specified \fImemory type\fR starting at entry \fIstart\fR and ending at \fIend\fR. If \fIend\fI is not specified only one location \- \fIstart\fR is deleted. .SS LOGOS .TP .BR "\-\-sendlogo {caller|op|picture} \fIdestination\fP \fIlogofile\fP [\fInetwork_code\fP]" send the \fIlogofile\fR to \fIdestination\fR as operator or CLI logo. .TP .BR "\-\-setlogo op [\fIlogofile\fP [\fInetwork_code\fP]]" .TP .BR "\-\-setlogo startup [\fIlogofile\fP] .TP .BR "\-\-setlogo caller [\fIlogofile\fP [\fIcaller_group_number\fP [\fIgroup_name\fP]]]" set or clear operator, startup or caller logo. .TP .BR "\-\-setlogo {dealer|text} [\fItext\fP]" set or clear welcome note. .TP .BR "\-\-getlogo op [\fIlogofile\fP [\fInetwork_code\fP]]" .TP .BR "\-\-getlogo startup [\fIlogofile\fP [\fInetwork_code\fP]]" .TP .BR "\-\-getlogo caller [\fIcaller_group_number\fP [\fIlogofile\fP [\fInetwork_code\fP]]]" get operator, startup or caller logo. .TP .BR "\-\-getlogo {dealer|text}" get welcome note. .TP .BR "\-\-viewlogo \fIlogofile\fP" print the \fIlogofile\fP as ASCII art. Formats that are automatically detected are: NOL, NGG, NSM, NLM, BMP, I61, GGP, XPM. The OTA format can be used only if the filename ends with the .otb extension. .PP Format of \fInetwork_code\fP parameter is 3 digits MCC, a space, 2 digits MNC surrounded by single or double quotes, eg. "123 45". .SS RINGTONES .TP .BR "\-\-sendringtone \fIdestination\fI \fIrtttlfile\fP" send the \fIrtttlfile\fR to \fIdestination\fR as ringtone. .TP .BR "\-\-setringtone \fIrtttlfile\fP" set the \fIrtttlfile\fR as ringtone (on 6110). .SS PHONEBOOK .TP .BR "\-\-getphonebook \fImemory_type\fP \fIstart_number\fP [\fIend_number|end\fP] [\fI[\-r|\-\-raw]|[\-v|\-\-vcard]|[\-l|\-\-ldif]\fP]" reads specified memory location from phone. If \fIend_number\fR is not specified only one location \- \fIstart\fR is read. If instead of \fIend_number\fR the text \fIend\fR is specified then gnokii will read from \fIstart_number\fR until it encounters a non\-existant location. Valid \fImemory types\fR are ME, SM, FD, ON, EN, DC, RC, MC, LD: .IP .B ME Internal memory of the mobile equipment .IP .B SM SIM card memory .IP .B FD Fixed dial numbers .IP .B ON Own numbers .IP .B EN Emergency numbers .IP .B DC Dialled numbers .IP .B RC Received calls .IP .B MC Missed calls .IP .B LD Last dialed numbers .PP Normally you get human readable output. Please note, that it is not compatible with expected input by \fI\-\-writephonebook\fR. You can use \fI\-v\fR or \fI\-\-vcard\fR switch to get output in vCard format or \fI\-l\fR or \fI\-\-ldif\fR switch to get output in ldif format or \fI\-r\fR or \fI\-\-raw\fR switch to get the raw output which is explained below. You can use it then with \fI\-\-writephonebook\fR. .TP .BR "\-\-writephonebook [\fI\-o|\-\-overwrite] [\-f|\-\-find\-free] [\-m|\-\-memory-type|\-\-memory memory_type] [\-n|\-\-memory-location|\-\-location number] [[\-v|\-\-vcard]|[\-l|\-\-ldif]\fP]" reads data from stdin and writes to phonebook. Uses the format as provided by the output of the getphonebook command using \fI\-\-raw\fR or \fI\-\-vcard\fR or \fI\-\-ldif\fR. Default is raw format (see below for details) and alternate formats are vCard and ldif. Default \fI\-\-getphonebook\fR output format is not compatible with \fI\-\-writephonebook\fR. .PP With \fI\-\-memory-type memory_type\fP and \fI\-\-memory-location number\fP you can set a memory type and a location if the input data doesn't specify them. .PP When the \-o or \-\-overwrite option is used, existing entries at a given location are overwritten. .PP When the \-f or \-\-find\-free option is given, .B gnokii tries to find a free location. In this case, you can omit the location field in the input data. .PP The raw phonebook format is very simple. Each line represents one entry. Fields are separated by semicolons. Semicolons aren't allowed inside a field. The fields have to be in this order (the subentries are optional, ie. you can repeat all subentry field multiple times, but they have to be alltogether in the given order): .IP "" .5i name .IP "" .5i number .IP "" .5i memory_type .IP "" .5i entry_location .IP "" .5i caller_group_number .IP "" .5i subentry_type .IP "" .5i subentry_number_type .IP "" .5i subentry_id .IP "" .5i subentry_text .PP Possible values of .B caller_group_number and the corresponding caller groups are (these are defaults, you are able to change these manually in your phone): .IP .B 0 Family .IP .B 1 VIP .IP .B 2 Friends .IP .B 3 Colleagues .IP .B 4 Other .IP .B 5 No group .IP .PP Possible subentry types are described in the \fIgnokii/common.h\fR file: .IP .B 7 subentry is the name .IP .B 8 subentry is the email address .IP .B 9 subentry is the postal address (snail mail) .IP .B 10 subentry is the note (text field) .IP .B 11 subentry is the number .IP .B 12 subentry is the ringtone .IP .B 19 subentry is the date (used for DC, RD, LD) .IP .B 26 subentry is the pointer (pointer to the other memory) .IP .B 27 subentry is the logo (bitmap) .IP .B 28 subentry is the logo switch .IP .B 30 subentry is the group (octect) .IP .B 44 subentry is the URL .IP .B 47 subentry is the location (octect) .IP .B 51 subentry is the image (file id) .IP .B 55 subentry is the ringtoneadv (file id or ringtone) .IP .B 56 subentry is the userid .IP .B 63 subentry is the pttaddress .IP .B 67 subentry is the extgroup .IP .B 69 subentry is the video (file id) .IP .B 70 subentry is the firstname .IP .B 71 subentry is the lastname .IP .B 74 subentry is the postaladdress .IP .B 75 subentry is the extendedaddress .IP .B 76 subentry is the street .IP .B 77 subentry is the city .IP .B 78 subentry is the stateprovince .IP .B 79 subentry is the zipcode .IP .B 50 subentry is the country .IP .B 82 subentry is the formalname .IP .B 84 subentry is the jobtitle .IP .B 85 subentry is the company .IP .B 86 subentry is the nickname .IP .B 87 subentry is the birthday .PP Possible subentry number types are described in the \fIgnokii/common.h\fR file: .IP .B 2 number is the home phone number .IP .B 3 number is the mobile phone number .IP .B 4 number is the fax number .IP .B 6 number is the work phone number .IP .B 10 number is the general number .PP For the subentry types that don't care about number type (as text files) this should be set to 0. .TP .BR "\-\-deletephonebook \fImemory_type\fP \fIstart_number\fP [\fIend_number|end\fP]" delete entries with \fIstart_number\fR to \fIend_number\fR from the phone book in \fImemory_type\fR. \fIend\fR is a keyword that denotes 'everything till the end'. .SS WAP .TP .BR "\-\-getwapbookmark \fInumber\fP" reads the specified WAP bookmark from phone .TP .BR "\-\-writewapbookmark \fIname\fP \fIURL\fP" write WAP bookmark to phone .TP .BR "\-\-deletewapbookmark \fInumber\fP" delete WAP bookmark from phone .TP .BR "\-\-getwapsetting \fInumber\fP [\fI\-r|\-\-raw\fP]" read WAP setting from phone .TP .BR "\-\-writewapsetting" reads data from stdin and writes it to phone. Hint: see syntax from \fI\-\-getwapsetting\fP \fI\-r\fP option .TP .BR "\-\-activatewapsetting \fInumber\fP" activate WAP setting \fInumber\fP .SS DATE, TIME AND ALARM .TP .BR "\-\-setdatetime [\fIYYYY\fP [\fIMM\fP [\fIDD\fP [\fIHH\fP [\fIMM\fP]]]]]" set the date and the time of the phone. .TP .BR "\-\-getdatetime" shows current date and time in the phone. .TP .BR "\-\-setalarm \fIHH\fP \fIMM\fP" set the alarm of the phone. .TP .BR "\-\-getalarm" shows current alarm. .SS SECURITY .TP .BR "\-\-identify" get IMEI, manufacturer, model, product name and revision. .TP .BR "\-\-entersecuritycode {\fIPIN\fP|\fIPIN2\fP|\fIPUK\fP|\fIPUK2\fP|\fISEC\fP}" asks for the code and sends it to the phone. Code is read from terminal or from stdin. .TP .BR "\-\-getsecuritycode" shows the currently set security code. .TP .BR "\-\-getsecuritycodestatus" show if a security code is needed. .TP .BR "\-\-getlocksinfo" show information about the (sim)locks of the phone: the lock data, whether a lock is open or closed, whether it is a user or factory lock and the number of unlock attempts. .SS FILE Note that some phones (like Nokia 6610i) support only id based operations (gnokii options with "byid" suffix). Use gnokiifs for the transparent support. .TP .BR "\-\-getfilelist \fIremote_path\fP" lists files from the given directory. Use A:\\* or B:\\* to get the root directory from either phone memory or card memory. .TP .BR "\-\-getfiledetailsbyid [\fIid\fP]" lists file details or directory contents from the entry identified by \fIid\fP. If no identifier is given, list the root directory contents. .TP .BR "\-\-getfileid \fIremote_filename\fP" gets id of the file. .TP .BR "\-\-getfile \fIremote_filename\fP [\fIlocal_filename\fP]" gets file identified by name and path from the phone and stores it at the local computer. .TP .BR "\-\-getfilebyid \fIid\fP [\fIlocal_filename\fP]" gets file identified by id from the phone and stores it at the local computer. .TP .BR "\-\-getallfiles \fIremote_path\fP" gets all files from the remote path. .TP .BR "\-\-putfile \fIlocal_filename\fP \fIremote_filename\fP" stores the file in the phone memory or on the memory card. .TP .BR "\-\-deletefile \fIremote_filename\fP" removes the file from the phone. .TP .BR "\-\-deletefilebyid \fIid\fP" removes the file from the phone. .SS MISC .TP .BR "\-\-keysequence" emulates pressing keys on phone keyboard. Input is read from stdin. .IP Supported keys (any other char is ignored): .RS 5 .IP .B M menu .IP .B N names .IP .B P power .IP .B G green phone .IP .B R red phone .IP .B U up .IP .B D down .IP .B + increase volume .IP .B - decrease volume .IP .B 0123456789#* as is .RS -5 .IP Example: to increase volume .IP echo "+" | gnokii --keysequence .IP Note: this command isn't supported by all phones/drivers. .TP .BR "\-\-enterchar" emulates typing a character on phone keyboard. By emulating multiple pressions of keys, it can input all characters supported by the phone in use, but to input an SMS predictive text should be disabled. Input is read from stdin, with newline interpreted as the "Menu" key and escape interpreted as the "Names" key. .IP Note: this command isn't supported by all phones/drivers. .TP .BR "\-\-listnetworks" prints a list of cellular network operators with their 3-digits MCC (Mobile country code) and 2-digits MNC (Mobile Network Code). .IP Note: this command doesn't need a valid config or a phone to work. .TP .BR "\-\-getnetworkinfo" prints information about the network currently in use. .SH "DIAGNOSTICS" Various error messages are printed to standard error. The exit code is 0 for correct functioning. Errors which appear to be caused by invalid or abused command line parameters cause an exit code of 2, and other errors cause an exit code of 1. .SH "BUGS" .PP We write quality software here ;) but see KNOWN_BUGS just in case. If you'd like to send us the bugreport please read the README and Bugs files. .SH "AUTHOR" Hugh Blemings , Pavel Janik ml. and Pawel Kot . Manual page written by Dag Wieers , Pawel Kot and Daniele Forsi . See also Docs/CREDITS from gnokii sources. .SH "COPYING" This program is distributed under the GNU Public License Version 2, or (at your option) any later version. .SH "SEE ALSO" gnokiid, xgnokii, mgnokiidev, ppm2nokia, sendsms, todologo gnokii-0.6.31/Docs/man/sendsms.10000644000175000017500000000403111666163117014410 0ustar leoleo.TH "sendsms" "1" "August 29, 2003" "Pawel Kot" "gnokii" .SH "NAME" sendsms \- command line tool to send SMSes using gnokii .SH "SYNOPSIS" .B sendsms \fI[OPTIONS]\fR .SH "DESCRIPTION" .PP .B sendsms allows you to send a SMS using gnokii not knowing the syntax of gnokii command. It is written using dialog and allows to send a text SMS choosing recipients from the phone address book or entering it manually. .SS "OPTIONS" .PP Available options: .TP .BR [\-\-debug|\-D] May bother with more debugging messages. For debugging purpose. .TP .BR --simul[ate],\ -S Simulation mode. Doesn't really send SMS by phone. Only simulates. For debugging purpose. .TP .BR --forceSMread,\ -s Forces .B sendsms to read phonebook from SIM card, and to parse the generated file in order to update the numbers' list (useful only if required to pickup number from the phone's memory). See NOTE. .TP .BR --forceMEread,\ -m Forces .B sendsms to read phonebook from phone memory, and to parse the generated file in order to update the numbers' list (useful only if required to pickup number from the phone's memory). See NOTE. .TP .BR --skipgnokiicheck,\ -K Skip the test of the presence of binary 'gnokii'. (It must be somewhere in your $PATH). It allows you to try this script program, even if you don't have 'gnokii' already. ;) .TP .BR --smsset,\ --setsms Allows you to preset a SMS message from STDIN. (pipe or input redirection). This message will be proposed on the 'SMS message' field during the program input cycle. .TP .BR --help,\ -h,\ /h display this help and exit .TP .BR --version,\ -V output version information and exit" .TP NOTE: If you require to pickup number from phone's memory (or from SIM card), for the first time, it anyway reads phonebook from your mobile phone. (It may take a while... please, be patient ;-) .SH "BUGS" .PP None reported. .SH "AUTHOR" Sendsms was written by Gabriele Zappi - Rimini . This manual page was written by Pawel Kot. .SH "COPYING" This program is distributed under the GNU Public License. .SH "SEE ALSO" gnokii gnokii-0.6.31/Docs/man/mgnokiidev.80000644000175000017500000000272711666163117015111 0ustar leoleo.TH "mgnokiidev" "8" "May 27, 2001" "Erik Rossen" "gnokii" .SH "NAME" mgnokiidev \- links /dev/gnokii to a virtual modem .SH "SYNOPSIS" .B mgnokiidev \fI/dev/pts/?\fR .SH "DESCRIPTION" .PP .B mgnokiidev is a tool from the gnokii tool suite used to create the link /dev/gnokii that points to a pseudo\-tty (/dev/pts/?). .PP It is called after .B gnokiid has created a virtual modem that is attached to the pty. It's operation is transparent under normal usage as gnokiid takes care of calling it when required. .PP Since .B mgnokiidev must modifiy files in /dev, it must be either run as root or SUID root. The latter is the preferred method. Normally the .B mgnokiidev binary is chmod 4750 and owned by root.gnokii. .PP gnokii is a Linux/Unix tool suite and (eventually) modem/fax driver for Nokia mobile phones, released under the GPL. .PP gnokii supports most phones from the 3810/8110 and 5110/6110 series, details including bugs specific to each series appear in the files Docs/README\-3810 and Docs/README\-6110 respectively. .SH "DIAGNOSTICS" Various error messages are printed to STDERR. .SH "BUGS" .PP None reported. .SH "AUTHOR" Hugh Blemings and Pavel Janik ml. are the authors of the gnokii tool suite. This manual page was written by Erik Rossen . See also Docs/CREDITS from the gnokii sources. .SH "COPYING" This program is distributed under the GNU Public License. .SH "SEE ALSO" gnokiid, gnokii gnokii-0.6.31/Docs/man/xgnokii.1x0000644000175000017500000000334511666163117014603 0ustar leoleo.TH "xgnokii" "1x" "May 10, 2010" "Erik Rossen, Daniele Forsi" "gnokii" .SH "NAME" xgnokii \- graphical interface of the gnokii telephone toolkit .SH "SYNOPSIS" .B xgnokii .SH "DESCRIPTION" .PP .B xgnokii is a fancy graphical interface for libgnokii. It uses the settings in the [global] section of the configuration file of .BR gnokii(1). .PP You can assume that your phone is supported, however there are rare cases that you will get very limited functionality with .BR xgnokii . .PP .B xgnokii can save contacts in vCard format (thanks to Pavel Machek ) if you add .vcard or .gcrd extension (case sensitive) to the file name in the export contacts dialog. .PP .B gnokii is a multiple systems tool suite and (eventually) modem/fax driver for the mobile phones. .PP .B gnokii at the beginning was designed to support Nokia phones. At the moment it supports most of the Nokia mobiles and also supports other phones that understand AT commands. .SH "DIAGNOSTICS" Various error messages are printed to STDERR when xdebug = on is set in gnokii config file .SH "BUGS" .PP This man page is too short. See more details in gnokii man page. .SH "AUTHOR" Jan Derfinak is the author of the .BR xgnokii . Hugh Blemings and Pavel Janik ml. and Pawel Kot are the authors of the gnokii tool suite. This manual page was written by Daniele Forsi changing the manual page written by Erik Rossen . See also Docs/CREDITS from the gnokii sources. .SH "COPYING" This program is distributed under the GNU Public License Version 2, or (at your option) any later version. .SH "SEE ALSO" .BR gnokii (1), .BR gnokiid (1) gnokii-0.6.31/Docs/man/gnokiid.80000644000175000017500000000461711666163117014401 0ustar leoleo.TH "gnokiid" "8" "May 27, 2001" "Erik Rossen" "gnokii" .SH "NAME" gnokiid \- create a virtual modem for old Nokia mobile phones .SH "SYNOPSIS" .B gnokiid .B gnokiid [\fB\-\-help\fR|\fB\-\-version\fR|\fB\-\-debug\fR] .SH "DESCRIPTION" .PP .B gnokiid is a tool from the gnokii tool suite used to create a virtual modem device with a Nokia portable telephone. The virtual modem device is usually accessed via a symbolic link called /dev/gnokii (created automatically by \fBmgnokiidev\fR(8)). Please note that you don't need a virtual modem when you have real modem accepting AT Hayes commands (most of the modern phones). gnokiid was written for the phones that supported data transfer but didn't expose AT layer (namely Nokia 6110, 6130, 6150, 5110, 5130). .PP After .B gnokiid has created the virtual modem, it can be accessed like any other Hayes\-compatible modem by such programs as the terminal program \fBminicom\fR(1) or the PPP daemon \fBpppd\fR(8) to make standard data connections to remote computers. .PP The full range of portable telephone functions (SMS messaging, phone book, operator logos, etc.) are accessed using the command\-line program \fBgnokii\fR(1) or the graphical interface program \fBxgnokii\fR(1x). .PP gnokii is a Linux/Unix tool suite and (eventually) modem/fax driver for Nokia mobile phones, released under the GPL. .PP gnokii supports most phones from the 3810/8110 and 5110/6110 series, details including bugs specific to each series appear in the files Docs/README\-3810 and Docs/README\-6110 respectively. .SH "OPTIONS" .PP If called without any options, \fBgnokiid\fR will set up a virtual modem device using the settings in gnokii(1) config file (if it exists). Otherwise, .TP \fB\-\-help\fR print out a short usage message .TP \fB\-\-version\fR print out version, copyright, phone, and serial device info .TP \fB\-\-debug\fR uses STDIN/STDOUT for a virtual modem .SH "DIAGNOSTICS" Various error messages are printed to STDERR. .SH "BUGS" .PP Hmmm... .SH "AUTHOR" Hugh Blemings and Pavel Janik ml. are the authors of the gnokii tool suite. This manual page was written by Erik Rossen . See also Docs/CREDITS from the gnokii sources. .SH "COPYING" This program is distributed under the GNU Public License Version 2, or (at your option) any later version.. .SH "SEE ALSO" gnokii, xgnokii, mgnokiidev gnokii-0.6.31/Docs/README-MacOSX0000644000175000017500000000676611666163117014070 0ustar leoleoREADME for MacOS X ================== Status The MacOS X port of Gnokii has successfully been tested on some phones. I expect all phones supported by gnokii to work (famous last words...) XGnokii, and others The graphical X version, and the AT-emulator and virtual device compile correctly with Darwin ports, but have not been thouroughly tested. If you have any problems with these components of Gnokii, please report it to the Gnokii mailing list. Successfully tested hardware USB to Serial adapters: - Keyspan USA-28Xb - Keyspan USA-19QW - BAFO technologies BF-810 Cables: - dlr3p - dau9p Phones: - 3410 - 6110 - 6210 - 6310 Please report any new hardware not in this list on the Gnokii mailing list IrDA The MacOS X version *does not* work with IrDA (and probably never will). This is not a problem of Gnokii but a problem with Apple. The MacOS X IrDA protocol stack is completely undocumented thus unusable. Unless they change this or someone ports the IrDA stack from linux we're out of luck, sorry. Contents of my config file: port = /dev/cu.USA28X21P1.1 model = 6210 initlength = default connection = dlr3p #require_dcd = 1 use_locking = no Notes: Always set "use_locking = no" otherwise gnokii won't work. USB to serial adapters always introduce two new device files in /dev per serial port. Use the one starting with "cu.". Installing with Darwin Ports 1.0 ================================ The easiest way to install Gnokii on Mac OS X systems is to use the Darwin Ports system. 1) Download and install Darwin Ports by following the instructions at http://darwinports.opendarwin.org/getdp/ 2) If you haven't already, execute "sudo port -d selfupdate" (without the quote marks) 3) To install all of Gnokii, including the graphical X version, type "sudo port install gnokii" without the quote marks. To install the command line tool and the AT-command emulator, type: "sudo port install gnokii +no_x11" without the quote marks. Compiling the command line tool and the AT-command emulator =========================================================== These commands have been tested on Gnokii version 0.6.8, but should also work on later versions, compiled on Mac OS X 10.4.2. The preferred method of installing Gnokii is to use the Darwin Ports method described above. 1) Download the latest version of libtool from http://www.gnu.org/software/libtool/ (version 1.5.18 is fine). you will not need to install it, but we need a file from it. 2) Download the latest Gnokii distribution. (If you want to install from GIT, you should already know what you're doing, so you're on your own) 3) Extract both Gnokii and Libtool 4) copy ltmain.sh from the Libtool directory, replacing the version in the config direcorty of the Gnokii distribution 5) in the gnokii directory, type: ./configure --disable-shared --disable-nls --without-x 6) type "make" (without the quote marks) If after some time you now see "########################################## ### ### It is strongly recommended to run: ### make install ### now. Otherwise gnokii may not work. ### ##########################################" gnokii should be built OK Disclaimer ========== No warranty, you are on your own. If you have questions or remarks, please let me know on my email address mentioned below. Author: Ruotger Skupin (Ruotger dot Skupin at berlin dot de) Date: February 5, 2003 Updated August 15, 2005 by Marcus Pallinger. Please report all problems to the Gnokii mailing list. gnokii-0.6.31/Docs/gnokii-ir-howto0000644000175000017500000003304011666163117015052 0ustar leoleo Gnokii-Infrared-HowTo Thomas Schneider, ts-ml@dev-thomynet.de Version: 1.04, 04 Aug 1999 This document describes how to use the infrared-function of gnokii with Nokia 6110, 6130 and 6150 models ______________________________________________________________________ Table of Contents 1. Preamble 1.1 Copyright 1.2 Credits 1.3 Comments 1.4 Latest version of this document 2. Introduction 3. Installation 3.1 What Gnokii needs for communication over infrared 3.2 Installing and Configuring the Software 4. Mobiles and their software-version 4.1 Get software-version of your phone 4.2 Tested phone-software-version 5. PC-Hardware and Configuration 5.1 Laptops - who work with gnokii 5.1.1 DELL Inspiron 7000 A366LT 5.1.2 DELL Latitude LM 166 5.1.3 DELL Latitude D266XT w/ C/Dock 5.1.4 Fujitsu Lifebook B110 'Biblo' Laptop 5.1.5 Gericom (Network) Notebook with SIR-Infrared 5.1.6 IBM Thinkpad 390 5.1.7 IBM Thinkpad 600 5.1.8 Toshiba Libretto 70CT 5.2 Laptops - who don't work 5.3 Mainboards - who work with gnokii 5.3.1 ASUS ???? 5.4 Mainboards - who don't work with gnokii 5.5 External Adapters - who work with gnokii 5.6 External Adapters - who don't work with gnokii 5.6.1 Tekram IR210B 6. Gnokii over infrared versus LINUX-IRDA 7. FAQ 8. Appendix A: COM-Port-Table ______________________________________________________________________ 1. Preamble 1.1. Copyright Copyright Thomas Schneider 1999 You may redistribute and/or modify this document as long as you comply with the terms of the GNU General Public Licence, version 2 or later. 1.2. Credits Special thanks go to Hugh Blemings and Pavel Janik, they are the maintainer of gnokii, for the good work. Also to Colin Paton for his mail with description connection establishment over infrared. 1.3. Comments Do not hesitate to tell me any thing you think will help make this document better. I will examine your critics thoroughly. Do not hesitate as well to ask me any questions related to topics discussed here. I will be more than happy to answer them, as they may help me further improve this document. (-- Translator note: If the English is ugly, well then that goes to me!--) Note:If you have any big problems or other questions to gnokii - please mail to gnokii-mailinglist and not to me! For more details: http://www.gnokii.org/ 1.4. Latest version of this document You can find the latest version of this document in the gnokii- distribution under: http://www.gnokii.org/ or in the web on http://www.dev-thomynet.de/nokworld/gnokii-infrared-howto/ . 2. Introduction Gnokii is a suite of programs what deal with some mobilephones from NOKIA (http://www.nokia.com ). This document is the guide to use gnokii over infrared. It is not the general gnokii-userguide and contains no part of protocol. This document covers only Nokia 6110, Nokia 6130 and Nokia 6150 models, as they have own IrDA stack, that is incompatible with standard stacks on various operating systems. 3. Installation You can get gnokii from gnokiis-homepage: o http://www.gnokii.org/ Gnokii-package is available in some different formats: rpm and tgz. To install the tgz unpack the package with tar xvzf filename The first address after unpack is file README in dir gnokii - all important parts you can read in it. 3.1. What Gnokii needs for communication over infrared For a long time gnokii contains everything that you need in software for infrared-communication. On the other side you need some hardware: 1. Nokia mobile phone with infrared-port. The phone models are: 6110, 6130, 6150 2. Infrared-port on your pc or notebook. In moment only SIR works with gnokii, because phones are limited to 115200 bps. 3.2. Installing and Configuring the Software All steps needed to install and configure gnokii are described in README. Here is the short way for configure infrared with gnokii: 1. Copy the file sample/gnokiirc to your homedir. mkdir -p ~/.config/gnokii cp Docs/sample/gnokiirc ~/.config/gnokii/config 2. Edit the config file: port = /dev/ttyS1 # Set this to the port where you infrared-equipment is connected. model = 6150 # Set up to your model. connection = infrared # If you want connection over cable set this to serial. 3. Make the complete gnokii-software with make in gnokii-dir. Thats all! If you use infrared in the config all parts of the gnokii- distribution use communication over infrared! This parts are in moment: 1. gnokii 2. xgnokii 3. gnokiid 4. smsd 5. gnocky (which is not a part of gnokii distribution) Also any other third party software using libgnokii can do it. 4. Mobiles and their software-version In all tested situations the software from your phone is not the problem if you can't connect it over infrared. The problem in such situations was the pc-equipment or the pc-configuration. If you have problems please look first in ``pc-section''. 4.1. Get software-version of your phone To get the software-version from your phone press in idle-mode: *#0000# or *#9999# 4.2. Tested phone-software-version 1. 6110 o V 4.73, 22-04-98, NSE-3 o V 5.24, 14-09-98, NSE-3 2. 6130 o V 4.11, 10-06-98, NSK-3 2. 6150 o V 4.01, 23-09-98, NSM-1 o V 4.12, 02-12-98, NSM-1 o V 5.02, 02-02-99, NSM-1 5. PC-Hardware and Configuration This is the most cause for some problems. In moment gnokii works only with SIR- equipment and not with FIR-eqipment. One reason for this is, what phone-speed is limited to 115200 bps. If you have any problems with your equipment read the following parts. Adapters can be the following: o Internal Adapters + Serial Adapters - SIR - FIR + Parallel Adapters - SIR - FIR o External Adapters + Serial Adapters (including USB adapters) - SIR - FIR + USB Adapters - SIR - FIR + Parallel Adapters - SIR - FIR Mosts laptops have an internal infrared-port. Some motherboards - ASUS for example - have also a infrared-connector. On this boards you must buy a little infrared-transmitter to use infrared-connections. It is very difficult to describe all parts of configuration. On this reason this HowTo list all tested laptops and other hardware in each section. Note that probably only internal adapters and serial adapters will work in the described configurations in this HOWTO. 5.1. Laptops - who work with gnokii Short list: o ``DELL Inspiron 7000 A366LT'' o ``DELL Latitude LM 166'' o ``DELL Latitude D266XT w/ C/Dock'' o ``Fujitsu Lifebook B110 'Biblo' Laptop'' o ``Gericom (Network) Notebook with SIR-Infrared'' o ``IBM Thinkpad 390'' o ``IBM Thinkpad 600'' o ``Toshiba Libretto 70CT'' 5.1.1. DELL Inspiron 7000 A366LT o BIOS-Version : Phoenix BIOS 4.0, Release: 6.0 o CPU : Mobile Pentium II, MMX, 366MHz, BIOS Rev A10 (037A) o Memory : 256 MByte o Kernel : 2.2.5 o Distibution : SuSE 6.1 (german version) o reported from : Thomas Schneider < ts-ml@dev-thomynet.de > o BIOS-Menu : System Devices: Infrared Port: Customized: SIR, 2F8, IRQ3 o Configuration : In BIOS you can configure many thinks for the internal-infrared-port. First you have some choices: SIR or FIR or AUTO. All kinds are tested and works - also FIR! For the COM-Port you must set address in hex and irq. For FIR and AUTO you must also DMA. If you have problems with address/irq look in ``COM-PORT- Table''. Tested with all possibillity com-port from 1 to 4 and their default irqs - no problems. DMA was set in all test to: 3. o Known Problems: no problems known yet o Note : - 5.1.2. DELL Latitude LM 166 o BIOS-Version : Phoenix NoteBIOS 4.0 o CPU : Mobile Pentium, MMX, 166MHz o Memory : 40 MByte o Kernel : 2.2.5 o Distibution : SuSE 6.1 (german version) o reported from : Thomas Schneider < ts-ml@dev-thomynet.de > o BIOS-Menu : Peripherals: Integrated Peripherals: Infrared: COM2 o Configuration : You must enable in BIOS the internal-infrared-port and must setup the COM-Port on which the internal ir-adapter should work. If you want what infrared use COM2 you must set it here for example. o Known Problems: no problems known yet o Note : - 5.1.3. DELL Latitude D266XT w/ C/Dock o BIOS-Version : ???? o CPU : ???? o Memory : ???? o Kernel : ???? o Distibution : ???? o reported from : Stig-rjan Smelror < Stig.Orjan.Smelror@winther.net > on 26. July to gnokii-ml o BIOS-Menu : Peripherals: Integrated Peripherals: Infrared: COM2 o Configuration : You must enable in BIOS the internal-infrared-port and must setup the COM-Port on which the internal ir-adapter should work. If you want what infrared use COM2 you must set it here for example. o Known Problems: no problems known yet o Note : - 5.1.4. Fujitsu Lifebook B110 'Biblo' Laptop o BIOS-Version : PhoenixBIOS v1.09 10/28/1998 o CPU : 233 MMX o Memory : 32 MByte o Kernel : 2.2.5-15 o Distibution : Redhat 6.0 o reported from : Tuomas Salo < tuomas@optinet.fi > on 28. July to gnokii-ml o BIOS-Menu : ???? o Configuration : Serial B: Mode IrDA (not FIR), 3F8 IRQ 4 o Known Problems: no problems known yet o Note : - 5.1.5. Gericom (Network) Notebook with SIR-Infrared o BIOS-Version : SystemSoft SCU For Intel 430TX/440BX o CPU : 233 MMX o Memory : ???? o Kernel : ???? o Distibution : ???? o reported from : Marcel Holtmann < marcel@rvs.uni-bielefeld.de > on 22. July to gnokii-ml o BIOS-Menu : Components/COM Ports o Configuration : COM A: COM1, 3F8, IRQ4 (Standard Serial for Cable or somthing else) COM B: COM2, 2F8, IRQ3 (Bulit in IR Port) Mode for COM B: IrDA (HPSIR) o Known Problems: no problems known yet o Note : - 5.1.6. IBM Thinkpad 390 o BIOS-Version : V1.0 R01-A7 o CPU : 233 MMX o Memory : 32 MByte o Kernel : 2.2.5-15 o Distibution : Redhat 6.0 o reported from : Mario Viljac < Mario.Viljac@znanost.hr > on 22. July to gnokii-ml o BIOS-Menu : Config->Advanced Setup o Configuration : IR-port must be enabled, set also COM-Address and IRQ. If you have problems with address/irq look in ``COM-PORT- Table''. o Known Problems: no problems known yet o Note : - 5.1.7. IBM Thinkpad 600 o BIOS-Version : ???? o CPU : ???? o Memory : ???? o Kernel : ???? o Distibution : ???? o reported from : Tuomas Mttnen < maattanen@iki.fi > on 06. July to gnokii-ml o BIOS-Menu : ???? o Configuration : ???? o Known Problems: no problems known yet o Note : - 5.1.8. Toshiba Libretto 70CT o BIOS-Version : 6.20 o CPU : Intel P120MMX o Memory : 32 MByte o Kernel : 2.0.36 o Distibution : Red Hat 5.2 o reported from : Patrick Robbe < probbe@mail.dotcom.fr > on 30. July to gnokii-ml o BIOS-Menu : ???? o Configuration : Infrared port (COM2) 2F8h / IRQ3, mode IrDA compatible. o Known Problems: no problems known yet o Note : - 5.2. Laptops - who don't work No mails for this part in moment. 5.3. Mainboards - who work with gnokii Short list: o ``ASUS ????'' 5.3.1. ASUS ???? o BIOS-Version : ???? o CPU : ???? o Memory : ???? o Kernel : ???? o Distibution : ???? o reported from : mail from Victor L. Belov on 06. July to gnokii-ml o BIOS-Menu : ???? o Configuration : ???? o Known Problems: no problems known yet o Note : - 5.4. Mainboards - who don't work with gnokii No mails for this part in moment. 5.5. External Adapters - who work with gnokii No mails for this part in moment. 5.6. External Adapters - who don't work with gnokii Short list: o ``Tekram IR210B'' 5.6.1. Tekram IR210B o BIOS-Version : ???? o CPU : ???? o Memory : ???? o Kernel : ???? o Distibution : ???? o reported from : Any mails from some peopel. o BIOS-Menu : ???? o Configuration : ???? o Known Problems: don't work o Note : selfpowered over com-port Must be tested - mail to gnokii-ml. 6. Gnokii over infrared versus LINUX-IRDA You can not use gnokii over infrared and linux-irda at the same time. If you want use gnokiis ir-communication you must put linux-irda off. If you want use linux-irda you must close all gnokii-applications what use the infrared-port in moment. Note, that this applies only against Nokia 6110, Nokia 6130 and Nokia 6150 mobile phones. 7. FAQ No FAQ is available in moment. 8. Appendix A: COM-Port-Table Here you find the default addresses and irq's from com1 up to com4 - or ttyS0 up to ttyS3. o ttyS0: 0x3F8, IRQ: 4, COM1 o ttyS1: 0x2F8, IRQ: 3, COM2 o ttyS2: 0x3E8, IRQ: 4, COM3 o ttyS3: 0x2E8, IRQ: 3, COM4 gnokii-0.6.31/Docs/CREDITS0000644000175000017500000001543211666163117013126 0ustar leoleo- Credits - Thank you to, in no particular order... * Everyone on the gnokii mailing list for their interest and input into the project. * Pavel Janík ml. for the majority of work on gnokii 6110 series support, spelling corrections and miscellaneous code cleanups. * Serge Odinokov for 6110 series authentication protocol and example Delphi RLP code. Many thanks... * Nick Lamb for operator logos, CLI uploading and AT*C command support. * Francois Dessart, Brendan O'Dea, Tony Lindstrom, Steffan Henke and Cobus Van Eeden for dumps (and in some cases interpretation!) of unknown messages, bug reports and prompt feedback of being able to build new releases. * Staffan Ulfberg for taking care of the website and for instigating the 6110 project which has now been merged with the gnokii effort. * Martin Hamilton for looking after the mailing list. * Tim Potter for some of the ideas that are now incorporated in gnokii to provide multiple model support and config file code. * Paul Mackerras and Andrew Tridgell for discussions about pseudo ttys, setuid programs and such. Tridge kindly reviewed the mgnokiidev.c code. * Richard Kalton for his excellent page about Nokia 6110 protocol. * Colin Paton for his mail with subject "Dumps of phone<>PC traffic". It helped a lot. * Juan Altmayer Pizzorno for his help with MBUS/FBUS and other debugging. * Gary Reuter for his help when looking for a bug in phone numbers, for the set-time function debugging. * Jiri Meloun for voice calling. * Emilio Brambilla for SMS notification fixes, setdatetime implementation and typing GSM_Default_Alphabet. * PaweÅ‚ Kot for EnterPIN on 6110 Series changes and other things. * Konstantinos Agouros for gnokii-perl module. * Czech Linux Users' group for it's CVS server which hosted our development repository. * Goran Dokic, Samuli Sorvakko and anonymous for gettext files for Dutch, Finnish and German translations. * Marcel Holtmann for RLP FCS code, the IrDA and Bluetooth code, the Nokia Phonet link layer and other misc stuff. * Chris Kemp for logo stuff and a big part of the RLP code. * Andrew Kozin for the model 640 support (NMT 450 network). * Karel Zak for his enthusiasm (and patches) for the autoconf stuff. * Harri Yli-Torkko for investigative work & code on the 3810/8110 and protocol updates for Nokia 3330. * Stano Meduna for misc code and build process work. * Alfred Nurnberger for some information on the 5160/6160 MBUS protocol. * Alessandro Zummo for reset and getopts code. * Manfred Jonsson for his manufacturer and windows patch, and AT command support. * Mark Looi for Cell Broadcast code - based on protocol decoded by Colin Paton. * Sebastian Zagrodzki and Jacek Fiok for Polish .po file. * Marcin WiÄ…cek for all his work and tons of patches. * Gabriele Zappi for testing, general help and bug fixes. * Erik Rossen for help with documentation and debian packaging support. * Marian Jancar for patches on 7110 series. * Tamar Bondar for updates on SMS handling on 3810 series. * Marek RogoziÅ„ski for help in tracing some nasty bugs. * Pavel Machek for developing 2110 and Duncall support and many clever hints. * BoÅ¡tjan Müller for Slovenian translation and other things. * Hans Motshärg for Estonian translation and useful bugreports. * Marcin PÅ‚awiÅ„ski for preview logos. * Martin Lucina for any kind of help he is providing ;-) * Gabriele Stella for Italian translation. * Andrea Scopece for bug reports and other help. * Panagiotis Astithas, Daniel O'Connor, Sheldon Hearn for help with FreeBSD. * Artur Kubiak for help with Solaris. * Markus Plail for work on 7110 support and interesting irc chats. * Simon Huggins for help with 6210 and IrDA. * Jan Kratochvil for various patches. * BORBELY Zoltan for patches for 6100 series for the new structure, many useful hints and discussions and real help in approaching 0.4.0 release and instant help for gnokii development and of course for gnapplet. * Przemek Åšwiderski for sample hscsd chat script. * Balazs Nagy for help in assembling protocol documentation. * Hannes Schulz for SMS fixes in AT series. * Guillaume LaurÄs and Antti Peltonen for the instant bug reports on irc ;-) * Marek MichaÅ‚kiewicz for a few hints, patches and reports. * Petr Cech for SMS center support in AT series. * Len Trigg for a few hints, patches and reports. * Vidar Madsen for ppm2nokia script and nice operator logos :-) * Mariusz Mazur for his work on the build system (NLS support and few other things). * Ruotger Skupin for work on MacOS X port. * Bertrik Sikken, Ulrich Hopp, P. Christeas for any help, smart ideas, bug reports and bug fixes they provided. * Ladislav Michl for his help and maintainship of CBUS, Duncall and Bosch drivers. And other things, like nice irc chats, too :-) * Paulius Bulotas for finding not portable parts of gnokii. * Siegfried Schloissnig for Mac OSX bluetooth code. * Olivier Kaloudoff for his fixes and valuable efforts and French translation Without him Mac OSX bluetooth support wouldn't have been integrated. * Torsten Kunkelfor usage reports and catching our bugs. * Krzysztof Koziarek for help in parsing www.gsmworld.com pages to get the list of country and operator codes and names. * Ron Yorston for a bunch of the paches and interesting discussions on gnokii-ml. * Reiner Steib for useful patches, bug reports and other hints. * Daniel Koć for Polish translation. * Phil Ashby for Windows IrDA support. * Helge Deller for forcing PaweÅ‚ to do the right things. * Hugo Hass for work on AT driver. * Martin Goldhahn for work on vCalendar support and other pieces of code. * Bastien Nocera for changes to the cfgreader, various other patches and work on integrating libgnokii with gnome-phone-manager. * Alex Kanavin for OBEX USB DKU2 support and patient help for PaweÅ‚ while porting it to gnokii. * Daniele Forsi for active gnokii development. * Petr Hruska for his contribution to AT driver. * Jari Turkia for trying to keep win32 port alive (with success!). * Daniel Gollub for various patches, fixes and hints and integrating gnokii with opensync (http://opensync.org/). * Matthias Jahn for keeping Debian and Ubuntu gnokii repository up to date. * Everyone chatting with us on IRC #gnokii at freenode.net. * Lucy for making pizza and putting up with Hugh disappearing to work on this. Rachael for new parent induced insomnia... * Last not least: Mirka for allowing Pavel to work on gnokii and for _great_ gnokii operator logos... We tried to mentioned everyone who contributed to gnokii project but we might to forgot someone. If anyone does feel that we missed him and his name should be mentioned here do not hesitate to contact us :-) gnokii-0.6.31/Docs/README-71100000644000175000017500000000215311666163117013350 0ustar leoleo-- README-7110 -- -- Notes, bugs and a todo list for the 7110 series -- * Notes * Another Nokia phones series, another protocol. These phones seems to be the most popular at the moment, but probably for not more the one year more. Anyway the support for them is quite complete, but not complete yet. We hope to finish soon. Phones supported by this driver so far are: * 7110 * 6210 * 6250 * 7190 Probably also other phones will work with them. If you know such model, please let us know. This driver was tested and is known to work with DAU-9P and DLR-3[P] cables and IrDA connection. As the side note, remember that to get the faster initialization with DAU-9P cable use 'connection = dau9p' instead of 'connection = serial' in the config file. For IrDA use 'connection = irda', not 'connection = infrared'. Hint: For all these phones you can also use AT driver, as they all have a builtin hardware modem, which may give you more functionality for the moment. * Bugs * * Probably there are some ;-) * TODO * * documentation * implement all functionality * full xgnokii support gnokii-0.6.31/Docs/README.libsms0000644000175000017500000000253311666163117014254 0ustar leoleolibsms is a part of the libgnokii, a library providing functionality for all gnokii applications (at the moment: gnokii, xgnokii and smsd). libsms is a library that offers possibilities to handle the short messages also known as SMS. The functionality of the libsms is covered by the 3 functions: SendSMS() Allows to send all kind of the short messages allowing to send logos, ringtones, picture messages, profiles, business cards, concatenated messages as well as allows to compose a message using default alphabet, 8bit alphabet and unicode. A message is being sent to the given remote address. The supported address type are: international number, national number and unknown number (treated as national number). SaveSMS() Offers the same functionality as SendSMS() but instead of sending is saves it in the given location and memory type. If the phone supports it, the message can be saved in an arbitrary folder. If the location is not given, the message is being saved to the first empty location in the given memory type/folder. GetSMS() Reads the message from the given location and memory type/folder. There are several helping functions that can be also used by the higher level applications: ParseSMS() Does the SMS frame parsing and fills in the SMS struct. RequestSMS() Requests the frame from the phone driver. gnokii-0.6.31/Docs/protocol/0000755000175000017500000000000011666163462013745 5ustar leoleognokii-0.6.31/Docs/protocol/Makefile.am0000644000175000017500000000042011666163117015772 0ustar leoleoprotocoldocsdir = $(datadir)/doc/gnokii/protocol protocoldocs_DATA= \ dancall.txt \ gnokiid-at.txt \ nk2110.txt \ nk3110.txt \ nk6110.txt \ nk6160.txt \ nk6185.txt \ nk640.txt \ nk6510.txt \ nk7110.txt \ nokia.txt EXTRA_DIST = $(protocoldocs_DATA) gnokii-0.6.31/Docs/protocol/Makefile.in0000644000175000017500000003460611666163210016012 0ustar leoleo# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = Docs/protocol DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_expand_dir.m4 \ $(top_srcdir)/m4/acx_pthread.m4 $(top_srcdir)/m4/intltool.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(protocoldocsdir)" DATA = $(protocoldocs_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLUETOOTH_LIBS = @BLUETOOTH_LIBS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FIND = @FIND@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLDFLAGS = @GLDFLAGS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GMODULE_CFLAGS = @GMODULE_CFLAGS@ GMODULE_LIBS = @GMODULE_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GNOKII_LT_VERSION = @GNOKII_LT_VERSION@ GNOKII_LT_VERSION_AGE = @GNOKII_LT_VERSION_AGE@ GNOKII_LT_VERSION_CURRENT = @GNOKII_LT_VERSION_CURRENT@ GNOKII_LT_VERSION_REVISION = @GNOKII_LT_VERSION_REVISION@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_LIBICAL = @HAVE_LIBICAL@ HAVE_LIBUSB = @HAVE_LIBUSB@ HAVE_SOCKETPHONET = @HAVE_SOCKETPHONET@ HAVE_XGNOKII = @HAVE_XGNOKII@ ICAL_CFLAGS = @ICAL_CFLAGS@ ICAL_LIBS = @ICAL_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBGNOKII_VERSION_MAJOR = @LIBGNOKII_VERSION_MAJOR@ LIBGNOKII_VERSION_MINOR = @LIBGNOKII_VERSION_MINOR@ LIBGNOKII_VERSION_RELEASE = @LIBGNOKII_VERSION_RELEASE@ LIBGNOKII_VERSION_STRING = @LIBGNOKII_VERSION_STRING@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBPCSCLITE_CFLAGS = @LIBPCSCLITE_CFLAGS@ LIBPCSCLITE_LIBS = @LIBPCSCLITE_LIBS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKE = @MAKE@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ MYSQLCONFIG = @MYSQLCONFIG@ MYSQLCONFIG5 = @MYSQLCONFIG5@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_LIBS = @MYSQL_LIBS@ NEED_LOCALE_CHARSET = @NEED_LOCALE_CHARSET@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OWN_GETOPT = @OWN_GETOPT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PGCONFIG = @PGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSTGRES_CFLAGS = @POSTGRES_CFLAGS@ POSTGRES_LIBS = @POSTGRES_LIBS@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LIBS = @SQLITE3_LIBS@ SQLITE_CFLAGS = @SQLITE_CFLAGS@ SQLITE_LIBS = @SQLITE_LIBS@ STRIP = @STRIP@ TCP_LIBS = @TCP_LIBS@ TERMLDFLAGS = @TERMLDFLAGS@ TERMLIBS = @TERMLIBS@ USB_LIBS = @USB_LIBS@ USE_NLS = @USE_NLS@ USE_UNIX98PTYS = @USE_UNIX98PTYS@ VERSION = @VERSION@ WIN32 = @WIN32@ WIN32_CROSS = @WIN32_CROSS@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ XPACKAGE = @XPACKAGE@ XPM_CFLAGS = @XPM_CFLAGS@ XPM_LIBS = @XPM_LIBS@ XVERSION = @XVERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ acx_pthread_config = @acx_pthread_config@ 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@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ protocoldocsdir = $(datadir)/doc/gnokii/protocol protocoldocs_DATA = \ dancall.txt \ gnokiid-at.txt \ nk2110.txt \ nk3110.txt \ nk6110.txt \ nk6160.txt \ nk6185.txt \ nk640.txt \ nk6510.txt \ nk7110.txt \ nokia.txt EXTRA_DIST = $(protocoldocs_DATA) all: all-am .SUFFIXES: $(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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Docs/protocol/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Docs/protocol/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 $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-protocoldocsDATA: $(protocoldocs_DATA) @$(NORMAL_INSTALL) test -z "$(protocoldocsdir)" || $(MKDIR_P) "$(DESTDIR)$(protocoldocsdir)" @list='$(protocoldocs_DATA)'; test -n "$(protocoldocsdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(protocoldocsdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(protocoldocsdir)" || exit $$?; \ done uninstall-protocoldocsDATA: @$(NORMAL_UNINSTALL) @list='$(protocoldocs_DATA)'; test -n "$(protocoldocsdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(protocoldocsdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(protocoldocsdir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(protocoldocsdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-protocoldocsDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-protocoldocsDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-protocoldocsDATA install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am uninstall uninstall-am uninstall-protocoldocsDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gnokii-0.6.31/Docs/protocol/gnokiid-at.txt0000644000175000017500000001211411666163117016530 0ustar leoleoAT command reference for gnokiid Draft 1 01-feb-2005 by Daniele Forsi AT* Read SMS AT# Set/Get caller ID mode AT+ Get phone information ATA Answer call ATD Dial number ATE Set echo on/off ATH Hang up call ATI Get modem information ATQ Set quiet mode on/off ATS Set/Get S-register value ATV Set verbose on/off ATX Choose connect messages ATZ Reset modem AT* Extended commands "*" AT*NOKIATEST This command is ignored. AT*C Start reading SMS messages After AT*C modem responds with OK, then the following commands are accepted: DIR, EXIT, HELP. After sending the DIR command you can type the following key followed by the Enter key: P: show previous SMS N: show next SMS D: delete current SMS Q: quit to AT*C mode HELP shows this message: The following commands work... DIR EXIT HELP EXIT: exit to command mode AT# Extended commands "#" AT#CID Set/Get Caller ID mode AT#CID? Print current settings AT#CID= : 0 Disable caller ID (default) : 1 Enable formatted caller ID AT#CID=? Print supported settings, currently (0,1) Note: when caller ID is disabled application gets only one RING, when it is enabled it gets one RING, then caller ID data, then a second RING. AT+ Extended commands "+" AT+C Extended commands "+C" AT+CSQ Get RF Level AT+CSQ +CSQ: 31, 99 OK First number is SQM (Signal Quality Measurement) range is 0..31 or 99 if not known or not detectable. Second number is FER (Frame Error Rate) range is 0..7 or 99 if not known or not detectable (in this version it is always 99). AT+CGMI Print manufacturer information AT+CGMI Nokia Mobile Phones OK AT+CGSN Print IMEI AT+CGSN 350601234567890 OK AT+CGMR Print hardware revision AT+CGMR SW 04.30, HW 0911 OK AT+CGMM Print model code AT+CGMM NHM-6 OK AT+CMGD Delete SMS AT+CMGD= : message number AT+CMGF Select SMS format AT+CMGF= 0: PDU_MODE (default) 1: TEXT_MODE AT+CMGF? Show current format; only TEXT_MODE is supported by AT+CMGL AT+CMGR Read SMS message AT+CMGR= : message number AT+CMGS Send SMS AT+CMGS="" : destination phone number (quotes are mandatory) CTRL+Z to send, ESC to abort AT+CMGL List SMS AT+CMGL= : (empty) 1 3 "REC READ" "REC SENT" 0 2 "REC UNREAD" "REC UNSENT" 4 "ALL" Note: quotes are mandatory AT+G Extended commands "+G" AT+GMI Print manufacturer information for the TA (Terminal Adaptor) Hugh Blemings, Pavel Janik ml. and others... AT+GMR Print revision information for the TA (Terminal Adaptor) gnokiid version, compile date and time AT+GMR 0.6.4 10:49:37 Jan 31 2005 OK AT+GMM Print model information for the TA (Terminal Adaptor) The string is "gnokii configured on %s for models %s" AT+GMM gnokii configured on /dev/ttyS0 for models 6110|6130|6150|6190|5110|5130|5190|31 OK AT+GSN Print serial number for the TA (Terminal Adaptor) AT+GSN none built in, choose your own OK ATA Answer call Answer incoming call D Dial number "T" and "P" are ignored, all subsequent characters are passed to phone Before dialing you must set S35 == 0 for DigitalData mode or S35 != 0 for NonDigitalData mode. ; is not supported (FIXME: ATD needs a better explanation) ATE Set character echo on or off ATE, ATE0 local echo off. ATE1 local echo on (default). Sets bit 2 of register S14. ATH Modem on/off hook ATH, ATH0 hang up current call ATH1 do nothing ATI Get modem information ATI : 0..4 ATI, ATI0: /* Print terminal id (print register S39 as decimal) */ ATI0 0 OK ATI1: /* Print serial number (IMEI) */ Read from phone ATI1 350601234567890 OK ATI2: /* Print phone revision */ Read from phone ATI2 SW 04.30, HW 0911 OK ATI3: /* Print modem revision */ gnokiid version ATI3 gnokiid 0.6.4 OK ATI4: /* Print OEM string */ Read from phone ATI4 Nokia NHM-6 OK ATQ Set results on or off ATQ, ATQ0 quiet off, print results according to ATV (default). ATQ1 quiet on, print nothing. Sets bit 4 of register S14. This command is ignored. ATS Set or get S-register value ATS? Print current value of register ATS= Set register to value : 0..101 : 0..255 To enable auto answer use ATS0= where is a number greater than zero; use ATS0=0 to disable auto answer. Note: when auto answer is enabled phone responds immediatly ignoring the value of . ATV Set verbosity level ATV, ATV0 verbose off, modem responds with numbers (0, 4) ATV1 verbose on, modem responds with words (OK, ERROR) (default) Set bit 8 of register S14. This does not affect extended commands. ATX Set verbosity of connect messages ATX 0..5 Set register S22 This command is ignored. ATZ Reset modem and load stored profile ATZ, ATZ0, ATZ1 all load the same profile ATS0=0S1=0S2=43S3=10S4=13S5=8S35=7ATQ1E1S100=26S101=27 Other registers are set to zero. This only resets the virtual modem and not the phone. gnokii-0.6.31/Docs/protocol/nk7110.txt0000644000175000017500000011534511666163120015427 0ustar leoleo$Id$ Assembled by Balazs Nagy (js@lsc.hu) Marcin Wiacek (Marcin-Wiacek@TOPNET.PL) Jens Bennfors Michael Hund Jay Bertrand Gabriele Zappi Markus Plail ... and other members of gnokii mailing list and authors of some WWW pages. The data provided is for information purposes only. Some of the frames might be hazardous to your phone. Be careful!!! We do not take any responsibility or liability for damages, etc. NOTE: this information isn't (and can't be) complete. If you know anything about features not listed here or you noticed a bug in this list, please notify us via e-mail at our mailing list . Thank you. Document describing frames used in GSM Nokia 6210 and derivatives (7110) Correct format is FBUS version 2/MBUS version 2/IrDA (see nokia.txt for protocol details): List: 0x00: Connect to NBS port ? r Set ringtone {+0x7c,0x01,0x00,0x0d,0x06[6],0x78,ringtone packed according to SM2.0} Seems not to work in MBUS! 0x01: Communication Status ? r Call msg { 0x0002 } ? r Call in progress { 0x0003, seqnr } ? r Remote end hang up { 0x0004, seqnr, ?, error (like in netmon in 39) } ? r incoming call alert { 0x0005, seqnr, numlen, "number", namelen, "name" } ? r answered call { 0x0007, seqnr } ? r terminated call { 0x0009, seqnr } ? r call msg { 0x000a, seqnr } Note: in 6210 4.27 all msg from 0x01 seems to be unavailable s Get call status { 0x20 } r Get call status { 0x21, num of calls, 0xff, callinfo } where callinfo: { 0x64, blklen (0xd4), seqnr (1-8), channel (1-2), state, prevstate, ?, ?, ?, ?, namelen, numlen, name (49 unicode chars + 0x00, 0x00), number (49 unicode chars + 0x00, 0x00) } where state is: 0x00: incoming call 0x02: dialing 0x03: ringing (out) 0x04: ringing (in) 0x05: established 0x06: call held 0x07: remote hangup 0x02: SMS handling s Send SMS message { 0x0001, 0x02, 0x00 (SEND REQUEST), ... } r Message sent { 0x0002 } r Send failed { 0x0003, ?, ?, error (like in netmon in 65)} r SMS message received { 0x0010, ...... } (whole message) s Set CellBroadcast { 0x0020, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01 } for enable cell broadcast ? 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } for disable cell broadcast ? r Set CellBroadcast OK { 0x0021, 0x01 } r Read CellBroadcast { 0x0023, ?, ?, ?, channel, ?, message... } ? s Set SMS center { 0x0030, 0x64, priority, checksum?, format, validity[2], {DefaultRecipient no.}[12], {SMScenter no.}[12], {SMSC name}, 0x00} where tel.no.[12]: {len, type, {number(BCD)}} type: 0x81: normal 0x91: + (international) 0xd0: alphanumeric format: 0x00: text 0x22: fax 0x24: voice 0x25: ERMES 0x26: paging 0x31: X.400 0x32: email validity: 0x000b: 1 hour 0x0047: 6 hours 0x00a7: 24 hours 0x00a9: 72 hours 0x00ad: 1 week 0x00ff: max.time r Set SMS center OK { 0x0031 } r Set SMS center error { 0x0032, reason } s Get SMS center { 0x0033, 0x64, priority } r SMS center received { 0x0034, priority, checksum?, type, validity[2], {DefaultRecipient no.}[12], {SMScenter no.}[12], {SMSC name}, 0x00 } where priority, checksum, type, validity, tel.no.[12]: see 0x02/0x0030 r SMS center error recv { 0x0035, reason } s?? { 0x0074} r?? { 0x0075, 0xFF, 0x11, 0x98} s?? { 0x008C} r?? { 0x008D, 0x00} 0x03: Phonebook functions s Get memory status { 0x0103, 0x02, memory type } where: memory type - see 0x03/0x0107 r Get memory status { 0x0104, 0x00, xL, 0x00[2], y1H, y1L, 0x10, 0x00[2], z?, ymaxH, ymaxL, y2H, y2L, 0x0d?, xH?, 0x00[2]? } where y1: location (lowermost) y2: no. of locations ymax: maximum location no. s Read memory { 0x0107, 0x01, 0x01, 0x00, 0x01, xH, xL, yH, yL, 0x00, 0x00} where x: memory type 0x01: (256) Dialled numbers 0x02: (512) Missed calls 0x03: (768) Received calls 0x05: (500) telephone phonebook 0x06: (160) SIM phonebook 0x07: (10/0) 0x08: (1/0) 0x09: (4) voice mailbox 0x0e: (10) speed dials 0x10: (5) caller groups y: location r Read memory { 0x0108, 0x00, 0x01, code,0x00, 0x00, z, xH, xL, yH, yL, 0x00, 0x00, 0x00, no.of blocks, { block } * } where if code==0x0f && xH==0x34 - phonebook location not found y: location z: generic block size block: {id, 0, 0, blocksize, block no., {contents}, 0x00} id: 0x04 pointer to another memory location { 0xff?, yH, yL, xL,0x00[3] } 0x07 name {len, (unicode)}, 0x08 email 0x09 postal 0x0a note {len, (unicode)} 0x0b number {type, 0x00[3], len, (unicode)} 0x0c ringtone {ringtone no., 0, 0} 0x13 date for a called list (DC, RC, etc.) 0x1b caller group graphic {width, height, 0, 0 {bitmap}} 0x1c caller group graphic on? {(1: yes, 0: no), 0, 0} 0x1e caller group number {number, 0, 0} type: 0x0a: General, 0x03: Mobile (office ?), 0x06: Work, 0x04: Fax, 0x02: Home (mobile ?) s Set mem location { 0x010b, 0x00, 0x01, 0x01, 0x00, 0x00, z, xH, xL, yH, yL, 0x00, 0x00, 0x00, no.of blocks, { block }[no.of blocks] } r Set mem location { 0x010c, 0?, 1?, code, 0?, 0?, z?, 0?, 0?, yH, yL, xL } where code: 0x3d - wrong entry type 0x3e - too much entries s Delete mem location { 0x010f, 0x00, 0x01, 0x04, 0x00, 0x00, 0x0c, 0x01, 0xff, xH, xL, y, 0x00, 0x00, 0x00} where x: location y: memory type r Delete mem location { 0x0110, 0x00, 0x00 } 0x06: Calling line restriction/Call forwarding etc s Set call divert { 0x0001, 0x03, 0x00, divtype, calltype, 0x01, number(packed like in SMS), 0x00, 0x00...,timeout} NOTE: msglen=0x37 where timeout: 0x00: not set ? 0x05: 5 second 0x0a: 10 second 0x0f: 15 second 0x14: 20 second 0x19: 25 second 0x1e: 30 second where divtype: 0x02: all diverts for all call types ? Found only, when deactivate all diverts for all call types (with call type 0x00) 0x15: all calls 0x43: when busy 0x3d: when not answered 0x3e: if not reached calltype: 0x00: all calls (data, voice, fax) 0x0b: voice calls 0x0d: fax calla 0x19: data calls s Deactivate calldiverts{ 0x0001, 0x04, 0x00, divtype, calltype, 0x00 } where divtype, calltype: see above r Deactivate calldiverts{ 0x0002, 0x04, 0x00, divtype, 0x02, calltype, data } s Get call diverts { 0x0001, 0x05, 0x00, divtype, calltype, 0x00 } where divtype, calltype: see above r Get call diverts ok { 0x0002, 0x05, 0x00, divtype, 0x02, calltype, data } where divtype, calltype: see above data: { 0x01, 0x00 } - isn't active { 0x02, 0x01, number(packed like in SMS), 0x00, 0x00..., timeout } r Get prepaid(?) info { 0x0005, ?,?,?,length,message(packed like in 7bit SMS)} 0x0a: Network status s get used network { 0x0070 } r get used network { 0x0071, available,?,?,length,netstatus,netsel,cellIDH, cellIDL,lacH,lacL,MCC+MNC[3],{Opstr}, 4?, len, xlen(78), ylen(21), 0, {bitmap} } where netstatus: 0x00: home network 0x01: roaming network 0x02: no service searching 0x03: no service not searching 0x04: no service no sim netsel: 0x00: manual 0x01: automatic 0xff: unknown where {Opstr}: namelen, {operator name(unicode)} len: {xlen, ylen, 0, {bitmap} + 2 {bitmap}: bitmaplen, 0, 0, {OTA bitmap} available: 0x02 if the logo following is valid, 0x01 for no operator logo following s get network status { 0x0081 } r get network status { 0x0082, network%, 0x14? } s set operator logo { 0x01a3 0x01, oplogo?, MCC+MNC[3], 0?,4?,len, xlen(78),ylen(21), 0 (frames?), {bitmap}*?, 0x00(padding) } where len, {bitmap}: see 0x0a/0x0071 r set operator logo OK { 0x01a4 } 0x13: Calendar notes s Add meeting note { 0x0001, body like in subtype 0x001a...} r Add meeting note { 0x0002, location (2 bytes), status (2 bytes)} s Add call note { 0x0003, body like in subtype 0x001a...} r Add call note { 0x0004, location (2 bytes), status (2 bytes)} s Add birthday note { 0x0005, body like in subtype 0x001a...} r Add birthday note { 0x0006, location (2 bytes), status (2 bytes)} s Add reminder note { 0x0007, body like in subtype 0x001a...} r Add reminder note { 0x0008, location (2 bytes), status (2 bytes)} s Delete calendar note { 0x000b, location (2 bytes) } r Delete calendar note { 0x000c, location (2 bytes), ?, ?, ?, ? } s Get calendar note { 0x0019, location (2 bytes) } r Calendar note recvd { 0x001a, location (2 bytes), entry type, 0x00, year (2 bytes), Month, Day, block} where: entry type - 0x01 - Meeting, 0x02 - Call, 0x04 - Birthday, 0x08 - Reminder block: for Meeting:{hour,minute,alarm (two bytes),recurrence (two bytes),len,0x00,string(unicode)} where alarm=Number of minutes before the time of the meeting that the alarm should be triggered: For meetings with "No alarm"=0xFFFF (-1). For "On time"=0x0000 half an hour=0x001E, and so on. Recurrence=in hours, between future occurrences of this meeting. If there is no repeat, this value is 0x0000. The special value 0xffff means 1 Year! for Call:{Hour,Minute,Alarm (as above),Recurrence (as above),namelen,numberlen, name(unicode),number(unicode)} for Reminder:{Recurrence (as above),len,0x00,string(unicode)} for Birthday:{byte1,byte2,alarm(4 bytes),yearofbirth,alarmtype,len,string(unicode)} byte1 and byte2 may vary (???). Usually are 0x00 both (but not always) In Birthday, the Year in the common part, usually contains a strange year. So, don't consider it as Year of note, neither year of BirthDay (for Year of Birthday use the value described below). where alarm=32-bit integer that is the number of seconds between the desired alarm time and 11:59:58pm on the birthday.For "No Alarm", the value is 0x0000FFFF (65535). YearOfBirth=used instead of the one in the common part of the entry (see above) but only when reading birthday entries. For storing entries, this field does not exist. AlarmType: 0x00 - Tone, 0x01 - Silent ? s??? { 0x0021 } ? r??? { 0x0022, 0x5A, 0x00 } ? s??? { 0x0025 } ? r??? { 0x0026, 0x04, 0x00 } ? s { 0x0029 } ? r { 0x002A, 0x04, 0x00 } s Get first free pos { 0x0031 } r Get first free pos { 0x0032, location (2bytes) } s Get notes info { 0x003a, 0xFF, 0xFE} r Get notes info { 0x003b, how many notes used (2 bytes), 0x01, 0x07, { two bytes with location for each note} *} ? s Get calendar note?? { 0x003E, location (2 bytes) } ? r Get calendar note?? { 0x003F, location (2bytes), ... } 0x14: s Get Picture Image { 0x0007, location, number[2 bytes], 0x00, 0x64 } where location: 0x21 (always ?) r Get Picture Image { 0x0008, 0x07, location, number[2 bytes], 0x07, ??[38], width, height, lenH, lenL, {bitmap}} where location: 0x21 (always ?) s Get SMS Status { 0x0036, 0x64 } r Get SMS Status { 0x0037, 0x05/0x03, 0x01, 0x00, 0x00, a (2 octets), b (2 octets), c (2 octets), d (2 octets), e (2 octets), 0x00 where: a - Number of locations in "fixed" memory. These are all Templates entries in my Nokias 6210 (NPE-3 (c) NMP V05.36 14-11-01, NPE-3 (c) NMP V05.27 01-08-01). I can't remove any of Templates entries in my phone. b - Number of used messages in phone memory. These are messages manually moved from the other folders. Picture messages are saved here. c - Number of unread messages in phone memory. Probably only smart messages. d - Number of used messages in SIM memory. These are either received messages or saved into Outbox/Inbox. Note that you *can't* save message into this memory using 'Move' option. Picture messages are not here. e - Number of unread messages in SIM memory s Set Picture Image { 0x0050, 0x07, location, number[2 bytes], 0x07, ??[38], width, height, lenH, lenL, {bitmap}} std. size: 72x28 where location: 0x21 (always ?) r Set Picture Image { 0x0051, location, number[2 bytes], 0x07 } where location: 0x21 (always ?) s List Picture Images { 0x0096, FolderID, 0x0f, 0x07 } where: FolderID - see 0x14/0x017B r List Picture Images { 0x0097, number of pictures[2 bytes], number1[2 bytes], number2[2 bytes], ..., } s Get SMS from folder { 0x0107, folderID, location, location, 0x01, 0x65, 0x01} where: folderID - see 0x14/0x017B r Get SMS from folder { 0x0108, status, folderID, 0x00, location, type, sender number,...} where: status=0x01 - received/read 0x03 - received/unread 0x05 - stored/sent 0x07 - stored/not sent where: folderID - see 0x14/0x017B where: type=0x00 - received SMS 0x01 - delivery report 0x02 - stored SMS 0x07 - picture message s Delete SMS { 0x010a, folderID, location, location, 0x01 } r Delete SMS { 0x010b } s Get folder status { 0x016b, folderID, 0x0F, 0x01} where: folderID - see 0x14/0x017B r Get folder status { 0x016c, number of entries (2 bytes), entry1number (2 bytes), entry2number(2 bytes), ....} s Get folder names { 0x017a, 0x00, 0x00} r Get folder names { 0x017b, number of strings, folderID, name1, 0x00, folderID, name2, 0x00, name3, 0x00,...} where: folderID=0x08 - Inbox 0x10 - Outbox 0x18 - Archive 0x20 - Templates 0x29 - first "My folders" 0x31 - second "My folders" 0x39 - third -"- and so on 0x17: s Get Battery info { 0x0002 } r Get Battery info { 0x0003, 0x0b, batt%, 0x14?, 0x01? } 0x19: Date & time s Set date time { 0x0060, 1,1,7,yearh,yearl,month,mday,hour,min,0x00 } r Set date time { 0x0061, 0x01 } s Get date time { 0x0062 } r Get date time { 0x0063, 0x01, 0x01, 0x01, 0x07, 0x07,0xD1(year==2001) 0x05(month?) 0x02(day?) 0x00,0x1D,0x0D(hour:minute:second?) s Get alarm { 0x006D } r Get alarm { 0x006E, 0x01, 0x01, 0x20, 0x03, 0x01, 0x0B, 0x14 } s Set alarm { 0x006B, 0x01, 0x20, 0x03, 0x02(on-off), hour, min, 0x00 } r Set alarm { 0x006C, 0x01 } ? s ?? { 0x0083, id } ? r ?? { 0x0084, 0x01, 0x40, 0x03, id, 0x00, 0x00 } ? r ?? { 0x0084, 0x01, 0x40, 0x03, id, 0x00, 0x01 } ? r ?? { 0x0084, 0x01, 0x40, 0x03, id, 0x01, 0x00 } where: id=0x27,0x2a,0x32,0x28,0x40 0x1b: s Get IMEI { 0x0001 } r Get IMEI { 0x0002, {IMEI(ASCII)}, 0x00 } s get HW&SW version { 0x0003, 0x01, 0x32 } r get HW&SW version { 0x0004, "V " "firmware\n" "firmware date\n" "model\n" "(c) NMP." 0x00 0xff[14] } 0x1f: s ??? { 0x0010, 0x02, 0x00, 0xff, 0xff } r ??? { 0x0011, length, 0x00, {block}[length] } where block: { unicode letter[2], 0x0000, 0x00, 0x55, ??, ?? } s Set ringtone { 0x011f, 0x00, location, 0x00, name(Unicode), ringtone(format the same to 0x40/0x019e and 0x40/0x01a0) } where: location: 0x8a to 0x8e on N6210 0x75 to ... on N7110 ? s Get ringtone { 0x0122, 0x00, location} ? r Get ringtone { 0x0123, 0x00, location, name(Unicode), 0x00,...,0x00, 0x02,0xFC,0x09(ringtone contenst)} 0x39: s get profile feature { 0x0101, 0x01, 0x01, 0x01, number1, number2} where number1: from 0x00 to 0x07 (for each profile ?) number2: 0x00 - 0x09, 0x0A, 0x16 - 0x19, 0x1a - 0x1f, 0x20 - 0x29, 0x2a - 0x2c, 0xff where 0x00: keypad tones 0x02: incoming call alert 0x03: ringtone number 0x04: ringing volume 0x05: message alert tone 0x06: vibration 0x07: warning tones 0x08: caller groups alert for 0x09: automatic answer 0xff: name r get profile feature { 0x0102, 0x01, number1, number2, block...} for number2==0xff: (Profile Name) block: 0x01, 0x01, length, name(Unicode), 0x00, 0x00 for number2==0x00: (Keypad Tones) block: 0x01, 0x01, 0x01, Type, 0x01 where: Type : 0x00 = Off 0x01 to 0x03 = Level1 .. Level3 for number2==0x02: (Incoming Call Alert) block: 0x01, 0x01, 0x01, Type, 0x01 where: Type : 0x00 = Ringing 0x01 = Ascending 0x02 = Ring Once 0x03 = Beep Once 0x04 = Caller Groups? 0x05 = Off for number2==0x03: (Ringtone Number) block: 0x01, 0x01, 0x01, Number, 0x01 where: Number : 0x40 to 0x62 - gives number of factory ringtone. The number of menu is obtained by doing (Number - 0x3f); where: Number : 0x89 to 0x8d - gives number of uploaded ringtone. The number of menu is obtained by doing (Number - 0x65),while the uploaded ringtone number is obtained by doing (Number - 0x88). for number2==0x04: (Ringing volume) block: 0x01, 0x??, 0x??, Volume, 0x01 where: Volume : 0 = Level1 .. to 4 = Level5 for number2==0x05: (Message Alert Tone) block: 0x01, 0x01, 0x??, Type, 0x01 where: Type : 0x00 = Off 0x01 = Standard 0x02 = Special 0x03 = Beep Once 0x04 = Ascending for number2==0x06: (Vibration) block: 0x01, 0x??, 0x??, Switch, 0x01 where: Switch : 0 = Off, 1 = On for number2==0x07: (Warning Tones) block: 0x01, 0x??, 0x??, Switch, 0x01 where: Switch : 0 = Off, 1 = On for number2==0x08: (Caller groups Alert for) block: 0x01, 0x??, 0x??, Callers, 0x01 where: Callers : 0xff = All calls alert (Read below *) 0x01 = Family 0x02 = VIP 0x04 = Friends 0x08 = Colleagues 0x10 = Others All logical OR among groups are valid, so if you select from one phone's profile alert for Friends and Collegues, a 0x0c will return (because 0x04 OR 0x08 = 0x0c). (*) If Callers==0xff, means "Alert for All calls". Then, in this case, you don't need to read other groups selection. for number2==0x09: (Automatic answer) block: 0x01, 0x??, 0x??, Switch, 0x01 where: Switch : 0 = Off, 1 = On N.B. This feature is valid for Handsfree and Headset profiles only! s set profile feature { 0x0103, 0x01, 0x01, 0x03, feat_id, profile_id, 0x01, value } where feat_id: feature id (see get profile feature) s ??? { 0x0101, 0x04, 0x01, 0x01, 0xff, 0x03 } r ??? { 0x0102, 0x01, 0x02, 0x03, 0x01, 0x01, 0x01, 0x85/0x087 } s ? { 0x0105} r ? { 0x0106, 0x01, 0x04} 0x3f: WAP s { 0x0000} r { 0x0001, 0x01} s ?? { 0x0003} r ?? { 0x0004} s Get WAP bookmark { 0x0006, 0x00, location} where location: 0 - 14 r Get WAP bookmark { 0x0007, 0x00, name_len, name(unicode), url_len, url(unicode), 0x01,0x80,0x00[7]} r Get WAP bookmark err { 0x0008, error } where error: 0x00 invalid position 0x02 no more bookmark stored s Set WAP bookmark { 0x0009, 0xff, 0xff, name_len, name(unicode), url_len, url(unicode), 0x01,0x80,0x00[7] } Note: bookmark is added to the first free location. ? r Set WAP bookmark err {+0x01, 0x36, 0x0b, error } where error: 0x04 - memory is full 0x01 - we are in the bookmark menu 0x00 - unknown reason for now ;( ? r Set WAP bookmark OK {+0x01, 0x36, 0x00, block } where block: 0x0a, location_of_just_written_bookmark(?), 0x00, next_free_location(?) s Delete WAP bookmark { 0x000c, 0x00, location } where: location = 0-14 r Delete WAR bookmark OK{ 0x000d } r Delete WAPbookmark err{ 0x000e, 0x02 } s ?? { 0x000F} r ?? { 0x0010, 0x00} s Get WAP settings { 0x0015, location} where location: 0x00 - 0x05 r Get WAP settings OK { 0x0016, location } r Get WAP settings err { 0x0017, error } s ??? { 0x001b, location} where location: 0x00 - 0x1d r ??? { 0x001c,...} r ??? err { 0x001d,error} where: error=0x05 0x40: Security commands ? s ???(N6150) { 0x08, 0x00 } ? r ???(N6150) { 0x08 } s Enable extended cmds { 0x64, cmd } where cmd: 0x00: off 0x01: on 0x03: reset (doesn't ask for PIN again) 0x04: reset (PIN is requested) In 5110 makes reset without PIN 0x06: CONTACT SERVICE!!! Don't try it! s Get IMEI { 0x66 } r Get IMEI { 0x66, 0x01, IMEI, 0x00} s (ACD Readings)?(N6150 { 0x68 } r (ACD Readings)?(N6150 { 0x68, ... } s Get Product Profile Settings { 0x6a} r Get Product Profile Settings { 0x6a, 4bytes with Product Profile Settings } s Set Product Profile Settings { 0x6b, 4bytes with Product Profile Settings } r Set Product Profile Settings OK ? { 0x6b } s Get code { 0x6e, code } where code: see 0x08/0x0004 (no allowed code !) r Get code { 0x6e, code, allowed, allowed? (sec code (text)) } where code: see 0x08/0x0004 allowed: 0: no 1: yes ? s Reset Permanent ? Counters (nm->test36) { 0x74, 0x01, 0x01, 0x0e } ? r Reset Permanent ? Counters (nm->test36) { 0x74 } s Call commands { 0x7c, block } where where: command, (values) command: 0x01 values: number(ASCII), 0x00 - makes voice call command: 0x02 - answer call command: 0x03 - release call r Call commands { 0x7c, command } s Netmonitor { 0x7e, field } where: field: 00: next F0: reset F1: off F2: field test menus F3: developer menus s Get simlock info { 0x8a, 0x00} r Get simlock info { 0x8a, 0x00, 0x01, lockstype, locksclosed, 0x00, 0x00, locksinfo(lock1,4,2,3), counter1,counter2,counter4,counter4,0x00 } where: lockstype: bit1,bit2,bit3,bit4 - if set, selected lock is user lock locksclosed: bit1,bit2,bit3,bit4 - if set, selected lock is closed counter1 - counter4: counters for locks s Buzzer pitch { 0x8f, volume, hzLO, hzHI } if volume and hz is 0, it's off r Buzzer pitch { 0x8f} s ACD Readings ? { 0x91, parameter?(0x02,0x03,0x04,0x05,0x07) } r ACD Readings ? { 0x91, parameter?, value? } ? s ???(N6150) { 0x98, 0x00 } ? r ???(N6150) { 0x98, 0x00, 0x04 } s Get bin ringtone { 0x9e, location } where: location=0,1,etc. r Get bin ringtone { 0x9e, location, error, contents... } where location=0,1,etc. error=0x0a, ringtone NOT available 0x00, OK s Set bin ringtone { 0xa0, location, 0x00, contenst... } where: location=0,1,etc. r Set bin ringtone { 0xa0, location, error } where location=0,1,etc. error=0x0a, ringtone NOT set 0x00, ringtone set OK ? r Get MSid { 0xb5, 0x01, 0x2f, msid, 0x25 } s Get info about phone { 0xc8, 0x01 } r Get info about phone { 0xc8, 0x01, 0x00, "V ", "firmware", 0x0a, "firmware date", 0x0a, "model", 0x0a, "(c) NMP.", 0x00 } s Get MCU SW Checksum { 0xc8, 0x02 } r Get MCU SW Checksum { 0xc8, 0x02, 0x00, checksum (4 bytes),0x00 } s DPS External SW { 0xc7, 0x03 } r DSP External SW { 0xc7, 0x03, 0x00, string,0x00 } s Get HW { 0xc8, 0x05 } r Get HW { 0xc8, 0x05, 0x00, HW version (4 bytes), 0x00 } s Get "Made" Date { 0xc8, 0x05 } r Get "Made" Date { 0xc8, 0x05, 0x00, date(4 bytes), 0x00 } s Get DSP Internal SW { 0xc8, 0x09 } r Get DSP Internal SW { 0xc8, 0x09, 0x00, version (1 bytes), 0x00 } s Get PCI version { 0xc8, 0x0b } r Get PCI version { 0xc8, 0x0b, 0x00, version, 0x00 } s Get system ASIC { 0xc8, 0x0c } r Get system ASIC { 0xc8, 0x0c, 0x00, string, 0x00 } s Get COBBA { 0xc8, 0x0d } r Get COBBA { 0xc8, 0x0d, 0x00, string, 0x00 } s Get PLUSSA { 0xc8, 0x0e } r Get PLUSSA { 0xc8, 0x0e, available, 0x00 } where available: 0x01: not available s Get CCONT { 0xc8, 0x0f } r Get CCONT { 0xc8, 0x0f, available, 0x00 } where available: 0x01: not available s Get PPM version { 0xc8, 0x10 } r Get PPM version { 0xc8, 0x10, 0x00, "V ", "firmware", 0x0a, "firmware date", 0x0a, "model", 0x0a, "(c) NMP.", 0x00 } s Get PPM info { 0xc8, 0x12 } r Get PPM info { 0xc8, 0x12, 0x00, PPM version ("B", "C", etc.), 0x00 } s Set HW version { 0xc9, 0x05, version, 0x00 } s Get Product Code { 0xca, 0x01 } r Get Product Code { 0xca, 0x01, 0x00, number, 0x00 } s Get Order Number { 0xca, 0x02 } r Get Order Number { 0xca, 0x02, 0x00, string, 0x00 } s Get Prod.Ser.Number { 0xca, 0x03 } r Get Prod.Ser.Number { 0xca, 0x03, 0x00, number, 0x00 } s Get Basic Prod.Code { 0xca, 0x04 } r Get Basic Prod.Code { 0xca, 0x04, 0x00, number, 0x00 } s Set Product Code { 0xcb, 0x01, product code, 0x00 } s Set Order Number { 0xcb, 0x02, number, 0x00 } s Set Prod.Ser.Number { 0xcb, 0x03, number, 0x00 } s Get (original ?)IMEI { 0xcc, 0x01 } r Get (original ?)IMEI { 0xcc, 0x01, IMEI, 0x00 } s Get Manufacture Month { 0xcc, 0x02 } r Get Manufacture Month { 0xcc, 0x02, 0x00, string, 0x00 } s Get Purchare date { 0xcc, 0x04 } r Get Purchare date { 0xcc, 0x04, 0x00, string, 0x00 } s Set "Made" date { 0xcd, 0x02, string, 0x00 } s Make "all" phone tests{ 0xce,0x1d,0xfe,0x23,0x00,0x00} s Make one phone test { 0xce,0x1d,num1,num2,num3,num4} Where num1-num4: 0x02,0x00,0x00,0x00; 0x04,0x00,0x00,0x00; 0x08,0x00,0x00,0x00; 0x10,0x00,0x00,0x00; 0x20,0x00,0x00,0x00; 0x40,0x00,0x00,0x00; 0x80,0x00,0x00,0x00; 0x00,0x01,0x00,0x00; 0x00,0x02,0x00,0x00; 0x00,0x04,0x00,0x00; - "Power off" No test for "Security data" 0x00,0x10,0x00,0x00; 0x00,0x20,0x00,0x00; 0x00,0x40,0x00,0x00; 0x00,0x80,0x00,0x00; 0x00,0x00,0x01,0x00; .... 0x00,0x00,0x10,0x00; s Result of phone tests { 0xcf } r Result of phone tests { 0xcf, number of tests, results of next tests } ? s ??? { 0xd1 } ? r ???(N5110) { 0xd1, 0x00, 0x1d, 0x00, 0x01, 0x08, 0x00 } s LCD Test { 0xd3, value } where value: 0x03, 0x02 - 1'st test 0x03, 0x01 - 2'nd test 0x02, 0x03 - clears screen s ACD Readings(N6150)? { 0xd4, 0x02, 0x00, 0x02, 0x00, 0x0e, 0x01} r ACD Readings(N6150)? { 0xd4, 0x02, 0x00, 0x02, 0x00, 0x0e, 0x01, ?} r Function of { 0xff, 0x8c } 0x40 msgtype not supported ? 0x78: s Status confirm { 0x0201, 0x03 } r Incoming call seq1 { 0x0102 0x0e 0x03 } r Incoming call seq2 { 0x0102 0x7e 0x01 } 0x79: s CarKit enable { 0x0201 0x01 0x62 0x00 } r CarKit enabled { 0x0201 0x02 0x06 0x00 "V " {version} "\nHFU" 0x00 } 0x7a: settings r Set setting { 0x01eb, number, 0x00 } s Set setting { 0x01ec, number, contents } where for number: 0x15 (startup logo) : 0x00, 0x00, 0x00, 0x04, 0xc0, 0x02, 0x00, height, 0xc0, 0x03, 0x00, width, 0xc0, 0x04, 0x03, 0x00, {bitmap} } where width, height, {bitmap}: see 0x7a/0x01ed 0x15 s Get setting { 0x01ee, number} where number: 0x01 - 0x1e 0x15: startup logo 0x1c: security code r Get setting { 0x01ed,number, 0x00, contents} where for number: 0x15 (startup logo) : 0x00, 0x00, 0x00, 0x04, 0xc0, 0x02, 0x00, height, 0xc0, 0x03, 0x00, width, 0xc0, 0x04, 0x03, 0x00, {bitmap} } where height: 60 (0x3c) or 65 width: 96 (0x60) {bitmap}: like other bitmaps but pixels placed vertically. 0x1c (security code): {code(ascii)}, 0x00 0x7f: Acknowledge(FBUS/IRDA){+type, seq } Acknowledge(MBUS)... 0xd0: s Power on message seq1 {+04 } r Power on message seq1 {+05 } 0xd1: s Get HW&SW version { 0x0003, 0x00 } 0xd2: r Get HW&SW version { 0x0003 "V " "firmware\n" "firmware date\n" "model\n" "(c) NMP." } 0xf4: Power on message seq 2 gnokii-0.6.31/Docs/protocol/nk6185.txt0000644000175000017500000000500111666163120015425 0ustar leoleo$Id$ Assembled by ... and other members of gnokii mailing list and authors of some WWW pages. The data provided is for information purposes only. Some of the frames might be hazardous to your phone. Be careful!!! We do not take any responsibility or liability for damages, etc. NOTE: this information isn't (and can't be) complete. If you know anything about features not listed here or you noticed a bug in this list, please notify us via e-mail at our mailing list . Thank you. Document describing frames used in CDMA Nokia 6185. Correct format is MBUS version 2 (see nokia.txt for protocol details): List: 0x07: Phonebook functions ? s Set mem location {0x0710, 0x00, memory, 0x00, location, length, number(each byte contains two digits), 0x00, ..., name[23], 0x00 } where: memory 0x22 - internal phonebook max. length for name 15 max. length for number 15 bytes (30 digits) s Get mem location {0x0711, 0x00, memory, 0x00, location } where: memory 0x22 - internal phonebook 0x40: ? s Read phonebook {+0x00, 0x00, 0x07, 0x11, 0x00, 0x10, 0x00, location } s Get phone memory ? {+0x00, 0x01, 0xc8, 0xXX} 0xd1: ? s Registration request? {+0x00, 0xF8, 0x05, 0xE9, 0x00, 0x02, 0x1D, 0x00, 0x1D} s Get HW&SW version { 0x0003, 0x00 } ? s Get phone version? { 0x000D, 0x00, 0x00, 0x02} ? s ??? { 0x47, 0x00, 0x00} ? s ??? { 0x47, 0x00, 0x05} s Press key { 0x51, 0x00, 0x01, KEY } dials in digital CDMA default mode? s Key release { 0x52, 0x00, 0x01, KEY } 0xd2: r Get HW&SW version { 0x0003 "V " "firmware\n" "firmware date\n" "model\n" "(c) NMP." } ? r Get phone version { 0x000D, "V " "firmware\n" "firmware date\n"} ? r ??? {+0x01, 0x00, 0x47, 0x00} 0xdd: Phonebook functions ? r Get mem location {+0x01, 0x00, block, length, number(each byte contains two digits), 0x00, ..., name[23], 0x00 } where: block: 0x11, 0x00, memory, 0x00, location (bytes like in 0x07/0x0711) memory 0x22 - internal phonebook max. length for name 15 max. length for number 15 bytes (30 digits) gnokii-0.6.31/Docs/protocol/nk6110.txt0000644000175000017500000015042611666163120015425 0ustar leoleo$Id$ Assembled by Balazs Nagy (js@lsc.hu) Alfred R. Nurnberger Hugh Blemings Mike Bradley Odinokov Serge Pavel Janik Pawel Kot Marcin Wiacek (Marcin-Wiacek@TOPNET.PL) Harri Yli-Torkko ... and other members of gnokii mailing list and authors of some WWW pages. The data provided is for information purposes only. Some of the frames might be hazardous to your phone. Be careful!!! We do not take any responsibility or liability for damages, etc. NOTE: this information isn't (and can't be) complete. If you know anything about features not listed here or you noticed a bug in this list, please notify us via e-mail at our mailing list . Thank you. Document describing frames used in GSM/PCN Nokia 6110 and derivatives (Nokia 6130, 6150, 6190, 5110, 5130, 5150, 5190, 3210, 3310) Correct format is FBUS version 2/Direct IRDA/MBUS version 2 (see nokia.txt for protocol details): List: 0x00: Monitoring values r monitoring value {+0x01, 0x01, block... } where block: 0x5e, 0x05, 0x7a(?), 0xd0(?), 0x85(?), 0x02, percentHI, percentLO Battery percent level 0x5e, 0x0c, 0x52(?), 0x4b(?), 0x6f(?), 0x02, voltageHI, voltageLO Battery standby voltage ............ 0x01: Call Information s Make call { 0x0001, "number", type, block } where type: 0x01 - data call 0x05 - voice call block: data call (non digital lines): 0x02,0x01,0x05,0x81,0x01,0x00,0x00,0x01,0x02,0x0a, 0x07,0xa2,0x88,0x81,0x21,0x15,0x63,0xa8,0x00,0x00 data call (digital lines): 0x02,0x01,0x05,0x81,0x01,0x00,0x00,0x01,0x02,0x0a, 0x07,0xa1,0x88,0x89,0x21,0x15,0x63,0xa0,0x00,0x06, 0x88,0x90,0x21,0x48,0x40,0xbb voice call: 0x01, 0x01, 0x05, 0x81/0x00, sendnum, 0x00, 0x00, 0x01 where: sendnum (own number sending): 0x01: preset (depends on network) 0x03: on 0x02: off r Call going msg { 0x0002 } r Call in progress { 0x0003, seqnr } r Remote end hang up { 0x0004, seqnr, ?, error (like in netmon in 39) } r incoming call alert { 0x0005, seqnr, numlen, "number", namelen, "name" } s Answer call part 2 { 0x0006, seqnr, 0x00 } r answered call { 0x0007, seqnr } s Hang up { 0x0008, seqnr, 0x85 } r terminated call { 0x0009, seqnr } r call msg { 0x000a, seqnr } s Get call status { 0x0020 } r Get call status { 0x0021, num of calls, callinfo } where callinfo: {0x64, blklen - 2 (0x17), seqnr, channel (1-2), state, prevstate, ?, ?, ?, ?, namelen, name (13 chars + 0x00) } r call held { 0x0023, seqnr, 0x01 } r call resumed { 0x0025, seqnr, 0x01 } r call switch { 0x0027, 0xff, 0x01 } r Send DTMF/voice call { 0x0040} s Answer call part 1 { 0x0042,0x05,0x01,0x07,0xa2,0x88,0x81,0x21,0x15,0x63,0xa8,0x00,0x00, 0x07,0xa3,0xb8,0x81,0x20,0x15,0x63,0x80 } s Sent after issuing { 0x0042,0x05,0x81,0x07,0xa1,0x88,0x89,0x21,0x15,0x63,0xa0,0x00,0x06, data call 0x88,0x90,0x21,0x48,0x40,0xbb,0x07,0xa3, (digital lines) 0xb8,0x81,0x20,0x15,0x63,0x80 } s Sent after issuing { 0x0042,0x05,0x01,0x07,0xa2,0xc8,0x81,0x21,0x15,0x63,0xa8,0x00,0x00, data call 0x07,0xa3,0xb8,0x81,0x20,0x15,0x63,0x80, (non digital lines) 0x01,0x60 } s Send DTMF { 0x0050, length, {ascii codes for DTMF}, 0x01 } r Send DTMF ok { 0x0051 } Note: to make data call (non digital lines): 1.send "Make call" for non digital lines 2.send "Sent after issuing data call (non digital lines)" to make data call (digital lines): 1.send "Answer call part 1" 2.send "Sent after issuing data call (digital lines)" 3.send "Make call" for digital lines to answer call: 1.send "Answer call part 1" 2.send "Answer call part 2" 0x02: SMS handling s Send SMS message { 0x0001, 0x02, 0x00 (SEND REQUEST), ... } r Message sent { 0x0002 } r Send failed { 0x0003, ?, ?, error (like in netmon in 65)} s Get SMS message { 0x0007, 0x02, location, 0x01, 0x64 } s Initiate connection { 0x000d, 0x00, 0x00, 0x02 } r Initiate ACK { 0x000e, 0x01 } r SMS message received { 0x0010, ...... } (whole message) s Set CellBroadcast { 0x0020, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01 } for enable cell broadcast ? 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } for disable cell broadcast ? r Set CellBroadcast OK { 0x0021, 0x01 } r Set CellBroadcast err { 0x0022, 0x01 } ??? r Read CellBroadcast { 0x0023, ?, ?, ?, channel, ?, message... } ? s Set SMS center { 0x0030, 0x64, priority, checksum? ,0?, format, validity, {DefaultRecipient no.}[12], {SMScenter no.}[12], {SMSC name}, 0x00} where tel.no.[12]: {len, type, {number(BCD)}} type: 0x81: normal 0x91: + (international) 0xd0: alphanumeric format: 0x00: text 0x22: fax 0x24: voice 0x25: ERMES 0x26: paging 0x31: X.400 0x32: email validity: 0x0b: 1 hour 0x47: 6 hours 0xa7: 24 hours 0xa9: 72 hours 0xad: 1 week 0xff: max.time r Set SMS center OK { 0x0031 } r Set SMS center error { 0x0032, reason } where reason: 0x02: empty location 0x06: SIM card not ready 0x0c: waiting for PIN s Get SMS center { 0x0033, 0x64, priority } [Nokia 3410 info: before the actual response unknown frame is returned: 0x01 0x0f 0x00 0xc9] r SMS center received { 0x0034, priority, checksum?, format, 0x00?, validity, {DefaultRecipient no.}[12], {SMScenter no.}[12], {SMSC name}, 0x00} tel.no[12]: {len, type, {number(BCD)}} where priority, checksum, type, validity, tel.no.[12]: see 0x02/0x0030 r SMS center error recv { 0x0035, reason } where reason: 0x01: empty location 0x06: SIM card not ready 0x0c: waiting for PIN r Still waiting { 0x00c9 } 0x03: Phonebook functions s Get mem location { 0x0001, memtype, location, 0 } where memory: 0x01: telephone and SIM phonebook (in one) 0x02: telephone phonebook 0x03: SIM phonebook 0x04: SIM fixdialling-phonebook (?) 0x05: Own numbers 0x07: Dialled numbers 0x08: Missed calls 0x09: Received calls 0x0b: voice mailbox (location not important) [Note: Nokia 3210, 3310 and 3330 can write both name and number to "Own numbers", but 3310 reads back only the number, not the name.] r mem location recvd { 0x0002, 0x00,namelen,"name",numlen,"number",groupID, date_set?, yearLO, yearHI, month, day, hour, minute, sec. } where: date_set==0x01 - set 0x00 - not set, yearLO, yearHI, month, day, hour, minute, sec. not available in frame Note: in 3310 all entries have null name ("feature" or bug ?) r mem loc error recvd { 0x0003, errtype } where errtype: 0x6f: SIM card not ready 0x74: invalid location 0x75: protected by security code 0x7d: invalid memory type 0x8d: waiting for PIN s Set mem location { 0x0004, memtype,location,namelen,"Name",numlen,"number",groupID } r mem set OK { 0x0005 } r mem set error { 0x0006, errtype } where errtype: 0x6f: SIM card not ready 0x74: invalid location 0x7d: name is too long 0x8d: waiting for PIN 0x90: name is too long s Mem status request { 0x0007, memtype } r Mem status recvd { 0x0008, memtype, free, used } r Mem status error recv { 0x0009, errtype } where errtype: 0x6f: mem status error 0x7d: invalid memory type 0x8d: waiting for pin s Get caller group data { 0x0010, groupID } r Get caller group data { 0x0011, groupID, size, "Name", ringtoneID, graphic_on?1:0, lenHI, lenLO, OTABitmap (72x14 logo) } r Get call.group error { 0x0012, reason } where reason: 0x7d: invalid location s Set caller group data { 0x0013, groupID, size, "Name", ringtoneID, graphic_on?1:0, lenHI, lenLO, OTABitmap (72x14 logo) } r Set caller group OK { 0x0014 } r Set call.group error { 0x0015, reason } where reason: 0x7d: invalid location s Get speed dial { 0x0016, index(1-9) } r Get speed dial OK { 0x0017, mem.type, location } where mem.type: 0x02: ME (== 0 if not stored) 0x03: SIM location: memory location (== 0 if not stored) r Get speed dial error { 0x0018 } s Set speed dial { 0x0019, index(1-9), mem.type, location } r Set speed dial OK { 0x001a } r Set speed dial error { 0x001b, errtype } where errtype: 0x6f: SIM card not ready 0x74: invalid location 0x7d: invalid memory type 0x8d: waiting for PIN Note: if mem.type == ME on Nokia 3210 errtype is 0x7d but on Nokia 3330 it is 0x74 0x04: Phone Status s Phone status { 0x0001 } r Phone status { 0x0002, mode, signal str, ???, pwr, batt.level } where mode: 1: registered within the network 2: call in progress 3: waiting for pin 4: powered off pwr: 1: AC/DC 2: battery s Request Phone ID { 0x0003 } r RequestPhone ID { 0x0004, 0x01,"NOKIA""imei", 0, "model", 0, "prod.code", 0, "HW", 0, "firmware", 0x00, 0x01 } 0x05: Profile settings s Set profile feature { 0x0010, 1, nr, feature, a, 1 } where nr: see 0x05/0x0013 feature: see 0x05/0x0014 a: see 0x05/0x0014 r Set profile feat. OK { 0x0011, 1 } r Set profile feat. ERR { 0x0012, reason } where reason: 0x6f: SIM card not ready 0x7d: invalid location 0x8d: waiting for PIN s Get profile feature { 0x0013, 1, nr, feature, 1 } where nr is profile number (general=0, silent, meeting, outdoor, pager, car, headset=6) feature: see 0x05/0x0014 r Get profile feature { 0x0014, 1, nr, feature, 4, a, b, c, d, 1 } Features and answers (in a, b, c, d form): 0x00: keypad tones xx, 1, 0, 2 xx: 0xff: off 0x00: level 1 0x01: level 2 0x02: level 3 0x01: lights (? only in car profile) (what number in Nokia 3310 ?) xx, 0, 0, 1 xx: 0x00: off 0x??: on (maybe 0x01) 0x02: incoming call alert (in Nokia 3310/3330 feature 0x01) xx, 1, 0, 7 xx: 1: ringing, 2: beep once, 3: unknown 4: off 5: ring once 6: ascending 7: caller groups (see feature #0x08) 0x03: ringing tone (in Nokia 3310/3330 feature 0x02) xx, 0, 0, 0 xx: 0x12: ring ring 0x13: low etc 0x04: ringing volume (in Nokia 3310/3330 feature 0x03) xx, 0, 0, 0 xx: level 1 (0x06) - level 5 (0x0a) 0x05: message alert tone (in Nokia 3310/3330 feature 0x04) xx, 1, 0, 4 xx: 0: no tone 1: standard 2: special 3: beep once 4: ascending 0x06: vibration (in Nokia 3310/3330 feature 0x05) xx: 0: off 1: on 0x07: warning and game tones (in Nokia 3310/3330 feature 0x06 called warning tones) xx, 4, 0, 4 xx: 0xff: off 0x04: on 0x07: screen saver - Nokia 3310/3330 xx: 1: on 0: off 0x08: incoming caller groups (what number in Nokia 3310 ?) xx, 0, 0, 0 xx: 1: family 2: VIP 4: friends 8: collegues 16: other 0x09: automatic answer (what number in Nokia 3310 ?) xx, 0, 0, 1 xx: 0x00: off 0x01: on The following frames are valid only in Nokia 3330. Features for a <= 0x09 are separately set to each profile, other are common for all profiles: 0x08 Screen saver -> Timeout: 0x00 = 5 sec 0x01 = 20 sec 0x09 Screen saver -> Screen saver: 0x00 ... 0x0d = Number of picture image 0x17 Phone book -> Options -> Memory in use: 0x00 = Phone 0x01 = SIM card 0x18 Settings -> Phone settings -> Network selection: 0x00 = Automatic 0x01 = Manual 0x19 Settings -> Call settings -> Automatic redial: 0x00 = Off 0x01 = On 0x1a Settings -> Call settings -> Speed dialling: 0x00 = Off 0x01 = On 0x1b Settings -> Call settings -> Own number sending: 0x00 = Set by network 0x01 = On 0x02 = Off 0x1c Settings -> Phone settings -> Cell info display: 0x00 = Off 0x1d Phone book -> Options -> Type of view: 0x00 = Name list 0x01 = Name, number 0x02 = Large font 0x1e Settings -> Phone settings -> Language: 0x00 = English 0x07 = Dansk 0x08 = Svenska 0x09 = Suomi 0x0c = Turcke 0x0e = Norsk 0x10 = Automatic 0x32 = Reboots ME 0x20 Messages -> Message settings -> Common -> Reply via same centre: 0x00 = No 0x01 = Yes 0x21 Messages -> Message settings -> Common -> Delivery reports: 0x00 = No 0x01 = Yes 0x22 Clock -> Clock settings -> Show/Hide clock: 0x00 = Show 0x01 = Hide 0x23 Clock -> Clock settings -> Time format: 0x00 = 24-hour 0x01 = 12-hour 0x24 Select profile: 0x00 = General 0x01 ... 0x05 = rest of them 0x26 Settings -> Phone settings -> Confirm SIM service actions: 0x00 = Not asked 0x01 = Asked 0x27 Messages -> Write messages -> Options -> Dictionary: 0x00 = Off 0x01 = English 0x0a = Suomi 0x28 Messages -> Message settings -> Common -> Character support: 0x00 = Automatic 0x01 = GSM alphabet 0x02 = Unicode 0x29 Startup logo settings: 0x00 = Your own uploaded logo 0x01 = Nokia 0x02 = Draft HUMAN technology(tm) 0x03 = Itineris 0x2d Clock -> Auto update of date and time: 0x00 = Off 0x01 = Confirm first 0x02 = On The following frames are valid only in Nokia 6110 0x16 Anykey answer: 0x00 = Off 0x01 = On 0x17 ??? 0x18 Memory in use: 0x00 = Phone 0x01 = SIM card 0x19 Network selection: 0x00 = Automatic 0x01 = Manual 0x1a Automatic redial: 0x00 = Off 0x01 = On 0x1b ??? 0x1c ??? 0x1d Speed dialling: 0x00 = Off 0x01 = On 0x1e Own number sending: 0x00 = Preset 0x01 = On 0x02 = Off 0x1f Cell info display: 0x00 = Off 0x01 = On 0x21 Language: 0x00 = English 0x01 = Deutsch 0x02 = Francais 0x03 = Italiano 0x06 = Nederlands 0x07 = Dansk 0x08 = Svenska 0x09 = Suomi 0x0e = Norsk 0x10 = Automatic 0x26 Reply via same centre: 0x00 = No 0x01 = Yes 0x27 Delivery reports: 0x00 = No 0x01 = Yes 0x28 Hide clock: 0x00 = Show clock 0x01 = Hide clock 0x29 Time format: 0x00 = 24-hour 0x01 = 12-hour 0x2a Selected profile: see "Get profile feature" r Get profile feat. ERR { 0x0015, reason } where reason: 0x6f: SIM card not ready 0x7d: invalid location 0x8d: waiting for PIN s Get welcome message { 0x0016 } r Get welcome message { 0x0017, no.of blocks, { block } * } where block: { id, {blockspecific} } id: 1: startup logo { y, x, picture (coding?) } 2: welcome note { len, "message" } 3: operator msg { len, "message" } s Set welcome message { 0x0018, no.of blocks, { block } * } where block: see 0x05/0x0017 r Set welcome OK { 0x0019, 0x01 } s Get profile name { 0x001a, nr } where nr: see 0x05/0x0013 r Profile name { 0x001b, 1, 1, 3, flen, nr, len, {text} } where nr: see 0x05/0x0013 len: text length flen len + len(nr, len) = len + 2 Note: in Nokia 3310 name is in Unicode s Set profile name { 0x001c, 1, 3, flen, nr, len, {text} } r Set profile name OK / ERR { 0x001d, return } where return: 0x01: OK 0x6f: SIM card not ready 0x8d: waiting for PIN 0x93: ?? s Set oplogo { 0x0030, location, MCC1, MCC2, MNC, lenhi=0x00, lenlo=0x82, OTABitmap } r Set oplogo OK { 0x0031 } r Set oplogo error { 0x0032, reason } where reason: 0x7d invalid location s Get oplogo { 0x0033, location } where location: 1 (doesn't seem to matter) r Get oplogo { 0x0034, location, MCC1, MCC2, MNC, lenhi=0x00, lenlo=0x82, OTABitmap } [Nokia 3410 info: before OTABitmap we have 2 extra octets -- 0x00 0x1e] r Get oplogo error { 0x0035, reason } where reason: 0x7d invalid location (treated as unknown error in the driver) s Set ringtone { 0x0036, location,0x00,0x78, ringtone packed according to SM2.0} r Set ringtone OK { 0x0037 } r Set ringtone error { 0x0038, reason } where reason=0x7d, when not supported location (treated as unknown error in the driver) s Get services settings { 0x0080, setting (2 bytes) } where: setting: 0x02,0x00=Nokia access number 1 0x02,0x01=Operator access number 1 0x01,0x00=Personal bookmark 1 settings (name only ?) 0x01,0x01=? 0x02,0x02=? r Get services sett.OK { 0x0081, .... } r Get services sett.err { 0x0082, 0x7b } 0x06: Calling line restriction/Call forwarding etc s Set call divert { 0x0001, 0x03, 0x00, divtype, calltype, 0x01, number(packed like in SMS), 0x00, 0x00...,timeout} NOTE: msglen=0x37 where timeout: 0x00: not set ? 0x05: 5 second 0x0a: 10 second 0x0f: 15 second 0x14: 20 second 0x19: 25 second 0x1e: 30 second where divtype: 0x02: all diverts for all call types ? Found only, when deactivate all diverts for all call types (with call type 0x00) 0x15: all calls 0x43: when busy 0x3d: when not answered 0x3e: if not reached calltype: 0x00: all calls (data, voice, fax) 0x0b: voice calls 0x0d: fax calls 0x19: data calls s Deactivate calldiverts{ 0x0001, 0x04, 0x00, divtype, calltype, 0x00 } where divtype, calltype: see above r Deactivate calldiverts{ 0x0002, 0x04, 0x00, divtype, 0x02, calltype, data } s Get call diverts { 0x0001, 0x05, 0x00, divtype, calltype, 0x00 } where divtype, calltype: see above r Get call diverts ok { 0x0002, 0x05, 0x00, divtype, 0x02, calltype, data } where divtype, calltype: see above data: { 0x01, 0x00 } - isn't active { 0x02, 0x01, number(packed like in SMS), 0x00, 0x00..., timeout } r Get prepaid(?) info { 0x0005, ?,?,?,length,message(packed like in 7bit SMS)} r Call diverts active { 0x0006, ??? } 0x07: s ??? { 0x0022, ? (1&2 sounds OK) } r ??? OK { 0x0023, ?,?,? } r ??? error { 0x0024, reason } s ??? { 0x0025, ??? } r ??? OK { 0x0026, ??? } r ??? error { 0x0027, reason } 0x08: Security codes s Change code { 0x0004, code, "current", 0x00, "new", 0x00 } where code: 1: security code (5 chars) 2: PIN (4 chars) 3: PIN2 (4 chars) 4: PUK (8 chars) 5: PUK2 (8 chars) r Change code ok { 0x0005 } r Get code status err { 0x0006, reason } where reason: 0x6f: SIM card not ready 0x79: ??? (see note) 0x88: current code wrong (or not needed?) 0x8d: current code wrong Note: 0x79 was observed when trying to change the code on an expired SIM (it still can be changed via phone menus) s Status request { 0x0007, 0x01 } r pin recvd { 0x0008, accepted } where accepted: 0x0c (or 0x06): OK code: waiting for (0x08/0x0004) code r Change code err { 0x0009, reason } where reason: see above s entering code { 0x000a, code, "code", 0x00 } where code: see 0x08/0x0004 r Enter code err { 0x000c, reason } where reason: see above 0x09: SIM login r login { 0x0080 } r logout { 0x0081 } 0x0a: Network status s Key duplication on/off{ 0x0044, on? 0x01: 0x02 } s get used network { 0x0070 } r network registration { 0x0071, ?,?,?,length,netstatus,netsel,cellIDH,cellIDL,lacH,lacL,netcode,netcode,netcode } where netstatus: 0x00: home network 0x01: roaming network 0x02: no service searching 0x03: no service not searching 0x04: no service no sim netsel: 0x00: manual 0x01: automatic 0xff: unknown observed values on Nokia 3210, 3310 and 3330 netstatus: 0x01 home network 0x03 no service (when powered off or waiting pincode or no signal or roaming refused) netsel: 0x01 manual 0x02 automatic when waiting for PIN code the reply is shorter r { 0x0071, ?,?,?,length==2,netstatus?,netsel? } 0x0c: Keys (Nokia 3310 seems to not respond to these frames) s Get key assignments { 0x0040, 0x01 } r Get key assignments { 0x0041, {key '1'}, 0x00, {key '2'} ... {key '0'}, 0,0,0, {symbols}, 0 } where {key '0'} => ' ', '0' s Press key { 0x0042, press: 0x01; release: 0x02, button, 0x01 } where button: 0x01 - 0x09: 1-9 0x0a: 0 0x0b: # 0x0c: * 0x0d: Power 0x0e: Pick up phone 0x0f: Hang 0x10: Volume + 0x11: Volume - 0x17: Up 0x18: Down 0x19: Menu 0x1a: Names 0x1B onwards: don't know but they do produce a beep and light up the keypad as if a key had been pressed. r Press key ack { 0x0043, press/release/error(0x05) } s ??? { 0x0044 } r ??? ack { 0x0045, 0x01 } 0x0d: Status r Display { 0x0050, 0x01, y, x, len, "string"(unicode) } s Status request { 0x0051 } r Status { 0x0052, no. of byte pairs, {byte pair} } where {byte pair}: {cmd, 1:off 2:on} cmd: 1: call in progress 2: ??? 3: have unread sms 4: voice call active 5: fax call active 6: data call active 7: key lock active 8: is SMS storage full s Display status { 0x0053, 1:on 2:off } (will send displayed messages with x,y coordinates) r Display status ack { 0x0054, 1 } 0x11: Phone clock & alarm s set date and time { 0x0060, 1,1,7,yearh,yearl,month,mday,hour,min,0x00 } r date and time set { 0x0061, return } where return 0x01: OK 0x6f: SIM card not ready 0x8d: waiting for PIN s get date and time { 0x0062 } r date and time recvd { 0x0063,date_set?,time_set?,?,?,yearh,yearl,month,mday,hour,min,second } where: date_set & time_set==0x01 - set 0x00 - not set, ?,?,yearh,yearl,month,mday,hour,min,second not available in frame s set alarm { 0x006b, 1,32,3,0x02(on-off),hour,min,0x00 } r alarm set { 0x006c, return } where return 0x01: OK 0x6f: SIM card not ready 0x8d: waiting for PIN s get alarm { 0x006d } [Not supported by Nokia 3410] r alarm received { 0x006e,?,?,?,?,alrm(==2:on),hour,min } 0x12: Connect to NBS port (61xx only ?) s Send {+0x0c, 0x01, UDH header, data} (without 0,1 header -- for oplogo, cli, ringtone etc upload) where: UDH header = 0x06, 0x05, 0x04,destporth,destportl,srcporth,srcportl Seems not to work in MBUS! 0x13: Calendar notes s Write calendar note { 0x0064, 0x01, 0x10, length, type, yearH, yearL, month, day, hour, timezone, alarm?(alarm yearH, yearL, month, day, hour, timezone): (0,0,0,0,0,0), textlen, "text" } r Write cal.note report { 0x0065, return } where return: 0x01: ok 0x6f: SIM card not ready 0x73: memory full 0x7d: failure 0x81: calendar functions busy. Exit Calendar menu and try again 0x8d: waiting for PIN s Calendar notes set { 0x0066... } r Calendar note recvd { 0x0067, 0x01, ?, length, type, yrH,yrL,mon,day,hr,tz,alrm yrH,yrL,mon,day,hr,tz,textlen,"text"} [Nokia 3310|3330 info: The year given for start date is incorrect -- apparently it is always 2090 -- the year for the alarm is correct. The text field starts with the type of encoding for the rest of the text: 0x01 for ASCII-only text 0x02 if text contains the Yen sign 0x03 if text contains the Euro sign (or both Euro and Yen) ] [Nokia 3410 info: The year given by the phone is incorrect -- subtract 90 to get the real value The text field starts with character 0x01. This is apparently a value for the type of encoding for the rest of the text field.] r Calendar note recvd { 0x0067, return } where return: 0x01: OK 0x6f: SIM card not ready 0x8d: waiting for PIN 0x93: empty location s Delete cal.note { 0x0068, location } r Del. cal.note report { 0x0069, err } where err: 0x01: OK 0x6f: SIM card not ready 0x81: calendar functions busy. Exit Calendar menu and try again 0x8d: waiting for PIN 0x93: empty location 0x14: SMS funcs s Write SMS to SIM { 0x0004, .... } r Write SMS to SIM Ok { 0x0005, ?, location } r Write SMS to SIM err { 0x0006, errcode } where errcode: 0x02: all locations busy 0x03: invalid location 0x06: SIM card not ready 0x0c: waiting for PIN s Mark SMS as read { 0x0007, 0x02, location, 0x00, 0x64 } r SMS message frame rcv { 0x0008,subtype,?,num,?,BCD(smscenter)...} 20->type, 22->status where type: 0x06: delivery report status: 0x00: delivered 0x30: pending 0x46: failed 0x09: reading failed subtype: 0x02: invalid mem type 0x07: empty SMS location 0x0c: no access to memory (no PIN in card, etc.) r SMS read error { 0x0009, errcode } where errcode: 0x00: unknown reason 0x02: invalid location 0x06: SIM card not ready 0x07: empty location 0x0c: waiting for PIN s Delete SMS message { 0x000a, 0x02, location } r Delete OK { 0x000b } r Delete error { 0x000c, errcode } where errcode: 0x00: unknown reason 0x02: invalid location 0x06: SIM card not ready (no error if deleting an empty location) 0x0c: waiting for PIN s SMS status request { 0x0036, 0x64 } r SMS status { 0x0037,?,?,?,?,?,?,msgnumber,unread } r SMS status error { 0x0038, errcode } where errcode: 0x06: SIM card not ready 0x0c: waiting for PIN 0x3f: WAP s Enable WAP frames { 0x0000} r Enable WAP frames { 0x0002, 0x01} s ?? { 0x0003} r ?? { 0x0004} s Get WAP bookmark { 0x0006, 0x00, location} where location: 0 - 14 r Get WAP bookmark { 0x0007, 0x00, name_len, name(unicode), url_len, url(unicode), 0x01,0x80,0x00[7]} r Get WAP bookmark err { 0x0008, error } where error: 0x00(?)invalid position 0x01 user inside "Bookmarks" menu. Must leave it 0x02 invalid/too high/empty location s Set WAP bookmark { 0x0009, 0xff, 0xff, name_len, name(unicode), url_len, url(unicode), 0x01,0x80,0x00[7] } Note: bookmark is added to the first free location. r Set WAP bookmark OK {+0x01, 0x36, 0x0a, block } where block: 0x0a, location_of_just_written_bookmark(?), 0x00, next_free_location(?) r Set WAP bookmark err {+0x01, 0x36, 0x0b, error } where error: 0x04 - memory is full 0x01 - we are in the bookmark menu 0x00 - unknown reason for now ;( ? s Delete WAP bookmark { 0x000c, 0x00, location } where: location = 0-14 ? r Delete WAR bookmark OK{ 0x000d } ? r Delete WAPbookmark err{ 0x000e, 0x02 } s ?? { 0x000F} r ?? { 0x0010, 0x00} s Get WAP settings 1 { 0x0015, location} where location: 0x00 - 0x05 r Get WAP settings 1 OK { 0x0016, title length, title (Unicode), URL length, URL(Unicode),con_type, ???[6 bytes],location, ???[5 bytes],security,...} where: con_type: 0x00 - temporary 0x01 - continuous location: when use "Get WAP settings 2 frame", must give it security: 0x00 = no, 0x01 = yes r Get WAP settings 1 err{ 0x0017, error } where error: 0x01 user inside "Settings" menu. Must leave it 0x02 invalid/too high/empty location s Get WAP settings 2 { 0x001b, location} where location: 0x00 - 0x1d (you get it in "Get WAP settings 1" frame) r Get WAP settings 2 OK { 0x001c, 0x01, type, frame...} where type : 0x00 - SMS bearer frame: service_num_len, service_num (Unicode), server_num_len, server_num(Unicode) 0x01 - data bearer frame: auth, call_type, call_speed, ?, IP len, IP (Unicode), dialup len, dialup (Unicode), user len, user (Unicode), password len, password (Unicode) where auth: 0x00 - normal, 0x01 - secure call_type: 0x00 - analogue, 0x01 - ISDN call_speed: 0x00 - 9600, 0x01 - 14400 0x02 - USSD bearer frame: type, service number len/IP len,service num (Unicode)/IP (Unicode),service code len, service code (Unicode) where type: 0x01 - service number, 0x00 - IP r Get WAP settings 2 err{ 0x001d,error} where: error=0x05 0x40: Security commands s ??? {+0x00, 0x00, 0x07, 0x11, 0x00, 0x10, 0x00, 0x00} This frame hangs phone (N3310 4.02). Meaning unknown ! s Open simlock 1 { 0x02, 0x03, 0x1f, 0x11, 0x01, 0x01, 0x10, 0x00} r Open simlock 1 { 0x02 } s ???(N6150) { 0x08, 0x00 } r ???(N6150) { 0x08 } s Enable extended cmds { 0x64, cmd } where cmd: 0x00: off 0x01: on 0x02: enter service mode ? 0x03: reset (doesn't ask for PIN again) 0x04: reset (PIN is requested) In 5110 makes reset without PIN 0x06: CONTACT SERVICE!!! Don't try it! s Reset phone settings { 0x65, value, 0x00 } where value: 0x08 - reset UI (User Interface) settings 0x38 - reset UI, SCM and call counters r Reset phone settings { 0x65, 0x00 } s Get IMEI { 0x66 } r Get IMEI { 0x66, 0x01, IMEI, 0x00} s (ACD Readings)?(N6150 { 0x68 } r (ACD Readings)?(N6150 { 0x68, ... } s Get Product Profile Settings { 0x6a} r Get Product Profile Settings { 0x6a, 4bytes with Product Profile Settings } s Set Product Profile Settings { 0x6b, 4bytes with Product Profile Settings } r Set Product Profile Settings OK ? { 0x6b } s Get code { 0x6e, code } where code: see 0x08/0x0004 (only security code is allowed) r Get code { 0x6e, code, allowed, allowed? (sec code (text), 0x00) } where code: see 0x08/0x0004 allowed: 0: no 1: yes s Set code { 0x6f, code, sec code(text), 0x00 } where code: see 0x08/0x0004 s Start monitoring { 0x70, block } where block(N6150): 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xf9,0x76,0x65,0x20,0x00, 0x00,0x00,0x00,0x00,0x18,0x26,0x15,0x7d,0x0a,0x00, 0xf5,0x82,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0x77,0x80, 0x77,0x80,0xf2,0x82,0x20,0x20,0x20,0x20,0x20,0x20, 0x20,0x20,0x20,0x20 This block enables probably all possible monitored parameters. After it phone sends 0x00 message type values s Break monitoring { 0x71 } r Break monitoring { 0x71 } s Reset Permanent Counters (nm->test36) { 0x74, 0x01, 0x01, 0x0e } r Reset Permanent Counters (nm->test36) { 0x74 } s Call commands { 0x7c, block } where where: command, (values) command: 0x01 values: number(ASCII), 0x00 - makes voice call command: 0x02 - answer call command: 0x03 - release call r Call commands { 0x7c, command } s Netmonitor { 0x7e, field } where: field: 00: next F0: reset F1: off F2: field test menus F3: developer menus s Open simlock 2 { 0x81, 0x01, locknumber, 0x10, 0x10, 0x10, 0x10, 0x10 } Note: sets simlock type to factory? where locknumber: 1,2,4,8 s Open simlock 2 { 0x81, 0x01, locknumber } where locknumber: 1,2,4,8 s Close simlock { 0x82, 0x01, locknumber, 0x00, 0x00, locksinfo(lock1,4,2,3), 0x00 } where locknumber: 1,2,4,8 r Close simlock { 0x82, the rest like in 0x40/0x8a } s Get simlock info { 0x8a, 0x00} r Get simlock info { 0x8a, 0x00, 0x01, lockstype, locksclosed, 0x00, 0x00, locksinfo(lock1,4,2,3), counter1,counter2,counter4,counter4,0x00 } where: lockstype: bit1,bit2,bit3,bit4 - if set, selected lock is user lock locksclosed: bit1,bit2,bit3,bit4 - if set, selected lock is closed counter1 - counter4: counters for locks s Set downloaded OpName { 0x8b, 0x00, MCC1, MCC2, MNC, Name, 0x00 } r SetdownloadedOpNameOK?{ 0x8b, 0x00, 0x01 } s Get downloaded OpName { 0x8c, 0x00 } r Get downloaded OpName { 0x8c, 0x00, 0x01, MCC1, MCC2, MNC, Name, 0x00,...} s Buzzer pitch { 0x8f, volume, hzHI, hzLO } if volume and hz is 0, it's off r Buzzer pitch { 0x8f} s ACD Readings ? { 0x91, parameter?(0x02,0x03,0x04,0x05,0x07) } r ACD Readings ? { 0x91, parameter?, value? } s Sleep mode test { 0x92, 0x00, 0x00, howlong(2 bytes), enable } where: enable == 0x01 - enable after test 0x00 - don't enable after test howlong (ms) = 0x07, 0xd0 = 2000 s ???(N6150) { 0x98, 0x00 } r ???(N6150) { 0x98, 0x00, 0x04 } s Get bin ringtone { 0x9e, location } where: location=0,1,etc. r Get bin ringtone { 0x9e, location, error, contents... } where location=0,1,etc. error=0x0a, ringtone NOT available 0x00, OK s Set bin ringtone { 0xa0, location, 0x00, contents... } where: location=0,1,etc. r Set bin ringtone { 0xa0, location, error } where location=0,1,etc. error=0x0a, ringtone NOT set 0x00, ringtone set OK r Get MSid { 0xb5, 0x01, 0x2f, msid, 0x25 } s Get info about phone { 0xc8, 0x01 } r Get info about phone { 0xc8, 0x01, 0x00, "V ", "firmware", 0x0a, "firmware date", 0x0a, "model", 0x0a, "(c) NMP.", 0x00 } third byte is an error code 0x00 OK 0x03 value not exists? 0x08 value not set? s Get MCU SW Checksum { 0xc8, 0x02 } r Get MCU SW Checksum { 0xc8, 0x02, 0x00, checksum (4 bytes),0x00 } s DPS External SW { 0xc7, 0x03 } r DSP External SW { 0xc7, 0x03, 0x00, string,0x00 } s Get HW { 0xc8, 0x05 } r Get HW { 0xc8, 0x05, 0x00, HW version (4 bytes), 0x00 } s Get "Made" Date { 0xc8, 0x05 } r Get "Made" Date { 0xc8, 0x05, 0x00, date(4 bytes), 0x00 } s Get DSP Internal SW { 0xc8, 0x09 } r Get DSP Internal SW { 0xc8, 0x09, 0x00, version (1 bytes), 0x00 } s Get PCI version { 0xc8, 0x0b } r Get PCI version { 0xc8, 0x0b, 0x00, version, 0x00 } s Get system ASIC { 0xc8, 0x0c } r Get system ASIC { 0xc8, 0x0c, 0x00, string, 0x00 } s Get COBBA { 0xc8, 0x0d } r Get COBBA { 0xc8, 0x0d, 0x00, string, 0x00 } s Get PLUSSA { 0xc8, 0x0e } r Get PLUSSA { 0xc8, 0x0e, available, 0x00 } where available: 0x01: not available s Get CCONT { 0xc8, 0x0f } r Get CCONT { 0xc8, 0x0f, available, 0x00 } where available: 0x01: not available s Get PPM version { 0xc8, 0x10 } r Get PPM version { 0xc8, 0x10, 0x00, "V ", "firmware", 0x0a, "firmware date", 0x0a, "model", 0x0a, "(c) NMP.", 0x00 } s Get PPM info { 0xc8, 0x12 } r Get PPM info { 0xc8, 0x12, 0x00, PPM version ("B", "C", etc.), 0x00 } s Set HW version { 0xc9, 0x05, version, 0x00 } s Get Product Code { 0xca, 0x01 } r Get Product Code { 0xca, 0x01, 0x00, number, 0x00 } s Get Order Number { 0xca, 0x02 } r Get Order Number { 0xca, 0x02, 0x00, string, 0x00 } s Get Prod.Ser.Number { 0xca, 0x03 } r Get Prod.Ser.Number { 0xca, 0x03, 0x00, number, 0x00 } s Get Basic Prod.Code { 0xca, 0x04 } r Get Basic Prod.Code { 0xca, 0x04, 0x00, number, 0x00 } s Set Product Code { 0xcb, 0x01, product code, 0x00 } s Set Order Number { 0xcb, 0x02, number, 0x00 } s Set Prod.Ser.Number { 0xcb, 0x03, number, 0x00 } the following 4 values are shown in the "warranty screens" opened typing *#92702689# on phone keyboard s Get (original ?)IMEI { 0xcc, 0x01 } r Get (original ?)IMEI { 0xcc, 0x01, IMEI, 0x00 } s Get Manufacture Date { 0xcc, 0x02 } r Get Manufacture Date { 0xcc, 0x02, 0x00, string, 0x00 } string format is MMYY s Get Repaired Date { 0xcc, 0x03 } r Get Repaired Date { 0xcc, 0x03, 0x00, string, 0x00 } s Get Purchasing Date { 0xcc, 0x04 } r Get Purchasing Date { 0xcc, 0x04, 0x00, string, 0x00 } s Set "Made" date { 0xcd, 0x02, string, 0x00 } s Make "all" phone tests{ 0xce,0x1d,0xfe,0x23,0x00,0x00} s Make one phone test { 0xce,0x1d,num1,num2,num3,num4} Where num1-num4: 0x02,0x00,0x00,0x00; 0x04,0x00,0x00,0x00; 0x08,0x00,0x00,0x00; 0x10,0x00,0x00,0x00; 0x20,0x00,0x00,0x00; 0x40,0x00,0x00,0x00; 0x80,0x00,0x00,0x00; 0x00,0x01,0x00,0x00; 0x00,0x02,0x00,0x00; 0x00,0x04,0x00,0x00; - "Power off" No test for "Security data" 0x00,0x10,0x00,0x00; 0x00,0x20,0x00,0x00; 0x00,0x40,0x00,0x00; 0x00,0x80,0x00,0x00; 0x00,0x00,0x01,0x00; .... 0x00,0x00,0x10,0x00; s Result of phone tests { 0xcf } r Result of phone tests { 0xcf, number of tests, results of next tests } s ??? { 0xd1 } r ???(N5110) { 0xd1, 0x00, 0x1d, 0x00, 0x01, 0x08, 0x00 } s LCD Test { 0xd3, value } where value: 0x03, 0x02 - 1'st test 0x03, 0x01 - 2'nd test 0x02, 0x03 - clears screen s ACD Readings(N6150)? { 0xd4, 0x02, 0x00, 0x02, 0x00, 0x0e, 0x01} r ACD Readings(N6150)? { 0xd4, 0x02, 0x00, 0x02, 0x00, 0x0e, 0x01, ?} s Get EEPROM { 0xd4, 0x02, 0x00, 0xa0, locationLo, locationHi, numofbytes } where: numofbytes - how many bytes to read Note: Works ONLY in MBUS r Get EEPROM { 0xd4, 0x02, 0x00, 0xa0, locationLo, locationHi, numofbytes, contents... } where numofbytes - how many bytes available contents - bytes with contents (if numofbytes != 0) 0x41: Snake game ? 0x47: s Get Picture Image { 0x0001, location } r Get Picture Image when contains sender number { 0x0002, location, number(like in SMS), 0x00, len, text, 0x00, width, height, 0x01, bitmap } NOTE: Supports only 0x81 and 0x91 coding (NOT alphanumeric numbers!) in sender without sender number { 0x0002, location, 0x00, 0x00, 0x00, len, text, 0x00, width, height, 0x01, bitmap } s Set Picture Image { 0x0003, frame...} where frame: see 0x47/0x0002 r Get/Set PictureImageOK{ 0x0004 } r Set Picture Image err { 0x0005, error? } where error=0x74 - wrong location ? 0x64: (Nokia 3310 seems to not respond to this frame) s Phone ID request { 0x0010 } r Phone ID recvd { 0x0011, "NOKIA", "imei", 0, "model", 0, "prod.code", 0, "HW", 0, "firmware", magic bytes x 4 ... } s Accessory connection { 0x0012, 16x0x00, 'NOKIA&NOKIA accessory', 3x0x00 } (45 bytes) 0x7f: Acknowledge(FBUS/IRDA){+type, seq } Acknowledge(MBUS)... 0xd0: s Power on message seq1 {+04 } r Power on message seq1 {+05 } 0xd1: s Get HW&SW version { 0x0003, 0x00 } 0xd2: r Get HW&SW version { 0x0003 "V " "firmware\n" "firmware date\n" "model\n" "(c) NMP." } 0xda: ? (during playing 2 player snake) 0xf0: s Send RLP frame {+0x00, 0xd9, ... } 0xf4: Power on message seq 2 gnokii-0.6.31/Docs/protocol/nk2110.txt0000644000175000017500000002667411666163120015430 0ustar leoleo$Id$ Assembled by Marcin Wiacek (Marcin-Wiacek@TOPNET.PL) Pavel Machek ... and other members of gnokii mailing list and authors of some WWW pages (http://republika.pl/junk/mbus). The data provided is for information purposes only. Some of the frames might be hazardous to your phone. Be careful!!! We do not take any responsibility or liability for damages, etc. NOTE: this information isn't (and can't be) complete. If you know anything about features not listed here or you noticed a bug in this list, please notify us via e-mail at our mailing list . Thank you. Document describing frames used in GSM Nokia 2110 and derivatives: Correct format is MBUS version 1 (see nokia.txt for protocol details): List: 0x12: r Display {+?, ?, ?, x, y, string, 0x00 } 0x19: s Enable display status {+0x03, 0x03, 0x00, 0x00, 0x01} 0x1f: phonebook s Get mem location {+0x1a, memtype, location } where: memtype: 0x03: telephone phonebook 0x04: SIM phonebook s Set mem location {+0x1b, memtype, location, name, 0x00, number, 0x00 } where: memtype: see 0x1f/0x1a 0x2f: r Status {+?, byte1, byte2, byte3, byte4, byte5} where byte1 (for N2110): bit 0 - "d", bit 2 - "b", bit 4 - "a", bit 6 - "lights" byte2 (for N2110): bit 0 - "service",bit 2 - "scroll_up",bit 4 - "scroll_down",bit 6 - "ABC" byte3 (for N2110): bit 0 - "2.>", bit 2 - "1.>", bit 4 - "roam", bit 6 - "handset" byte4 (for N2110): bit 0 - "vmail", bit 2 - "envelope", bit 4 - "battery bar",bit 6 - "3.>" byte5 (for N2110): bit 4 - "fieldbar", bit 6 - "ring" 0x37: SMS r SendSMS/GetSMS/DelSMS/{+0x10, code, frame } SetSMSC/GetSMSC where: code: 0x08 - SMS send OK frame: 0x1d 0x24 0x25 (latter 2 in order) 0x0b - SMS get OK Frame: memtype, location, msgstatus, unknown2, unknown2, 0x00, date(7 bytes) in BCD, msglen, msgtext, recipient, 0x00, smsc, 0x00 Where: memtype, msglen, msgtext: see 0x38/0x1002 frame msgstatus, unknown2, unknown3: see 0x37/0x21 Note: This frame used only, when FrameLength < 0x75 0x0d - SMS delete OK 0x0f - SMS delete failed 0x10 - SMS send failed frame: 0x1d 0x24 0x25 (latter 2 in order) 0x10 - SMS get failed 0x1a - SMS message received (by phone). Frame: memtype, location, unknown1, unknown2, 0x00, date(7 bytes) in BCD, msglen, sender, 0x00, smsc, 0x00 where memtype: see 0x38/0x1002 frame unknown1: 0x00 0x00 0x04 more messages? true:0x00 false:0x04 unknown2: 0x20 0x20 0x20 0x1c - SMSC set OK 0x1d - SMSC set failed 0x2f - SMSC get OK Frame: 0x00, 0x00, unknown1, unknown2, 0x00, 0x00, unknown3, unknown4, unknown5, 0x00, smsc, 0x00 Where: unknown1: 0x05 0x08 last memtype location used or number of messages?? unknown2: 0x02 0x00 unread messages indicator?? unknown3: 0xff validity period? unknown4: accept reply costs? no:0x01 yes:0x02 unknown5: status reports no:0x01 yes:0x02 0x30 - SMSC get failed r Get SMS part 2 {+0x20, ... continuation of 0x37/0x21 frame } r Get SMS part 1 {+0x21, 0x0b, memtype, location, msgstatus, unknown2, unknown3, 0x00, date(7 bytes) in BCD, msglen, msgtext} where memtype: see 0x38/0x1002 msgstatus: message status not sent: 0x07 sent: 0x05 unread: 0x03: read: 0x01 unknown2: more messages ? true: 0x00 false: 0x04 this flag seems to be set by locust when a message (e.g. tv) is split across more than 1 sms unknown3: 0x20 0x38: SMS s Send SMS message {+0x1000, unknown, pr, 0x00, validity, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, msglen, msgtxt, recipient, 0x00, smsc, 0x00} where: unknown: 0x11 or 0x91 parameter mask? (data, data coding, protocol but 0x80?) pr: 0x00 or protocol id + 0x20 validity: 0x0b: 1 hour 0x47: 6 hours 0xa7: 24 hours 0xad: 1 week 0xff: max.time msglen: SMS message length msgtext: message string (unterminated) recipient: receipient`s number string smsc: SMS centre number string Note: Used when FrameLength < 0x75 s Get SMS message {+0x1002, memtype, location } where: memtype: 0x01: default 0x02: SIM 0x03: phone s Delete SMS message {+0x1003, memtype, location } where: memtype: see 0x38/0x1002 r ??? {+0x1006...} s Reserve SMS {+0x1012, } s Enable cell broadcast {+0x1013, ...} s Kill reserve SMS {+0x1014} r New msg from network ?{+0x1015...} r Reserve SMS OK {+0x1016} r Reserve SMS err {+0x1017, error} s Set SMSC {+0x101b, unknown, pr, 0x00, validity, reply, report, 0x00, smsc, 0x00, 0x00 } where: pr: protocol id + 0x20 validity: 0x0b: 1 hour 0x47: 6 hours 0xa7: 24 hours 0xad: 1 week 0xff: max.time reply: reply via same SMSC: 0x01: no 0x02: yes report: delivery reports: 0x01: no 0x02: yes unknown: 0x74, 0x75 parameter mask ?? s Get SMSC {+0x101e, 0x09, 0xe9} s Send SMS message 2part{+0x20, continuation of 0x38/0x21 frame } Note: Used when FrameLength >= 0x75 Format the same to 0x38/0x1000 frame s Send SMS message 1part{+0x21, unknown, pr, 0x00, validity, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, msglen, msgtext } Note: Used when FrameLength >= 0x75 Format the same to 0x38/0x1000 frame 0xc9: phonebook r Get mem location {+0a1a, memtype, location, code, {name}, 0x00, {number}, 0x00 } where: memtype: see 0x1f/0x1a code: 0x64 - invalid location 0x65 - device failure 0x66 - device not available 0x67 - entry locked 0x68 - communication error 0x69 - update impossible 0x6a - number too long 0x6b - name too long 0x82 - store ok 0x83 - read ok 0x84 - number overflow name: name string, only present on "read ok" code number: phone number string, only present on "read ok" code r Set mem location {+0a1a, memtype, location, code } where: memtype: see 0x1f/0x1a code: see "Get mem location" 0xe9: s Start connection {+0x00, 0x02, 0x1c, 0x00, 0x1c} Note: this is message with SrcDEV = 0xf8 ! ACK frame for it is (DestDEV = 0xf8 too) 0x1c, 0x01, 0x1c According to http://www.gadgets.demon.co.uk/nokia21xx/protocol.html s Start connection {+0x01, 0x01, 0x0f, 0x01, 0x0f} Note: frame according to mbus-2110.c from gnokii (Normal DestDEV) 0xcd: r Enable display status {+0x01} 0xe5: s Phone ID request {+0x11, 0x03, 0x00} s Get RF level {+0x84, 0x02, 0x00} s Get battery level {+0x85, 0x02, 0x00} s Press key {+press: ?; release: ?; 0x00, 0x01, keycode } where keycode: 0xe6: r Phone ID request {+0x11, 0x03, "revision", "\n", "revision_date", "\n", "model"} r Get RF level {+0x84, 0x02, 0x00, ?, value} r Get battery level {+0x85, 0x02, 0x00, ?, value} gnokii-0.6.31/Docs/protocol/dancall.txt0000644000175000017500000001365311666163117016111 0ustar leoleoDocument describing protocol used in Dancall phones. The data provided is for information purposes only. Some of the frames might be hazardous to your phone. Be careful!!! We do not take any responsibility or liability for damages, etc. Last update 24.02.2003 ~~~~~~~~~~~~~~~~~~~~~~ Assembled by Ladislav Michl Thanx to Vojta Bouberle NOTE: this information isn't (and can't be) complete. If you know anything about features not listed here or you noticed a bug in this list, please notify us via e-mail at our mailing list . Thank you. Frame format for CBUS: Request from Computer/Answer from Phone: { SrcDEV, DestDEV, FrameLenLo, FrameLenHi, MsgType1, MsgType2, {blk}, CSum } where SrcDEV, DestDEV: 0x19: phone 0x38: PC (wakeup msg) 0x34: PC (normal msg) FrameLenLo: length of data frame, low byte. FrameLenHi: length of data frame, high byte. MsgType1, MsgType2: see List {blk}: main frame CSum: XOR on frame's all members Packet ack from Phone: { 0x19, DestDEV, FrameLenLo, FrameLenHi, MsgType1, MsgType2, {block}, CSum } where DestDEV: taken from original request packet FrameLenLo: length of data frame, low byte. FrameLenHi: length of data frame, high byte. MsgType1: taken from original request packet plus one MsgType2: taken from original request packet {blk}: MsgType1 and MsgType2 taken from original request packet CSum: XOR on frame's all members Packet ack from Computer: { SrcDEV, 0x19, FrameLenLo, FrameLenHi, MsgType1, MsgType2, {blk}, CSum } where SrcDEV: taken from response packet FrameLenLo: length of data frame, low byte. FrameLenHi: length of data frame, high byte. MsgType1: taken from response packet plus one MsgType2: taken from response packet {blk}: MsgType1 and MsgType2 taken from response packet CSum: XOR on frame's all members Response from Phone: { 0x19, DestDEV, FrameLenLo, FrameLenHi, MsgType1, MsgType2, {blk}, CSum } where DestDEV: taken from original request packet FrameLenLo: length of data frame, low byte. FrameLenHi: length of data frame, high byte. MsgType1, MsgType2: see List {blk}: MsgType1 and MsgType2 taken from original request packet CSum: XOR on frame's all members Port settings: Speed 9600 bps, Bits 8, Parity None, Stop Bits 1, DTR 1, RTS 0 CBUS bus has only one wire for transmition and reception. Because of this characteristics of the phone connector, every time that the PC writes into the phone it is writing as well into its own Rx. So every time the PC sends info into the phone it finds that same information in its own Rx buffers, like a mirror copy. This should be discarded. The communications is made like an old cb radio, only one talking at a time. Communication is made (basically) this way: o computer sends request -> phone got request (checksum matches) o phone sends 0xa5 -> phone understood request o phone sends ack packet -> computer got response (checksum matches) o computer sends 0xa5 -> phone got 0xa5 o phone sends response -> computer got response (checksum matches) o computer sends 0xa5 -> phone got 0xa5 o computer sends ack packet -> phone got ack packet (checksum matches) o phone sends 0xa5 If 0xa5 is not sent in 10ms (wild guess ;)) the last packet is repeated at most three times. Example 1 (setting SMS center number) Computer: 34 19 3c 68 18 00 41 54 4.h..OK 0d 0a 7c ..| Computer: a5 % Computer: 34 19 3f 68 02 00 3e 68 4.?h..>h 2e . Phone: a5 % Example 2 (querying number of SMSes on SIM) Computer: 34 19 3c 68 12 00 41 54 4.h..+C 50 4d 53 3a 20 22 53 4d PMS: "SM 22 2c 30 2c 31 30 2c 22 ",0,10," 53 4d 22 2c 30 2c 31 30 SM",0,10 0d 0a 70 ..p Computer: a5 % Computer: 34 19 3f 68 02 00 3e 68 4.?h..>h 2e . Phone: a5 % Phone: 19 34 3e 68 04 00 4f 4b .4>h..OK 0d 0a 7c ..| Computer: a5 % Phone: 34 19 3f 68 02 00 3e 68 4.?h..>h 2e . Computer: a5 % You have to implement collision protocol. ie, you should listen for what you are transmitting, and if it does not come back, you have collision. Note: Bosch bought Dancall in 1997. Question for curious reader: which protocol is used by Bosch phones? gnokii-0.6.31/Docs/protocol/nk3110.txt0000644000175000017500000002347311666163120015423 0ustar leoleo$Id$ Assembled by Marcin Wiacek (Marcin-Wiacek@TOPNET.PL) ... and other members of gnokii mailing list and authors of some WWW pages. The data provided is for information purposes only. Some of the frames might be hazardous to your phone. Be careful!!! We do not take any responsibility or liability for damages, etc. NOTE: this information isn't (and can't be) complete. If you know anything about features not listed here or you noticed a bug in this list, please notify us via e-mail at our mailing list . Thank you. Document describing frames used in GSM Nokia 3110 and derivatives (3810,8110,8110i): Correct format is FBUS version 1/MBUS version 1 (?) (see nokia.txt for protocol details): List: 0x02: r RLP ? {....} 0x0a: s Make call {+type of call, type of number?, numlen, number, uk1, uk2, uk3 } where type of call: see 0x0b Note: If destination number is "1" - "9", call for number in corresponding memory location is made. 0x0b: r Incoming call {+type of call, 0x00, namelen, name } where type of call: 0x01 Data 0x02 ?? 0x03 ?? 0x04 ?? 0x05 Voice 0x0c: s Answer incoming call {} 0x0d: r Incoming call answered{} from ME 0x0e: r Call established {+type of call, 0x00, 0x00 } where type of call: see 0x0b 0x0f: s Call hang up {} 0x10: r Call hanged up from ME{} seq1 0x11: r CallClosed-by other end{+unknown, reason} where: unknown reason 0x65 0x10 Hanged up by other end 0x1c virheellinen numero 0x65 0x1f Number is not in use 0x65 0x4f Check operator services 0x65 0xa6 No destination number (sms sending) 0x65 0xe4 --''-- 0x6f 0x6f 0x7d 0x7d 0x7f 0x7f 0x83 0x83 0x12: r Call hanged up from ME{} seq2 0x13: r Power ON seq {} 0x15: s Initialization {} 0x16: r Initialization OK {+simstate } where simstate: 0x01 No SIM present, or waiting for PIN 0x02 SIM present and ready. 0x17: r Initialization err {+error } 0x20: s Send DTMF {+length,string} 0x21: r Send DTMF OK {} 0x22: r Send DTMF err {+error } where error: 0x70: invalid location 0x23: s Send SMS Header {+first octet, PID, DCS, validity(7 bytes), UDL, SMSClen, SMSC, receiverlen, receiver} 0x24: s Save SMS Header {+memtype,status(2bytes),PID, DCS, validity(7 bytes), UDL, SMSClen, SMSC, receiverlen, receiver, receivertype } where: memtype: 2=SIM 3=ME status: see 0x2c 0x25: s Get SMS message {+memtype, location } where: memtype - see 0x30 Note: In successful request, phone sends one "SMS Header" and one or more "SMS Data" packets. In failure, phone sends "Get SMS message err" packet 0x26: s Delete SMS message {+memtype, location } where: memtype - see 0x30 0x27: r SMS Data {+seq,block} where: seq: starts from 0x01 and is increased by 1 after each block transmitted. block: Block of User Data (max 55 chars) s Send/Save SMS Data {+seq,block} 0x28: r SMS sent OK {+reference?} 0x29: r SMS sent error {+error1, error2} 0x2a: r SMS saved OK {+memtype} where: memtype - memory, where SMS was saved 0x2b: r SMS saving err {+error} 0x2c: r SMS Header {+memtype, location, status(2 bytes), PID, DCS, date (7 bytes), UDL, senderlen, sender, SMSClen, SMSC, sendertype} where: memtype, PID, DCS, date, UDL, sender, SMSC, sendertype - see 0x30 status: 0701: Saved, not sent 0501: Sent 0304: Received, unread 0204: Unread 0104: Received, read 0x2d: r Get SMS message err {+error} 0x2e: r Delere SMS message OK {} 0x2f: r Delete SMS message err{+error} 0x30: r SMS message received {+memtype, location, unknown, PID, DCS, date(7 bytes), UDL, senderlen, sender, SMSClen, SMSC, sendertype} where: memtype: 0x01 Phone Selected 0x02 SIM 0x03 ME location: Memory location (1...) unknown: most of time 0x04 PID: Protocol Identifier DCS: Data Coding Scheme date: sending date in BCD UDL: User Data Length sender: sender number SMSC: SMSC number sendertype: type of sender number: 0x31 International without leading '+' ??? 0x91 International 0x32: r Delivery report receiv{+unknown,delivery time(7 bytes),report time(7 bytes),0x00,MR, destinationlen,destination,SMSClen,SMSC,destinationtype} 0x3c: s Set SMSC {+bitmask,format,unknown1,validity,reply,reports,unusedlen,unused,SMSClen,SMSC} where: bitmask: info, what we change 7 ?? 6 reports 5 reply 4 SMSC number 3 unused 2 validity 1 unknown 0 format format: 0x00 Text 0x22 Fax 0x24 Voice 0x25 ERMES 0x26 Paging 0x2d E-mail 0x31 X.400 validity: 0 to 143 (validity + 1) * 5 minutes (i.e. 5 minutes intervals up to 12 hours) 144 to 167 12 hours + ((validity - 143) * 30 minutes) 168 to 196 (validity - 166) * 1 day 197 to 255 (validity - 192) * 1 week 0x3d: r Set SMSC OK {} 0x3e: r Set SMSC err {} 0x3f: s Get SMSC {} 0x40: r Get SMSC {+memory,AllSMSphone,unreadSMSphone,AllSMSSIM,unreadSMSSIM, format,unknown1,validity,reply,reports,unusedlen,unused,SMSClen,SMSC} where: format,unknown1,validity,reply,reports,unusedlen,unused,SMSClen,SMSC - see 0x3c memory: selected memory AllSMSphone: number of all SMS in phone unreadSMSphone: number of unread SMS in phone AllSMSSIM: number of all SMS on SIM unreadSMSSIM: number of unread SMS on SIM 0x42: s Set mem location {+memtype, location, namelen, name, numlen, number } where memtype: see 0x43 0x43: s Get mem location {+memtype, location } where: memtype: 0x01 Phone Selected 0x02 SIM 0x03 ME 0x04 Own numbers (at SIM) 0x44: r Set mem location OK {} 0x45: r Set mem location err {+error } 0x46: r Get mem location OK {+namelen, name, numlen, number } 0x47: r Get mem location err {+error } 0x48: r PIN entered {} 0x49: r Power OFF seq {} 0x4a: s Status request {} 0x4b: r Status request {+status, network, battery } where status: 0x01 Idle 0x02 Network interworking 0x03 Call open 0x04 No Network Access (Waiting for PIN or Unaccessable Operator selected) network and battery - signal level 0x4c: s Get phone info {} 0x4d: r Get phone info {+IMEI, 0x00, Code, 0x00, HW, 0x00 } where IMEI: IMEI Code CODE: Same as Code in phones back side HW: hardware version gnokii-0.6.31/Docs/protocol/nk640.txt0000644000175000017500000000265011666163120015342 0ustar leoleo$Id$ Assembled by Andrew Kozin ... and other members of gnokii mailing list and authors of some WWW pages. The data provided is for information purposes only. Some of the frames might be hazardous to your phone. Be careful!!! We do not take any responsibility or liability for damages, etc. NOTE: this information isn't (and can't be) complete. If you know anything about features not listed here or you noticed a bug in this list, please notify us via e-mail at our mailing list . Thank you. Document describing frames used in NMT Nokia 640 and derivatives: Correct format is MBUS version 1 (see nokia.txt for protocol details): List: 0x0f: r Get serial number {+0x19, 0x03, 0x00, 0x01, 0x0b, 0x00, 0x00} s Get mem location {+0x2d, 0x03, 0x00, 0x07, 0x1f, 0x7f, 0xf0, 0x00, location?, 0x00, 0x00} s Get startup logo {+0x60, 0x03, 0x00, 0x07, 0x3A, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x00} 0x10: s Set startup logo {+0x08,0x03,0x00,0x07,0x3A,0x7F,0xF0,0x00,0x00,0x00,0x00,0x54, bitmap } s Set mem location {+0x10,0x08,0x03,0x00,0x07,0x1F,0x7F,0xF0,0x00, location,0x00,0x00,0x00,0x21,numlen,number,name[starts on 30 byte],0x00,0x05[starts on 46 byte]} 0x19: s Get RF level {+0x02,0x01,0x07} s Get battery level {+0x02,0x01,0x00} 0x43: s Reset {+0x00, 0x00} gnokii-0.6.31/Docs/protocol/nk6510.txt0000644000175000017500000004773311666163120015437 0ustar leoleo$Id$ Assembled by Markus Plail ... and other members of gnokii mailing list and authors of some WWW pages. Heavily based on nk7110.txt. The data provided is for information purposes only. Some of the frames might be hazardous to your phone. Be careful!!! We do not take any responsibility or liability for damages, etc. NOTE: this information isn't (and can't be) complete. If you know anything about features not listed here or you noticed a bug in this list, please notify us via e-mail at our mailing list . Thank you. Document describing frames used in GSM Nokia 6510 and derivatives (?) Correct format is FBUS version 2/MBUS version 2/IrDA/Bluetooth (see nokia.txt for protocol details): 0x01 COMMUNICATION s Make call { 0x01, numlen, number (unicode), type, 0x01, 0x05, 0x00, 0x02, send number, 0x00, 0x00 } where type is: 0x05 - voice call send number: 0x01 - don't send s Answer call { 0x06, seqnr } s Hang up { 0x08, seqnr } s Get call status { 0x20 } r Get call status { 0x21, num of calls, 0xff, callinfo } where callinfo: { 0x64, blklen (0xd4), seqnr (1-8), channel (1-2), state, prevstate, ?, ?, ?, ?, namelen, numlen, name (49 unicode chars + 0x00, 0x00), number (49 unicode chars + 0x00, 0x00) } where state is: 0x00: incoming call 0x02: dialing 0x03: ringing (out) 0x04: ringing (in) 0x05: established 0x06: call held 0x07: remote hangup s ? { 0x1e } r ? { 0x1f } s ? { 0x22 } r ? { 0x23, 0x00, 0x00 } s ? { 0x24 } r ? { 0x25, 0x00, 0x00 } s ? { 0x26 } r ? { 0x27, 0x00, 0x00 } s ? { 0x28 } r ? { 0x29, 0xff, 0x00 } s ? { 0x2a } r ? { 0x2b, 0xff, 0x00 } s ? { 0x2c } r ? { 0x2d, 0x55, 0x00 } s ? { 0x50 } r ? { 0x51, ?, ? } s ? { 0x5b } s ? { 0x5c } r ? { 0x5d, ?, ?, ? } s ? { 0x61 } r ? { 0x62, 0x00, 0x00 } s ? { 0x63? } s ? { 0x65 } r ? { 0x66, 0x00 } 0x02: SMS HANDLING s Send SMS { 0x02, 0x00, 0x00, 0x00, 0x55, 0x55, 0x01 (1 big block), 0x02 (submit), length (big block), type, reference, PID, DCS, 0x00, # blocks, blocks... } r Send SMS { 0x03, 0x00, 0x01, 0x0c, 0x08, 0x00, 0x00, 0xdb, 0x55, 0x55, 0x00 } s Get SMSC { 0x14, location, 0x00 } r Get SMSC { 0x15, err, 0x01, 0x0b, 0x28?, location, 0xf8?, format, 0x00, validity, #blocks, blocks ...} where: err - 0x00 ok, 0x02 - empty name block: { 0x81, blklen, namelen (bytes), 0x00, name (unicode) } number block: { 0x82, blklen, type, ?, number (bcd) } where type: 0x01 - default, 0x02 - number 0x03: PHONEBOOK HANDLING s Get memory status { 0x03, 0x01, memory type, 0x55, 0x55, 0x55, 0x00} where: memory type - see 0x03/0x07 r Get memory status { 0x04, 0x00, location, 0x00[7], 0x01, 0x10, 0x00, 0x00, 0x0c, total_low, total_high, used_low, used_high, 0x01, 0x00, 0x00} s Read memory { 0x07, 0x01, 0x01, 0x00, 0x01, 0x02, memory type, 0x00, 0x00, 0x00, 0x00, location_low, location_high, 0x00, 0x00}; where MT: memory type 0x01: (256) Dialled numbers 0x02: (512) Missed calls 0x03: (768) Received calls 0x05: (500) telephone phonebook 0x06: (160) SIM phonebook 0x07: (10/0) 0x08: (1/0) 0x09: (4) voice mailbox 0x0e: (10) speed dials 0x10: (5) caller groups r Read memory { 0x08, 0x00, 0x01, code, 0x00, 0x00, z, xH, xL, yH, yL, 0x00[7], no.of blocks, { block } * } where if code==0x0f && xH==0x34 - phonebook location not found y: location z: generic block size block: {id, 0, 0, blocksize, block no., {contents}, 0x00} id: 0x04 pointer to another memory location { 0xff?, yH, yL, xL,0x00[3] } 0x07 name {len, (unicode)}, 0x08 email 0x09 postal 0x0a note {len, (unicode)} 0x0b number {type, 0x00[3], len, (unicode)} 0x0c ringtone {ringtone no., 0, 0} 0x13 date for a called list (DC, RC, etc.) 0x1b caller group graphic {width, height, 0, 0 {bitmap}} 0x1c caller group graphic on? {(1: yes, 0: no), 0, 0} 0x1e caller group number {number, 0, 0} type: 0x0a: General, 0x03: Mobile (office ?), 0x06: Work, 0x04: Fax, 0x02: Home (mobile ?) s Set mem location { 0x0b, 0x00, 0x01, 0x01, 0x00, 0x00, z, 0x02, memory type, yH, yL, 0x00[7], no.of blocks, { block }[no.of blocks] } r Set mem location { 0x0c, 0?, 1?, code, 0?, 0?, z?, 0?, 0?, yH, yL, xL } where code: 0x3d - wrong entry type 0x08: SECURITY s Get status { 0x11, 0x00 } r Get status { 0x12, status, } where status: 0x01: waiting for Security Code 0x07: 0x02: waiting for PIN 0x03: waiting for PUK 0x05: PIN ok, SIM ok 0x06: No input status 0x16: No SIM 0x1A: SIM rejected! s Enter PIN { 0x07, code, code(ASCII), 0x00} where code: 0x01: Security Code 0x02: PIN r Enter PIN { return code, reason } where: return code: 0x08 = success 0x09 = failure reason: 0x06 = PIN wrong 0x0a: NETSTATUS s Get Info { 0x00, 0x00 } r Get Info { 0x01, 0x00, # blocks, 0x00, length, 0x00, 0x02, status, length, operator name (unicode), 0x09, length, LAC, LAC, 0x00, 0x00, CellID, CellID, NetworkCode (3 octets), ... } s Get RF Level { 0x0b, 0x00, 0x02, 0x00, 0x00, 0x00 } r GET RF Level { 0x0c, 0x00, 0x01, 0x04, 0x04, level, 0x5f } s Get operator logo { 0x23, 0x00, 0x00, 0x55, 0x55, 0x55 } r Get operator logo { 0x24, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x0c, 0x08, netcode (3 octets), 0x02, 0x00, 0x00, 0x1a, size, width, height, logo size (2 octets), logo size (2 octets), logo } 0x0c: KEYPRESS s ? { 0x01, ... } r ? { 0x02, ... } s ? { 0x03, ... } r ? { 0x04, ... } s ? { 0x0e, ... } r ? { 0x0f, ... } s ? { 0x11, 0x00, number of blocks, block... } where block is: { action, 0x00, ?, repeat count } where: action: 0x00 - press, 0x01 - release r ? { 0x12, err, 0x00 } 0x10: SUBSCRIBE s Subscribe Channnel { 0x10, # channels, message types... } 0x13 CALENDAR s Add meeting note { 0x01, body like in subtype 0x1a...} r Add meeting note { 0x02, location (2 bytes), status (2 bytes)} s Add call note { 0x03, body like in subtype 0x1a...} r Add call note { 0x04, location (2 bytes), status (2 bytes)} s Add birthday note { 0x05, body like in subtype 0x1a...} r Add birthday note { 0x06, location (2 bytes), status (2 bytes)} s Add reminder note { 0x07, body like in subtype 0x1a...} r Add reminder note { 0x08, location (2 bytes), status (2 bytes)} s Delete calendar note { 0x0b, location (2 bytes) } r Delete calendar note { 0x0c, location (2 bytes), ?, ?, ?, ? } s Get calendar note { 0x19, location (2 bytes) } r Calendar note recvd { 0x1a, location (2 bytes), entry type, 0x00, year (2 bytes), Month, Day, block} where: entry type - 0x01 - Meeting, 0x02 - Call, 0x04 - Birthday, 0x08 - Reminder block: for Meeting:{hour,minute,alarm (two bytes),recurrence (two bytes),len,0x00,string(unicode)} where alarm=Number of minutes before the time of the meeting that the alarm should be triggered: For meetings with "No alarm"=0xFFFF (-1). For "On time"=0x0000 half an hour=0x001E, and so on. Recurrence=in hours, between future occurrences of this meeting. If there is no repeat, this value is 0x0000. The special value 0xffff means 1 Year! for Call:{Hour,Minute,Alarm (as above),Recurrence (as above),namelen,numberlen, name(unicode),number(unicode)} for Reminder:{Recurrence (as above),len,0x00,string(unicode)} for Birthday:{byte1,byte2,alarm(4 bytes),yearofbirth,alarmtype,len,string(unicode)} byte1 and byte2 may vary (???). Usually are 0x00 both (but not always) In Birthday, the Year in the common part, usually contains a strange year. So, don't consider it as Year of note, neither year of BirthDay (for Year of Birthday use the value described below). where alarm=32-bit integer that is the number of seconds between the desired alarm time and 11:59:58pm on the birthday.For "No Alarm", the value is 0x0000FFFF (65535). YearOfBirth=used instead of the one in the common part of the entry (see above) but only when reading birthday entries. For storing entries, this field does not exist. AlarmType: 0x00 - Tone, 0x01 - Silent s Get first free pos { 0x0031 } r Get first free pos { 0x0032, location (2bytes) } s Get notes info { 0x003a, 0xFF, 0xFE} r Get notes info { 0x003b, how many notes used (2 bytes), n, more, { two bytes with location for each note} *} where: n - number of entries in this message more - 0x00: more entries, 0x07: last msg 0x14: FOLDER/PICTURE SMS HANDLING s Get SMS Status { 0x08, 0x00, 0x01 } r Get SMS Status { 0x09, 0x00, #blocks, type, length, blocknumber, a (2 octets), b (2 octets), c (2 octets), 0x00, 0x55 , type, length, blocknumber, d (2 octets), e (2 octets), f (2 octets), 0x01, 0x55 } where: a - max. number of messages in phone memory b - Number of used messages in phone memory. These are messages manually moved from the other folders. Picture messages are saved here. c - Number of unread messages in phone memory. Probably only smart messages. d - max. number of messages on SIM e - Number of used messages in SIM memory. These are either received messages or saved into Outbox/Inbox. Note that you *can't* save message into this memory using 'Move' option. Picture messages are not here. f - Number of unread messages in SIM memory s Get SMS from folder { 0x02, memory, folderID, location, location, 0x01, 0x00} where: memory - 0x01 for SIM, 0x02 for phone (SIM only for IN/OUTBOX folderID - see 0x14/0x017B r Get SMS from folder { 0x03, 0x00, 0x01, memory, folderID, locationH, locationL, 0x55, 0x55, 0x55, 0x01 (on big block), type, length of big block, [date/time1], [date/time2], # blocks, type, length, data... ... } s Delete SMS { 0x04, memory, folderID, location, location, 0x0F, 0x55 } r Delete SMS { 0x05 } s Get folder status { 0x0c, memory, folderID, 0x0F, 0x55, 0x55, 0x55, 0x55} where: folderID - see 0x14/0x017B r Get folder status { 0x0d, 0x00, length, number of entries (2 bytes), entry1number (2 bytes), entry2number(2 bytes), ..., 0x55[]} s Get message info { 0x0e, memory, folderID, location, location, 0x55, 0x55 } r Get message info { 0x0f, 0x00, 0x01, 0x00, 0x50, memory, type, 0x00, location, FolderID, status where: type = 0x00 - MT 0x01 - delivery report 0x02 - MO 0x80 - picture message where: status=0x01 - received/read 0x03 - received/unread 0x05 - stored/sent 0x07 - stored/not sent s Get folder names { 0x12, 0x00, 0x00} r Get folder names { 0x13, 0x00, number of blocks, blocks... } where block is: { 0x01, blocklen, folderID, length, 0x00, 0x00, padding... } where: folderID = 0x02 - Inbox 0x03 - Outbox 0x04 - Archive 0x05 - Templates 0x06 - first "My folders" 0x07 - second "My folders" 0x08 - third -"- and so on blocklen = length of the block including the 0x01 and blocklen itself e.g.: 0x28 - 6510 0x58 - 6610 0x17: BATTERY s Get battery level { 0x0a, 0x02, 0x00 } r Get battery level { 0x0b, 0x01, 0x01, 0x16, level, 0x07, 0x05 } where: level: 1-7 (as in phone display) 0x19: CLOCK s Get date { 0x0a, 0x00, 0x00 } r Get date { 0x0b, 0x00, 0x02 (blocks), 0x01 (type), 0x0c (length), 0x01, 0x03, year (2 octets), month, day, hour, minute, second, 0x00, 0x04, 0x04, 0x01, 0x00 } s Get alarm state { 0x1f, 0x01, 0x00 } r Get alarm state { ... } offset 13: first repetition day mon=0x1b,tue=0x1c,wed=0x1d,thu=0x1e,fri=0x18,sat=0x19,sun=0x1a if more than one day is set, only the first is reported here (seen on Series 40 3rd) offset 61: snooze time-out in minutes (seen on Series 40 3rd, max 60 minutes) 0x1b: IDENTITY s Get IMEI { 0x00, 0x41 } r Get IMEI { 0x01, 0x00, 0x01, 0x41, 0x14, 0x00, 0x10, {IMEI(ASCII)}, 0x00 } s get HW&SW version { 0x07, 0x00, 0x01 } r get HW&SW version { 0x08, 0x00, 0x01, 0x58, 0x29, 0x00, 0x22, "V " "firmware\n" "firmware date\n" "model\n" "(c) NMP.", 0x0a, 0x43, 0x00, 0x00, 0x00 } 0x1f: RINGTONE s Get Ringtones { 0x07, 0x00, 0x00, 0xFE, 0x00, 0x7D } r Get Ringtones { 0x08, numberHI, numberLO, blocks... } where block is: { blenHI, blenLO, idHI, idLO, 0x01, type, 0x00, name length (chars), name (unicode)... } where type: 0x01 - built-in, 0x02 - user defined s Set raw ringtone { 0x0e, locationHI, locationLO, 0xfe, name length (chars), name (unicode), datalenHI, datalenLO, data (MIDI file or raw ringtone), 0x00, 0x00 } where location = 0x7fff means first unused entry r Set raw ringtone { 0x0f, err, 0x00 } where err = 0 means ok s Delete ringtone { 0x10, locationHI, locationLO } where location = 0x7ffe means all user defined r Delete ringtone { 0x11, err, 0x00 } where err: 0x00 - ok, 0x03 - inv loc, 0x0a - empty s Get raw ringtone { 0x12, numberHI, numberLO } r Get raw ringtone { 0x13, numberHI, numberLO, ?, name length (chars), name (unicode), datalenHI, datalenLO, data (MIDI file or raw ringtone), 0x00, 0x00 } 6310 didn't send the last two byte r Get raw ringtone err { 0x14, ? } 0x39: PROFILES s Get Profile { 0x01, 0x01, 0x0c, 0x01, 0x04 (length), profile #, 'feature', 0x01 } r Get Profile { 0x02, 0x00, 0x0c, 0x02, 0x09 (length), type, 0x01, 0x02, 0x00, 0x00, 0x01, value, 0x02 ... } s Set Profile { 0x03, 0x01, # blocks, 0x03, length, type, profile #, value, 0x00, 0x00, 0x01, value, 0x03 ... } r Set Profile { 0x04, 0x01, # blocks, length, 0xXX, type, 0xXX, value where value: 0x00 = success 0x7a: STARTUP s Get startup logo { 0x02, 0x0f } r Get startup logo { 0x03, 0x0f, 0x00[4], # blocks, 0xc0, 0x02, height (2 octets), 0xc0, 0x03, width (2 octets), 0xc0, 0x04, size (2 octets), picture } s Get startup greeting { 0x02, 0x01, 0x00 } r Get startup greeting { 0x03, 0x01, 0x00, greeting (unicode), 0x00 } s Get anykey answer { 0x02, 0x05, 0x00 } r Get anykey answer { 0x03, 0x05, 0x00, 0x00/0x01 } gnokii-0.6.31/Docs/protocol/nokia.txt0000644000175000017500000002714111666163120015603 0ustar leoleo$Id$ Document describing protocol used in Nokia phones. The data provided is for information purposes only. Some of the frames might be hazardous to your phone. Be careful!!! We do not take any responsibility or liability for damages, etc. Last update 29.04.2003 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Assembled by Balazs Nagy (js@lsc.hu) Alfred R. Nurnberger Hugh Blemings Mike Bradley Odinokov Serge Pavel Janik Pawel Kot Marcin Wiacek (Marcin-Wiacek@TOPNET.PL) Jens Bennfors Michael Hund Jay Bertrand Andrew Kozin Pavel Machek Diego Betancor Marcel Holtmann ... and other members of gnokii mailing list and authors of some WWW pages. NOTE: this information isn't (and can't be) complete. If you know anything about features not listed here or you noticed a bug in this list, please notify us via e-mail at our mailing list . Thank you. Frame format for MBUS version 1: Request from Computer/Answer from Phone: { DestDEV, SrcDEV, FrameLength, MsgType, {block}, id, ChkSum } where DestDEV, SrcDEV: 0x00: phone 0xf8: PC (wakeup msg) 0xe4: PC (normal msg) FrameLength: length of data frame. Maximal 0x78. Longer frames are divided into smaller. MsgType: see List {block}: main frame id: request identity number 1..n, incremented after the request is accepted ChkSum: XOR on frame's all numbers Ack from Phone: { DestDEV, 0x00, FrameLength, MsgType, {block} , id, ChkSum } where DestDEV: taken from original request packet FrameLength: 0x7f, when DestDEV = 0xe4 0x7e, when DestDEV = 0xf8 MsgType: see List. Present only, when DestDEV = 0xf8 {block}: main frame. Present only, when DestDEV = 0xf8 id: request identity number 1..?, corresponding to the original request packet id the request is accepted ChkSum: XOR on frame's all numbers Update: description above according to the http://www.gadgets.demon.co.uk/nokia21xx/protocol.html. Pavel Machek wrote: 0x7e is actually registration acknowledge. Both have nothing to do with DestDEV, except that special device needs to be used for registration. Ack from Computer: { 0x00, SrcDEV, 0x7f, id, ChkSum } where SrcDEV: taken from response packet id: request identity number 1..?, corresponding to the response packet id the request is accepted ChkSum: XOR on frame's all numbers Port settings: Speed 9600 bps, Bits 8, ParityOdd, Stop Bits 1, DTR and RTS logic 0 In the MBUS bus, the phone has only one connector for transmition and reception. Because of this characteristics of the phone connector, every time that the PC writes into the phone it is writing as well into its own Rx. So every time the PC sends info into the phone it finds that same information in its own Rx buffers, like a mirror copy. This should be discarded. The communications is made like an old cb radio, only one talking at a time. Many transmission are made this way: Some frames are sent from phone without asking for them You have to implement collision protocol. IE. you should listen for what you are transmitting, and if it does not come back, you have collision. You should wait for bus to be free for 3 miliseconds before normal message, and for 2.5 miliseconds before acknowledge. You should wait for acknowledge for 200 miliseconds, then retransmit. Frame format for FBUS version 1: { FrameID, FrameLength, MsgType, SeqNo, {block}, ChkSum } where FrameID: 0x01 Command frame from computer to Nokia 0x02 ??? - Data call frame from computer to Nokia - ??? 0x03 Data call frame from Nokia to computer 0x04 Command frame from Nokia to computer FrameLength: {block} + 2 MsgType: see List SeqNo: Sequence number of command in case where direction is from ME to computer, the sequence number is counting from 0x30 to 0x37 and resetting back to 0x30. Also seqnos 0x00 to 0x07 have been spotted on some 3110s (but not all, maybe different firmware revs?). When direction is from computer to ME, sequence number counts from 0x08 to 0x0f and resets back to 0x08. It may not be required to be this way. Sequence numbers are used in acknowledging commands. ChkSum1: CRC = 0; for (i = 0; i < (2 + CMD_LEN); i++) CRC ^= frame[i]; Frame format for FBUS version 2/Direct IRDA: { FrameID, DestDEV, SrcDEV, MsgType, 0x00, FrameLength, {block}, FramesToGo, SeqNo, PaddingByte?, ChkSum1, ChkSum2 } where FrameID: 0x1c: IR / FBUS 0x1e: Serial / FBUS DestDev, SrcDev: 0x00: mobile phone 0x0c: TE (FBUS) [eg. PC] MsgType: see List FrameLength: {block} + 2 (+ 1 if PaddingByte exists) FramesToGo: 0x01 means the last frame SeqNo: [0xXY] X: 4: first block 0: continuing block Y: sequence number PaddingByte: 0x00 if FrameLength would be an odd number anyways it doesn't exists ChkSum1: XOR on frame's odd numbers ChkSum2?: XOR on frame's even numbers Frame format for MBUS version 2: { FrameID, DestDEV, SrcDEV, MsgType, FrameLengthLO, FrameLengthHI, {block}, SeqNo, ChkSum } where FrameID: 0x1f: Serial / M2BUS DestDev, SrcDev: 0x00: mobile phone 0x1d: TE (M2BUS) 0x10: TE (M2BUS) (Service Software ?) 0x04: Carkit? 0x48: DLR3 cable? 0xF8: unknown target? 0xFF: global target? MsgType: see List FrameLength: {block} SeqNo: sequence number ChkSum: XOR on frame's all numbers Please note that M2BUS has only one checksum: XOR on frame[FrameID..SeqNo] Ack: { FrameID, DestDEV, SrcDEV, 0x7f, Id_SeqNo, ChkSum } where Id_SeqNo: Is the sequence number that you are acknowleging (from the other part). Frame format for IrDA: { FrameID, DestDEV, SrcDEV, MsgType, FrameLengthLo, FrameLengthHi, {block} } where FrameID: 0x14 DestDev, SrcDev: 0x00: mobile phone 0x0c: TE [eg. PC] MsgType: see List FrameLength: {block} Frame format for Bluetooth: { FrameID, DestDEV, SrcDEV, MsgType, FrameLengthLo, FrameLengthHi, {block} } where FrameID: 0x19 DestDev, SrcDev: 0x00: mobile phone 0x10: TE [eg. PC] MsgType: see List FrameLength: {block} Frames list format: hex: Short description x msg desc { ... } 0xXX -> one byte 0xXXYY -> two bytes (== 0xXX, 0xYY) where hex: message type x: s=send (eg. to mobile), r=receive { ... }: data after 0x00, 0x01 header {+... }: raw data (without header) ------------------------------------------------------------------------------- Misc (about MBUS version 2): 0x4E commands: (sent from a 5160i TDMA / 6160i TDMA / 6185 CDMA or 7110 GSM phone to the uC in the DLR-3 cable) DLR-3 req: 1F 48 00 4E 00 02 01 XX SQ CS frame sent from the phone to the DLR-3 cable (after 15kOhm resistor detected betw. XMIC (3) and DGND (9).) DSR,DCD,CTS flow control data is coded into the 2nd databyte XX: bit.0=/CTS bit.1=/DCD bit.2=CMD/DATA bit.3=DSR bit.4-7=0 0x78 / 0x79 commands: (used by handsfree carkit) Works also on GSM phones (5110 / 6110 / etc) These commands are used by the Nokia Carkits to switch the phone audio path to XMiC and XEAR , turn the phone on/off according to the car ignition, and control the PA loudspeaker amplifier in the carkit and the car radio mute output which silences the car radio during a call mute status tone: 1F 04 00 78 00 04 01 02 0E 00 SQ CS status indication = disable carkit audio amplifier (no audio / no tone) mute status tone: 1F 04 00 78 00 04 01 02 0E 03 SQ CS status indication = enable carkit audio amplifier (audio / tone present) mute status call: 1F 04 00 78 00 04 01 02 07 00 SQ CS status indication = disable radio mute output (no call) mute status call: 1F 04 00 78 00 04 01 02 07 01 SQ CS status indication = enable radio mute output (call active) enable ???: 1F 04 00 78 00 04 01 02 08 01 SQ CS status indication = enable ??? sent to HFU-2 on power on byte 9 (07,08,0E) seems to be a pointer to a memory location, byte 10 is the data at this memeory location. response from HFU: 1F 00 04 78 00 03 02 01 03 SQ CS response message from HFU-2 (use unknown) go HF and IGN on: 1F 00 04 79 00 05 02 01 01 63 00 SQ CS enables carkit mode + turns phone on + req. mute status go HF and IGN off: 1F 00 04 79 00 05 02 01 01 61 00 SQ CS enables carkit mode + powers phone off (1 min delay) + req. mute status ext. HS Offhk: 1F 00 04 79 00 05 02 01 01 23 00 SQ CS enables carkit mode + external handset lifted (OFF-Hook) ext. HS Onhk: 1F 00 04 79 00 05 02 01 01 63 00 SQ CS enables carkit mode + external handset put back (ON-Hook) Ignition and Hook are coded into one byte bit.0 = 0:on power on 1:when in operation bit.1 = IGNITION STATUS bit.2 = x can be 1 or 0 bit.3 = 0 bit.4 = 0 bit.5 = 1 bit.6 = Hook (inverted) bit.7 = 0 HFU-2 version: 1F 00 04 79 00 12 02 01 02 06 00 56 20 30 36 2E 30 30 0A 48 46 55 32 00 SQ CS for HFU-2: 1F 04 00 DA 00 02 00 02 SQ CS function unknown - sent from Nokia phone to HFU-2mute output (call active ) 0xD0 commands: init: 1F 00 1D D0 00 01 04 SQ CS sent by the Service Software or HFU-2 on startup init resp: 1F 1D 00 D0 00 01 05 SQ CS response from phone to above frame gnokii-0.6.31/Docs/protocol/nk6160.txt0000644000175000017500000001110611666163120015421 0ustar leoleo$Id$ Assembled by ... and other members of gnokii mailing list and authors of some WWW pages. The data provided is for information purposes only. Some of the frames might be hazardous to your phone. Be careful!!! We do not take any responsibility or liability for damages, etc. NOTE: this information isn't (and can't be) complete. If you know anything about features not listed here or you noticed a bug in this list, please notify us via e-mail at our mailing list . Thank you. Document describing frames used in TDMA NOKIA 5120 / 5160 / 6120 / 6160 TDMA phones support simultaneously both MBUS protocols (see nokia.txt for protocol details) the old one (version1) and the new (version2). Both protocols can be used at the same time on the MBUS. The phone will decode both and react accordingly. Correct format is MBUS version 1: List: 0x17: s Release key {+0x00, keynum } s Press key {+0x01, keynum } 0xe9: s Start connection {+0x01 0x01 0x1c 0x01 0x1c} (3Com cell modem card)Note: this is message with SrcDEV = 0xf8 ! ACK frame for it is (DestDEV = 0xf8 too) 0x1c, 0x01, 0x1c s Start connection {+0x00 0x02 0x1d 0x00 0x1d} Note: this is message with SrcDEV = 0xf8 ! Other frames from 3Com cell modem card (MBUS version 1): unknown purpose : 00 E0 00 1D SQ CS probably request Alive response from cellmodem UC_RESERVE_REQ: 00 E0 05 19 00 00 01 01 00 SQ CS register system state info presentation UC_RESERVE_REQ: E0 00 01 CD 01 SQ CS phone tries to register some info from cellmodem Dialing as cellmodem forces the phone into analoge AMPS mode, answering a call as cellmodem answers in AMPS mode This allows transparent transmission of the analoge modem tones since digital TDMA won't transmit them transparently. It also switches audio to the XEAR , XMIC pins automatically. LN_ALIVE_REQ: E0 00 00 1E SQ CS checks if cellmodem is still present (sent 1 /sec.) SYS_STATE_IND: FF 02 07 CA 1C Con 02 01 0E 0F 00 SQ CS sytems state information Con holds the connection state 00 = idle 01 = ringing 02 = connecting 03 = talk 04 = ringing / alternating with 01 the destignation is the Global object and the source is subaddress 02 of the Nokia phone. Correct format is MBUS version 2: List: 0x40: s Read phonebook(2way) {+0x00, 0x00, 0x07, 0x11, 0x00, 0x10, 0x00, location } Note: works also on CDMA 6185 s Read phonebook(1way) { 0x1F, 0x01, 0x04, 0x86, location } s Write phonebook { 0x1f, 0x01, 0x04, 0x87, number, 0x00, name, 0x00 } s Enable extended cmds { 0x64, cmd } where cmd(probably): 0x00: off 0x01: on 0x03: reset (doesn't ask for PIN again) 0x04: reset (PIN is requested) In 5110 makes reset without PIN 0x06: CONTACT SERVICE!!! Don't try it! s Get startup logo { 0x00, 0x01, 0x07, 0x07, 0x08, slice } where slice in 1..6 0xd1: s Registration request? {+0x00, 0xF8, 0x05, 0xE9, 0x00, 0x02, 0x1D, 0x00, 0x1D} s Get HW&SW version { 0x0003, 0x00 } s Get phone version? { 0x000D, 0x00, 0x00, 0x02} s Init Buzzer {0x04, 0x00, 0x07, 0x09, 0x60, 0x05} s End Buzzer {0x04, 0x00, 0x07, 0x09, 0x60, 0x00} s ??? { 0x47, 0x00, 0x00} s ??? { 0x47, 0x00, 0x05} s Key release(1way) { 0x50, 0x00, 0x00, KEY } s Key press { 0x50, 0x00, 0x01, KEY } dials in digital TDMA default mode ? s Key release(2way) { 0x51, 0x00, 0x01, KEY } 0xd2: r Get HW&SW version { 0x0003 "V " "firmware\n" "firmware date\n" "model\n" "(c) NMP." } r Init/End Buzzer {+0x01, 0x00, 0x04, 0x00} r Get phone version { 0x000D, "V " "firmware\n" "firmware date\n" } r Key press {+0x01, 0x00, 0x50, 0x00} r ??? {+0x01, 0x00, 0x47, 0x00} 0xdd: r Get startup logo { 0x01, 0x00, 0x07, 0x08, 84 bytes of data } where each byte contains 8 row, bit0 is the first gnokii-0.6.31/Docs/README-21100000644000175000017500000000131611666163117013343 0ustar leoleo-- README-2110 -- -- Notes, bugs and a todo list for the 2110 series -- * Notes * Code for the 2110 phones has been tested with home-built cable. It should work well with any sort of cable. * Known Bugs * - Nokia protocol is not followed. We use hacks instead of collision detection protocol nokia suggests. - Many. Look at code, needs cleanup, etc. Contact pavel at ucw dot cz if you want to help. - When periodically fetching messages, it gets to state where protocol breaks with "bad checksum". * To-do * - SMS sending. - Implement functionanlity such as reading internal A/D convertors and ability to turn on netmon. [Not sure if all 2110s even have netmon.] gnokii-0.6.31/configure0000755000175000017500000233346011666163213013130 0ustar leoleo#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.68 for gnokii 0.6.31. # # Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software # Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: gnokii-users@nongnu.org about your system, including $0: any error possibly output before this message. Then $0: install a modern shell, or manually run the script $0: under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='gnokii' PACKAGE_TARNAME='gnokii' PACKAGE_VERSION='0.6.31' PACKAGE_STRING='gnokii 0.6.31' PACKAGE_BUGREPORT='gnokii-users@nongnu.org' PACKAGE_URL='http://www.gnokii.org/' # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_unique_file="gnokii/gnokii.c" ac_default_prefix="/usr/local" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS HAVE_SOCKETPHONET HAVE_LIBUSB HAVE_LIBICAL WIN32_CROSS WIN32 HAVE_XGNOKII XPM_LIBS XPM_CFLAGS NEED_LOCALE_CHARSET USE_UNIX98PTYS OWN_GETOPT GLDFLAGS XPACKAGE XVERSION LIBOBJS WIN32_FALSE WIN32_TRUE LIBPCSCLITE_LIBS LIBPCSCLITE_CFLAGS HAVE_MYSQL_FALSE HAVE_MYSQL_TRUE MYSQL_CFLAGS MYSQL_LIBS MYSQLCONFIG MYSQLCONFIG5 HAVE_SQLITE_FALSE HAVE_SQLITE_TRUE SQLITE_CFLAGS SQLITE_LIBS SQLITE3_LIBS SQLITE3_CFLAGS HAVE_POSTGRES_FALSE HAVE_POSTGRES_TRUE POSTGRES_CFLAGS POSTGRES_LIBS PGCONFIG SMSD_FALSE SMSD_TRUE GMODULE_LIBS GMODULE_CFLAGS GLIB_LIBS GLIB_CFLAGS XGNOKII_FALSE XGNOKII_TRUE XMKMF GTK_LIBS GTK_CFLAGS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG BLUETOOTH_LIBS TCP_LIBS USB_LIBS ICAL_CFLAGS ICAL_LIBS TERMLDFLAGS TERMLIBS PTHREAD_CFLAGS PTHREAD_LIBS PTHREAD_CC acx_pthread_config LIBGNOKII_VERSION_STRING LIBGNOKII_VERSION_RELEASE LIBGNOKII_VERSION_MINOR LIBGNOKII_VERSION_MAJOR GNOKII_LT_VERSION OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP SED LIBTOOL OBJDUMP DLLTOOL AS LTLIBICONV LIBICONV MKINSTALLDIRS POSUB POFILES PO_IN_DATADIR_FALSE PO_IN_DATADIR_TRUE INTLLIBS INSTOBJEXT GMOFILES CATOBJEXT CATALOGS MSGFMT_OPTS GETTEXT_PACKAGE DATADIRNAME ALL_LINGUAS INTLTOOL_PERL GMSGFMT MSGFMT MSGMERGE XGETTEXT INTLTOOL_POLICY_RULE INTLTOOL_SERVICE_RULE INTLTOOL_THEME_RULE INTLTOOL_SCHEMAS_RULE INTLTOOL_CAVES_RULE INTLTOOL_XML_NOMERGE_RULE INTLTOOL_XML_RULE INTLTOOL_KBD_RULE INTLTOOL_XAM_RULE INTLTOOL_UI_RULE INTLTOOL_SOUNDLIST_RULE INTLTOOL_SHEET_RULE INTLTOOL_SERVER_RULE INTLTOOL_PONG_RULE INTLTOOL_OAF_RULE INTLTOOL_PROP_RULE INTLTOOL_KEYS_RULE INTLTOOL_DIRECTORY_RULE INTLTOOL_DESKTOP_RULE INTLTOOL_EXTRACT INTLTOOL_MERGE INTLTOOL_UPDATE USE_NLS AR MAKE FIND RM LEXLIB LEX_OUTPUT_ROOT LEX am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM EGREP GREP CPP OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC target_os target_vendor target_cpu target host_os host_vendor host_cpu host build_os build_vendor build_cpu build GNOKII_LT_VERSION_AGE GNOKII_LT_VERSION_REVISION GNOKII_LT_VERSION_CURRENT target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_dependency_tracking enable_nls with_gnu_ld enable_rpath with_libiconv_prefix enable_shared enable_static with_pic enable_fast_install with_sysroot enable_libtool_lock enable_fulldebug enable_xdebug enable_rlpdebug with_libpthread with_readline with_libical enable_libical enable_libusb enable_phonet enable_irda with_gettext with_bluetooth enable_bluetooth with_x enable_smsd enable_postgres enable_sqlite enable_mysql enable_security enable_libpcsclite enable_win enable_unix98test ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR GTK_CFLAGS GTK_LIBS XMKMF GLIB_CFLAGS GLIB_LIBS GMODULE_CFLAGS GMODULE_LIBS SQLITE3_CFLAGS SQLITE3_LIBS LIBPCSCLITE_CFLAGS LIBPCSCLITE_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures gnokii 0.6.31 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/gnokii] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names X features: --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of gnokii 0.6.31:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --disable-nls do not use Native Language Support --disable-rpath do not hardcode runtime library paths --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --enable-fulldebug compile with full debugging support --enable-xdebug compile with xdebug code --enable-rlpdebug compile with RLP debug code --disable-libical disable libical support (default is autodetected) --disable-libusb disable libusb support (default is autodetected) --disable-phonet disable phonet support (default is autodetected) --disable-irda disable irda support (default is autodetected) --disable-bluetooth disable Bluetooth support (default is autodetected) --disable-smsd disable smsd support (default is autodetected) --disable-postgres disable PostgreSQL support (default is autodetected) --disable-sqlite disable SQLite support (default is autodetected) --disable-mysql disable MySQL support (default is autodetected) --enable-security enable all security features [default=no] --disable-libpcsclite disable libpcsclite support (default is autodetected) --enable-win if you want Windows support --enable-unix98test if you want to disable UNIX98 test and assume to use it; default is enabled Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-gnu-ld assume the C compiler uses GNU ld default=no --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib --without-libiconv-prefix don't search for libiconv in includedir and libdir --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-libpthread=DIR specifies the base libpthread --with-readline=DIR Look for readline include/libs in DIR --without-readline Don't include readline support --with-libical=DIR specifies the base libical --with-gettext=DIR specifies the base gettext --with-bluetooth=DIR specifies the base libbluetooth --with-x use the X Window System Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path GTK_CFLAGS C compiler flags for GTK, overriding pkg-config GTK_LIBS linker flags for GTK, overriding pkg-config XMKMF Path to xmkmf, Makefile generator for X Window System GLIB_CFLAGS C compiler flags for GLIB, overriding pkg-config GLIB_LIBS linker flags for GLIB, overriding pkg-config GMODULE_CFLAGS C compiler flags for GMODULE, overriding pkg-config GMODULE_LIBS linker flags for GMODULE, overriding pkg-config SQLITE3_CFLAGS C compiler flags for SQLITE3, overriding pkg-config SQLITE3_LIBS linker flags for SQLITE3, overriding pkg-config LIBPCSCLITE_CFLAGS C compiler flags for LIBPCSCLITE, overriding pkg-config LIBPCSCLITE_LIBS linker flags for LIBPCSCLITE, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . gnokii home page: . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF gnokii configure 0.6.31 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## -------------------------------------- ## ## Report this to gnokii-users@nongnu.org ## ## -------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by gnokii $as_me 0.6.31, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Before making a release, the GNOKII_LT_VERSION string should be modified. # The string is of the form C:R:A. # - If interfaces have been changed or added, but binary compatibility has # been preserved, change to C+1:0:A+1 # - If binary compatibility has been broken (eg removed or changed interfaces) # change to C-A+1:0:0 # - If the interface is the same as the previous version, change to C:R+1:A GNOKII_LT_VERSION_CURRENT=7 GNOKII_LT_VERSION_REVISION=0 GNOKII_LT_VERSION_AGE=0 XVERSION=1.0 SVERSION=1.5.2 ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 $as_echo_n "checking target system type... " >&6; } if ${ac_cv_target+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 $as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' set x $ac_cv_target shift target_cpu=$1 target_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: target_os=$* IFS=$ac_save_IFS case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" if test "x$ac_cv_header_minix_config_h" = xyes; then : MINIX=yes else MINIX= fi if test "$MINIX" = yes; then $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h $as_echo "#define _MINIX 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } if ${ac_cv_safe_to_define___extensions__+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # define __EXTENSIONS__ 1 $ac_includes_default int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_safe_to_define___extensions__=yes else ac_cv_safe_to_define___extensions__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } test $ac_cv_safe_to_define___extensions__ = yes && $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h $as_echo "#define _ALL_SOURCE 1" >>confdefs.h $as_echo "#define _GNU_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h am__api_version='1.11' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='gnokii' VERSION='0.6.31' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test "x$CC" != xcc; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 $as_echo_n "checking whether cc understands -c and -o together... " >&6; } fi set dummy $CC; ac_cc=`$as_echo "$2" | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # We do the test twice because some compilers refuse to overwrite an # existing .o file with -o, though they will create one. ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* if { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -f conftest2.$ac_objext && { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then eval ac_cv_prog_cc_${ac_cc}_c_o=yes if test "x$CC" != xcc; then # Test first that cc exists at all. if { ac_try='cc -c conftest.$ac_ext >&5' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* if { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -f conftest2.$ac_objext && { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # cc works too. : else # cc exists but doesn't like -o. eval ac_cv_prog_cc_${ac_cc}_c_o=no fi fi fi else eval ac_cv_prog_cc_${ac_cc}_c_o=no fi rm -f core conftest* fi if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h fi # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o if test "$am_t" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu for ac_prog in flex lex do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LEX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LEX"; then ac_cv_prog_LEX="$LEX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LEX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LEX=$ac_cv_prog_LEX if test -n "$LEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5 $as_echo "$LEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$LEX" && break done test -n "$LEX" || LEX=":" if test "x$LEX" != "x:"; then cat >conftest.l <<_ACEOF %% a { ECHO; } b { REJECT; } c { yymore (); } d { yyless (1); } e { yyless (input () != 0); } f { unput (yytext[0]); } . { BEGIN INITIAL; } %% #ifdef YYTEXT_POINTER extern char *yytext; #endif int main (void) { return ! yylex () + ! yywrap (); } _ACEOF { { ac_try="$LEX conftest.l" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$LEX conftest.l") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5 $as_echo_n "checking lex output file root... " >&6; } if ${ac_cv_prog_lex_root+:} false; then : $as_echo_n "(cached) " >&6 else if test -f lex.yy.c; then ac_cv_prog_lex_root=lex.yy elif test -f lexyy.c; then ac_cv_prog_lex_root=lexyy else as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5 $as_echo "$ac_cv_prog_lex_root" >&6; } LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root if test -z "${LEXLIB+set}"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5 $as_echo_n "checking lex library... " >&6; } if ${ac_cv_lib_lex+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_LIBS=$LIBS ac_cv_lib_lex='none needed' for ac_lib in '' -lfl -ll; do LIBS="$ac_lib $ac_save_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ `cat $LEX_OUTPUT_ROOT.c` _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_lex=$ac_lib fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test "$ac_cv_lib_lex" != 'none needed' && break done LIBS=$ac_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5 $as_echo "$ac_cv_lib_lex" >&6; } test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5 $as_echo_n "checking whether yytext is a pointer... " >&6; } if ${ac_cv_prog_lex_yytext_pointer+:} false; then : $as_echo_n "(cached) " >&6 else # POSIX says lex can declare yytext either as a pointer or an array; the # default is implementation-dependent. Figure out which it is, since # not all implementations provide the %pointer and %array declarations. ac_cv_prog_lex_yytext_pointer=no ac_save_LIBS=$LIBS LIBS="$LEXLIB $ac_save_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define YYTEXT_POINTER 1 `cat $LEX_OUTPUT_ROOT.c` _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_prog_lex_yytext_pointer=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5 $as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; } if test $ac_cv_prog_lex_yytext_pointer = yes; then $as_echo "#define YYTEXT_POINTER 1" >>confdefs.h fi rm -f conftest.l $LEX_OUTPUT_ROOT.c fi # If there's no flex/lex utility and there's no generated common/gnvcal.c file, we won't be able to compile if test "x$LEX" = "x:" && test ! -f common/gnvcal.c; then echo "You need one of the following:" echo " - installed lex/flex" echo " - generated common/gnvcal.c file (included in release tarballs, not included in GIT)" exit 1 fi # Extract the first word of "rm", so it can be a program name with args. set dummy rm; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_RM+:} false; then : $as_echo_n "(cached) " >&6 else case $RM in [\\/]* | ?:[\\/]*) ac_cv_path_RM="$RM" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_RM" && ac_cv_path_RM="no" ;; esac fi RM=$ac_cv_path_RM if test -n "$RM"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5 $as_echo "$RM" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "find", so it can be a program name with args. set dummy find; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_FIND+:} false; then : $as_echo_n "(cached) " >&6 else case $FIND in [\\/]* | ?:[\\/]*) ac_cv_path_FIND="$FIND" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_FIND" && ac_cv_path_FIND="no" ;; esac fi FIND=$ac_cv_path_FIND if test -n "$FIND"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5 $as_echo "$FIND" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi for ac_prog in gmake make do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MAKE+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MAKE"; then ac_cv_prog_MAKE="$MAKE" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_MAKE="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MAKE=$ac_cv_prog_MAKE if test -n "$MAKE"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5 $as_echo "$MAKE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$MAKE" && break done for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 $as_echo_n "checking whether NLS is requested... " >&6; } # Check whether --enable-nls was given. if test "${enable_nls+set}" = set; then : enableval=$enable_nls; USE_NLS=$enableval else USE_NLS=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 $as_echo "$USE_NLS" >&6; } case "$am__api_version" in 1.01234) as_fn_error $? "Automake 1.5 or newer is required to use intltool" "$LINENO" 5 ;; *) ;; esac if test -n "0.35.0"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intltool >= 0.35.0" >&5 $as_echo_n "checking for intltool >= 0.35.0... " >&6; } INTLTOOL_REQUIRED_VERSION_AS_INT=`echo 0.35.0 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3` INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_APPLIED_VERSION found" >&5 $as_echo "$INTLTOOL_APPLIED_VERSION found" >&6; } test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" || as_fn_error $? "Your intltool is too old. You need intltool 0.35.0 or later." "$LINENO" 5 fi # Extract the first word of "intltool-update", so it can be a program name with args. set dummy intltool-update; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_INTLTOOL_UPDATE+:} false; then : $as_echo_n "(cached) " >&6 else case $INTLTOOL_UPDATE in [\\/]* | ?:[\\/]*) ac_cv_path_INTLTOOL_UPDATE="$INTLTOOL_UPDATE" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_INTLTOOL_UPDATE="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi INTLTOOL_UPDATE=$ac_cv_path_INTLTOOL_UPDATE if test -n "$INTLTOOL_UPDATE"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_UPDATE" >&5 $as_echo "$INTLTOOL_UPDATE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "intltool-merge", so it can be a program name with args. set dummy intltool-merge; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_INTLTOOL_MERGE+:} false; then : $as_echo_n "(cached) " >&6 else case $INTLTOOL_MERGE in [\\/]* | ?:[\\/]*) ac_cv_path_INTLTOOL_MERGE="$INTLTOOL_MERGE" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_INTLTOOL_MERGE="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi INTLTOOL_MERGE=$ac_cv_path_INTLTOOL_MERGE if test -n "$INTLTOOL_MERGE"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_MERGE" >&5 $as_echo "$INTLTOOL_MERGE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "intltool-extract", so it can be a program name with args. set dummy intltool-extract; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_INTLTOOL_EXTRACT+:} false; then : $as_echo_n "(cached) " >&6 else case $INTLTOOL_EXTRACT in [\\/]* | ?:[\\/]*) ac_cv_path_INTLTOOL_EXTRACT="$INTLTOOL_EXTRACT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_INTLTOOL_EXTRACT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi INTLTOOL_EXTRACT=$ac_cv_path_INTLTOOL_EXTRACT if test -n "$INTLTOOL_EXTRACT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_EXTRACT" >&5 $as_echo "$INTLTOOL_EXTRACT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then as_fn_error $? "The intltool scripts were not found. Please install intltool." "$LINENO" 5 fi INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< $@' INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< $@' INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' # Check the gettext tools to make sure they are GNU # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_XGETTEXT+:} false; then : $as_echo_n "(cached) " >&6 else case $XGETTEXT in [\\/]* | ?:[\\/]*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi XGETTEXT=$ac_cv_path_XGETTEXT if test -n "$XGETTEXT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 $as_echo "$XGETTEXT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "msgmerge", so it can be a program name with args. set dummy msgmerge; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_MSGMERGE+:} false; then : $as_echo_n "(cached) " >&6 else case $MSGMERGE in [\\/]* | ?:[\\/]*) ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi MSGMERGE=$ac_cv_path_MSGMERGE if test -n "$MSGMERGE"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 $as_echo "$MSGMERGE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_MSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case $MSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi MSGFMT=$ac_cv_path_MSGFMT if test -n "$MSGFMT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 $as_echo "$MSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GMSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case $GMSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ;; esac fi GMSGFMT=$ac_cv_path_GMSGFMT if test -n "$GMSGFMT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 $as_echo "$GMSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then as_fn_error $? "GNU gettext tools not found; required for intltool" "$LINENO" 5 fi xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`" mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`" mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`" if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then as_fn_error $? "GNU gettext tools not found; required for intltool" "$LINENO" 5 fi # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_INTLTOOL_PERL+:} false; then : $as_echo_n "(cached) " >&6 else case $INTLTOOL_PERL in [\\/]* | ?:[\\/]*) ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL if test -n "$INTLTOOL_PERL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_PERL" >&5 $as_echo "$INTLTOOL_PERL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$INTLTOOL_PERL"; then as_fn_error $? "perl not found" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl >= 5.8.1" >&5 $as_echo_n "checking for perl >= 5.8.1... " >&6; } $INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1 if test $? -ne 0; then as_fn_error $? "perl 5.8.1 is required for intltool" "$LINENO" 5 else IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IT_PERL_VERSION" >&5 $as_echo "$IT_PERL_VERSION" >&6; } fi if test "x" != "xno-xml"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML::Parser" >&5 $as_echo_n "checking for XML::Parser... " >&6; } if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } else as_fn_error $? "XML::Parser perl module is required for intltool" "$LINENO" 5 fi fi # Substitute ALL_LINGUAS so we can use it in po/Makefile # Set DATADIRNAME correctly if it is not set yet # (copied from glib-gettext.m4) if test -z "$DATADIRNAME"; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : DATADIRNAME=share else case $host in *-*-solaris*) ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then : DATADIRNAME=share else DATADIRNAME=lib fi ;; *) DATADIRNAME=lib ;; esac fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } if ${am_cv_langinfo_codeset+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { char* cs = nl_langinfo(CODESET); return !cs; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_langinfo_codeset=yes else am_cv_langinfo_codeset=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 $as_echo "$am_cv_langinfo_codeset" >&6; } if test $am_cv_langinfo_codeset = yes; then $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h fi GETTEXT_PACKAGE=gnokii cat >>confdefs.h <<_ACEOF #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE" _ACEOF for ac_header in locale.h do : ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default" if test "x$ac_cv_header_locale_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LOCALE_H 1 _ACEOF fi done if test $ac_cv_header_locale_h = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 $as_echo_n "checking for LC_MESSAGES... " >&6; } if ${am_cv_val_LC_MESSAGES+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { return LC_MESSAGES ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_val_LC_MESSAGES=yes else am_cv_val_LC_MESSAGES=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 $as_echo "$am_cv_val_LC_MESSAGES" >&6; } if test $am_cv_val_LC_MESSAGES = yes; then $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h fi fi USE_NLS=yes gt_cv_have_gettext=no CATOBJEXT=NONE XGETTEXT=: INTLLIBS= ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default" if test "x$ac_cv_header_libintl_h" = xyes; then : gt_cv_func_dgettext_libintl="no" libintl_extra_libs="" # # First check in libc # { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in libc" >&5 $as_echo_n "checking for ngettext in libc... " >&6; } if ${gt_cv_func_ngettext_libc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { return !ngettext ("","", 1) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gt_cv_func_ngettext_libc=yes else gt_cv_func_ngettext_libc=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_ngettext_libc" >&5 $as_echo "$gt_cv_func_ngettext_libc" >&6; } if test "$gt_cv_func_ngettext_libc" = "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in libc" >&5 $as_echo_n "checking for dgettext in libc... " >&6; } if ${gt_cv_func_dgettext_libc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { return !dgettext ("","") ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gt_cv_func_dgettext_libc=yes else gt_cv_func_dgettext_libc=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_dgettext_libc" >&5 $as_echo "$gt_cv_func_dgettext_libc" >&6; } fi if test "$gt_cv_func_ngettext_libc" = "yes" ; then for ac_func in bind_textdomain_codeset do : ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_BIND_TEXTDOMAIN_CODESET 1 _ACEOF fi done fi # # If we don't have everything we want, check in libintl # if test "$gt_cv_func_dgettext_libc" != "yes" \ || test "$gt_cv_func_ngettext_libc" != "yes" \ || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bindtextdomain in -lintl" >&5 $as_echo_n "checking for bindtextdomain in -lintl... " >&6; } if ${ac_cv_lib_intl_bindtextdomain+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char bindtextdomain (); int main () { return bindtextdomain (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_bindtextdomain=yes else ac_cv_lib_intl_bindtextdomain=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_bindtextdomain" >&5 $as_echo "$ac_cv_lib_intl_bindtextdomain" >&6; } if test "x$ac_cv_lib_intl_bindtextdomain" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5 $as_echo_n "checking for ngettext in -lintl... " >&6; } if ${ac_cv_lib_intl_ngettext+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ngettext (); int main () { return ngettext (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_ngettext=yes else ac_cv_lib_intl_ngettext=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5 $as_echo "$ac_cv_lib_intl_ngettext" >&6; } if test "x$ac_cv_lib_intl_ngettext" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5 $as_echo_n "checking for dgettext in -lintl... " >&6; } if ${ac_cv_lib_intl_dgettext+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dgettext (); int main () { return dgettext (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_dgettext=yes else ac_cv_lib_intl_dgettext=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5 $as_echo "$ac_cv_lib_intl_dgettext" >&6; } if test "x$ac_cv_lib_intl_dgettext" = xyes; then : gt_cv_func_dgettext_libintl=yes fi fi fi if test "$gt_cv_func_dgettext_libintl" != "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -liconv is needed to use gettext" >&5 $as_echo_n "checking if -liconv is needed to use gettext... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 $as_echo "" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5 $as_echo_n "checking for ngettext in -lintl... " >&6; } if ${ac_cv_lib_intl_ngettext+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl -liconv $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ngettext (); int main () { return ngettext (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_ngettext=yes else ac_cv_lib_intl_ngettext=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5 $as_echo "$ac_cv_lib_intl_ngettext" >&6; } if test "x$ac_cv_lib_intl_ngettext" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dcgettext in -lintl" >&5 $as_echo_n "checking for dcgettext in -lintl... " >&6; } if ${ac_cv_lib_intl_dcgettext+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl -liconv $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dcgettext (); int main () { return dcgettext (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_dcgettext=yes else ac_cv_lib_intl_dcgettext=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dcgettext" >&5 $as_echo "$ac_cv_lib_intl_dcgettext" >&6; } if test "x$ac_cv_lib_intl_dcgettext" = xyes; then : gt_cv_func_dgettext_libintl=yes libintl_extra_libs=-liconv else : fi else : fi fi # # If we found libintl, then check in it for bind_textdomain_codeset(); # we'll prefer libc if neither have bind_textdomain_codeset(), # and both have dgettext and ngettext # if test "$gt_cv_func_dgettext_libintl" = "yes" ; then glib_save_LIBS="$LIBS" LIBS="$LIBS -lintl $libintl_extra_libs" unset ac_cv_func_bind_textdomain_codeset for ac_func in bind_textdomain_codeset do : ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_BIND_TEXTDOMAIN_CODESET 1 _ACEOF fi done LIBS="$glib_save_LIBS" if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then gt_cv_func_dgettext_libc=no else if test "$gt_cv_func_dgettext_libc" = "yes" \ && test "$gt_cv_func_ngettext_libc" = "yes"; then gt_cv_func_dgettext_libintl=no fi fi fi fi if test "$gt_cv_func_dgettext_libc" = "yes" \ || test "$gt_cv_func_dgettext_libintl" = "yes"; then gt_cv_have_gettext=yes fi if test "$gt_cv_func_dgettext_libintl" = "yes"; then INTLLIBS="-lintl $libintl_extra_libs" fi if test "$gt_cv_have_gettext" = "yes"; then $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_MSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case "$MSGFMT" in /*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then ac_cv_path_MSGFMT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" ;; esac fi MSGFMT="$ac_cv_path_MSGFMT" if test "$MSGFMT" != "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 $as_echo "$MSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$MSGFMT" != "no"; then glib_save_LIBS="$LIBS" LIBS="$LIBS $INTLLIBS" for ac_func in dcgettext do : ac_fn_c_check_func "$LINENO" "dcgettext" "ac_cv_func_dcgettext" if test "x$ac_cv_func_dcgettext" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DCGETTEXT 1 _ACEOF fi done MSGFMT_OPTS= { $as_echo "$as_me:${as_lineno-$LINENO}: checking if msgfmt accepts -c" >&5 $as_echo_n "checking if msgfmt accepts -c... " >&6; } cat >conftest.foo <<_ACEOF msgid "" msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Project-Id-Version: test 1.0\n" "PO-Revision-Date: 2007-02-15 12:01+0100\n" "Last-Translator: test \n" "Language-Team: C \n" "MIME-Version: 1.0\n" "Content-Transfer-Encoding: 8bit\n" _ACEOF if { { $as_echo "$as_me:${as_lineno-$LINENO}: \$MSGFMT -c -o /dev/null conftest.foo"; } >&5 ($MSGFMT -c -o /dev/null conftest.foo) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then MSGFMT_OPTS=-c; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } echo "$as_me: failed input was:" >&5 sed 's/^/| /' conftest.foo >&5 fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GMSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case $GMSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ;; esac fi GMSGFMT=$ac_cv_path_GMSGFMT if test -n "$GMSGFMT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 $as_echo "$GMSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_XGETTEXT+:} false; then : $as_echo_n "(cached) " >&6 else case "$XGETTEXT" in /*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then ac_cv_path_XGETTEXT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" ;; esac fi XGETTEXT="$ac_cv_path_XGETTEXT" if test "$XGETTEXT" != ":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 $as_echo "$XGETTEXT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : CATOBJEXT=.gmo DATADIRNAME=share else case $host in *-*-solaris*) ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then : CATOBJEXT=.gmo DATADIRNAME=share else CATOBJEXT=.mo DATADIRNAME=lib fi ;; *) CATOBJEXT=.mo DATADIRNAME=lib ;; esac fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$glib_save_LIBS" INSTOBJEXT=.mo else gt_cv_have_gettext=no fi fi fi if test "$gt_cv_have_gettext" = "yes" ; then $as_echo "#define ENABLE_NLS 1" >>confdefs.h fi if test "$XGETTEXT" != ":"; then if $XGETTEXT --omit-header /dev/null 2> /dev/null; then : ; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: found xgettext program is not GNU xgettext; ignore it" >&5 $as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; } XGETTEXT=":" fi fi # We need to process the po/ directory. POSUB=po ac_config_commands="$ac_config_commands default-1" for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" done if test "$gt_cv_have_gettext" = "yes"; then if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 $as_echo_n "checking for catalogs to be installed... " >&6; } NEW_LINGUAS= for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then NEW_LINGUAS="$NEW_LINGUAS $presentlang" fi done LINGUAS=$NEW_LINGUAS { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 $as_echo "$LINGUAS" >&6; } fi if test -n "$LINGUAS"; then for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done fi fi MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi test -d po || mkdir po if test "x$srcdir" != "x."; then if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then posrcprefix="$srcdir/" else posrcprefix="../$srcdir/" fi else posrcprefix="../" fi rm -f po/POTFILES sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ < $srcdir/po/POTFILES.in > po/POTFILES if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 $as_echo_n "checking for ld used by GCC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | [A-Za-z]:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${acl_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) test "$with_gnu_ld" != no && break ;; *) test "$with_gnu_ld" != yes && break ;; esac fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi fi LD="$acl_cv_path_LD" if test -n "$LD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${acl_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 &5 $as_echo "$acl_cv_prog_gnu_ld" >&6; } with_gnu_ld=$acl_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 $as_echo_n "checking for shared library run path origin... " >&6; } if ${acl_cv_rpath+:} false; then : $as_echo_n "(cached) " >&6 else CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 $as_echo "$acl_cv_rpath" >&6; } wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" # Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then : enableval=$enable_rpath; : else enable_rpath=yes fi acl_libdirstem=lib acl_libdirstem2= case "$host_os" in solaris*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5 $as_echo_n "checking for 64-bit host... " >&6; } if ${gl_cv_solaris_64bit+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef _LP64 sixtyfour bits #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "sixtyfour bits" >/dev/null 2>&1; then : gl_cv_solaris_64bit=yes else gl_cv_solaris_64bit=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5 $as_echo "$gl_cv_solaris_64bit" >&6; } if test $gl_cv_solaris_64bit = yes; then acl_libdirstem=lib/64 case "$host_cpu" in sparc*) acl_libdirstem2=lib/sparcv9 ;; i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; esac fi ;; *) searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; */../ | */.. ) # Better ignore directories of this form. They are misleading. ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi ;; esac test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libiconv-prefix was given. if test "${with_libiconv_prefix+set}" = set; then : withval=$with_libiconv_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" if test "$acl_libdirstem2" != "$acl_libdirstem" \ && ! test -d "$withval/$acl_libdirstem"; then additional_libdir="$withval/$acl_libdirstem2" fi fi fi fi LIBICONV= LTLIBICONV= INCICONV= LIBICONV_PREFIX= HAVE_LIBICONV= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='iconv ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" else : fi else found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$acl_hardcode_direct" = yes; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" else LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` if test "$name" = 'iconv'; then LIBICONV_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem2 | */$acl_libdirstem2/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` if test "$name" = 'iconv'; then LIBICONV_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" ;; esac done fi else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" done fi am_save_CPPFLAGS="$CPPFLAGS" for element in $INCICONV; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 $as_echo_n "checking for iconv... " >&6; } if ${am_cv_func_iconv+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_lib_iconv=yes am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 $as_echo "$am_cv_func_iconv" >&6; } if test "$am_cv_func_iconv" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 $as_echo_n "checking for working iconv... " >&6; } if ${am_cv_func_iconv_works+:} false; then : $as_echo_n "(cached) " >&6 else am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi if test "$cross_compiling" = yes; then : case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static const char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) return 1; } } /* Test against Solaris 10 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); if (cd_ascii_to_88591 != (iconv_t)(-1)) { static const char input[] = "\263"; char buf[10]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_ascii_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) return 1; } } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) return 1; } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ if (/* Try standardized names. */ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) /* Try IRIX, OSF/1 names. */ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) /* Try AIX names. */ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) /* Try HP-UX names. */ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) return 1; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : am_cv_func_iconv_works=yes else am_cv_func_iconv_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi LIBS="$am_save_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 $as_echo "$am_cv_func_iconv_works" >&6; } case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then $as_echo "#define HAVE_ICONV 1" >>confdefs.h fi if test "$am_cv_lib_iconv" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 $as_echo_n "checking how to link with libiconv... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 $as_echo "$LIBICONV" >&6; } else CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi if test "$am_cv_func_iconv" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 $as_echo_n "checking for iconv declaration... " >&6; } if ${am_cv_proto_iconv+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : am_cv_proto_iconv_arg1="" else am_cv_proto_iconv_arg1="const" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" fi am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_proto_iconv" >&5 $as_echo " $am_cv_proto_iconv" >&6; } cat >>confdefs.h <<_ACEOF #define ICONV_CONST $am_cv_proto_iconv_arg1 _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building on FreeBSD" >&5 $as_echo_n "checking if building on FreeBSD... " >&6; } if test `uname -s` = "FreeBSD" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } CPPFLAGS="$CFLAGS -I/usr/local/include" LDFLAGS="$LDFLAGS -L/usr/local/lib" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building on NetBSD" >&5 $as_echo_n "checking if building on NetBSD... " >&6; } if test `uname -s` = "NetBSD" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } CPPFLAGS="$CFLAGS -I/usr/pkg/include/" LDFLAGS="$LDFLAGS -L/usr/pkg/lib/" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AS"; then ac_cv_prog_AS="$AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AS="${ac_tool_prefix}as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AS=$ac_cv_prog_AS if test -n "$AS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 $as_echo "$AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AS"; then ac_ct_AS=$AS # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AS"; then ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AS="as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AS=$ac_cv_prog_ac_ct_AS if test -n "$ac_ct_AS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 $as_echo "$ac_ct_AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AS" = x; then AS="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AS=$ac_ct_AS fi else AS="$ac_cv_prog_AS" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi ;; esac test -z "$AS" && AS=as test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$OBJDUMP" && OBJDUMP=objdump case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4' macro_revision='1.3293' ltmain="$ac_aux_dir/ltmain.sh" # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case "$ECHO" in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test "$GCC" != yes; then reload_cmds=false fi ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 $as_echo "${with_sysroot}" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done # Set options enable_dlopen=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; pic_mode="$withval" else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' lt_prog_compiler_pic='-Xcompiler -fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ F* | *Sun*Fortran*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='${wl}--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld='-rpath $libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi link_all_deplibs=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test x"$lt_cv_prog_compiler__b" = xyes; then archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test "$lt_cv_irix_exported_symbol" = yes; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([A-Za-z]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) version_type=linux need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ac_config_commands="$ac_config_commands libtool" # Only expand once: # # Make libtool use --silent when --silent is passed to make # LIBTOOL="${LIBTOOL} \$(shell echo \"\$(MFLAGS)\" | awk '/^[^ ]*s/ { print \"--silent\" }')" GNOKII_LT_VERSION=$GNOKII_LT_VERSION_CURRENT:$GNOKII_LT_VERSION_REVISION:$GNOKII_LT_VERSION_AGE # As used in common/gnokii.h LIBGNOKII_VERSION_MAJOR=`expr $GNOKII_LT_VERSION_CURRENT - $GNOKII_LT_VERSION_AGE` LIBGNOKII_VERSION_MINOR=$GNOKII_LT_VERSION_AGE LIBGNOKII_VERSION_RELEASE=$GNOKII_LT_VERSION_REVISION LIBGNOKII_VERSION_STRING="$LIBGNOKII_VERSION_MAJOR.$LIBGNOKII_VERSION_MINOR.$LIBGNOKII_VERSION_RELEASE" cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF test x"$prefix" = xNONE && prefix="$ac_default_prefix" debug="yes" xdebug="yes" rlpdebug="yes" # Check whether --enable-fulldebug was given. if test "${enable_fulldebug+set}" = set; then : enableval=$enable_fulldebug; if test x$enable_fulldebug = xyes; then if test "x$GCC" = "xyes"; then CFLAGS="$CFLAGS -ggdb3 -Wall" fi fi fi debug="yes" # Check whether --enable-xdebug was given. if test "${enable_xdebug+set}" = set; then : enableval=$enable_xdebug; if test x$enable_xdebug = xno; then xdebug="no"; fi else xdebug="yes" fi # Check whether --enable-rlpdebug was given. if test "${enable_rlpdebug+set}" = set; then : enableval=$enable_rlpdebug; if test x$enable_rlpdebug = xno; then rlpdebug="no"; fi else rlpdebug="yes" fi if test $debug = "yes"; then $as_echo "#define DEBUG 1" >>confdefs.h fi if test $xdebug = "yes"; then $as_echo "#define XDEBUG 1" >>confdefs.h fi if test $rlpdebug = "yes"; then $as_echo "#define RLP_DEBUG 1" >>confdefs.h fi if test "x$GCC" = "xyes"; then CFLAGS="$CFLAGS -Wall" fi if test "x$GCC" = "xyes"; then OLD_CFLAGS="$CFLAGS" CFLAGS="-Wno-pointer-sign" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gcc supports $CFLAGS compiler option" >&5 $as_echo_n "checking if gcc supports $CFLAGS compiler option... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { int main() { return 0; } ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_have_no_pointer_sign=yes else ac_cv_have_no_pointer_sign=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_no_pointer_sign" >&5 $as_echo "$ac_cv_have_no_pointer_sign" >&6; } CFLAGS="-fvisibility=hidden" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gcc supports $CFLAGS compiler option" >&5 $as_echo_n "checking if gcc supports $CFLAGS compiler option... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { int main() { return 0; } ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_have_hidden_visibility=yes else ac_cv_have_hidden_visibility=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_hidden_visibility" >&5 $as_echo "$ac_cv_have_hidden_visibility" >&6; } CFLAGS="-fno-strict-aliasing" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gcc supports $CFLAGS compiler option" >&5 $as_echo_n "checking if gcc supports $CFLAGS compiler option... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { int main() { return 0; } ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_have_strict_aliasing=yes else ac_cv_have_strict_aliasing=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_strict_aliasing" >&5 $as_echo "$ac_cv_have_strict_aliasing" >&6; } CFLAGS="$OLD_CFLAGS" if test $ac_cv_have_no_pointer_sign = yes; then CFLAGS="$CFLAGS -Wno-pointer-sign" fi if test $ac_cv_have_hidden_visibility = yes; then CFLAGS="$CFLAGS -fvisibility=hidden" fi if test $ac_cv_have_strict_aliasing = yes; then CFLAGS="$CFLAGS -fno-strict-aliasing" fi fi # CFLAGS="$CFLAGS -DGNOKII_DEPRECATED=''" # Check whether --with-libpthread was given. if test "${with_libpthread+set}" = set; then : withval=$with_libpthread; if test x$withval = xyes then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Usage is: --with-libpthread=DIR" >&5 $as_echo "$as_me: WARNING: Usage is: --with-libpthread=DIR" >&2;} else PTHREAD_LIBS="-L$withval/lib/" PTHREAD_CFLAGS="-I$withval/include/" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu acx_pthread_ok=no # We used to check for pthread.h first, but this fails if pthread.h # requires special compiler flags (e.g. on True64 or Sequent). # It gets checked for in the link test anyway. # First of all, check if the user has set any of the PTHREAD_LIBS, # etcetera environment variables, and if threads linking works using # them: if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5 $as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_join (); int main () { return pthread_join (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : acx_pthread_ok=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5 $as_echo "$acx_pthread_ok" >&6; } if test x"$acx_pthread_ok" = xno; then PTHREAD_LIBS="" PTHREAD_CFLAGS="" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" fi # We must check for the threads library under a number of different # names; the ordering is very important because some systems # (e.g. DEC) have both -lpthread and -lpthreads, where one of the # libraries is broken (non-POSIX). # Create a list of thread flags to try. Items starting with a "-" are # C compiler flags, and other items are library names, except for "none" # which indicates that we try without any flags at all, and "pthread-config" # which is a program returning the flags for the Pth emulation library. acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" # The ordering *is* (sometimes) important. Some notes on the # individual items follow: # pthreads: AIX (must check this before -lpthread) # none: in case threads are in libc; should be tried before -Kthread and # other compiler flags to prevent continual compiler warnings # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) # -pthreads: Solaris/gcc # -mthreads: Mingw32/gcc, Lynx/gcc # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it # doesn't hurt to check since this sometimes defines pthreads too; # also defines -D_REENTRANT) # pthread: Linux, etcetera # --thread-safe: KAI C++ # pthread-config: use pthread-config program (for GNU Pth library) case "${host_cpu}-${host_os}" in *solaris*) # On Solaris (at least, for some versions), libc contains stubbed # (non-functional) versions of the pthreads routines, so link-based # tests will erroneously succeed. (We need to link with -pthread or # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather # a function called by this macro, so we could check for that, but # who knows whether they'll stub that too in a future libc.) So, # we'll just look for -pthreads and -lpthread first: acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags" ;; esac if test x"$acx_pthread_ok" = xno; then for flag in $acx_pthread_flags; do case $flag in none) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 $as_echo_n "checking whether pthreads work without any flags... " >&6; } ;; -*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5 $as_echo_n "checking whether pthreads work with $flag... " >&6; } PTHREAD_CFLAGS="$flag" ;; pthread-config) # Extract the first word of "pthread-config", so it can be a program name with args. set dummy pthread-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_acx_pthread_config+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$acx_pthread_config"; then ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_acx_pthread_config="yes" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no" fi fi acx_pthread_config=$ac_cv_prog_acx_pthread_config if test -n "$acx_pthread_config"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_config" >&5 $as_echo "$acx_pthread_config" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test x"$acx_pthread_config" = xno; then continue; fi PTHREAD_CFLAGS="`pthread-config --cflags`" PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5 $as_echo_n "checking for the pthreads library -l$flag... " >&6; } PTHREAD_LIBS="-l$flag" ;; esac save_LIBS="$LIBS" save_CFLAGS="$CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Check for various functions. We must include pthread.h, # since some functions may be macros. (On the Sequent, we # need a special flag -Kthread to make this header compile.) # We check for pthread_join because it is in -lpthread on IRIX # while pthread_create is in libc. We check for pthread_attr_init # due to DEC craziness with -lpthreads. We check for # pthread_cleanup_push because it is one of the few pthread # functions on Solaris that doesn't have a non-functional libc stub. # We try pthread_create on general principles. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { pthread_t th; pthread_join(th, 0); pthread_attr_init(0); pthread_cleanup_push(0, 0); pthread_create(0,0,0,0); pthread_cleanup_pop(0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : acx_pthread_ok=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5 $as_echo "$acx_pthread_ok" >&6; } if test "x$acx_pthread_ok" = xyes; then break; fi PTHREAD_LIBS="" PTHREAD_CFLAGS="" done fi # Various other checks: if test "x$acx_pthread_ok" = xyes; then save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Detect AIX lossage: threads are created detached by default # and the JOINABLE attribute has a nonstandard name (UNDETACHED). { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 $as_echo_n "checking for joinable pthread attribute... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int attr=PTHREAD_CREATE_JOINABLE; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ok=PTHREAD_CREATE_JOINABLE else ok=unknown fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test x"$ok" = xunknown; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int attr=PTHREAD_CREATE_UNDETACHED; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ok=PTHREAD_CREATE_UNDETACHED else ok=unknown fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then $as_echo "#define PTHREAD_CREATE_JOINABLE \$ok" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ok}" >&5 $as_echo "${ok}" >&6; } if test x"$ok" = xunknown; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: we do not know how to create joinable pthreads" >&5 $as_echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;} fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5 $as_echo_n "checking if more special flags are required for pthreads... " >&6; } flag=no case "${host_cpu}-${host_os}" in *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";; *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5 $as_echo "${flag}" >&6; } if test "x$flag" != xno; then PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" # More AIX lossage: must compile with cc_r # Extract the first word of "cc_r", so it can be a program name with args. set dummy cc_r; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_PTHREAD_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$PTHREAD_CC"; then ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_PTHREAD_CC="cc_r" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}" fi fi PTHREAD_CC=$ac_cv_prog_PTHREAD_CC if test -n "$PTHREAD_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 $as_echo "$PTHREAD_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else PTHREAD_CC="$CC" fi # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_pthread_ok" = xyes; then $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h : else acx_pthread_ok=no fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test "x$PTHREAD_CFLAGS" = "x-pthread"; then PTHREAD_LIBS="$PTHREAD_LIBS -pthread" fi if test "x$PTHREAD_LIBS" = xerror; then ac_fn_c_check_func "$LINENO" "pthread_attr_init" "ac_cv_func_pthread_attr_init" if test "x$ac_cv_func_pthread_attr_init" = xyes; then : PTHREAD_LIBS="" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: not found library: pthread!!!" >&5 $as_echo "$as_me: WARNING: not found library: pthread!!!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling xgnokii and smsd" >&5 $as_echo "$as_me: WARNING: disabling xgnokii and smsd" >&2;} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tm_gmtoff in struct tm" >&5 $as_echo_n "checking for tm_gmtoff in struct tm... " >&6; } if ${ac_cv_have_tm_gmtoff+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { struct tm t; t.tm_gmtoff = 0 ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_have_tm_gmtoff=yes else ac_cv_have_tm_gmtoff=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_tm_gmtoff" >&5 $as_echo "$ac_cv_have_tm_gmtoff" >&6; } if test $ac_cv_have_tm_gmtoff = yes; then $as_echo "#define HAVE_TM_GMTON 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for timer operations" >&5 $as_echo_n "checking for timer operations... " >&6; } if ${ac_cv_have_timeops+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { struct timeval tv; timerisset(&tv); timerclear(&tv); timercmp(&tv, &tv, <); timeradd(&tv, &tv, &tv); timersub(&tv, &tv, &tv); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_have_timeops=yes else ac_cv_have_timeops=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_timeops" >&5 $as_echo "$ac_cv_have_timeops" >&6; } if test $ac_cv_have_timeops = yes; then $as_echo "#define HAVE_TIMEOPS 1" >>confdefs.h fi have_termios="no" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cfsetspeed in termios.h" >&5 $as_echo_n "checking for cfsetspeed in termios.h... " >&6; } if ${ac_cv_have_cfsetspeed+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { struct termios t; cfsetspeed(&t, B9600); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_have_cfsetspeed=yes else ac_cv_have_cfsetspeed=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_cfsetspeed" >&5 $as_echo "$ac_cv_have_cfsetspeed" >&6; } if test $ac_cv_have_cfsetspeed = yes; then $as_echo "#define HAVE_CFSETSPEED 1" >>confdefs.h have_termios="yes" fi if test $have_termios = "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cfsetispeed and cfsetospeed in termios.h" >&5 $as_echo_n "checking for cfsetispeed and cfsetospeed in termios.h... " >&6; } if ${ac_cv_have_cfsetiospeed+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { struct termios t; cfsetispeed(&t, B9600); cfsetospeed(&t, B9600); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_have_cfsetiospeed=yes else ac_cv_have_cfsetiospeed=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_cfsetiospeed" >&5 $as_echo "$ac_cv_have_cfsetiospeed" >&6; } if test $ac_cv_have_cfsetiospeed = yes; then $as_echo "#define HAVE_CFSETISPEED 1" >>confdefs.h $as_echo "#define HAVE_CFSETOSPEED 1" >>confdefs.h have_termios="yes" fi fi if test $have_termios = "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for c_ispeed and c_ospeed in struct termios" >&5 $as_echo_n "checking for c_ispeed and c_ospeed in struct termios... " >&6; } if ${ac_cv_have_c_iospeed+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { struct termios t; t.c_iflag = B9600; t.c_oflag = B9600; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_have_c_iospeed=yes else ac_cv_have_c_iospeed=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_c_iospeed" >&5 $as_echo "$ac_cv_have_c_iospeed" >&6; } if test ac_cv_have_c_iospeed = yes; then $as_echo "#define HAVE_TERMIOS_CSPEED 1" >>confdefs.h fi fi # Readline included by default unless explicitly asked not to test "${with_readline+set}" != "set" && with_readline=yes USE_READLINE="no" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use readline" >&5 $as_echo_n "checking whether to use readline... " >&6; } # Check whether --with-readline was given. if test "${with_readline+set}" = set; then : withval=$with_readline; case "$with_readline" in yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } for ac_header in readline.h history.h readline/readline.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in readline/history.h do : ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default" if test "x$ac_cv_header_readline_history_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_READLINE_HISTORY_H 1 _ACEOF fi done for ac_header in readline.h readline/readline.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF for termlib in ncurses curses termcap terminfo termlib; do as_ac_Lib=`$as_echo "ac_cv_lib_${termlib}''_tgetent" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -l${termlib}" >&5 $as_echo_n "checking for tgetent in -l${termlib}... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l${termlib} $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char tgetent (); int main () { return tgetent (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : TERMLIBS="-l${termlib}"; break fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5 $as_echo_n "checking for readline in -lreadline... " >&6; } if ${ac_cv_lib_readline_readline+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline $TERMLIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char readline (); int main () { return readline (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_readline_readline=yes else ac_cv_lib_readline_readline=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5 $as_echo "$ac_cv_lib_readline_readline" >&6; } if test "x$ac_cv_lib_readline_readline" = xyes; then : TERMLIBS="-lreadline $TERMLIBS" $as_echo "#define HAVE_READLINE 1" >>confdefs.h USE_READLINE="yes" break else TERMLIBS= fi fi done ;; no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at # alternate readline path _ldflags=${LDFLAGS} _cppflags=${CPPFLAGS} # Add additional search path LDFLAGS="-L$with_readline/lib $LDFLAGS" CPPFLAGS="-I$with_readline/include $CPPFLAGS" for ac_header in readline.h history.h readline/readline.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in readline/history.h do : ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default" if test "x$ac_cv_header_readline_history_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_READLINE_HISTORY_H 1 _ACEOF fi done for ac_header in readline.h readline/readline.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF for termlib in ncurses curses termcap terminfo termlib; do as_ac_Lib=`$as_echo "ac_cv_lib_${termlib}''_tgetent" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -l${termlib}" >&5 $as_echo_n "checking for tgetent in -l${termlib}... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l${termlib} $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char tgetent (); int main () { return tgetent (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : TERMLIBS="-l${termlib}"; break fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5 $as_echo_n "checking for readline in -lreadline... " >&6; } if ${ac_cv_lib_readline_readline+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline $TERMLIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char readline (); int main () { return readline (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_readline_readline=yes else ac_cv_lib_readline_readline=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5 $as_echo "$ac_cv_lib_readline_readline" >&6; } if test "x$ac_cv_lib_readline_readline" = xyes; then : TERMLDFLAGS="-L$with_readline/lib" TERMCPPFLAGS="-I$with_readline/include" CPPFLAGS="-I$with_readline/include $CPPFLAGS" TERMLIBS="-lreadline $TERMLIBS" $as_echo "#define HAVE_READLINE 1" >>confdefs.h USE_READLINE="yes" break else TERMLIBS= CPPFLAGS=$_cppflags fi fi done LDFLAGS=$_ldflags ;; esac else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Check whether --with-libical was given. if test "${with_libical+set}" = set; then : withval=$with_libical; if test x$withval = xyes then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Usage is: --with-libical=DIR" >&5 $as_echo "$as_me: WARNING: Usage is: --with-libical=DIR" >&2;} else ICAL_LIBS="-L$withval/lib/" ICAL_CFLAGS="-I$withval/include/" fi fi USE_LIBICAL="no" # Check whether --enable-libical was given. if test "${enable_libical+set}" = set; then : enableval=$enable_libical; else enable_libical=yes fi if test "$enable_libical" = "yes"; then ICAL_LIBS="$ICAL_LIBS -lpthread -lical" OLD_CFLAGS="$CFLAGS" OLD_LIBS="$LIBS" LIBS="$LIBS $ICAL_LIBS" CFLAGS="$CFLAGS $ICAL_CFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libical is installed" >&5 $as_echo_n "checking whether libical is installed... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int priority; icalcomponent *pIcal=NULL; struct icaltimetype atime = icaltime_from_string("20031231T223000"); pIcal = icalcomponent_vanew( ICAL_VCALENDAR_COMPONENT, icalproperty_new_version("2.0"), icalproperty_new_prodid("//Gnokii.org//NONSGML v.0.5.8"), 0 ); atime.is_daylight = 1; priority = icalproperty_get_priority(icalcomponent_get_first_property(pIcal, ICAL_PRIORITY_PROPERTY)); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } USE_LIBICAL="yes" $as_echo "#define HAVE_LIBICAL 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ICAL_LIBS="" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$OLD_LIBS" CFLAGS="$OLD_CFLAGS" fi USE_LIBUSB="no" # Check whether --enable-libusb was given. if test "${enable_libusb+set}" = set; then : enableval=$enable_libusb; else enable_libusb=yes fi if test "$enable_libusb" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libusb is installed" >&5 $as_echo_n "checking whether libusb is installed... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { struct usb_dev_handle *dev; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_LIBUSB 1" >>confdefs.h USE_LIBUSB="yes" USB_LIBS="-lusb" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi USE_SOCKETPHONET="no" # Check whether --enable-phonet was given. if test "${enable_phonet+set}" = set; then : enableval=$enable_phonet; else enable_phonet=yes fi if test "$enable_phonet" = "yes"; then ac_fn_c_check_header_compile "$LINENO" "linux/phonet.h" "ac_cv_header_linux_phonet_h" "#include #include " if test "x$ac_cv_header_linux_phonet_h" = xyes; then : $as_echo "#define HAVE_SOCKETPHONET 1" >>confdefs.h USE_SOCKETPHONET="yes" fi fi ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" if test "x$ac_cv_func_gethostbyname" = xyes; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; } if ${ac_cv_lib_nsl_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_nsl_gethostbyname=yes else ac_cv_lib_nsl_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then : TCP_LIBS="-lnsl" fi fi ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" if test "x$ac_cv_func_gethostbyname" = xyes; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnetwork" >&5 $as_echo_n "checking for gethostbyname in -lnetwork... " >&6; } if ${ac_cv_lib_network_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnetwork $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_network_gethostbyname=yes else ac_cv_lib_network_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_gethostbyname" >&5 $as_echo "$ac_cv_lib_network_gethostbyname" >&6; } if test "x$ac_cv_lib_network_gethostbyname" = xyes; then : TCP_LIBS="-lnetwork" fi fi USE_IRDA="no" # Check whether --enable-irda was given. if test "${enable_irda+set}" = set; then : enableval=$enable_irda; else enable_irda=yes fi if test "$enable_irda" = "yes"; then ac_fn_c_check_header_compile "$LINENO" "linux/irda.h" "ac_cv_header_linux_irda_h" "#include #include #include " if test "x$ac_cv_header_linux_irda_h" = xyes; then : $as_echo "#define HAVE_IRDA 1" >>confdefs.h USE_IRDA="yes" fi fi # Check whether --with-gettext was given. if test "${with_gettext+set}" = set; then : withval=$with_gettext; if test x$withval = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Usage is: --with-gettext=DIR" >&5 $as_echo "$as_me: WARNING: Usage is: --with-gettext=DIR" >&2;} else CFLAGS="$CFLAGS -I$withval" fi fi USE_BLUETOOTH="no" # Check whether --with-bluetooth was given. if test "${with_bluetooth+set}" = set; then : withval=$with_bluetooth; if test x$withval = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Usage is: --with-bluetooth=DIR" >&5 $as_echo "$as_me: WARNING: Usage is: --with-bluetooth=DIR" >&2;} else LIBS="$LIBS -L$withval/lib" CFLAGS="$CFLAGS -I$withval/net -I$withval/" fi fi # Check whether --enable-bluetooth was given. if test "${enable_bluetooth+set}" = set; then : enableval=$enable_bluetooth; else enable_bluetooth=yes fi if test `uname -s` = "Linux" ; then if test "$enable_bluetooth" = "yes" -a "$USE_BLUETOOTH" = "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux Bluetooth support" >&5 $as_echo "$as_me: checking for the Linux Bluetooth support" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the struct sockaddr_rc in " >&5 $as_echo_n "checking for the struct sockaddr_rc in ... " >&6; } if ${ac_cv_have_sockaddr_rc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { struct sockaddr_rc rc; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_have_sockaddr_rc=yes else ac_cv_have_sockaddr_rc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_sockaddr_rc" >&5 $as_echo "$ac_cv_have_sockaddr_rc" >&6; } if test $ac_cv_have_sockaddr_rc = yes; then $as_echo "#define HAVE_BLUETOOTH 1" >>confdefs.h $as_echo "#define HAVE_BLUETOOTH_BLUEZ /**/" >>confdefs.h USE_BLUETOOTH="yes" BLUETOOTH_LIBS="-lbluetooth" fi fi fi if test `uname -s` = "Darwin" ; then if test "$enable_bluetooth" = "yes" -a "$USE_BLUETOOTH" = "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the MacOS X Bluetooth support" >&5 $as_echo "$as_me: checking for the MacOS X Bluetooth support" >&6;} for ac_header in CoreFoundation/CoreFoundation.h do : ac_fn_c_check_header_mongrel "$LINENO" "CoreFoundation/CoreFoundation.h" "ac_cv_header_CoreFoundation_CoreFoundation_h" "$ac_includes_default" if test "x$ac_cv_header_CoreFoundation_CoreFoundation_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_COREFOUNDATION_COREFOUNDATION_H 1 _ACEOF fi done for ac_header in IOBluetooth/Bluetooth.h do : ac_fn_c_check_header_mongrel "$LINENO" "IOBluetooth/Bluetooth.h" "ac_cv_header_IOBluetooth_Bluetooth_h" "$ac_includes_default" if test "x$ac_cv_header_IOBluetooth_Bluetooth_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_IOBLUETOOTH_BLUETOOTH_H 1 _ACEOF fi done for ac_header in IOBluetooth/IOBluetoothUserLib.h do : ac_fn_c_check_header_compile "$LINENO" "IOBluetooth/IOBluetoothUserLib.h" "ac_cv_header_IOBluetooth_IOBluetoothUserLib_h" "#ifdef HAVE_COREFOUNDATION_COREFOUNDATION_H # include #endif #ifdef HAVE_IOBLUETOOTH_BLUETOOTH_H # include #endif " if test "x$ac_cv_header_IOBluetooth_IOBluetoothUserLib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_IOBLUETOOTH_IOBLUETOOTHUSERLIB_H 1 _ACEOF fi done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { CFStringRef strDevice; strDevice = CFStringCreateWithCString(NULL, NULL, NULL); IOBluetoothNSStringToDeviceAddress(NULL, NULL); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_have_iobluetooth=yes else ac_cv_have_iobluetooth=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_have_iobluetooth = yes; then $as_echo "#define HAVE_BLUETOOTH 1" >>confdefs.h $as_echo "#define HAVE_BLUETOOTH_MACOSX /**/" >>confdefs.h USE_BLUETOOTH="yes" BLUETOOTH_LIBS="$PTHREAD_LIBS -Wl,-framework,CoreFoundation -Wl,-framework,IOBluetooth -Wl,-framework,Foundation" fi fi fi if test `uname -s` = "FreeBSD" ; then if test "$enable_bluetooth" = "yes" -a "$USE_BLUETOOTH" = "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the FreeBSD/netgraph Bluetooth support" >&5 $as_echo "$as_me: checking for the FreeBSD/netgraph Bluetooth support" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the struct sockaddr_rfcomm from " >&5 $as_echo_n "checking for the struct sockaddr_rfcomm from ... " >&6; } if ${ac_cv_have_sockaddr_rfcomm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { struct sockaddr_rfcomm rc; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_have_sockaddr_rfcomm=yes else ac_cv_have_sockaddr_rfcomm=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_sockaddr_rfcomm" >&5 $as_echo "$ac_cv_have_sockaddr_rfcomm" >&6; } if test $ac_cv_have_sockaddr_rfcomm = yes; then $as_echo "#define HAVE_BLUETOOTH 1" >>confdefs.h $as_echo "#define HAVE_BLUETOOTH_NETGRAPH /**/" >>confdefs.h USE_BLUETOOTH="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bt_aton in -lbluetooth" >&5 $as_echo_n "checking for bt_aton in -lbluetooth... " >&6; } if ${ac_cv_lib_bluetooth_bt_aton+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbluetooth $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char bt_aton (); int main () { return bt_aton (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bluetooth_bt_aton=yes else ac_cv_lib_bluetooth_bt_aton=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bluetooth_bt_aton" >&5 $as_echo "$ac_cv_lib_bluetooth_bt_aton" >&6; } if test "x$ac_cv_lib_bluetooth_bt_aton" = xyes; then : BLUETOOTH_LIBS="-lbluetooth" ac_cv_have_bt_lib=yes else ac_cv_have_bt_lib=no fi if test $ac_cv_have_bt_lib = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdp_open in -lsdp" >&5 $as_echo_n "checking for sdp_open in -lsdp... " >&6; } if ${ac_cv_lib_sdp_sdp_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsdp $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sdp_open (); int main () { return sdp_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_sdp_sdp_open=yes else ac_cv_lib_sdp_sdp_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sdp_sdp_open" >&5 $as_echo "$ac_cv_lib_sdp_sdp_open" >&6; } if test "x$ac_cv_lib_sdp_sdp_open" = xyes; then : BLUETOOTH_LIBS="$BLUETOOTH_LIBS -lsdp" fi fi fi fi fi if test `uname -s` = "NetBSD" ; then if test "$enable_bluetooth" = "yes" -a "$USE_BLUETOOTH" = "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the NetBSD/netbt Bluetooth support" >&5 $as_echo "$as_me: checking for the NetBSD/netbt Bluetooth support" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the struct sockaddr_bt from " >&5 $as_echo_n "checking for the struct sockaddr_bt from ... " >&6; } if ${ac_cv_have_sockaddr_bt+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { struct sockaddr_bt rc; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_have_sockaddr_bt=yes else ac_cv_have_sockaddr_bt=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_sockaddr_bt" >&5 $as_echo "$ac_cv_have_sockaddr_bt" >&6; } if test $ac_cv_have_sockaddr_bt = yes; then $as_echo "#define HAVE_BLUETOOTH 1" >>confdefs.h $as_echo "#define HAVE_BLUETOOTH_NETBT /**/" >>confdefs.h USE_BLUETOOTH="yes" CFLAGS="$CFLAGS -DCOMPAT_BLUEZ" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bt_aton in -lbluetooth" >&5 $as_echo_n "checking for bt_aton in -lbluetooth... " >&6; } if ${ac_cv_lib_bluetooth_bt_aton+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbluetooth $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char bt_aton (); int main () { return bt_aton (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bluetooth_bt_aton=yes else ac_cv_lib_bluetooth_bt_aton=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bluetooth_bt_aton" >&5 $as_echo "$ac_cv_lib_bluetooth_bt_aton" >&6; } if test "x$ac_cv_lib_bluetooth_bt_aton" = xyes; then : BLUETOOTH_LIBS="-lbluetooth" ac_cv_have_bt_lib=yes else ac_cv_have_bt_lib=no fi if test $ac_cv_have_bt_lib = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdp_open in -lsdp" >&5 $as_echo_n "checking for sdp_open in -lsdp... " >&6; } if ${ac_cv_lib_sdp_sdp_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsdp $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sdp_open (); int main () { return sdp_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_sdp_sdp_open=yes else ac_cv_lib_sdp_sdp_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sdp_sdp_open" >&5 $as_echo "$ac_cv_lib_sdp_sdp_open" >&6; } if test "x$ac_cv_lib_sdp_sdp_open" = xyes; then : BLUETOOTH_LIBS="$BLUETOOTH_LIBS -lsdp" fi fi fi fi fi if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK" >&5 $as_echo_n "checking for GTK... " >&6; } if test -n "$GTK_CFLAGS"; then pkg_cv_GTK_CFLAGS="$GTK_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GTK_LIBS"; then pkg_cv_GTK_LIBS="$GTK_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gtk+-2.0 >= 2.0" 2>&1` else GTK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gtk+-2.0 >= 2.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GTK_PKG_ERRORS" >&5 found_gtk=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } found_gtk=no else GTK_CFLAGS=$pkg_cv_GTK_CFLAGS GTK_LIBS=$pkg_cv_GTK_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } found_gtk=yes fi if test "$no_x" = yes -o "$with_x" = "no"; then x_support="no" XPM_CFLAGS="" XPM_LIBS="" GTK_CFLAGS="" GTK_LIBS="" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 $as_echo_n "checking for X... " >&6; } # Check whether --with-x was given. if test "${with_x+set}" = set; then : withval=$with_x; fi # $have_x is `yes', `no', `disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else case $x_includes,$x_libraries in #( *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : $as_echo_n "(cached) " >&6 else # One or both of the vars are not set, and there is no cached value. ac_x_includes=no ac_x_libraries=no rm -f -r conftest.dir if mkdir conftest.dir; then cd conftest.dir cat >Imakefile <<'_ACEOF' incroot: @echo incroot='${INCROOT}' usrlibdir: @echo usrlibdir='${USRLIBDIR}' libdir: @echo libdir='${LIBDIR}' _ACEOF if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. for ac_var in incroot usrlibdir libdir; do eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" done # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. for ac_extension in a so sl dylib la dll; do if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && test -f "$ac_im_libdir/libX11.$ac_extension"; then ac_im_usrlibdir=$ac_im_libdir; break fi done # Screen out bogus values from the imake configuration. They are # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. case $ac_im_incroot in /usr/include) ac_x_includes= ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; esac case $ac_im_usrlibdir in /usr/lib | /usr/lib64 | /lib | /lib64) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; esac fi cd .. rm -f -r conftest.dir fi # Standard set of common directories for X headers. # Check X11 before X11Rn because it is often a symlink to the current release. ac_x_header_dirs=' /usr/X11/include /usr/X11R7/include /usr/X11R6/include /usr/X11R5/include /usr/X11R4/include /usr/include/X11 /usr/include/X11R7 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 /usr/local/X11/include /usr/local/X11R7/include /usr/local/X11R6/include /usr/local/X11R5/include /usr/local/X11R4/include /usr/local/include/X11 /usr/local/include/X11R7 /usr/local/include/X11R6 /usr/local/include/X11R5 /usr/local/include/X11R4 /usr/X386/include /usr/x386/include /usr/XFree86/include/X11 /usr/include /usr/local/include /usr/unsupported/include /usr/athena/include /usr/local/x11r5/include /usr/lpp/Xamples/include /usr/openwin/include /usr/openwin/share/include' if test "$ac_x_includes" = no; then # Guess where to find include files, by looking for Xlib.h. # First, try using that file with no special directory specified. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # We can compile using X headers with no special include directory. ac_x_includes= else for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir break fi done fi rm -f conftest.err conftest.i conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then # Check for the libraries. # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS LIBS="-lX11 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { XrmInitialize () ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= else LIBS=$ac_save_LIBS for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! for ac_extension in a so sl dylib la dll; do if test -r "$ac_dir/libX11.$ac_extension"; then ac_x_libraries=$ac_dir break 2 fi done done fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no case $ac_x_includes,$ac_x_libraries in #( no,* | *,no | *\'*) # Didn't find X, or a directory has "'" in its name. ac_cv_have_x="have_x=no";; #( *) # Record where we found X for the cache. ac_cv_have_x="have_x=yes\ ac_x_includes='$ac_x_includes'\ ac_x_libraries='$ac_x_libraries'" esac fi ;; #( *) have_x=yes;; esac eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 $as_echo "$have_x" >&6; } no_x=yes else # If each of the values was on the command line, it overrides each guess. test "x$x_includes" = xNONE && x_includes=$ac_x_includes test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes\ ac_x_includes='$x_includes'\ ac_x_libraries='$x_libraries'" { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 $as_echo "libraries $x_libraries, headers $x_includes" >&6; } fi if test "x$x_libraries" = "xNONE"; then x_support="no" XPM_CFLAGS="" XPM_LIBS="" GTK_CFLAGS="" GTK_LIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find library libX11." >&5 $as_echo "$as_me: WARNING: Cannot find library libX11." >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling xgnokii." >&5 $as_echo "$as_me: WARNING: Disabling xgnokii." >&2;} else if test "x$x_includes" != "x"; then XINCL="-I$x_includes" else XINCL="" fi if test "x$x_libraries" != "x"; then XLIBS="-L$x_libraries" else XLIBS="" fi CPPFLAGS="$CPPFLAGS $XINCL" for ac_header in X11/xpm.h do : ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default" if test "x$ac_cv_header_X11_xpm_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_X11_XPM_H 1 _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmWriteFileFromXpmImage in -lXpm" >&5 $as_echo_n "checking for XpmWriteFileFromXpmImage in -lXpm... " >&6; } if ${ac_cv_lib_Xpm_XpmWriteFileFromXpmImage+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXpm $XLIBS -lX11 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char XpmWriteFileFromXpmImage (); int main () { return XpmWriteFileFromXpmImage (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_Xpm_XpmWriteFileFromXpmImage=yes else ac_cv_lib_Xpm_XpmWriteFileFromXpmImage=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmWriteFileFromXpmImage" >&5 $as_echo "$ac_cv_lib_Xpm_XpmWriteFileFromXpmImage" >&6; } if test "x$ac_cv_lib_Xpm_XpmWriteFileFromXpmImage" = xyes; then : XPM_CFLAGS="$XINCL" XPM_LIBS="$XLIBS -lXpm -lX11" $as_echo "#define XPM 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot found library libXpm - disabling XPM support." >&5 $as_echo "$as_me: WARNING: Cannot found library libXpm - disabling XPM support." >&2;} fi fi done if test "x$PTHREAD_LIBS" = xerror; then x_support="no" GTK_CFLAGS="" GTK_LIBS="" else if test "$found_gtk" = no; then x_support="no" GTK_CFLAGS="" GTK_LIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find GTK+ 2.0." >&5 $as_echo "$as_me: WARNING: Cannot find GTK+ 2.0." >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling xgnokii." >&5 $as_echo "$as_me: WARNING: Disabling xgnokii." >&2;} else x_support="yes" fi fi fi fi if test "x$_support" = "xyes"; then XGNOKII_TRUE= XGNOKII_FALSE='#' else XGNOKII_TRUE='#' XGNOKII_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 $as_echo_n "checking for socket in -lsocket... " >&6; } if ${ac_cv_lib_socket_socket+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char socket (); int main () { return socket (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_socket=yes else ac_cv_lib_socket_socket=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 $as_echo "$ac_cv_lib_socket_socket" >&6; } if test "x$ac_cv_lib_socket_socket" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSOCKET 1 _ACEOF LIBS="-lsocket $LIBS" fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB" >&5 $as_echo_n "checking for GLIB... " >&6; } if test -n "$GLIB_CFLAGS"; then pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GLIB_LIBS"; then pkg_cv_GLIB_LIBS="$GLIB_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0" 2>&1` else GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GLIB_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (glib-2.0) were not met: $GLIB_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GLIB_CFLAGS and GLIB_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GLIB_CFLAGS and GLIB_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else GLIB_CFLAGS=$pkg_cv_GLIB_CFLAGS GLIB_LIBS=$pkg_cv_GLIB_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GMODULE" >&5 $as_echo_n "checking for GMODULE... " >&6; } if test -n "$GMODULE_CFLAGS"; then pkg_cv_GMODULE_CFLAGS="$GMODULE_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gmodule-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gmodule-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GMODULE_CFLAGS=`$PKG_CONFIG --cflags "gmodule-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GMODULE_LIBS"; then pkg_cv_GMODULE_LIBS="$GMODULE_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gmodule-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gmodule-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GMODULE_LIBS=`$PKG_CONFIG --libs "gmodule-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GMODULE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gmodule-2.0" 2>&1` else GMODULE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gmodule-2.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GMODULE_PKG_ERRORS" >&5 found_gmodule=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } found_gmodule=no else GMODULE_CFLAGS=$pkg_cv_GMODULE_CFLAGS GMODULE_LIBS=$pkg_cv_GMODULE_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } found_gmodule=yes fi # Check whether --enable-smsd was given. if test "${enable_smsd+set}" = set; then : enableval=$enable_smsd; else enable_smsd=yes fi if test "$enable_smsd" = yes; then if test "$found_gmodule" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find gmodule 2.0." >&5 $as_echo "$as_me: WARNING: Cannot find gmodule 2.0." >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling smsd." >&5 $as_echo "$as_me: WARNING: Disabling smsd." >&2;} enable_smsd="no" fi fi if test "x$enable_smsd" = "xyes"; then SMSD_TRUE= SMSD_FALSE='#' else SMSD_TRUE='#' SMSD_FALSE= fi # Check whether --enable-postgres was given. if test "${enable_postgres+set}" = set; then : enableval=$enable_postgres; enable_postgres=$enableval else enable_postgres=yes fi have_postgres=no # Extract the first word of "pg_config", so it can be a program name with args. set dummy pg_config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PGCONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PGCONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PGCONFIG="$PGCONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PGCONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_PGCONFIG" && ac_cv_path_PGCONFIG="no" ;; esac fi PGCONFIG=$ac_cv_path_PGCONFIG if test -n "$PGCONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PGCONFIG" >&5 $as_echo "$PGCONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test x$enable_postgres != xno && test x$PGCONFIG != xno ; then have_postgres=yes pg_libdir=`$PGCONFIG --libdir` POSTGRES_LIBS="-L$pg_libdir -lpq" pg_includedir=`$PGCONFIG --includedir` POSTGRES_CFLAGS="-I$pg_includedir" fi if test "x$have_postgres" = "xyes"; then HAVE_POSTGRES_TRUE= HAVE_POSTGRES_FALSE='#' else HAVE_POSTGRES_TRUE='#' HAVE_POSTGRES_FALSE= fi # Check whether --enable-sqlite was given. if test "${enable_sqlite+set}" = set; then : enableval=$enable_sqlite; enable_sqlite=$enableval else enable_sqlite=yes fi have_sqlite=no pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLITE3" >&5 $as_echo_n "checking for SQLITE3... " >&6; } if test -n "$SQLITE3_CFLAGS"; then pkg_cv_SQLITE3_CFLAGS="$SQLITE3_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sqlite3\""; } >&5 ($PKG_CONFIG --exists --print-errors "sqlite3") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SQLITE3_CFLAGS=`$PKG_CONFIG --cflags "sqlite3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$SQLITE3_LIBS"; then pkg_cv_SQLITE3_LIBS="$SQLITE3_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sqlite3\""; } >&5 ($PKG_CONFIG --exists --print-errors "sqlite3") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SQLITE3_LIBS=`$PKG_CONFIG --libs "sqlite3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then SQLITE3_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "sqlite3" 2>&1` else SQLITE3_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "sqlite3" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$SQLITE3_PKG_ERRORS" >&5 have_sqlite=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } have_sqlite=no else SQLITE3_CFLAGS=$pkg_cv_SQLITE3_CFLAGS SQLITE3_LIBS=$pkg_cv_SQLITE3_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } have_sqlite=yes fi if test x$enable_sqlite != xno && test x$PKGCONF != xno ; then SQLITE_LIBS=SQLITE3_LIBS fi if test "x$have_sqlite" = "xyes"; then HAVE_SQLITE_TRUE= HAVE_SQLITE_FALSE='#' else HAVE_SQLITE_TRUE='#' HAVE_SQLITE_FALSE= fi # Check whether --enable-mysql was given. if test "${enable_mysql+set}" = set; then : enableval=$enable_mysql; enable_mysql=$enableval else enable_mysql=yes fi have_mysql=no # Extract the first word of "mysql_config5", so it can be a program name with args. set dummy mysql_config5; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_MYSQLCONFIG5+:} false; then : $as_echo_n "(cached) " >&6 else case $MYSQLCONFIG5 in [\\/]* | ?:[\\/]*) ac_cv_path_MYSQLCONFIG5="$MYSQLCONFIG5" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_MYSQLCONFIG5="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_MYSQLCONFIG5" && ac_cv_path_MYSQLCONFIG5="no" ;; esac fi MYSQLCONFIG5=$ac_cv_path_MYSQLCONFIG5 if test -n "$MYSQLCONFIG5"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MYSQLCONFIG5" >&5 $as_echo "$MYSQLCONFIG5" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test x$MYSQLCONFIG5 = xno ; then # Extract the first word of "mysql_config", so it can be a program name with args. set dummy mysql_config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_MYSQLCONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $MYSQLCONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_MYSQLCONFIG="$MYSQLCONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_MYSQLCONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_MYSQLCONFIG" && ac_cv_path_MYSQLCONFIG="no" ;; esac fi MYSQLCONFIG=$ac_cv_path_MYSQLCONFIG if test -n "$MYSQLCONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MYSQLCONFIG" >&5 $as_echo "$MYSQLCONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MYSQLCONFIG=$MYSQLCONFIG5 fi if test x$enable_mysql != xno && test x$MYSQLCONFIG != xno ; then have_mysql=yes MYSQL_LIBS=`$MYSQLCONFIG --libs` MYSQL_CFLAGS=`$MYSQLCONFIG --cflags` fi if test "x$have_mysql" = "xyes"; then HAVE_MYSQL_TRUE= HAVE_MYSQL_FALSE='#' else HAVE_MYSQL_TRUE='#' HAVE_MYSQL_FALSE= fi # Check whether --enable-security was given. if test "${enable_security+set}" = set; then : enableval=$enable_security; if test x$enable_security = xyes; then $as_echo "#define SECURITY 1" >>confdefs.h security="yes" else security="no" fi else security="no" fi USE_LIBPCSCLITE="no" # Check whether --enable-libpcsclite was given. if test "${enable_libpcsclite+set}" = set; then : enableval=$enable_libpcsclite; else enable_libpcsclite=yes fi if test "$enable_libpcsclite" = "yes"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBPCSCLITE" >&5 $as_echo_n "checking for LIBPCSCLITE... " >&6; } if test -n "$LIBPCSCLITE_CFLAGS"; then pkg_cv_LIBPCSCLITE_CFLAGS="$LIBPCSCLITE_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpcsclite >= 1.3.1\""; } >&5 ($PKG_CONFIG --exists --print-errors "libpcsclite >= 1.3.1") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBPCSCLITE_CFLAGS=`$PKG_CONFIG --cflags "libpcsclite >= 1.3.1" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBPCSCLITE_LIBS"; then pkg_cv_LIBPCSCLITE_LIBS="$LIBPCSCLITE_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpcsclite >= 1.3.1\""; } >&5 ($PKG_CONFIG --exists --print-errors "libpcsclite >= 1.3.1") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBPCSCLITE_LIBS=`$PKG_CONFIG --libs "libpcsclite >= 1.3.1" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBPCSCLITE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libpcsclite >= 1.3.1" 2>&1` else LIBPCSCLITE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libpcsclite >= 1.3.1" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBPCSCLITE_PKG_ERRORS" >&5 USE_LIBPCSCLITE=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } USE_LIBPCSCLITE=no else LIBPCSCLITE_CFLAGS=$pkg_cv_LIBPCSCLITE_CFLAGS LIBPCSCLITE_LIBS=$pkg_cv_LIBPCSCLITE_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } USE_LIBPCSCLITE=yes fi if test "$USE_LIBPCSCLITE" = yes; then $as_echo "#define HAVE_PCSC 1" >>confdefs.h OLD_CFLAGS="$CFLAGS" CFLAGS="$LIBPCSCLITE_CFLAGS $OLD_CFLAGS" ac_fn_c_check_type "$LINENO" "LPCSTR" "ac_cv_type_LPCSTR" "#include " if test "x$ac_cv_type_LPCSTR" = xyes; then : $as_echo "#define HAVE_LPCSTR 1" >>confdefs.h fi CFLAGS="$OLD_CFLAGS" fi fi # Check whether --enable-win was given. if test "${enable_win+set}" = set; then : enableval=$enable_win; if test x$enable_win32 = xyes; then $as_echo "#define WIN32 1" >>confdefs.h WIN32=1 if test x$cross_compiling = xyes; then $as_echo "#define WIN32_CROSS 1" >>confdefs.h WIN32_CROSS=1 win32="cross" else win32="yes" fi ac_fn_c_check_header_mongrel "$LINENO" "af_irda.h" "ac_cv_header_af_irda_h" "$ac_includes_default" if test "x$ac_cv_header_af_irda_h" = xyes; then : $as_echo "#define HAVE_IRDA 1" >>confdefs.h USE_IRDA="yes" fi else win32="no" fi else win32="no" fi if test "x$WIN32" = "x1"; then WIN32_TRUE= WIN32_FALSE='#' else WIN32_TRUE='#' WIN32_FALSE= fi # Check whether --enable-unix98test was given. if test "${enable_unix98test+set}" = set; then : enableval=$enable_unix98test; if test x$enable_unix98test = xno; then unix98test="no" else unix98test="yes" fi else unix98test="yes" fi if test x$unix98test = xyes; then ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt" if test "x$ac_cv_func_grantpt" = xyes; then : if test "$cross_compiling" = yes; then : have_unix98=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _XOPEN_SOURCE 500 #include #include #include #include #include int main() { char *name = NULL; int master, err; master = open("/dev/ptmx", O_RDWR | O_NOCTTY | O_NONBLOCK); if (master >= 0) { err = grantpt(master); err = err || unlockpt(master); if (!err) { name = ptsname(master); } else { exit(-1); } } else { exit(-1); } close(master); exit(0); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : have_unix98=yes else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"No unix98ptys\"" >&5 $as_echo "$as_me: WARNING: \"No unix98ptys\"" >&2;} fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi if test x$have_unix98 = xyes; then $as_echo "#define USE_UNIX98PTYS 1" >>confdefs.h fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _XOPEN_SOURCE 500 #include #include int main () { struct msghdr msg; msg.msg_control; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE_MSGHDR_MSG_CONTROL 1" >>confdefs.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } if ${ac_cv_header_stdbool_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef bool "error: bool is not defined" #endif #ifndef false "error: false is not defined" #endif #if false "error: false is not 0" #endif #ifndef true "error: true is not defined" #endif #if true != 1 "error: true is not 1" #endif #ifndef __bool_true_false_are_defined "error: __bool_true_false_are_defined is not defined" #endif struct s { _Bool s: 1; _Bool t; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) 0.5 == true ? 1 : -1]; /* See body of main program for 'e'. */ char f[(_Bool) 0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; char i[sizeof s.t]; enum { j = false, k = true, l = false * true, m = true * 256 }; /* The following fails for HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ _Bool n[m]; char o[sizeof n == m * sizeof n[0] ? 1 : -1]; char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; /* Catch a bug in an HP-UX C compiler. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html */ _Bool q = true; _Bool *pq = &q; int main () { bool e = &s; *pq |= q; *pq |= ! q; /* Refer to every declared value, to avoid compiler optimizations. */ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + !m + !n + !o + !p + !q + !pq); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdbool_h=yes else ac_cv_header_stdbool_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 $as_echo "$ac_cv_header_stdbool_h" >&6; } ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" if test "x$ac_cv_type__Bool" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE__BOOL 1 _ACEOF fi if test $ac_cv_header_stdbool_h = yes; then $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } if ${ac_cv_header_sys_wait_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main () { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_sys_wait_h=yes else ac_cv_header_sys_wait_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 $as_echo "$ac_cv_header_sys_wait_h" >&6; } if test $ac_cv_header_sys_wait_h = yes; then $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h fi for ac_header in fcntl.h sys/ioctl.h sys/time.h unistd.h sys/file.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in string.h strings.h ctype.h stdlib.h stdarg.h stdint.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in stddef.h sys/socket.h sys/modem.h termios.h sys/filio.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in inttypes.h wchar.h direct.h sys/param.h dirent.h sys/types.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset cs; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if ${ac_cv_c_inline+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 $as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" if test "x$ac_cv_type_pid_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define pid_t int _ACEOF fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_time=yes else ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } if ${ac_cv_struct_tm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { struct tm tm; int *p = &tm.tm_sec; return !p; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_struct_tm=time.h else ac_cv_struct_tm=sys/time.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 $as_echo "$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "u_int8_t" "ac_cv_type_u_int8_t" "$ac_includes_default" if test "x$ac_cv_type_u_int8_t" = xyes; then : $as_echo "#define HAVE_U_INT8_T 1" >>confdefs.h fi $as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __ptr_t" >&5 $as_echo_n "checking for __ptr_t... " >&6; } if ${ac_cv_c___ptr_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { __ptr_t foo = NULL; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c___ptr_t=yes else ac_cv_c___ptr_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c___ptr_t" >&5 $as_echo "$ac_cv_c___ptr_t" >&6; } if test $ac_cv_c___ptr_t = yes; then $as_echo "#define HAVE_PTR_T 1" >>confdefs.h fi if test $ac_cv_c_compiler_gnu = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 $as_echo_n "checking whether $CC needs -traditional... " >&6; } if ${ac_cv_prog_gcc_traditional+:} false; then : $as_echo_n "(cached) " >&6 else ac_pattern="Autoconf.*'x'" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include Autoconf TIOCGETP _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "$ac_pattern" >/dev/null 2>&1; then : ac_cv_prog_gcc_traditional=yes else ac_cv_prog_gcc_traditional=no fi rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include Autoconf TCGETA _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "$ac_pattern" >/dev/null 2>&1; then : ac_cv_prog_gcc_traditional=yes fi rm -f conftest* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5 $as_echo "$ac_cv_prog_gcc_traditional" >&6; } if test $ac_cv_prog_gcc_traditional = yes; then CC="$CC -traditional" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5 $as_echo_n "checking for working memcmp... " >&6; } if ${ac_cv_func_memcmp_working+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_memcmp_working=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* Some versions of memcmp are not 8-bit clean. */ char c0 = '\100', c1 = '\200', c2 = '\201'; if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) return 1; /* The Next x86 OpenStep bug shows up only when comparing 16 bytes or more and with at least one buffer not starting on a 4-byte boundary. William Lewis provided this test program. */ { char foo[21]; char bar[21]; int i; for (i = 0; i < 4; i++) { char *a = foo + i; char *b = bar + i; strcpy (a, "--------01111111"); strcpy (b, "--------10000000"); if (memcmp (a, b, 16) >= 0) return 1; } return 0; } ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_memcmp_working=yes else ac_cv_func_memcmp_working=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5 $as_echo "$ac_cv_func_memcmp_working" >&6; } test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in *" memcmp.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } if ${ac_cv_type_signal+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { return *(signal (0, 0)) (0) == 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_type_signal=int else ac_cv_type_signal=void fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 $as_echo "$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal _ACEOF for ac_func in strftime do : ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime" if test "x$ac_cv_func_strftime" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRFTIME 1 _ACEOF else # strftime is in -lintl on SCO UNIX. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5 $as_echo_n "checking for strftime in -lintl... " >&6; } if ${ac_cv_lib_intl_strftime+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char strftime (); int main () { return strftime (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_strftime=yes else ac_cv_lib_intl_strftime=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5 $as_echo "$ac_cv_lib_intl_strftime" >&6; } if test "x$ac_cv_lib_intl_strftime" = xyes; then : $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h LIBS="-lintl $LIBS" fi fi done for ac_func in mktime timegm gettimeofday select poll wcrtomb do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in strchr strdup strndup strstr strtol strtok strsep do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in asprintf vasprintf snprintf vsnprintf getpass setenv do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ISO C99 compliant snprintf" >&5 $as_echo_n "checking for ISO C99 compliant snprintf... " >&6; } if ${ac_cv_func_snprintf_c99+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_snprintf_c99=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main() { char buf[] = {0, 0, 0, 0}; snprintf(buf, 3, "ABC"); exit ((buf[2] != 0) || (snprintf(NULL, 0, "%d", 100) != 3)); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_snprintf_c99=yes else ac_cv_func_snprintf_c99=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_snprintf_c99" >&5 $as_echo "$ac_cv_func_snprintf_c99" >&6; } if test $ac_cv_func_snprintf_c99 = yes; then $as_echo "#define HAVE_C99_SNPRINTF 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ISO C99 compliant vsnprintf" >&5 $as_echo_n "checking for ISO C99 compliant vsnprintf... " >&6; } if ${ac_cv_func_vsnprintf_c99+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_vsnprintf_c99=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int doit(char *buf, int len, const char *s, ...) { va_list ap; int r; va_start(ap, s); r = vsnprintf(buf, len, s, ap); va_end(ap); return r; } int main() { char buf[] = {0, 0, 0, 0}; doit(buf, 3, "ABC"); exit ((buf[2] != 0) || (doit(NULL, 0, "%d", 100) != 3)); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_vsnprintf_c99=yes else ac_cv_func_vsnprintf_c99=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vsnprintf_c99" >&5 $as_echo "$ac_cv_func_vsnprintf_c99" >&6; } if test $ac_cv_func_vsnprintf_c99 = yes; then $as_echo "#define HAVE_C99_VSNPRINTF 1" >>confdefs.h fi CFLAGS="$CFLAGS $NLS_CFLAGS" LIBS="$LIBS $NLS_LIBS" XPACKAGE=xgnokii cat >>confdefs.h <<_ACEOF #define XVERSION "$XVERSION" _ACEOF HAVE_XGNOKII=$x_support cat >>confdefs.h <<_ACEOF #define SVERSION "$SVERSION" _ACEOF case "$INSTALL" in 'config/install-sh -c') INSTALL=`pwd`/$INSTALL ;; esac SHELL=${CONFIG_SHELL-/bin/sh} case "$build_os" in solaris*) SHELL=/bin/ksh ;; esac mgnokiidev_bindir="${sbindir}" mgnokiidev_bindir=`( test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$exec_prefix" = xNONE && exec_prefix="${prefix}" eval echo \""$mgnokiidev_bindir"\" )` cat >>confdefs.h <<_ACEOF #define SBINDIR "$mgnokiidev_bindir" _ACEOF prefix_dir="${prefix}" prefix_dir=`( test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$exec_prefix" = xNONE && exec_prefix="${prefix}" eval echo \""$prefix_dir"\" )` cat >>confdefs.h <<_ACEOF #define PREFIX "$prefix_dir" _ACEOF ac_config_headers="$ac_config_headers include/config.h" ac_config_files="$ac_config_files Makefile getopt/Makefile Docs/Makefile Docs/man/Makefile Docs/protocol/Makefile Docs/sample/Makefile Docs/sample/logo/Makefile Docs/sample/vCalendar/Makefile Docs/sample/ringtone/Makefile Docs/sample/ppp/Makefile include/Makefile include/gnokii.h include/data/Makefile include/devices/Makefile include/phones/Makefile include/links/Makefile include/gnokii/Makefile common/gnokii.pc common/Makefile common/data/Makefile common/devices/Makefile common/links/Makefile common/phones/Makefile gnokii/Makefile gnokiid/Makefile smsd/Makefile utils/Makefile xgnokii/xgnokii.pc xgnokii/Makefile xgnokii/xpm/Makefile po/Makefile.in testsuite/Makefile testsuite/data/Makefile Windows/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi ac_config_commands="$ac_config_commands po/stamp-it" if test -z "${XGNOKII_TRUE}" && test -z "${XGNOKII_FALSE}"; then as_fn_error $? "conditional \"XGNOKII\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${SMSD_TRUE}" && test -z "${SMSD_FALSE}"; then as_fn_error $? "conditional \"SMSD\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_POSTGRES_TRUE}" && test -z "${HAVE_POSTGRES_FALSE}"; then as_fn_error $? "conditional \"HAVE_POSTGRES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_SQLITE_TRUE}" && test -z "${HAVE_SQLITE_FALSE}"; then as_fn_error $? "conditional \"HAVE_SQLITE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_MYSQL_TRUE}" && test -z "${HAVE_MYSQL_FALSE}"; then as_fn_error $? "conditional \"HAVE_MYSQL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${WIN32_TRUE}" && test -z "${WIN32_FALSE}"; then as_fn_error $? "conditional \"WIN32\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by gnokii $as_me 0.6.31, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to . gnokii home page: ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ gnokii config.status 0.6.31 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in AS \ DLLTOOL \ OBJDUMP \ SHELL \ ECHO \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "include/config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/config.h" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "getopt/Makefile") CONFIG_FILES="$CONFIG_FILES getopt/Makefile" ;; "Docs/Makefile") CONFIG_FILES="$CONFIG_FILES Docs/Makefile" ;; "Docs/man/Makefile") CONFIG_FILES="$CONFIG_FILES Docs/man/Makefile" ;; "Docs/protocol/Makefile") CONFIG_FILES="$CONFIG_FILES Docs/protocol/Makefile" ;; "Docs/sample/Makefile") CONFIG_FILES="$CONFIG_FILES Docs/sample/Makefile" ;; "Docs/sample/logo/Makefile") CONFIG_FILES="$CONFIG_FILES Docs/sample/logo/Makefile" ;; "Docs/sample/vCalendar/Makefile") CONFIG_FILES="$CONFIG_FILES Docs/sample/vCalendar/Makefile" ;; "Docs/sample/ringtone/Makefile") CONFIG_FILES="$CONFIG_FILES Docs/sample/ringtone/Makefile" ;; "Docs/sample/ppp/Makefile") CONFIG_FILES="$CONFIG_FILES Docs/sample/ppp/Makefile" ;; "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; "include/gnokii.h") CONFIG_FILES="$CONFIG_FILES include/gnokii.h" ;; "include/data/Makefile") CONFIG_FILES="$CONFIG_FILES include/data/Makefile" ;; "include/devices/Makefile") CONFIG_FILES="$CONFIG_FILES include/devices/Makefile" ;; "include/phones/Makefile") CONFIG_FILES="$CONFIG_FILES include/phones/Makefile" ;; "include/links/Makefile") CONFIG_FILES="$CONFIG_FILES include/links/Makefile" ;; "include/gnokii/Makefile") CONFIG_FILES="$CONFIG_FILES include/gnokii/Makefile" ;; "common/gnokii.pc") CONFIG_FILES="$CONFIG_FILES common/gnokii.pc" ;; "common/Makefile") CONFIG_FILES="$CONFIG_FILES common/Makefile" ;; "common/data/Makefile") CONFIG_FILES="$CONFIG_FILES common/data/Makefile" ;; "common/devices/Makefile") CONFIG_FILES="$CONFIG_FILES common/devices/Makefile" ;; "common/links/Makefile") CONFIG_FILES="$CONFIG_FILES common/links/Makefile" ;; "common/phones/Makefile") CONFIG_FILES="$CONFIG_FILES common/phones/Makefile" ;; "gnokii/Makefile") CONFIG_FILES="$CONFIG_FILES gnokii/Makefile" ;; "gnokiid/Makefile") CONFIG_FILES="$CONFIG_FILES gnokiid/Makefile" ;; "smsd/Makefile") CONFIG_FILES="$CONFIG_FILES smsd/Makefile" ;; "utils/Makefile") CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;; "xgnokii/xgnokii.pc") CONFIG_FILES="$CONFIG_FILES xgnokii/xgnokii.pc" ;; "xgnokii/Makefile") CONFIG_FILES="$CONFIG_FILES xgnokii/Makefile" ;; "xgnokii/xpm/Makefile") CONFIG_FILES="$CONFIG_FILES xgnokii/xpm/Makefile" ;; "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;; "testsuite/data/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/data/Makefile" ;; "Windows/Makefile") CONFIG_FILES="$CONFIG_FILES Windows/Makefile" ;; "po/stamp-it") CONFIG_COMMANDS="$CONFIG_COMMANDS po/stamp-it" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "default-1":C) case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile esac ;; "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010 Free Software Foundation, # Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="" # ### BEGIN LIBTOOL CONFIG # Assembler program. AS=$lt_AS # DLL creation program. DLLTOOL=$lt_DLLTOOL # Object dumper program. OBJDUMP=$lt_OBJDUMP # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and in which our libraries should be installed. lt_sysroot=$lt_sysroot # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into a binary # during linking. This must work even if \$libdir does not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) if test x"$xsi_shell" = xyes; then sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ func_dirname ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_basename ()$/,/^} # func_basename /c\ func_basename ()\ {\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ func_dirname_and_basename ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ func_stripname ()\ {\ \ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ \ # positional parameters, so assign one to ordinary parameter first.\ \ func_stripname_result=${3}\ \ func_stripname_result=${func_stripname_result#"${1}"}\ \ func_stripname_result=${func_stripname_result%"${2}"}\ } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ func_split_long_opt ()\ {\ \ func_split_long_opt_name=${1%%=*}\ \ func_split_long_opt_arg=${1#*=}\ } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ func_split_short_opt ()\ {\ \ func_split_short_opt_arg=${1#??}\ \ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ func_lo2o ()\ {\ \ case ${1} in\ \ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ \ *) func_lo2o_result=${1} ;;\ \ esac\ } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_xform ()$/,/^} # func_xform /c\ func_xform ()\ {\ func_xform_result=${1%.*}.lo\ } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_arith ()$/,/^} # func_arith /c\ func_arith ()\ {\ func_arith_result=$(( $* ))\ } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_len ()$/,/^} # func_len /c\ func_len ()\ {\ func_len_result=${#1}\ } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$lt_shell_append" = xyes; then sed -e '/^func_append ()$/,/^} # func_append /c\ func_append ()\ {\ eval "${1}+=\\${2}"\ } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ func_append_quoted ()\ {\ \ func_quote_for_eval "${2}"\ \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} fi mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ;; "po/stamp-it":C) if ! grep "^# INTLTOOL_MAKEFILE$" "po/Makefile.in" > /dev/null ; then as_fn_error $? "po/Makefile.in.in was not created by intltoolize." "$LINENO" 5 fi rm -f "po/stamp-it" "po/stamp-it.tmp" "po/POTFILES" "po/Makefile.tmp" >"po/stamp-it.tmp" sed '/^#/d s/^[[].*] *// /^[ ]*$/d '"s|^| $ac_top_srcdir/|" \ "$srcdir/po/POTFILES.in" | sed '$!s/$/ \\/' >"po/POTFILES" sed '/^POTFILES =/,/[^\\]$/ { /^POTFILES =/!d r po/POTFILES } ' "po/Makefile.in" >"po/Makefile" rm -f "po/Makefile.tmp" mv "po/stamp-it.tmp" "po/stamp-it" ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi echo " G N O K I I A toolset and driver for the mobile phones. Copyright (C) 1999-2011 The Gnokii Development Team. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. See file COPYING for more details. Host system: $host_os Gnokii version: $VERSION Xgnokii version: $XVERSION SMSD version: $SVERSION X (GTK+) support: $x_support smsd support: $enable_smsd Postgres support: $have_postgres SQLite support: $have_sqlite MySQL support: $have_mysql Debug: $debug XDebug: $xdebug RLPDebug: $rlpdebug NLS: $USE_NLS IrDA: $USE_IRDA ical read support: $USE_LIBICAL Bluetooth: $USE_BLUETOOTH libusb support: $USE_LIBUSB phonet support: $USE_SOCKETPHONET libpcsclite support:$USE_LIBPCSCLITE readline support: $USE_READLINE Security: $security Build Shared Lib: $enable_shared Build Static Lib: $enable_static Windows: $win32 Prefix: $prefix Type '${MAKE}' for compilation and then '${MAKE} install', to install gnokii. " gnokii-0.6.31/include/0000755000175000017500000000000011666163456012642 5ustar leoleognokii-0.6.31/include/compat.h0000644000175000017500000002027611666163120014271 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings, Pavel Janik Copyright (C) 2002-2004 BORBELY Zoltan, Pawel Kot Copyright (C) 2002 Feico de Boer, Markus Plail Copyright (C) 2003 Marcus Godehardt, Ladis Michl Header file for various platform compatibility. */ #ifndef _gnokii_compat_h #define _gnokii_compat_h #include #include #ifdef WIN32 # include # include #endif #ifdef HAVE_DIRECT_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef HAVE_STDARG_H # ifndef _VA_LIST # include # endif #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_STRING_H # ifndef _GNU_SOURCE # define _GNU_SOURCE 1 # endif # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_CTYPE_H # include #endif #ifdef HAVE_SYS_FILE_H # include #endif #ifdef HAVE_SYS_TIME_H # include #endif #ifdef HAVE_SYS_SOCKET_H # include #endif #ifdef HAVE_WCHAR_H # include #endif #ifdef HAVE_LIMITS_H # include #endif #ifdef HAVE_UNISTD_H # include #endif #ifdef HAVE_TERMIOS_H # include #endif #ifdef HAVE_DIRENT_H # include #endif #if !defined(INT_MAX) # define INT_MAX 2147483647 #endif /* * The following ifdef block is the standard way of creating macros which make * exporting from a DLL simpler. All files within this DLL are compiled with * the GNOKIIDLL_EXPORTS symbol defined on the command line. this symbol should * not be defined on any project that uses this DLL. This way any other project * whose source files include this file see API functions as being imported * from a DLL, wheras this DLL sees symbols defined with this macro as being * exported. */ #if defined(WIN32) # if defined(GNOKIIDLL_EXPORTS) || defined(_USRDLL) || defined(DLL_EXPORT) # define GNOKII_API __declspec(dllexport) # elif defined(GNOKIIDLL_IMPORTS) # define GNOKII_API __declspec(dllimport) # else # define GNOKII_API # endif #elif (__GNUC__ - 0 > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 3) # define GNOKII_API __attribute__ ((visibility("default"))) #else # define GNOKII_API #endif /* WIN32 */ /* I assume that HAVE_STRNDUP always implies HAVE_STRING_H */ #ifndef HAVE_STRNDUP extern char *strndup(const char *src, size_t n); #endif #ifndef HAVE_TIMEOPS #undef timerisset #undef timerclear #undef timercmp #undef timeradd #undef timersub /* The following code is borrowed from glibc, please don't reindent it */ /* Convenience macros for operations on timevals. NOTE: `timercmp' does not work for >= or <=. */ # define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) # define timerclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0) # define timercmp(a, b, CMP) \ (((a)->tv_sec == (b)->tv_sec) ? \ ((a)->tv_usec CMP (b)->tv_usec) : \ ((a)->tv_sec CMP (b)->tv_sec)) # define timeradd(a, b, result) \ do { \ (result)->tv_sec = (a)->tv_sec + (b)->tv_sec; \ (result)->tv_usec = (a)->tv_usec + (b)->tv_usec; \ if ((result)->tv_usec >= 1000000) \ { \ ++(result)->tv_sec; \ (result)->tv_usec -= 1000000; \ } \ } while (0) # define timersub(a, b, result) \ do { \ (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \ (result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \ if ((result)->tv_usec < 0) { \ --(result)->tv_sec; \ (result)->tv_usec += 1000000; \ } \ } while (0) #endif /* HAVE_TIMEOPS */ #ifndef HAVE_GETTIMEOFDAY int gettimeofday(struct timeval *tv, void *tz); #endif #ifndef HAVE_STRSEP char *strsep(char **stringp, const char *delim); #endif #if !defined(HAVE_SNPRINTF) || !defined(HAVE_C99_SNPRINTF) int snprintf(char *str, size_t size, const char *format, ...); #endif #if !defined(HAVE_VSNPRINTF) || !defined(HAVE_C99_VSNPRINTF) int vsnprintf(char *str, size_t size, const char *format, va_list ap); #endif #ifndef HAVE_ASPRINTF int asprintf(char **ptr, const char *format, ...); #endif #ifndef HAVE_VASPRINTF int vasprintf(char **ptr, const char *format, va_list ap); #endif #ifndef HAVE_TIMEGM time_t timegm(struct tm *tm); #endif /* * The following code was taken from W. Richard Stevens' * "UNIX Network Programming", Volume 1, Second Edition. * * We need the newer CMSG_LEN() and CMSG_SPACE() macros, but few * implementations support them today. These two macros really need * an ALIGN() macro, but each implementation does this differently. */ #ifndef CMSG_LEN # define CMSG_LEN(size) (sizeof(struct cmsghdr) + (size)) #endif #ifndef CMSG_SPACE # define CMSG_SPACE(size) (sizeof(struct cmsghdr) + (size)) #endif #ifdef WIN32 # ifdef _MSC_VER # define inline __inline # define mkdir(dirname, accessrights) _mkdir(dirname) # define strcasecmp _stricmp # define strncasecmp _strnicmp # define __const const # endif /* _MSC_VER */ # if !defined(HAVE_UNISTD_H) || defined(__MINGW32__) # define sleep(x) Sleep((x) * 1000) # define usleep(x) Sleep(((x) < 1000) ? 1 : ((x) / 1000)) # endif /* HAVE_UNISTD_H */ #endif #ifndef HAVE_PTR_T typedef void * __ptr_t; #endif /* Get rid of long defines. Use #if __unices__ */ #define __unices__ defined(__svr4__) || defined(__FreeBSD__) || defined(__bsdi__) || defined(__MACH__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__HAIKU__) /* This one is for NLS. */ #ifdef ENABLE_NLS # include # ifdef COMPILING_LIBGNOKII # define _(x) dgettext(GETTEXT_PACKAGE, x) # define N_(x) dgettext_noop(GETTEXT_PACKAGE, x) # else # define _(x) gettext(x) # define N_(x) gettext_noop(x) # endif #else # define _(x) (x) # define N_(x) (x) # define dgettext(y, x) (x) #endif /* ENABLE_NLS */ /* Definitions for u8, u16 and u32, borrowed from /usr/src/linux/include/asm-i386/types.h */ #ifndef u8 typedef unsigned char u8; #endif #ifndef u16 typedef unsigned short u16; #endif #ifndef u32 typedef unsigned int u32; #endif /* for Linux Bluetooth compability */ #if !defined(HAVE_STDINT_H) && !defined(HAVE_INTTYPES_H) typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; typedef char int8_t; typedef short int16_t; typedef int int32_t; #endif #ifndef HAVE_U_INT8_T typedef unsigned char u_int8_t; #endif #ifdef HAVE_WCRTOMB # define MBSTATE mbstate_t # define MBSTATE_ENC_CLEAR(x) memset(&(x), 0, sizeof(mbstate_t)) # define MBSTATE_DEC_CLEAR(x) memset(&(x), 0, sizeof(mbstate_t)) #else # define MBSTATE char # define MBSTATE_ENC_CLEAR(x) mbtowc(NULL, NULL, 0) # define MBSTATE_DEC_CLEAR(x) wctomb(NULL, 0) #endif /* MS Visual C does not have va_copy */ #ifndef va_copy # ifdef __va_copy # define va_copy(dest, src) __va_copy((dest), (src)) # else # define va_copy(dest, src) memcpy(&(dest), &(src), sizeof(va_list)) # endif #endif /* Bool type */ #ifdef HAVE_STDBOOL_H # include #else # if !HAVE__BOOL # ifdef __cplusplus typedef bool _Bool; # else #define _Bool signed char # endif # endif # define bool _Bool # define false 0 # define true 1 # define __bool_true_false_are_defined 1 #endif #ifdef __HAIKU__ # define FIOASYNC FIONBIO #endif #endif gnokii-0.6.31/include/Makefile.am0000644000175000017500000000062311666163120014663 0ustar leoleoSUBDIRS = data devices gnokii links phones gnokiidir = $(includedir) gnokii_HEADERS = gnokii.h EXTRA_HEADERS = \ cfgreader.h \ compat.h \ config.h \ device.h \ gnokii.h \ gnokii-internal.h \ gsm-filetypes.h \ misc.h \ nokia-decoding.h \ pkt.h \ sms-nokia.h \ localcharset.h \ map.h CLEANFILES = gnokii.h EXTRA_DIST = gnokii.h.in $(EXTRA_HEADERS) gnokii-0.6.31/include/data/0000755000175000017500000000000011666163456013553 5ustar leoleognokii-0.6.31/include/data/Makefile.am0000644000175000017500000000014211666163120015570 0ustar leoleo EXTRA_HEADERS = \ at-emulator.h \ datapump.h \ rlp-crc24.h EXTRA_DIST = $(EXTRA_HEADERS) gnokii-0.6.31/include/data/Makefile.in0000644000175000017500000003362411666163211015615 0ustar leoleo# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = include/data DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_expand_dir.m4 \ $(top_srcdir)/m4/acx_pthread.m4 $(top_srcdir)/m4/intltool.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLUETOOTH_LIBS = @BLUETOOTH_LIBS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FIND = @FIND@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLDFLAGS = @GLDFLAGS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GMODULE_CFLAGS = @GMODULE_CFLAGS@ GMODULE_LIBS = @GMODULE_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GNOKII_LT_VERSION = @GNOKII_LT_VERSION@ GNOKII_LT_VERSION_AGE = @GNOKII_LT_VERSION_AGE@ GNOKII_LT_VERSION_CURRENT = @GNOKII_LT_VERSION_CURRENT@ GNOKII_LT_VERSION_REVISION = @GNOKII_LT_VERSION_REVISION@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_LIBICAL = @HAVE_LIBICAL@ HAVE_LIBUSB = @HAVE_LIBUSB@ HAVE_SOCKETPHONET = @HAVE_SOCKETPHONET@ HAVE_XGNOKII = @HAVE_XGNOKII@ ICAL_CFLAGS = @ICAL_CFLAGS@ ICAL_LIBS = @ICAL_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBGNOKII_VERSION_MAJOR = @LIBGNOKII_VERSION_MAJOR@ LIBGNOKII_VERSION_MINOR = @LIBGNOKII_VERSION_MINOR@ LIBGNOKII_VERSION_RELEASE = @LIBGNOKII_VERSION_RELEASE@ LIBGNOKII_VERSION_STRING = @LIBGNOKII_VERSION_STRING@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBPCSCLITE_CFLAGS = @LIBPCSCLITE_CFLAGS@ LIBPCSCLITE_LIBS = @LIBPCSCLITE_LIBS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKE = @MAKE@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ MYSQLCONFIG = @MYSQLCONFIG@ MYSQLCONFIG5 = @MYSQLCONFIG5@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_LIBS = @MYSQL_LIBS@ NEED_LOCALE_CHARSET = @NEED_LOCALE_CHARSET@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OWN_GETOPT = @OWN_GETOPT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PGCONFIG = @PGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSTGRES_CFLAGS = @POSTGRES_CFLAGS@ POSTGRES_LIBS = @POSTGRES_LIBS@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LIBS = @SQLITE3_LIBS@ SQLITE_CFLAGS = @SQLITE_CFLAGS@ SQLITE_LIBS = @SQLITE_LIBS@ STRIP = @STRIP@ TCP_LIBS = @TCP_LIBS@ TERMLDFLAGS = @TERMLDFLAGS@ TERMLIBS = @TERMLIBS@ USB_LIBS = @USB_LIBS@ USE_NLS = @USE_NLS@ USE_UNIX98PTYS = @USE_UNIX98PTYS@ VERSION = @VERSION@ WIN32 = @WIN32@ WIN32_CROSS = @WIN32_CROSS@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ XPACKAGE = @XPACKAGE@ XPM_CFLAGS = @XPM_CFLAGS@ XPM_LIBS = @XPM_LIBS@ XVERSION = @XVERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ acx_pthread_config = @acx_pthread_config@ 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@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_HEADERS = \ at-emulator.h \ datapump.h \ rlp-crc24.h EXTRA_DIST = $(EXTRA_HEADERS) all: all-am .SUFFIXES: $(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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/data/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu include/data/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 $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean 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-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gnokii-0.6.31/include/data/at-emulator.h0000644000175000017500000000443311666163120016146 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for Nokia mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999, 2000 Hugh Blemings & Pavel Janik ml. Header file for AT emulator code. */ #ifndef _gnokii_data_at_emulator_h #define _gnokii_data_at_emulator_h #include "compat.h" #include "gnokii.h" /* Prototypes */ bool gn_atem_initialise(int read_fd, int write_fd, struct gn_statemachine *sm); void gn_atem_incoming_data_handle(char *buffer, int length); void gn_atem_registers_init(void); void gn_atem_string_out(char *buffer); void gn_atem_at_parse(char *cmd_buffer); void gn_atem_sms_parse(char *cmd_buffer); void gn_atem_dir_parse(char *cmd_buffer); bool gn_atem_command_plusc(char **buf); bool gn_atem_command_plusg(char **buf); int gn_atem_num_get(char **p); void gn_atem_modem_result(int code); void gn_atem_call_passup(gn_call_status call_status, gn_call_info *call_info, struct gn_statemachine *state, void *callback_data); void gn_atem_cid_out(gn_call_info *callinfo); bool gn_atem_command_diesis(char **buf); /* Global variables */ extern bool gn_atem_initialised; extern struct gn_statemachine *sm; extern gn_data data; /* Definition of modem result codes - these are returned to "terminal" numerically or as a string depending on the setting of S12 */ /* FIX ME - Numeric values for everything except OK and ERROR are guesses as I've not got an AT reference handy. HAB */ #define MR_OK (0) #define MR_ERROR (4) #define MR_NOCARRIER (5) #define MR_CARRIER (2) #define MR_CONNECT (3) #define MR_RING (6) #endif /* _gnokii_data_at_emulator_h */ gnokii-0.6.31/include/data/datapump.h0000644000175000017500000000232311666163120015523 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for Nokia mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999, 2000 Hugh Blemings & Pavel Janik ml. Header file for data pump code. */ #ifndef _gnokii_data_datapump_h #define _gnokii_data_datapump_h #include "compat.h" #include "gnokii.h" /* Prototypes */ bool dp_Initialise(int read_fd, int write_fd); void dp_CallPassup(gn_call_status call_status, gn_call_info *call_info, struct gn_statemachine *state, void *callback_data); #endif /* _gnokii_data_datapump_h */ gnokii-0.6.31/include/data/rlp-crc24.h0000644000175000017500000000220711666163120015421 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for Nokia mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999, 2000 Hugh Blemings & Pavel Janik ml. Header file for CRC24 (aka FCS) implementation in RLP. */ #ifndef _gnokii_data_rlp_crc24_h #define _gnokii_data_rlp_crc24_h #include "misc.h" /* Prototypes for functions */ void rlp_crc24checksum_calculate(u8 *data, int length, u8 *crc); bool rlp_crc24fcs_check(u8 *data, int length); #endif gnokii-0.6.31/include/Makefile.in0000644000175000017500000005435611666163211014711 0ustar leoleo# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = include DIST_COMMON = $(gnokii_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(srcdir)/gnokii.h.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_expand_dir.m4 \ $(top_srcdir)/m4/acx_pthread.m4 $(top_srcdir)/m4/intltool.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = gnokii.h CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(gnokiidir)" HEADERS = $(gnokii_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLUETOOTH_LIBS = @BLUETOOTH_LIBS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FIND = @FIND@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLDFLAGS = @GLDFLAGS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GMODULE_CFLAGS = @GMODULE_CFLAGS@ GMODULE_LIBS = @GMODULE_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GNOKII_LT_VERSION = @GNOKII_LT_VERSION@ GNOKII_LT_VERSION_AGE = @GNOKII_LT_VERSION_AGE@ GNOKII_LT_VERSION_CURRENT = @GNOKII_LT_VERSION_CURRENT@ GNOKII_LT_VERSION_REVISION = @GNOKII_LT_VERSION_REVISION@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_LIBICAL = @HAVE_LIBICAL@ HAVE_LIBUSB = @HAVE_LIBUSB@ HAVE_SOCKETPHONET = @HAVE_SOCKETPHONET@ HAVE_XGNOKII = @HAVE_XGNOKII@ ICAL_CFLAGS = @ICAL_CFLAGS@ ICAL_LIBS = @ICAL_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBGNOKII_VERSION_MAJOR = @LIBGNOKII_VERSION_MAJOR@ LIBGNOKII_VERSION_MINOR = @LIBGNOKII_VERSION_MINOR@ LIBGNOKII_VERSION_RELEASE = @LIBGNOKII_VERSION_RELEASE@ LIBGNOKII_VERSION_STRING = @LIBGNOKII_VERSION_STRING@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBPCSCLITE_CFLAGS = @LIBPCSCLITE_CFLAGS@ LIBPCSCLITE_LIBS = @LIBPCSCLITE_LIBS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKE = @MAKE@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ MYSQLCONFIG = @MYSQLCONFIG@ MYSQLCONFIG5 = @MYSQLCONFIG5@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_LIBS = @MYSQL_LIBS@ NEED_LOCALE_CHARSET = @NEED_LOCALE_CHARSET@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OWN_GETOPT = @OWN_GETOPT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PGCONFIG = @PGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSTGRES_CFLAGS = @POSTGRES_CFLAGS@ POSTGRES_LIBS = @POSTGRES_LIBS@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LIBS = @SQLITE3_LIBS@ SQLITE_CFLAGS = @SQLITE_CFLAGS@ SQLITE_LIBS = @SQLITE_LIBS@ STRIP = @STRIP@ TCP_LIBS = @TCP_LIBS@ TERMLDFLAGS = @TERMLDFLAGS@ TERMLIBS = @TERMLIBS@ USB_LIBS = @USB_LIBS@ USE_NLS = @USE_NLS@ USE_UNIX98PTYS = @USE_UNIX98PTYS@ VERSION = @VERSION@ WIN32 = @WIN32@ WIN32_CROSS = @WIN32_CROSS@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ XPACKAGE = @XPACKAGE@ XPM_CFLAGS = @XPM_CFLAGS@ XPM_LIBS = @XPM_LIBS@ XVERSION = @XVERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ acx_pthread_config = @acx_pthread_config@ 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@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = data devices gnokii links phones gnokiidir = $(includedir) gnokii_HEADERS = gnokii.h EXTRA_HEADERS = \ cfgreader.h \ compat.h \ config.h \ device.h \ gnokii.h \ gnokii-internal.h \ gsm-filetypes.h \ misc.h \ nokia-decoding.h \ pkt.h \ sms-nokia.h \ localcharset.h \ map.h CLEANFILES = gnokii.h EXTRA_DIST = gnokii.h.in $(EXTRA_HEADERS) all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: $(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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu include/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 $(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status include/config.h $(srcdir)/config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 gnokii.h: $(top_builddir)/config.status $(srcdir)/gnokii.h.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-gnokiiHEADERS: $(gnokii_HEADERS) @$(NORMAL_INSTALL) test -z "$(gnokiidir)" || $(MKDIR_P) "$(DESTDIR)$(gnokiidir)" @list='$(gnokii_HEADERS)'; test -n "$(gnokiidir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(gnokiidir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(gnokiidir)" || exit $$?; \ done uninstall-gnokiiHEADERS: @$(NORMAL_UNINSTALL) @list='$(gnokii_HEADERS)'; test -n "$(gnokiidir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(gnokiidir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(gnokiidir)" && rm -f $$files # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(HEADERS) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(gnokiidir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-gnokiiHEADERS install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-gnokiiHEADERS .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ ctags-recursive install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-hdr distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-gnokiiHEADERS \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-gnokiiHEADERS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gnokii-0.6.31/include/gnokii/0000755000175000017500000000000011666163457014123 5ustar leoleognokii-0.6.31/include/gnokii/Makefile.am0000644000175000017500000000037311666163120016145 0ustar leoleo gnokiisubdir = $(includedir)/gnokii gnokiisub_HEADERS = \ bitmaps.h \ call.h \ common.h \ data.h \ encoding.h \ error.h \ mms.h \ networks.h \ ringtones.h \ rlp-common.h \ sms.h \ statemachine.h \ virtmodem.h \ wappush.h gnokii-0.6.31/include/gnokii/Makefile.in0000644000175000017500000004016011666163211016155 0ustar leoleo# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = include/gnokii DIST_COMMON = $(gnokiisub_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_expand_dir.m4 \ $(top_srcdir)/m4/acx_pthread.m4 $(top_srcdir)/m4/intltool.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(gnokiisubdir)" HEADERS = $(gnokiisub_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLUETOOTH_LIBS = @BLUETOOTH_LIBS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FIND = @FIND@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLDFLAGS = @GLDFLAGS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GMODULE_CFLAGS = @GMODULE_CFLAGS@ GMODULE_LIBS = @GMODULE_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GNOKII_LT_VERSION = @GNOKII_LT_VERSION@ GNOKII_LT_VERSION_AGE = @GNOKII_LT_VERSION_AGE@ GNOKII_LT_VERSION_CURRENT = @GNOKII_LT_VERSION_CURRENT@ GNOKII_LT_VERSION_REVISION = @GNOKII_LT_VERSION_REVISION@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_LIBICAL = @HAVE_LIBICAL@ HAVE_LIBUSB = @HAVE_LIBUSB@ HAVE_SOCKETPHONET = @HAVE_SOCKETPHONET@ HAVE_XGNOKII = @HAVE_XGNOKII@ ICAL_CFLAGS = @ICAL_CFLAGS@ ICAL_LIBS = @ICAL_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBGNOKII_VERSION_MAJOR = @LIBGNOKII_VERSION_MAJOR@ LIBGNOKII_VERSION_MINOR = @LIBGNOKII_VERSION_MINOR@ LIBGNOKII_VERSION_RELEASE = @LIBGNOKII_VERSION_RELEASE@ LIBGNOKII_VERSION_STRING = @LIBGNOKII_VERSION_STRING@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBPCSCLITE_CFLAGS = @LIBPCSCLITE_CFLAGS@ LIBPCSCLITE_LIBS = @LIBPCSCLITE_LIBS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKE = @MAKE@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ MYSQLCONFIG = @MYSQLCONFIG@ MYSQLCONFIG5 = @MYSQLCONFIG5@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_LIBS = @MYSQL_LIBS@ NEED_LOCALE_CHARSET = @NEED_LOCALE_CHARSET@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OWN_GETOPT = @OWN_GETOPT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PGCONFIG = @PGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSTGRES_CFLAGS = @POSTGRES_CFLAGS@ POSTGRES_LIBS = @POSTGRES_LIBS@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LIBS = @SQLITE3_LIBS@ SQLITE_CFLAGS = @SQLITE_CFLAGS@ SQLITE_LIBS = @SQLITE_LIBS@ STRIP = @STRIP@ TCP_LIBS = @TCP_LIBS@ TERMLDFLAGS = @TERMLDFLAGS@ TERMLIBS = @TERMLIBS@ USB_LIBS = @USB_LIBS@ USE_NLS = @USE_NLS@ USE_UNIX98PTYS = @USE_UNIX98PTYS@ VERSION = @VERSION@ WIN32 = @WIN32@ WIN32_CROSS = @WIN32_CROSS@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ XPACKAGE = @XPACKAGE@ XPM_CFLAGS = @XPM_CFLAGS@ XPM_LIBS = @XPM_LIBS@ XVERSION = @XVERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ acx_pthread_config = @acx_pthread_config@ 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@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ gnokiisubdir = $(includedir)/gnokii gnokiisub_HEADERS = \ bitmaps.h \ call.h \ common.h \ data.h \ encoding.h \ error.h \ mms.h \ networks.h \ ringtones.h \ rlp-common.h \ sms.h \ statemachine.h \ virtmodem.h \ wappush.h all: all-am .SUFFIXES: $(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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/gnokii/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu include/gnokii/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 $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-gnokiisubHEADERS: $(gnokiisub_HEADERS) @$(NORMAL_INSTALL) test -z "$(gnokiisubdir)" || $(MKDIR_P) "$(DESTDIR)$(gnokiisubdir)" @list='$(gnokiisub_HEADERS)'; test -n "$(gnokiisubdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(gnokiisubdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(gnokiisubdir)" || exit $$?; \ done uninstall-gnokiisubHEADERS: @$(NORMAL_UNINSTALL) @list='$(gnokiisub_HEADERS)'; test -n "$(gnokiisubdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(gnokiisubdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(gnokiisubdir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(HEADERS) installdirs: for dir in "$(DESTDIR)$(gnokiisubdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-gnokiisubHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-gnokiisubHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean 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-dvi install-dvi-am install-exec \ install-exec-am install-gnokiisubHEADERS install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-gnokiisubHEADERS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gnokii-0.6.31/include/gnokii/wappush.h0000644000175000017500000000442511666163120015753 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2006 Igor Popik Include file for the binary SMS push functions. Based on wapforum document WAP-167-ServiceInd-20010731-a */ #define WBXML_VERSION 0x01 #define WAPPush_CHARSET 0x6a /* UTF-8 106 */ #define PDU_TYPE_Push 0x06 #define CONTENT_TYPE 0xae /* application/vnd.wap.sic */ /* wbxml tag tokens masks */ typedef enum { TOKEN_KNOWN = 0x00, /* token known */ TOKEN_KNOWN_C = 0x40, /* token known with content */ TOKEN_KNOWN_A = 0x80, /* token known with attributes */ TOKEN_KNOWN_AC = 0xC0 /* token known with attr & content */ } gn_wap_push_tokens_masks; /* Service indication tag tokens */ typedef enum { TAG_END = 0x01, /* end of TAG,ATTR list */ TAG_INLINE = 0x03, /* inline string */ TAG_SI = 0x05, /* public ID */ TAG_INDICATION = 0x06, /* indication */ TAG_INFO = 0x07, /* info */ TAG_ITEM = 0x08 /* item */ } gn_wap_push_tag_tokens; typedef enum { ATTR_ACT_SIGNAL_NONE = 0x05, /* action - signal-none */ ATTR_ACT_SIGNAL_LOW = 0x06, /* action - signal-low */ ATTR_ACT_SIGNAL_MEDIUM = 0x07, /* action - signal-medium */ ATTR_ACT_SIGNAL_HIGH = 0x08, /* action - signal-high */ ATTR_ACT_DELETE = 0x09, /* action - delete */ ATTR_CREATED = 0x0a, /* created */ ATTR_HREF = 0x0b, /* href */ ATTR_HREF_HTTP = 0x0c, /* http:// */ ATTR_HREF_HTTP_WWW = 0x0d, /* http://www. */ ATTR_HREF_HTTPS = 0x0e, /* https:// */ ATTR_HREF_HTTPS_WWW = 0x0f, /* https://www. */ ATTR_SI_EXPRES = 0x10, ATTR_SI_ID = 0x11, ATTR_CLASS = 0x12 } gn_wap_push_tag_attr; gnokii-0.6.31/include/gnokii/statemachine.h0000644000175000017500000000662411666163120016734 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janík ml. Copyright (C) 2002-2003 Pawel Kot, BORBELY Zoltan Header file for the statemachine. */ #ifndef _gnokii_statemachine_h #define _gnokii_statemachine_h #include #include /* Small structure used in gn_driver */ /* Messagetype is passed to the function in case it is a 'generic' one */ typedef struct { unsigned char message_type; gn_error (*functions)(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); } gn_incoming_function_type; /* This structure contains the 'callups' needed by the statemachine */ /* to deal with messages from the phone and other information */ typedef struct { /* These make up a list of functions, one for each message type and NULL terminated */ gn_incoming_function_type *incoming_functions; gn_error (*default_function)(int messagetype, unsigned char *buffer, int length, struct gn_statemachine *state); gn_phone phone; gn_error (*functions)(gn_operation op, gn_data *data, struct gn_statemachine *state); void *driver_instance; } gn_driver; /* How many message types we can wait for at one moment */ #define GN_SM_WAITINGFOR_MAX_NUMBER 3 /* The states the statemachine can take */ typedef enum { GN_SM_Startup, /* Not yet initialised */ GN_SM_Initialised, /* Ready! */ GN_SM_MessageSent, /* A command has been sent to the link(phone) */ GN_SM_WaitingForResponse, /* We are waiting for a response from the link(phone) */ GN_SM_ResponseReceived /* A response has been received - waiting for the phone layer to collect it */ } gn_state; /* All properties of the state machine */ struct gn_statemachine { gn_state current_state; gn_config config; gn_device device; gn_link link; gn_driver driver; char *lockfile; /* Store last message for resend purposes */ unsigned char last_msg_type; unsigned int last_msg_size; void *last_msg; /* The responses we are waiting for */ unsigned char waiting_for_number; unsigned char received_number; unsigned char waiting_for[GN_SM_WAITINGFOR_MAX_NUMBER]; gn_error response_error[GN_SM_WAITINGFOR_MAX_NUMBER]; /* Data structure to be filled in with the response */ gn_data *data[GN_SM_WAITINGFOR_MAX_NUMBER]; /* libfunctions internal data structure */ gn_error lasterror; gn_data sm_data; union { gn_phonebook_entry pb_entry; } u; }; GNOKII_API gn_state gn_sm_loop(int timeout, struct gn_statemachine *state); /* General way to call any driver function */ GNOKII_API gn_error gn_sm_functions(gn_operation op, gn_data *data, struct gn_statemachine *sm); #endif /* _gnokii_statemachine_h */ gnokii-0.6.31/include/gnokii/data.h0000644000175000017500000002156211666163120015176 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janík ml. Copyright (C) 2002-2004 BORBELY Zoltan Copyright (C) 2002-2011 Pawel Kot Copyright (C) 2002 Ladis Michl, Markus Plail, Pavel Machek, Chris Kemp */ #ifndef _gnokii_data_h #define _gnokii_data_h #include #include #include #include #include #include /* For models table */ typedef struct { const char *model; /* e.g. 6310 */ const char *product_name; /* e.g. NPE-4 */ int flags; } gn_phone_model; /* This is a generic holder for high level information - eg a gn_bmp */ typedef struct { gn_sms_folder *sms_folder; gn_sms_folder_list *sms_folder_list; /* * This is for phone driver, application using libgnokii should not * touch this. */ gn_sms_raw *raw_sms; /* * This is for user communication, phone driver should not have to * touch this one. */ gn_sms *sms; gn_phonebook_entry *phonebook_entry; gn_speed_dial *speed_dial; gn_memory_status *memory_status; gn_sms_message_list *message_list[GN_SMS_MESSAGE_MAX_NUMBER][GN_SMS_FOLDER_MAX_NUMBER]; gn_sms_status *sms_status; gn_sms_folder_stats *folder_stats[GN_SMS_FOLDER_MAX_NUMBER]; gn_sms_message_center *message_center; char *imei; char *revision; char *model; char *manufacturer; gn_network_info *network_info; gn_wap_bookmark *wap_bookmark; gn_wap_setting *wap_setting; gn_todo *todo; gn_todo_list *todo_list; gn_calnote *calnote; gn_calnote_list *calnote_list; gn_bmp *bitmap; gn_ringtone *ringtone; gn_profile *profile; gn_battery_unit *battery_unit; float *battery_level; gn_rf_unit *rf_unit; float *rf_level; gn_display_output *display_output; char *incoming_call_nr; gn_power_source *power_source; gn_timestamp *datetime; gn_calnote_alarm *alarm; gn_raw_data *raw_data; gn_call_divert *call_divert; gn_error (*on_sms)(gn_sms *message, struct gn_statemachine *state, void *callback_data); int *display_status; void (*on_cell_broadcast)(gn_cb_message *message, struct gn_statemachine *state, void *callback_data); gn_netmonitor *netmonitor; gn_call_info *call_info; void (*call_notification)(gn_call_status call_status, gn_call_info *call_info, struct gn_statemachine *state, void *callback_data); gn_rlp_f96_frame *rlp_frame; int rlp_out_dtx; void (*rlp_rx_callback)(gn_rlp_f96_frame *frame); gn_security_code *security_code; const char *dtmf_string; unsigned char reset_type; gn_key_code key_code; unsigned char character; gn_phone_model *phone; gn_locks_info *locks_info; gn_tone *tone; gn_ringtone_list *ringtone_list; gn_call_active *call_active; gn_file_list *file_list; gn_file *file; /* * This is a pointer to some data that may be used by any callback * function. */ void *callback_data; /* * This is a callback function for any changes related to the network * registration parameters changes: status, LAC, cell id. */ void (*reg_notification)(gn_network_info *info, void *callback_data); /* * This is callback function for file download progress. * progress is value in range [0, 100]. */ void (*progress_indication)(int progress, void *callback_data); /* * This is for phone driver, application using libgnokii should not * touch this. */ gn_mms_raw *raw_mms; /* * This is for user communication, phone driver should not have to * touch this one. */ gn_mms *mms; } gn_data; /* * A structure to hold information about the particular link * The link comes 'under' the phone */ typedef struct { /* A regularly called loop function. Timeout can be used to make the * function block or not */ gn_error (*loop)(struct timeval *timeout, struct gn_statemachine *state); /* A pointer to the function used to send out a message. This is used * by the phone specific code to send a message over the link */ gn_error (*send_message)(unsigned int messagesize, unsigned char messagetype, unsigned char *message, struct gn_statemachine *state); void *link_instance; void (*reset)(struct gn_statemachine *state); void (*cleanup)(struct gn_statemachine *state); } gn_link; typedef struct { char model[GN_MODEL_MAX_LENGTH]; /* Phone model */ char irda_string[GN_MODEL_MAX_LENGTH]; /* If IrDA connection used, string shown in the discovery log */ char port_device[GN_DEVICE_NAME_MAX_LENGTH]; /* Port device to use (e.g. /dev/ttyS0) */ gn_connection_type connection_type; /* Connection type (e.g. serial, ir) */ int init_length; /* Number of chars sent to sync the serial port */ int serial_baudrate; /* Baud rate to use */ int serial_write_usleep; /* Inter character delay or <0 to disable */ int hardware_handshake; /* Select between hardware and software handshake */ int require_dcd; /* DCD signal check */ int smsc_timeout; /* How many seconds should we wait for the SMSC response, defaults to 10 seconds */ char connect_script[256]; /* Script to run when device connection established */ char disconnect_script[256]; /* Script to run when device connection closed */ uint8_t rfcomm_cn; /* RFCOMM channel number to connect */ unsigned int sm_retry; /* Indicates whether statemachine should do retries. Defaults to off. */ /* Use with caution -- may break newer DCT4 phones */ unsigned int use_locking; /* Should we use locking system or not */ int set_dtr_rts; /* Should we set DTR and RTS bits on the serial line */ /* do not change the following values from userspace */ char m_model[GN_MODEL_MAX_LENGTH]; char m_manufacturer[GN_MANUFACTURER_MAX_LENGTH]; char m_revision[GN_REVISION_MAX_LENGTH]; char m_imei[GN_IMEI_MAX_LENGTH]; } gn_config; typedef struct { int fd; gn_connection_type type; void *device_instance; } gn_device; typedef enum { GN_OP_Init, GN_OP_Terminate, GN_OP_GetModel, GN_OP_GetRevision, GN_OP_GetImei, GN_OP_GetManufacturer, GN_OP_Identify, GN_OP_GetBitmap, GN_OP_SetBitmap, GN_OP_GetBatteryLevel, GN_OP_GetRFLevel, GN_OP_DisplayOutput, GN_OP_GetMemoryStatus, GN_OP_ReadPhonebook, GN_OP_WritePhonebook, GN_OP_DeletePhonebook, GN_OP_GetPowersource, GN_OP_GetAlarm, GN_OP_GetSMSStatus, GN_OP_GetIncomingCallNr, GN_OP_GetNetworkInfo, GN_OP_GetSecurityCode, GN_OP_CreateSMSFolder, GN_OP_DeleteSMSFolder, GN_OP_GetSMS, GN_OP_GetSMSnoValidate, GN_OP_GetSMSFolders, GN_OP_GetSMSFolderStatus, GN_OP_GetIncomingSMS, GN_OP_GetUnreadMessages, GN_OP_GetNextSMS, GN_OP_DeleteSMSnoValidate, GN_OP_DeleteSMS, GN_OP_SendSMS, GN_OP_GetSpeedDial, GN_OP_GetSMSCenter, GN_OP_SetSMSCenter, GN_OP_GetDateTime, GN_OP_GetToDo, GN_OP_GetCalendarNote, GN_OP_CallDivert, GN_OP_OnSMS, /* set data->on_sms and data->callback_data */ GN_OP_PollSMS, GN_OP_SetAlarm, GN_OP_SetDateTime, GN_OP_GetProfile, GN_OP_SetProfile, GN_OP_WriteToDo, GN_OP_DeleteAllToDos, GN_OP_WriteCalendarNote, GN_OP_DeleteCalendarNote, GN_OP_SetSpeedDial, GN_OP_GetDisplayStatus, GN_OP_PollDisplay, GN_OP_SaveSMS, GN_OP_SetCellBroadcast, /* set data->on_cell_broadcast and data->callback_data */ GN_OP_NetMonitor, GN_OP_MakeCall, GN_OP_AnswerCall, GN_OP_CancelCall, GN_OP_SetCallNotification, /* set data->call_notification and data->callback_data */ GN_OP_SendRLPFrame, GN_OP_SetRLPRXCallback, GN_OP_EnterSecurityCode, GN_OP_GetSecurityCodeStatus, GN_OP_ChangeSecurityCode, GN_OP_SendDTMF, GN_OP_Reset, GN_OP_GetRingtone, GN_OP_SetRingtone, GN_OP_GetRawRingtone, GN_OP_SetRawRingtone, GN_OP_PressPhoneKey, GN_OP_ReleasePhoneKey, GN_OP_EnterChar, GN_OP_Subscribe, GN_OP_GetWAPBookmark, GN_OP_WriteWAPBookmark, GN_OP_DeleteWAPBookmark, GN_OP_GetWAPSetting, GN_OP_ActivateWAPSetting, GN_OP_WriteWAPSetting, GN_OP_GetLocksInfo, GN_OP_GetActiveProfile, GN_OP_SetActiveProfile, GN_OP_PlayTone, GN_OP_GetRingtoneList, GN_OP_DeleteRingtone, GN_OP_GetActiveCalls, GN_OP_GetFileList, GN_OP_GetFileId, GN_OP_GetFile, GN_OP_PutFile, GN_OP_DeleteFile, GN_OP_GetFileDetailsById, GN_OP_GetFileById, GN_OP_DeleteFileById, GN_OP_GetMMS, GN_OP_DeleteMMS, GN_OP_Max, /* don't append anything after this entry */ } gn_operation; /* Undefined functions in fbus/mbus files */ extern gn_error gn_unimplemented(void); #define GN_UNIMPLEMENTED (void *) gn_unimplemented #endif /* _gnokii_data_h */ gnokii-0.6.31/include/gnokii/sms.h0000644000175000017500000004132411666163120015065 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings, Pavel Janik Copyright (C) 2001-2003 Pawel Kot Copyright (C) 2002 Pavel Machek, Markus Plail, BORBELY Zoltan Copyright (C) 2003 Ladis Michl Include file for the SMS library. */ #ifndef _gnokii_sms_h #define _gnokii_sms_h #include #include #include #include #include /* Maximum length of SMS center name */ #define GN_SMS_CENTER_NAME_MAX_LENGTH 20 /* Limits of SMS messages. */ #define GN_SMS_MAX_LENGTH 160 #define GN_SMS_8BIT_MAX_LENGTH 140 #define GN_SMS_LONG_MAX_LENGTH 10240 #define GN_SMS_PART_MAX_NUMBER 3 /* FIXME: what value should be here? (Pawel Kot) */ #define GN_SMS_UDH_MAX_NUMBER 10 /* Maximal number of SMS folders */ #define GN_SMS_FOLDER_MAX_NUMBER 64 #define GN_SMS_MESSAGE_MAX_NUMBER 1024 #define GN_SMS_DATETIME_MAX_LENGTH 7 #define GN_SMS_SMSC_NUMBER_MAX_LENGTH 20 #define GN_SMS_NUMBER_MAX_LENGTH 20 #define GN_SMS_USER_DATA_MAX_LENGTH 256 #define GN_SMS_VP_MAX_LENGTH 8 /* flags for encoding/decoding PDU */ #define GN_SMS_PDU_DEFAULT 0 #define GN_SMS_PDU_NOSMSC 1 /*** MEMORY INFO ***/ typedef struct { int Unread; /* Number of unread messages */ int Number; /* Number of all messages */ } gn_sms_memory_status; typedef struct { /* Number of message we get from GetSMSStatus */ unsigned int number; /* Number of unread messages we get from GetSMSStatus */ unsigned int unread; /* when a message is moved between folders status wouldn't change */ unsigned int changed; /* Number of Folders we get from GetFolders */ unsigned int folders_count; /* Message store used for new received messages (this is used * internally by AT_SetSMSMemoryType() in common/phones/atgen.c). */ /* Note: this field is unused since revision 1.128 of common/phones/atgen.c */ gn_memory_type new_message_store; } gn_sms_status; /*** USER DATA HEADER ***/ /* types of User Data Header */ typedef enum { GN_SMS_UDH_None = 0x00, GN_SMS_UDH_ConcatenatedMessages = 0x01, GN_SMS_UDH_Ringtone = 0x02, GN_SMS_UDH_OpLogo = 0x03, GN_SMS_UDH_CallerIDLogo = 0x04, GN_SMS_UDH_MultipartMessage = 0x05, GN_SMS_UDH_WAPvCard = 0x06, GN_SMS_UDH_WAPvCalendar = 0x07, GN_SMS_UDH_WAPvCardSecure = 0x08, GN_SMS_UDH_WAPvCalendarSecure = 0x09, GN_SMS_UDH_VoiceMessage = 0x0a, GN_SMS_UDH_FaxMessage = 0x0b, GN_SMS_UDH_EmailMessage = 0x0c, GN_SMS_UDH_WAPPush = 0x0d, GN_SMS_UDH_OtherMessage = 0x0e, GN_SMS_UDH_Unknown = 0x0f } gn_sms_udh_type; GNOKII_API const char *gn_sms_udh_type2str(gn_sms_udh_type t); typedef struct { gn_sms_udh_type type; union { struct { unsigned short reference_number; unsigned short maximum_number; unsigned short current_number; } concatenated_short_message; /* SMS_ConcatenatedMessages */ struct { int store; unsigned short message_count; } special_sms_message_indication; /* GN_SMS_VoiceMessage, GN_SMS_FaxMessage, GN_SMS_EmailMessage, GN_SMS_OtherMessage */ struct { char network_code[6]; unsigned int width, height; } logo; /* GN_SMS_OpLogo, GN_SMS_CallerIDLogo */ struct { unsigned int notes; /* Number of the notes */ } ringtone; /* GN_SMS_Ringtone */ } u; } gn_sms_udh_info; typedef struct { unsigned int number; /* Number of the present UDH */ unsigned int length; gn_sms_udh_info udh[GN_SMS_UDH_MAX_NUMBER]; } gn_sms_udh; typedef enum { GN_SMS_MW_PID, /* Set Protocol Identifier to `Return Call Message' */ GN_SMS_MW_DCS, /* Set Data Coding Scheme "to indicate the type of * message waiting and whether there are some messages * or no messages" */ GN_SMS_MW_UDH /* Use User Data Header - Special SMS Message * Indication; the maximium level of information, * may not be supported by all phones */ } gn_sms_message_waiting_type; /*** DATA CODING SCHEME ***/ typedef enum { GN_SMS_DCS_GeneralDataCoding, GN_SMS_DCS_MessageWaiting } gn_sms_dcs_type; typedef enum { GN_SMS_DCS_DefaultAlphabet = 0x00, GN_SMS_DCS_8bit = 0x01, GN_SMS_DCS_UCS2 = 0x02 } gn_sms_dcs_alphabet_type; typedef enum { GN_SMS_DCS_VoiceMail = 0x00, GN_SMS_DCS_Fax = 0x01, GN_SMS_DCS_Email = 0x02, GN_SMS_DCS_Text = 0x03, GN_SMS_DCS_Other = 0x04 } gn_sms_dcs_indication_type; typedef struct { gn_sms_dcs_type type; union { struct { /* Message class: * 0 - no class * 1 - Class 0 * 2 - Class 1 * 3 - Class 2 * 4 - Class 3 */ unsigned short m_class; int compressed; gn_sms_dcs_alphabet_type alphabet; } general; struct { int discard; gn_sms_dcs_alphabet_type alphabet; /* ucs16 not supported */ int active; gn_sms_dcs_indication_type type; } message_waiting; } u; } gn_sms_dcs; /*** VALIDITY PERIOD ***/ typedef enum { GN_SMS_VP_None = 0x00, GN_SMS_VP_EnhancedFormat = 0x01, GN_SMS_VP_RelativeFormat = 0x02, GN_SMS_VP_AbsoluteFormat = 0x03 } gn_sms_vp_format; typedef enum { GN_SMS_VPE_None = 0x00, GN_SMS_VPE_RelativeFormat = 0x01, GN_SMS_VPE_RelativeSeconds = 0x02, /* Only one octet more is used */ GN_SMS_VPE_RelativeSemiOctet = 0x03 /* 3 octets contain relative time in hours, minutes and seconds in semi-octet representation */ } gn_sms_vp_enhanced_type; typedef struct { int extension; /* we need to set it to 0 at the moment; FIXME: how to handle `1' here? */ int single_shot; gn_sms_vp_enhanced_type type; union { unsigned short relative; unsigned short seconds; gn_timestamp hms; } period; } gn_sms_vp_enhanced; /* Validity of SMS Messages. */ typedef enum { GN_SMS_VP_1H = 0x0b, GN_SMS_VP_6H = 0x47, GN_SMS_VP_24H = 0xa7, GN_SMS_VP_72H = 0xa9, GN_SMS_VP_1W = 0xad, GN_SMS_VP_Max = 0xff } gn_sms_vp_time; GNOKII_API const char *gn_sms_vp_time2str(gn_sms_vp_time t); typedef struct { gn_sms_vp_format vpf; union { gn_sms_vp_enhanced enhanced; gn_sms_vp_time relative; /* 8 bit */ gn_timestamp absolute; } u; } gn_sms_vp; /*** MESSAGE CENTER ***/ typedef enum { GN_SMS_MF_Text = 0x00, /* Plain text message. */ GN_SMS_MF_Fax = 0x22, /* Fax message. */ GN_SMS_MF_Voice = 0x24, /* Voice mail message. */ GN_SMS_MF_ERMES = 0x25, /* ERMES message. */ GN_SMS_MF_Paging = 0x26, /* Paging. */ GN_SMS_MF_UCI = 0x2d, /* Email message in 8110i. */ GN_SMS_MF_Email = 0x32, /* Email message. */ GN_SMS_MF_X400 = 0x31 /* X.400 message. */ } gn_sms_message_format; GNOKII_API const char *gn_sms_message_format2str(gn_sms_message_format t); typedef struct { int id; /* Number of the SMSC in the phone memory. */ char name[GN_SMS_CENTER_NAME_MAX_LENGTH]; /* Name of the SMSC. */ int default_name; /* >= 1 if default name used, otherwise -1 */ gn_sms_message_format format; /* SMS is sent as text/fax/paging/email. */ gn_sms_vp_time validity; /* Validity of SMS Message. */ gn_gsm_number smsc; /* Number of the SMSC. */ gn_gsm_number recipient; /* Number of the default recipient. */ } gn_sms_message_center; /*** SHORT MESSAGE CORE ***/ typedef enum { /* First 2 digits are taken from GSM 03.40 version 6.1.0 Release 1997 * Section 9.2.3.1; 3rd digit is to mark a report. */ GN_SMS_MT_Deliver = 0x00, /* 00 0 */ GN_SMS_MT_DeliveryReport = 0x01, /* 00 1 */ GN_SMS_MT_Submit = 0x02, /* 01 0 */ GN_SMS_MT_SubmitReport = 0x03, /* 01 1 */ GN_SMS_MT_Command = 0x04, /* 10 0 */ GN_SMS_MT_StatusReport = 0x05, /* 10 1 */ /* Looks like Happy N*kia Engineers invention. Text, picture, outbox * sent templates are needed for Nokia 6510 and family. */ GN_SMS_MT_Picture = 0x07, GN_SMS_MT_TextTemplate = 0x08, GN_SMS_MT_PictureTemplate = 0x09, GN_SMS_MT_SubmitSent = 0x0a } gn_sms_message_type; GNOKII_API const char *gn_sms_message_type2str(gn_sms_message_type t); typedef enum { GN_SMS_CT_Enquiry = 0x00, /* Enquiry relating to previosly submitted short message; sets SRR to 1 */ GN_SMS_CT_CancelStatusReport = 0x01, /* Cancel Status Report Request relating to previously submitted short message; sets SRR to 0 */ GN_SMS_CT_DeleteSM = 0x02, /* Delete previously submitted Short Message; sets SRR to 0 */ GN_SMS_CT_EnableStatusReport = 0x03 /* Enable Status Report Request relating to previously submitted short message; sets SRR to 0 */ } gn_sms_command_type; typedef struct { gn_sms_command_type type; } gn_sms_message_command; /* Datatype for SMS Delivery Report Statuses */ typedef enum { GN_SMS_DR_Status_None = 0, GN_SMS_DR_Status_Invalid, GN_SMS_DR_Status_Delivered, GN_SMS_DR_Status_Pending, GN_SMS_DR_Status_Failed_Temporary, GN_SMS_DR_Status_Failed_Permanent /* FIXME: add more reasons for failure? */ } gn_sms_delivery_report_status; /* Datatype for SMS status */ typedef enum { GN_SMS_Unknown= 0x00, GN_SMS_Read = 0x01, GN_SMS_Unread = 0x03, GN_SMS_Sent = 0x05, GN_SMS_Unsent = 0x07 } gn_sms_message_status; GNOKII_API const char *gn_sms_message_status2str(gn_sms_message_status t); typedef enum { GN_SMS_DATA_None = 0x00, GN_SMS_DATA_Text = 0x01, GN_SMS_DATA_Bitmap = 0x02, GN_SMS_DATA_Ringtone = 0x03, GN_SMS_DATA_iMelody = 0x04, GN_SMS_DATA_Multi = 0x05, GN_SMS_DATA_NokiaText = 0x06, GN_SMS_DATA_Animation = 0x07, GN_SMS_DATA_Concat = 0x08, GN_SMS_DATA_WAPPush = 0x09, GN_SMS_DATA_Other = 0x0a } gn_sms_data_type; /*** FOLDER INFO ***/ typedef enum { GN_SMS_FLD_Old = 0x00, GN_SMS_FLD_New = 0x01, GN_SMS_FLD_Deleted = 0x02, GN_SMS_FLD_ToBeRemoved = 0x03, GN_SMS_FLD_NotRead = 0x04, GN_SMS_FLD_NotReadHandled = 0x05, GN_SMS_FLD_Changed = 0x06 } gn_sms_location_status; typedef struct { gn_sms_location_status status; /* deleted, new, old, ToBeRemoved */ unsigned int location; gn_sms_message_type message_type; } gn_sms_message_list; typedef struct { int number; /* -1 if folder is not supported by the phone */ unsigned int unread; /* only valid for INBOX */ unsigned int changed; unsigned int used; /* because 'Used' can vary from 'Number' when we have deleted messages */ } gn_sms_folder_stats; typedef struct { unsigned char binary[GN_SMS_MAX_LENGTH]; int curr, total; /* Number of this part, total number of parts */ } gn_sms_multi; typedef struct { int curr, total, serial; } gn_sms_concat; typedef struct { gn_sms_data_type type; unsigned int length; /* Number of bytes used */ unsigned int chars; /* Number of chars used */ union { unsigned char text[10 * GN_SMS_MAX_LENGTH + 1]; gn_sms_multi multi; gn_bmp bitmap; gn_ringtone ringtone; gn_bmp animation[4]; gn_sms_concat concat; } u; /* That should be in the union, but for delivery reports we already * set text there. Currently we don't want to break API, so I put it here * Pawel Kot, 2007-11-21 */ gn_sms_delivery_report_status dr_status; } gn_sms_user_data; /* Define datatype for SMS messages exported to the user applications. */ typedef struct { /* General fields */ gn_sms_message_type type; /* Type of the message. */ int delivery_report; /* Do we request the delivery report? Only for setting. */ gn_sms_message_status status; /* Status of the message read/unread/sent/unsent. */ unsigned int validity; /* Message validity in minutes. Only for setting. */ gn_memory_type memory_type; /* Memory type where the message is/should be stored. */ unsigned int number; /* Location of the message in the memory/folder. */ /* Number related fields */ gn_gsm_number smsc; /* SMSC Number. */ gn_gsm_number remote; /* Remote (sender/recipient) number. */ /* Data format fields */ gn_sms_dcs dcs; gn_sms_user_data user_data[GN_SMS_PART_MAX_NUMBER]; gn_sms_udh udh; /* Date fields */ gn_timestamp smsc_time; /* SMSC Timestamp. Only for reading. */ gn_timestamp time; /* Delivery timestamp. Only for reading. */ /* Additional fields. Read only. Set by gn_sms_send(). *reference needs to be freed when not needed anymore. */ unsigned int parts; /* Number of parts. For SMS send request, it is set to number of SMS the message was splitted. */ unsigned int *reference; /* List of reference numbers of the message sent. */ } gn_sms; /* Define datatype for SMS messages, describes precisely GSM Spec 03.40 */ typedef struct { unsigned int type; /* Message Type Indicator - 2 bits (9.2.3.1) */ int more_messages; /* More Messages to Send (9.2.3.2) */ int reply_via_same_smsc; /* Reply Path (9.2.3.17) - `Reply via same centre' in the phone */ int reject_duplicates; /* Reject Duplicates (9.2.3.25) */ int report; /* Status Report (9.2.3.4, 9.2.3.5 & 9.2.3.26) - `Delivery reports' in the phone */ unsigned int number; /* Message Number - 8 bits (9.2.3.18) */ unsigned int reference; /* Message Reference - 8 bit (9.2.3.6) */ unsigned int pid; /* Protocol Identifier - 8 bit (9.2.3.9) */ unsigned int report_status; /* Status - 8 bit (9.2.3.15), Failure Cause (9.2.3.22) */ unsigned char smsc_time[GN_SMS_DATETIME_MAX_LENGTH]; /* Service Centre Time Stamp (9.2.3.11) */ unsigned char time[GN_SMS_DATETIME_MAX_LENGTH]; /* Discharge Time (9.2.3.13) */ unsigned char message_center[GN_SMS_SMSC_NUMBER_MAX_LENGTH];/* SMSC Address (9.2.3.7, 9.2.3.8, 9.2.3.14) */ unsigned char remote_number[GN_SMS_NUMBER_MAX_LENGTH]; /* Origination, destination, Recipient Address (9.2.3.7, 9.2.3.8, 9.2.3.14) */ unsigned int dcs; /* Data Coding Scheme (9.2.3.10) */ unsigned int length; /* User Data Length (9.2.3.16), Command Data Length (9.2.3.20) */ int udh_indicator; unsigned char user_data[GN_SMS_LONG_MAX_LENGTH]; /* User Data (9.2.3.24), Command Data (9.2.3.21), extended to Nokia Multipart Messages from Smart Messaging Specification 3.0.0 */ int user_data_length; /* Length of just previous field */ gn_sms_vp_format validity_indicator; unsigned char validity[GN_SMS_VP_MAX_LENGTH]; /* Validity Period Format & Validity Period (9.2.3.3 & 9.2.3.12) - `Message validity' in the phone */ /* Other fields */ unsigned int memory_type; /* MemoryType (for 6210/7110): folder indicator */ unsigned int status; /* Status of the message: sent/read or unsent/unread */ } gn_sms_raw; /*** FOLDERS ***/ /*** Datatype for SMS folders ***/ /* Max name length is 32 characters and trailing \0 */ #define GN_SMS_FOLDER_NAME_MAX_LENGTH 33 typedef struct { /* Name for SMS folder. */ char name[GN_SMS_FOLDER_NAME_MAX_LENGTH]; /* if folder contains sender, SMSC number and sending date */ int sms_data; /* locations of SMS messages in that folder (6210 specific) */ unsigned int locations[GN_SMS_MESSAGE_MAX_NUMBER]; /* number of SMS messages in that folder*/ unsigned int number; /* ID of the current folder */ unsigned int folder_id; } gn_sms_folder; typedef struct { gn_sms_folder folder[GN_SMS_FOLDER_MAX_NUMBER]; /* ID specific for this folder and phone. Used in internal functions. * Do not use it. */ unsigned int folder_id[GN_SMS_FOLDER_MAX_NUMBER]; /* number of SMS folders */ unsigned int number; } gn_sms_folder_list; /*** CELL BROADCAST ***/ #define GN_CM_MESSAGE_MAX_LENGTH 160 /* Define datatype for Cell Broadcast message */ typedef struct { int channel; char message[GN_CM_MESSAGE_MAX_LENGTH + 1]; int is_new; } gn_cb_message; GNOKII_API void gn_sms_default_submit(gn_sms *sms); GNOKII_API void gn_sms_default_deliver(gn_sms *sms); /* WAPPush */ typedef struct { unsigned char wsp_tid; unsigned char wsp_pdu; unsigned char wsp_hlen; unsigned char wsp_content_type; unsigned char version; /* wbxml version */ unsigned char public_id; unsigned char charset; /* default 106 = UTF-8 */ unsigned char stl; } gn_wap_push_header; typedef struct { gn_wap_push_header header; char *url; char *text; char *data; int data_len; } gn_wap_push; GNOKII_API void gn_wap_push_init(gn_wap_push *wp); GNOKII_API gn_error gn_wap_push_encode(gn_wap_push *wp); #endif /* _gnokii_sms_h */ gnokii-0.6.31/include/gnokii/error.h0000644000175000017500000000727111666163120015417 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings, Pavel Janik Copyright (C) 2001-2004 BORBELY Zoltan, Pawel Kot Error codes. */ #ifndef _gnokii_error_h #define _gnokii_error_h /* * Define standard GSM error/return code values. These codes are also used for * some internal functions such as SIM read/write in the model specific code. */ typedef enum { /* General codes */ GN_ERR_NONE = 0, /* No error. */ GN_ERR_FAILED, /* Command failed. */ GN_ERR_UNKNOWNMODEL, /* Model specified isn't known/supported. */ GN_ERR_INVALIDSECURITYCODE, /* Invalid Security code. */ GN_ERR_INTERNALERROR, /* Problem occured internal to model specific code. */ GN_ERR_NOTIMPLEMENTED, /* Command called isn't implemented in model. */ GN_ERR_NOTSUPPORTED, /* Function not supported by the phone */ GN_ERR_USERCANCELED, /* User aborted the action. */ GN_ERR_UNKNOWN, /* Unknown error - well better than nothing!! */ GN_ERR_MEMORYFULL, /* The specified memory is full. */ /* Statemachine */ GN_ERR_NOLINK, /* Couldn't establish link with phone. */ GN_ERR_TIMEOUT, /* Command timed out. */ GN_ERR_TRYAGAIN, /* Try again. */ GN_ERR_WAITING, /* Waiting for the next part of the message. */ GN_ERR_NOTREADY, /* Device not ready. */ GN_ERR_BUSY, /* Command is still being executed. */ /* Locations */ GN_ERR_INVALIDLOCATION, /* The given memory location has not valid location. */ GN_ERR_INVALIDMEMORYTYPE, /* Invalid type of memory. */ GN_ERR_EMPTYLOCATION, /* The given location is empty. */ /* Format */ GN_ERR_ENTRYTOOLONG, /* The given entry is too long */ GN_ERR_WRONGDATAFORMAT, /* Data format is not valid */ GN_ERR_INVALIDSIZE, /* Wrong size of the object */ /* The following are here in anticipation of data call requirements. */ GN_ERR_LINEBUSY, /* Outgoing call requested reported line busy */ GN_ERR_NOCARRIER, /* No Carrier error during data call setup ? */ /* The following value signals the current frame is unhandled */ GN_ERR_UNHANDLEDFRAME, /* The current frame isn't handled by the incoming function */ GN_ERR_UNSOLICITED, /* Unsolicited message received. */ /* Other */ GN_ERR_NONEWCBRECEIVED, /* Attempt to read CB when no new CB received */ GN_ERR_SIMPROBLEM, /* SIM card missing or damaged */ GN_ERR_CODEREQUIRED, /* PIN or PUK code required */ GN_ERR_NOTAVAILABLE, /* The requested information is not available */ /* Config */ GN_ERR_NOCONFIG, /* Config file cannot be found */ GN_ERR_NOPHONE, /* Either global or given phone section cannot be found */ GN_ERR_NOLOG, /* Incorrect logging section configuration */ GN_ERR_NOMODEL, /* No phone model specified */ GN_ERR_NOPORT, /* No port specified */ GN_ERR_NOCONNECTION, /* No connection type specified */ GN_ERR_LOCKED, /* Device is locked and cannot unlock */ GN_ERR_ASYNC /* The actual response will be sent asynchronously */ } gn_error; GNOKII_API char *gn_error_print(gn_error e); #endif /* _gnokii_error_h */ gnokii-0.6.31/include/gnokii/virtmodem.h0000644000175000017500000000257111666163120016272 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janík ml. Copyright (C) 2001 Chris Kemp Copyright (C) 2002-2003 Pawel Kot, BORBELY Zoltan Header file for virtmodem code in virtmodem.c */ #ifndef _gnokii_virtmodem_h #define _gnokii_virtmodem_h struct vm_queue { int n; int head; int tail; unsigned char buf[256]; }; extern struct vm_queue queue; /* Prototypes */ GNOKII_API int gn_vm_initialise(const char *iname, const char *bindir, int debug_mode, int gn_init); GNOKII_API void gn_vm_loop(void); GNOKII_API void gn_vm_terminate(void); #endif /* _gnokii_virtmodem_h */ gnokii-0.6.31/include/gnokii/networks.h0000644000175000017500000000360711666163120016141 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janík ml. Copyright (C) 2002 Pawel Kot Header file for GSM networks. */ #ifndef _gnokii_networks_h #define _gnokii_networks_h /* This type is used to hold information about various GSM networks. */ typedef struct { char *code; /* GSM network code */ char *name; /* GSM network name */ } gn_network; /* This type is used to hold information about various GSM countries. */ typedef struct { char *code; /* GSM country code */ char *name; /* GSM country name */ } gn_country; GNOKII_API char *gn_network_name_get(char *network_code); GNOKII_API char *gn_network_code_get(char *network_name); GNOKII_API char *gn_network_code_find(char *network_name, char *country_name); GNOKII_API char *gn_country_name_translate(char *country_name); GNOKII_API char *gn_country_name_get(char *country_code); GNOKII_API char *gn_country_code_get(char *country_name); GNOKII_API int gn_network_get(gn_network *network, int index); GNOKII_API int gn_country_get(gn_country *country, int index); GNOKII_API char *gn_network2country(char *network); #endif /* _gnokii_networks_h */ gnokii-0.6.31/include/gnokii/call.h0000644000175000017500000000551011666163120015173 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings, Pavel Janik Copyright (C) 2002-2003 Pawel Kot, BORBELY Zoltan Include file for the call management library. */ #ifndef _gnokii_call_h #define _gnokii_call_h #include typedef enum { GN_CALL_Voice, /* Voice call */ GN_CALL_NonDigitalData, /* Data call on non digital line */ GN_CALL_DigitalData /* Data call on digital line */ } gn_call_type; typedef enum { GN_CALL_Never, /* Never send my number */ GN_CALL_Always, /* Always send my number */ GN_CALL_Default /* Use the network default settings */ } gn_call_send_number; typedef enum { GN_CALL_Idle, GN_CALL_Ringing, GN_CALL_Dialing, GN_CALL_Incoming, /* Incoming call */ GN_CALL_LocalHangup, /* Local end terminated the call */ GN_CALL_RemoteHangup, /* Remote end terminated the call */ GN_CALL_Established, /* Remote end answered the call */ GN_CALL_Held, /* Call placed on hold */ GN_CALL_Resumed /* Held call resumed */ } gn_call_status; typedef struct { gn_call_type type; char number[GN_PHONEBOOK_NUMBER_MAX_LENGTH + 1]; char name[GN_PHONEBOOK_NAME_MAX_LENGTH + 1]; gn_call_send_number send_number; int call_id; } gn_call_info; typedef struct { int call_id; int channel; char number[GN_PHONEBOOK_NUMBER_MAX_LENGTH + 1]; char name[GN_PHONEBOOK_NAME_MAX_LENGTH + 1]; gn_call_status state; gn_call_status prev_state; } gn_call_active; /* Call functions and structs */ typedef struct { struct gn_statemachine *state; int call_id; gn_call_status status; gn_call_type type; char remote_number[GN_PHONEBOOK_NUMBER_MAX_LENGTH + 1]; char remote_name[GN_PHONEBOOK_NAME_MAX_LENGTH + 1]; struct timeval start_time; struct timeval answer_time; int local_originated; } gn_call; #define GN_CALL_MAX_PARALLEL 2 GNOKII_API void gn_call_notifier(gn_call_status call_status, gn_call_info *call_info, struct gn_statemachine *state); GNOKII_API gn_call *gn_call_get_active(int call_id); GNOKII_API gn_error gn_call_answer(int call_id); GNOKII_API gn_error gn_call_cancel(int call_id); #endif /* _gnokii_call_h */ gnokii-0.6.31/include/gnokii/ringtones.h0000644000175000017500000001440511666163120016273 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janík ml. Copyright (C) 2000 Marcin Wiacek, Chris Kemp Copyright (C) 2001-2003 Pawel Kot Copyright (C) 2002-2003 BORBELY Zoltan This file provides definitions of macros from the Smart Messaging Specification. It is mainly rewrite of the spec to C :-) Viva Nokia! */ #ifndef _gnokii_ringtones_h #define _gnokii_ringtones_h #include /* NoteValue is encoded as octave(scale)*14 + note */ /* where for note: c=0, d=2, e=4 .... */ /* ie. c#=1 and 5 and 13 are invalid */ /* note=255 means a pause */ #define GN_RINGTONE_MAX_NOTES 1024 /* Structure to hold note of ringtone. */ typedef struct { unsigned char duration; unsigned char note; } gn_ringtone_note; /* Structure to hold ringtones. */ typedef struct { int location; char name[20]; unsigned char tempo; unsigned int notes_count; gn_ringtone_note notes[GN_RINGTONE_MAX_NOTES]; } gn_ringtone; #define gn_ringtone_get_bit(stream, bitno) stream[(bitno) / 8] & 1 << (7 - ((bitno) % 8)) #define gn_ringtone_set_bit(stream, bitno) stream[(bitno) / 8] |= 1 << (7 - ((bitno) % 8)) #define gn_ringtone_clear_bit(stream, bitno) stream[(bitno) / 8] &= 255 - (1 << (7 - ((bitno) % 8))) /* These values are from Smart Messaging Specification Revision 2.0.0 pages 3-23, ..., 3-29 */ /* Command-Part Encoding */ #define GN_RINGTONE_CancelCommand (0x05 << 1) /* binary 0000 101 */ #define GN_RINGTONE_Programming (0x25 << 1) /* binary 0100 101 */ #define GN_RINGTONE_Sound (0x1d << 1) /* binary 0011 101 */ #define GN_RINGTONE_Unicode (0x22 << 1) /* binary 0100 010 */ /* Song-Type Encoding */ #define GN_RINGTONE_BasicSongType (0x01 << 5) /* binary 001 */ #define GN_RINGTONE_TemporarySongType (0x02 << 5) /* binary 010 */ #define GN_RINGTONE_MidiSongType (0x03 << 5) /* binary 011 */ #define GN_RINGTONE_DigitizedSongType (0x04 << 5) /* binary 100 */ /* Instruction ID Encoding */ #define GN_RINGTONE_PatternHeaderId (0x00 << 5) /* binary 000 */ #define GN_RINGTONE_NoteInstructionId (0x01 << 5) /* binary 001 */ #define GN_RINGTONE_ScaleInstructionId (0x02 << 5) /* binary 010 */ #define GN_RINGTONE_StyleInstructionId (0x03 << 5) /* binary 011 */ #define GN_RINGTONE_TempoInstructionId (0x04 << 5) /* binary 100 */ #define GN_RINGTONE_VolumeInstructionId (0x05 << 5) /* binary 101 */ /* Style-Value Encoding*/ #define GN_RINGTONE_NaturalStyle (0x00 << 6) /* binary 00 */ #define GN_RINGTONE_ContinuousStyle (0x01 << 6) /* binary 01 */ #define GN_RINGTONE_StaccatoStyle (0x02 << 6) /* binary 11 */ /* Note-Scale Encoding */ #define GN_RINGTONE_Scale1 (0x00 << 6) /* binary 00 */ #define GN_RINGTONE_Scale2 (0x01 << 6) /* binary 01 */ #define GN_RINGTONE_Scale3 (0x02 << 6) /* binary 10 */ #define GN_RINGTONE_Scale4 (0x03 << 6) /* binary 11 */ /* Note-Value Encoding */ #define GN_RINGTONE_Note_Pause (0x00 << 4) /* binary 0000 */ #define GN_RINGTONE_Note_C (0x01 << 4) /* binary 0001 */ #define GN_RINGTONE_Note_Cis (0x02 << 4) /* binary 0010 */ #define GN_RINGTONE_Note_D (0x03 << 4) /* binary 0011 */ #define GN_RINGTONE_Note_Dis (0x04 << 4) /* binary 0100 */ #define GN_RINGTONE_Note_E (0x05 << 4) /* binary 0101 */ #define GN_RINGTONE_Note_F (0x06 << 4) /* binary 0110 */ #define GN_RINGTONE_Note_Fis (0x07 << 4) /* binary 0111 */ #define GN_RINGTONE_Note_G (0x08 << 4) /* binary 1000 */ #define GN_RINGTONE_Note_Gis (0x09 << 4) /* binary 1001 */ #define GN_RINGTONE_Note_A (0x0a << 4) /* binary 1010 */ #define GN_RINGTONE_Note_Ais (0x0b << 4) /* binary 1011 */ #define GN_RINGTONE_Note_H (0x0c << 4) /* binary 1100 */ /* Note-Duration Encoding */ #define GN_RINGTONE_Duration_Full (0x00 << 5) /* binary 000 */ #define GN_RINGTONE_Duration_1_2 (0x01 << 5) /* binary 001 */ #define GN_RINGTONE_Duration_1_4 (0x02 << 5) /* binary 010 */ #define GN_RINGTONE_Duration_1_8 (0x03 << 5) /* binary 011 */ #define GN_RINGTONE_Duration_1_16 (0x04 << 5) /* binary 100 */ #define GN_RINGTONE_Duration_1_32 (0x05 << 5) /* binary 101 */ /* Note-Duration-Specifier Encoding */ #define GN_RINGTONE_NoSpecialDuration (0x00 << 6) /* binary 00 */ #define GN_RINGTONE_DottedNote (0x01 << 6) /* binary 01 */ #define GN_RINGTONE_DoubleDottedNote (0x02 << 6) /* binary 10 */ #define GN_RINGTONE_Length_2_3 (0x03 << 6) /* binary 11 */ /* Pattern ID Encoding */ #define GN_RINGTONE_A_part (0x00 << 6) /* binary 00 */ #define GN_RINGTONE_B_part (0x01 << 6) /* binary 01 */ #define GN_RINGTONE_C_part (0x02 << 6) /* binary 10 */ #define GN_RINGTONE_D_part (0x03 << 6) /* binary 11 */ /* Command-End */ #define GN_RINGTONE_CommandEnd (0x00) /* binary 00000000 */ /* Definition of the Note type */ typedef struct { int scale; int note_id; int duration; int duration_specifier; } gn_note; #define GN_RINGTONE_PACKAGE_MAX_LENGTH 200 /* From PC Composer help */ #define GN_RINGTONE_NOTES_MAX_NUMBER 130 GNOKII_API gn_error gn_file_ringtone_read(char *filename, gn_ringtone *ringtone); GNOKII_API gn_error gn_file_ringtone_save(char *filename, gn_ringtone *ringtone); GNOKII_API unsigned char gn_ringtone_pack(gn_ringtone *ringtone, unsigned char *package, int *maxlength); GNOKII_API gn_error gn_ringtone_unpack(gn_ringtone *ringtone, unsigned char *package, int maxlength); GNOKII_API int gn_note_get(int number); GNOKII_API void gn_ringtone_get_tone(const gn_ringtone *ringtone, int n, int *freq, int *ulen); GNOKII_API void gn_ringtone_set_duration(gn_ringtone *ringtone, int n, int ulen); #endif /* _gnokii_ringtones_h */ gnokii-0.6.31/include/gnokii/common.h0000644000175000017500000007126211666163120015557 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for Nokia the phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janík ml. Copyright (C) 2001-2004 Pawel Kot, BORBELY Zoltan Copyright (C) 2001 Manfred Jonsson, Marian Jancar, Chris Kemp, Marcin Wiacek Copyright (C) 2001-2002 Pavel Machek Copyright (C) 2002 Markus Plail Header file for the definitions, enums etc. that are used by all models of handset. */ #ifndef _gnokii_common_h #define _gnokii_common_h #include /* Type of connection. Now we support serial connection with FBUS cable and IR (only with 61x0 models) */ typedef enum { GN_CT_NONE = -1,/* no connection type (error) */ GN_CT_Serial, /* Serial connection. */ GN_CT_DAU9P, /* Serial connection using DAU9P cable; use only with 6210/7110 if you want faster initialization */ GN_CT_DLR3P, /* Serial connection using DLR3P cable */ GN_CT_Infrared, /* Infrared connection. */ GN_CT_Irda, /* Linux IrDA support */ GN_CT_Bluetooth,/* Linux Bluetooth support */ GN_CT_Tekram, /* Tekram Ir-Dongle */ GN_CT_TCP, /* TCP network connection */ GN_CT_M2BUS, /* Serial connection with M2BUS protocol */ GN_CT_DKU2, /* DKU2 usb connection using nokia_dku2 kernel driver */ GN_CT_DKU2LIBUSB, /* DKU2 usb connection using libusb */ GN_CT_PCSC, /* PC/SC SIM Card reader using libpsclite */ GN_CT_SOCKETPHONET /* Linux PHONET kernel driver */ } gn_connection_type; GNOKII_API const char *gn_connection_type2str(gn_connection_type t); /* Maximum length of device name for serial port */ #define GN_DEVICE_NAME_MAX_LENGTH (32) /* Define an enum for specifying memory types for retrieving phonebook entries, SMS messages etc. This type is not mobile specific - the model code should take care of translation to mobile specific numbers - see 6110 code. 01/07/99: Two letter codes follow GSM 07.07 release 6.2.0 */ typedef enum { GN_MT_ME, /* Internal memory of the mobile equipment */ GN_MT_SM, /* SIM card memory */ GN_MT_FD, /* Fixed dial numbers */ GN_MT_ON, /* Own numbers */ GN_MT_EN, /* Emergency numbers */ GN_MT_DC, /* Dialled numbers */ GN_MT_RC, /* Received numbers */ GN_MT_MC, /* Missed numbers */ GN_MT_LD, /* Last dialled */ GN_MT_BD, /* Barred Dialling Numbers */ GN_MT_SD, /* Service Dialling Numbers */ GN_MT_MT, /* combined ME and SIM phonebook */ GN_MT_TA, /* for compatibility only: TA=computer memory */ GN_MT_CB, /* Currently selected memory */ GN_MT_IN, /* Inbox for folder aware phones */ GN_MT_OU, /* Outbox, sent items */ GN_MT_AR, /* Archive */ GN_MT_TE, /* Templates */ GN_MT_SR, /* Status reports */ GN_MT_DR, /* Drafts */ GN_MT_OUS, /* Outbox, items to be sent */ GN_MT_F1, /* 1st CUSTOM FOLDER */ GN_MT_F2, GN_MT_F3, GN_MT_F4, GN_MT_F5, GN_MT_F6, GN_MT_F7, GN_MT_F8, GN_MT_F9, GN_MT_F10, GN_MT_F11, GN_MT_F12, GN_MT_F13, GN_MT_F14, GN_MT_F15, GN_MT_F16, GN_MT_F17, GN_MT_F18, GN_MT_F19, GN_MT_F20, /* 20th CUSTOM FOLDER */ GN_MT_BM, /* Cell Broadcast Messages */ GN_MT_LAST = GN_MT_BM, GN_MT_XX = 0xff /* Error code for unknown memory type (returned by fbus-xxxx functions). */ } gn_memory_type; GNOKII_API gn_memory_type gn_str2memory_type(const char *s); GNOKII_API const char *gn_memory_type2str(gn_memory_type mt); /* Power source types - see subclause 8.4 of ETSI TS 127 007 V8.6.0 (2009-01) */ typedef enum { GN_PS_UNKNOWN, /* +CME ERROR: ... */ GN_PS_ACDC = 1, /* +CBC: 1,... AC/DC powered (charging) */ GN_PS_BATTERY, /* +CBC: 0,... Battery powered (not charging) */ GN_PS_NOBATTERY, /* +CBC: 2,... No battery */ GN_PS_FAULT /* +CBC: 3,... There is a power fault and calls are inhibited */ } gn_power_source; GNOKII_API const char *gn_power_source2str(gn_power_source s); /* Definition of security codes. */ typedef enum { GN_SCT_SecurityCode = 0x01, /* Security code. */ GN_SCT_Pin, /* PIN. */ GN_SCT_Pin2, /* PIN 2. */ GN_SCT_Puk, /* PUK. */ GN_SCT_Puk2, /* PUK 2. */ GN_SCT_None /* Code not needed. */ } gn_security_code_type; GNOKII_API const char *gn_security_code_type2str(gn_security_code_type t); /* Security code definition. */ typedef struct { gn_security_code_type type; /* Type of the code. */ char code[10]; /* Actual code. */ char new_code[10]; /* New code. */ } gn_security_code; /* This structure is used to get the current network status */ typedef struct { char network_code[10]; /* GSM network code */ unsigned char cell_id[10]; /* CellID */ unsigned char LAC[10]; /* LAC */ } gn_network_info; /* Limits for sizing of array in gn_phonebook_entry. Individual handsets may not support these lengths so they have their own limits set. */ #define GN_PHONEBOOK_NAME_MAX_LENGTH 61 /* For 6510 */ #define GN_PHONEBOOK_NUMBER_MAX_LENGTH 49 /* For 6510 */ #define GN_PHONEBOOK_SUBENTRIES_MAX_NUMBER 64 /* it was 10 for 6510, but modern phones supports more */ /* 7110 is able to have in one * entry 5 numbers and 4 * texts [email,notice,postal,url]. * Dirk reported on gnokii-users that N70 has the following additional fields: * - Company * - Position * - Aliasname * - DTMF * - User ID * - all postal fields: * - PO Box * - Addition * - Street * - Zip Code * - City * - State/Province * - Country * - Birthday */ #define GN_PHONEBOOK_CALLER_GROUPS_MAX_NUMBER 5 #define GN_PHONEBOOK_ENTRY_MAX_LENGTH 1024 /* This data type is used to report the number of used and free positions in memory (sim or internal). */ typedef struct { gn_memory_type memory_type; /* Type of the memory */ int used; /* Number of used positions */ int free; /* Number of free positions */ } gn_memory_status; /* General date and time structure. It is used for the SMS, calendar, alarm * settings, clock etc. */ typedef struct { int year; /* The complete year specification - e.g. 1999. Y2K :-) */ int month; /* January = 1 */ int day; int hour; int minute; int second; int timezone; /* The difference between local time and GMT. Note that different SMSC software treat this field in the different ways. */ } gn_timestamp; /* Some phones (at the moment 7110/6510 series) supports extended phonebook with additional data. Here we have structures for them */ typedef enum { GN_PHONEBOOK_NUMBER_None = 0x00, GN_PHONEBOOK_NUMBER_Common = 0x01, GN_PHONEBOOK_NUMBER_Home = 0x02, GN_PHONEBOOK_NUMBER_Mobile = 0x03, GN_PHONEBOOK_NUMBER_Fax = 0x04, GN_PHONEBOOK_NUMBER_Work = 0x06, GN_PHONEBOOK_NUMBER_General = 0x0a, } gn_phonebook_number_type; GNOKII_API const char *gn_phonebook_number_type2str(gn_phonebook_number_type t); typedef enum { GN_PHONEBOOK_ENTRY_Name = 0x07, GN_PHONEBOOK_ENTRY_Email = 0x08, GN_PHONEBOOK_ENTRY_Postal = 0x09, GN_PHONEBOOK_ENTRY_Note = 0x0a, GN_PHONEBOOK_ENTRY_Number = 0x0b, GN_PHONEBOOK_ENTRY_Ringtone = 0x0c, /* Ringtone */ GN_PHONEBOOK_ENTRY_Date = 0x13, /* Date is used for DC,RC,etc (last calls) */ GN_PHONEBOOK_ENTRY_Pointer = 0x1a, /* Pointer to the other memory */ GN_PHONEBOOK_ENTRY_Logo = 0x1b, /* Bitmap */ GN_PHONEBOOK_ENTRY_LogoSwitch = 0x1c, GN_PHONEBOOK_ENTRY_Group = 0x1e, /* Octect */ GN_PHONEBOOK_ENTRY_URL = 0x2c, GN_PHONEBOOK_ENTRY_Location = 0x2f, /* Octect */ GN_PHONEBOOK_ENTRY_Image = 0x33, /* File ID */ GN_PHONEBOOK_ENTRY_RingtoneAdv = 0x37, /* File ID or Ringtone */ GN_PHONEBOOK_ENTRY_UserID = 0x38, GN_PHONEBOOK_ENTRY_PTTAddress = 0x3f, GN_PHONEBOOK_ENTRY_ExtGroup = 0x43, GN_PHONEBOOK_ENTRY_Video = 0x45, /* File ID */ GN_PHONEBOOK_ENTRY_FirstName = 0x46, GN_PHONEBOOK_ENTRY_LastName = 0x47, GN_PHONEBOOK_ENTRY_PostalAddress = 0x4a, GN_PHONEBOOK_ENTRY_ExtendedAddress = 0x4b, GN_PHONEBOOK_ENTRY_Street = 0x4c, GN_PHONEBOOK_ENTRY_City = 0x4d, GN_PHONEBOOK_ENTRY_StateProvince = 0x4e, GN_PHONEBOOK_ENTRY_ZipCode = 0x4f, GN_PHONEBOOK_ENTRY_Country = 0x50, GN_PHONEBOOK_ENTRY_FormalName = 0x52, GN_PHONEBOOK_ENTRY_JobTitle = 0x54, GN_PHONEBOOK_ENTRY_Company = 0x55, GN_PHONEBOOK_ENTRY_Nickname = 0x56, GN_PHONEBOOK_ENTRY_Birthday = 0x57, /* Date */ } gn_phonebook_entry_type; GNOKII_API const char *gn_phonebook_entry_type2str(gn_phonebook_entry_type t); GNOKII_API const char *gn_subentrytype2string(gn_phonebook_entry_type entry_type, gn_phonebook_number_type number_type); typedef enum { GN_PHONEBOOK_GROUP_Family, GN_PHONEBOOK_GROUP_Vips, GN_PHONEBOOK_GROUP_Friends, GN_PHONEBOOK_GROUP_Work, GN_PHONEBOOK_GROUP_Others, GN_PHONEBOOK_GROUP_None, } gn_phonebook_group_type; GNOKII_API const char *gn_phonebook_group_type2str(gn_phonebook_group_type t); #define GN_PHONEBOOK_PERSON_MAX_LENGTH 64 typedef struct { int has_person; char family_name[GN_PHONEBOOK_PERSON_MAX_LENGTH + 1]; /* GN_PHONEBOOK_ENTRY_LastName */ char given_name[GN_PHONEBOOK_PERSON_MAX_LENGTH + 1]; /* GN_PHONEBOOK_ENTRY_FirstName */ char additional_names[GN_PHONEBOOK_PERSON_MAX_LENGTH + 1]; char honorific_prefixes[GN_PHONEBOOK_PERSON_MAX_LENGTH + 1]; /* GN_PHONEBOOK_ENTRY_FormalName */ char honorific_suffixes[GN_PHONEBOOK_PERSON_MAX_LENGTH + 1]; } gn_phonebook_person; #define GN_PHONEBOOK_ADDRESS_MAX_LENGTH 64 typedef struct { int has_address; char post_office_box[GN_PHONEBOOK_ADDRESS_MAX_LENGTH + 1]; /* GN_PHONEBOOK_ENTRY_PostalAddress */ char extended_address[GN_PHONEBOOK_ADDRESS_MAX_LENGTH + 1]; /* GN_PHONEBOOK_ENTRY_ExtendedAddress */ char street[GN_PHONEBOOK_ADDRESS_MAX_LENGTH + 1]; /* GN_PHONEBOOK_ENTRY_Street */ char city[GN_PHONEBOOK_ADDRESS_MAX_LENGTH + 1]; /* GN_PHONEBOOK_ENTRY_City */ char state_province[GN_PHONEBOOK_ADDRESS_MAX_LENGTH + 1]; /* GN_PHONEBOOK_ENTRY_StateProvince */ char zipcode[GN_PHONEBOOK_ADDRESS_MAX_LENGTH + 1]; /* GN_PHONEBOOK_ENTRY_ZipCode */ char country[GN_PHONEBOOK_ADDRESS_MAX_LENGTH + 1]; /* GN_PHONEBOOK_ENTRY_Country */ } gn_phonebook_address; typedef struct { gn_phonebook_entry_type entry_type; gn_phonebook_number_type number_type; union { char number[GN_PHONEBOOK_NAME_MAX_LENGTH + 1]; /* Number, Name, Address, eMail... */ /* GN_PHONEBOOK_ENTRY_Date * GN_PHONEBOOK_ENTRY_Birthday */ gn_timestamp date; /* or the last calls list */ /* GN_PHONEBOOK_ENTRY_Image * GN_PHONEBOOK_ENTRY_RingtoneAdv */ char fileid[6]; /* Bitmap or ringtone fileid */ /* GN_PHONEBOOK_ENTRY_ExtGroup */ int id; /* Any number, like ID */ } data; int id; } gn_phonebook_subentry; /* Define datatype for phonebook entry, used for getting/writing phonebook entries. */ typedef struct { int empty; /* Is this entry empty? */ char name[GN_PHONEBOOK_NAME_MAX_LENGTH + 1]; /* Plus 1 for nullterminator. */ char number[GN_PHONEBOOK_NUMBER_MAX_LENGTH + 1]; /* Number */ gn_memory_type memory_type; /* Type of memory */ gn_phonebook_group_type caller_group; /* Caller group - gn_phonebook_group_type */ int location; /* Location */ gn_timestamp date; /* The record date and time of the number. */ gn_phonebook_person person; /* Personal information */ gn_phonebook_address address; /* Address information */ gn_phonebook_subentry subentries[GN_PHONEBOOK_SUBENTRIES_MAX_NUMBER]; /* For phones with * additional phonebook * entries */ int subentries_count; /* Should be set to 0, if extended phonebook is not used */ } gn_phonebook_entry; /* This define speed dialling entries. */ typedef struct { int number; /* Which number is used to dialling? */ gn_memory_type memory_type; /* Memory type of the number. */ int location; /* Location of the number in MemoryType. */ } gn_speed_dial; /* Define enum used to describe what sort of date/time support is available. */ typedef enum { GN_DT_None, /* The mobile phone doesn't support time and date. */ GN_DT_TimeOnly, /* The mobile phone supports only time. */ GN_DT_DateOnly, /* The mobile phone supports only date. */ GN_DT_DateTime /* Wonderful phone - it supports date and time. */ } gn_datetime_support; /* Define enums for RF units. GRF_CSQ asks for units in form used in AT+CSQ command as defined by GSM 07.07 */ typedef enum { GN_RF_Arbitrary, GN_RF_dBm, GN_RF_mV, GN_RF_uV, GN_RF_CSQ, GN_RF_Percentage } gn_rf_unit; /* Define enums for Battery units. */ typedef enum { GN_BU_Arbitrary, GN_BU_Volts, GN_BU_Minutes, GN_BU_Percentage } gn_battery_unit; /* Define enums for Calendar Note types */ typedef enum { GN_CALNOTE_MEETING = 0x01, /* Meeting */ GN_CALNOTE_CALL = 0x02, /* Call */ GN_CALNOTE_BIRTHDAY = 0x04, /* Birthday */ GN_CALNOTE_REMINDER = 0x08, /* Reminder */ GN_CALNOTE_MEMO = 0x16, /* Memo */ } gn_calnote_type; GNOKII_API const char *gn_calnote_type2str(gn_calnote_type t); typedef enum { GN_CALNOTE_NEVER = 0, GN_CALNOTE_DAILY = 24, GN_CALNOTE_WEEKLY = 168, GN_CALNOTE_2WEEKLY = 336, GN_CALNOTE_MONTHLY = 65534, GN_CALNOTE_YEARLY = 65535 } gn_calnote_recurrence; GNOKII_API const char *gn_calnote_recurrence2str(gn_calnote_recurrence r); #define GN_CALNOTE_MAX_NUMBER 1024 /* FIXME how many are possible? */ #define GN_CALNOTE_MAX_LENGTH 258 #define GN_CALNOTE_NUMBER_MAX_LENGTH 49 typedef struct { int enabled; /* Is alarm set? */ int tone; /* Is alarm tone enabled? */ gn_timestamp timestamp; } gn_calnote_alarm; /* Calendar note type */ typedef struct { int location; /* The number of the note in the phone memory */ gn_calnote_type type; /* The type of the note */ gn_timestamp time; /* The time of the note */ gn_timestamp end_time; /* The end time of the note */ gn_calnote_alarm alarm; /* The alarm of the note */ char text[GN_CALNOTE_MAX_LENGTH]; /* The text of the note */ char phone_number[GN_CALNOTE_NUMBER_MAX_LENGTH]; /* For Call only: the phone number */ char mlocation[GN_CALNOTE_MAX_LENGTH]; /* For Meeting only: the location field */ gn_calnote_recurrence recurrence; /* Recurrence of the note */ int occurrences; /* Number of recurrence events; 0 for infinity */ } gn_calnote; /* List of Calendar Notes in phone */ typedef struct { unsigned int number; /* The number of notes in phone */ unsigned int location[GN_CALNOTE_MAX_NUMBER]; /* Location of the nth note */ unsigned int last; /* Index of the last allocated note */ } gn_calnote_list; /* ToDo things. It is only supported by the newer phones. */ #define GN_TODO_MAX_LENGTH 256 #define GN_TODO_MAX_NUMBER 512 typedef enum { GN_TODO_LOW = 3, GN_TODO_MEDIUM = 2, GN_TODO_HIGH = 1 } gn_todo_priority; GNOKII_API const char *gn_todo_priority2str(gn_todo_priority p); typedef struct { int location; /* The number of the note in the phone memory */ char text[GN_TODO_MAX_LENGTH]; /* The text of the note */ gn_todo_priority priority; } gn_todo; /* List of ToDo Notes in phone */ typedef struct { int number; /* The number of notes in phone */ int location[GN_TODO_MAX_NUMBER]; /* Location of the nth note */ } gn_todo_list; /* WAP */ #define WAP_URL_MAX_LENGTH 258 #define WAP_NAME_MAX_LENGTH 52 #define WAP_SETTING_USERNAME_MAX_LENGTH 34 #define WAP_SETTING_NAME_MAX_LENGTH 22 #define WAP_SETTING_HOME_MAX_LENGTH 95 #define WAP_SETTING_APN_MAX_LENGTH 102 /* bookmarks */ typedef struct { int location; char name[WAP_NAME_MAX_LENGTH]; char URL[WAP_URL_MAX_LENGTH]; } gn_wap_bookmark; /* settings */ typedef enum { GN_WAP_SESSION_TEMPORARY = 0, GN_WAP_SESSION_PERMANENT } gn_wap_session; GNOKII_API const char *gn_wap_session2str(gn_wap_session p); typedef enum { GN_WAP_AUTH_NORMAL = 0, GN_WAP_AUTH_SECURE } gn_wap_authentication; GNOKII_API const char *gn_wap_authentication2str(gn_wap_authentication p); typedef enum { GN_WAP_BEARER_GSMDATA = 1, GN_WAP_BEARER_GPRS = 3, GN_WAP_BEARER_SMS = 7, GN_WAP_BEARER_USSD = 9 /* FIXME real value? */ } gn_wap_bearer; GNOKII_API const char *gn_wap_bearer2str(gn_wap_bearer p); typedef enum { GN_WAP_CALL_ANALOGUE, GN_WAP_CALL_ISDN } gn_wap_call_type; GNOKII_API const char *gn_wap_call_type2str(gn_wap_call_type p); typedef enum { GN_WAP_CALL_AUTOMATIC, GN_WAP_CALL_9600, GN_WAP_CALL_14400 } gn_wap_call_speed; GNOKII_API const char *gn_wap_call_speed2str(gn_wap_call_speed p); typedef enum { GN_WAP_LOGIN_MANUAL, GN_WAP_LOGIN_AUTOLOG } gn_wap_login; GNOKII_API const char *gn_wap_login2str(gn_wap_login p); typedef enum { GN_WAP_GPRS_ALWAYS, GN_WAP_GPRS_WHENNEEDED } gn_wap_gprs; GNOKII_API const char *gn_wap_gprs2str(gn_wap_gprs p); typedef struct { int read_before_write; int location; int successors[4]; char number [WAP_SETTING_NAME_MAX_LENGTH]; char gsm_data_ip [WAP_SETTING_NAME_MAX_LENGTH]; char gprs_ip [WAP_SETTING_NAME_MAX_LENGTH]; char name [WAP_SETTING_NAME_MAX_LENGTH]; char home [WAP_SETTING_HOME_MAX_LENGTH]; char gsm_data_username [WAP_SETTING_USERNAME_MAX_LENGTH]; char gsm_data_password [WAP_SETTING_NAME_MAX_LENGTH]; char gprs_username [WAP_SETTING_USERNAME_MAX_LENGTH]; char gprs_password [WAP_SETTING_NAME_MAX_LENGTH]; char access_point_name [WAP_SETTING_APN_MAX_LENGTH]; char sms_service_number [WAP_SETTING_NAME_MAX_LENGTH]; char sms_server_number [WAP_SETTING_NAME_MAX_LENGTH]; gn_wap_session session; int security; gn_wap_bearer bearer; gn_wap_authentication gsm_data_authentication; gn_wap_authentication gprs_authentication; gn_wap_call_type call_type; gn_wap_call_speed call_speed; gn_wap_login gsm_data_login; gn_wap_login gprs_login; gn_wap_gprs gprs_connection; } gn_wap_setting; /* This structure is provided to allow common information about the particular model to be looked up in a model independant way. Some of the values here define minimum and maximum levels for values retrieved by the various Get functions for example battery level. They are not defined as constants to allow model specific code to set them during initialisation */ typedef struct { unsigned char *models; /* Models covered by this type, pipe '|' delimited. */ /* Minimum and maximum levels for RF signal strength. Units are as per the setting of RFLevelUnits. The setting of RFLevelUnits indicates the default or "native" units used. In the case of the 3110 and 6110 series these are arbitrary, ranging from 0 to 4. */ float max_rf_level; float min_rf_level; gn_rf_unit rf_level_unit; /* Minimum and maximum levels for battery level. Again, units are as per the setting of GSM_BatteryLevelUnits. The value that BatteryLevelUnits is set to indicates the "native" or default value that the phone supports. In the case of the 3110 and 6110 series these are arbitrary, ranging from 0 to 4. */ float max_battery_level; float min_battery_level; gn_battery_unit battery_level_unit; /* Information about date, time and alarm support. In case of alarm information we provide value for the number of alarms supported. */ gn_datetime_support datetime_support; gn_datetime_support alarm_support; int maximum_alarms_number; unsigned int startup_logo_height; /* Logo widths and heights - if supported */ unsigned int startup_logo_width; unsigned int operator_logo_height; unsigned int operator_logo_width; unsigned int caller_logo_height; unsigned int caller_logo_width; } gn_phone; typedef enum { GN_PROFILE_MESSAGE_NoTone = 0x00, GN_PROFILE_MESSAGE_Standard = 0x01, GN_PROFILE_MESSAGE_Special = 0x02, GN_PROFILE_MESSAGE_BeepOnce = 0x03, GN_PROFILE_MESSAGE_Ascending = 0x04 } gn_profile_message_type; GNOKII_API const char *gn_profile_message_type2str(gn_profile_message_type p); typedef enum { GN_PROFILE_WARNING_Off = 0xff, GN_PROFILE_WARNING_On = 0x04 } gn_profile_warning_type; GNOKII_API const char *gn_profile_warning_type2str(gn_profile_warning_type p); typedef enum { GN_PROFILE_VIBRATION_Off = 0x00, GN_PROFILE_VIBRATION_On = 0x01 } gn_profile_vibration_type; GNOKII_API const char *gn_profile_vibration_type2str(gn_profile_vibration_type p); typedef enum { GN_PROFILE_CALLALERT_Ringing = 0x01, GN_PROFILE_CALLALERT_BeepOnce = 0x02, GN_PROFILE_CALLALERT_Off = 0x04, GN_PROFILE_CALLALERT_RingOnce = 0x05, GN_PROFILE_CALLALERT_Ascending = 0x06, GN_PROFILE_CALLALERT_CallerGroups = 0x07 } gn_profile_callalert_type; GNOKII_API const char *gn_profile_callalert_type2str(gn_profile_callalert_type p); typedef enum { GN_PROFILE_KEYVOL_Off = 0xff, GN_PROFILE_KEYVOL_Level1 = 0x00, GN_PROFILE_KEYVOL_Level2 = 0x01, GN_PROFILE_KEYVOL_Level3 = 0x02 } gn_profile_keyvol_type; GNOKII_API const char *gn_profile_keyvol_type2str(gn_profile_keyvol_type p); typedef enum { GN_PROFILE_VOLUME_Level1 = 0x06, GN_PROFILE_VOLUME_Level2 = 0x07, GN_PROFILE_VOLUME_Level3 = 0x08, GN_PROFILE_VOLUME_Level4 = 0x09, GN_PROFILE_VOLUME_Level5 = 0x0a, } gn_profile_volume_type; GNOKII_API const char *gn_profile_volume_type2str(gn_profile_volume_type p); /* Structure to hold profile entries. */ typedef struct { int number; /* The number of the profile. */ char name[40]; /* The name of the profile. */ int default_name; /* 0-6, when default name is used, -1, when not. */ int keypad_tone; /* Volume level for keypad tones. */ int lights; /* Lights on/off. */ int call_alert; /* Incoming call alert. */ int ringtone; /* Ringtone for incoming call alert. */ int volume; /* Volume of the ringing. */ int message_tone; /* The tone for message indication. */ int warning_tone; /* The tone for warning messages. */ int vibration; /* Vibration? */ int caller_groups; /* CallerGroups. */ int automatic_answer; /* Does the phone auto-answer incoming call? */ } gn_profile; /* Limits for IMEI, Revision, Model and Manufacturer string storage. */ #define GN_IMEI_MAX_LENGTH 20 #define GN_REVISION_MAX_LENGTH 20 #define GN_MODEL_MAX_LENGTH 32 #define GN_MANUFACTURER_MAX_LENGTH 32 #define GN_BCD_STRING_MAX_LENGTH 40 /* * This data-type is used to specify the type of the number. See the official * GSM specification 03.40, version 6.1.0, section 9.1.2.5, page 35-37 (old) * 3GPP TS 23.040, version 6.7.0, section 9.1.2.5, page 39-41 (new) */ /* bit 7 is always 1 */ #define GN_GSM_NUMBER_Type_Mask 0x70 #define GN_GSM_NUMBER_International_Mask 0x10 #define GN_GSM_NUMBER_National_Mask 0x20 #define GN_GSM_NUMBER_Network_Mask 0x30 #define GN_GSM_NUMBER_Subecriber_Mask 0x40 #define GN_GSM_NUMBER_Alphanumeric_Mask 0x50 #define GN_GSM_NUMBER_Abbreviated_Mask 0x60 #define GN_GSM_NUMBER_Numbering_Plan_Mask 0x0f #define GN_GSM_NUMBER_ISDN_Plan_Mask 0x01 #define GN_GSM_NUMBER_Data_Plan_Mask 0x03 #define GN_GSM_NUMBER_Telex_Plan_Mask 0x04 #define GN_GSM_NUMBER_Specific1_Plan_Mask 0x05 #define GN_GSM_NUMBER_Specific2_Plan_Mask 0x06 #define GN_GSM_NUMBER_National_Plan_Mask 0x08 #define GN_GSM_NUMBER_Private_Plan_Mask 0x09 #define GN_GSM_NUMBER_ERMES_Plan_Mask 0x0a typedef enum { GN_GSM_NUMBER_Unknown = 0x81, /* Unknown number */ GN_GSM_NUMBER_International = 0x91, /* International number */ GN_GSM_NUMBER_National = 0xa1, /* National number */ GN_GSM_NUMBER_Network = 0xb1, /* Network specific number */ GN_GSM_NUMBER_Subscriber = 0xc1, /* Subscriber number */ GN_GSM_NUMBER_Alphanumeric = 0xd0, /* Alphanumeric number */ GN_GSM_NUMBER_Abbreviated = 0xe1 /* Abbreviated number */ } gn_gsm_number_type; typedef struct { gn_gsm_number_type type; char number[GN_BCD_STRING_MAX_LENGTH]; } gn_gsm_number; /* Data structures for the call divert */ typedef enum { GN_CDV_Unconditional = 0x00, GN_CDV_Busy, GN_CDV_NoAnswer, GN_CDV_OutOfReach, GN_CDV_NotAvailable, GN_CDV_AllTypes } gn_call_divert_type; GNOKII_API const char *gn_call_divert_type2str(gn_call_divert_type p); typedef enum { GN_CDV_VoiceCalls = 0x01, GN_CDV_FaxCalls, GN_CDV_DataCalls, GN_CDV_AllCalls } gn_call_divert_call_type; GNOKII_API const char *gn_call_divert_call_type2str(gn_call_divert_call_type p); typedef enum { GN_CDV_Disable = 0x00, GN_CDV_Enable = 0x01, GN_CDV_Query = 0x02, GN_CDV_Register = 0x03, GN_CDV_Erasure = 0x04 } gn_call_divert_operation; GNOKII_API const char *gn_call_divert_operation2str(gn_call_divert_operation p); typedef struct { gn_call_divert_type type; gn_call_divert_call_type ctype; gn_call_divert_operation operation; gn_gsm_number number; unsigned int timeout; } gn_call_divert; typedef struct { int full; /* indicates if we have full data read */ unsigned int length; unsigned char *data; } gn_raw_data; /* This enum is used for display status. */ typedef enum { GN_DISP_Call_In_Progress, /* Call in progress. */ GN_DISP_Unknown, /* The meaning is unknown now :-( */ GN_DISP_Unread_SMS, /* There is Unread SMS. */ GN_DISP_Voice_Call, /* Voice call active. */ GN_DISP_Fax_Call, /* Fax call active. */ GN_DISP_Data_Call, /* Data call active. */ GN_DISP_Keyboard_Lock, /* Keyboard lock status. */ GN_DISP_SMS_Storage_Full /* Full SMS Memory. */ } gn_display_status; #define GN_DRAW_SCREEN_MAX_WIDTH 27 #define GN_DRAW_SCREEN_MAX_HEIGHT 6 typedef enum { GN_DISP_DRAW_Clear, GN_DISP_DRAW_Text, GN_DISP_DRAW_Status } gn_display_draw_command; typedef struct { int x; int y; unsigned char text[GN_DRAW_SCREEN_MAX_WIDTH + 1]; } gn_display_text; typedef struct { gn_display_draw_command cmd; union { gn_display_text text; gn_display_status status; } data; } gn_display_draw_msg; typedef struct { void (*output_fn)(gn_display_draw_msg *draw); int state; struct timeval last; } gn_display_output; typedef enum { GN_KEY_NONE = 0x00, GN_KEY_1 = 0x01, GN_KEY_2, GN_KEY_3, GN_KEY_4, GN_KEY_5, GN_KEY_6, GN_KEY_7, GN_KEY_8, GN_KEY_9, GN_KEY_0, GN_KEY_HASH, GN_KEY_ASTERISK, GN_KEY_POWER, GN_KEY_GREEN, GN_KEY_RED, GN_KEY_INCREASEVOLUME, GN_KEY_DECREASEVOLUME, GN_KEY_UP = 0x17, GN_KEY_DOWN, GN_KEY_MENU, GN_KEY_NAMES } gn_key_code; typedef struct { int field; char screen[50]; } gn_netmonitor; typedef struct { int userlock; /* TRUE = user lock, FALSE = factory lock */ int closed; char data[12]; int counter; } gn_locks_info; typedef struct { int frequency; int volume; } gn_tone; #define GN_RINGTONE_MAX_NAME 20 #define GN_RINGTONE_MAX_COUNT 256 typedef struct { int location; char name[20]; int user_defined; int readable; int writable; } gn_ringtone_info; typedef struct { int count; int userdef_location; int userdef_count; gn_ringtone_info ringtone[GN_RINGTONE_MAX_COUNT]; } gn_ringtone_list; typedef enum { GN_LOG_T_NONE = 0, GN_LOG_T_STDERR = 1 } gn_log_target; typedef enum { GN_FT_None = 0, GN_FT_NOL, GN_FT_NGG, GN_FT_NSL, GN_FT_NLM, GN_FT_BMP, GN_FT_OTA, GN_FT_XPMF, GN_FT_RTTTL, GN_FT_OTT, GN_FT_MIDI, GN_FT_NOKRAW_TONE, GN_FT_GIF, GN_FT_JPG, GN_FT_MID, GN_FT_NRT, GN_FT_PNG, } gn_filetypes; typedef struct { gn_filetypes filetype; /* file type */ unsigned char *id; /* file id */ char name[512]; /* file name */ int year; /* datetime of creation/modification */ int month; int day; int hour; int minute; int second; int file_length; /* size of the file */ int togo; /* amount of bytes to be sent yet */ int just_sent; /* ??? */ int folderId; /* folder id of the file */ unsigned char *file; /* file contents */ } gn_file; typedef struct { char path[512]; gn_file **files; int file_count; int size; } gn_file_list; #endif /* _gnokii_common_h */ gnokii-0.6.31/include/gnokii/encoding.h0000644000175000017500000000357711666163120016061 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings, Pavel Janik Copyright (C) 2001-2004 Pawel Kot Include file for encoding functions. */ #ifndef _gnokii_encoding_h #define _gnokii_encoding_h GNOKII_API int gn_char_def_alphabet(unsigned char *string); /* * * Set encoding to use for exchanging data between Gnokii and the application * * Normally, when communicating with the application, Gnokii uses the * encoding set with the setlocale() call. For the (standard) call * setlocale(LC_ALL, ""), this is the encoding specified by the user in the * LANG variable. This function can be used to override this behaviour. E.g., * to make Gnokii always interpret and return string values using the UTF-8 * charset, call gn_set_encoding("UTF-8"). * * This has nothing to do with the encoding used to communicate with the * phone itself, which is a totally different issue. * * Parameters: * encoding The name of the encoding (length must not exceed 63 chars) * */ GNOKII_API void gn_char_set_encoding(const char* encoding); GNOKII_API const char *gn_char_get_encoding(); #endif /* _gnokii_encoding_h */ gnokii-0.6.31/include/gnokii/rlp-common.h0000644000175000017500000001125611666163120016347 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janík ml. Copyright (C) 2001 Chris Kemp, Pavel Machek Copyright (C) 2003 Pawel Kot The development of RLP protocol was sponsored by SuSE CR, s.r.o. (Pavel use the SIM card from SuSE for testing purposes). Header file for RLP protocol. */ #ifndef _gnokii_rlp_common_h #define _gnokii_rlp_common_h /* Typedef for frame type - they are the same for RLP version 0, 1 and 2. */ typedef enum { RLP_FT_X, /* Unknown. */ RLP_FT_U, /* Unnumbered frame. */ RLP_FT_S, /* Supervisory frame. */ RLP_FT_IS /* Information plus Supervisory (I+S) frame. */ } rlp_frame_type; /* Define the various Unnumbered frame types. Numbering is bit reversed relative to ETSI GSM 04.22 for easy parsing. */ typedef enum { RLP_U_SABM = 0x07, /* Set Asynchronous Balanced Mode. */ RLP_U_UA = 0x0c, /* Unnumbered Acknowledge. */ RLP_U_DISC = 0x08, /* Disconnect. */ RLP_U_DM = 0x03, /* Disconnected Mode. */ RLP_U_NULL = 0x0f, /* Null information. */ RLP_U_UI = 0x00, /* Unnumbered Information. */ RLP_U_XID = 0x17, /* Exchange Identification. */ RLP_U_TEST = 0x1c, /* Test. */ RLP_U_REMAP = 0x11 /* Remap. */ } rlp_uframe_type; /* Define supervisory frame field. */ typedef enum { RLP_S_RR = 0x00, /* Receive Ready. */ RLP_S_REJ = 0x02, /* Reject. */ RLP_S_RNR = 0x01, /* Receive Not Ready. */ RLP_S_SREJ = 0x03 /* Selective Reject. */ } rlp_sframe_field; /* Used for CurrentFrameType. */ typedef enum { RLP_FT_U_SABM = 0x00, RLP_FT_U_UA, RLP_FT_U_DISC, RLP_FT_U_DM, RLP_FT_U_NULL, RLP_FT_U_UI, RLP_FT_U_XID, RLP_FT_U_TEST, RLP_FT_U_REMAP, RLP_FT_S_RR, RLP_FT_S_REJ, RLP_FT_S_RNR, RLP_FT_S_SREJ, RLP_FT_SI_RR, RLP_FT_SI_REJ, RLP_FT_SI_RNR, RLP_FT_SI_SREJ, RLP_FT_BAD } rlp_frame_types; /* Frame definition for TCH/F9.6 frame. */ typedef struct { unsigned char Header[2]; unsigned char Data[25]; unsigned char FCS[3]; } gn_rlp_f96_frame; /* Header data "split up" for TCH/F9.6 frame. */ typedef struct { unsigned char Ns; /* Send sequence number. */ unsigned char Nr; /* Receive sequence number. */ unsigned char M; /* Unumbered frame type. */ unsigned char S; /* Status. */ int PF; /* Poll/Final. */ int CR; /* Command/Response. */ rlp_frame_type Type; /* Frame type. */ } rlp_f96_header; /* RLP User requests */ typedef struct { int Conn_Req; int Attach_Req; int Conn_Req_Neg; int Reset_Resp; int Disc_Req; } rlp_user_request_store; typedef enum { Conn_Req, Attach_Req, Conn_Req_Neg, Reset_Resp, Disc_Req } rlp_user_requests; typedef enum { Conn_Ind, Conn_Conf, Disc_Ind, Reset_Ind, Data, /* FIXME: This should really be called RLP_Data, otherwise it hogs name "Data"! */ StatusChange, GetData } rlp_user_inds; /* RLP (main) states. See GSM specification 04.22 Annex A, Section A.1.1. */ typedef enum { RLP_S0, /* ADM and Detached */ RLP_S1, /* ADM and Attached */ RLP_S2, /* Pending Connect Request */ RLP_S3, /* Pending Connect Indication */ RLP_S4, /* ABM and Connection Established */ RLP_S5, /* Disconnect Initiated */ RLP_S6, /* Pending Reset Request */ RLP_S7, /* Pending Reset Indication */ RLP_S8 /* Error */ } rlp_state; /* RLP specification defines several states in which variables can be. */ typedef enum { _idle=0, _send, _wait, _rcvd, _ackn, _rej, _srej } rlp_state_variable; /* RLP Data */ typedef struct { unsigned char Data[25]; rlp_state_variable State; } rlp_data; /* Prototypes for functions. */ void rlp_f96_frame_display(gn_rlp_f96_frame *frame); void rlp_f96_header_decode(gn_rlp_f96_frame *frame, rlp_f96_header *header); void rlp_xid_display(unsigned char *frame); void rlp_initialise(int (*rlp_send_function)(gn_rlp_f96_frame *frame, int out_dtx), int (*rlp_passup)(rlp_user_inds ind, unsigned char *buffer, int length)); void rlp_link_vars_init(void); void rlp_user_request_set(rlp_user_requests type, int value); void rlp_send(char *buffer, int length); #endif /* _gnokii_rlp_common_h */ gnokii-0.6.31/include/gnokii/bitmaps.h0000644000175000017500000000640611666163120015724 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janík ml. Copyright (C) 2000 Marcin Wiacek, Chris Kemp Copyright (C) 2001-2003 Pawel Kot Copyright (C) 2002 Pavel Machek Functions for common bitmap operations. */ #ifndef _gnokii_bitmaps_h #define _gnokii_bitmaps_h #include #include #include /* Bitmap types. These do *not* correspond to headers[] in gsm-sms.c. */ typedef enum { GN_BMP_None = 0, GN_BMP_StartupLogo = 50, GN_BMP_PictureMessage, GN_BMP_OperatorLogo, GN_BMP_CallerLogo, GN_BMP_WelcomeNoteText, GN_BMP_DealerNoteText, GN_BMP_NewOperatorLogo, GN_BMP_EMSPicture, GN_BMP_EMSAnimation, /* First bitmap in animation should have this type */ GN_BMP_EMSAnimation2, /* ...second, third and fourth should have this type */ } gn_bmp_types; #define GN_BMP_MAX_SIZE 1000 #define MCC_MNC_SIZE 8 /* Structure to hold incoming/outgoing bitmaps (and welcome-notes). */ typedef struct { unsigned char height; /* Bitmap height (pixels) */ unsigned char width; /* Bitmap width (pixels) */ unsigned int size; /* Bitmap size (bytes) */ gn_bmp_types type; /* Bitmap type */ char netcode[MCC_MNC_SIZE]; /* Network operator code */ char text[256]; /* Text used for welcome-note or callergroup name */ char dealertext[256]; /* Text used for dealer welcome-note */ int dealerset; /* Is dealer welcome-note set now ? */ unsigned char bitmap[GN_BMP_MAX_SIZE]; /* Actual Bitmap */ char number; /* Caller group number */ int ringtone; /* Ringtone no sent with caller group */ unsigned char ringtone_id[6]; } gn_bmp; GNOKII_API gn_error gn_file_bitmap_read(char *filename, gn_bmp *bitmap, gn_phone *info); GNOKII_API gn_error gn_file_bitmap_save(char *filename, gn_bmp *bitmap, gn_phone *info); GNOKII_API gn_error gn_file_bitmap_show(char *filename); GNOKII_API gn_error gn_bmp_null(gn_bmp *bmp, gn_phone *info); GNOKII_API void gn_bmp_point_set(gn_bmp *bmp, int x, int y); GNOKII_API void gn_bmp_point_clear(gn_bmp *bmp, int x, int y); GNOKII_API int gn_bmp_point(gn_bmp *bmp, int x, int y); GNOKII_API void gn_bmp_clear(gn_bmp *bmp); GNOKII_API void gn_bmp_resize(gn_bmp *bitmap, gn_bmp_types target, gn_phone *info); GNOKII_API void gn_bmp_print(gn_bmp *bitmap, FILE *f); GNOKII_API int gn_bmp_sms_encode(gn_bmp *bitmap, unsigned char *message); GNOKII_API gn_error gn_bmp_sms_read(int type, unsigned char *message, unsigned char *code, gn_bmp *bitmap); #endif /* _gnokii_bitmaps_h */ gnokii-0.6.31/include/gnokii/mms.h0000644000175000017500000001355111666163120015060 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2009 Daniele Forsi Include file for the MMS library. */ #ifndef _gnokii_mms_h #define _gnokii_mms_h /* WAP-230-WSP-20010705-a Table 38 "Well-Known Parameter Assignments" */ #define GN_MMS_Type_with_multipart 0x89 /* deprecated, use 0x99 */ #define GN_MMS_Start_with_multipart 0x8a /* deprecated, use 0x9a */ /* * From field * * WAP-209-MMSEncapsulation-20020105-a - Chapter 7.2.11 "From field" */ #define GN_MMS_Address_Present_Token 128 #define GN_MMS_Insert_Address_Token 129 /* * X-Mms-Message-Type * * WAP-209-MMSEncapsulation-20020105-a - Chapter 7.2.14 "Message-Type field" * OMA-MMS-ENC-V1_3-20050214-D - Chapter 7.3.28 "X-Mms-Message-Type field" * OMA-MMS-ENC-V1_2-20050301-A - (?? Chapter 6.1.1 or 7.2.23 ??) */ typedef enum { GN_MMS_MESSAGE_m_send_req = 128, /* an MMS that has to be sent */ GN_MMS_MESSAGE_m_retrieve_conf = 132, /* an MMS that has been received */ GN_MMS_MESSAGE_UNKNOWN = 0 /* a convenience value, not defined by the standard */ } gn_mms_message; /* * Content-Type * * WAP-209-MMSEncapsulation-20020105-a - Chapter 7.2.4. "Content-Type field" * WAP-230-WSP-20010705-a Appendix A, Table 40 refers to http://www.wapforum.org/wina * See http://www.wapforum.org/wina/wsp-content-type.htm for full list * WAP-230-WSP-20010705-a - Chapter 8.4.2.24 "Content type field" * OMA-MMS-ENC-V1_3-20050214-D - Chapter 7.3.9 "Content-Type field" */ typedef enum { GN_MMS_CONTENT_application_vnd_wap_multipart_mixed = 0xa3, GN_MMS_CONTENT_application_vnd_wap_multipart_related = 0xb3, GN_MMS_CONTENT_text_plain = 0x83, GN_MMS_CONTENT_image_jpeg = 0x9e, GN_MMS_CONTENT_UNKNOWN = 0 /* a convenience value, not defined by the standard */ } gn_mms_content; /* * OMA-MMS-ENC-V1_3-20050214-D - Chapter 7.4 "Header Field Names and Assigned Numbers" * with msb set */ typedef enum { GN_MMS_Bcc = 0x81, GN_MMS_Cc = 0x82, GN_MMS_Content_Location = 0x83, GN_MMS_Content_Type = 0x84, GN_MMS_Date = 0x85, GN_MMS_Delivery_Report = 0x86, GN_MMS_Delivery_Time = 0x87, GN_MMS_Expiry = 0x88, GN_MMS_From = 0x89, GN_MMS_Message_Class = 0x8A, GN_MMS_Message_ID = 0x8B, GN_MMS_Message_Type = 0x8C, GN_MMS_MMS_Version = 0x8D, GN_MMS_Message_Size = 0x8E, GN_MMS_Priority = 0x8F, GN_MMS_Read_Reply = 0x90, GN_MMS_Report_Allowed = 0x91, GN_MMS_Response_Status = 0x92, GN_MMS_Response_Text = 0x93, GN_MMS_Sender_Visibility = 0x94, GN_MMS_Status = 0x95, GN_MMS_Subject = 0x96, GN_MMS_To = 0x97, GN_MMS_Transaction_Id = 0x98, GN_MMS_FIELD_ID_UNKNOWN = 0 /* a convenience value, not defined by the standard */ } gn_mms_field_id; /* FIXME check conformance before claiming to be 1.2, also do not hardcode string, use a function? */ #define GN_MMS_DEFAULT_VERSION 0x92 #define GN_MMS_DEFAULT_VERSION_STRING "1.2" /* a convenience value, not defined by the standard */ #define GN_MMS_ANY_VERSION 0x00 /* Some useful values, not defined by the standard */ #define GN_MMS_MAX_VALUE_SIZE 80 #define GN_MMS_NOKIA_HEADER_LEN 0xb0 /* TODO implement Nokia footer with variable length */ #define GN_MMS_NOKIA_FOOTER_LEN 0x03 typedef struct { gn_mms_content type; char *name; } gn_mms_content_type; typedef enum { GN_MMS_PART_CONTENT_NAME_STRING = 0x01 } gn_mms_part_flags; typedef struct { gn_mms_part_flags flags; char *filename; char *content_type; size_t length; char *content; } gn_mms_part; typedef struct { gn_mms_field_id id; char type; int x; char *header; } gn_mms_field; typedef struct { gn_mms_field_id id; size_t length; char *value; } gn_mms_field_value; typedef enum { GN_MMS_FORMAT_UNKNOWN = 0, GN_MMS_FORMAT_TEXT, GN_MMS_FORMAT_MIME, GN_MMS_FORMAT_PDU, GN_MMS_FORMAT_RAW } gn_mms_format; typedef struct { unsigned int number; /* Location of the message in the memory/folder. */ gn_memory_type memory_type; /* Memory type where the message is/should be stored. */ gn_sms_message_status status; /* Read, Unread, Sent, Unsent, ... */ size_t buffer_length; unsigned char *buffer; int num_values; /* How many items in values array */ gn_mms_field_value *values[]; } gn_mms_raw; typedef struct { unsigned int number; /* Location of the message in the memory/folder. */ gn_memory_type memory_type; /* Memory type where the message is/should be stored. */ gn_sms_message_status status; /* Read, Unread, Sent, Unsent, ... */ gn_mms_message type; /* GN_MMS_X_Mms_Message_Type */ char *tid; int version; char *from; /* Sender of this message */ char *to; /* Recipient of this message */ char *subject; gn_mms_format buffer_format; /* What kind of information is stored in buffer */ size_t buffer_length; unsigned char *buffer; int num_parts; /* How many items in parts array */ gn_mms_part *parts[]; } gn_mms; /* Convenience values, not defined by the standard */ #define GN_MMS_FIELD_IS_STRING 1 #define GN_MMS_FIELD_IS_ENCSTRING 1 /* FIXME? */ #define GN_MMS_FIELD_IS_UINTVAR 2 #define GN_MMS_FIELD_IS_OCTECT 3 #define GN_MMS_FIELD_IS_YESNO 3 /* FIXME? */ #define GN_MMS_FIELD_IS_LONG 4 #define GN_MMS_FIELD_IS_DATE 5 #define GN_MMS_FIELD_IS_EXPIRY 6 #define GN_MMS_FIELD_IS_CONTENT_TYPE 7 #endif /* _gnokii_mms_h */ gnokii-0.6.31/include/misc.h0000644000175000017500000000652011666163120013735 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 2000 Jan Derfinak Copyright (C) 2001-2002 Chris Kemp, Pavel Machek Copyright (C) 2001-2004 Pawel Kot, BORBELY Zoltan Header file for miscellaneous defines, typedefs etc. */ #ifndef _gnokii_misc_h #define _gnokii_misc_h #include #include #include "compat.h" /* Some general defines. */ #define ARRAY_LEN(x) (sizeof((x)) / sizeof((x)[0])) #define GNOKII_MAX(a, b) (((a) > (b)) ? (a) : (b)) #define GNOKII_MIN(a, b) (((a) < (b)) ? (a) : (b)) /* A define to make debug printfs neat */ #ifdef __GNUC__ # ifndef DEBUG # define dprintf(a...) do { } while (0) # else # define dprintf(a...) do { gn_log_debug(a); } while (0) # endif /* DEBUG */ # /* Use it for error reporting */ # define dump(a...) do { gn_elog_write(a); } while (0) #else # ifndef DEBUG # define dump while (0) # define dprintf while (0) # else # define dump gn_elog_write # define dprintf gn_log_debug # endif /* DEBUG */ #endif /* __GNUC__ */ /* Use gsprintf instead of sprintf and sprintf */ #define gsprintf snprintf #define gvsprintf vsnprintf #define gasprintf asprintf #define gvasprintf vasprintf /* This is for the bitmaps mostly, but may be useful also for the other * things. Counts how many octets we need to cover the given ammount of * the bits. */ #define ceiling_to_octet(x) ((x) + 7) / 8 #define PM_OLD_DEFAULT PM_SPEEDDIAL | PM_SMS | PM_DTMF | PM_KEYBOARD | PM_CALENDAR #define PM_DEFAULT PM_OLD_DEFAULT | PM_CALLERGROUP | PM_EXTPBK | PM_FOLDERS #define PM_DEFAULT_S40_3RD PM_DEFAULT | PM_SMSFILE | PM_EXTPBK2 | PM_EXTCALENDAR /* Series 30 phones support a very limited subset of the Series 40 commands */ #define PM_DEFAULT_S30 PM_DEFAULT_S40_3RD #define PM_CALLERGROUP 0x0001 #define PM_NETMONITOR 0x0002 #define PM_KEYBOARD 0x0004 #define PM_SMS 0x0008 #define PM_CALENDAR 0x0010 #define PM_DTMF 0x0020 #define PM_DATA 0x0040 #define PM_SPEEDDIAL 0x0080 #define PM_EXTPBK 0x0100 #define PM_AUTHENTICATION 0x0200 #define PM_FOLDERS 0x0400 #define PM_FULLPBK 0x0800 /* Verify if these three might not be coupled into one */ #define PM_SMSFILE 0x1000 #define PM_EXTPBK2 0x2000 #define PM_EXTCALENDAR 0x4000 /* This one indicated reported cases of breaking the phone by xgnokii * in FBUS orver IrDA mode */ #define PM_XGNOKIIBREAKAGE 0x8000 char **gnokii_strsplit(const char *string, const char *delimiter, int tokens); void gnokii_strfreev(char **str_array); int gnokii_strcmpsep(const char *s1, const char *s2, char sep); #endif /* _gnokii_misc_h */ gnokii-0.6.31/include/cfgreader.h0000644000175000017500000000251711666163120014726 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for Nokia mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999, 2000 Hugh Blemings & Pavel Janík ml. Header file for config file reader. */ #ifndef _gnokii_cfgreader_h #define _gnokii_cfgreader_h /* Structure definitions */ /* A linked list of key/value pairs of the configuration file */ struct gn_cfg_entry { struct gn_cfg_entry *next, *prev; char *key; char *value; }; /* A linked list of the config file sections together with key included */ struct gn_cfg_header { struct gn_cfg_header *next, *prev; struct gn_cfg_entry *entries; char *section; }; #endif /* _gnokii_cfgreader_h */ gnokii-0.6.31/include/sms-nokia.h0000644000175000017500000000253311666163120014703 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2002 Pawel Kot Various function prototypes used by Nokia in their SMS extension protocols. */ #ifndef _gnokii_sms_nokia_h #define _gnokii_sms_nokia_h /* There are type values for the different parts of the Nokia Multipart * Messages */ #define GN_SMS_MULTIPART_DEFAULT 0 #define GN_SMS_MULTIPART_UNICODE 1 #define GN_SMS_MULTIPART_BITMAP 2 #define GN_SMS_MULTIPART_RINGTONE 3 #define GN_SMS_MULTIPART_PROFILENAME 4 #define GN_SMS_MULTIPART_RESERVED 5 #define GN_SMS_MULTIPART_SCREENSAVER 6 #endif /* _gnokii_sms_nokia_h */ gnokii-0.6.31/include/gsm-filetypes.h0000644000175000017500000000240311666163120015566 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janík ml. Copyright (C) 2000 Marcin Wiacek, Chris Kemp Copyright (C) 2001-2003 Pawel Kot, BORBELY Zoltan Copyright (C) 2002 Markus Plail Copyright (C) 2003 Tomi Ollila Functions to read and write common file types. */ #ifndef _gnokii_gsm_filetypes_h #define _gnokii_gsm_filetypes_h /* Defines the character that separates fields in rtttl files. */ #define RTTTL_SEP ":" #endif /* _gnokii_gsm_filetypes_h */ gnokii-0.6.31/include/gnokii.h0000644000175000017500000004137611666163252014300 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for Nokia mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 2001-2011 Pawel Kot Copyright (C) 2001 Chris Kemp copyright (C) 2002 Markus Plail Copyright (C) 2002-2003 BORBELY Zoltan, Ladis Michl Copyright (C) 2004 Martin Goldhahn Copyright (C) 2006 Helge Deller Main header file for gnokii. Include just this file in your app. */ #ifndef _gnokii_h #define _gnokii_h #ifdef __cplusplus extern "C" { #endif /* Some portability definitions first */ #if defined(__linux__) || defined(__GLIBC__) || defined(__CYGWIN__) # include # include #elif defined(__svr4__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__MACH__) # include # include #elif defined(_MSC_VER) && defined(WIN32) # include /* for struct timeval */ typedef unsigned char uint8_t; #endif #include #ifndef GNOKII_API # if defined(WIN32) && defined(GNOKIIDLL_IMPORTS) # define GNOKII_API __declspec(dllimport) # elif (__GNUC__ - 0 > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 3) # define GNOKII_API __attribute__ ((visibility("default"))) # else # define GNOKII_API # endif #endif #define LIBGNOKII_VERSION_STRING "7.0.0" #define LIBGNOKII_VERSION_MAJOR 7 #define LIBGNOKII_VERSION_MINOR 0 #define LIBGNOKII_VERSION_RELEASE 0 #define LIBGNOKII_MAKE_VERSION(a,b,c) (((a) << 16) | ((b) << 8) | (c)) #define LIBGNOKII_VERSION \ LIBGNOKII_MAKE_VERSION(LIBGNOKII_VERSION_MAJOR,LIBGNOKII_VERSION_MINOR,LIBGNOKII_VERSION_RELEASE) struct gn_statemachine; #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* Gnokii library functions - they all start with gn_lib_ */ /* Initialize the library for use by programs. Call this function before any other */ GNOKII_API gn_error gn_lib_init(); /* Get the current runtime version (LIBGNOKII_VERSION) of libgnokii - see LIBGNOKII_MAKE_VERSION() */ GNOKII_API unsigned int gn_lib_version(); /* free any resources which were used by libgnokii */ GNOKII_API void gn_lib_library_free(void); /* return last error code from functions below */ GNOKII_API gn_error gn_lib_lasterror(struct gn_statemachine *state); /* initialize gnokii library and structures for given phone. configname is the name of the profile, if empty or NULL, [global] will be taken. gn_lib_phoneprofile_load assumes default config file. */ GNOKII_API gn_error gn_lib_phoneprofile_load_from_file(const char *configfile, const char *configname, struct gn_statemachine **state); GNOKII_API gn_error gn_lib_phoneprofile_load(const char *configname, struct gn_statemachine **state); /* initialize gnokii library and structures for given phone lines is line by line representation as it was read from the config file. */ GNOKII_API gn_error gn_lib_phoneprofile_load_from_external(char **lines, struct gn_statemachine **state); /* Free any structures and resources which were loaded in this state machine. */ GNOKII_API gn_error gn_lib_phoneprofile_free(struct gn_statemachine **state); /* opens connection to the phone. Necessary locking will be made */ GNOKII_API gn_error gn_lib_phone_open(struct gn_statemachine *state); /* closes the connection to the phone */ GNOKII_API gn_error gn_lib_phone_close(struct gn_statemachine *state); /* * Changes the driver used for connection. * It closes the existing one and initializes new one. * The new driver must be present in the parsed configuration (this function does not reread the config). * @driver is the name of the phone section from the config. */ GNOKII_API gn_error gn_lib_phone_change_driver(struct gn_statemachine *state, const char *driver); /* ask phone for static information (model, manufacturer, revision and imei) */ GNOKII_API const char *gn_lib_get_phone_model (struct gn_statemachine *state); /* e.g. 6310 */ GNOKII_API const char *gn_lib_get_phone_product_name(struct gn_statemachine *state); /* e.g. NPE-4 */ GNOKII_API const char *gn_lib_get_phone_manufacturer(struct gn_statemachine *state); /* e.g. Nokia */ GNOKII_API const char *gn_lib_get_phone_revision (struct gn_statemachine *state); /* e.g. V 04.20 */ GNOKII_API const char *gn_lib_get_phone_imei (struct gn_statemachine *state); /* Get the key value from the given section and the key name */ GNOKII_API const char *gn_lib_cfg_get(const char *section, const char *key); /* Phone Addressbook functions */ /* get number of used/free phone addressbook memory slots */ GNOKII_API gn_error gn_lib_addressbook_memstat(struct gn_statemachine *state, const gn_memory_type memory_type, int *num_used, int *num_free); /* remove an addressbook entry physically from phone. */ GNOKII_API gn_error gn_lib_phonebook_entry_delete(struct gn_statemachine *state, const gn_memory_type memory_type, const int index); /* check if given addressbook entry is empty. Returns "true" if empty, 0 if not. */ GNOKII_API int gn_lib_phonebook_entry_isempty(struct gn_statemachine *state, const gn_memory_type memory_type, const int index); /* read given addressbook entry into internal structure. Afterwards ask for each value with functions below */ GNOKII_API gn_error gn_lib_phonebook_read_entry(struct gn_statemachine *state, const gn_memory_type memory_type, const int index); /* after reading an entry with gn_lib_phonebook_read_entry() ask for the values of the phonebook entry */ GNOKII_API const char * gn_lib_get_pb_name (struct gn_statemachine *state); /* Mr. Miller */ GNOKII_API const char * gn_lib_get_pb_number (struct gn_statemachine *state); /* +18001189383 */ GNOKII_API gn_phonebook_group_type gn_lib_get_pb_caller_group (struct gn_statemachine *state); /* */ GNOKII_API gn_memory_type gn_lib_get_pb_memtype (struct gn_statemachine *state); /* */ GNOKII_API int gn_lib_get_pb_location (struct gn_statemachine *state); /* 1*/ GNOKII_API gn_timestamp gn_lib_get_pb_date (struct gn_statemachine *state); /* */ GNOKII_API int gn_lib_get_pb_num_subentries (struct gn_statemachine *state); /* */ GNOKII_API gn_error gn_lib_get_pb_subentry(struct gn_statemachine *state, const int index, gn_phonebook_entry_type *entry_type, gn_phonebook_number_type *number_type, const char **number); /* How to write to a phonebook entry with 3 steps: a) call gn_lib_phonebook_prepare_write_entry() to initialize structures b) call gn_lib_set_pb_*() to set values (do this for each value you want to set) c) call gn_lib_phonebook_write_entry() to write it physically to phone */ /* initialize gnokii internal phonebook structure */ GNOKII_API gn_error gn_lib_phonebook_prepare_write_entry(struct gn_statemachine *state); /* call each of the functions to set a specific value in current internal memory */ GNOKII_API gn_error gn_lib_set_pb_name (struct gn_statemachine *state, const char *name); /* Mr. Miller */ GNOKII_API gn_error gn_lib_set_pb_number (struct gn_statemachine *state, const char *number); /* +18001189383 */ GNOKII_API gn_error gn_lib_set_pb_caller_group(struct gn_statemachine *state, gn_phonebook_group_type grouptype); /* */ GNOKII_API gn_error gn_lib_set_pb_memtype (struct gn_statemachine *state, gn_memory_type memtype); /* */ GNOKII_API gn_error gn_lib_set_pb_location (struct gn_statemachine *state, int location); /* 1*/ GNOKII_API gn_error gn_lib_set_pb_date (struct gn_statemachine *state, gn_timestamp timestamp); /* */ GNOKII_API gn_error gn_lib_set_pb_subentry (struct gn_statemachine *state, const int index, /* index=-1 appends it */ gn_phonebook_entry_type entry_type, gn_phonebook_number_type number_type, const char *number); /* and now write the addressbook entry physically to phone. */ GNOKII_API gn_error gn_lib_phonebook_write_entry(struct gn_statemachine *state, const gn_memory_type memory_type, const int index); GNOKII_API const char *gn_subentrytype2string(gn_phonebook_entry_type entry_type, gn_phonebook_number_type number_type); /* standard helper functions */ /* use this function to get list of all supported phone models. Just start with num=0 and increase until you get back NULL */ GNOKII_API const char *gn_lib_get_supported_phone_model(const int num); /* use this function to get list of all supported connection type strings. Just start with num=0 and increase until you get back NULL */ GNOKII_API const char *gn_lib_get_supported_connection(const int num); /* use this function to search for a phone which is connected to this computer. Currently libgnokii will search only on IRDA and bluetooth. The state variable will be initialized if a phone was found. */ GNOKII_API gn_error gn_lib_search_one_connected_phone(struct gn_statemachine **state); /* use this function to return connection name to be used eg. in the config file */ GNOKII_API const char *gn_lib_get_connection_name(gn_connection_type ct); /* use this function to get the enum corresponding to the given connection name. Returns GN_CT_NONE if the connection is unknown or its support isn't compiled in the running library */ GNOKII_API gn_connection_type gn_get_connectiontype(const char *connection_type_string); /* use this function to check whether the connection type is enabled 0 - not supported 1 - supported */ GNOKII_API int gn_lib_is_connectiontype_supported(gn_connection_type ct); /* Misc */ GNOKII_API gn_memory_type gn_str2memory_type(const char *s); GNOKII_API const char *gn_memory_type2str(gn_memory_type mt); GNOKII_API const char *gn_memory_type_print(gn_memory_type mt); GNOKII_API int gn_timestamp_isvalid(const gn_timestamp dt); GNOKII_API void gn_timestamp_set(gn_timestamp *dt, int year, int month, int day, int hour, int minute, int second, int timezone); GNOKII_API void gn_timestamp_get(gn_timestamp *dt, int *year, int *month, int *day, int *hour, int *minute, int *second, int *timezone); /****************************************************************************/ /* ALL FOLLOWING FUNCTIONS SHOULD BE USED BY GNOKII INTERNAL PROGRAMS ONLY */ /****************************************************************************/ #ifndef GNOKII_DEPRECATED #if __GNUC__ - 0 > 3 || (__GNUC__ - 0 == 3 && __GNUC_MINOR__ - 0 >= 2) /* gcc >= 3.2 */ # define GNOKII_DEPRECATED __attribute__ ((deprecated)) #elif defined(_MSC_VER) && (_MSC_VER >= 1300) && (_MSC_VER < 1400) /* msvc >= 7 */ # define GNOKII_DEPRECATED __declspec(deprecated) #elif defined(_MSV_VER) && (_MSC_VER >= 1400) /* MS Visual Studio 2005 */ # define GNOKII_DEPRECATED #else # define GNOKII_DEPRECATED #endif #endif /* The global variable that keeps the current configuration. This should be * filled in before the phone initialization */ extern GNOKII_API struct gn_cfg_header *gn_cfg_info GNOKII_DEPRECATED; /* Zero the gn_data structure */ GNOKII_API void gn_data_clear(gn_data *data); GNOKII_API gn_error gn_gsm_initialise(struct gn_statemachine *sm) GNOKII_DEPRECATED; /* Config handling */ /* Get the key value from the given config, given section and the key name */ GNOKII_API char *gn_cfg_get(struct gn_cfg_header *cfg, const char *section, const char *key) GNOKII_DEPRECATED; /* Read the config from the file filename */ GNOKII_API gn_error gn_cfg_file_read(const char *filename) GNOKII_DEPRECATED; /* Read the config from the file already put into the memory */ GNOKII_API gn_error gn_cfg_memory_read(const char **lines) GNOKII_DEPRECATED; /* Read the config from the standard $XDG_CONFIG_HOME/gnokii/config, * $XDG_CONFIG_DIRS/gnokii/config, $HOME/.gnokiirc or /etc/gnokiirc locations */ GNOKII_API gn_error gn_cfg_read_default() GNOKII_DEPRECATED; /* free any resources which were used by libgnokii */ GNOKII_API void gn_cfg_free_default() GNOKII_DEPRECATED; /* Use phone_iname section for the communication. Default is the global section */ GNOKII_API gn_error gn_cfg_phone_load(const char *iname, struct gn_statemachine *state) GNOKII_DEPRECATED; /* In/Out routines, file formats */ GNOKII_API int gn_phonebook2vcard(FILE *f, gn_phonebook_entry *entry, char *location) GNOKII_DEPRECATED; GNOKII_API char *gn_phonebook2vcardstr(gn_phonebook_entry *entry); GNOKII_API int gn_vcard2phonebook(FILE *f, gn_phonebook_entry *entry) GNOKII_DEPRECATED; GNOKII_API int gn_vcardstr2phonebook(const char *vcard, gn_phonebook_entry *entry); GNOKII_API int gn_phonebook2ldif(FILE *f, gn_phonebook_entry *entry); GNOKII_API int gn_ldif2phonebook(FILE *f, gn_phonebook_entry *entry); /* reads internal gnokii raw phonebook format */ GNOKII_API gn_error gn_file_phonebook_raw_parse(gn_phonebook_entry *entry, char *buffer); GNOKII_API gn_error gn_file_phonebook_raw_write(FILE *f, gn_phonebook_entry *entry, char *memory_type_string); /* DEPRECATED */ GNOKII_API int gn_vcal_file_event_read(char *filename, gn_calnote *cnote, int number) GNOKII_DEPRECATED; GNOKII_API int gn_vcal_file_todo_read(char *filename, gn_todo *ctodo, int number) GNOKII_DEPRECATED; GNOKII_API int gn_calnote2ical(FILE *f, gn_calnote *calnote) GNOKII_DEPRECATED; GNOKII_API char *gn_calnote2icalstr (gn_calnote *calnote); GNOKII_API gn_error gn_ical2calnote(FILE *f, gn_calnote *calnote, int id) GNOKII_DEPRECATED; GNOKII_API gn_error gn_icalstr2calnote(const char *ical, gn_calnote *calnote, int id); GNOKII_API int gn_todo2ical(FILE *f, gn_todo *ctodo) GNOKII_DEPRECATED; GNOKII_API char *gn_todo2icalstr(gn_todo *ctodo); GNOKII_API int gn_ical2todo(FILE *f, gn_todo *ctodo, int id) GNOKII_DEPRECATED; GNOKII_API int gn_icalstr2todo(const char *ical, gn_todo *ctodo, int id); GNOKII_API void gn_number_sanitize(char *number, int maxlen); GNOKII_API void gn_phonebook_entry_sanitize(gn_phonebook_entry *entry); /* Debugging */ extern GNOKII_API gn_log_target gn_log_debug_mask; extern GNOKII_API gn_log_target gn_log_rlpdebug_mask; extern GNOKII_API gn_log_target gn_log_xdebug_mask; extern GNOKII_API void (*gn_elog_handler)(const char *fmt, va_list ap); GNOKII_API void gn_log_debug(const char *fmt, ...); GNOKII_API void gn_log_rlpdebug(const char *fmt, ...); GNOKII_API void gn_log_xdebug(const char *fmt, ...); GNOKII_API void gn_elog_write(const char *fmt, ...); typedef void (*gn_log_func_t)(const char *fmt, ...); GNOKII_API int gn_line_get(FILE *file, char *line, int count) GNOKII_DEPRECATED; /* Place a lock for the given device in /var/lock or /var/run */ GNOKII_API char *gn_device_lock(const char *) GNOKII_DEPRECATED; /* Remove a lock for the given device from /var/lock or /var/run */ GNOKII_API int gn_device_unlock(char *) GNOKII_DEPRECATED; GNOKII_API const char *gn_model_get(const char *product_name); GNOKII_API gn_phone_model *gn_phone_model_get(const char *product_name); /* SMS */ GNOKII_API gn_error gn_sms_send(gn_data *data, struct gn_statemachine *state); GNOKII_API gn_error gn_sms_save(gn_data *data, struct gn_statemachine *state); GNOKII_API gn_error gn_sms_get(gn_data *data, struct gn_statemachine *state); GNOKII_API gn_error gn_sms_get_no_validate(gn_data *data, struct gn_statemachine *state); GNOKII_API gn_error gn_sms_get_folder_changes(gn_data *data, struct gn_statemachine *state, int has_folders); GNOKII_API gn_error gn_sms_delete(gn_data *data, struct gn_statemachine *state); GNOKII_API gn_error gn_sms_delete_no_validate(gn_data *data, struct gn_statemachine *state); GNOKII_API char *gn_sms2mbox(gn_sms *sms, char *from); /* MMS */ GNOKII_API gn_error gn_mms_get(gn_data *data, struct gn_statemachine *state); GNOKII_API gn_error gn_mms_delete(gn_data *data, struct gn_statemachine *state); GNOKII_API gn_error gn_mms_free(gn_mms *mms); GNOKII_API gn_error gn_mms_alloc(gn_mms **mms); GNOKII_API gn_error gn_mms_convert(const gn_mms *source_mms, gn_mms *dest_mms); /* Call service */ GNOKII_API gn_error gn_call_dial(int *call_id, gn_data *data, struct gn_statemachine *state); GNOKII_API gn_error gn_call_check_active(struct gn_statemachine *state); #ifdef __cplusplus } #endif #endif /* _gnokii_h */ gnokii-0.6.31/include/gnokii.h.in0000644000175000017500000004153511666163120014674 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for Nokia mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 2001-2011 Pawel Kot Copyright (C) 2001 Chris Kemp copyright (C) 2002 Markus Plail Copyright (C) 2002-2003 BORBELY Zoltan, Ladis Michl Copyright (C) 2004 Martin Goldhahn Copyright (C) 2006 Helge Deller Main header file for gnokii. Include just this file in your app. */ #ifndef _gnokii_h #define _gnokii_h #ifdef __cplusplus extern "C" { #endif /* Some portability definitions first */ #if defined(__linux__) || defined(__GLIBC__) || defined(__CYGWIN__) # include # include #elif defined(__svr4__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__MACH__) # include # include #elif defined(_MSC_VER) && defined(WIN32) # include /* for struct timeval */ typedef unsigned char uint8_t; #endif #include #ifndef GNOKII_API # if defined(WIN32) && defined(GNOKIIDLL_IMPORTS) # define GNOKII_API __declspec(dllimport) # elif (__GNUC__ - 0 > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 3) # define GNOKII_API __attribute__ ((visibility("default"))) # else # define GNOKII_API # endif #endif #define LIBGNOKII_VERSION_STRING "@LIBGNOKII_VERSION_STRING@" #define LIBGNOKII_VERSION_MAJOR @LIBGNOKII_VERSION_MAJOR@ #define LIBGNOKII_VERSION_MINOR @LIBGNOKII_VERSION_MINOR@ #define LIBGNOKII_VERSION_RELEASE @LIBGNOKII_VERSION_RELEASE@ #define LIBGNOKII_MAKE_VERSION(a,b,c) (((a) << 16) | ((b) << 8) | (c)) #define LIBGNOKII_VERSION \ LIBGNOKII_MAKE_VERSION(LIBGNOKII_VERSION_MAJOR,LIBGNOKII_VERSION_MINOR,LIBGNOKII_VERSION_RELEASE) struct gn_statemachine; #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* Gnokii library functions - they all start with gn_lib_ */ /* Initialize the library for use by programs. Call this function before any other */ GNOKII_API gn_error gn_lib_init(); /* Get the current runtime version (LIBGNOKII_VERSION) of libgnokii - see LIBGNOKII_MAKE_VERSION() */ GNOKII_API unsigned int gn_lib_version(); /* free any resources which were used by libgnokii */ GNOKII_API void gn_lib_library_free(void); /* return last error code from functions below */ GNOKII_API gn_error gn_lib_lasterror(struct gn_statemachine *state); /* initialize gnokii library and structures for given phone. configname is the name of the profile, if empty or NULL, [global] will be taken. gn_lib_phoneprofile_load assumes default config file. */ GNOKII_API gn_error gn_lib_phoneprofile_load_from_file(const char *configfile, const char *configname, struct gn_statemachine **state); GNOKII_API gn_error gn_lib_phoneprofile_load(const char *configname, struct gn_statemachine **state); /* initialize gnokii library and structures for given phone lines is line by line representation as it was read from the config file. */ GNOKII_API gn_error gn_lib_phoneprofile_load_from_external(char **lines, struct gn_statemachine **state); /* Free any structures and resources which were loaded in this state machine. */ GNOKII_API gn_error gn_lib_phoneprofile_free(struct gn_statemachine **state); /* opens connection to the phone. Necessary locking will be made */ GNOKII_API gn_error gn_lib_phone_open(struct gn_statemachine *state); /* closes the connection to the phone */ GNOKII_API gn_error gn_lib_phone_close(struct gn_statemachine *state); /* * Changes the driver used for connection. * It closes the existing one and initializes new one. * The new driver must be present in the parsed configuration (this function does not reread the config). * @driver is the name of the phone section from the config. */ GNOKII_API gn_error gn_lib_phone_change_driver(struct gn_statemachine *state, const char *driver); /* ask phone for static information (model, manufacturer, revision and imei) */ GNOKII_API const char *gn_lib_get_phone_model (struct gn_statemachine *state); /* e.g. 6310 */ GNOKII_API const char *gn_lib_get_phone_product_name(struct gn_statemachine *state); /* e.g. NPE-4 */ GNOKII_API const char *gn_lib_get_phone_manufacturer(struct gn_statemachine *state); /* e.g. Nokia */ GNOKII_API const char *gn_lib_get_phone_revision (struct gn_statemachine *state); /* e.g. V 04.20 */ GNOKII_API const char *gn_lib_get_phone_imei (struct gn_statemachine *state); /* Get the key value from the given section and the key name */ GNOKII_API const char *gn_lib_cfg_get(const char *section, const char *key); /* Phone Addressbook functions */ /* get number of used/free phone addressbook memory slots */ GNOKII_API gn_error gn_lib_addressbook_memstat(struct gn_statemachine *state, const gn_memory_type memory_type, int *num_used, int *num_free); /* remove an addressbook entry physically from phone. */ GNOKII_API gn_error gn_lib_phonebook_entry_delete(struct gn_statemachine *state, const gn_memory_type memory_type, const int index); /* check if given addressbook entry is empty. Returns "true" if empty, 0 if not. */ GNOKII_API int gn_lib_phonebook_entry_isempty(struct gn_statemachine *state, const gn_memory_type memory_type, const int index); /* read given addressbook entry into internal structure. Afterwards ask for each value with functions below */ GNOKII_API gn_error gn_lib_phonebook_read_entry(struct gn_statemachine *state, const gn_memory_type memory_type, const int index); /* after reading an entry with gn_lib_phonebook_read_entry() ask for the values of the phonebook entry */ GNOKII_API const char * gn_lib_get_pb_name (struct gn_statemachine *state); /* Mr. Miller */ GNOKII_API const char * gn_lib_get_pb_number (struct gn_statemachine *state); /* +18001189383 */ GNOKII_API gn_phonebook_group_type gn_lib_get_pb_caller_group (struct gn_statemachine *state); /* */ GNOKII_API gn_memory_type gn_lib_get_pb_memtype (struct gn_statemachine *state); /* */ GNOKII_API int gn_lib_get_pb_location (struct gn_statemachine *state); /* 1*/ GNOKII_API gn_timestamp gn_lib_get_pb_date (struct gn_statemachine *state); /* */ GNOKII_API int gn_lib_get_pb_num_subentries (struct gn_statemachine *state); /* */ GNOKII_API gn_error gn_lib_get_pb_subentry(struct gn_statemachine *state, const int index, gn_phonebook_entry_type *entry_type, gn_phonebook_number_type *number_type, const char **number); /* How to write to a phonebook entry with 3 steps: a) call gn_lib_phonebook_prepare_write_entry() to initialize structures b) call gn_lib_set_pb_*() to set values (do this for each value you want to set) c) call gn_lib_phonebook_write_entry() to write it physically to phone */ /* initialize gnokii internal phonebook structure */ GNOKII_API gn_error gn_lib_phonebook_prepare_write_entry(struct gn_statemachine *state); /* call each of the functions to set a specific value in current internal memory */ GNOKII_API gn_error gn_lib_set_pb_name (struct gn_statemachine *state, const char *name); /* Mr. Miller */ GNOKII_API gn_error gn_lib_set_pb_number (struct gn_statemachine *state, const char *number); /* +18001189383 */ GNOKII_API gn_error gn_lib_set_pb_caller_group(struct gn_statemachine *state, gn_phonebook_group_type grouptype); /* */ GNOKII_API gn_error gn_lib_set_pb_memtype (struct gn_statemachine *state, gn_memory_type memtype); /* */ GNOKII_API gn_error gn_lib_set_pb_location (struct gn_statemachine *state, int location); /* 1*/ GNOKII_API gn_error gn_lib_set_pb_date (struct gn_statemachine *state, gn_timestamp timestamp); /* */ GNOKII_API gn_error gn_lib_set_pb_subentry (struct gn_statemachine *state, const int index, /* index=-1 appends it */ gn_phonebook_entry_type entry_type, gn_phonebook_number_type number_type, const char *number); /* and now write the addressbook entry physically to phone. */ GNOKII_API gn_error gn_lib_phonebook_write_entry(struct gn_statemachine *state, const gn_memory_type memory_type, const int index); GNOKII_API const char *gn_subentrytype2string(gn_phonebook_entry_type entry_type, gn_phonebook_number_type number_type); /* standard helper functions */ /* use this function to get list of all supported phone models. Just start with num=0 and increase until you get back NULL */ GNOKII_API const char *gn_lib_get_supported_phone_model(const int num); /* use this function to get list of all supported connection type strings. Just start with num=0 and increase until you get back NULL */ GNOKII_API const char *gn_lib_get_supported_connection(const int num); /* use this function to search for a phone which is connected to this computer. Currently libgnokii will search only on IRDA and bluetooth. The state variable will be initialized if a phone was found. */ GNOKII_API gn_error gn_lib_search_one_connected_phone(struct gn_statemachine **state); /* use this function to return connection name to be used eg. in the config file */ GNOKII_API const char *gn_lib_get_connection_name(gn_connection_type ct); /* use this function to get the enum corresponding to the given connection name. Returns GN_CT_NONE if the connection is unknown or its support isn't compiled in the running library */ GNOKII_API gn_connection_type gn_get_connectiontype(const char *connection_type_string); /* use this function to check whether the connection type is enabled 0 - not supported 1 - supported */ GNOKII_API int gn_lib_is_connectiontype_supported(gn_connection_type ct); /* Misc */ GNOKII_API gn_memory_type gn_str2memory_type(const char *s); GNOKII_API const char *gn_memory_type2str(gn_memory_type mt); GNOKII_API const char *gn_memory_type_print(gn_memory_type mt); GNOKII_API int gn_timestamp_isvalid(const gn_timestamp dt); GNOKII_API void gn_timestamp_set(gn_timestamp *dt, int year, int month, int day, int hour, int minute, int second, int timezone); GNOKII_API void gn_timestamp_get(gn_timestamp *dt, int *year, int *month, int *day, int *hour, int *minute, int *second, int *timezone); /****************************************************************************/ /* ALL FOLLOWING FUNCTIONS SHOULD BE USED BY GNOKII INTERNAL PROGRAMS ONLY */ /****************************************************************************/ #ifndef GNOKII_DEPRECATED #if __GNUC__ - 0 > 3 || (__GNUC__ - 0 == 3 && __GNUC_MINOR__ - 0 >= 2) /* gcc >= 3.2 */ # define GNOKII_DEPRECATED __attribute__ ((deprecated)) #elif defined(_MSC_VER) && (_MSC_VER >= 1300) && (_MSC_VER < 1400) /* msvc >= 7 */ # define GNOKII_DEPRECATED __declspec(deprecated) #elif defined(_MSV_VER) && (_MSC_VER >= 1400) /* MS Visual Studio 2005 */ # define GNOKII_DEPRECATED #else # define GNOKII_DEPRECATED #endif #endif /* The global variable that keeps the current configuration. This should be * filled in before the phone initialization */ extern GNOKII_API struct gn_cfg_header *gn_cfg_info GNOKII_DEPRECATED; /* Zero the gn_data structure */ GNOKII_API void gn_data_clear(gn_data *data); GNOKII_API gn_error gn_gsm_initialise(struct gn_statemachine *sm) GNOKII_DEPRECATED; /* Config handling */ /* Get the key value from the given config, given section and the key name */ GNOKII_API char *gn_cfg_get(struct gn_cfg_header *cfg, const char *section, const char *key) GNOKII_DEPRECATED; /* Read the config from the file filename */ GNOKII_API gn_error gn_cfg_file_read(const char *filename) GNOKII_DEPRECATED; /* Read the config from the file already put into the memory */ GNOKII_API gn_error gn_cfg_memory_read(const char **lines) GNOKII_DEPRECATED; /* Read the config from the standard $XDG_CONFIG_HOME/gnokii/config, * $XDG_CONFIG_DIRS/gnokii/config, $HOME/.gnokiirc or /etc/gnokiirc locations */ GNOKII_API gn_error gn_cfg_read_default() GNOKII_DEPRECATED; /* free any resources which were used by libgnokii */ GNOKII_API void gn_cfg_free_default() GNOKII_DEPRECATED; /* Use phone_iname section for the communication. Default is the global section */ GNOKII_API gn_error gn_cfg_phone_load(const char *iname, struct gn_statemachine *state) GNOKII_DEPRECATED; /* In/Out routines, file formats */ GNOKII_API int gn_phonebook2vcard(FILE *f, gn_phonebook_entry *entry, char *location) GNOKII_DEPRECATED; GNOKII_API char *gn_phonebook2vcardstr(gn_phonebook_entry *entry); GNOKII_API int gn_vcard2phonebook(FILE *f, gn_phonebook_entry *entry) GNOKII_DEPRECATED; GNOKII_API int gn_vcardstr2phonebook(const char *vcard, gn_phonebook_entry *entry); GNOKII_API int gn_phonebook2ldif(FILE *f, gn_phonebook_entry *entry); GNOKII_API int gn_ldif2phonebook(FILE *f, gn_phonebook_entry *entry); /* reads internal gnokii raw phonebook format */ GNOKII_API gn_error gn_file_phonebook_raw_parse(gn_phonebook_entry *entry, char *buffer); GNOKII_API gn_error gn_file_phonebook_raw_write(FILE *f, gn_phonebook_entry *entry, char *memory_type_string); /* DEPRECATED */ GNOKII_API int gn_vcal_file_event_read(char *filename, gn_calnote *cnote, int number) GNOKII_DEPRECATED; GNOKII_API int gn_vcal_file_todo_read(char *filename, gn_todo *ctodo, int number) GNOKII_DEPRECATED; GNOKII_API int gn_calnote2ical(FILE *f, gn_calnote *calnote) GNOKII_DEPRECATED; GNOKII_API char *gn_calnote2icalstr (gn_calnote *calnote); GNOKII_API gn_error gn_ical2calnote(FILE *f, gn_calnote *calnote, int id) GNOKII_DEPRECATED; GNOKII_API gn_error gn_icalstr2calnote(const char *ical, gn_calnote *calnote, int id); GNOKII_API int gn_todo2ical(FILE *f, gn_todo *ctodo) GNOKII_DEPRECATED; GNOKII_API char *gn_todo2icalstr(gn_todo *ctodo); GNOKII_API int gn_ical2todo(FILE *f, gn_todo *ctodo, int id) GNOKII_DEPRECATED; GNOKII_API int gn_icalstr2todo(const char *ical, gn_todo *ctodo, int id); GNOKII_API void gn_number_sanitize(char *number, int maxlen); GNOKII_API void gn_phonebook_entry_sanitize(gn_phonebook_entry *entry); /* Debugging */ extern GNOKII_API gn_log_target gn_log_debug_mask; extern GNOKII_API gn_log_target gn_log_rlpdebug_mask; extern GNOKII_API gn_log_target gn_log_xdebug_mask; extern GNOKII_API void (*gn_elog_handler)(const char *fmt, va_list ap); GNOKII_API void gn_log_debug(const char *fmt, ...); GNOKII_API void gn_log_rlpdebug(const char *fmt, ...); GNOKII_API void gn_log_xdebug(const char *fmt, ...); GNOKII_API void gn_elog_write(const char *fmt, ...); typedef void (*gn_log_func_t)(const char *fmt, ...); GNOKII_API int gn_line_get(FILE *file, char *line, int count) GNOKII_DEPRECATED; /* Place a lock for the given device in /var/lock or /var/run */ GNOKII_API char *gn_device_lock(const char *) GNOKII_DEPRECATED; /* Remove a lock for the given device from /var/lock or /var/run */ GNOKII_API int gn_device_unlock(char *) GNOKII_DEPRECATED; GNOKII_API const char *gn_model_get(const char *product_name); GNOKII_API gn_phone_model *gn_phone_model_get(const char *product_name); /* SMS */ GNOKII_API gn_error gn_sms_send(gn_data *data, struct gn_statemachine *state); GNOKII_API gn_error gn_sms_save(gn_data *data, struct gn_statemachine *state); GNOKII_API gn_error gn_sms_get(gn_data *data, struct gn_statemachine *state); GNOKII_API gn_error gn_sms_get_no_validate(gn_data *data, struct gn_statemachine *state); GNOKII_API gn_error gn_sms_get_folder_changes(gn_data *data, struct gn_statemachine *state, int has_folders); GNOKII_API gn_error gn_sms_delete(gn_data *data, struct gn_statemachine *state); GNOKII_API gn_error gn_sms_delete_no_validate(gn_data *data, struct gn_statemachine *state); GNOKII_API char *gn_sms2mbox(gn_sms *sms, char *from); /* MMS */ GNOKII_API gn_error gn_mms_get(gn_data *data, struct gn_statemachine *state); GNOKII_API gn_error gn_mms_delete(gn_data *data, struct gn_statemachine *state); GNOKII_API gn_error gn_mms_free(gn_mms *mms); GNOKII_API gn_error gn_mms_alloc(gn_mms **mms); GNOKII_API gn_error gn_mms_convert(const gn_mms *source_mms, gn_mms *dest_mms); /* Call service */ GNOKII_API gn_error gn_call_dial(int *call_id, gn_data *data, struct gn_statemachine *state); GNOKII_API gn_error gn_call_check_active(struct gn_statemachine *state); #ifdef __cplusplus } #endif #endif /* _gnokii_h */ gnokii-0.6.31/include/gnokii-internal.h0000644000175000017500000002070111666163120016071 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings, Pavel Janik Copyright (C) 2000-2004 BORBELY Zoltan Copyright (C) 2000-2011 Pawel Kot Copyright (C) 2000 Marcin Wiacek, Chris Kemp Copyright (C) 2002 Ladis Michl Copyright (C) 2003 Osma Suominen, Martin Goldhahn Internal API for libgnokii */ #ifndef _gnokii_internal_h #define _gnokii_internal_h #include "compat.h" #include "misc.h" #if !defined(GNOKII_DEPRECATED) # define GNOKII_DEPRECATED /* do not warn about deprecated functions here */ #endif #include "gnokii.h" #define return_on_error(func) \ do { \ gn_error error; \ error = func; \ if (error != GN_ERR_NONE) \ return error; \ } while (0) /* SMS */ gn_error gn_sms_parse(gn_data *data); gn_error gn_sms_pdu2raw(gn_sms_raw *rawsms, unsigned char *pdu, int pdu_len, int flags); gn_error gn_sms_request(gn_data *data, struct gn_statemachine *state); gn_error sms_prepare(gn_sms *sms, gn_sms_raw *rawsms); gn_timestamp *sms_timestamp_unpack(unsigned char *number, gn_timestamp *dt); unsigned char *sms_timestamp_pack(gn_timestamp *dt, unsigned char *number); /* Statemachine */ gn_error sm_initialise(struct gn_statemachine *state); gn_error sm_message_send(u16 messagesize, u8 messagetype, void *message, struct gn_statemachine *state); gn_error sm_wait_for(unsigned char messagetype, gn_data *data, struct gn_statemachine *state); void sm_incoming_function(u8 messagetype, void *message, u16 messagesize, struct gn_statemachine *state); void sm_incoming_acknowledge(struct gn_statemachine *state); void sm_reset(struct gn_statemachine *state); gn_error sm_error_get(unsigned char messagetype, struct gn_statemachine *state); gn_error sm_block_timeout(int waitfor, int t, gn_data *data, struct gn_statemachine *state); gn_error sm_block(int waitfor, gn_data *data, struct gn_statemachine *state); gn_error sm_block_no_retry_timeout(int waitfor, int t, gn_data *data, struct gn_statemachine *state); gn_error sm_block_no_retry(int waitfor, gn_data *data, struct gn_statemachine *state); gn_error sm_block_ack(struct gn_statemachine *state); void sm_message_dump(gn_log_func_t lfunc, int messagetype, unsigned char *message, int length); void sm_unhandled_frame_dump(int messagetype, unsigned char *message, int length, struct gn_statemachine *state); extern void hex2bin(unsigned char *dest, const unsigned char *src, unsigned int len); extern void bin2hex(unsigned char *dest, const unsigned char *src, unsigned int len); int char_7bit_unpack(unsigned int offset, unsigned int in_length, unsigned int out_length, unsigned char *input, unsigned char *output); int char_7bit_pack(unsigned int offset, unsigned char *input, unsigned char *output, unsigned int *in_len); int char_mblen(const char *src); unsigned int char_unicode_decode(unsigned char* dest, const unsigned char* src, int len); unsigned int char_unicode_encode(unsigned char* dest, const unsigned char* src, int len); int char_default_alphabet_decode(unsigned char* dest, const unsigned char* src, int len); size_t char_ascii_encode(char *dest, size_t dest_len, const char *src, size_t len); void char_hex_decode(unsigned char* dest, const unsigned char* src, int len); size_t char_hex_encode(char *dest, size_t dest_len, const char *src, size_t len); void char_ucs2_decode(unsigned char* dest, const unsigned char* src, int len); size_t char_ucs2_encode(char *dest, size_t dest_len, const char *src, size_t len); unsigned char char_def_alphabet_encode(unsigned int value); unsigned int char_def_alphabet_decode(unsigned char value); size_t char_uni_alphabet_encode(const char *value, size_t n, wchar_t *dest, MBSTATE *mbs); int char_uni_alphabet_decode(wchar_t value, unsigned char *dest, MBSTATE *mbs); extern char *char_bcd_number_get(u8 *number); extern int char_semi_octet_pack(char *number, unsigned char *output, gn_gsm_number_type type); int ucs2_encode(char *outstring, int outlen, const char *instring, int inlen); int char_def_alphabet_ext_count(unsigned char *input, int length); bool char_def_alphabet_ext(unsigned int value); int char_def_alphabet_string_copy(char *dest, const char *src, int len, int offset); gn_sms_dcs_alphabet_type char_def_alphabet_string_stats(char *str, int *enc_chars, int *ext_chars); /* Ringtones */ int vcal_time_get(gn_timestamp *dt, char *time); int calnote_fill(gn_calnote *note, char *type, char *text, char *desc, char *time, char *alarm); int todo_fill(gn_todo *note, char *text, char *todo_priority); /* Ringtone Files */ gn_error file_rtttl_save(FILE *file, gn_ringtone *ringtone); gn_error file_ott_save(FILE *file, gn_ringtone *ringtone); gn_error file_midi_save(FILE *file, gn_ringtone *ringtone); gn_error file_nokraw_save(FILE *file, gn_ringtone *ringtone, int dct4); gn_error file_rtttl_load(FILE *file, gn_ringtone *ringtone); gn_error file_ott_load(FILE *file, gn_ringtone *ringtone); gn_error file_midi_load(FILE *file, gn_ringtone *ringtone); gn_error file_nokraw_load(FILE *file, gn_ringtone *ringtone); /* Bitmap Files */ void file_nol_save(FILE *file, gn_bmp *bitmap, gn_phone *info); void file_ngg_save(FILE *file, gn_bmp *bitmap, gn_phone *info); void file_nsl_save(FILE *file, gn_bmp *bitmap, gn_phone *info); void file_nlm_save(FILE *file, gn_bmp *bitmap); void file_ota_save(FILE *file, gn_bmp *bitmap); void file_bmp_save(FILE *file, gn_bmp *bitmap); #ifdef XPM void file_xpm_save(char *filename, gn_bmp *bitmap); #endif gn_error file_ngg_load(FILE *file, gn_bmp *bitmap, gn_phone *info); gn_error file_nol_load(FILE *file, gn_bmp *bitmap, gn_phone *info); gn_error file_nsl_load(FILE *file, gn_bmp *bitmap); gn_error file_nlm_load(FILE *file, gn_bmp *bitmap); gn_error file_ota_load(FILE *file, gn_bmp *bitmap, gn_phone *info); gn_error file_bmp_load(FILE *file, gn_bmp *bitmap); #ifdef XPM gn_error file_xpm_load(char *filename, gn_bmp *bitmap); #endif int ringtone_sms_encode(unsigned char *message, gn_ringtone *ringtone); int imelody_sms_encode(unsigned char *imelody, unsigned char *message); gn_error phonebook_decode(unsigned char *blockstart, int length, gn_data *data, int blocks, int memtype, int speeddial_pos); gn_error calnote_decode(unsigned char *message, int length, gn_data *data); gn_error calnote_get_alarm(int alarmdiff, gn_timestamp *time, gn_timestamp *alarm); int sms_nokia_smart_message_part_pack(unsigned char *msg, unsigned int size, unsigned int type, bool first); int sms_nokia_text_encode(unsigned char *text, unsigned char *message, bool first); int sms_nokia_bitmap_encode(gn_bmp *bitmap, unsigned char *message, bool first); struct gn_cfg_header *cfg_file_read(const char *filename); typedef void (*cfg_foreach_func)(const char *section, const char *key, const char *value); void cfg_foreach(const char *section, cfg_foreach_func func); char *cfg_set(struct gn_cfg_header *cfg, const char *section, const char *key, const char *value); int cfg_file_write(struct gn_cfg_header *cfg, const char *filename); /* Get some information about the given phone */ gn_phone_model *gn_cfg_get_phone_model(struct gn_cfg_header *cfg, const char *product_name); gn_error isdn_cause2gn_error(char **src, char **msg, unsigned char loc, unsigned char cause); int utf8_decode(char *dest, size_t destlen, const char *src, size_t inlen); int utf8_encode(char *dest, int destlen, const char *src, int inlen); int string_base64(const char *instring); int base64_decode(char *dest, int destlen, const char *src, int inlen); int base64_encode(char *dest, int destlen, const char *src, int inlen); int utf8_base64_decode(char *dest, int destlen, const char *src, int inlen); int utf8_base64_encode(char *dest, int destlen, const char *src, int inlen); int add_slashes(char *dest, char *src, int maxlen, int len); int strip_slashes(char *dest, const char *src, int maxlen, int len); #endif /* _gnokii_internal_h */ gnokii-0.6.31/include/phones/0000755000175000017500000000000011666163460014131 5ustar leoleognokii-0.6.31/include/phones/Makefile.am0000644000175000017500000000047411666163120016163 0ustar leoleo EXTRA_HEADERS = \ atbosch.h \ ateric.h \ atgen.h \ athuawei.h \ atlg.h \ atmot.h \ atnok.h \ atsag.h \ atsam.h \ atsie.h \ atsoer.h \ dc2711.h \ generic.h \ gnapplet.h \ nk2110.h \ nk3110.h \ nk6100.h \ nk6510.h \ nk7110.h \ nokia.h \ pcsc.h EXTRA_DIST = $(EXTRA_HEADERS) gnokii-0.6.31/include/phones/Makefile.in0000644000175000017500000003416511666163212016202 0ustar leoleo# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = include/phones DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_expand_dir.m4 \ $(top_srcdir)/m4/acx_pthread.m4 $(top_srcdir)/m4/intltool.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLUETOOTH_LIBS = @BLUETOOTH_LIBS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FIND = @FIND@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLDFLAGS = @GLDFLAGS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GMODULE_CFLAGS = @GMODULE_CFLAGS@ GMODULE_LIBS = @GMODULE_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GNOKII_LT_VERSION = @GNOKII_LT_VERSION@ GNOKII_LT_VERSION_AGE = @GNOKII_LT_VERSION_AGE@ GNOKII_LT_VERSION_CURRENT = @GNOKII_LT_VERSION_CURRENT@ GNOKII_LT_VERSION_REVISION = @GNOKII_LT_VERSION_REVISION@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_LIBICAL = @HAVE_LIBICAL@ HAVE_LIBUSB = @HAVE_LIBUSB@ HAVE_SOCKETPHONET = @HAVE_SOCKETPHONET@ HAVE_XGNOKII = @HAVE_XGNOKII@ ICAL_CFLAGS = @ICAL_CFLAGS@ ICAL_LIBS = @ICAL_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBGNOKII_VERSION_MAJOR = @LIBGNOKII_VERSION_MAJOR@ LIBGNOKII_VERSION_MINOR = @LIBGNOKII_VERSION_MINOR@ LIBGNOKII_VERSION_RELEASE = @LIBGNOKII_VERSION_RELEASE@ LIBGNOKII_VERSION_STRING = @LIBGNOKII_VERSION_STRING@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBPCSCLITE_CFLAGS = @LIBPCSCLITE_CFLAGS@ LIBPCSCLITE_LIBS = @LIBPCSCLITE_LIBS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKE = @MAKE@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ MYSQLCONFIG = @MYSQLCONFIG@ MYSQLCONFIG5 = @MYSQLCONFIG5@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_LIBS = @MYSQL_LIBS@ NEED_LOCALE_CHARSET = @NEED_LOCALE_CHARSET@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OWN_GETOPT = @OWN_GETOPT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PGCONFIG = @PGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSTGRES_CFLAGS = @POSTGRES_CFLAGS@ POSTGRES_LIBS = @POSTGRES_LIBS@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LIBS = @SQLITE3_LIBS@ SQLITE_CFLAGS = @SQLITE_CFLAGS@ SQLITE_LIBS = @SQLITE_LIBS@ STRIP = @STRIP@ TCP_LIBS = @TCP_LIBS@ TERMLDFLAGS = @TERMLDFLAGS@ TERMLIBS = @TERMLIBS@ USB_LIBS = @USB_LIBS@ USE_NLS = @USE_NLS@ USE_UNIX98PTYS = @USE_UNIX98PTYS@ VERSION = @VERSION@ WIN32 = @WIN32@ WIN32_CROSS = @WIN32_CROSS@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ XPACKAGE = @XPACKAGE@ XPM_CFLAGS = @XPM_CFLAGS@ XPM_LIBS = @XPM_LIBS@ XVERSION = @XVERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ acx_pthread_config = @acx_pthread_config@ 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@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_HEADERS = \ atbosch.h \ ateric.h \ atgen.h \ athuawei.h \ atlg.h \ atmot.h \ atnok.h \ atsag.h \ atsam.h \ atsie.h \ atsoer.h \ dc2711.h \ generic.h \ gnapplet.h \ nk2110.h \ nk3110.h \ nk6100.h \ nk6510.h \ nk7110.h \ nokia.h \ pcsc.h EXTRA_DIST = $(EXTRA_HEADERS) all: all-am .SUFFIXES: $(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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/phones/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu include/phones/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 $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean 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-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gnokii-0.6.31/include/phones/pcsc.h0000644000175000017500000001000411666163120015216 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2007 Daniele Forsi This file provides functions for accessing PC/SC SIM smart cards. */ #ifndef _gnokii_phones_pcsc_h #define _gnokii_phones_pcsc_h #include "compat.h" #include "gnokii.h" #include "phones/generic.h" #include "gnokii-internal.h" #include #include #if !HAVE_LPCSTR typedef const char *LPCSTR; #endif /* some CLAss, INStruction pairs defined by GSM specs taken from ETSI TS 100 977 V8.13.0 (2005-06) subclause : command 9.2.1 : SELECT 9.2.3 : READ BINARY 9.2.4 : UPDATE BINARY 9.2.5 : READ RECORD 9.2.6 : UPDATE RECORD 9.2.9 : VERIFY CHV 9.2.18 : GET RESPONSE */ #define GN_PCSC_CMD_SELECT 0xA0, 0xA4 #define GN_PCSC_CMD_READ_BINARY 0xA0, 0xB0 #define GN_PCSC_CMD_UPDATE_BINARY 0xA0, 0xD6 #define GN_PCSC_CMD_READ_RECORD 0xA0, 0xB2 #define GN_PCSC_CMD_UPDATE_RECORD 0xA0, 0xDC #define GN_PCSC_CMD_VERIFY_CHV 0xA0, 0x20 #define GN_PCSC_CMD_GET_RESPONSE 0xA0, 0xC0 /* useful defines from subclause 9.2.5 */ #define GN_PCSC_FILE_READ_NEXT 2 #define GN_PCSC_FILE_READ_PREV 3 #define GN_PCSC_FILE_READ_ABS 4 /* useful defines from subclause 9.3 */ #define GN_PCSC_FILE_STRUCTURE_TRANSPARENT 0 #define GN_PCSC_FILE_STRUCTURE_LINEAR_FIXED 1 #define GN_PCSC_FILE_STRUCTURE_CYCLIC 3 #define GN_PCSC_FILE_TYPE_MF 1 #define GN_PCSC_FILE_TYPE_DF 2 #define GN_PCSC_FILE_TYPE_EF 4 #define GN_PCSC_PARAMETER_OFFSET_P1 2 #define GN_PCSC_PARAMETER_OFFSET_P2 3 #define GN_PCSC_PARAMETER_OFFSET_P3 4 #define GN_PCSC_PARAMETER_OFFSET_FILEID_HI 5 #define GN_PCSC_PARAMETER_OFFSET_FILEID_LO 6 #define GN_PCSC_DATA_OFFSET 5 /* misc defines */ #define GN_PCSC_ICCID_MAX_LENGTH 21 #define GN_PCSC_IMSI_MAX_LENGTH 16 #define GN_PCSC_SPN_MAX_LENGTH 17 /* some file identifiers (full list is in subclause 10.7) */ /* This is the top level container */ #define GN_PCSC_FILE_MF 0x3F00 /* ICC Identification */ #define GN_PCSC_FILE_EF_ICCID 0x2FE2 /* This is the container of phonebooks and SMS */ #define GN_PCSC_FILE_DF_TELECOM 0x7F10 /* This is the container of GSM specific information */ #define GN_PCSC_FILE_DF_GSM 0x7F20 /* International Mobile Subscriber Identity (IMSI) */ #define GN_PCSC_FILE_EF_IMSI 0x6F07 /* Abbreviated Dialling Numbers */ #define GN_PCSC_FILE_EF_ADN 0x6F3A /* Fixed Dialling Numbers */ #define GN_PCSC_FILE_EF_FDN 0x6F3B /* Short Messages */ #define GN_PCSC_FILE_EF_SMS 0x6F3C /* Mobile Subscriber Integrated Services Digital Network Number */ #define GN_PCSC_FILE_EF_MSISDN 0x6F40 /* Short Message Service Parameters */ #define GN_PCSC_FILE_EF_SMSP 0x6f42 /* Last Numbers Dialled */ #define GN_PCSC_FILE_EF_LND 0x6F44 /* Service Provider Name */ #define GN_PCSC_FILE_EF_SPN 0x6F46 /* Service Dialling Numbers */ #define GN_PCSC_FILE_EF_SDN 0x6F49 /* Location Information */ #define GN_PCSC_FILE_EF_LOCI 0x6F7E /* Barred Dialling Numbers */ #define GN_PCSC_FILE_EF_BDN 0x6F4D /* Administrative data */ #define GN_PCSC_FILE_EF_AD 0x6FAD /* Phase Identification */ #define GN_PCSC_FILE_EF_PHASE 0x6FAE /* Emergency Call Codes */ #define GN_PCSC_FILE_EF_ECC 0x6FB7 /* a convenience define */ #define GN_PCSC_FILE_UNKNOWN 0x0000 typedef struct { BYTE *pbRecvBuffer; DWORD dwRecvLength; DWORD dwReceived; BYTE bRecordNumber; } PCSC_IOSTRUCT; #endif /* #ifndef _gnokii_phones_pcsc_h */ gnokii-0.6.31/include/phones/atsam.h0000644000175000017500000000241211666163120015377 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2002 Ladislav Michl Copyright (C) 2007 Ingmar Steen This file provides functions specific to AT commands on Samsung phones. See README for more details on supported mobile phones. */ #ifndef _gnokii_atsam_h #define _gnokii_atsam_h #include "gnokii-internal.h" void at_samsung_init(char* foundmodel, char* setupmodel, struct gn_statemachine *state); size_t decode_ucs2_as_utf8(char *dst, const char *src, int len); #endif gnokii-0.6.31/include/phones/atsoer.h0000644000175000017500000000221611666163120015571 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2004 Hugh Hass, Pawel Kot This file provides functions specific to AT commands on SonyEricsson phones. See README for more details on supported mobile phones. */ #ifndef _gnokii_atsoer_h #define _gnokii_atsoer_h #include "gnokii-internal.h" void at_sonyericsson_init(char* foundmodel, char* setupmodel, struct gn_statemachine *state); #endif gnokii-0.6.31/include/phones/atbosch.h0000644000175000017500000000222311666163120015715 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2002 Ladislav Michl This file provides functions specific to AT commands on Bosch phones. See README for more details on supported mobile phones. */ #ifndef _gnokii_atbosch_h #define _gnokii_atbosch_h #include "gnokii-internal.h" void at_bosch_init(char* foundmodel, char* setupmodel, struct gn_statemachine *state); #endif gnokii-0.6.31/include/phones/nk7110.h0000644000175000017500000002262711666163120015225 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2000 Hugh Blemings & Pavel Janík ml. Copyright (C) 2000 Chris Kemp Copyright (C) 2001-2003 Pawel Kot, BORBELY Zoltan Copyright (C) 2002 Markus Plail This file provides functions specific to the Nokia 7110 series. See README for more details on supported mobile phones. The various routines are called nk7110_(whatever). */ #ifndef _gnokii_phones_nk7110_h #define _gnokii_phones_nk7110_h #include "misc.h" #include "gnokii.h" typedef enum { GN_OP_NK7110_GetSMSFolders = GN_OP_Max, GN_OP_NK7110_GetSMSFolderStatus, GN_OP_NK7110_GetPictureList, GN_OP_NK7110_Max /* don't append anything after this entry */ } gn_nk7100_operation; /* Message types */ #define NK7110_MSG_COMMSTATUS 0x01 /* Communication status */ #define NK7110_MSG_SMS 0x02 /* SMS handling */ #define NK7110_MSG_PHONEBOOK 0x03 /* Phonebook functions */ #define NK7110_MSG_DIVERT 0x06 /* Call Divert */ #define NK7110_MSG_NETSTATUS 0x0a /* Network status */ #define NK7110_MSG_CALENDAR 0x13 /* Calendar notes */ #define NK7110_MSG_FOLDER 0x14 /* Folders handling */ #define NK7110_MSG_BATTERY 0x17 /* Battery info */ #define NK7110_MSG_CLOCK 0x19 /* Date & alarm */ #define NK7110_MSG_IDENTITY 0x1b /* Brief product info */ #define NK7110_MSG_RINGTONE 0x1f /* Ringtone handling */ #define NK7110_MSG_PROFILE 0x39 /* Profile handling */ #define NK7110_MSG_WAP 0x3f /* WAP */ #define NK7110_MSG_SECURITY 0x40 /* Security */ #define NK7110_MSG_STLOGO 0x7a /* Startup logo */ #define NK7110_MSG_KEYPRESS 0xd1 /* Keypress? */ #define NK7110_MSG_KEYPRESS_RESP 0xd2 /* Keypress response */ /* SMS handling message subtypes (send) */ #define NK7110_SUBSMS_SEND_SMS 0x01 /* Send SMS */ #define NK7110_SUBSMS_SET_CELLBRD 0x20 /* Set cell broadcast */ #define NK7110_SUBSMS_SET_SMSC 0x30 /* Set SMS center */ #define NK7110_SUBSMS_GET_SMSC 0x33 /* Get SMS center */ /* SMS handling message subtypes (recv) */ #define NK7110_SUBSMS_SEND_OK 0x02 /* SMS sent */ #define NK7110_SUBSMS_SEND_FAIL 0x03 /* SMS send failed */ #define NK7110_SUBSMS_READ_OK 0x08 /* SMS read */ #define NK7110_SUBSMS_READ_FAIL 0x09 /* SMS read failed */ #define NK7110_SUBSMS_DELETE_OK 0x0b /* SMS deleted */ #define NK7110_SUBSMS_DELETE_FAIL 0x0c /* SMS delete failed */ #define NK7110_SUBSMS_SMS_RCVD 0x10 /* SMS received */ #define NK7110_SUBSMS_CELLBRD_OK 0x21 /* Set cell broadcast success */ #define NK7110_SUBSMS_CELLBRD_FAIL 0x22 /* Set cell broadcast failure */ #define NK7110_SUBSMS_READ_CELLBRD 0x23 /* Read cell broadcast */ #define NK7110_SUBSMS_SMSC_OK 0x31 /* Set SMS center success*/ #define NK7110_SUBSMS_SMSC_FAIL 0x32 /* Set SMS center failure */ #define NK7110_SUBSMS_SMSC_RCVD 0x34 /* SMS center received */ #define NK7110_SUBSMS_SMSC_RCVFAIL 0x35 /* SMS center receive failure */ #define NK7110_SUBSMS_SMS_STATUS_OK 0x37 /* SMS status received */ #define NK7110_SUBSMS_FOLDER_STATUS_OK 0x6c /* SMS folder status received */ #define NK7110_SUBSMS_FOLDER_LIST_OK 0x7b /* SMS folder list received */ #define NK7110_SUBSMS_PICTURE_LIST_OK 0x97 /* Picture messages list received */ /* Clock handling message subtypes (send) */ #define NK7110_SUBCLO_SET_DATE 0x60 /* Set date & time */ #define NK7110_SUBCLO_GET_DATE 0x62 /* Get date & time */ #define NK7110_SUBCLO_SET_ALARM 0x6B /* Set alarm */ #define NK7110_SUBCLO_GET_ALARM 0x6D /* Get alarm */ /* Clock handling message subtypes (recv) */ #define NK7110_SUBCLO_DATE_SET 0x61 /* Date & time set */ #define NK7110_SUBCLO_DATE_RCVD 0x63 /* Received date & time */ #define NK7110_SUBCLO_ALARM_SET 0x6C /* Alarm set */ #define NK7110_SUBCLO_ALARM_RCVD 0x6E /* Received alarm */ /* Alarm on/off */ #define NK7110_ALARM_ENABLED 0x02 /* Alarm enabled */ #define NK7110_ALARM_DISABLED 0x01 /* Alarm disabled */ /* Calendar handling message subtypes (send) */ #define NK7110_SUBCAL_ADD_MEETING 0x01 /* Add meeting note */ #define NK7110_SUBCAL_ADD_CALL 0x03 /* Add call note */ #define NK7110_SUBCAL_ADD_BIRTHDAY 0x05 /* Add birthday note */ #define NK7110_SUBCAL_ADD_REMINDER 0x07 /* Add reminder note */ #define NK7110_SUBCAL_DEL_NOTE 0x0b /* Delete note */ #define NK7110_SUBCAL_GET_NOTE 0x19 /* Get note */ #define NK7110_SUBCAL_GET_FREEPOS 0x31 /* Get first free position */ #define NK7110_SUBCAL_GET_INFO 0x3a /* Calendar summary */ /* Calendar handling message subtypes (recv) */ #define NK7110_SUBCAL_ADD_MEETING_RESP 0x02 /* Add meeting note response */ #define NK7110_SUBCAL_ADD_CALL_RESP 0x04 /* Add call note response */ #define NK7110_SUBCAL_ADD_BIRTHDAY_RESP 0x06 /* Add birthday note response */ #define NK7110_SUBCAL_ADD_REMINDER_RESP 0x08 /* Add reminder note response */ #define NK7110_SUBCAL_DEL_NOTE_RESP 0x0c /* Delete note response */ #define NK7110_SUBCAL_NOTE_RCVD 0x1a /* Received note */ #define NK7110_SUBCAL_FREEPOS_RCVD 0x32 /* Received first free position */ #define NK7110_SUBCAL_INFO_RCVD 0x3b /* Received calendar summary*/ /* Calendar note types */ #define NK7110_NOTE_MEETING 0x01 /* Meeting */ #define NK7110_NOTE_CALL 0x02 /* Call */ #define NK7110_NOTE_BIRTHDAY 0x04 /* Birthday */ #define NK7110_NOTE_REMINDER 0x08 /* Reminder */ /* Phone Memory types */ #define NK7110_MEMORY_DIALLED 0x01 /* Dialled numbers */ #define NK7110_MEMORY_MISSED 0x02 /* Missed calls */ #define NK7110_MEMORY_RECEIVED 0x03 /* Received calls */ #define NK7110_MEMORY_PHONE 0x05 /* Telephone phonebook */ #define NK7110_MEMORY_SIM 0x06 /* SIM phonebook */ #define NK7110_MEMORY_SPEEDDIALS 0x0e /* Speed dials */ #define NK7110_MEMORY_GROUPS 0x10 /* Caller groups */ #define NK7110_MEMORY_DC 0x01 /* ME dialled calls list */ #define NK7110_MEMORY_MC 0x02 /* ME missed (unanswered received) calls list */ #define NK7110_MEMORY_RC 0x03 /* ME received calls list */ #define NK7110_MEMORY_FD 0x04 /* ?? SIM fixdialling-phonebook */ #define NK7110_MEMORY_ME 0x05 /* ME (Mobile Equipment) phonebook */ #define NK7110_MEMORY_SM 0x06 /* SIM phonebook */ #define NK7110_MEMORY_ON 0x07 /* ?? SIM (or ME) own numbers list */ #define NK7110_MEMORY_EN 0x08 /* ?? SIM (or ME) emergency number */ #define NK7110_MEMORY_MT 0x09 /* ?? combined ME and SIM phonebook */ #define NK7110_MEMORY_VOICE 0x0b /* Voice Mailbox */ #define NK7110_MEMORY_IN 0x08 /* INBOX */ #define NK7110_MEMORY_OU 0x10 /* OUTBOX */ #define NK7110_MEMORY_AR 0x18 /* ARCHIVE */ #define NK7110_MEMORY_TE 0x20 /* TEMPLATES */ #define NK7110_MEMORY_F1 0x29 /* MY FOLDERS 1 */ #define NK7110_MEMORY_F2 0x31 #define NK7110_MEMORY_F3 0x39 #define NK7110_MEMORY_F4 0x41 #define NK7110_MEMORY_F5 0x49 #define NK7110_MEMORY_F6 0x51 #define NK7110_MEMORY_F7 0x59 #define NK7110_MEMORY_F8 0x61 #define NK7110_MEMORY_F9 0x69 #define NK7110_MEMORY_F10 0x71 #define NK7110_MEMORY_F11 0x79 #define NK7110_MEMORY_F12 0x81 #define NK7110_MEMORY_F13 0x89 #define NK7110_MEMORY_F14 0x91 #define NK7110_MEMORY_F15 0x99 #define NK7110_MEMORY_F16 0xA1 #define NK7110_MEMORY_F17 0xA9 #define NK7110_MEMORY_F18 0xB1 #define NK7110_MEMORY_F19 0xB9 #define NK7110_MEMORY_F20 0xC1 /* MY FOLDERS 20 */ /* This is used when the memory type is unknown. */ #define NK7110_MEMORY_XX 0xff /* Entry Types for the enhanced phonebook */ #define NK7110_ENTRYTYPE_POINTER 0x04 /* Pointer to other memory */ #define NK7110_ENTRYTYPE_NAME 0x07 /* Name always the only one */ #define NK7110_ENTRYTYPE_EMAIL 0x08 /* Email Adress (TEXT) */ #define NK7110_ENTRYTYPE_POSTAL 0x09 /* Postal Address (Text) */ #define NK7110_ENTRYTYPE_NOTE 0x0a /* Note (Text) */ #define NK7110_ENTRYTYPE_NUMBER 0x0b /* Phonenumber */ #define NK7110_ENTRYTYPE_RINGTONE 0x0c /* Ringtone */ #define NK7110_ENTRYTYPE_DATE 0x13 /* Date for a Called List */ #define NK7110_ENTRYTYPE_LOGO 0x1b /* Group logo */ #define NK7110_ENTRYTYPE_LOGOSWITCH 0x1c /* Group logo on/off */ #define NK7110_ENTRYTYPE_GROUP 0x1e /* Group number for phonebook entry */ /* Entry types for the security commands */ #define NK7110_SUBSEC_ENABLE_EXTENDED_CMDS 0x64 /* Enable extended commands */ #define NK7110_SUBSEC_NETMONITOR 0x7e /* Netmonitor */ typedef struct { bool new_sms; /* Do we have a new SMS? */ int ll_memtype; int ll_location; int userdef_location; /* callbacks */ void (*on_cell_broadcast)(gn_cb_message *msg, void *callback_data); void (*call_notification)(gn_call_status call_status, gn_call_info *call_info, struct gn_statemachine *state, void *callback_data); gn_error (*on_sms)(gn_sms *message, struct gn_statemachine *state, void *callback_data); /* callback local data */ void *cb_callback_data; /* to be passed as callback_data to on_cell_broadcast */ void *call_callback_data; /* to be passed as callback_data to call_notification */ void *sms_callback_data; /* to be passed as callback_data to on_sms */ } nk7110_driver_instance; #endif /* _gnokii_phones_nk7110_h */ gnokii-0.6.31/include/phones/nk2110.h0000644000175000017500000000320111666163120015203 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2000 Pavel Machek This file provides functions specific to the Nokia 2110 series. See README for more details on supported mobile phones. The various routines are called P2110_(whatever). */ #ifndef __phones_nk2110_h #define __phones_nk2110_h #define LM_SMS_EVENT 0x37 #define LM_SMS_COMMAND 0x38 #define LM_SMS_READ_STORED_DATA 0x02 /* These are really subcommands of LM_SMS_COMMAND */ #define LM_SMS_RECEIVED_PP_DATA 0x06 #define LM_SMS_FORWARD_STORED_DATA 0x0b #define LM_SMS_RESERVE_PP 0x12 #define LN_SMS_NORMAL_RESERVE 1 #define LN_SMS_NEW_MSG_INDICATION 2 #define LM_SMS_UNRESERVE_PP 0x14 #define LM_SMS_NEW_MESSAGE_INDICATION 0x1a #define LM_SMS_ALIVE_TEST 0x1e #define LM_SMS_ALIVE_ACK 0x1f #define LM_SMS_PP_RESERVE_COMPLETE 22 #define LN_LOC_COMMAND 0x1f #endif /* #ifndef __phones_nk2110_h */ gnokii-0.6.31/include/phones/dc2711.h0000644000175000017500000000220211666163120015170 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2002 Ladislav Michl This file provides functions specific to Dancall phones. See README for more details on supported mobile phones. */ #ifndef _gnokii_dc2711_h #define _gnokii_dc2711_h #include "gnokii-internal.h" void dc2711_init(char* foundmodel, char* setupmodel, struct gn_statemachine *state); #endif gnokii-0.6.31/include/phones/nk6100.h0000644000175000017500000000671311666163120015221 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2000 Hugh Blemings & Pavel Janík ml. Copyright (C) 2001-2003 Pawel Kot, BORBELY Zoltan This file provides functions specific to the Nokia 6100/5100 series. See README for more details on supported mobile phones. */ #ifndef _gnokii_phones_nk6100_h #define _gnokii_phones_nk6100_h #include "gnokii.h" /* Phone Memory types */ #define NK6100_MEMORY_MT 0x01 /* ?? combined ME and SIM phonebook */ #define NK6100_MEMORY_ME 0x02 /* ME (Mobile Equipment) phonebook */ #define NK6100_MEMORY_SM 0x03 /* SIM phonebook */ #define NK6100_MEMORY_FD 0x04 /* ?? SIM fixdialling-phonebook */ #define NK6100_MEMORY_ON 0x05 /* ?? SIM (or ME) own numbers list */ #define NK6100_MEMORY_EN 0x06 /* ?? SIM (or ME) emergency number */ #define NK6100_MEMORY_DC 0x07 /* ME dialled calls list */ #define NK6100_MEMORY_RC 0x08 /* ME received calls list */ #define NK6100_MEMORY_MC 0x09 /* ME missed (unanswered received) calls list */ #define NK6100_MEMORY_VOICE 0x0b /* Voice Mailbox */ /* This is used when the memory type is unknown. */ #define NK6100_MEMORY_XX 0xff #define NK6100_MAX_SMS_MESSAGES 12 /* maximum number of sms messages */ #define NK6100_CAP_OLD_CALL_API 1 #define NK6100_CAP_NBS_UPLOAD 2 #define NK6100_CAP_PB_UNICODE 4 #define NK6100_CAP_OLD_KEY_API 8 #define NK6100_CAP_NO_PSTATUS 16 #define NK6100_CAP_NO_CB 32 #define NK6100_CAP_CAL_UNICODE 64 #define NK6100_CAP_NO_PB_GROUP 128 /* phone doesn't support categories in phonebook entries (caller groups) */ typedef struct { gn_key_code key; int repeat; } nk6100_keytable; typedef struct { /* callbacks */ void (*on_cell_broadcast)(gn_cb_message *msg, struct gn_statemachine *state, void *callback_data); void (*call_notification)(gn_call_status call_status, gn_call_info *call_info, struct gn_statemachine *state, void *callback_data); void (*rlp_rx_callback)(gn_rlp_f96_frame *frame); gn_error (*on_sms)(gn_sms *message, struct gn_statemachine *state, void *callback_data); unsigned char magic_bytes[4]; bool sms_notification_in_progress; bool sms_notification_lost; gn_display_output *display_output; nk6100_keytable keytable[256]; int capabilities; int max_sms; char model[GN_MODEL_MAX_LENGTH]; char imei[GN_IMEI_MAX_LENGTH]; char sw_version[10]; char hw_version[10]; gn_phone_model *pm; /* callback local data */ void *cb_callback_data; /* to be passed as callback_data to on_cell_broadcast */ void *call_callback_data; /* to be passed as callback_data to call_notification */ void *sms_callback_data; /* to be passed as callback_data to on_sms */ } nk6100_driver_instance; void pnok_get_nokia_auth(unsigned char *imei, unsigned char *magic_bytes, unsigned char *magic_response); #endif /* #ifndef _gnokii_phones_nk6100_h */ gnokii-0.6.31/include/phones/nokia.h0000644000175000017500000000534511666163120015403 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2000 Hugh Blemings & Pavel Janík ml. Copyright (C) 2001 Chris Kemp Copyright (C) 2002-2003 BORBELY Zoltan, Pawel Kot Copyright (C) 2002 Ladis Michl This file provides useful functions for all Nokia phones. See README for more details on supported mobile phones. The various routines are called PNOK_... */ #ifndef _gnokii_phones_nokia_h #define _gnokii_phones_nokia_h #include "gnokii.h" #define PNOK_MSG_ID_SMS 0x02 gn_error pnok_manufacturer_get(char *manufacturer); void pnok_string_decode(unsigned char *dest, size_t max, const unsigned char *src, size_t len); size_t pnok_string_encode(unsigned char *dest, size_t max, const unsigned char *src); gn_error pnok_ringtone_from_raw(gn_ringtone *ringtone, const unsigned char *raw, int rawlen); gn_error pnok_ringtone_to_raw(char *raw, int *rawlen, const gn_ringtone *ringtone, int dct4); /* Common functions for misc Nokia drivers */ /* Call divert: nk6100, nk7110 */ gn_error pnok_call_divert(gn_data *data, struct gn_statemachine *state); gn_error pnok_call_divert_incoming(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); int pnok_fbus_sms_encode(unsigned char *req, gn_data *data, struct gn_statemachine *state); /* Security functions: nk6100, nk7100 */ gn_error pnok_extended_cmds_enable(unsigned char type, gn_data *data, struct gn_statemachine *state); gn_error pnok_call_make(gn_data *data, struct gn_statemachine *state); gn_error pnok_call_answer(gn_data *data, struct gn_statemachine *state); gn_error pnok_call_cancel(gn_data *data, struct gn_statemachine *state); gn_error pnok_netmonitor(gn_data *data, struct gn_statemachine *state); gn_error pnok_get_locks_info(gn_data *data, struct gn_statemachine *state); gn_error pnok_play_tone(gn_data *data, struct gn_statemachine *state); gn_error pnok_security_incoming(int messagetype, unsigned char *message, int length, gn_data *data, struct gn_statemachine *state); #endif gnokii-0.6.31/include/phones/nk6510.h0000644000175000017500000002456611666163120015234 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2000 Hugh Blemings, Pavel Janik Copyright (C) 2001-2004 BORBELY Zoltan, Pawel Kot Copyright (C) 2002 Markus Plail This file provides functions specific to the Nokia 6510 series. See README for more details on supported mobile phones. The various routines are called nk6510_(whatever). */ #ifndef _gnokii_phones_nk6510_h #define _gnokii_phones_nk6510_h #include "gnokii.h" typedef enum { GN_OP_NK6510_GetSMSFolders = GN_OP_Max, GN_OP_NK6510_GetSMSFolderStatus, GN_OP_NK6510_GetPicture, GN_OP_NK6510_Subscribe, GN_OP_NK6510_Max /* don't append anything after this entry */ } GSM6510_Operation; /* Message types */ #define NK6510_MSG_COMMSTATUS 0x01 /* Communication status */ #define NK6510_MSG_SMS 0x02 /* SMS handling */ #define NK6510_MSG_PHONEBOOK 0x03 /* Phonebook functions */ #define NK6510_MSG_DIVERT 0x06 /* Call Divert */ #define NK6510_MSG_SECURITY 0x08 /* PIN and stuff */ #define NK6510_MSG_NETSTATUS 0x0a /* Network status */ #define NK6510_MSG_SOUND 0x0b /* Sound */ #define NK6510_MSG_KEYPRESS 0x0c /* keypress emulation? */ #define NK6510_MSG_SUBSCRIBE 0x10 /* subscribe to channels */ #define NK6510_MSG_CALENDAR 0x13 /* Calendar notes */ #define NK6510_MSG_FOLDER 0x14 /* Folders handling */ #define NK6510_MSG_RESET 0x15 /* Reset */ #define NK6510_MSG_BATTERY 0x17 /* Battery info */ #define NK6510_MSG_CLOCK 0x19 /* Date & alarm */ #define NK6510_MSG_IDENTITY 0x1b /* Brief product info */ #define NK6510_MSG_RINGTONE 0x1f /* Ringtone handling */ #define NK6510_MSG_PROFILE 0x39 /* Profiles */ #define NK6510_MSG_NOTKNOWN 0x3E /* */ #define NK6510_MSG_WAP 0x3F /* WAP */ #define NK6510_MSG_RADIO 0x43 /* Radio (6510/8310) + hard reset */ #define NK6510_MSG_TODO 0x55 /* ToDo */ #define NK6510_MSG_FILE 0x6d /* File Handling */ #define NK6510_MSG_STLOGO 0x7a /* Startup logo */ /* SMS handling message subtypes (send) */ #define NK6510_SUBSMS_SEND_SMS 0x01 /* Send SMS */ #define NK6510_SUBSMS_SET_CELLBRD 0x20 /* Set cell broadcast */ #define NK6510_SUBSMS_SET_SMSC 0x23 /* Set SMS center */ #define NK6510_SUBSMS_GET_SMSC 0x14 /* Get SMS center */ /* SMS handling message subtypes (recv) */ #define NK6510_SUBSMS_SMS_SEND_STATUS 0x03 /* SMS sending status */ #define NK6510_SUBSMS_SMS_SEND_OK 0x00 /* SMS sent */ #define NK6510_SUBSMS_SMS_SEND_FAIL 0x01 /* SMS send failed */ #define NK6510_SUBSMS_SMS_RCVD 0x10 /* SMS received */ #define NK6510_SUBSMS_SMSC_RCV 0x15 /* SMS center info received */ #define NK6510_SUBSMS_CELLBRD_OK 0x21 /* Set cell broadcast success */ #define NK6510_SUBSMS_CELLBRD_FAIL 0x22 /* Set cell broadcast failure */ #define NK6510_SUBSMS_READ_CELLBRD 0x23 /* Read cell broadcast */ #define NK6510_SUBSMS_SMSC_OK 0x31 /* Set SMS center success */ #define NK6510_SUBSMS_SMSC_FAIL 0x32 /* Set SMS center failure */ #define NK6510_SUBSMS_INCOMING 0x04 /* Incoming SMS notification */ /* Clock handling message subtypes (send) */ #define NK6510_SUBCLO_GET_DATE 0x0a /* Get date & time */ #define NK6510_SUBCLO_GET_ALARM 0x02 /* Get alarm */ /* Clock handling message subtypes (recv) */ #define NK6510_SUBCLO_DATE_RCVD 0x0b /* Received date & time */ #define NK6510_SUBCLO_SET_DATE_RCVD 0x02 /* Received date & time set OK */ #define NK6510_SUBCLO_SET_ALARM_RCVD 0x12 /* Received alarm set OK */ #define NK6510_SUBCLO_DATE_UPD_RCVD 0x0e /* Received update on date & time */ #define NK6510_SUBCLO_ALARM_TIME_RCVD 0x1a /* Received alarm time */ #define NK6510_SUBCLO_ALARM_STATE_RCVD 0x20 /* Received alarm state (on/off) */ /* Alarm on/off */ #define NK6510_ALARM_ENABLED 0x02 /* Alarm enabled */ #define NK6510_ALARM_DISABLED 0x01 /* Alarm disabled */ /* Calendar handling message subtypes (send) */ #define NK6510_SUBCAL_ADD_MEETING 0x01 /* Add meeting note */ #define NK6510_SUBCAL_ADD_CALL 0x03 /* Add call note */ #define NK6510_SUBCAL_ADD_BIRTHDAY 0x05 /* Add birthday note */ #define NK6510_SUBCAL_ADD_REMINDER 0x07 /* Add reminder note */ #define NK6510_SUBCAL_DEL_NOTE 0x0b /* Delete note */ #define NK6510_SUBCAL_GET_NOTE 0x19 /* Get note */ #define NK6510_SUBCAL_GET_FREEPOS 0x31 /* Get first free position */ #define NK6510_SUBCAL_GET_INFO 0x3a /* Calendar summary */ /* Calendar handling message subtypes (recv) */ #define NK6510_SUBCAL_ADD_MEETING_RESP 0x02 /* Add meeting note response */ #define NK6510_SUBCAL_ADD_CALL_RESP 0x04 /* Add call note response */ #define NK6510_SUBCAL_ADD_BIRTHDAY_RESP 0x06 /* Add birthday note response */ #define NK6510_SUBCAL_ADD_REMINDER_RESP 0x08 /* Add reminder note response */ #define NK6510_SUBCAL_DEL_NOTE_RESP 0x0c /* Delete note response */ #define NK6510_SUBCAL_NOTE_RCVD 0x1a /* Received note */ #define NK6510_SUBCAL_FREEPOS_RCVD 0x32 /* Received first free position */ #define NK6510_SUBCAL_INFO_RCVD 0x3b /* Received calendar summary */ #define NK6510_SUBCAL_DEL_NOTE2_RESP 0x70 /* Delete note response */ #define NK6510_SUBCAL_NOTE2_RCVD 0x7e /* Received note (with more details) */ #define NK6510_SUBCAL_ADD_NOTE_RESP 0x66 /* Add calendar note response */ #define NK6510_SUBCAL_INFO2_RCVD 0x9f /* Received calendar summary */ #define NK6510_SUBCAL_FREEPOS2_RCVD 0x96 /* Received first free position */ #define NK6510_SUBCAL_UNSUPPORTED 0xf0 /* Error code for unsupported FBUS frames */ /* Calendar note types */ #define NK6510_NOTE_REMINDER 0x00 /* Reminder */ #define NK6510_NOTE_MEETING 0x01 /* Meeting */ #define NK6510_NOTE_CALL 0x02 /* Call */ #define NK6510_NOTE_BIRTHDAY 0x04 /* Birthday */ #define NK6510_NOTE_MEMO 0x08 /* Memo */ /* Phonebook Memory types */ #define NK6510_MEMORY_DC 0x01 /* ME dialled calls list */ #define NK6510_MEMORY_MC 0x02 /* ME missed (unanswered received) calls list */ #define NK6510_MEMORY_RC 0x03 /* ME received calls list */ #define NK6510_MEMORY_FD 0x04 /* ?? SIM fixdialling-phonebook */ #define NK6510_MEMORY_ME 0x05 /* ME (Mobile Equipment) phonebook */ #define NK6510_MEMORY_SM 0x06 /* SIM phonebook */ #define NK6510_MEMORY_ON 0x07 /* ?? SIM (or ME) own numbers list */ #define NK6510_MEMORY_EN 0x08 /* ?? SIM (or ME) emergency number */ #define NK6510_MEMORY_MT 0x09 /* ?? combined ME and SIM phonebook */ #define NK6510_MEMORY_VOICE 0x0b /* Voice Mailbox */ #define NK6510_MEMORY_SPEEDDIALS 0x0e /* Speed dials */ #define NK6510_MEMORY_GROUPS 0x10 /* Caller groups */ #define NK6510_MEMORY_EXTGROUPS 0x23 /* Extended Caller Groups */ /* SMS Memory types */ #define NK6510_MEMORY_IN 0x02 /* INBOX */ #define NK6510_MEMORY_OU 0x03 /* OUTBOX */ #define NK6510_MEMORY_AR 0x04 /* ARCHIVE */ #define NK6510_MEMORY_TE 0x05 /* TEMPLATES */ #define NK6510_MEMORY_F1 0x06 /* MY FOLDERS 1 */ #define NK6510_MEMORY_F2 0x07 #define NK6510_MEMORY_F3 0x08 #define NK6510_MEMORY_F4 0x09 #define NK6510_MEMORY_F5 0x10 #define NK6510_MEMORY_F6 0x11 #define NK6510_MEMORY_F7 0x12 #define NK6510_MEMORY_F8 0x13 #define NK6510_MEMORY_F9 0x14 #define NK6510_MEMORY_F10 0x15 #define NK6510_MEMORY_F11 0x16 #define NK6510_MEMORY_F12 0x17 #define NK6510_MEMORY_F13 0x18 #define NK6510_MEMORY_F14 0x19 #define NK6510_MEMORY_F15 0x20 #define NK6510_MEMORY_F16 0x21 #define NK6510_MEMORY_F17 0x22 #define NK6510_MEMORY_F18 0x23 #define NK6510_MEMORY_F19 0x24 #define NK6510_MEMORY_F20 0x25 /* MY FOLDERS 20 */ #define NK6510_MEMORY_OUS 0x1a /* This is used when the memory type is unknown. */ #define NK6510_MEMORY_XX 0xff /* Entry Types for the enhanced phonebook */ #define NK6510_ENTRYTYPE_POINTER 0x1a /* Pointer to other memory */ #define NK6510_ENTRYTYPE_NAME 0x07 /* Name always the only one */ #define NK6510_ENTRYTYPE_EMAIL 0x08 /* Email Adress (TEXT) */ #define NK6510_ENTRYTYPE_POSTAL 0x09 /* Postal Address (Text) */ #define NK6510_ENTRYTYPE_NOTE 0x0a /* Note (Text) */ #define NK6510_ENTRYTYPE_NUMBER 0x0b /* Phonenumber */ #define NK6510_ENTRYTYPE_RINGTONE 0x0c /* Ringtone */ #define NK6510_ENTRYTYPE_DATE 0x13 /* Date for a Called List */ #define NK6510_ENTRYTYPE_LOGO 0x1b /* Group logo */ #define NK6510_ENTRYTYPE_LOGOSWITCH 0x1c /* Group logo on/off */ #define NK6510_ENTRYTYPE_GROUP 0x1e /* Group number for phonebook entry */ #define NK6510_ENTRYTYPE_URL 0x2c /* Group number for phonebook entry */ /* Entry types for the security commands */ #define NK6510_SUBSEC_ENABLE_EXTENDED_CMDS 0x64 /* Enable extended commands */ #define NK6510_SUBSEC_NETMONITOR 0x7e /* Netmonitor */ #define NK6510_RINGTONE_USERDEF_LOCATION 231 #define NK6510_FILE_ID_LENGTH 6 /* * For Nokia Series40 3rd edition, we implement GetSMS with files commands. * Algorithm is: * - get file list * - filter sms files by name * - get file * It is repeated for every SMS. As 'get file list' is the longest operation * it makes sense to cache the results. Define here for how long (seconds) * data is cached. */ #define NK6510_FILE_CACHE_TIMEOUT 10 /* seconds */ #define NK6510_GETFILELIST_TIMEOUT 500 /* miliseconds */ typedef struct { /* callbacks */ void (*on_cell_broadcast)(gn_cb_message *msg, struct gn_statemachine *state, void *callback_data); void (*call_notification)(gn_call_status call_status, gn_call_info *call_info, struct gn_statemachine *state, void *callback_data); gn_error (*on_sms)(gn_sms *message, struct gn_statemachine *state, void *callback_data); void (*progress_indication)(int progress, void *callback_data); /* phone model capabilities */ gn_phone_model *pm; /* callback local data */ void *cb_callback_data; /* to be passed as callback_data to on_cell_broadcast */ void *call_callback_data; /* to be passed as callback_data to call_notification */ void *sms_callback_data; /* to be passed as callback_data to on_sms */ void *progress_callback_data; /* to be passed as callback_data to progress_indication */ } nk6510_driver_instance; #endif /* _gnokii_phones_nk6510_h */ gnokii-0.6.31/include/phones/atsag.h0000644000175000017500000000215411666163120015374 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2008 Pawel Kot This file provides functions specific to AT commands on Sagem phones. See README for more details on supported mobile phones. */ #ifndef _gnokii_atsag_h_ #define _gnokii_atsag_h_ #include "gnokii.h" void at_sagem_init(char* foundmodel, char* setupmodel, struct gn_statemachine *state); #endif gnokii-0.6.31/include/phones/generic.h0000644000175000017500000000264411666163120015715 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2000 Hugh Blemings & Pavel Janík ml. Copyright (C) 2000-2001 Chris Kemp Copyright (C) 2001-2003 Pawel Kot Copyright (C) 2002 Ladis Michl This file provides useful functions for all phones See README for more details on supported mobile phones. Various routines are called p(hones/)gen(eric)_... */ #ifndef _gnokii_phones_generic_h #define _gnokii_phones_generic_h #include "gnokii.h" /* Generic Functions */ gn_error pgen_incoming_default(int messagetype, unsigned char *buffer, int length, struct gn_statemachine *state); gn_error pgen_terminate(gn_data *data, struct gn_statemachine *state); #endif gnokii-0.6.31/include/phones/atmot.h0000644000175000017500000000221311666163120015415 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2006 Bastien Nocera This file provides functions specific to AT commands on Motorola phones. See README for more details on supported mobile phones. */ #ifndef _gnokii_atmot_h_ #define _gnokii_atmot_h_ #include "gnokii.h" void at_motorola_init(char* foundmodel, char* setupmodel, struct gn_statemachine *state); #endif gnokii-0.6.31/include/phones/atgen.h0000644000175000017500000001410411666163120015371 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2000 Hugh Blemings, Pavel Janik Copyright (C) 2001 Manfred Jonsson Copyright (C) 2002-2008 Pawel Kot Copyright (C) 2003 Ladis Michl Copyright (C) 2004 Ron Yorston, Hugo Hass This file provides functions specific to generic AT command compatible phones. See README for more details on supported mobile phones. */ #ifndef _gnokii_atgen_h_ #define _gnokii_atgen_h_ #include "gnokii-internal.h" #include "map.h" typedef enum { GN_OP_AT_GetCharset = GN_OP_Max, GN_OP_AT_SetCharset, GN_OP_AT_SetPDUMode, GN_OP_AT_Prompt, GN_OP_AT_GetMemoryRange, GN_OP_AT_Ring, GN_OP_AT_IncomingSMS, GN_OP_AT_GetSMSMemorySize, GN_OP_AT_PrepareDateTime, GN_OP_AT_Max /* don't append anything after this entry */ } at_operation; typedef enum { AT_CHAR_UNKNOWN = 0x00, AT_CHAR_GSM = 0x01, AT_CHAR_CP437 = 0x02, AT_CHAR_HEXGSM = 0x04, AT_CHAR_HEX437 = 0x08, AT_CHAR_UCS2 = 0x10, } at_charset; typedef gn_error (*at_recv_function_type)(int type, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state); typedef gn_error (*at_send_function_type)(gn_data *data, struct gn_statemachine *state); typedef gn_error (*at_error_function_type)(int type, int code, struct gn_statemachine *state); at_recv_function_type at_insert_recv_function(int type, at_recv_function_type func, struct gn_statemachine *state); at_send_function_type at_insert_send_function(int type, at_send_function_type func, struct gn_statemachine *state); at_error_function_type at_insert_manufacturer_error_function(at_error_function_type func, struct gn_statemachine *state); typedef struct { at_send_function_type functions[GN_OP_AT_Max]; gn_incoming_function_type incoming_functions[GN_OP_AT_Max]; at_error_function_type manufacturer_error; int if_pos; int no_smsc; /* CBPS (phonebook related) */ gn_memory_type memorytype; int memoryoffset; int memorysize; gn_memory_type smsmemorytype; at_charset availcharsets; at_charset defaultcharset; at_charset charset; /* CPMS (sms related) */ int smmemorysize; int mememorysize; /* CNMI -- sms notifications */ /* 0: buffer in TA; * 1: discard indication and reject new SMs when TE-TA link is * reserved; otherwise forward directly; * 2: buffer new Sms when TE-TA link is reserved and flush them to TE * after reservation; otherwise forward directly to the TE; * 3: forward directly to TE; */ /* Default should be 3. Specific drivers can overwrite. */ int cnmi_mode; /* For call notifications via AT+CLIP */ int clip_supported; gn_call_type last_call_type; gn_call_status last_call_status; /* For AT+CPAS */ gn_call_status prev_state; /* callbacks */ void (*on_cell_broadcast)(gn_cb_message *msg, struct gn_statemachine *state, void *callback_data); void (*call_notification)(gn_call_status call_status, gn_call_info *call_info, struct gn_statemachine *state, void *callback_data); gn_error (*on_sms)(gn_sms *message, struct gn_statemachine *state, void *callback_data); void (*reg_notification)(gn_network_info *info, void *callback_data); /* callback local data */ /* to be passed as callback_data to on_cell_broadcast */ void *cb_callback_data; /* to be passed as callback_data to call_notification */ void *call_callback_data; /* to be passed as callback_data to on_sms */ void *sms_callback_data; /* to be passed as callback_data to reg_notification */ void *reg_callback_data; char *timezone; /* indicates whether phone is in PDU mode */ int pdumode; /* cached information for AT+XXXX=? commands */ struct map *cached_capabilities; /* * Indicated whether phone supports extended registration status * 0 - not known (we haven't asked yet) * 1 - extended status not supported * 2 - extended status supported */ int extended_reg_status; /* * Some phones use encoding setting to encode just names and the other * entities are encoded using ASCII (Nokia). Other phones encode every * output with the given encoding and require the same for the input * (Sony Ericsson). */ int encode_memory_type; int encode_number; /* * Some phones reply with +CREG command with LAC information but with * the bytes swapped. Default is the natural order. */ int lac_swapped; /* * Some phones support extended phonebook commands: * AT+SPBR/AT+SPBW */ int extended_phonebook; /* * This is for weird encoding found in some Samsung phones. */ int ucs2_as_utf8; } at_driver_instance; #define AT_DRVINST(s) (*((at_driver_instance **)(&(s)->driver.driver_instance))) typedef struct { char *line1; char *line2; char *line3; char *line4; /* When reading SMS there are 4 ouput lines. Maybe create a table here? */ int length; } at_line_buffer; gn_error at_memory_type_set(gn_memory_type mt, struct gn_statemachine *state); gn_error at_error_get(unsigned char *buffer, struct gn_statemachine *state); gn_error at_set_charset(gn_data *data, struct gn_statemachine *state, at_charset charset); /* There are shared between various AT drivers */ void splitlines(at_line_buffer *buf); char *skipcrlf(unsigned char *str); char *findcrlf(unsigned char *str, int test, int maxlength); char *strip_quotes(char *s); void at_decode(int charset, char *dst, char *src, int len, int ucs2_as_utf8); size_t at_encode(at_charset charset, char *dst, size_t dst_len, const char *src, size_t len); extern char *memorynames[]; #endif gnokii-0.6.31/include/phones/atsie.h0000644000175000017500000000234011666163120015377 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2000 Hugh Blemings, Pavel Janik Copyright (C) 2001 Manfred Jonsson Copyright (C) 2002 Ladis Michl This file provides functions specific to AT commands on Siemens phones. See README for more details on supported mobile phones. */ #ifndef _gnokii_atsie_h_ #define _gnokii_atsie_h_ #include "gnokii.h" void at_siemens_init(char* foundmodel, char* setupmodel, struct gn_statemachine *state); #endif gnokii-0.6.31/include/phones/gnapplet.h0000644000175000017500000001141611666163120016110 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2004 BORBELY Zoltan This file provides functions specific to the gnapplet series. See README for more details on supported mobile phones. */ #ifndef _gnokii_phones_gnapplet_h #define _gnokii_phones_gnapplet_h #include "gnokii.h" #define GNAPPLET_MAJOR_VERSION 0 #define GNAPPLET_MINOR_VERSION 19 #define GNAPPLET_MSG_INFO 1 #define GNAPPLET_MSG_PHONEBOOK 2 #define GNAPPLET_MSG_NETINFO 3 #define GNAPPLET_MSG_POWER 4 #define GNAPPLET_MSG_DEBUG 5 #define GNAPPLET_MSG_SMS 6 #define GNAPPLET_MSG_CALENDAR 7 #define GNAPPLET_MSG_CLOCK 8 #define GNAPPLET_MSG_PROFILE 9 #define GNAPPLET_MSG_INFO_ID_REQ 1 #define GNAPPLET_MSG_INFO_ID_RESP 2 #define GNAPPLET_MSG_PHONEBOOK_READ_REQ 1 #define GNAPPLET_MSG_PHONEBOOK_READ_RESP 2 #define GNAPPLET_MSG_PHONEBOOK_WRITE_REQ 3 #define GNAPPLET_MSG_PHONEBOOK_WRITE_RESP 4 #define GNAPPLET_MSG_PHONEBOOK_DELETE_REQ 5 #define GNAPPLET_MSG_PHONEBOOK_DELETE_RESP 6 #define GNAPPLET_MSG_PHONEBOOK_STATUS_REQ 7 #define GNAPPLET_MSG_PHONEBOOK_STATUS_RESP 8 #define GNAPPLET_MSG_NETINFO_GETCURRENT_REQ 1 #define GNAPPLET_MSG_NETINFO_GETCURRENT_RESP 2 #define GNAPPLET_MSG_NETINFO_GETRFLEVEL_REQ 3 #define GNAPPLET_MSG_NETINFO_GETRFLEVEL_RESP 4 #define GNAPPLET_MSG_POWER_INFO_REQ 1 #define GNAPPLET_MSG_POWER_INFO_RESP 2 #define GNAPPLET_MSG_DEBUG_NOTIFICATION 2 #define GNAPPLET_MSG_SMS_FOLDER_LIST_REQ 1 #define GNAPPLET_MSG_SMS_FOLDER_LIST_RESP 2 #define GNAPPLET_MSG_SMS_FOLDER_STATUS_REQ 3 #define GNAPPLET_MSG_SMS_FOLDER_STATUS_RESP 4 #define GNAPPLET_MSG_SMS_FOLDER_CREATE_REQ 5 #define GNAPPLET_MSG_SMS_FOLDER_CREATE_RESP 6 #define GNAPPLET_MSG_SMS_FOLDER_DELETE_REQ 7 #define GNAPPLET_MSG_SMS_FOLDER_DELETE_RESP 8 #define GNAPPLET_MSG_SMS_STATUS_REQ 9 #define GNAPPLET_MSG_SMS_STATUS_RESP 10 #define GNAPPLET_MSG_SMS_MESSAGE_READ_REQ 11 #define GNAPPLET_MSG_SMS_MESSAGE_READ_RESP 12 #define GNAPPLET_MSG_SMS_MESSAGE_WRITE_REQ 13 #define GNAPPLET_MSG_SMS_MESSAGE_WRITE_RESP 14 #define GNAPPLET_MSG_SMS_MESSAGE_SEND_REQ 15 #define GNAPPLET_MSG_SMS_MESSAGE_SEND_RESP 16 #define GNAPPLET_MSG_SMS_MESSAGE_DELETE_REQ 17 #define GNAPPLET_MSG_SMS_MESSAGE_DELETE_RESP 18 #define GNAPPLET_MSG_SMS_MESSAGE_MOVE_REQ 19 #define GNAPPLET_MSG_SMS_MESSAGE_MOVE_RESP 20 #define GNAPPLET_MSG_SMS_CENTER_READ_REQ 21 #define GNAPPLET_MSG_SMS_CENTER_READ_RESP 22 #define GNAPPLET_MSG_SMS_CENTER_WRITE_REQ 23 #define GNAPPLET_MSG_SMS_CENTER_WRITE_RESP 24 #define GNAPPLET_MSG_CALENDAR_NOTE_READ_REQ 1 #define GNAPPLET_MSG_CALENDAR_NOTE_READ_RESP 2 #define GNAPPLET_MSG_CALENDAR_NOTE_WRITE_REQ 3 #define GNAPPLET_MSG_CALENDAR_NOTE_WRITE_RESP 4 #define GNAPPLET_MSG_CALENDAR_NOTE_DELETE_REQ 5 #define GNAPPLET_MSG_CALENDAR_NOTE_DELETE_RESP 6 #define GNAPPLET_MSG_CALENDAR_TODO_READ_REQ 7 #define GNAPPLET_MSG_CALENDAR_TODO_READ_RESP 8 #define GNAPPLET_MSG_CALENDAR_TODO_WRITE_REQ 9 #define GNAPPLET_MSG_CALENDAR_TODO_WRITE_RESP 10 #define GNAPPLET_MSG_CALENDAR_TODO_DELETE_REQ 11 #define GNAPPLET_MSG_CALENDAR_TODO_DELETE_RESP 12 #define GNAPPLET_MSG_CLOCK_DATETIME_READ_REQ 1 #define GNAPPLET_MSG_CLOCK_DATETIME_READ_RESP 2 #define GNAPPLET_MSG_CLOCK_DATETIME_WRITE_REQ 3 #define GNAPPLET_MSG_CLOCK_DATETIME_WRITE_RESP 4 #define GNAPPLET_MSG_CLOCK_ALARM_READ_REQ 5 #define GNAPPLET_MSG_CLOCK_ALARM_READ_RESP 6 #define GNAPPLET_MSG_CLOCK_ALARM_WRITE_REQ 7 #define GNAPPLET_MSG_CLOCK_ALARM_WRITE_RESP 8 #define GNAPPLET_MSG_PROFILE_READ_REQ 1 #define GNAPPLET_MSG_PROFILE_READ_RESP 2 #define GNAPPLET_MSG_PROFILE_WRITE_REQ 3 #define GNAPPLET_MSG_PROFILE_WRITE_RESP 4 #define GNAPPLET_MSG_PROFILE_GET_ACTIVE_REQ 5 #define GNAPPLET_MSG_PROFILE_GET_ACTIVE_RESP 6 #define GNAPPLET_MSG_PROFILE_SET_ACTIVE_REQ 7 #define GNAPPLET_MSG_PROFILE_SET_ACTIVE_RESP 8 typedef struct { int proto_major; int proto_minor; char manufacturer[GN_MANUFACTURER_MAX_LENGTH]; char model[GN_MODEL_MAX_LENGTH]; char imei[GN_IMEI_MAX_LENGTH]; char sw_version[GN_REVISION_MAX_LENGTH]; char hw_version[GN_REVISION_MAX_LENGTH]; gn_phone_model *pm; } gnapplet_driver_instance; #endif /* #ifndef _gnokii_phones_gnapplet_h */ gnokii-0.6.31/include/phones/nk3110.h0000644000175000017500000000311011666163120015203 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2000 Hugh Blemings & Pavel Janík ml. Copyright (C) 2001 Tamas Bondar Copyright (C) 2001-2003 Pawel Kot Copyright (C) 2003 Osma Suominen This file provides functions specific to the Nokia 3110 series. See README for more details on supported mobile phones. */ #ifndef _gnokii_phones_nk3110_h #define _gnokii_phones_nk3110_h #include "misc.h" #include "gnokii.h" /* Phone Memory Sizes */ #define P3110_MEMORY_SIZE_SM 20 #define P3110_MEMORY_SIZE_ME 0 /* Number of times to try resending SMS (empirical) */ #define P3110_SMS_SEND_RETRY_COUNT 4 typedef struct { bool sim_available; unsigned char user_data[GN_SMS_MAX_LENGTH]; int user_data_count; void (*rlp_rx_callback)(gn_rlp_f96_frame *frame); } nk3110_driver_instance; #endif /* #ifndef _gnokii_phones_nk3110_h */ gnokii-0.6.31/include/phones/athuawei.h0000644000175000017500000000217311666163120016105 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2009 Daniele Forsi This file provides functions specific to AT commands on Huawei phones. See README for more details on supported mobile phones. */ #ifndef _gnokii_huawei_h #define _gnokii_huawei_h #include "gnokii-internal.h" void at_huawei_init(char* foundmodel, char* setupmodel, struct gn_statemachine *state); #endif gnokii-0.6.31/include/phones/atnok.h0000644000175000017500000000234311666163120015411 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2000 Hugh Blemings, Pavel Janik Copyright (C) 2001 Manfred Jonsson Copyright (C) 2002 Ladis Michl This file provides functions specific to AT commands on Nokia phones. See README for more details on supported mobile phones. */ #ifndef _gnokii_atnok_h #define _gnokii_atnok_h #include "gnokii-internal.h" void at_nokia_init(char* foundmodel, char* setupmodel, struct gn_statemachine *state); #endif gnokii-0.6.31/include/phones/ateric.h0000644000175000017500000000235311666163120015545 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2000 Hugh Blemings, Pavel Janik Copyright (C) 2001 Manfred Jonsson Copyright (C) 2002 Ladis Michl This file provides functions specific to AT commands on Ericsson phones. See README for more details on supported mobile phones. */ #ifndef _gnokii_ateric_h #define _gnokii_ateric_h #include "gnokii-internal.h" void at_ericsson_init(char* foundmodel, char* setupmodel, struct gn_statemachine *state); #endif gnokii-0.6.31/include/phones/atlg.h0000644000175000017500000000214411666163120015223 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2008 Pawel Kot This file provides functions specific to AT commands on LG phones. See README for more details on supported mobile phones. */ #ifndef _gnokii_atlg_h_ #define _gnokii_atlg_h_ #include "gnokii.h" void at_lg_init(char* foundmodel, char* setupmodel, struct gn_statemachine *state); #endif gnokii-0.6.31/include/devices/0000755000175000017500000000000011666163457014265 5ustar leoleognokii-0.6.31/include/devices/Makefile.am0000644000175000017500000000031111666163120016277 0ustar leoleo EXTRA_HEADERS = \ dku2libusb.h \ irda.h \ linuxirda.h \ osxbluetooth.h \ tcp.h \ tekram.h \ unixbluetooth.h \ unixirda.h \ serial.h \ socketphonet.h EXTRA_DIST = $(EXTRA_HEADERS) gnokii-0.6.31/include/devices/Makefile.in0000644000175000017500000003400511666163211016320 0ustar leoleo# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = include/devices DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_expand_dir.m4 \ $(top_srcdir)/m4/acx_pthread.m4 $(top_srcdir)/m4/intltool.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLUETOOTH_LIBS = @BLUETOOTH_LIBS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FIND = @FIND@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLDFLAGS = @GLDFLAGS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GMODULE_CFLAGS = @GMODULE_CFLAGS@ GMODULE_LIBS = @GMODULE_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GNOKII_LT_VERSION = @GNOKII_LT_VERSION@ GNOKII_LT_VERSION_AGE = @GNOKII_LT_VERSION_AGE@ GNOKII_LT_VERSION_CURRENT = @GNOKII_LT_VERSION_CURRENT@ GNOKII_LT_VERSION_REVISION = @GNOKII_LT_VERSION_REVISION@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_LIBICAL = @HAVE_LIBICAL@ HAVE_LIBUSB = @HAVE_LIBUSB@ HAVE_SOCKETPHONET = @HAVE_SOCKETPHONET@ HAVE_XGNOKII = @HAVE_XGNOKII@ ICAL_CFLAGS = @ICAL_CFLAGS@ ICAL_LIBS = @ICAL_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBGNOKII_VERSION_MAJOR = @LIBGNOKII_VERSION_MAJOR@ LIBGNOKII_VERSION_MINOR = @LIBGNOKII_VERSION_MINOR@ LIBGNOKII_VERSION_RELEASE = @LIBGNOKII_VERSION_RELEASE@ LIBGNOKII_VERSION_STRING = @LIBGNOKII_VERSION_STRING@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBPCSCLITE_CFLAGS = @LIBPCSCLITE_CFLAGS@ LIBPCSCLITE_LIBS = @LIBPCSCLITE_LIBS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKE = @MAKE@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ MYSQLCONFIG = @MYSQLCONFIG@ MYSQLCONFIG5 = @MYSQLCONFIG5@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_LIBS = @MYSQL_LIBS@ NEED_LOCALE_CHARSET = @NEED_LOCALE_CHARSET@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OWN_GETOPT = @OWN_GETOPT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PGCONFIG = @PGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSTGRES_CFLAGS = @POSTGRES_CFLAGS@ POSTGRES_LIBS = @POSTGRES_LIBS@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LIBS = @SQLITE3_LIBS@ SQLITE_CFLAGS = @SQLITE_CFLAGS@ SQLITE_LIBS = @SQLITE_LIBS@ STRIP = @STRIP@ TCP_LIBS = @TCP_LIBS@ TERMLDFLAGS = @TERMLDFLAGS@ TERMLIBS = @TERMLIBS@ USB_LIBS = @USB_LIBS@ USE_NLS = @USE_NLS@ USE_UNIX98PTYS = @USE_UNIX98PTYS@ VERSION = @VERSION@ WIN32 = @WIN32@ WIN32_CROSS = @WIN32_CROSS@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ XPACKAGE = @XPACKAGE@ XPM_CFLAGS = @XPM_CFLAGS@ XPM_LIBS = @XPM_LIBS@ XVERSION = @XVERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ acx_pthread_config = @acx_pthread_config@ 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@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_HEADERS = \ dku2libusb.h \ irda.h \ linuxirda.h \ osxbluetooth.h \ tcp.h \ tekram.h \ unixbluetooth.h \ unixirda.h \ serial.h \ socketphonet.h EXTRA_DIST = $(EXTRA_HEADERS) all: all-am .SUFFIXES: $(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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/devices/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu include/devices/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 $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean 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-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gnokii-0.6.31/include/devices/linuxirda.h0000644000175000017500000001440211666163120016421 0ustar leoleo/********************************************************************* * * Filename: irda.h * Version: 1.0 * Description: IrDA header file to be used by IrDA applications * Status: Experimental. * Author: Dag Brattli * Created at: Mon Mar 8 14:06:12 1999 * Modified at: Sat Dec 25 16:07:54 1999 * Modified by: Dag Brattli * * Copyright (c) 1999 Dag Brattli, All Rights Reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * 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. See the * GNU General Public License for more details. * * Neither Dag Brattli nor University of Tromsø admit liability nor * provide warranty for any of this software. This material is * provided "AS-IS" and at no charge. * ********************************************************************/ /* * $Id$ * * GNOKII modifications: * Fixes for Solaris compile (Artur Kubiak and Michael Wiedmann) * FIXME: does it have *ANY* chance to work under other OS than Linux? */ #ifndef __gnokii_linuxirda_h #define __gnokii_linuxirda_h #include #include /* Hint bit positions for first hint byte */ #define HINT_PNP 0x01 #define HINT_PDA 0x02 #define HINT_COMPUTER 0x04 #define HINT_PRINTER 0x08 #define HINT_MODEM 0x10 #define HINT_FAX 0x20 #define HINT_LAN 0x40 #define HINT_EXTENSION 0x80 /* Hint bit positions for second hint byte (first extension byte) */ #define HINT_TELEPHONY 0x01 #define HINT_FILE_SERVER 0x02 #define HINT_COMM 0x04 #define HINT_MESSAGE 0x08 #define HINT_HTTP 0x10 #define HINT_OBEX 0x20 /* IrLMP character code values */ #define CS_ASCII 0x00 #define CS_ISO_8859_1 0x01 #define CS_ISO_8859_2 0x02 #define CS_ISO_8859_3 0x03 #define CS_ISO_8859_4 0x04 #define CS_ISO_8859_5 0x05 #define CS_ISO_8859_6 0x06 #define CS_ISO_8859_7 0x07 #define CS_ISO_8859_8 0x08 #define CS_ISO_8859_9 0x09 #define CS_UNICODE 0xff /* These are the currently known dongles */ typedef enum { IRDA_TEKRAM_DONGLE = 0, IRDA_ESI_DONGLE = 1, IRDA_ACTISYS_DONGLE = 2, IRDA_ACTISYS_PLUS_DONGLE = 3, IRDA_GIRBIL_DONGLE = 4, IRDA_LITELINK_DONGLE = 5, IRDA_AIRPORT_DONGLE = 6, IRDA_OLD_BELKIN_DONGLE = 7, } IRDA_DONGLE; /* Protocol types to be used for SOCK_DGRAM */ enum { IRDAPROTO_UNITDATA = 0, IRDAPROTO_ULTRA = 1, IRDAPROTO_MAX }; #define SOL_IRLMP 266 /* Same as SOL_IRDA for now */ #define SOL_IRTTP 266 /* Same as SOL_IRDA for now */ #define IRLMP_ENUMDEVICES 1 #define IRLMP_IAS_SET 2 #define IRLMP_IAS_QUERY 3 #define IRLMP_HINTS_SET 4 #define IRLMP_QOS_SET 5 #define IRLMP_QOS_GET 6 #define IRLMP_MAX_SDU_SIZE 7 #define IRLMP_IAS_GET 8 #define IRTTP_MAX_SDU_SIZE IRLMP_MAX_SDU_SIZE /* Compatibility */ /* LM-IAS Limits */ #define IAS_MAX_STRING 256 #define IAS_MAX_OCTET_STRING 1024 #define IAS_MAX_CLASSNAME 64 #define IAS_MAX_ATTRIBNAME 256 /* LM-IAS Attribute types */ #define IAS_MISSING 0 #define IAS_INTEGER 1 #define IAS_OCT_SEQ 2 #define IAS_STRING 3 #define LSAP_ANY 0xff #define DEV_ADDR_ANY 0xffffffff struct sockaddr_irda { sa_family_t sir_family; /* AF_IRDA */ uint8_t sir_lsap_sel; /* LSAP selector */ uint32_t sir_addr; /* Device address */ char sir_name[25]; /* Usually :IrDA:TinyTP */ }; struct irda_device_info { uint32_t saddr; /* Address of local interface */ uint32_t daddr; /* Address of remote device */ char info[22]; /* Description */ uint8_t charset; /* Charset used for description */ uint8_t hints[2]; /* Hint bits */ }; struct irda_device_list { uint32_t len; struct irda_device_info dev[1]; }; struct irda_ias_set { char irda_class_name[IAS_MAX_CLASSNAME]; char irda_attrib_name[IAS_MAX_ATTRIBNAME]; unsigned int irda_attrib_type; union { unsigned int irda_attrib_int; struct { unsigned short len; unsigned char octet_seq[IAS_MAX_OCTET_STRING]; } irda_attrib_octet_seq; struct { unsigned char len; unsigned char charset; unsigned char string[IAS_MAX_STRING]; } irda_attrib_string; } attribute; uint32_t daddr; }; /* Some private IOCTL's (max 16) */ #define SIOCSDONGLE (SIOCDEVPRIVATE + 0) #define SIOCGDONGLE (SIOCDEVPRIVATE + 1) #define SIOCSBANDWIDTH (SIOCDEVPRIVATE + 2) #define SIOCSMEDIABUSY (SIOCDEVPRIVATE + 3) #define SIOCGMEDIABUSY (SIOCDEVPRIVATE + 4) #define SIOCGRECEIVING (SIOCDEVPRIVATE + 5) #define SIOCSMODE (SIOCDEVPRIVATE + 6) #define SIOCGMODE (SIOCDEVPRIVATE + 7) #define SIOCSDTRRTS (SIOCDEVPRIVATE + 8) #define SIOCGQOS (SIOCDEVPRIVATE + 9) /* No reason to include just because of this one ;-) */ #define IRNAMSIZ 16 /* IrDA quality of service information (must not exceed 16 bytes) */ struct if_irda_qos { uint32_t baudrate; uint16_t data_size; uint16_t window_size; uint16_t min_turn_time; uint16_t max_turn_time; uint8_t add_bofs; uint8_t link_disc; }; /* For setting RTS and DTR lines of a dongle */ struct if_irda_line { unsigned char dtr; unsigned char rts; }; /* IrDA interface configuration (data part must not exceed 16 bytes) */ struct if_irda_req { union { char ifrn_name[IRNAMSIZ]; /* if name, e.g. "irda0" */ } ifr_ifrn; /* Data part */ union { struct if_irda_line ifru_line; struct if_irda_qos ifru_qos; unsigned short ifru_flags; unsigned int ifru_receiving; unsigned int ifru_mode; unsigned int ifru_dongle; } ifr_ifru; }; #define ifr_baudrate ifr_ifru.ifru_qos.baudrate #define ifr_receiving ifr_ifru.ifru_receiving #define ifr_dongle ifr_ifru.ifru_dongle #define ifr_mode ifr_ifru.ifru_mode #define ifr_dtr ifr_ifru.ifru_line.dtr #define ifr_rts ifr_ifru.ifru_line.rts #endif /* __gnokii_linuxirda_h */ gnokii-0.6.31/include/devices/unixirda.h0000644000175000017500000000177111666163120016252 0ustar leoleo/* * * $Id$ * * G N O K I I * * A Linux/Unix toolset and driver for Nokia mobile phones. * * Copyright (C) 1999, 2000 Hugh Blemings & Pavel Janík ml. * Copyright (C) 2000-2001 Marcel Holtmann * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library 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. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #ifndef __unix_irda_h_ #define __unix_irda_h_ #endif gnokii-0.6.31/include/devices/unixbluetooth.h0000644000175000017500000000273611666163120017342 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for Nokia mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999, 2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 2002 Marcel Holtmann */ #ifndef _gnokii_unix_bluetooth_h #define _gnokii_unix_bluetooth_h #include "compat.h" #include "misc.h" #include "gnokii.h" int bluetooth_open(const char *addr, uint8_t channel, struct gn_statemachine *state); int bluetooth_close(int fd, struct gn_statemachine *state); int bluetooth_write(int fd, const __ptr_t bytes, int size, struct gn_statemachine *state); int bluetooth_read(int fd, __ptr_t bytes, int size, struct gn_statemachine *state); int bluetooth_select(int fd, struct timeval *timeout, struct gn_statemachine *state); #endif /* _gnokii_unix_bluetooth_h */ gnokii-0.6.31/include/devices/tcp.h0000644000175000017500000000253311666163120015212 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for Nokia mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2002 Jan Kratochvil */ #ifndef __devices_tcp_h #define __devices_tcp_h #include "compat.h" #include "misc.h" #include "gnokii.h" int tcp_opendevice(const char *file, int with_async, struct gn_statemachine *state); int tcp_close(int fd, struct gn_statemachine *state); size_t tcp_read(int fd, __ptr_t buf, size_t nbytes, struct gn_statemachine *state); size_t tcp_write(int fd, const __ptr_t buf, size_t n, struct gn_statemachine *state); int tcp_select(int fd, struct timeval *timeout, struct gn_statemachine *state); #endif /* __devices_tcp_h */ gnokii-0.6.31/include/devices/serial.h0000644000175000017500000000354511666163120015707 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for Nokia mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999, 2000 Hugh Blemings & Pavel Janik ml. */ #ifndef __devices_serial_h #define __devices_serial_h #include "compat.h" #include "misc.h" #include "gnokii.h" int serial_open(const char *file, int oflag); int serial_close(int fd, struct gn_statemachine *state); int serial_opendevice(const char *file, int with_odd_parity, int with_async, int with_hw_handshake, struct gn_statemachine *state); void serial_setdtrrts(int fd, int dtr, int rts, struct gn_statemachine *state); gn_error serial_changespeed(int fd, int speed, struct gn_statemachine *state); size_t serial_read(int fd, __ptr_t buf, size_t nbytes, struct gn_statemachine *state); size_t serial_write(int fd, const __ptr_t buf, size_t n, struct gn_statemachine *state); int serial_select(int fd, struct timeval *timeout, struct gn_statemachine *state); gn_error serial_nreceived(int fd, int *n, struct gn_statemachine *state); gn_error serial_flush(int fd, struct gn_statemachine *state); extern int device_script(int fd, const char *section, struct gn_statemachine *state); #endif /* __devices_serial_h */ gnokii-0.6.31/include/devices/tekram.h0000644000175000017500000000354011666163120015706 0ustar leoleo/* * * $Id$ * * G N O K I I * * A Linux/Unix toolset and driver for Nokia mobile phones. * * Copyright (C) 1999, 2000 Hugh Blemings & Pavel Janík ml. * Copyright (C) 2000-2001 Marcel Holtmann * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library 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. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #ifndef __devices_tekram_h #define __devices_tekram_h #ifdef WIN32 # include #else # include #endif /* WIN32 */ #include "misc.h" #define TEKRAM_B115200 0x00 #define TEKRAM_B57600 0x01 #define TEKRAM_B38400 0x02 #define TEKRAM_B19200 0x03 #define TEKRAM_B9600 0x04 #define TEKRAM_PW 0x10 /* Pulse select bit */ int tekram_open(const char *file, struct gn_statemachine *state); void tekram_close(int fd, struct gn_statemachine *state); void tekram_setdtrrts(int fd, int dtr, int rts, struct gn_statemachine *state); void tekram_changespeed(int fd, int speed, struct gn_statemachine *state); size_t tekram_read(int fd, __ptr_t buf, size_t nbytes, struct gn_statemachine *state); size_t tekram_write(int fd, const __ptr_t buf, size_t n, struct gn_statemachine *state); int tekram_select(int fd, struct timeval *timeout, struct gn_statemachine *state); #endif /* __devices_tekram_h */ gnokii-0.6.31/include/devices/osxbluetooth.h0000644000175000017500000000314711666163120017165 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for Nokia mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999, 2000 Hugh Blemings & Pavel Janík ml. Copyright (C) 2003 Siegfried Schloissnig */ #ifndef _gnokii_osx_bluetooth_h #define _gnokii_osx_bluetooth_h #include #include #include #include #include #include #include #include #include #include #include #include typedef struct { IOBluetoothRFCOMMChannelRef rfcommChannel; IOReturn ioReturnValue; pthread_t threadID; BluetoothDeviceAddress deviceAddress; uint8_t nChannel; pthread_mutex_t mutexWait; CFMutableArrayRef arrDataReceived; } threadContext; typedef struct { void *pData; unsigned int nSize; } dataBlock; #endif /* _gnokii_osx_bluetooth_h */ gnokii-0.6.31/include/devices/irda.h0000644000175000017500000000260511666163120015343 0ustar leoleo/* * * $Id$ * * G N O K I I * * A Linux/Unix toolset and driver for Nokia mobile phones. * * Copyright (C) 1999, 2000 Hugh Blemings & Pavel Janik ml. * Copyright (C) 2000-2001 Marcel Holtmann * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library 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. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #ifndef __gnokii_irda_h_ #define __gnokii_irda_h_ #include "gnokii.h" int irda_open(struct gn_statemachine *state); int irda_close(int fd, struct gn_statemachine *state); int irda_write(int fd, const __ptr_t bytes, int size, struct gn_statemachine *state); int irda_read(int fd, __ptr_t bytes, int size, struct gn_statemachine *state); int irda_select(int fd, struct timeval *timeout, struct gn_statemachine *state); #endif /* __gnokii_irda_h_ */ gnokii-0.6.31/include/devices/socketphonet.h0000644000175000017500000000310011666163120017121 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2010 Daniele Forsi This file provides an API for accessing functions via the phonet Linux kernel module. See README for more details on supported mobile phones. The various routines are called socketphonet_(whatever). */ #ifndef _gnokii_devices_linuxphonet_h #define _gnokii_devices_linuxphonet_h #include "gnokii.h" int socketphonet_close(struct gn_statemachine *state); int socketphonet_open(const char *iface, int with_async, struct gn_statemachine *state); size_t socketphonet_read(int fd, __ptr_t buf, size_t nbytes, struct gn_statemachine *state); size_t socketphonet_write(int fd, const __ptr_t buf, size_t n, struct gn_statemachine *state); int socketphonet_select(int fd, struct timeval *timeout, struct gn_statemachine *state); #endif /* _gnokii_devices_linuxphonet_h */ gnokii-0.6.31/include/devices/dku2libusb.h0000644000175000017500000001064211666163120016472 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for Nokia mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999, 2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 2002 Marcel Holtmann Copyright (C) 2005 Alex Kanavin Copyright (C) 2006 Pawel Kot */ #ifndef _gnokii_dku2libusb_h #define _gnokii_dku2libusb_h #ifdef HAVE_LIBUSB # include #endif #include "compat.h" #include "misc.h" #include "gnokii.h" #ifdef HAVE_LIBUSB /* Information about a USB DKU2 FBUS interface present on the system */ struct fbus_usb_interface_transport { struct fbus_usb_interface_transport *prev, *next; /* Next and previous interfaces in the list */ struct usb_device *device; /* USB device that has the interface */ int configuration; /* Device configuration */ int configuration_description; /* Configuration string descriptor number */ int control_interface; /* DKU2 FBUS master interface */ int control_setting; /* DKU2 FBUS master interface setting */ int control_interface_description; /* DKU2 FBUS master interface string descriptor number * If non-zero, use usb_get_string_simple() from * libusb to retrieve human-readable description */ int data_interface; /* DKU2 FBUS data/slave interface */ int data_idle_setting; /* DKU2 FBUS data/slave idle setting */ int data_interface_idle_description; /* DKU2 FBUS data/slave interface string descriptor number * in idle setting */ int data_active_setting; /* DKU2 FBUS data/slave active setting */ int data_interface_active_description; /* DKU2 FBUS data/slave interface string descriptor number * in active setting */ int data_endpoint_read; /* DKU2 FBUS data/slave interface read endpoint */ int data_endpoint_write; /* DKU2 FBUS data/slave interface write endpoint */ usb_dev_handle *dev_control; /* libusb handler for control interace */ usb_dev_handle *dev_data; /* libusb handler for data interface */ }; /* USB-specific FBUS interface information */ typedef struct { /* Manufacturer, e.g. Nokia */ char *manufacturer; /* Product, e.g. Nokia 6680 */ char *product; /* Product serial number */ char *serial; /* USB device configuration description */ char *configuration; /* Control interface description */ char *control_interface; /* Idle data interface description, typically empty */ char *data_interface_idle; /* Active data interface description, typically empty */ char *data_interface_active; /* Internal information for the transport layer in the library */ struct fbus_usb_interface_transport *interface; } fbus_usb_interface; /* "Union Functional Descriptor" from CDC spec 5.2.3.X * used to find data/slave DKU2 FBUS interface */ #pragma pack(1) struct cdc_union_desc { u_int8_t bLength; u_int8_t bDescriptorType; u_int8_t bDescriptorSubType; u_int8_t bMasterInterface0; u_int8_t bSlaveInterface0; }; #pragma pack() /* Nokia is the vendor we are interested in */ #define NOKIA_VENDOR_ID 0x0421 /* CDC class and subclass types */ #define USB_CDC_CLASS 0x02 #define USB_CDC_FBUS_SUBCLASS 0xfe /* class and subclass specific descriptor types */ #define CDC_HEADER_TYPE 0x00 #define CDC_UNION_TYPE 0x06 #define CDC_FBUS_TYPE 0x15 /* Interface descriptor */ #define USB_DT_CS_INTERFACE 0x24 #define USB_MAX_STRING_SIZE 256 #define USB_FBUS_TIMEOUT 10000 /* 10 seconds */ #endif int fbusdku2usb_open(struct gn_statemachine *state); int fbusdku2usb_close(struct gn_statemachine *state); int fbusdku2usb_write(const __ptr_t bytes, int size, struct gn_statemachine *state); int fbusdku2usb_read(__ptr_t bytes, int size, struct gn_statemachine *state); int fbusdku2usb_select(struct timeval *timeout, struct gn_statemachine *state); #endif /* _gnokii_dku2libusb_h */ gnokii-0.6.31/include/pkt.h0000644000175000017500000000410011666163120013570 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2004 BORBELY Zoltan This file contains the encoding/decoding functions for the basic types. */ #ifndef _gnokii_pkt_h #define _gnokii_pkt_h #include "compat.h" typedef struct { uint8_t *addr; int32_t size; int32_t offs; } pkt_buffer; void pkt_buffer_set(pkt_buffer *buf, void *addr, int32_t len); void pkt_put_int8(pkt_buffer *buf, int8_t x); void pkt_put_int16(pkt_buffer *buf, int16_t x); void pkt_put_int32(pkt_buffer *buf, int32_t x); void pkt_put_uint8(pkt_buffer *buf, uint8_t x); void pkt_put_uint16(pkt_buffer *buf, uint16_t x); void pkt_put_uint32(pkt_buffer *buf, uint32_t x); void pkt_put_string(pkt_buffer *buf, const char *x); void pkt_put_timestamp(pkt_buffer *buf, const gn_timestamp *x); void pkt_put_bool(pkt_buffer *buf, int x); void pkt_put_bytes(pkt_buffer *buf, const uint8_t *x, uint16_t n); int8_t pkt_get_int8(pkt_buffer *buf); int16_t pkt_get_int16(pkt_buffer *buf); int32_t pkt_get_int32(pkt_buffer *buf); uint8_t pkt_get_uint8(pkt_buffer *buf); uint16_t pkt_get_uint16(pkt_buffer *buf); uint32_t pkt_get_uint32(pkt_buffer *buf); char *pkt_get_string(char *s, int slen, pkt_buffer *buf); gn_timestamp *pkt_get_timestamp(gn_timestamp *t, pkt_buffer *buf); int pkt_get_bool(pkt_buffer *buf); uint16_t pkt_get_bytes(uint8_t *s, int len, pkt_buffer *buf); #endif gnokii-0.6.31/include/localcharset.h0000644000175000017500000000256311666163120015451 0ustar leoleo/* Determine a canonical name for the current locale's character encoding. Copyright (C) 2000-2003 Free Software Foundation, Inc. This file is part of the GNU CHARSET Library. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. 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. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _LOCALCHARSET_H #define _LOCALCHARSET_H #ifdef __cplusplus extern "C" { #endif /* Determine the current locale's character encoding, and canonicalize it into one of the canonical names listed in config.charset. The result must not be freed; it is statically allocated. If the canonical name cannot be determined, the result is a non-canonical name. */ extern const char * locale_charset (void); #ifdef __cplusplus } #endif #endif /* _LOCALCHARSET_H */ gnokii-0.6.31/include/config.h0000644000175000017500000002556411666163255014271 0ustar leoleo/* include/config.h. Generated from config.h.in by configure. */ /* include/config.h.in. Generated from configure.in by autoheader. */ /* Whether debug is turned on */ #define DEBUG 1 /* always defined to indicate that i18n is enabled */ #define ENABLE_NLS 1 /* Define to the Gettext package name */ #define GETTEXT_PACKAGE "gnokii" /* Define to 1 if you have the `asprintf' function. */ #define HAVE_ASPRINTF 1 /* Define to 1 if you have the `bind_textdomain_codeset' function. */ #define HAVE_BIND_TEXTDOMAIN_CODESET 1 /* Whether Bluetooth is available */ #define HAVE_BLUETOOTH 1 /* Compile on Linux */ #define HAVE_BLUETOOTH_BLUEZ /**/ /* Compile on Darwin / Mac OSX */ /* #undef HAVE_BLUETOOTH_MACOSX */ /* Compile on NetBSD */ /* #undef HAVE_BLUETOOTH_NETBT */ /* Compile on FreeBSD */ /* #undef HAVE_BLUETOOTH_NETGRAPH */ /* Whether snprintf is available */ #define HAVE_C99_SNPRINTF 1 /* Whether vsnprintf is available */ #define HAVE_C99_VSNPRINTF 1 /* Whether cfsetispeed is available */ /* #undef HAVE_CFSETISPEED */ /* Whether cfsetospeed is available */ /* #undef HAVE_CFSETOSPEED */ /* Whether cfsetspeed is available */ #define HAVE_CFSETSPEED 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_COREFOUNDATION_COREFOUNDATION_H */ /* Define to 1 if you have the header file. */ #define HAVE_CTYPE_H 1 /* Define to 1 if you have the `dcgettext' function. */ #define HAVE_DCGETTEXT 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_DIRECT_H */ /* Define to 1 if you have the header file. */ #define HAVE_DIRENT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 /* Define to 1 if you have the `getpass' function. */ #define HAVE_GETPASS 1 /* Define if the GNU gettext() function is already present or preinstalled. */ #define HAVE_GETTEXT 1 /* Define to 1 if you have the `gettimeofday' function. */ #define HAVE_GETTIMEOFDAY 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_HISTORY_H */ /* Define if you have the iconv() function and it works. */ #define HAVE_ICONV 1 /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_IOBLUETOOTH_BLUETOOTH_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_IOBLUETOOTH_IOBLUETOOTHUSERLIB_H */ /* Whether IrDA is available */ #define HAVE_IRDA 1 /* Define if you have and nl_langinfo(CODESET). */ #define HAVE_LANGINFO_CODESET 1 /* Define if your file defines LC_MESSAGES. */ #define HAVE_LC_MESSAGES 1 /* Use libical */ #define HAVE_LIBICAL 1 /* Define to 1 if you have the `socket' library (-lsocket). */ /* #undef HAVE_LIBSOCKET */ /* Use libusb */ #define HAVE_LIBUSB 1 /* Define to 1 if you have the header file. */ #define HAVE_LOCALE_H 1 /* Whether the platform has a long double type */ #define HAVE_LONG_DOUBLE 1 /* Whether the platform has a long long int type */ #define HAVE_LONG_LONG 1 /* Define to 1 if libpcsclite defines the type 'LPCSTR'. */ #define HAVE_LPCSTR 1 /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 /* Define to 1 if you have the `mktime' function. */ #define HAVE_MKTIME 1 /* Whether struct msghdr has a msg_control member */ #define HAVE_MSGHDR_MSG_CONTROL 1 /* Define if you have libpcsclite */ #define HAVE_PCSC 1 /* Define to 1 if you have the `poll' function. */ #define HAVE_POLL 1 /* Define if you have POSIX threads libraries and header files. */ #define HAVE_PTHREAD 1 /* Whether __ptr_t is available */ #define HAVE_PTR_T 1 /* Use readline */ #define HAVE_READLINE 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_READLINE_H */ /* Define to 1 if you have the header file. */ #define HAVE_READLINE_HISTORY_H 1 /* Define to 1 if you have the header file. */ #define HAVE_READLINE_READLINE_H 1 /* Define to 1 if you have the `select' function. */ #define HAVE_SELECT 1 /* Define to 1 if you have the `setenv' function. */ #define HAVE_SETENV 1 /* Define to 1 if you have the `snprintf' function. */ #define HAVE_SNPRINTF 1 /* Whether Phonet is available */ #define HAVE_SOCKETPHONET 1 /* Define to 1 if you have the header file. */ #define HAVE_STDARG_H 1 /* Define to 1 if stdbool.h conforms to C99. */ #define HAVE_STDBOOL_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDDEF_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 /* Define to 1 if you have the `strchr' function. */ #define HAVE_STRCHR 1 /* Define to 1 if you have the `strdup' function. */ #define HAVE_STRDUP 1 /* Define to 1 if you have the `strftime' function. */ #define HAVE_STRFTIME 1 /* Define to 1 if you have the header file. */ #define HAVE_STRINGS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 /* Define to 1 if you have the `strndup' function. */ #define HAVE_STRNDUP 1 /* Define to 1 if you have the `strsep' function. */ #define HAVE_STRSEP 1 /* Define to 1 if you have the `strstr' function. */ #define HAVE_STRSTR 1 /* Define to 1 if you have the `strtok' function. */ #define HAVE_STRTOK 1 /* Define to 1 if you have the `strtol' function. */ #define HAVE_STRTOL 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_FILE_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_FILIO_H */ /* Define to 1 if you have the header file. */ #define HAVE_SYS_IOCTL_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_MODEM_H */ /* Define to 1 if you have the header file. */ #define HAVE_SYS_PARAM_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_SOCKET_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_TIME_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_TYPES_H 1 /* Define to 1 if you have that is POSIX.1 compatible. */ #define HAVE_SYS_WAIT_H 1 /* Whether c_ispeed and c_ospeed are available */ /* #undef HAVE_TERMIOS_CSPEED */ /* Define to 1 if you have the header file. */ #define HAVE_TERMIOS_H 1 /* Define to 1 if you have the `timegm' function. */ #define HAVE_TIMEGM 1 /* Whether timer operations are available */ #define HAVE_TIMEOPS 1 /* Whether tm_gmtoff is available */ #define HAVE_TM_GMTON 1 /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 /* Define to 1 if the system has the type 'u_int8_t'. */ #define HAVE_U_INT8_T 1 /* Define to 1 if you have the `vasprintf' function. */ #define HAVE_VASPRINTF 1 /* Define to 1 if you have the `vsnprintf' function. */ #define HAVE_VSNPRINTF 1 /* Define to 1 if you have the header file. */ #define HAVE_WCHAR_H 1 /* Define to 1 if you have the `wcrtomb' function. */ #define HAVE_WCRTOMB 1 /* Define to 1 if you have the header file. */ #define HAVE_X11_XPM_H 1 /* Define to 1 if the system has the type `_Bool'. */ #define HAVE__BOOL 1 /* Define as const if the declaration of iconv() needs const. */ #define ICONV_CONST /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" /* Define to 1 if your C compiler doesn't accept -c and -o together. */ /* #undef NO_MINUS_C_MINUS_O */ /* Name of package */ #define PACKAGE "gnokii" /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "gnokii-users@nongnu.org" /* Define to the full name of this package. */ #define PACKAGE_NAME "gnokii" /* Define to the full name and version of this package. */ #define PACKAGE_STRING "gnokii 0.6.31" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "gnokii" /* Define to the home page for this package. */ #define PACKAGE_URL "http://www.gnokii.org/" /* Define to the version of this package. */ #define PACKAGE_VERSION "0.6.31" /* Root dir for gnokii, xgnokii and smsd */ #define PREFIX "/usr/local" /* Define to the necessary symbol if this constant uses a non-standard name on your system. */ /* #undef PTHREAD_CREATE_JOINABLE */ /* Define as the return type of signal handlers (`int' or `void'). */ #define RETSIGTYPE void /* Whether rlpdebug is turned on */ #define RLP_DEBUG 1 /* Where mgnokiidev gets installed */ #define SBINDIR "/usr/local/sbin" /* Whether security features are enabled */ #define SECURITY 1 /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* The current SMSD version */ #define SVERSION "1.5.2" /* Define to 1 if you can safely include both and . */ #define TIME_WITH_SYS_TIME 1 /* Define to 1 if your declares `struct tm'. */ /* #undef TM_IN_SYS_TIME */ /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # define _ALL_SOURCE 1 #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # define _POSIX_PTHREAD_SEMANTICS 1 #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # define _TANDEM_SOURCE 1 #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # define __EXTENSIONS__ 1 #endif /* Whether Unix98 support is available */ #define USE_UNIX98PTYS 1 /* The current version */ #define VERSION "0.6.31" /* Whether compiling on Windows */ /* #undef WIN32 */ /* Define if you cross compile Windows. */ /* #undef WIN32_CROSS */ /* Whether xdebug is turned on */ #define XDEBUG 1 /* Whether the Xpm library is available */ #define XPM 1 /* The current xgnokii version */ #define XVERSION "1.0" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 /* Define to 1 if on MINIX. */ /* #undef _MINIX */ /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ /* #undef _POSIX_1_SOURCE */ /* Define to 1 if you need to in order for `stat' and other things to work. */ /* #undef _POSIX_SOURCE */ /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus /* #undef inline */ #endif /* Define to `int' if does not define. */ /* #undef pid_t */ /* Define to `unsigned int' if does not define. */ /* #undef size_t */ gnokii-0.6.31/include/device.h0000644000175000017500000000361711666163120014245 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 2002 BORBELY Zoltan, Ladis Michl, Pawel Kot, Chris Kemp Header file device access code. */ #ifndef _gnokii_device_h #define _gnokii_device_h #include "compat.h" #include "misc.h" #include "gnokii.h" GNOKII_API int device_getfd(struct gn_statemachine *state); int device_open(const char *file, int with_odd_parity, int with_async, int with_hw_handshake, gn_connection_type device_type, struct gn_statemachine *state); void device_close(struct gn_statemachine *state); void device_reset(struct gn_statemachine *state); void device_setdtrrts(int dtr, int rts, struct gn_statemachine *state); void device_changespeed(int speed, struct gn_statemachine *state); size_t device_read(__ptr_t buf, size_t nbytes, struct gn_statemachine *state); size_t device_write(const __ptr_t buf, size_t n, struct gn_statemachine *state); int device_select(struct timeval *timeout, struct gn_statemachine *state); gn_error device_nreceived(int *n, struct gn_statemachine *state); gn_error device_flush(struct gn_statemachine *state); #endif /* _gnokii_device_h */ gnokii-0.6.31/include/map.h0000644000175000017500000000237011666163120013556 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2008 Pawel Kot Header file for operations on map data structure (key, value pairs). */ #ifndef __map_h_ #define __map_h_ #include struct map { char *key; void *data; time_t timestamp; struct map *next; struct map *prev; }; void map_free(struct map **map); int map_add(struct map **map, char *key, void *data); void *map_get(struct map **map, char *key, time_t timeout); int map_del(struct map **map, char *key); #endif /* __map_h_ */ gnokii-0.6.31/include/links/0000755000175000017500000000000011666163457013763 5ustar leoleognokii-0.6.31/include/links/Makefile.am0000644000175000017500000000025311666163120016002 0ustar leoleo EXTRA_HEADERS = \ atbus.h \ cbus.h \ fbus-3110.h \ fbus-common.h \ fbus.h \ fbus-phonet.h \ gnbus.h \ m2bus.h \ utils.h EXTRA_DIST = $(EXTRA_HEADERS) gnokii-0.6.31/include/links/fbus-phonet.h0000644000175000017500000000407411666163120016356 0ustar leoleo/* G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janík ml. Copyright (C) 2000 Chris Kemp Copyright (C) 2001-2011 Pawel Kot Copyright (C) 2002 BORBELY Zoltan, Ladis Michl This file provides an API for accessing functions via fbus over irda. See README for more details on supported mobile phones. */ #ifndef _gnokii_links_fbus_phonet_h #define _gnokii_links_fbus_phonet_h #include "fbus-common.h" #define PHONET_FRAME_MAX_LENGTH 1010 #define PHONET_TRANSMIT_MAX_LENGTH 1010 #define PHONET_CONTENT_MAX_LENGTH 1000 /* This byte is at the beginning of all GSM Frames sent over PhoNet. */ #define FBUS_PHONET_FRAME_ID 0x14 /* This byte is at the beginning of all GSM Frames sent over Bluetooth to Nokia 6310 family phones. */ #define FBUS_PHONET_BLUETOOTH_FRAME_ID 0x19 #define FBUS_PHONET_DKU2_FRAME_ID 0x1b #define FBUS_PHONET_DKU2_DEVICE_PC 0x0c /* Our PC in the Nokia 6310 family over Bluetooth. */ #define FBUS_PHONET_BLUETOOTH_DEVICE_PC 0x10 gn_error phonet_initialise(struct gn_statemachine *state); typedef struct { int buffer_count; enum fbus_rx_state state; int message_source; int message_destination; int message_type; int message_length; char *message_buffer; int message_corrupted; } phonet_incoming_message; #endif /* #ifndef _gnokii_links_fbus_phonet_h */ gnokii-0.6.31/include/links/Makefile.in0000644000175000017500000003374011666163211016023 0ustar leoleo# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = include/links DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_expand_dir.m4 \ $(top_srcdir)/m4/acx_pthread.m4 $(top_srcdir)/m4/intltool.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLUETOOTH_LIBS = @BLUETOOTH_LIBS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FIND = @FIND@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLDFLAGS = @GLDFLAGS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GMODULE_CFLAGS = @GMODULE_CFLAGS@ GMODULE_LIBS = @GMODULE_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GNOKII_LT_VERSION = @GNOKII_LT_VERSION@ GNOKII_LT_VERSION_AGE = @GNOKII_LT_VERSION_AGE@ GNOKII_LT_VERSION_CURRENT = @GNOKII_LT_VERSION_CURRENT@ GNOKII_LT_VERSION_REVISION = @GNOKII_LT_VERSION_REVISION@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_LIBICAL = @HAVE_LIBICAL@ HAVE_LIBUSB = @HAVE_LIBUSB@ HAVE_SOCKETPHONET = @HAVE_SOCKETPHONET@ HAVE_XGNOKII = @HAVE_XGNOKII@ ICAL_CFLAGS = @ICAL_CFLAGS@ ICAL_LIBS = @ICAL_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBGNOKII_VERSION_MAJOR = @LIBGNOKII_VERSION_MAJOR@ LIBGNOKII_VERSION_MINOR = @LIBGNOKII_VERSION_MINOR@ LIBGNOKII_VERSION_RELEASE = @LIBGNOKII_VERSION_RELEASE@ LIBGNOKII_VERSION_STRING = @LIBGNOKII_VERSION_STRING@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBPCSCLITE_CFLAGS = @LIBPCSCLITE_CFLAGS@ LIBPCSCLITE_LIBS = @LIBPCSCLITE_LIBS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKE = @MAKE@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ MYSQLCONFIG = @MYSQLCONFIG@ MYSQLCONFIG5 = @MYSQLCONFIG5@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_LIBS = @MYSQL_LIBS@ NEED_LOCALE_CHARSET = @NEED_LOCALE_CHARSET@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OWN_GETOPT = @OWN_GETOPT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PGCONFIG = @PGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSTGRES_CFLAGS = @POSTGRES_CFLAGS@ POSTGRES_LIBS = @POSTGRES_LIBS@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LIBS = @SQLITE3_LIBS@ SQLITE_CFLAGS = @SQLITE_CFLAGS@ SQLITE_LIBS = @SQLITE_LIBS@ STRIP = @STRIP@ TCP_LIBS = @TCP_LIBS@ TERMLDFLAGS = @TERMLDFLAGS@ TERMLIBS = @TERMLIBS@ USB_LIBS = @USB_LIBS@ USE_NLS = @USE_NLS@ USE_UNIX98PTYS = @USE_UNIX98PTYS@ VERSION = @VERSION@ WIN32 = @WIN32@ WIN32_CROSS = @WIN32_CROSS@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ XPACKAGE = @XPACKAGE@ XPM_CFLAGS = @XPM_CFLAGS@ XPM_LIBS = @XPM_LIBS@ XVERSION = @XVERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ acx_pthread_config = @acx_pthread_config@ 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@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_HEADERS = \ atbus.h \ cbus.h \ fbus-3110.h \ fbus-common.h \ fbus.h \ fbus-phonet.h \ gnbus.h \ m2bus.h \ utils.h EXTRA_DIST = $(EXTRA_HEADERS) all: all-am .SUFFIXES: $(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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/links/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu include/links/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 $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean 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-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gnokii-0.6.31/include/links/m2bus.h0000644000175000017500000000455111666163120015154 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 2000 Chris Kemp Copyright (C) 2002 BORBELY Zoltan This file provides an API for accessing functions via m2bus. See README for more details on supported mobile phones. The various routines are called M2BUS_(whatever). */ #ifndef _gnokii_links_m2bus_h #define _gnokii_links_m2bus_h #include #include "compat.h" #include "gnokii.h" #ifdef WIN32 # include #endif /* This byte is at the beginning of all GSM Frames sent over M2BUS to Nokia phones. This may have to become a phone dependant parameter... */ #define M2BUS_FRAME_ID 0x1f /* This byte is at the beginning of all GSM Frames sent over IR to Nokia phones. */ #define M2BUS_IR_FRAME_ID 0x14 /* Nokia mobile phone. */ #define M2BUS_DEVICE_PHONE 0x00 /* Our PC. */ #define M2BUS_DEVICE_PC 0x1d enum m2bus_rx_state { M2BUS_RX_Sync, M2BUS_RX_Discarding, M2BUS_RX_GetDestination, M2BUS_RX_GetSource, M2BUS_RX_GetType, M2BUS_RX_GetLength1, M2BUS_RX_GetLength2, M2BUS_RX_GetMessage }; typedef struct { enum m2bus_rx_state state; int buffer_count; struct timeval time_now; struct timeval time_last; int message_source; int message_destination; int message_type; int message_length; unsigned char checksum; unsigned char *message_buffer; } m2bus_incoming_message; typedef struct{ m2bus_incoming_message i; u8 request_sequence_number; } m2bus_link; #define M2BUSINST(s) (*((m2bus_link **)(&(s)->link.link_instance))) gn_error m2bus_initialise(struct gn_statemachine *state); #endif /* #ifndef _gnokii_links_m2bus_h */ gnokii-0.6.31/include/links/gnbus.h0000644000175000017500000000373411666163120015244 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 2000 Chris Kemp Copyright (C) 2004 BORBELY Zoltan This file provides an API for accessing functions via gnbus. See README for more details on supported mobile phones. The various routines are called GNBUS_(whatever). */ #ifndef _gnokii_links_gnbus_h #define _gnokii_links_gnbus_h #include #include "compat.h" #include "gnokii.h" #ifdef WIN32 # include #endif #define GNBUS_MAGIC_BYTE 0x5a enum gnbus_rx_state { GNBUS_RX_Discarding, GNBUS_RX_Sync, GNBUS_RX_GetSequence, GNBUS_RX_GetLength1, GNBUS_RX_GetLength2, GNBUS_RX_GetType, GNBUS_RX_GetDummy, GNBUS_RX_GetMessage }; typedef struct { enum gnbus_rx_state state; int buffer_count; struct timeval time_now; struct timeval time_last; unsigned char sequence; int message_type; int message_length; unsigned char checksum[2]; int checksum_idx; unsigned char *message_buffer; } gnbus_incoming_message; typedef struct{ gnbus_incoming_message i; } gnbus_link; #define GNBUSINST(s) (*((gnbus_link **)(&(s)->link.link_instance))) gn_error gnbus_initialise(struct gn_statemachine *state); #endif /* #ifndef _gnokii_links_gnbus_h */ gnokii-0.6.31/include/links/fbus-3110.h0000644000175000017500000000443211666163120015443 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 2001-2004 Pawel Kot Copyright (C) 2002 BORBELY Zoltan, Ladis Michl Copyright (C) 2003 Osma Suominen This file provides an API for accessing functions via fbus. See README for more details on supported mobile phones. The various routines are called fb3110_(whatever). */ #ifndef _gnokii_links_fbus_3110_h #define _gnokii_links_fbus_3110_h #include "compat.h" #include "gnokii.h" #ifdef WIN32 # include #endif #define FB3110_FRAME_MAX_LENGTH 256 #define FB3110_MESSAGE_MAX_TYPES 128 #define FB3110_TRANSMIT_MAX_LENGTH 256 #define FB3110_CONTENT_MAX_LENGTH 120 /* Frame types (first byte of FBUS v1 frame) */ #define FB3110_FRAME_TYPE_OUT_CMD 0x01 #define FB3110_FRAME_TYPE_OUT_RLP 0x02 #define FB3110_FRAME_TYPE_IN_RLP 0x03 #define FB3110_FRAME_TYPE_IN_CMD 0x04 /* States for receive code. */ enum fb3110_rx_states { FB3110_RX_Sync, FB3110_RX_Discarding, FB3110_RX_GetLength, FB3110_RX_GetMessage }; typedef struct{ int checksum; int buffer_count; enum fb3110_rx_states state; int frame_type; int frame_len; char buffer[FB3110_FRAME_MAX_LENGTH]; } fb3110_incoming_frame; typedef struct { u16 message_length; u8 message_type; u8 *buffer; } fb3110_outgoing_message; typedef struct{ fb3110_incoming_frame i; u8 request_sequence_number; u8 last_incoming_sequence_number; } fb3110_link; gn_error fb3110_initialise(struct gn_statemachine *state); #endif /* #ifndef _gnokii_links_fbus_3110_h */ gnokii-0.6.31/include/links/utils.h0000644000175000017500000000251411666163120015261 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2000 Hugh Blemings & Pavel Janík ml. Copyright (C) 2001 Pavel Machek, Chris Kemp Copyright (C) 2002 Pawel Kot, Ladis Michl, Manfred Jonsson This file provides functions common to all parts in the link layer. See README for more details on supported mobile phones. */ #ifndef _gnokii_links_utils_h #define _gnokii_links_utils_h #include "gnokii.h" /* Needs to be a multiplication of 64 */ #define BUFFER_SIZE 256 gn_error link_terminate(struct gn_statemachine *state); void at_dprintf(char *prefix, char *buf, int len); #endif gnokii-0.6.31/include/links/atbus.h0000644000175000017500000000357411666163120015246 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings, Pavel Janik Copyright (C) 2001 Manfred Jonsson Copyright (C) 2002 Ladis Michl */ #ifndef _gnokii_atbus_h #define _gnokii_atbus_h #include "gnokii.h" gn_error atbus_initialise(int mode, struct gn_statemachine *state); /* * Define some result/error codes internal to the AT command functions. * Also define a code for an unterminated message. */ typedef enum { GN_AT_NONE, /* NO or unknown result code */ GN_AT_PROMPT, /* SMS command waiting for input */ GN_AT_OK, /* Command succeded */ GN_AT_ERROR, /* Command failed */ GN_AT_CMS, /* SMS Command failed */ GN_AT_CME, /* Extended error code found */ } at_result; #define RBUF_SEG 1024 typedef struct { /* The buffer for phone responses not only holds the data from the * phone but also a byte which holds the compiled status of the * response. it is placed at [0]. */ char *rbuf; int rbuf_size; int rbuf_pos; int binlen; } atbus_instance; #define AT_BUSINST(s) (*((atbus_instance **)(&(s)->link.link_instance))) #endif /* #ifndef _gnokii_atbus_h */ gnokii-0.6.31/include/links/cbus.h0000644000175000017500000000343111666163120015054 0ustar leoleo/* -*- linux-c -*- $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings, Pavel Janik Copyright (C) 2001 Pavel Machek Copyright (C) 2001-2003 Ladislav Michl Copyrught (C) 2002 Pawel Kot */ #ifndef _gnokii_links_cbus_h #define _gnokii_links_cbus_h #define CBUS_MAX_FRAME_LENGTH 256 #define CBUS_MAX_MSG_LENGTH 256 typedef enum { CBUS_RX_Header, CBUS_RX_FrameType1, CBUS_RX_FrameType2, CBUS_RX_LengthLB, CBUS_RX_LengthHB, CBUS_RX_Message, CBUS_RX_CSum, CBUS_RX_Ack } cbus_rx_state; typedef struct { cbus_rx_state state; int msg_len; int msg_pos; unsigned char prev_rx_byte; unsigned char frame_header1; unsigned char frame_header2; unsigned char frame_type1; unsigned char frame_type2; unsigned char unique; unsigned char csum; unsigned char msg[CBUS_MAX_MSG_LENGTH]; } cbus_instance; #define CBUSINST(s) (*((cbus_instance **)(&(s)->link.link_instance))) gn_error cbus_initialise(struct gn_statemachine *state); #endif /* #ifndef _gnokii_links_cbus_h */ gnokii-0.6.31/include/links/fbus-common.h0000644000175000017500000000317511666163120016352 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings, Pavel Janik Copyright (C) 2002-2003 Pawe³ Kot Copyright (C) 2002 Ladis Michl Copyright (C) 2004 BORBELY Zoltan This file provides an API for accessing functions via fbus over irda. See README for more details on supported mobile phones. */ #ifndef _gnokii_links_fbus_common_h #define _gnokii_links_fbus_common_h #include "gnokii.h" /* Nokia mobile phone. */ #define FBUS_DEVICE_PHONE 0x00 /* Our PC. */ #define FBUS_DEVICE_PC 0x0c /* States for receive code. */ enum fbus_rx_state { FBUS_RX_Sync, FBUS_RX_Discarding, FBUS_RX_GetDestination, FBUS_RX_GetSource, FBUS_RX_GetType, FBUS_RX_GetLength1, FBUS_RX_GetLength2, FBUS_RX_GetMessage, FBUS_RX_EchoSource, FBUS_RX_EchoType, FBUS_RX_EchoLength1, FBUS_RX_EchoLength2, FBUS_RX_EchoMessage }; #endif /* _gnokii_links_fbus_common_h */ gnokii-0.6.31/include/links/fbus.h0000644000175000017500000000533711666163120015066 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 2000 Chris Kemp Copyright (C) 2002 BORBELY Zoltan, Pawel Kot, Ladis Michl This file provides an API for accessing functions via fbus. See README for more details on supported mobile phones. The various routines are called FBUS_(whatever). */ #ifndef _gnokii_links_fbus_h #define _gnokii_links_fbus_h #include #ifdef WIN32 # include #endif #include "compat.h" #include "fbus-common.h" #include "gnokii.h" #define FBUS_FRAME_MAX_LENGTH 256 #define FBUS_MESSAGE_MAX_TYPES 256 #define FBUS_TRANSMIT_MAX_LENGTH 256 #define FBUS_CONTENT_MAX_LENGTH 120 /* This byte is at the beginning of all GSM Frames sent over FBUS to Nokia phones. This may have to become a phone dependant parameter... */ #define FBUS_FRAME_ID 0x1e /* This byte is at the beginning of all GSM Frames sent over IR to Nokia phones. */ #define FBUS_IR_FRAME_ID 0x1c /* Every (well, almost every) frame from the computer starts with this sequence. */ #define FBUS_FRAME_HEADER 0x00, 0x01, 0x00 typedef struct { int checksum[2]; int buffer_count; struct timeval time_now; struct timeval time_last; enum fbus_rx_state state; int message_source; int message_destination; int message_type; int frame_length; u8 message_buffer[FBUS_FRAME_MAX_LENGTH]; } fbus_incoming_frame; typedef struct { int message_length; unsigned char *message_buffer; char frames_to_go; int malloced; } fbus_incoming_message; typedef struct { u16 message_length; u8 message_type; u8 *buffer; } fbus_outgoing_message; typedef struct { fbus_incoming_frame i; fbus_incoming_message messages[FBUS_MESSAGE_MAX_TYPES]; u8 request_sequence_number; u8 init_frame; } fbus_link; gn_error fbus_initialise(int attempt, struct gn_statemachine *state); int fbus_tx_send_frame(u8 message_length, u8 message_type, u8 *buffer, struct gn_statemachine *state); #endif /* #ifndef _gnokii_links_fbus_h */ gnokii-0.6.31/include/config.h.in0000644000175000017500000002427111666163207014665 0ustar leoleo/* include/config.h.in. Generated from configure.in by autoheader. */ /* Whether debug is turned on */ #undef DEBUG /* always defined to indicate that i18n is enabled */ #undef ENABLE_NLS /* Define to the Gettext package name */ #undef GETTEXT_PACKAGE /* Define to 1 if you have the `asprintf' function. */ #undef HAVE_ASPRINTF /* Define to 1 if you have the `bind_textdomain_codeset' function. */ #undef HAVE_BIND_TEXTDOMAIN_CODESET /* Whether Bluetooth is available */ #undef HAVE_BLUETOOTH /* Compile on Linux */ #undef HAVE_BLUETOOTH_BLUEZ /* Compile on Darwin / Mac OSX */ #undef HAVE_BLUETOOTH_MACOSX /* Compile on NetBSD */ #undef HAVE_BLUETOOTH_NETBT /* Compile on FreeBSD */ #undef HAVE_BLUETOOTH_NETGRAPH /* Whether snprintf is available */ #undef HAVE_C99_SNPRINTF /* Whether vsnprintf is available */ #undef HAVE_C99_VSNPRINTF /* Whether cfsetispeed is available */ #undef HAVE_CFSETISPEED /* Whether cfsetospeed is available */ #undef HAVE_CFSETOSPEED /* Whether cfsetspeed is available */ #undef HAVE_CFSETSPEED /* Define to 1 if you have the header file. */ #undef HAVE_COREFOUNDATION_COREFOUNDATION_H /* Define to 1 if you have the header file. */ #undef HAVE_CTYPE_H /* Define to 1 if you have the `dcgettext' function. */ #undef HAVE_DCGETTEXT /* Define to 1 if you have the header file. */ #undef HAVE_DIRECT_H /* Define to 1 if you have the header file. */ #undef HAVE_DIRENT_H /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the `getpass' function. */ #undef HAVE_GETPASS /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY /* Define to 1 if you have the header file. */ #undef HAVE_HISTORY_H /* Define if you have the iconv() function and it works. */ #undef HAVE_ICONV /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_IOBLUETOOTH_BLUETOOTH_H /* Define to 1 if you have the header file. */ #undef HAVE_IOBLUETOOTH_IOBLUETOOTHUSERLIB_H /* Whether IrDA is available */ #undef HAVE_IRDA /* Define if you have and nl_langinfo(CODESET). */ #undef HAVE_LANGINFO_CODESET /* Define if your file defines LC_MESSAGES. */ #undef HAVE_LC_MESSAGES /* Use libical */ #undef HAVE_LIBICAL /* Define to 1 if you have the `socket' library (-lsocket). */ #undef HAVE_LIBSOCKET /* Use libusb */ #undef HAVE_LIBUSB /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H /* Whether the platform has a long double type */ #undef HAVE_LONG_DOUBLE /* Whether the platform has a long long int type */ #undef HAVE_LONG_LONG /* Define to 1 if libpcsclite defines the type 'LPCSTR'. */ #undef HAVE_LPCSTR /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `mktime' function. */ #undef HAVE_MKTIME /* Whether struct msghdr has a msg_control member */ #undef HAVE_MSGHDR_MSG_CONTROL /* Define if you have libpcsclite */ #undef HAVE_PCSC /* Define to 1 if you have the `poll' function. */ #undef HAVE_POLL /* Define if you have POSIX threads libraries and header files. */ #undef HAVE_PTHREAD /* Whether __ptr_t is available */ #undef HAVE_PTR_T /* Use readline */ #undef HAVE_READLINE /* Define to 1 if you have the header file. */ #undef HAVE_READLINE_H /* Define to 1 if you have the header file. */ #undef HAVE_READLINE_HISTORY_H /* Define to 1 if you have the header file. */ #undef HAVE_READLINE_READLINE_H /* Define to 1 if you have the `select' function. */ #undef HAVE_SELECT /* Define to 1 if you have the `setenv' function. */ #undef HAVE_SETENV /* Define to 1 if you have the `snprintf' function. */ #undef HAVE_SNPRINTF /* Whether Phonet is available */ #undef HAVE_SOCKETPHONET /* Define to 1 if you have the header file. */ #undef HAVE_STDARG_H /* Define to 1 if stdbool.h conforms to C99. */ #undef HAVE_STDBOOL_H /* Define to 1 if you have the header file. */ #undef HAVE_STDDEF_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strchr' function. */ #undef HAVE_STRCHR /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP /* Define to 1 if you have the `strftime' function. */ #undef HAVE_STRFTIME /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strndup' function. */ #undef HAVE_STRNDUP /* Define to 1 if you have the `strsep' function. */ #undef HAVE_STRSEP /* Define to 1 if you have the `strstr' function. */ #undef HAVE_STRSTR /* Define to 1 if you have the `strtok' function. */ #undef HAVE_STRTOK /* Define to 1 if you have the `strtol' function. */ #undef HAVE_STRTOL /* Define to 1 if you have the header file. */ #undef HAVE_SYS_FILE_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_FILIO_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_IOCTL_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_MODEM_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H /* Whether c_ispeed and c_ospeed are available */ #undef HAVE_TERMIOS_CSPEED /* Define to 1 if you have the header file. */ #undef HAVE_TERMIOS_H /* Define to 1 if you have the `timegm' function. */ #undef HAVE_TIMEGM /* Whether timer operations are available */ #undef HAVE_TIMEOPS /* Whether tm_gmtoff is available */ #undef HAVE_TM_GMTON /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if the system has the type 'u_int8_t'. */ #undef HAVE_U_INT8_T /* Define to 1 if you have the `vasprintf' function. */ #undef HAVE_VASPRINTF /* Define to 1 if you have the `vsnprintf' function. */ #undef HAVE_VSNPRINTF /* Define to 1 if you have the header file. */ #undef HAVE_WCHAR_H /* Define to 1 if you have the `wcrtomb' function. */ #undef HAVE_WCRTOMB /* Define to 1 if you have the header file. */ #undef HAVE_X11_XPM_H /* Define to 1 if the system has the type `_Bool'. */ #undef HAVE__BOOL /* Define as const if the declaration of iconv() needs const. */ #undef ICONV_CONST /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Define to 1 if your C compiler doesn't accept -c and -o together. */ #undef NO_MINUS_C_MINUS_O /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Root dir for gnokii, xgnokii and smsd */ #undef PREFIX /* Define to the necessary symbol if this constant uses a non-standard name on your system. */ #undef PTHREAD_CREATE_JOINABLE /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE /* Whether rlpdebug is turned on */ #undef RLP_DEBUG /* Where mgnokiidev gets installed */ #undef SBINDIR /* Whether security features are enabled */ #undef SECURITY /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* The current SMSD version */ #undef SVERSION /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Define to 1 if your declares `struct tm'. */ #undef TM_IN_SYS_TIME /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif /* Whether Unix98 support is available */ #undef USE_UNIX98PTYS /* The current version */ #undef VERSION /* Whether compiling on Windows */ #undef WIN32 /* Define if you cross compile Windows. */ #undef WIN32_CROSS /* Whether xdebug is turned on */ #undef XDEBUG /* Whether the Xpm library is available */ #undef XPM /* The current xgnokii version */ #undef XVERSION /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #undef YYTEXT_POINTER /* Define to 1 if on MINIX. */ #undef _MINIX /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ #undef _POSIX_1_SOURCE /* Define to 1 if you need to in order for `stat' and other things to work. */ #undef _POSIX_SOURCE /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif /* Define to `int' if does not define. */ #undef pid_t /* Define to `unsigned int' if does not define. */ #undef size_t gnokii-0.6.31/include/nokia-decoding.h0000644000175000017500000000210711666163120015652 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 2002 Markus Plail This file provides decoding functions specific to the newer Nokia 7110/6510 series. */ #ifndef _gnokii_nokia_decoding_h #define _gnokii_nokia_decoding_h #define GN_NOKIA_MEMORY_SPEEDDIALS 0x0e /* Speed dials */ #endif /* _gnokii_nokia_decoding_h */ gnokii-0.6.31/testsuite/0000755000175000017500000000000011666163467013252 5ustar leoleognokii-0.6.31/testsuite/Makefile.am0000644000175000017500000000160411666163120015271 0ustar leoleoSUBDIRS = data EXTRA_DIST = \ out.0.identify \ out.10.oplogo \ out.11.ringtone \ out.12.picture \ out.13.emspicture \ out.14.oplogo-xpm \ out.15.emspicture2 \ out.16.imelody \ out.17.picture2 \ out.18.emsanimation \ out.19.emspicture3 \ out.1.sms \ out.26.cimelody \ out.27.cimelody2 \ out.28.cemsanimation \ out.2.concatsms \ test.0.identify \ test.10.oplogo \ test.11.ringtone \ test.12.picture \ test.13.emspicture \ test.14.oplogo-xpm \ test.15.emspicture2 \ test.16.imelody \ test.17.picture2 \ test.18.emsanimation \ test.19.emspicture3 \ test.1.sms \ test.26.cimelody \ test.27.cimelody2 \ test.28.cemsanimation \ test.2.concatsms \ testit check: $(EXTRA_DIST) $(srcdir)/testit $(srcdir)/ $(top_builddir)/gnokii/gnokii noinst_PROGRAMS = dump-vcard dump_vcard_LDADD = $(top_builddir)/common/libgnokii.la dump_vcard_SOURCES = dump-vcard.c gnokii-0.6.31/testsuite/out.2.concatsms0000644000175000017500000000022611666163120016117 0ustar leoleoAT+CMGS=51 0051000A81800021436500F50026050003CE0201546869732069732062656767696E696E67206F6620746865206D657373616765 Send succeeded with reference 1! gnokii-0.6.31/testsuite/test.19.emspicture30000644000175000017500000000024011666163120016624 0ustar leoleo# # Send pacman to 0604343103 # echo Gnokii does not yet understand this syntax; test disabled #$GNOKII --sendsms 0604343103 -p ../Docs/sample/logo/pacman.xpm gnokii-0.6.31/testsuite/data/0000755000175000017500000000000011666163467014163 5ustar leoleognokii-0.6.31/testsuite/data/Makefile.am0000644000175000017500000000006611666163120016203 0ustar leoleoEXTRA_DIST = anim1.xpm anim2.xpm anim3.xpm anim4.xpm gnokii-0.6.31/testsuite/data/Makefile.in0000644000175000017500000003016411666163212016220 0ustar leoleo# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = testsuite/data DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_expand_dir.m4 \ $(top_srcdir)/m4/acx_pthread.m4 $(top_srcdir)/m4/intltool.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLUETOOTH_LIBS = @BLUETOOTH_LIBS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FIND = @FIND@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLDFLAGS = @GLDFLAGS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GMODULE_CFLAGS = @GMODULE_CFLAGS@ GMODULE_LIBS = @GMODULE_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GNOKII_LT_VERSION = @GNOKII_LT_VERSION@ GNOKII_LT_VERSION_AGE = @GNOKII_LT_VERSION_AGE@ GNOKII_LT_VERSION_CURRENT = @GNOKII_LT_VERSION_CURRENT@ GNOKII_LT_VERSION_REVISION = @GNOKII_LT_VERSION_REVISION@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_LIBICAL = @HAVE_LIBICAL@ HAVE_LIBUSB = @HAVE_LIBUSB@ HAVE_SOCKETPHONET = @HAVE_SOCKETPHONET@ HAVE_XGNOKII = @HAVE_XGNOKII@ ICAL_CFLAGS = @ICAL_CFLAGS@ ICAL_LIBS = @ICAL_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBGNOKII_VERSION_MAJOR = @LIBGNOKII_VERSION_MAJOR@ LIBGNOKII_VERSION_MINOR = @LIBGNOKII_VERSION_MINOR@ LIBGNOKII_VERSION_RELEASE = @LIBGNOKII_VERSION_RELEASE@ LIBGNOKII_VERSION_STRING = @LIBGNOKII_VERSION_STRING@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBPCSCLITE_CFLAGS = @LIBPCSCLITE_CFLAGS@ LIBPCSCLITE_LIBS = @LIBPCSCLITE_LIBS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKE = @MAKE@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ MYSQLCONFIG = @MYSQLCONFIG@ MYSQLCONFIG5 = @MYSQLCONFIG5@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_LIBS = @MYSQL_LIBS@ NEED_LOCALE_CHARSET = @NEED_LOCALE_CHARSET@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OWN_GETOPT = @OWN_GETOPT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PGCONFIG = @PGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSTGRES_CFLAGS = @POSTGRES_CFLAGS@ POSTGRES_LIBS = @POSTGRES_LIBS@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LIBS = @SQLITE3_LIBS@ SQLITE_CFLAGS = @SQLITE_CFLAGS@ SQLITE_LIBS = @SQLITE_LIBS@ STRIP = @STRIP@ TCP_LIBS = @TCP_LIBS@ TERMLDFLAGS = @TERMLDFLAGS@ TERMLIBS = @TERMLIBS@ USB_LIBS = @USB_LIBS@ USE_NLS = @USE_NLS@ USE_UNIX98PTYS = @USE_UNIX98PTYS@ VERSION = @VERSION@ WIN32 = @WIN32@ WIN32_CROSS = @WIN32_CROSS@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ XPACKAGE = @XPACKAGE@ XPM_CFLAGS = @XPM_CFLAGS@ XPM_LIBS = @XPM_LIBS@ XVERSION = @XVERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ acx_pthread_config = @acx_pthread_config@ 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@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = anim1.xpm anim2.xpm anim3.xpm anim4.xpm all: all-am .SUFFIXES: $(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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu testsuite/data/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu testsuite/data/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 $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gnokii-0.6.31/testsuite/data/anim2.xpm0000644000175000017500000000062411666163120015703 0ustar leoleo/* XPM */ static char * anim2_xpm[] = { "16 16 2 1", ". g #FFFFFF", "+ g #000000", "................", "..++............", "..+.++++........", ".+.+++..+.......", ".++..+..+.......", ".++..+..+.......", "..+++..+........", "..+....+........", "...+..++........", "....++..........", "................", "................", "................", "................", "................", "................"}; gnokii-0.6.31/testsuite/data/anim3.xpm0000644000175000017500000000062411666163120015704 0ustar leoleo/* XPM */ static char * anim3_xpm[] = { "16 16 2 1", ". g #FFFFFF", "+ g #000000", "................", "..++............", "..+.++++........", ".+.+++..+.......", ".++..+++++++....", ".++.++..+...+...", "..+++..+.....++.", "..++...+.......+", "..++..++.......+", "..+.++..........", "..+.............", ".+..............", ".+.............+", ".+.............+", ".+............+.", "..+..........+.."}; gnokii-0.6.31/testsuite/data/anim4.xpm0000644000175000017500000000062411666163120015705 0ustar leoleo/* XPM */ static char * anim4_xpm[] = { "16 16 2 1", ". g #000000", "+ g #FFFFFF", ".+++++.+++.+++..", ".+++++.+++.++..+", "..++++.++.++.+++", ".+..++.++.++.+++", ".+++.+.++.+.++++", "+.++..+++++.++++", "++..++.....+++..", "++++++....+.+.++", "....+......+++++", "++++++.....+++++", "++++.+.....+..++", "+++.++++++++++..", "+..+++.+.++.++++", ".+++..++.+...+++", "++++.++.++.++.++", "++..+++.++.+++.+"}; gnokii-0.6.31/testsuite/data/anim1.xpm0000644000175000017500000000062411666163120015702 0ustar leoleo/* XPM */ static char * anim1_xpm[] = { "16 16 2 1", ". g #FFFFFF", "+ g #000000", "................", "..++............", "..+.+...........", ".+..++..........", ".+...+..........", ".++..+..........", "...++...........", "................", "................", "................", "................", "................", "................", "................", "................", "................"}; gnokii-0.6.31/testsuite/Makefile.in0000644000175000017500000005533511666163212015316 0ustar leoleo# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ noinst_PROGRAMS = dump-vcard$(EXEEXT) subdir = testsuite DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_expand_dir.m4 \ $(top_srcdir)/m4/acx_pthread.m4 $(top_srcdir)/m4/intltool.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am_dump_vcard_OBJECTS = dump-vcard.$(OBJEXT) dump_vcard_OBJECTS = $(am_dump_vcard_OBJECTS) dump_vcard_DEPENDENCIES = $(top_builddir)/common/libgnokii.la DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(dump_vcard_SOURCES) DIST_SOURCES = $(dump_vcard_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLUETOOTH_LIBS = @BLUETOOTH_LIBS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FIND = @FIND@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLDFLAGS = @GLDFLAGS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GMODULE_CFLAGS = @GMODULE_CFLAGS@ GMODULE_LIBS = @GMODULE_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GNOKII_LT_VERSION = @GNOKII_LT_VERSION@ GNOKII_LT_VERSION_AGE = @GNOKII_LT_VERSION_AGE@ GNOKII_LT_VERSION_CURRENT = @GNOKII_LT_VERSION_CURRENT@ GNOKII_LT_VERSION_REVISION = @GNOKII_LT_VERSION_REVISION@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_LIBICAL = @HAVE_LIBICAL@ HAVE_LIBUSB = @HAVE_LIBUSB@ HAVE_SOCKETPHONET = @HAVE_SOCKETPHONET@ HAVE_XGNOKII = @HAVE_XGNOKII@ ICAL_CFLAGS = @ICAL_CFLAGS@ ICAL_LIBS = @ICAL_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBGNOKII_VERSION_MAJOR = @LIBGNOKII_VERSION_MAJOR@ LIBGNOKII_VERSION_MINOR = @LIBGNOKII_VERSION_MINOR@ LIBGNOKII_VERSION_RELEASE = @LIBGNOKII_VERSION_RELEASE@ LIBGNOKII_VERSION_STRING = @LIBGNOKII_VERSION_STRING@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBPCSCLITE_CFLAGS = @LIBPCSCLITE_CFLAGS@ LIBPCSCLITE_LIBS = @LIBPCSCLITE_LIBS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKE = @MAKE@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ MYSQLCONFIG = @MYSQLCONFIG@ MYSQLCONFIG5 = @MYSQLCONFIG5@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_LIBS = @MYSQL_LIBS@ NEED_LOCALE_CHARSET = @NEED_LOCALE_CHARSET@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OWN_GETOPT = @OWN_GETOPT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PGCONFIG = @PGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSTGRES_CFLAGS = @POSTGRES_CFLAGS@ POSTGRES_LIBS = @POSTGRES_LIBS@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LIBS = @SQLITE3_LIBS@ SQLITE_CFLAGS = @SQLITE_CFLAGS@ SQLITE_LIBS = @SQLITE_LIBS@ STRIP = @STRIP@ TCP_LIBS = @TCP_LIBS@ TERMLDFLAGS = @TERMLDFLAGS@ TERMLIBS = @TERMLIBS@ USB_LIBS = @USB_LIBS@ USE_NLS = @USE_NLS@ USE_UNIX98PTYS = @USE_UNIX98PTYS@ VERSION = @VERSION@ WIN32 = @WIN32@ WIN32_CROSS = @WIN32_CROSS@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ XPACKAGE = @XPACKAGE@ XPM_CFLAGS = @XPM_CFLAGS@ XPM_LIBS = @XPM_LIBS@ XVERSION = @XVERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ acx_pthread_config = @acx_pthread_config@ 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@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = data EXTRA_DIST = \ out.0.identify \ out.10.oplogo \ out.11.ringtone \ out.12.picture \ out.13.emspicture \ out.14.oplogo-xpm \ out.15.emspicture2 \ out.16.imelody \ out.17.picture2 \ out.18.emsanimation \ out.19.emspicture3 \ out.1.sms \ out.26.cimelody \ out.27.cimelody2 \ out.28.cemsanimation \ out.2.concatsms \ test.0.identify \ test.10.oplogo \ test.11.ringtone \ test.12.picture \ test.13.emspicture \ test.14.oplogo-xpm \ test.15.emspicture2 \ test.16.imelody \ test.17.picture2 \ test.18.emsanimation \ test.19.emspicture3 \ test.1.sms \ test.26.cimelody \ test.27.cimelody2 \ test.28.cemsanimation \ test.2.concatsms \ testit dump_vcard_LDADD = $(top_builddir)/common/libgnokii.la dump_vcard_SOURCES = dump-vcard.c all: all-recursive .SUFFIXES: .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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu testsuite/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu testsuite/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 $(am__aclocal_m4_deps): clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list dump-vcard$(EXEEXT): $(dump_vcard_OBJECTS) $(dump_vcard_DEPENDENCIES) @rm -f dump-vcard$(EXEEXT) $(LINK) $(dump_vcard_OBJECTS) $(dump_vcard_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dump-vcard.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @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 $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(PROGRAMS) installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-recursive clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ clean-noinstPROGRAMS ctags ctags-recursive 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-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am check: $(EXTRA_DIST) $(srcdir)/testit $(srcdir)/ $(top_builddir)/gnokii/gnokii # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gnokii-0.6.31/testsuite/out.16.imelody0000644000175000017500000000052311666163120015654 0ustar leoleoAT+CMGS=145 0051000A81604043133000F50084830C8100424547494E3A494D454C4F44590D0A56455253494F4E3A312E300D0A464F524D41543A434C415353312E300D0A4D454C4F44593A6134673465336533653364342A33623467336733613367346134623361346734653464342A3362336433643364336134673465336533653364342366340D0A454E443A494D454C4F44590D0A Send succeeded with reference 1! gnokii-0.6.31/testsuite/out.14.oplogo-xpm0000644000175000017500000000057211666163120016315 0ustar leoleoSending operator logo. AT+CMGS=153 0051000A81800021436500F5008C0605041582000002F31000480E010000F800000061B0000001FC00000061B0000001AC0000006000000000F80E3E1C6DB0000001741F3F366DB00000032631B36379B00000030631B3637DB0000006073FB3366DB0000006071FB31C65B000000607018000000000000E0F018000000000001F0F8F8000000000001F1F078000000000000FFE000000000000 Send succeeded with reference 1! gnokii-0.6.31/testsuite/out.1.sms0000644000175000017500000000037311666163120014731 0ustar leoleoAT+CMGS=101 0011000A8180002143650000006454747A0E4ACF41F377BB0CA2BFE961363B0FAABBD36DF85B4E0FBBE9207A794E07B5CBF379F85C76819220F2DB7DA283D8E9751934D697C76810BDCC2E8FDF6DD0FC0D4A9EDAA079D94D4EBBCFA0341D447F83E8E872DB05 Send succeeded with reference 1! gnokii-0.6.31/testsuite/test.27.cimelody20000644000175000017500000000020511666163120016250 0ustar leoleo# Testing concat imelody sending via SMS cat ../Docs/sample/ringtone/star.imelody | $GNOKII --sendsms 0604343103 -i --concat "1;2;3" gnokii-0.6.31/testsuite/out.17.picture20000644000175000017500000000163211666163120015752 0ustar leoleoSending Multipart Message: Picture Message. AT+CMGS=153 0051000A81604043133000F5008C0B0504158A00000003CE03013002010000481C010000001400000000000000002A0000000000000001FF000000000000000215800000000000000400C00000000000000406C0000000000000031D8000000000000001F300000000000000001300000000000000000A00000000000000000A00000000000000000A3C000000000000000A4600000000000000 AT+CMGS=153 0051000A81604043133000F5008C0B0504158A00000003CE03020A83000000000000000B01800000000000000B01800000000000000B00C20000000000000980C30000000000000980C300000000000008C063800000000000084065800000000000100039800000000000100001800000000000788623000000000000A4892300000000000141D07600000000000147F1FC000000000000FFCF AT+CMGS=93 0051000A81604043133000F500500B0504158A00000003CE0303F000000000003D41686F6A6B793B206A65737465206A6564656E20696E7665727A6E692062726F6E746F736175722E2E2E202D2D706176656C2030363034333433313033 Send succeeded with reference 1! gnokii-0.6.31/testsuite/test.0.identify0000644000175000017500000000013111666163120016101 0ustar leoleo# This is really no good test at all, but we want to know binary works $GNOKII --identifygnokii-0.6.31/testsuite/out.19.emspicture30000644000175000017500000000052311666163120016460 0ustar leoleoAT+CMGS=145 0051000A81604043133000F5008483128100090E07800000000001F0001FE00000000007FC003FF0000000000FFE007FF8000000000CCE007FC0000000000D5600FF00000000000EEE00FC06318C6318CFFE63FC06318C6318CFFE63FF00000000000FFE007FC0000000000EAE007FF8000000000D56003FF0000000000FFE001FE0000000000CE600078000000000084200 Send succeeded with reference 1! gnokii-0.6.31/testsuite/out.12.picture0000644000175000017500000000202011666163120015653 0ustar leoleoSending Multipart Message: Picture Message. Please enter SMS text. End your input with :Bitmap is not of right size?! (72 x 14) Sending sms #0 AT+CMGS=153 0051000A00604043133000F5008C0B0504158A00000003CE03013002010000481C010000F800000061B0000001FC00000061B0000001AC0000006000000000F80E3E1C6DB0000001741F3F366DB00000032631B36379B00000030631B3637DB0000006073FB3366DB0000006071FB31C65B000000607018000000000000E0F018000000000001F0F8F8000000000001F1F078000000000000FFE Sending sms #1 AT+CMGS=153 0051000A00604043133000F5008C0B0504158A00000003CE03020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 Sending sms #2 AT+CMGS=80 0051000A00604043133000F500430B0504158A00000003CE03030000000000003041686F6A2C20746F686C65206A65206D616C61207A7072617661206E6120746573746F76616E692074656C65666F6E75 Send succeeded with reference 1! gnokii-0.6.31/testsuite/test.2.concatsms0000644000175000017500000000012711666163120016267 0ustar leoleoecho "This is beggining of the message" | $GNOKII --sendsms 0800123456 --concat "1;2;2"gnokii-0.6.31/testsuite/out.11.ringtone0000644000175000017500000000035011666163120016030 0ustar leoleoAT+CMGS=92 0051000A81604043133000F5004F06050415810000024A3A514DD185C8040052D9149A61861541541541361841841A41861A61C41A61861561341341341341A61861541541541341061841841A41861A61C41A61861541341541540000 Send succeeded with reference 1! gnokii-0.6.31/testsuite/out.10.oplogo0000644000175000017500000000057211666163120015507 0ustar leoleoSending operator logo. AT+CMGS=153 0051000A81800021436500F5008C0605041582000002F31000480E010000F800000061B0000001FC00000061B0000001AC0000006000000000F80E3E1C6DB0000001741F3F366DB00000032631B36379B00000030631B3637DB0000006073FB3366DB0000006071FB31C65B000000607018000000000000E0F018000000000001F0F8F8000000000001F1F078000000000000FFE000000000000 Send succeeded with reference 1! gnokii-0.6.31/testsuite/test.13.emspicture0000644000175000017500000000021211666163120016532 0ustar leoleo# Send pacman to 0604343103 as EMS. Does anybody use it anymore? $GNOKII --sendlogo emspicture 0604343103 ../Docs/sample/logo/pacman.xpm gnokii-0.6.31/testsuite/out.0.identify0000644000175000017500000000051411666163120015736 0ustar leoleoApparently you didn't configure gnokii. Please do it prior to using it. You can get some clues from comments included in sample config file or give a try with gnokii-configure utility included in gnokii distribution. IMEI : Unknown Manufacturer : Unknown Model : Unknown Product name : Unknown Revision : Unknown gnokii-0.6.31/testsuite/test.15.emspicture20000644000175000017500000000020111666163120016614 0ustar leoleo# And we're testing EMS again. Now with xpm picture. $GNOKII --sendlogo emspicture +420604343103 ../Docs/sample/logo/horse2.xpm gnokii-0.6.31/testsuite/dump-vcard.c0000644000175000017500000000276011666163120015447 0ustar leoleo#include #include #include #include int main (int argc, char **argv) { FILE *f; gn_phonebook_entry entry; char *buf, *vcard; int is_stdin; if (argc < 2) return 1; if (strcmp (argv[1], "stdin") == 0) is_stdin = 1; else is_stdin = 0; /* Open the file */ if (!is_stdin) { f = fopen (argv[1], "r"); if (f == NULL) { perror ("Opening failed"); return 1; } } else { f = stdin; } /* Parse using gn_vcardstr2phonebook() */ memset (&entry, 0, sizeof(entry)); if (gn_vcard2phonebook (f, &entry) < 0) { fprintf (stderr, "Parsing '%s' failed\n", argv[1]); return 1; } if (!is_stdin) { /* Seek back to the beginning and read in memory */ if (fseek (f, 0, SEEK_SET) < 0) { perror ("Seeking back failed"); return 1; } /* XXX HACK */ buf = malloc (1024 * 1024); if (buf == NULL) { fprintf (stderr, "Couldn't allocate a meg of memory\n"); return 1; } if (fread (buf, 1024 * 1024, 1, f) < 0) { perror ("Failed to read"); free (buf); fclose (f); return 1; } fclose (f); /* Parse using gn_vcardstr2phonebook() */ memset (&entry, 0, sizeof(entry)); if (gn_vcardstr2phonebook (buf, &entry) < 0) { fprintf (stderr, "Parsing '%s' failed\n", argv[1]); return 1; } free (buf); } /* And now back */ vcard = gn_phonebook2vcardstr (&entry); if (vcard == NULL) { fprintf (stderr, "Failed to parse back '%s'\n", argv[1]); return 1; } printf ("%s\n", vcard); free (vcard); return 0; } gnokii-0.6.31/testsuite/test.10.oplogo0000644000175000017500000000021011666163120015644 0ustar leoleo# This test is to test sending an operator logo. Not really useful nowadays $GNOKII --sendlogo op 0800123456 ../Docs/gnokii.nol "203 01"gnokii-0.6.31/testsuite/test.11.ringtone0000644000175000017500000000020611666163120016200 0ustar leoleo# This tests sending ringtone via SMS. Not really useful nowadays $GNOKII --sendringtone ../Docs/sample/ringtone/star.rtttl 0604343103gnokii-0.6.31/testsuite/test.16.imelody0000644000175000017500000000015411666163120016024 0ustar leoleo# Testing imelody sending via SMS cat ../Docs/sample/ringtone/star.imelody | $GNOKII --sendsms 0604343103 -ignokii-0.6.31/testsuite/out.13.emspicture0000644000175000017500000000057211666163120016373 0ustar leoleoSending EMS-compliant Picture Message. AT+CMGS=145 0051000A81604043133000F5008483128100090E07800000000001F0001FE00000000007FC003FF0000000000FFE007FF8000000000CCE007FC0000000000D5600FF00000000000EEE00FC06318C6318CFFE63FC06318C6318CFFE63FF00000000000FFE007FC0000000000EAE007FF8000000000D56003FF0000000000FFE001FE0000000000CE600078000000000084200 Send succeeded with reference 1! gnokii-0.6.31/testsuite/out.18.emsanimation0000644000175000017500000000052311666163120016700 0ustar leoleoAT+CMGS=145 0051000A81604043133000F50084830E8100FFFFCFFFD7FFB3FFBBFF9BFFE7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCFFFD0FFA37F9B7F9B7FC6FFDEFFECFFF3FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCFFFD0FFA37F980F9377C6F9CEFECCFED3FFDFFFBFFFBFFEBFFEBFFDDFFB82238226C248B2488A504C1033E303D4F7E003E00BEC100362908CB809243122 Send succeeded with reference 1! gnokii-0.6.31/testsuite/test.1.sms0000644000175000017500000000025011666163120015073 0ustar leoleo# Testing regular SMS sending echo "This is some totally unimportant test message. I don't like czech telecom so I'm sending it to them." | $GNOKII --sendsms 0800123456gnokii-0.6.31/testsuite/out.28.cemsanimation0000644000175000017500000000061111666163120017042 0ustar leoleoAdding concat header Encoding concat header AT+CMGS=150 0051000A81604043133000F50089880E8100FFFFCFFFD7FFB3FFBBFF9BFFE7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCFFFD0FFA37F9B7F9B7FC6FFDEFFECFFF3FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCFFFD0FFA37F980F9377C6F9CEFECCFED3FFDFFFBFFFBFFEBFFEBFFDDFFB82238226C248B2488A504C1033E303D4F7E003E00BEC100362908CB8092431220003CE0202 Send succeeded with reference 1! gnokii-0.6.31/testsuite/test.18.emsanimation0000644000175000017500000000021211666163120017043 0ustar leoleo# Send EMS animations echo "Test" | $GNOKII --sendsms 0604343103 --animation "data/anim1.xpm;data/anim2.xpm;data/anim3.xpm;data/anim4.xpm"gnokii-0.6.31/testsuite/test.14.oplogo-xpm0000644000175000017500000000022511666163120016460 0ustar leoleo# This is again operator logo. But this time we convert it from xpm format $GNOKII --sendlogo op 0800123456 ../Docs/sample/logo/gnokiiop.xpm "203 01"gnokii-0.6.31/testsuite/out.15.emspicture20000644000175000017500000000060011666163120016447 0ustar leoleoSending EMS-compliant Picture Message. AT+CMGS=148 0051000C9124604043133000F50086851283000420000000000002C0000005A0000005A000001FF800003F1C00007C020000D0018000E0008000640440018A062003040430060000180400001C1800181E1448700A174FC00B0EF848010480480403006800000060000300000004800030148000403FF0038027DE0C001E4718000AC0E000178000001E0000000000000000000000 Send succeeded with reference 1! gnokii-0.6.31/testsuite/test.17.picture20000644000175000017500000000025111666163120016116 0ustar leoleo# Try to send a picture SMS. echo "Ahojky; jeste jeden inverzni brontosaur... --pavel 0604343103" | $GNOKII --sendlogo picture 0604343103 ../Docs/sample/logo/bronto.xpm gnokii-0.6.31/testsuite/out.27.cimelody20000644000175000017500000000053511666163120016106 0ustar leoleoAT+CMGS=150 0051000A81604043133000F50089880003CE02010C8100424547494E3A494D454C4F44590D0A56455253494F4E3A312E300D0A464F524D41543A434C415353312E300D0A4D454C4F44593A6134673465336533653364342A33623467336733613367346134623361346734653464342A3362336433643364336134673465336533653364342366340D0A454E443A494D454C4F44590D0A Send succeeded with reference 1! gnokii-0.6.31/testsuite/out.26.cimelody0000644000175000017500000000053511666163120016023 0ustar leoleoAT+CMGS=150 0051000A81604043133000F50089880003CE02010C8100424547494E3A494D454C4F44590D0A56455253494F4E3A312E300D0A464F524D41543A434C415353312E300D0A4D454C4F44593A6134673465336533653364342A33623467336733613367346134623361346734653464342A3362336433643364336134673465336533653364342366340D0A454E443A494D454C4F44590D0A Send succeeded with reference 1! gnokii-0.6.31/testsuite/test.12.picture0000644000175000017500000000045011666163120016030 0ustar leoleo# This tests sending a picture message which is some kind of Nokia specific. # Well, this test is actually wrong. gnokiiop.xpm is too small to act as picture message. echo "Ahoj, tohle je mala zprava na testovani telefonu" | $GNOKII --sendlogo picture 0604343103 ../Docs/sample/logo/gnokiiop.xpm gnokii-0.6.31/testsuite/testit0000755000175000017500000000225111666163120014476 0ustar leoleo#!/bin/bash if [ $# -eq 2 ] ; then export TESTDIR=$1 export GNOKII=$2 elif [ $# -eq 0 ] ; then export TESTDIR=`pwd` export GNOKII="../gnokii/gnokii --config $TESTDIR/.gnokiirc" else echo "*** Usage: ./testit [Path to test files] [gnokii command] ***" exit 1 fi # Backup LC_MESSAGES value LC_MES_TMP=$LC_MESSAGES export LC_MESSAGES=C RETVAL=0 cd $TESTDIR # For now ignore the tests that are known to fail: # - test.2.concatsms # - test.17.picture2 # - test.26.cimelody # - test.27.cimelody2 for A in test.0.identify \ test.1.sms test.29.sendsms test.30.emptysms test.3.ucs2sms test.8.send161sms\ test.33.send140sms8bit test.34.send141sms8bit \ test.10.oplogo test.14.oplogo-xpm \ test.11.ringtone \ test.13.emspicture test.15.emspicture2 test.18.emsanimation \ test.16.imelody \ test.40.getsms test.41.getsms test.42.getsms test.43.getsms; do echo -n "Doing $A... " B=`echo $A | sed s/test/out/` source $A 2>&1 | grep -v ^GNOKII | grep -v '^Doing operation' > my$B if cmp my$B $B > /dev/null 2>&1; then echo ok else echo '*** FAILED' diff -u $B my$B RETVAL=1 fi done # Restore LC_MESSAGES value export LC_MESSAGES=$LC_MES_TMP exit $RETVAL gnokii-0.6.31/testsuite/test.28.cemsanimation0000644000175000017500000000026711666163120017221 0ustar leoleoecho Gnokii does not yet understand this syntax; test disabled #$GNOKII --sendsms 0604343103 --animation "data/anim1.xpm;data/anim2.xpm;data/anim3.xpm;data/anim4.xpm" --concat "2;2;3"gnokii-0.6.31/testsuite/test.26.cimelody0000644000175000017500000000021311666163120016164 0ustar leoleo# Testing concatenated imelody sending via SMS cat ../Docs/sample/ringtone/star.imelody | $GNOKII --sendsms 0604343103 --concat "1;2;3" -i gnokii-0.6.31/getopt/0000755000175000017500000000000011666163467012523 5ustar leoleognokii-0.6.31/getopt/Makefile.am0000644000175000017500000000030311666163120014535 0ustar leoleoEXTRA_DIST = getopt1.c getopt.c getopt.h getopt_int.h noinst_LIBRARIES = libgetopt.a libgetopt_a_SOURCES = getopt1.c getopt.c getopt.h getopt_int.h libgetopt_a_CFLAGS = -I$(top_srcdir)/include gnokii-0.6.31/getopt/Makefile.in0000644000175000017500000005006111666163211014555 0ustar leoleo# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = getopt DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_expand_dir.m4 \ $(top_srcdir)/m4/acx_pthread.m4 $(top_srcdir)/m4/intltool.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru libgetopt_a_AR = $(AR) $(ARFLAGS) libgetopt_a_LIBADD = am_libgetopt_a_OBJECTS = libgetopt_a-getopt1.$(OBJEXT) \ libgetopt_a-getopt.$(OBJEXT) libgetopt_a_OBJECTS = $(am_libgetopt_a_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libgetopt_a_SOURCES) DIST_SOURCES = $(libgetopt_a_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLUETOOTH_LIBS = @BLUETOOTH_LIBS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FIND = @FIND@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLDFLAGS = @GLDFLAGS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GMODULE_CFLAGS = @GMODULE_CFLAGS@ GMODULE_LIBS = @GMODULE_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GNOKII_LT_VERSION = @GNOKII_LT_VERSION@ GNOKII_LT_VERSION_AGE = @GNOKII_LT_VERSION_AGE@ GNOKII_LT_VERSION_CURRENT = @GNOKII_LT_VERSION_CURRENT@ GNOKII_LT_VERSION_REVISION = @GNOKII_LT_VERSION_REVISION@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_LIBICAL = @HAVE_LIBICAL@ HAVE_LIBUSB = @HAVE_LIBUSB@ HAVE_SOCKETPHONET = @HAVE_SOCKETPHONET@ HAVE_XGNOKII = @HAVE_XGNOKII@ ICAL_CFLAGS = @ICAL_CFLAGS@ ICAL_LIBS = @ICAL_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBGNOKII_VERSION_MAJOR = @LIBGNOKII_VERSION_MAJOR@ LIBGNOKII_VERSION_MINOR = @LIBGNOKII_VERSION_MINOR@ LIBGNOKII_VERSION_RELEASE = @LIBGNOKII_VERSION_RELEASE@ LIBGNOKII_VERSION_STRING = @LIBGNOKII_VERSION_STRING@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBPCSCLITE_CFLAGS = @LIBPCSCLITE_CFLAGS@ LIBPCSCLITE_LIBS = @LIBPCSCLITE_LIBS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKE = @MAKE@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ MYSQLCONFIG = @MYSQLCONFIG@ MYSQLCONFIG5 = @MYSQLCONFIG5@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_LIBS = @MYSQL_LIBS@ NEED_LOCALE_CHARSET = @NEED_LOCALE_CHARSET@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OWN_GETOPT = @OWN_GETOPT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PGCONFIG = @PGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSTGRES_CFLAGS = @POSTGRES_CFLAGS@ POSTGRES_LIBS = @POSTGRES_LIBS@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LIBS = @SQLITE3_LIBS@ SQLITE_CFLAGS = @SQLITE_CFLAGS@ SQLITE_LIBS = @SQLITE_LIBS@ STRIP = @STRIP@ TCP_LIBS = @TCP_LIBS@ TERMLDFLAGS = @TERMLDFLAGS@ TERMLIBS = @TERMLIBS@ USB_LIBS = @USB_LIBS@ USE_NLS = @USE_NLS@ USE_UNIX98PTYS = @USE_UNIX98PTYS@ VERSION = @VERSION@ WIN32 = @WIN32@ WIN32_CROSS = @WIN32_CROSS@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ XPACKAGE = @XPACKAGE@ XPM_CFLAGS = @XPM_CFLAGS@ XPM_LIBS = @XPM_LIBS@ XVERSION = @XVERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ acx_pthread_config = @acx_pthread_config@ 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@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = getopt1.c getopt.c getopt.h getopt_int.h noinst_LIBRARIES = libgetopt.a libgetopt_a_SOURCES = getopt1.c getopt.c getopt.h getopt_int.h libgetopt_a_CFLAGS = -I$(top_srcdir)/include all: all-am .SUFFIXES: .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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu getopt/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu getopt/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 $(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libgetopt.a: $(libgetopt_a_OBJECTS) $(libgetopt_a_DEPENDENCIES) -rm -f libgetopt.a $(libgetopt_a_AR) libgetopt.a $(libgetopt_a_OBJECTS) $(libgetopt_a_LIBADD) $(RANLIB) libgetopt.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgetopt_a-getopt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgetopt_a-getopt1.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @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 $@ $< libgetopt_a-getopt1.o: getopt1.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgetopt_a_CFLAGS) $(CFLAGS) -MT libgetopt_a-getopt1.o -MD -MP -MF $(DEPDIR)/libgetopt_a-getopt1.Tpo -c -o libgetopt_a-getopt1.o `test -f 'getopt1.c' || echo '$(srcdir)/'`getopt1.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libgetopt_a-getopt1.Tpo $(DEPDIR)/libgetopt_a-getopt1.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getopt1.c' object='libgetopt_a-getopt1.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgetopt_a_CFLAGS) $(CFLAGS) -c -o libgetopt_a-getopt1.o `test -f 'getopt1.c' || echo '$(srcdir)/'`getopt1.c libgetopt_a-getopt1.obj: getopt1.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgetopt_a_CFLAGS) $(CFLAGS) -MT libgetopt_a-getopt1.obj -MD -MP -MF $(DEPDIR)/libgetopt_a-getopt1.Tpo -c -o libgetopt_a-getopt1.obj `if test -f 'getopt1.c'; then $(CYGPATH_W) 'getopt1.c'; else $(CYGPATH_W) '$(srcdir)/getopt1.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libgetopt_a-getopt1.Tpo $(DEPDIR)/libgetopt_a-getopt1.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getopt1.c' object='libgetopt_a-getopt1.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgetopt_a_CFLAGS) $(CFLAGS) -c -o libgetopt_a-getopt1.obj `if test -f 'getopt1.c'; then $(CYGPATH_W) 'getopt1.c'; else $(CYGPATH_W) '$(srcdir)/getopt1.c'; fi` libgetopt_a-getopt.o: getopt.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgetopt_a_CFLAGS) $(CFLAGS) -MT libgetopt_a-getopt.o -MD -MP -MF $(DEPDIR)/libgetopt_a-getopt.Tpo -c -o libgetopt_a-getopt.o `test -f 'getopt.c' || echo '$(srcdir)/'`getopt.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libgetopt_a-getopt.Tpo $(DEPDIR)/libgetopt_a-getopt.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getopt.c' object='libgetopt_a-getopt.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgetopt_a_CFLAGS) $(CFLAGS) -c -o libgetopt_a-getopt.o `test -f 'getopt.c' || echo '$(srcdir)/'`getopt.c libgetopt_a-getopt.obj: getopt.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgetopt_a_CFLAGS) $(CFLAGS) -MT libgetopt_a-getopt.obj -MD -MP -MF $(DEPDIR)/libgetopt_a-getopt.Tpo -c -o libgetopt_a-getopt.obj `if test -f 'getopt.c'; then $(CYGPATH_W) 'getopt.c'; else $(CYGPATH_W) '$(srcdir)/getopt.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libgetopt_a-getopt.Tpo $(DEPDIR)/libgetopt_a-getopt.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getopt.c' object='libgetopt_a-getopt.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgetopt_a_CFLAGS) $(CFLAGS) -c -o libgetopt_a-getopt.obj `if test -f 'getopt.c'; then $(CYGPATH_W) 'getopt.c'; else $(CYGPATH_W) '$(srcdir)/getopt.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-libtool clean-noinstLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: 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-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLIBRARIES 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-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gnokii-0.6.31/getopt/getopt.h0000644000175000017500000001512411666163120014163 0ustar leoleo/* Declarations for getopt. Copyright (C) 1989-1994,1996-1999,2001,2003,2004,2009 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library 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. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #ifndef _GETOPT_H #ifndef __need_getopt # define _GETOPT_H 1 #endif /* If __GNU_LIBRARY__ is not already defined, either we are being used standalone, or this is the first header included in the source file. If we are being used with glibc, we need to include , but that does not exist if we are standalone. So: if __GNU_LIBRARY__ is not defined, include , which will pull in for us if it's from glibc. (Why ctype.h? It's guaranteed to exist and it doesn't flood the namespace with stuff the way some other headers do.) */ #if !defined __GNU_LIBRARY__ # include #endif #ifndef __THROW # ifndef __GNUC_PREREQ # define __GNUC_PREREQ(maj, min) (0) # endif # if defined __cplusplus && __GNUC_PREREQ (2,8) # define __THROW throw () # else # define __THROW # endif #endif #ifdef __cplusplus extern "C" { #endif /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ extern char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ extern int optind; /* Callers store zero here to inhibit the error message `getopt' prints for unrecognized options. */ extern int opterr; /* Set to an option character which was unrecognized. */ extern int optopt; #ifndef __need_getopt /* Describe the long-named options requested by the application. The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector of `struct option' terminated by an element containing a name which is zero. The field `has_arg' is: no_argument (or 0) if the option does not take an argument, required_argument (or 1) if the option requires an argument, optional_argument (or 2) if the option takes an optional argument. If the field `flag' is not NULL, it points to a variable that is set to the value given in the field `val' when the option is found, but left unchanged if the option is not found. To have a long-named option do something other than set an `int' to a compiled-in constant, such as set a value from `optarg', set the option's `flag' field to zero and its `val' field to a nonzero value (the equivalent single-letter option character, if there is one). For long options that have a zero `flag' field, `getopt' returns the contents of the `val' field. */ struct option { const char *name; /* has_arg can't be an enum because some compilers complain about type mismatches in all the code that assumes it is an int. */ int has_arg; int *flag; int val; }; /* Names for the values of the `has_arg' field of `struct option'. */ # define no_argument 0 # define required_argument 1 # define optional_argument 2 #endif /* need getopt */ /* Get definitions and prototypes for functions to process the arguments in ARGV (ARGC of them, minus the program name) for options given in OPTS. Return the option character from OPTS just read. Return -1 when there are no more options. For unrecognized options, or options missing arguments, `optopt' is set to the option letter, and '?' is returned. The OPTS string is a list of characters which are recognized option letters, optionally followed by colons, specifying that that letter takes an argument, to be placed in `optarg'. If a letter in OPTS is followed by two colons, its argument is optional. This behavior is specific to the GNU `getopt'. The argument `--' causes premature termination of argument scanning, explicitly telling `getopt' that there are no more options. If OPTS begins with `--', then non-option arguments are treated as arguments to the option '\0'. This behavior is specific to the GNU `getopt'. */ #ifdef __GNU_LIBRARY__ /* Many other libraries have conflicting prototypes for getopt, with differences in the consts, in stdlib.h. To avoid compilation errors, only prototype getopt for the GNU C library. */ extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) __THROW; # if defined __need_getopt && defined __USE_POSIX2 \ && !defined __USE_POSIX_IMPLICITLY && !defined __USE_GNU /* The GNU getopt has more functionality than the standard version. The additional functionality can be disable at runtime. This redirection helps to also do this at runtime. */ # ifdef __REDIRECT extern int __REDIRECT (getopt, (int ___argc, char *const *___argv, const char *__shortopts), __posix_getopt) __THROW; # else extern int __posix_getopt (int ___argc, char *const *___argv, const char *__shortopts) __THROW; # define getopt __posix_getopt # endif # endif #else /* not __GNU_LIBRARY__ */ extern int getopt (); #endif /* __GNU_LIBRARY__ */ #ifndef __need_getopt extern int getopt_long (int ___argc, char *const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind) __THROW; extern int getopt_long_only (int ___argc, char *const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind) __THROW; #endif #ifdef __cplusplus } #endif /* Make sure we later can get all the definitions and declarations. */ #undef __need_getopt #endif /* getopt.h */ gnokii-0.6.31/getopt/getopt_int.h0000644000175000017500000001132711666163120015036 0ustar leoleo/* Internal declarations for getopt. Copyright (C) 1989-1994,1996-1999,2001,2003,2004,2009 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library 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. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #ifndef _GETOPT_INT_H #define _GETOPT_INT_H 1 extern int _getopt_internal (int ___argc, char *const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind, int __long_only, int posixly_correct); /* Reentrant versions which can handle parsing multiple argument vectors at the same time. */ /* Data type for reentrant functions. */ struct _getopt_data { /* These have exactly the same meaning as the corresponding global variables, except that they are used for the reentrant versions of getopt. */ int optind; int opterr; int optopt; char *optarg; /* Internal members. */ /* True if the internal members have been initialized. */ int __initialized; /* The next char to be scanned in the option-element in which the last option character we returned was found. This allows us to pick up the scan where we left off. If this is zero, or a null string, it means resume the scan by advancing to the next ARGV-element. */ char *__nextchar; /* Describe how to deal with options that follow non-option ARGV-elements. If the caller did not specify anything, the default is REQUIRE_ORDER if the environment variable POSIXLY_CORRECT is defined, PERMUTE otherwise. REQUIRE_ORDER means don't recognize them as options; stop option processing when the first non-option is seen. This is what Unix does. This mode of operation is selected by either setting the environment variable POSIXLY_CORRECT, or using `+' as the first character of the list of option characters. PERMUTE is the default. We permute the contents of ARGV as we scan, so that eventually all the non-options are at the end. This allows options to be given in any order, even with programs that were not written to expect this. RETURN_IN_ORDER is an option available to programs that were written to expect options and other ARGV-elements in any order and that care about the ordering of the two. We describe each non-option ARGV-element as if it were the argument of an option with character code 1. Using `-' as the first character of the list of option characters selects this mode of operation. The special argument `--' forces an end of option-scanning regardless of the value of `ordering'. In the case of RETURN_IN_ORDER, only `--' can cause `getopt' to return -1 with `optind' != ARGC. */ enum { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER } __ordering; /* If the POSIXLY_CORRECT environment variable is set. */ int __posixly_correct; /* Handle permutation of arguments. */ /* Describe the part of ARGV that contains non-options that have been skipped. `first_nonopt' is the index in ARGV of the first of them; `last_nonopt' is the index after the last of them. */ int __first_nonopt; int __last_nonopt; #if defined _LIBC && defined USE_NONOPTION_FLAGS int __nonoption_flags_max_len; int __nonoption_flags_len; # endif }; /* The initializer is necessary to set OPTIND and OPTERR to their default values and to clear the initialization flag. */ #define _GETOPT_DATA_INITIALIZER { 1, 1 } extern int _getopt_internal_r (int ___argc, char *const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind, int __long_only, struct _getopt_data *__data, int posixly_correct); extern int _getopt_long_r (int ___argc, char *const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind, struct _getopt_data *__data); extern int _getopt_long_only_r (int ___argc, char *const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind, struct _getopt_data *__data); #endif /* getopt_int.h */ gnokii-0.6.31/getopt/getopt.c0000644000175000017500000010052511666163120014156 0ustar leoleo/* Getopt for GNU. NOTE: getopt is part of the C library, so if you don't know what "Keep this file name-space clean" means, talk to drepper@gnu.org before changing it! Copyright (C) 1987-1996,1998-2004,2008,2009 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library 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. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ /* This tells Alpha OSF/1 not to define a getopt prototype in . Ditto for AIX 3.2 and . */ #ifndef _NO_PROTO # define _NO_PROTO #endif #ifdef HAVE_CONFIG_H # include #endif #include /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C Library, but also included in many other GNU distributions. Compiling and linking in this code is a waste when using the GNU C library (especially if it is a shared library). Rather than having every GNU program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ #define GETOPT_INTERFACE_VERSION 2 #if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2 # include # if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION # define ELIDE_CODE # endif #endif #ifndef ELIDE_CODE /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ /* Don't include stdlib.h for non-GNU C libraries because some of them contain conflicting prototypes for getopt. */ # include # include #endif /* GNU C library. */ #include #ifdef VMS # include #endif #include "compat.h" #if defined _LIBC && defined USE_IN_LIBIO # include #endif #ifndef attribute_hidden # define attribute_hidden #endif /* This version of `getopt' appears to the caller like standard Unix `getopt' but it behaves differently for the user, since it allows the user to intersperse the options with the other arguments. As `getopt' works, it permutes the elements of ARGV so that, when it is done, all the options precede everything else. Thus all application programs are extended to handle flexible argument order. Setting the environment variable POSIXLY_CORRECT disables permutation. Then the behavior is completely standard. GNU application programs can use a third alternative mode in which they can distinguish the relative order of options and other arguments. */ #include "getopt.h" #include "getopt_int.h" /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ /* 1003.2 says this must be 1 before any call. */ int optind = 1; /* Callers store zero here to inhibit the error message for unrecognized options. */ int opterr = 1; /* Set to an option character which was unrecognized. This must be initialized on some systems to avoid linking in the system's own getopt implementation. */ int optopt = '?'; /* Keep a global copy of all internal members of getopt_data. */ static struct _getopt_data getopt_data; #ifndef __GNU_LIBRARY__ /* Avoid depending on library functions or files whose names are inconsistent. */ #ifndef getenv extern char *getenv (); #endif #endif /* not __GNU_LIBRARY__ */ #ifdef _LIBC /* Stored original parameters. XXX This is no good solution. We should rather copy the args so that we can compare them later. But we must not use malloc(3). */ extern int __libc_argc; extern char **__libc_argv; /* Bash 2.0 gives us an environment variable containing flags indicating ARGV elements that should not be considered arguments. */ # ifdef USE_NONOPTION_FLAGS /* Defined in getopt_init.c */ extern char *__getopt_nonoption_flags; # endif # ifdef USE_NONOPTION_FLAGS # define SWAP_FLAGS(ch1, ch2) \ if (d->__nonoption_flags_len > 0) \ { \ char __tmp = __getopt_nonoption_flags[ch1]; \ __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \ __getopt_nonoption_flags[ch2] = __tmp; \ } # else # define SWAP_FLAGS(ch1, ch2) # endif #else /* !_LIBC */ # define SWAP_FLAGS(ch1, ch2) #endif /* _LIBC */ /* Exchange two adjacent subsequences of ARGV. One subsequence is elements [first_nonopt,last_nonopt) which contains all the non-options that have been skipped so far. The other is elements [last_nonopt,optind), which contains all the options processed since those non-options were skipped. `first_nonopt' and `last_nonopt' are relocated so that they describe the new indices of the non-options in ARGV after they are moved. */ static void exchange (char **argv, struct _getopt_data *d) { int bottom = d->__first_nonopt; int middle = d->__last_nonopt; int top = d->optind; char *tem; /* Exchange the shorter segment with the far end of the longer segment. That puts the shorter segment into the right place. It leaves the longer segment in the right place overall, but it consists of two parts that need to be swapped next. */ #if defined _LIBC && defined USE_NONOPTION_FLAGS /* First make sure the handling of the `__getopt_nonoption_flags' string can work normally. Our top argument must be in the range of the string. */ if (d->__nonoption_flags_len > 0 && top >= d->__nonoption_flags_max_len) { /* We must extend the array. The user plays games with us and presents new arguments. */ char *new_str = malloc (top + 1); if (new_str == NULL) d->__nonoption_flags_len = d->__nonoption_flags_max_len = 0; else { memset (__mempcpy (new_str, __getopt_nonoption_flags, d->__nonoption_flags_max_len), '\0', top + 1 - d->__nonoption_flags_max_len); d->__nonoption_flags_max_len = top + 1; __getopt_nonoption_flags = new_str; } } #endif while (top > middle && middle > bottom) { if (top - middle > middle - bottom) { /* Bottom segment is the short one. */ int len = middle - bottom; register int i; /* Swap it with the top part of the top segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[top - (middle - bottom) + i]; argv[top - (middle - bottom) + i] = tem; SWAP_FLAGS (bottom + i, top - (middle - bottom) + i); } /* Exclude the moved bottom segment from further swapping. */ top -= len; } else { /* Top segment is the short one. */ int len = top - middle; register int i; /* Swap it with the bottom part of the bottom segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[middle + i]; argv[middle + i] = tem; SWAP_FLAGS (bottom + i, middle + i); } /* Exclude the moved top segment from further swapping. */ bottom += len; } } /* Update records for the slots the non-options now occupy. */ d->__first_nonopt += (d->optind - d->__last_nonopt); d->__last_nonopt = d->optind; } /* Initialize the internal data when the first call is made. */ static const char * _getopt_initialize (int argc, char *const *argv, const char *optstring, struct _getopt_data *d, int posixly_correct) { /* Start processing options with ARGV-element 1 (since ARGV-element 0 is the program name); the sequence of previously skipped non-option ARGV-elements is empty. */ d->__first_nonopt = d->__last_nonopt = d->optind; d->__nextchar = NULL; d->__posixly_correct = posixly_correct | !!getenv ("POSIXLY_CORRECT"); /* Determine how to handle the ordering of options and nonoptions. */ if (optstring[0] == '-') { d->__ordering = RETURN_IN_ORDER; ++optstring; } else if (optstring[0] == '+') { d->__ordering = REQUIRE_ORDER; ++optstring; } else if (d->__posixly_correct) d->__ordering = REQUIRE_ORDER; else d->__ordering = PERMUTE; #if defined _LIBC && defined USE_NONOPTION_FLAGS if (!d->__posixly_correct && argc == __libc_argc && argv == __libc_argv) { if (d->__nonoption_flags_max_len == 0) { if (__getopt_nonoption_flags == NULL || __getopt_nonoption_flags[0] == '\0') d->__nonoption_flags_max_len = -1; else { const char *orig_str = __getopt_nonoption_flags; int len = d->__nonoption_flags_max_len = strlen (orig_str); if (d->__nonoption_flags_max_len < argc) d->__nonoption_flags_max_len = argc; __getopt_nonoption_flags = (char *) malloc (d->__nonoption_flags_max_len); if (__getopt_nonoption_flags == NULL) d->__nonoption_flags_max_len = -1; else memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), '\0', d->__nonoption_flags_max_len - len); } } d->__nonoption_flags_len = d->__nonoption_flags_max_len; } else d->__nonoption_flags_len = 0; #endif return optstring; } /* Scan elements of ARGV (whose length is ARGC) for option characters given in OPTSTRING. If an element of ARGV starts with '-', and is not exactly "-" or "--", then it is an option element. The characters of this element (aside from the initial '-') are option characters. If `getopt' is called repeatedly, it returns successively each of the option characters from each of the option elements. If `getopt' finds another option character, it returns that character, updating `optind' and `nextchar' so that the next call to `getopt' can resume the scan with the following option character or ARGV-element. If there are no more option characters, `getopt' returns -1. Then `optind' is the index in ARGV of the first ARGV-element that is not an option. (The ARGV-elements have been permuted so that those that are not options now come last.) OPTSTRING is a string containing the legitimate option characters. If an option character is seen that is not listed in OPTSTRING, return '?' after printing an error message. If you set `opterr' to zero, the error message is suppressed but we still return '?'. If a char in OPTSTRING is followed by a colon, that means it wants an arg, so the following text in the same ARGV-element, or the text of the following ARGV-element, is returned in `optarg'. Two colons mean an option that wants an optional arg; if there is text in the current ARGV-element, it is returned in `optarg', otherwise `optarg' is set to zero. If OPTSTRING starts with `-' or `+', it requests different methods of handling the non-option ARGV-elements. See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. Long-named options begin with `--' instead of `-'. Their names may be abbreviated as long as the abbreviation is unique or is an exact match for some defined option. If they have an argument, it follows the option name in the same ARGV-element, separated from the option name by a `=', or else the in next ARGV-element. When `getopt' finds a long-named option, it returns 0 if that option's `flag' field is nonzero, the value of the option's `val' field if the `flag' field is zero. The elements of ARGV aren't really const, because we permute them. But we pretend they're const in the prototype to be compatible with other systems. LONGOPTS is a vector of `struct option' terminated by an element containing a name which is zero. LONGIND returns the index in LONGOPT of the long-named option found. It is only valid when a long-named option has been found by the most recent call. If LONG_ONLY is nonzero, '-' as well as '--' can introduce long-named options. */ int _getopt_internal_r (int argc, char *const *argv, const char *optstring, const struct option *longopts, int *longind, int long_only, struct _getopt_data *d, int posixly_correct) { int print_errors = d->opterr; if (optstring[0] == ':') print_errors = 0; if (argc < 1) return -1; d->optarg = NULL; if (d->optind == 0 || !d->__initialized) { if (d->optind == 0) d->optind = 1; /* Don't scan ARGV[0], the program name. */ optstring = _getopt_initialize (argc, argv, optstring, d, posixly_correct); d->__initialized = 1; } /* Test whether ARGV[optind] points to a non-option argument. Either it does not have option syntax, or there is an environment flag from the shell indicating it is not an option. The later information is only used when the used in the GNU libc. */ #if defined _LIBC && defined USE_NONOPTION_FLAGS # define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0' \ || (d->optind < d->__nonoption_flags_len \ && __getopt_nonoption_flags[d->optind] == '1')) #else # define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0') #endif if (d->__nextchar == NULL || *d->__nextchar == '\0') { /* Advance to the next ARGV-element. */ /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been moved back by the user (who may also have changed the arguments). */ if (d->__last_nonopt > d->optind) d->__last_nonopt = d->optind; if (d->__first_nonopt > d->optind) d->__first_nonopt = d->optind; if (d->__ordering == PERMUTE) { /* If we have just processed some options following some non-options, exchange them so that the options come first. */ if (d->__first_nonopt != d->__last_nonopt && d->__last_nonopt != d->optind) exchange ((char **) argv, d); else if (d->__last_nonopt != d->optind) d->__first_nonopt = d->optind; /* Skip any additional non-options and extend the range of non-options previously skipped. */ while (d->optind < argc && NONOPTION_P) d->optind++; d->__last_nonopt = d->optind; } /* The special ARGV-element `--' means premature end of options. Skip it like a null option, then exchange with previous non-options as if it were an option, then skip everything else like a non-option. */ if (d->optind != argc && !strcmp (argv[d->optind], "--")) { d->optind++; if (d->__first_nonopt != d->__last_nonopt && d->__last_nonopt != d->optind) exchange ((char **) argv, d); else if (d->__first_nonopt == d->__last_nonopt) d->__first_nonopt = d->optind; d->__last_nonopt = argc; d->optind = argc; } /* If we have done all the ARGV-elements, stop the scan and back over any non-options that we skipped and permuted. */ if (d->optind == argc) { /* Set the next-arg-index to point at the non-options that we previously skipped, so the caller will digest them. */ if (d->__first_nonopt != d->__last_nonopt) d->optind = d->__first_nonopt; return -1; } /* If we have come to a non-option and did not permute it, either stop the scan or describe it to the caller and pass it by. */ if (NONOPTION_P) { if (d->__ordering == REQUIRE_ORDER) return -1; d->optarg = argv[d->optind++]; return 1; } /* We have found another option-ARGV-element. Skip the initial punctuation. */ d->__nextchar = (argv[d->optind] + 1 + (longopts != NULL && argv[d->optind][1] == '-')); } /* Decode the current option-ARGV-element. */ /* Check whether the ARGV-element is a long option. If long_only and the ARGV-element has the form "-f", where f is a valid short option, don't consider it an abbreviated form of a long option that starts with f. Otherwise there would be no way to give the -f short option. On the other hand, if there's a long option "fubar" and the ARGV-element is "-fu", do consider that an abbreviation of the long option, just like "--fu", and not "-f" with arg "u". This distinction seems to be the most useful approach. */ if (longopts != NULL && (argv[d->optind][1] == '-' || (long_only && (argv[d->optind][2] || !strchr (optstring, argv[d->optind][1]))))) { char *nameend; const struct option *p; const struct option *pfound = NULL; int exact = 0; int ambig = 0; int indfound = -1; int option_index; for (nameend = d->__nextchar; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar)) { if ((unsigned int) (nameend - d->__nextchar) == (unsigned int) strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else if (long_only || pfound->has_arg != p->has_arg || pfound->flag != p->flag || pfound->val != p->val) /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("%s: option '%s' is ambiguous\n"), argv[0], argv[d->optind]) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("%s: option '%s' is ambiguous\n"), argv[0], argv[d->optind]); #endif } d->__nextchar += strlen (d->__nextchar); d->optind++; d->optopt = 0; return '?'; } if (pfound != NULL) { option_index = indfound; d->optind++; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) d->optarg = nameend + 1; else { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; int n; #endif if (argv[d->optind - 1][1] == '-') { /* --option */ #if defined _LIBC && defined USE_IN_LIBIO n = __asprintf (&buf, _("\ %s: option '--%s' doesn't allow an argument\n"), argv[0], pfound->name); #else fprintf (stderr, _("\ %s: option '--%s' doesn't allow an argument\n"), argv[0], pfound->name); #endif } else { /* +option or -option */ #if defined _LIBC && defined USE_IN_LIBIO n = __asprintf (&buf, _("\ %s: option '%c%s' doesn't allow an argument\n"), argv[0], argv[d->optind - 1][0], pfound->name); #else fprintf (stderr, _("\ %s: option '%c%s' doesn't allow an argument\n"), argv[0], argv[d->optind - 1][0], pfound->name); #endif } #if defined _LIBC && defined USE_IN_LIBIO if (n >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #endif } d->__nextchar += strlen (d->__nextchar); d->optopt = pfound->val; return '?'; } } else if (pfound->has_arg == 1) { if (d->optind < argc) d->optarg = argv[d->optind++]; else { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("\ %s: option '%s' requires an argument\n"), argv[0], argv[d->optind - 1]) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("%s: option '%s' requires an argument\n"), argv[0], argv[d->optind - 1]); #endif } d->__nextchar += strlen (d->__nextchar); d->optopt = pfound->val; return optstring[0] == ':' ? ':' : '?'; } } d->__nextchar += strlen (d->__nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } /* Can't find it as a long option. If this is not getopt_long_only, or the option starts with '--' or is not a valid short option, then it's an error. Otherwise interpret it as a short option. */ if (!long_only || argv[d->optind][1] == '-' || strchr (optstring, *d->__nextchar) == NULL) { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; int n; #endif if (argv[d->optind][1] == '-') { /* --option */ #if defined _LIBC && defined USE_IN_LIBIO n = __asprintf (&buf, _("%s: unrecognized option '--%s'\n"), argv[0], d->__nextchar); #else fprintf (stderr, _("%s: unrecognized option '--%s'\n"), argv[0], d->__nextchar); #endif } else { /* +option or -option */ #if defined _LIBC && defined USE_IN_LIBIO n = __asprintf (&buf, _("%s: unrecognized option '%c%s'\n"), argv[0], argv[d->optind][0], d->__nextchar); #else fprintf (stderr, _("%s: unrecognized option '%c%s'\n"), argv[0], argv[d->optind][0], d->__nextchar); #endif } #if defined _LIBC && defined USE_IN_LIBIO if (n >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #endif } d->__nextchar = (char *) ""; d->optind++; d->optopt = 0; return '?'; } } /* Look at and handle the next short option-character. */ { char c = *d->__nextchar++; char *temp = strchr (optstring, c); /* Increment `optind' when we start to process its last character. */ if (*d->__nextchar == '\0') ++d->optind; if (temp == NULL || c == ':') { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; int n; #endif #if defined _LIBC && defined USE_IN_LIBIO n = __asprintf (&buf, _("%s: invalid option -- '%c'\n"), argv[0], c); #else fprintf (stderr, _("%s: invalid option -- '%c'\n"), argv[0], c); #endif #if defined _LIBC && defined USE_IN_LIBIO if (n >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #endif } d->optopt = c; return '?'; } /* Convenience. Treat POSIX -W foo same as long option --foo */ if (temp[0] == 'W' && temp[1] == ';') { char *nameend; const struct option *p; const struct option *pfound = NULL; int exact = 0; int ambig = 0; int indfound = 0; int option_index; /* This is an option that requires an argument. */ if (*d->__nextchar != '\0') { d->optarg = d->__nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ d->optind++; } else if (d->optind == argc) { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("%s: option requires an argument -- '%c'\n"), argv[0], c) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("%s: option requires an argument -- '%c'\n"), argv[0], c); #endif } d->optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; return c; } else /* We already incremented `d->optind' once; increment it again when taking next ARGV-elt as argument. */ d->optarg = argv[d->optind++]; /* optarg is now the argument, see if it's in the table of longopts. */ for (d->__nextchar = nameend = d->optarg; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar)) { if ((unsigned int) (nameend - d->__nextchar) == strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("%s: option '-W %s' is ambiguous\n"), argv[0], argv[d->optind]) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("%s: option '-W %s' is ambiguous\n"), argv[0], argv[d->optind]); #endif } d->__nextchar += strlen (d->__nextchar); d->optind++; return '?'; } if (pfound != NULL) { option_index = indfound; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) d->optarg = nameend + 1; else { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("\ %s: option '-W %s' doesn't allow an argument\n"), argv[0], pfound->name) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("\ %s: option '-W %s' doesn't allow an argument\n"), argv[0], pfound->name); #endif } d->__nextchar += strlen (d->__nextchar); return '?'; } } else if (pfound->has_arg == 1) { if (d->optind < argc) d->optarg = argv[d->optind++]; else { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("\ %s: option '%s' requires an argument\n"), argv[0], argv[d->optind - 1]) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("%s: option '%s' requires an argument\n"), argv[0], argv[d->optind - 1]); #endif } d->__nextchar += strlen (d->__nextchar); return optstring[0] == ':' ? ':' : '?'; } } d->__nextchar += strlen (d->__nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } d->__nextchar = NULL; return 'W'; /* Let the application handle it. */ } if (temp[1] == ':') { if (temp[2] == ':') { /* This is an option that accepts an argument optionally. */ if (*d->__nextchar != '\0') { d->optarg = d->__nextchar; d->optind++; } else d->optarg = NULL; d->__nextchar = NULL; } else { /* This is an option that requires an argument. */ if (*d->__nextchar != '\0') { d->optarg = d->__nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ d->optind++; } else if (d->optind == argc) { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("\ %s: option requires an argument -- '%c'\n"), argv[0], c) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("%s: option requires an argument -- '%c'\n"), argv[0], c); #endif } d->optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; } else /* We already incremented `optind' once; increment it again when taking next ARGV-elt as argument. */ d->optarg = argv[d->optind++]; d->__nextchar = NULL; } } return c; } } int _getopt_internal (int argc, char *const *argv, const char *optstring, const struct option *longopts, int *longind, int long_only, int posixly_correct) { int result; getopt_data.optind = optind; getopt_data.opterr = opterr; result = _getopt_internal_r (argc, argv, optstring, longopts, longind, long_only, &getopt_data, posixly_correct); optind = getopt_data.optind; optarg = getopt_data.optarg; optopt = getopt_data.optopt; return result; } int getopt (int argc, char *const *argv, const char *optstring) { return _getopt_internal (argc, argv, optstring, (const struct option *) 0, (int *) 0, 0, 0); } #ifdef _LIBC int __posix_getopt (int argc, char *const *argv, const char *optstring) { return _getopt_internal (argc, argv, optstring, (const struct option *) 0, (int *) 0, 0, 1); } #endif #endif /* Not ELIDE_CODE. */ #ifdef TEST /* Compile with -DTEST to make an executable for use in testing the above definition of `getopt'. */ int main (int argc, char **argv) { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; c = getopt (argc, argv, "abc:d:0123456789"); if (c == -1) break; switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (digit_optind != 0 && digit_optind != this_option_optind) printf ("digits occur in two different argv-elements.\n"); digit_optind = this_option_optind; printf ("option %c\n", c); break; case 'a': printf ("option a\n"); break; case 'b': printf ("option b\n"); break; case 'c': printf ("option c with value '%s'\n", optarg); break; case '?': break; default: printf ("?? getopt returned character code 0%o ??\n", c); } } if (optind < argc) { printf ("non-option ARGV-elements: "); while (optind < argc) printf ("%s ", argv[optind++]); printf ("\n"); } exit (0); } #endif /* TEST */ gnokii-0.6.31/getopt/getopt1.c0000644000175000017500000001124511666163120014237 0ustar leoleo/* getopt_long and getopt_long_only entry points for GNU getopt. Copyright (C) 1987-1994,1996-1998,2004,2009 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library 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. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #ifdef HAVE_CONFIG_H #include #endif #ifdef _LIBC # include #else # include "getopt.h" #endif #include "getopt_int.h" #include /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C Library, but also included in many other GNU distributions. Compiling and linking in this code is a waste when using the GNU C library (especially if it is a shared library). Rather than having every GNU program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ #define GETOPT_INTERFACE_VERSION 2 #if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2 #include #if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION #define ELIDE_CODE #endif #endif #ifndef ELIDE_CODE /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ #include #endif #ifndef NULL #define NULL 0 #endif int getopt_long (int argc, char *const *argv, const char *options, const struct option *long_options, int *opt_index) { return _getopt_internal (argc, argv, options, long_options, opt_index, 0, 0); } int _getopt_long_r (int argc, char *const *argv, const char *options, const struct option *long_options, int *opt_index, struct _getopt_data *d) { return _getopt_internal_r (argc, argv, options, long_options, opt_index, 0, d, 0); } /* Like getopt_long, but '-' as well as '--' can indicate a long option. If an option that starts with '-' (not '--') doesn't match a long option, but does match a short option, it is parsed as a short option instead. */ int getopt_long_only (int argc, char *const *argv, const char *options, const struct option *long_options, int *opt_index) { return _getopt_internal (argc, argv, options, long_options, opt_index, 1, 0); } int _getopt_long_only_r (int argc, char *const *argv, const char *options, const struct option *long_options, int *opt_index, struct _getopt_data *d) { return _getopt_internal_r (argc, argv, options, long_options, opt_index, 1, d, 0); } #endif /* Not ELIDE_CODE. */ #ifdef TEST #include int main (int argc, char **argv) { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; int option_index = 0; static struct option long_options[] = { {"add", 1, 0, 0}, {"append", 0, 0, 0}, {"delete", 1, 0, 0}, {"verbose", 0, 0, 0}, {"create", 0, 0, 0}, {"file", 1, 0, 0}, {0, 0, 0, 0} }; c = getopt_long (argc, argv, "abc:d:0123456789", long_options, &option_index); if (c == -1) break; switch (c) { case 0: printf ("option %s", long_options[option_index].name); if (optarg) printf (" with arg %s", optarg); printf ("\n"); break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (digit_optind != 0 && digit_optind != this_option_optind) printf ("digits occur in two different argv-elements.\n"); digit_optind = this_option_optind; printf ("option %c\n", c); break; case 'a': printf ("option a\n"); break; case 'b': printf ("option b\n"); break; case 'c': printf ("option c with value `%s'\n", optarg); break; case 'd': printf ("option d with value `%s'\n", optarg); break; case '?': break; default: printf ("?? getopt returned character code 0%o ??\n", c); } } if (optind < argc) { printf ("non-option ARGV-elements: "); while (optind < argc) printf ("%s ", argv[optind++]); printf ("\n"); } exit (0); } #endif /* TEST */ gnokii-0.6.31/gnokiid/0000755000175000017500000000000011666163464012642 5ustar leoleognokii-0.6.31/gnokiid/Makefile.am0000644000175000017500000000035611666163120014667 0ustar leoleoDEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ bin_PROGRAMS = gnokiid gnokiid_SOURCES = gnokiid.c gnokiid_LDADD = $(top_builddir)/common/libgnokii.la $(top_builddir)/common/data/libDATA.la $(INTLLIBS) gnokiid_CFLAGS = -I$(top_srcdir)/include gnokii-0.6.31/gnokiid/Makefile.in0000644000175000017500000005050111666163211014676 0ustar leoleo# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ bin_PROGRAMS = gnokiid$(EXEEXT) subdir = gnokiid DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_expand_dir.m4 \ $(top_srcdir)/m4/acx_pthread.m4 $(top_srcdir)/m4/intltool.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_gnokiid_OBJECTS = gnokiid-gnokiid.$(OBJEXT) gnokiid_OBJECTS = $(am_gnokiid_OBJECTS) am__DEPENDENCIES_1 = gnokiid_DEPENDENCIES = $(top_builddir)/common/libgnokii.la \ $(top_builddir)/common/data/libDATA.la $(am__DEPENDENCIES_1) gnokiid_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(gnokiid_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(gnokiid_SOURCES) DIST_SOURCES = $(gnokiid_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLUETOOTH_LIBS = @BLUETOOTH_LIBS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FIND = @FIND@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLDFLAGS = @GLDFLAGS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GMODULE_CFLAGS = @GMODULE_CFLAGS@ GMODULE_LIBS = @GMODULE_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GNOKII_LT_VERSION = @GNOKII_LT_VERSION@ GNOKII_LT_VERSION_AGE = @GNOKII_LT_VERSION_AGE@ GNOKII_LT_VERSION_CURRENT = @GNOKII_LT_VERSION_CURRENT@ GNOKII_LT_VERSION_REVISION = @GNOKII_LT_VERSION_REVISION@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_LIBICAL = @HAVE_LIBICAL@ HAVE_LIBUSB = @HAVE_LIBUSB@ HAVE_SOCKETPHONET = @HAVE_SOCKETPHONET@ HAVE_XGNOKII = @HAVE_XGNOKII@ ICAL_CFLAGS = @ICAL_CFLAGS@ ICAL_LIBS = @ICAL_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBGNOKII_VERSION_MAJOR = @LIBGNOKII_VERSION_MAJOR@ LIBGNOKII_VERSION_MINOR = @LIBGNOKII_VERSION_MINOR@ LIBGNOKII_VERSION_RELEASE = @LIBGNOKII_VERSION_RELEASE@ LIBGNOKII_VERSION_STRING = @LIBGNOKII_VERSION_STRING@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBPCSCLITE_CFLAGS = @LIBPCSCLITE_CFLAGS@ LIBPCSCLITE_LIBS = @LIBPCSCLITE_LIBS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKE = @MAKE@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ MYSQLCONFIG = @MYSQLCONFIG@ MYSQLCONFIG5 = @MYSQLCONFIG5@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_LIBS = @MYSQL_LIBS@ NEED_LOCALE_CHARSET = @NEED_LOCALE_CHARSET@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OWN_GETOPT = @OWN_GETOPT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PGCONFIG = @PGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSTGRES_CFLAGS = @POSTGRES_CFLAGS@ POSTGRES_LIBS = @POSTGRES_LIBS@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ RM = @RM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LIBS = @SQLITE3_LIBS@ SQLITE_CFLAGS = @SQLITE_CFLAGS@ SQLITE_LIBS = @SQLITE_LIBS@ STRIP = @STRIP@ TCP_LIBS = @TCP_LIBS@ TERMLDFLAGS = @TERMLDFLAGS@ TERMLIBS = @TERMLIBS@ USB_LIBS = @USB_LIBS@ USE_NLS = @USE_NLS@ USE_UNIX98PTYS = @USE_UNIX98PTYS@ VERSION = @VERSION@ WIN32 = @WIN32@ WIN32_CROSS = @WIN32_CROSS@ XGETTEXT = @XGETTEXT@ XMKMF = @XMKMF@ XPACKAGE = @XPACKAGE@ XPM_CFLAGS = @XPM_CFLAGS@ XPM_LIBS = @XPM_LIBS@ XVERSION = @XVERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ acx_pthread_config = @acx_pthread_config@ 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@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ gnokiid_SOURCES = gnokiid.c gnokiid_LDADD = $(top_builddir)/common/libgnokii.la $(top_builddir)/common/data/libDATA.la $(INTLLIBS) gnokiid_CFLAGS = -I$(top_srcdir)/include all: all-am .SUFFIXES: .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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gnokiid/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gnokiid/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 $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list gnokiid$(EXEEXT): $(gnokiid_OBJECTS) $(gnokiid_DEPENDENCIES) @rm -f gnokiid$(EXEEXT) $(gnokiid_LINK) $(gnokiid_OBJECTS) $(gnokiid_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gnokiid-gnokiid.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @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 $@ $< gnokiid-gnokiid.o: gnokiid.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokiid_CFLAGS) $(CFLAGS) -MT gnokiid-gnokiid.o -MD -MP -MF $(DEPDIR)/gnokiid-gnokiid.Tpo -c -o gnokiid-gnokiid.o `test -f 'gnokiid.c' || echo '$(srcdir)/'`gnokiid.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/gnokiid-gnokiid.Tpo $(DEPDIR)/gnokiid-gnokiid.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnokiid.c' object='gnokiid-gnokiid.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokiid_CFLAGS) $(CFLAGS) -c -o gnokiid-gnokiid.o `test -f 'gnokiid.c' || echo '$(srcdir)/'`gnokiid.c gnokiid-gnokiid.obj: gnokiid.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokiid_CFLAGS) $(CFLAGS) -MT gnokiid-gnokiid.obj -MD -MP -MF $(DEPDIR)/gnokiid-gnokiid.Tpo -c -o gnokiid-gnokiid.obj `if test -f 'gnokiid.c'; then $(CYGPATH_W) 'gnokiid.c'; else $(CYGPATH_W) '$(srcdir)/gnokiid.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/gnokiid-gnokiid.Tpo $(DEPDIR)/gnokiid-gnokiid.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnokiid.c' object='gnokiid-gnokiid.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnokiid_CFLAGS) $(CFLAGS) -c -o gnokiid-gnokiid.obj `if test -f 'gnokiid.c'; then $(CYGPATH_W) 'gnokiid.c'; else $(CYGPATH_W) '$(srcdir)/gnokiid.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: 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-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-binPROGRAMS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gnokii-0.6.31/gnokiid/gnokiid.c0000644000175000017500000001063611666163120014425 0ustar leoleo/* $Id$ G N O K I I A Linux/Unix toolset and driver for the mobile phones. This file is part of gnokii. Gnokii is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Gnokii 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gnokii; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (C) 1999-2000 Hugh Blemings & Pavel Janik ml. Copyright (C) 2001-2004 Pawel Kot Copyright (C) 2002 Manfred Jonsson Copyright (C) 2002-2003 BORBELY Zoltan Mainline code for gnokiid daemon. Handles command line parsing and various daemon functions. */ #include "config.h" #include #include #include #include #include #include #include #include #include #include "config.h" #ifdef ENABLE_NLS # include #endif #include "misc.h" #include "gnokii-internal.h" /* Global variables */ bool DebugMode; /* When true, run in debug mode */ const char *BinDir; /* Directory of the mgnokiidev command */ char *lockfile = NULL; bool GTerminateThread; static void short_version() { fprintf(stderr, _("GNOKIID Version %s\n"), VERSION); } static void version() { fprintf(stderr, _("Copyright (C) Hugh Blemings , 1999\n" "Copyright (C) Pavel Janik ml. , 1999\n" "Built %s %s\n"), __TIME__, __DATE__); } /* The function usage is only informative - it prints this program's usage and command-line options.*/ static void usage() { fprintf(stderr, _(" usage: gnokiid [--help|--version|--debug]\n" " --help display usage information\n" " --version displays version and copyright information\n" " --debug uses stdin/stdout for virtual modem comms\n")); } /* cleanup function registered by atexit() and called at exit() */ static void busterminate(void) { gn_vm_terminate(); gn_device_unlock(lockfile); gn_lib_library_free(); } /* Main function - handles command line arguments, passes them to separate functions accordingly. */ int main(int argc, char *argv[]) { const char *aux; static bool atexit_registered = false; struct gn_statemachine temp_state; /* For GNU gettext */ #ifdef ENABLE_NLS setlocale(LC_ALL, ""); bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR); textdomain(GETTEXT_PACKAGE); #endif short_version(); /* Handle command line arguments. */ switch (argc) { case 1: /* Default */ DebugMode = false; break; case 2: if (strcmp(argv[1], "--version") == 0) { /* Display version, copyright and build information. */ version(); exit(0); } else if (strcmp(argv[1], "--debug") == 0) { /* Use stdin/stdout for I/O */ DebugMode = true; break; } else if (strcmp(argv[1], "--help") == 0) { usage(); exit(0); } /* FALL TROUGH */ default: usage(); exit(1); } aux = gn_lib_cfg_get("global", "model"); if (!aux) { fprintf(stderr, "%s\n", gn_error_print(GN_ERR_NOCONFIG)); exit(1); } if (strncmp(aux, "5110", 4) && strncmp(aux, "5130", 4) && strncmp(aux, "6110", 4) && strncmp(aux, "6130", 4) && strncmp(aux, "6150", 4)) { fprintf(stderr, _("gnokiid purpose is to work only with the phones that do not have AT Hayes\ncommands interpreter.\n")); exit(1); } BinDir = gn_lib_cfg_get("global", "bindir"); if (!BinDir) BinDir = gn_lib_cfg_get("gnokiid", "bindir"); if (!BinDir) BinDir = SBINDIR; if (gn_cfg_phone_load("", &temp_state) != GN_ERR_NONE) exit(-1); gn_elog_handler = NULL; if (temp_state.config.use_locking) { lockfile = gn_device_lock(temp_state.config.port_device); if (lockfile == NULL) { fprintf(stderr, _("Lock file error. Exiting.\n")); exit(1); } } /* register cleanup function */ if (!atexit_registered) { atexit_registered = true; atexit(busterminate); } while (1) { if (gn_vm_initialise("", BinDir, DebugMode, true) == false) { exit (-1); } GTerminateThread = false; gn_vm_loop(); } exit (0); } gnokii-0.6.31/depcomp0000755000175000017500000004426711500011217012557 0ustar leoleo#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2009-04-28.21; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free # Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # 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. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u="sed s,\\\\\\\\,/,g" depmode=msvisualcpp fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: gnokii-0.6.31/config.guess0000755000175000017500000012673011562711303013531 0ustar leoleo#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011 Free Software Foundation, Inc. timestamp='2011-05-11' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # 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. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner. Please send patches (context # diff format) to and include a ChangeLog # entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-gnueabi else echo ${UNAME_MACHINE}-unknown-linux-gnueabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; i*86:Linux:*:*) LIBC=gnu eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-tilera-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in i386) eval $set_cc_for_build if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then UNAME_PROCESSOR="x86_64" fi fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: gnokii-0.6.31/NEWS0000644000175000017500000000001611666163120011677 0ustar leoleoSee ChangeLog gnokii-0.6.31/MAINTAINERS0000644000175000017500000000317011666163120012701 0ustar leoleoThis file reflect the current gnokii maintainance status. If you have patches for gnokii it would be wise to discuss them with maintainer of the certain area on the gnokii-ml. gnokii part maintainer ============================================================================= gnokii Pawel Kot gnokiid BORBELY Zoltan (no longer developed) xgnokii Jan Derfinak (mostly in keep-alive mode) smsd Jan Derfinak libgnokii Pawel Kot, Daniele Forsi statemachine BORBELY Zoltan, Pawel Kot (no changes for a long time, but works just fine) libsms Pawel Kot bitmaps Pawel Kot (no changes) ringtones Pawel Kot (no changes) 2110 driver no longer maintained 3110 driver no longer maintained 6110 driver BORBELY Zoltan, Daniele Forsi, Pawel Kot (keep-alive mode) 6210 driver BORBELY Zoltan, Daniele Forsi, Pawel Kot (keep-alive mode) 6510 driver BORBELY Zoltan, Daniele Forsi, Pawel Kot AT driver BORBELY Zoltan, Daniele Forsi, Pawel Kot gnapplet driver BORBELY Zoltan link layer BORBELY Zoltan, Pawel Kot (no changes) device layer BORBELY Zoltan, Pawel Kot (no changes) documentation Pawel Kot, Daniele Forsi autoconf Pawel Kot, BORBELY Zoltan Windows port Jari Turkia dku2 kernel driver no longer maintained, replaced by dku2libusb driver maintainer e-mail address ============================================================================= BORBELY Zoltan bozo (at) andrews (dot) hu Chris Kemp chris (at) madpanda (dot) uk Jan Derfinak ja (at) mail (dot) upjs (dot) sk Pawel Kot gnokii (at) gmail (dot) com Jari Turkia jmjt (at) lut (dot) fi Daniele Forsi daniele (at) forsi (dot) it gnokii-ml gnokii-users (at) nongnu (dot) org gnokii-0.6.31/config.sub0000755000175000017500000010460611562711303013172 0ustar leoleo#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011 Free Software Foundation, Inc. timestamp='2011-03-23' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # 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. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted GNU ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 \ | ns16k | ns32k \ | open8 \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | picochip) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile-* | tilegx-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze) basic_machine=microblaze-xilinx ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; # This must be matched before tile*. tilegx*) basic_machine=tilegx-unknown os=-linux-gnu ;; tile*) basic_machine=tile-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: gnokii-0.6.31/ChangeLog0000644000175000017500000075337011666163117013002 0ustar leoleo0.6.31 ====== * libgnokii updates o add gn_lib_phone_change_driver() function to allow replacing used driver in runtime (PaweÅ‚ Kot) o GSM number type is rather mask than define; use it as such when parsing the input (PaweÅ‚ Kot) o avoid overruns in phonet (PaweÅ‚ Kot) o print names of config files it tried to open only if none could be used (Daniele Forsi) o fix setting alarms for zero length events read from icalendar files (eg. birthdays) (Daniele Forsi) o fix sms encoding: don't break multibyte characters when creating multipart messages (PaweÅ‚ Kot) o add possibility to disable setting serial port speed and DTR and RTS bits (PaweÅ‚ Kot) o change the order of lookup for the config file (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=623694) (PaweÅ‚ Kot) o add id for Nokia 3109c and for Nokia C1-01 to misc.c only; both use model=series40 (Alexandre A. Alves, Josh Kaplan) o fix gn_sms_send() so the message could be resent (PaweÅ‚ Kot) o make the vcard reader handle also BDAY, TITLE, NICKNAME, ORG, X-SIP;POC and X-WV-ID (Daniele Forsi) o make the vcard reader handle also empty fields in N and in ADR (like in addresses without a PO Box) (Daniele Forsi) o support for compressed messages is not implemented yet (PaweÅ‚ Kot) o make the vcard writer handle also the date property in DC, MC, RC (the reader will ignore it) and ignore X-GNOKII-70 and X-GNOKII-71 (they are part of the N property) (Daniele Forsi) o make the vcard reader unfold correctly when lines end with CR LF (Daniele Forsi) o make the vcard writer fold lines at the 75th character (Daniele Forsi) o add id for Nokia 1280 to misc.c only; it doesn't support many commands because it's a Series 30; use model=series40 (Peter Zotov) o add id for Nokia 2700 clasic (series40) (Alexander V. Lukyanov) o add id for Nokia C2-03 (shirish शिरीष) * nk6510 driver updates o fix calendar handling issues (few off-by-ones) (PaweÅ‚ Kot) o implement deletecalendarnote for series40 3rd+ Ed (PaweÅ‚ Kot) o handle TODOs and Notes in series40 3rd+ Ed (PaweÅ‚ Kot) o avoid segfault reported by Chuck when unexpected smsc information arrives (PaweÅ‚ Kot) o fix writing birthday entries to phonebook (Daniele Forsi) o fix setting speed dials with location > 255 (Daniele Forsi) * gnokii updates o create path to gnokii-errors even on Windows (PaweÅ‚ Kot) o allow to specify custom path for gnokii-errors (PaweÅ‚ Kot) o make the output of --getspeeddial more readable (show SM or ME instead of a number) and consistent with the arguments of --setspeeddial (Daniele Forsi) * fake driver updates o add multipart message to SMS inbox (PaweÅ‚ Kot) o add ability to use --writephonebook (PaweÅ‚ Kot) * smsd updates o do not call GetSMSC every time SMS is sent (PaweÅ‚ Kot) o NULL freed pointers (Alexander V. Lukyanov) * xgnokii updates o set icon "phone" for all windows when using gtk+ 2.6 or later (Daniele Forsi) * at driver updates o correctly initialize memory type on WritePhonebookExt (Raphaël Droz) o Samsung SGH-U600 suppots extended phonebook (Raphaël Droz) o AT+SBPW=0,... is not supported for SM memory (Raphaël Droz, PaweÅ‚ Kot) o Samsung B2100 encodes phone numbers (grunge) o Return GN_ERR_EMPTYLOCATION also for phones that return error for empty phonebook locations (Daniele Forsi) 0.6.30 ====== * libgnokii updates o fix printing BDAY for phonebook entries in vCard format and add label for PTT Address (X-SIP;POC) and User ID (X-WV-ID) (Daniele Forsi) o fix mbox format of --getsms for sent messages; closes https://savannah.nongnu.org/bugs/?30050 (Daniele Forsi) o fix char_ucs2_encode() function (PaweÅ‚ Kot) o add ids for Nokia 1101, 1110, 2730, 6133, 2330c and 6500c to misc.c only; 1101 is untested, 1110 doesn't support many commands because it's a Series 30; use model=series40 for all (Daniele Forsi, sai on #gnokii, Iain Mac Donald, John Lapeyre, Dennis Schridde, Kevin) o fix a problem with a multipart message in default alphabet and extended alphabet characters (PaweÅ‚ Kot) o make sure that Series40 3rd Ed+ get proper capabilties (PaweÅ‚ Kot) o when encoding to hex format make sure we're using uppercase that should be compliant with the larger number of the devices (Msquared, PaweÅ‚ Kot) o use libiconv on WIN32 (PaweÅ‚ Kot) o avoid segfault with gn_cfg_phone_load() when state is not initialized (PaweÅ‚ Kot) o add gn_lib_phoneprofile_load_from_external() for 3rd party apps to initialize gnokii not using gnokii config file (PaweÅ‚ Kot) o add BM memory for Cell Broadcast Messages, untested reportedly supported by some AT phones (Daniele Forsi) o do not change the translation domain of the calling program; this didn't affect gnokii, xgnokii or smsd because they use the same translation domain as libgnokii (Daniele Forsi) o fix calendar functions flags for 5130, 5310 (Daniele Forsi) o add [flags] section to the config file (Daniele Forsi) * nk6510 driver updates o fix parsing SMS date from saved messages, bug #29830 (PaweÅ‚ Kot) o parse call notification frames on Series 40 (tested on 3rd Ed.); closes https://savannah.nongnu.org/bugs/?20895 (Daniele Forsi) o free the cached file lists up on exist (PaweÅ‚ Kot) o fix crash when writing calendar notes to Series 40 3rd Ed. and later (Daniele Forsi) o add support for phonet Linux kernel driver for Nokia phones over USB connections only (use connection=phonet port=usbpn0) (Daniele Forsi) o when WriteCalendarNote fails with 0xf0 frame fallback to WriteCalendarNote2 as suggested by Daniele Forsi (PaweÅ‚ Kot) * nk7110 driver updates o fix reading SMS from AR and TE (Daniele Forsi) * win32 updates o enable compile under cywin/mingw (Santeri Toikka) o enable MSVS 2010 compilation (Santeri Toikka) o enable MSVC++ 2010 Express compilation (PaweÅ‚ Kot) * fake driver updates o implement enough GN_OP_GetSMSStatus and GN_OP_DeleteSMS to test smsd receiving with static and file SMS (Daniele Forsi) * at driver updates o drop "T" modifier from ATDT because not all phones ignore it and it prevents the use of direct dialling from phonebooks; see gnokii man page and GSM 07.07 (Daniele Forsi) o for GetSMSStatus sum messages from ME and SM (PaweÅ‚ Kot) * xgnokii updates o support UTF-8 text when editing SMS and when showing details. Fixes https://bugs.launchpad.net/bugs/604947 (Daniele Forsi) * smsd updates o add SQLite3 backend module (Santeri Toikka) * gnokii updates o place gnokii-errors into the better location - freedesktop compliant (PaweÅ‚ Kot) 0.6.29 ====== * translation updates o updated German translation (Carsten Grohmann) o updated POTFILE files (Carsten Grohmann) o updated Italian translation (Daniele Forsi) o updated Polish translation (PaweÅ‚ Kot) * fake driver updates o implement GN_OP_GetModel and GN_OP_GetSMSStatus to allow testing of smsd sending and GN_OP_SaveSMS to allow testing of gnokii --savesms (Daniele Forsi) o implement GN_OP_Identify (PaweÅ‚ Kot) o give hints how to configure gnokii with --identify and --getsms (PaweÅ‚ Kot) o enable reading SMS from external directory which makes testing much easier (PaweÅ‚ Kot) * gnokii updates o make SMS and MMS commands suggest using --showsmsfolderstatus to know which memory types are supported (Daniele Forsi) o fix command with multiple arguments handling in --shell (PaweÅ‚ Kot) o show reference number also for sendlogo() and sendringtone() (Daniele Forsi) o fix random segfault when using --deletecalendarnote (Daniele Forsi) * nk6510 driver updates o support SMS memory OUS on phones prior to Series 40 3rd (PaweÅ‚ Kot, Daniele Forsi) o add potential new answer for an empty folder (PaweÅ‚ Kot) o clear folder list structure before retrieving new one (PaweÅ‚ Kot) o before getting folder status set number of elements in there to 0 to avoid confusion on incorrect error handling (PaweÅ‚ Kot) o use GN_SMS_MT_StatusReport to indicate delivery notifications (Daniele Forsi) * documentation updates o change defaults in sample gnokiirc files for *nix and Windows so that it's more likely to work for new users (PaweÅ‚ Kot) o make output of gnokii --help shorter by default and add an optional argument to print all help or only a part; for old behavior use gnokii --help all (Daniele Forsi) o add some instruction on environment preparation on Ubuntu (PaweÅ‚ Kot) * libgnokii updates o add more debug information to encoding functions (PaweÅ‚ Kot) o add ids for Nokia 2760, Nokia 5130 XpressMusic, Nokia 5310 XpressMusic, Nokia 6700 classic and Nokia 6085 to misc.c (use model=series40 for all) (Jaakko Saarinen, Gustavo Delfino, pier_andreit, Jacopo De Simoi, Peter Whittaker) o add TA and CB memory types to gn_str2memory_type() and to gn_memory_type2str(); they were only in gn_memory_type_print() (Daniele Forsi) o use more standard config file locations: %APPDATA%\gnokii for Windows $HOME/Library/Preferences/gnokii for MacOS X $XDG_CONFIG_HOME/gnokii for others (following freedesktop.org) backward compatibility is preserved (PaweÅ‚ Kot) o fallback to use mbrtowc()/wcrtomb() or mbtowc()/wctomb() if iconv_open() fails (Daniele Forsi) o fix sending multipart 8-bit SMS (Daniele Forsi) o fix SMS encoding (PaweÅ‚ Kot) o fix SMS splitting into parts (concatenated messages with UCS-2 encoding) (PaweÅ‚ Kot) o add dependency on glib (PaweÅ‚ Kot) o make --writephonebook work on Series40 3rd Ed+ (PaweÅ‚ Kot) o when reading phonebook dump unknown blocks in debug mode (PaweÅ‚ Kot) o introduce flag PM_EXTPBK2 for phonebook support on Series40 3rd Ed+ (PaweÅ‚ Kot) o support reading caller groups on Series40 3rd Ed+ (PaweÅ‚ Kot) o support writing caller groups on Series40 3rd Ed+ (PaweÅ‚ Kot) o support writing First Name and Last Name from vcard files as separate fields (PaweÅ‚ Kot) o support reading and writing caller grops on Series40 3rd Ed+ from/to vcard files (PaweÅ‚ Kot) o support recurrence in ical files (PaweÅ‚ Kot) o support alarms in ical files (Daniele Forsi) * build system updates o remove GNOKII_API from the definition of asprinf (Jari Turkia) o make getopt stuff compile with no gettext (Jari Turkia, PaweÅ‚ Kot) o try to fix "Present But Cannot Be Compiled" warning with MacOS X Bluetooth (PaweÅ‚ Kot) o add --with-gettext option to configure (PaweÅ‚ Kot) o update reference files in testsuite and add a new test for SMS encoding (Daniele Forsi) * Windows updates o MS Visual Studio does not have asprintf()/vasprintf() (Jari Turkia) o MS Visual Studio has setenv() (Jari Turkia) o rename win32 dir to Windows (it's also win64) (PaweÅ‚ Kot) * nk6100 driver updates o use GN_SMS_MT_StatusReport to indicate delivery notifications (Daniele Forsi) * nk7110 driver updates o use GN_SMS_MT_StatusReport to indicate delivery notifications (Daniele Forsi) * smsd updates o add quoting around phone number to mysql code that handles multipart messages (Paulius Bulotas) * at driver updates o support Samsung SMS encoding (PaweÅ‚ Kot) * pcsc driver updates o show name of virtual operator in --identify (Daniele Forsi) 0.6.28 ====== * build system updates o fix Mac OS X build (PaweÅ‚ Kot, Daniele Forsi, Jeff Rafter) o fix NetBSD build and enable Bluetooth support (Daniele Forsi) o use = instead of == in configure to be compliant with sh syntax (Guido Falsi) o add options to disable mysql/postgres smsd plugins compilation (Alin Năstac) o use strdup instead of strndup - fixes FreeBSD < 8 compilation (Guido Falsi) o remove deprecated kernel modules for DKU2 cable; supported DKU2 driver uses libusb (connection = dku2libusb) (Daniele Forsi, PaweÅ‚ Kot) o remove patches/freebsd-ltmain_sh.patch since it is no more needed (Daniele Forsi, Guido Falsi) o fix setenv()/unsetenv() build on Solaris (PaweÅ‚ Kot) o fix getopt_long() build on Solaris (PaweÅ‚ Kot) * libgnokii changes o print more verbose messages on device locking problems (PaweÅ‚ Kot) o add GN_ERR_LOCKED error code (PaweÅ‚ Kot) o strip trailing '\r's when parsing vcard files (PaweÅ‚ Kot) o enable Bluetooth support for FreeBSD (Guido Falsi) o fix segfault on sending long sms (PaweÅ‚ Kot) o fix off by one bug in atbus_rx_statemachine() found with valgrind (Daniele Forsi, PaweÅ‚ Kot) o fix retval of char_ucs2_encode() (Daniele Forsi, PaweÅ‚ Kot) o autodetect bluetooth channel for gnapplet (PaweÅ‚ Kot) o don't use default rfcomm channel since we have autodetection (PaweÅ‚ Kot) o add id for Nokia 1209 to misc.c only; use model=series40 but you will get limited functionality because this phone is a Series 30 (ncrfgs) o add a gn_lib_init() function to translate libgnokii messages also when the library is used by programs other than gnokii, xgnokii and smsd; only programs that DON'T connect to a phone need to call it explicitely (Daniele Forsi) o set To headers instead of From headers when saving to mbox outbox messages (analyzer) o add gn_mms_get() and gn_mms_delete() functions (decoding to text and MIME formats is incomplete and subject to change) (Daniele Forsi) o assign random reference ids to sent SMS (was always 0) (PaweÅ‚ Kot) o fix splitting unicode multipart messages (PaweÅ‚ Kot) o with multipart message always send the smallest part as the last one (PaweÅ‚ Kot) o represent more statuses with enum gn_power_source (Daniele Forsi) o correctly decode non-ascii characters in default alphabet messages (PaweÅ‚ Kot) o when sending multipart sms return reference numbers for all the parts (PaweÅ‚ Kot) o add GN_SMS_Unknown to gn_sms_message_status (Daniele Forsi) o fix decoding SMS-STATUS-REPORT (Daniele Forsi, PaweÅ‚ Kot) o set GN_SMS_USER_DATA_MAX_LENGTH to 256 (PaweÅ‚ Kot) o replace GNOKII_API bool with GNOKII_API int for the function definition (PaweÅ‚ Kot) o introduce better bool definition (Fabian Groffen) o correctly encode GN_GSM_NUMBER_Alphanumeric (Daniele Forsi) o use UCS-2 internal representation when sending SMS; it will allow better recognition for non-ascii but default alphabet characters (PaweÅ‚ Kot) o fix off-by-one bug in base64_encode (PaweÅ‚ Kot) * gnokii updates o strip the trailing newline when --entersecuritycode did not read from a terminal (Daniele Forsi) o add --getmms and --deletemms commands (Daniele Forsi) o deprecate -l option --sendsms; gnokii will now detect itself long sms (PaweÅ‚ Kot) o more efficient way to get all smses (PaweÅ‚ Kot) o add SEC option to --entersecuritycode to input security code (supported by nk6510 and nk6100 drivers) (Ladislav Michl) o make --sendsms refuse alfanumeric destination "numbers" to catch typos and make --savesms accept them because it's useful for testing (Daniele Forsi) o allow sending an empty SMS (PaweÅ‚ Kot) * at driver updates o initialize reg_notification and reg_callback_date (PaweÅ‚ Kot) o fix --getnetworkinfo on some phones (Siemens S55) with unregistered SIM (PaweÅ‚ Kot) o accept also +CCLK and +CREG responses without double quotes (Daniele Forsi) o fix --getphonebook segfault (bug #25378) (PaweÅ‚ Kot) o make Huawei phones notify SMS arrival (they seem to send notifications only to the second port, eg /dev/ttyUSB1) fixes http://savannah.nongnu.org/bugs/?25115 (Daniele Forsi) o cache GetBattery as it is extensivly used by --monitor and doesn't change too frequently (PaweÅ‚ Kot) o make GetBattery understand also 2 (no battery) and 3 (power fault) (Daniele Forsi) o if AT+GMM fails, try AT+CGMM (Huawei E220 doesn't support +GMM but supports +CGMM); fixes #26039 (PaweÅ‚ Kot) o accept also +CREG responses with an odd number of digits in the Cell ID field (Daniele Forsi) o when setting a new memory name use the current encoding instead of forcing "GSM" encoding (Daniele Forsi) * nk6510 driver updates o fix segfault on deletesms with S40_30 (PaweÅ‚ Kot) o sanity checks for number of messages in folder; increase max sms number in folder to 1024 (PaweÅ‚ Kot) o implement GN_OP_GetMMS and GN_OP_DeleteMMS (Daniele Forsi) o don't fallback to S40_30 mode on every error (PaweÅ‚ Kot) o SMS status is sometimes not returned - check for reply length (PaweÅ‚ Kot) o improve detection of SMS and MMS with S40_30 and correctly decode UCS2 SMS and read/unread/sent/unset status; also fix reading SMS from non-IN folders (Daniele Forsi) o enable input of security code (this driver now supports PIN and SEC and throws an error for other codes) (Daniele Forsi) o distinguish between "file not found" for --getfile (return an error) and "empty directory" for --getfilelist (do not return an error) (Daniele Forsi) o when an empty file folder is cached always use a timeout > 0 since 0 means "no timeout" and the list is never refreshed; this also affects reading SMS from S40_30 (Daniele Forsi) * gnapplet driver updates o fix string type argument length passed to the phone (PaweÅ‚ Kot) * documentation updates o in sample gnokiirc mention that the rfcomm_channel parameter is ignored when using the FBUS protocol (Daniele Forsi) o in gnokii man page add details to --writephonebook and remove reference to non existant -i parameter (Daniele Forsi) o add comments to all functions in common/gsm-encoding.c (Daniele Forsi) o in sample gnokiirc mention that on Win32 a COM port with a number greater than 9 is named like \\.\COM10 (Daniele Forsi) o in sample gnokiirc for Win32 mention that port = aa:bb:cc:dd:ee:ff is valid too (Daniele Forsi) * smsd updates o fix segfault when using the nk6100 driver (Daniele Forsi) o add examples directory with action files (Daniele Forsi) o print short version on every startup; it should bring better bugreports (PaweÅ‚ Kot) o reading SMS from S40_30 would stop working when inbox becomes empty (fixed in the driver) (Daniele Forsi) o enable sending long sms with postgresql module (PaweÅ‚ Kot) o rollback autodection of first sms position. First position now defaults to 1 and can be changed to 0 with -0, --firstpos0 command line argument (Jan Derfinak) * xgnokii updates o use Icon=phone instead of Icon=cellphone (Ariszló) * fake driver updates o implement GetSMS for testing (PaweÅ‚ Kot) o generate reference id for SendSMS (PaweÅ‚ Kot) o add SMS-STATUS-REPORT sample SMS for GetSMS testing (PaweÅ‚ Kot) o add more testcases for GetSMS (PaweÅ‚ Kot) * translation updates o updated French translation (Ploc) o updated Italian translation (Daniele Forsi) * utils updates o add gnokii-configure utility (not installed by make install because it depends on Python and libglade) (Daniele Forsi) * nk7110 driver updates o fix segfault on getsms and deletesms when raw_sms->number < 1 (Daniele Forsi) * pcsc driver updates o deprecate model=pcsc and connection=pcsc values; use model=APDU and connection=libpcsclite instead (Daniele Forsi) 0.6.27 ====== * build system updates o move config.rpath from config/ to toplevel (PaweÅ‚ Kot) o remove all m4 macros except ac_expand_dir.m4 and acx_pthread.m4 (PaweÅ‚ Kot) o use -N instead of -r in addition to -O option to make new wget happy (PaweÅ‚ Kot) o be compatible with systems where iconv() is not in glibc (Daniele Forsi) o make Mac OS X use glibtoolize instead of libtoolize in ./autogen.sh (Daniele Forsi) * win32 updates o make it build again (Jari Turkia) * nk6510 driver updates o advance progress indicator for file download in place (Yoni Rabkin) o detect empty/invalid SMS locations (PaweÅ‚ Kot) o support two bytes for raw location numbers also for reading and deleting SMS (it was already supported for saving) this partially fixes reading SMS with Nokia Series 40 3rd Edition phones and other newer and older phones (Daniele Forsi) o replace SMS reading implementation for Series40 3rd Edition and later phones (PaweÅ‚ Kot) o support new memory types for SMS on series40: DR (Drafts) and OUS (Outbox, items to be sent) (PaweÅ‚ Kot) * libgnokii updates o re-add iconv detection, fixes problem with non-ASCII messages and data, spotted by Daniele Forsi (Bastien Nocera) o add callback function for advance progress indicator (PaweÅ‚ Kot) o translate country names if iso-codes package is installed; see INSTALL for details (Daniele Forsi) o edit MCC list to be closer to http://en.wikipedia.org/wiki/Mobile_network_code and edit country list to be closer to iso-codes (Daniele Forsi) o Add the new gn_phonebook2vcardstr() and gn_vcardstr2phonebook() functions, to manipulate strings rather than filedescriptors when parsing phonebook entries (Bastien Nocera) o Add similar gn_calnote2icalstr(), gn_icalstr2calnote(), gn_todo2icalstr(), and gn_icalstr2todo() functions to manipulate calendar entries (Bastien Nocera) o steal rfcomm channel autodetection code from gnome-phone-manager (PaweÅ‚ Kot) o make gn_sms_send() propagate the reference number from its local data->raw_sms to caller's data->sms (Daniele Forsi) o add unconditional divert type (reason) (PaweÅ‚ Kot) o fix potential stack corruption with long phone names; fixes #23941 (https://savannah.nongnu.org/bugs/?23941) (PaweÅ‚ Kot) o add ids for Nokia N73 (model=at), Nokia 7373 and Nokia 3500 Classic (model=series40) to misc.c only (Daniele Forsi) o print out an overrun frame when detected (PaweÅ‚ Kot) o gn_file_list struct supports an arbitrary number of files in the directory (PaweÅ‚ Kot) o add new memory types for SMS: SR (Status Reports), DR (Drafts) and OUS (Outbox, items to be sent) (PaweÅ‚ Kot) o increase max number of SMS folders supported from 24 to 64 (many phones handled by the nk6510 driver support 20 folders created by the user and more than 4 folders created by the phone) (PaweÅ‚ Kot) * documentation updates o updated Polish translation (PaweÅ‚ Kot) o updated Italian translation (Daniele Forsi) o update Nokia DKU2 rules sample file for udev (Daniele Forsi, PaweÅ‚ Kot) o update gnokii man page with --answercall --hangup --divert --keysequence --enterchar --listnetworks --getnetworkinfo and --showsmsfolderstatus that were missing and add details to --dialvoice and --setspeeddial (Daniele Forsi) * gnokii updates o make --getsms accept at most 6 arguments, not 5 so that gnokii --getsms SM 1 2 -d -f myfile actually works; exit immediately (and do not delete SMS if --delete was specified) when user answers "no" to overwrite prompt (Daniele Forsi) o make --sendsms, --savesms, --getsms and --deletesmsfolder return with more specific error codes GN_ERR_WRONGDATAFORMAT, GN_ERR_INVALIDMEMORYTYPE and GN_ERR_INVALIDLOCATION where appropriate, instead of -1 or GN_ERR_FAILED (Daniele Forsi) o add country name to --listnetworks output (Daniele Forsi) o error message for too long text provided to --sendsms --long would sometimes print wrong max size (Daniele Forsi) o Use the new gn_phonebook2vcardstr() function (Bastien Nocera) o fix handling of arguments in --savesms: make it actually accept -l|--location and at most 12 parameters, not 10 (Daniele Forsi) o make --sendsms print the reference number of sent SMS (Daniele Forsi) o align --showsmsfolderstatus output -- folder abbreviation can have up to 3 chars (PaweÅ‚ Kot) o implement --shell option that will allow run more than one gnokii command inside one session (PaweÅ‚ Kot) o sms folder abbreviation may be 3-char (PaweÅ‚ Kot) o extend max SMS folder name length (PaweÅ‚ Kot) * at driver updates o workaround for Sagem myW-8 (in atsag.c) and other phones (in atgen.c) returning the wrong answer to GN_OP_GetModel (Daniele Forsi) o fix segfault on empty addressbook entry last name on Samsung (PaweÅ‚ Kot) o fix detecting current charset with AT+CSCS? (Daniele Forsi) o fix encoding issues (again) (PaweÅ‚ Kot) o fix GetMemoryStatus timing out on some Sony Ericsson phones (Bastien Nocera) o fix changing folders in some cases on Sony Ericsson phones (Bastien Nocera) o fix GetMemoryStatus being wrong when some phonebook entries contained non-ASCII characters (Bastien Nocera) o decode date/time for --getphonebook DC MC RC on phones that also encode number, eg Sony Ericsson (Daniele Forsi) o fix divert call commands invocation (PaweÅ‚ Kot) o be more verbose when the phone doesn't support PDU SMS mode (Carles Pina i Estany) o fix phonebook reading for phones that add spaces after commas in +CPBR: response (Daniele Forsi) o fix folder list parsing for wavecom modems (BORBELY Zoltan) o make phonebook work on all Samsung phones; make extended phonebook configurable; FIXME: detect which phones support extended phonebook (PaweÅ‚ Kot) o support SMS memory names longer than 2 chars (Daniele Forsi) o Sagem was reported to encode numbers (bug #24116) (PaweÅ‚ Kot) o let it use also connection = tcp to use an Ethernet to serial adapter or a phone connected to a remote PC (Daniele Forsi) o Samsung SHG-L760 was reported to respond to some commands without echoing the original request (PaweÅ‚ Kot) o do not change encoding if there is no need to change memory type in some SMS functions (Daniele Forsi) * xgnokii updates o display longer model names in Options dialog (Daniele Forsi) * smsd updates o fix potential segfault with file module on empty input SMS (Jan Derfinak) o allow to send multiline SMS with file module (Jan Derfinak, Joan) o don't use variable after it is freed (PaweÅ‚ Kot) o default module is file module (PaweÅ‚ Kot) * link layer updates o usb_open() on DKU2 device just once -- otherwise it doesn't work on FreeBSD (PaweÅ‚ Kot) 0.6.26 ====== * translation updates o search translations in $(localedir) and use exactly the same code in gnokii, xgnokii, smsd and gnokiid (Daniele Forsi) * at driver updates o use AT+GMM to get the model name as it gives a more readable output for Sony Ericssons and makes no difference for other tested phones (PaweÅ‚ Kot, Daniele Forsi) o support 4-bytes cell id (PaweÅ‚ Kot) o cache pdu mode not to issue the command with every sms (PaweÅ‚ Kot) o cache output of AT+XXXX=? commands which can be reused (PaweÅ‚ Kot) o handle extended registration status in a sane way (PaweÅ‚ Kot) o better handle encoding issues wrt numbers and memory types; some phones want them to be encoded using encoding being set (like Sony Ericsson) some want them as ascii (like Nokia) (PaweÅ‚ Kot) o optimize number of commands sent to the phone for multiple operations like reading entire phonebook or entire inbox (PaweÅ‚ Kot) o better handle empty +COPS responses (PaweÅ‚ Kot) o handle +CREG notifications (registration status) (PaweÅ‚ Kot) o correctly parse output for +CREG with LAC bytes swapped (PaweÅ‚ Kot) o add separate files for LG and Sagem phones (PaweÅ‚ Kot) o for GN_OP_GetSMSCenter always provide a default name and set default_name field because AT protocol never provides a name (Daniele Forsi) * gnokii updates o support 4-bytes cell id (PaweÅ‚ Kot) * libgnokii updates o do line unfolding/folding when reading/writing vCards and limit subentry size to 61 bytes (fixes in part https://savannah.nongnu.org/bugs/index.php?23086) (Daniele Forsi) o handle no '\n' at the end of the config file (PaweÅ‚ Kot) o don't allocate memory for comments for in-memory config representation (PaweÅ‚ Kot) o comments in the config files may be started at any position in the line (PaweÅ‚ Kot) o add missing quotes to #define LIBGNOKII_VERSION_STRING (Daniele Forsi) * smsd updates o avoid "duplicated message" error with concatenated messages on MySQL (PaweÅ‚ Kot) o more verbose debug information (PaweÅ‚ Kot) * pcsc driver updates o implement GN_OP_GetSMSCenter for --getsmsc (Daniele Forsi) * nk6510 driver updates o for GN_OP_GetSMSCenter provide a default name if a name isn't received; fix setting default_name field; when phone numbers are empty do not copy the string "(none)" (Daniele Forsi) * nk7110 driver updates o for GN_OP_GetSMSCenter provide a default name if a name isn't received; fix setting default_name field; when phone numbers are empty do not copy the string "(none)" (Daniele Forsi) 0.6.25 ====== * at driver updates o correctly handle different length memory names (like F10) so that phone can respond with ERROR (Daniele Forsi) o fix call notification for phones that reply with "+CRING: " instead of "+CRING: VOICE" (Daniele Forsi) o now it can decode status report SMS (Daniele Forsi) * pcsc driver updates o make it compatible also with libpcsclite 1.3.1+ (Pavel Kankovsky) o implement the functions to support --deletesms and --deletephonebook; deleted items are completely overwritten with 0xff (Pavel Kankovsky) o implement the functions to support --getsecuritycodestatus and --entersecuritycode PIN (Pavel Kankovsky) o now it can decode status report SMS (Daniele Forsi) * libgnokii changes o make char_bcd_number_get() decode non numeric codes "*#pbc" (Daniele Forsi) o tm_mon in tm struct starts from 0 (WiesÅ‚aw OchmiÅ„ski) o make vCard output of gn_phonebook2vcard() compliant with RFC2426 using underscores instead of hyphens (vCards created by previous versions are still read) and always generating the "N:" property; (fixes a part of https://savannah.nongnu.org/bugs/?22611) (Daniele Forsi) o split phonebook entry information (previously in X_GSM_STORE_AT) into X-GSM-MEMORY and X-GSM-LOCATION like in gnokii mbox file output and use "None" instead of "Unknown" for GN_PHONEBOOK_GROUP_None (Daniele Forsi) o make gn_vcard2phonebook() parse and store the "N:" property (closes https://savannah.nongnu.org/bugs/?22611) (Daniele Forsi) o move declaration of gn_get_connectiontype() from gnokii-internal.h to gnokii.h because it is a public function (Daniele Forsi) o merge from devel branch the functions to convert enum values into localized strings (PaweÅ‚ Kot, Daniele Forsi) o use the new function to convert enum values into localized strings to output vCard category (Daniele Forsi) o rewrite gn_sms_pdu2raw() to decode also status reports (this is used by atgen.c and pcsc.c) (Daniele Forsi) * gnokii changes o allow to use --entersecuritycode with another gnokii command (Pavel Kankovsky) o all specialized functions return gn_error (PaweÅ‚ Kot) o use the new functions to convert enum values into localized strings (merge code from devel branch with minor changes) (Daniele Forsi) * nk6100 driver updates o Nokia 3210, 3310 and 3330 do not support caller groups (tested for NSE-8, NHM-5 and NHM-6, guessed for NSE-9 and NHM-5NX) so return GN_PHONEBOOK_GROUP_None on reading (Daniele Forsi) 0.6.24 ====== * libgnokii changes o prepare new API for config handling; it will allow third party applications to use own configuration (PaweÅ‚ Kot) o add id for Nokia 5300 to misc.c only; use model=series40 in gnokiirc for this and similar phones (Daniele Forsi) o create a new function moving code from atgen.c to split raw fields of a PDU coded SMS and copy them to gn_sms_raw struct for later decoding (Daniele Forsi, PaweÅ‚ Kot) o change gn_memory_type2str() to be the inverse of gn_str2memory_type(), ie converting a numeric gn_memory_type like GN_MT_ME into a short string like "ME"; converting into a more user friendly string like "Internal memory" is now done by gn_memory_type_print() (Daniele Forsi, PaweÅ‚ Kot) * at driver updates o in ReplyGetSMS() use the new function to split raw fields of a PDU coded SMS (code refactoring, no functional changes) (Daniele Forsi) o do not segfault when AT+COPS? returns only the first value as in +COPS: 0 (Daniele Forsi) o AT protocol supports only one SMS Center, so pretend that its location is number 1 and return GN_ERR_INVALIDLOCATION when requested SMSC location is not 1 (Daniele Forsi) o use gn_str2memory_type() and the new gn_memory_type2str() to convert memory arguments (Daniele Forsi) o implement the functions to support --showsmsfolderstatus for up to 4 folders (Daniele Forsi) o fix setting the current memory on Sony Ericsson phones (Bastien Nocera) o force the encoding to be GSM when we're expecting an "ASCII" answer, fixes a lot of functionality on Sony Ericsson, Samsung and Sagem phones. (Bastien Nocera) o in GN_OP_SaveSMS set data->raw_sms->number with location number where message was stored, as expected by gnokii --savesms (Daniele Forsi) o in Sony Ericsson driver atsoer.c fix off by one command string length in se_at_memory_type_set() (Daniele Forsi) o parse date and time if sent by phone when reading phonebook entries (eg DC, MC, RC memories) (Daniele Forsi) * pcsc driver updates o implement --getsms from SM memory; this can read deleted SMS (Daniele Forsi) o implement the functions to support --showsmsfolderstatus (Daniele Forsi) * documentation updates o add to gnokii man page the missing options of --sendsms command (--8bit, --concat, --animation and --wappush) and document all its other long options (Daniele Forsi) o try to make an impression that all the phones are supported (PaweÅ‚ Kot) * gnokii updates o make --getsmsc understand the "end" keyword (Daniele Forsi) o the -f and -F options of --getsms now output short memory names for X-GSM-Memory (Daniele Forsi) o use the new gn_memory_type2str() to show memory name instead of numeric ID in --showsmsfolderstatus output (Daniele Forsi) * nk6100 driver o use "SIM card" instead of "SMS Inbox" as SM folder name for --showsmsfolderstatus (Daniele Forsi) 0.6.23 ====== * documentation updates o add further details for logo commands to gnokii man page and fix --getwapsetting/--writewapsetting (Daniele Forsi) o update xgnokii/ChangeLog (Daniele Forsi) * build system updates o don't include packaging directory in the release tarballs (PaweÅ‚ Kot) o don't allow to build without debug (PaweÅ‚ Kot) o switch build system to automake (Bastien Nocera) o allow silent (make -s) build (PaweÅ‚ Kot) o add missing includes on glibc 2.7 (http://bugs.gentoo.org/show_bug.cgi?id=203787) (Alin Nastac) o add MSVC8 project files (Ladis Michl) o remove obsolete win32 files (Ladis Michl) o consolidate winserial.h and unixserial.h (Ladis Michl) o add WIN32 compatibility after automake changes (Ladis Michl, Jari Turkia) o add a script that helps building CVS version on win32 (Jari Turkia) o get rid of XGNOKIIDIR (PaweÅ‚ Kot) o include sys/time.h from gnokii.h also when compiling under NetBSD (Daniele Forsi) o add --disable-smsd option to disable smsd compilation and installation (Fred Lefevere-Laoide, PaweÅ‚ Kot) * libgnokii updates o update gsm network list (according to http://en.wikipedia.org/wiki/Mobile_network_code) (PaweÅ‚ Kot, Jakub Jankowski) o use defines instead of hardcoding values (PaweÅ‚ Kot) o correct FBUS sequence number initialization (Burkhard Soehne) o make the function gn_get_connectiontype() visible even when compiling with -fvisibility=hidden (Daniele Forsi) o remove deprecated gn_cfg_read() function (PaweÅ‚ Kot) o initialize active call table with Idle state for checking active calls (PaweÅ‚ Kot) * xgnokii updates o avoid to use hardcodes (PaweÅ‚ Kot) o avoid segfault on calendar fetching (PaweÅ‚ Kot) o display a dialog to inform the user that some functions in the Calendar window are not yet implemented ("Save to phone", "Send via SMS", "Import from file", "Export to file"); also make menu items for "Add reminder", "Add call", "Add meeting", "Add birthday", "Delete note" work (Daniele Forsi) * pcsc driver updates o provide more information to the --identify command (see Docs/README-PCSC for details) (Daniele Forsi) o implement --getnetworkinfo (shows information about the last cell visited by the phone containing the SIM) (Daniele Forsi) * gnokii updates o trailing \n with --sendsms was not calculated into sms length but it was added into sms text; as the result if \n was 161st char in the sms and it was the last one we were telling user that just one sms will be sent and we sent two (PaweÅ‚ Kot) * nk6510 driver updates o print out rf level information in debug mode even it gnokii structures are not initialized (PaweÅ‚ Kot) o add call notification handler (PaweÅ‚ Kot) o attempt to "fix" problem with getting folder list on some Series40 phones (PaweÅ‚ Kot) 0.6.22 ====== * build system updates o make install and install-devel work correctly (PaweÅ‚ Kot) o xgnokii.pc should be installed with install-devel (PaweÅ‚ Kot) o add MS Visual C++ 2008 project files (Jari Turkia) * at driver updates o make CNMI mode argument configurable in at_driver_instance (PaweÅ‚ Kot) o don't fallback to default memory type if desired one is not available (Bastien Nocera) o new specific driver for Motorola (Bastien Nocera) * xgnokii updates o change the way phonebooks entries are deleted (closes https://savannah.nongnu.org/bugs/?20816) (Daniele Forsi) o make sure it didn't copy subentries from previously read phonebook entry (Daniele Forsi) o fix moving phonebook entries from SIM to phone and vice versa (closes https://savannah.nongnu.org/bugs/?21580) (Daniele Forsi) o when a phonebook entry is successfully saved or deleted do not process it again (Daniele Forsi) o do not let the user write phonebook names longer than the space allocated by libgnokii (Daniele Forsi) * link layer updates o reset link layer status when resending message (PaweÅ‚ Kot) o buffer for statemachine should be of 64 multiplication size (that helps in USB connection) (PaweÅ‚ Kot) o improve DKU-5 initialization again (Jari Turkia) * libgnokii updates o export delivery report status as enum, not only text (Bastien Nocera) o use businessCategory for caller group number when exporting and importing phonebook entries in LDIF format (instead of businessGroup and callerGroup) (PaweÅ‚ Kot, Daniele Forsi) o add function to return connection name (PaweÅ‚ Kot) o make gn_gsm_initialise() print the "phone instance config" in a format that can be copied into gnokiirc (Daniele Forsi) * nk6510 driver updates o don't free driver instance too early (Jari Turkia, PaweÅ‚ Kot) 0.6.21 ====== * xgnokii updates o update xgnokii desktop file (PaweÅ‚ Kot) o reading contacts from phone would miss the last entries if phonebook contained holes (see gnokii fix for --getphonebook below) (Daniele Forsi) o importing contacts from file now replaces entries with the same location number leaving the others untouched (in prior versions the others were deleted) (Daniele Forsi) o replace sprintfs() with snprintfs() (PaweÅ‚ Kot) * link layer updates o improve DKU-5 initialization stage (PaweÅ‚ Kot) o be careful with return value from read() (PaweÅ‚ Kot) * at driver updates o return an error from at_memory_type_set() when a phonebook memory type supported by libgnokii isn't supported by the phone's AT+CPBS= command (Daniele Forsi) o avoid memory corruption due to too small buffer with getsms and delete sms after incoming sms notification (http://bugzilla.gnome.org/show_bug.cgi?id=487809) (PaweÅ‚ Kot) * build system updates o change location of gnapplet.sis (PaweÅ‚ Kot) o configure.in and makefiles simplification (Daniele Forsi) o install gnokii.pc with install-devel and not install target (PaweÅ‚ Kot) * libgnokii updates o new error code GN_ERR_ASYNC (PaweÅ‚ Kot) o add support for async way of send_sms() (PaweÅ‚ Kot) o add ids for Nokia 6030 (Rishi Pathak) o add ids for Nokia 3110 classic (Jens Wilhelm Wulf) o replace sprintfs() and strcpys() with snprintfs (PaweÅ‚ Kot, Bastien Nocera) o return an error when trying to read from file more phonebook subentries than the space allocated (Daniele Forsi) * gnapplet driver updates o add support for setactiveprofile (BORBELY Zoltan) * gnokii updates o fix --getphonebook not reading the last entries in two cases when some entries before those meant to be read were empty and make it fail on more errors (empty or invalid locations are still handled like in previous versions) (Daniele Forsi) o replace sprintfs() and strcpys() with snprintfs() (PaweÅ‚ Kot) * translation updates o new Portugal translation (Pedro Silva) * device layer updates o make BlueZ connection non blocking on read() (PaweÅ‚ Kot) 0.6.20 ====== * libgnokii updates o add support for Nokia 6070 and 2630 (PaweÅ‚ Kot) o add a driver for PC/SC SIM card readers using libpcsclite; see Docs/README-PCSC for details (Daniele Forsi) o add two new phonebook memory types: SD for "Service Dialing Numbers" and BD for "Barred Dialing Numbers" (not all SIM cards provide them and currently only the pcsc driver supports them) (Daniele Forsi) o improve error messages while parsing config file (PaweÅ‚ Kot) o enhance error handling for parsing config (PaweÅ‚ Kot) o remove gn_file_text_save() from API (PaweÅ‚ Kot) o remove getline() replacement from compat.c (Daniele Forsi) o add gn_sms2mbox() function that converts SMS to mbox compliant format (PaweÅ‚ Kot) o add sanity checking for fwrite()/write() calls (PaweÅ‚ Kot) o make incoming buffer size for atbus link driver dynamically allocatable (was fixed size) (PaweÅ‚ Kot) o prevent strip_slashes() from stripping non-slashes (PaweÅ‚ Kot) * build system updates o add FAQ, KNOWN_BUGS and README-DKU2 to the list of files installed with "make install-docs" and remove gnokii-hackers-howto, gettext-howto and packaging-howto from that list (Daniele Forsi) o simplify Makefiles, remove obsolete targets (PaweÅ‚ Kot) o don't fail on parallel builds (Daniele Forsi) o fix compilation warnings (PaweÅ‚ Kot, Daniele Forsi) o use standard paths for docdir and localedir (PaweÅ‚ Kot) * gnokii updates o add error handling for security commands (PaweÅ‚ Kot) o getprofile requires ringtone_list being allocated (PaweÅ‚ Kot) o replace gn_file_text_save() with local writefile() (PaweÅ‚ Kot) o add getline() replacement to gnokii-utils.c (Daniele Forsi) o gnokii --getsms new --append-file/-a switch to append SMS to an existing file (PaweÅ‚ Kot) o gnokii --getsms -f/-F/-a use now mbox compliant format for stored sms, all sms read are stored in the same file (PaweÅ‚ Kot) o write more messages to stderr; the rule is that diagnostics indicating success or failure go to stderr, while information read from the phone goes to stdout (Daniele Forsi) o add sanity checking for fwrite()/write() calls (PaweÅ‚ Kot) * at driver updates o fix buffer size calculating in AT_WritePhonebook (Daniel Burr) o fix SMS-SUBMIT parsing (PaweÅ‚ Kot) o calculate phonebook size for SonyEricsson: they don't answer with memory stats to AT+CPBS, calculate it by reading and counting entries (which is fast) (PaweÅ‚ Kot) o fix SetDateTime for Sony Ericsson, which requires timezone to be added (PaweÅ‚ Kot) * documentation updates o update Docs/protocol/nk6110.txt with another error code for "Get code status err" (Daniele Forsi) * nk6100 driver updates o add error code GN_ERR_SIMPROBLEM for --changesecuritycode (Daniele Forsi) * xgnokii updates o when exporting the phonebook to a file in raw format handle backslashes as escapes like in gnokii --getphonebook (closes https://savannah.nongnu.org/bugs/?20815) (Daniele Forsi) * link layer updates o make DKU-5 connection initialisation working again (PaweÅ‚ Kot) * translation updates o updated Italian translation and fixed Content-Type to match actual encoding of text which was UTF-8 (Daniele Forsi) 0.6.19 ====== * libgnokii updates o match declaration with definition (PaweÅ‚ Kot) o fix base64 encoding (closes https://bugzilla.altlinux.org/show_bug.cgi?id=9994) (PaweÅ‚ Kot) o read reference id from send sms reply and from delivery report (PaweÅ‚ Kot) o in gn_phonebook2ldif() output homePostalAddress when it isn't in a subentry (fixes https://savannah.nongnu.org/bugs/?19963) (Daniele Forsi) o fix some typos (Daniele Forsi) o minor code cleanup in unixserial.c (Daniele Forsi) o some phones allow SMS location 0 (El Chef) * build system updates o define u_int8_t where not present (PaweÅ‚ Kot) o include sys/time.h from gnokii.h also when compiling under cygwin (closes https://savannah.nongnu.org/patch/?5656) (Daniele Forsi) o don't allow empty '-L' argument with Xlibs (closes http://bugs.gentoo.org/show_bug.cgi?id=188362) (Alin Nastac) * gnokii updates o fix getallfiles (Richard Lewis) o return non-zero error code when writephonebook fails (closes https://savannah.nongnu.org/bugs/index.php?20817) (PaweÅ‚ Kot) o initialize networkinfo structure for --getnetworkinfo (jra) * xgnokii changes o try to avoid xgnokii freeze on exit for blacklisted phones; this is not a fix, just nasty workaround (closes https://savannah.nongnu.org/bugs/index.php?20841 (PaweÅ‚ Kot) * nk6510 driver updates o fix segfault for sendsms (PaweÅ‚ Kot) * nk6100 driver updates o do not segfault when using --getsmsreader (closes http://savannah.nongnu.org/patch/?6189) (Sami) * atgen driver updates o Sony Ericsson phones can't do CREG=2 (only CREG=1), so just skip that and only do COPS in getnetworkinfo (jra) 0.6.18 ====== * documentation updates o add sample gnokiirc for windows (Jari Turkia) o update Docs/protocol/nk6110.txt with some details about the warranty screens data (Daniele Forsi) * at driver updates o mark SMS messages as read/unread/sent/unsent where possible (Bastien Nocera) o fix battery level reading (Bastien Nocera) o add support for call notifications (Bastien Nocera) o add support for getActiveCalls (Bastien Nocera) o fix sms outbox reading (Clemens Fruhwirth) o don't segfault if data->battery_unit is not allocated (Bastien Nocera) o add support for SMS notifications (Bastien Nocera, PaweÅ‚ Kot) o fix in unsolicited messages handling (PaweÅ‚ Kot) o make SMS notifications more portable and move specific Nokia stuff to atnok.c (PaweÅ‚ Kot) * libgnokii updates o add void *callback_data argument to callbacks (Bastien Nocera, PaweÅ‚ Kot) o use GN_CALL_MAX_PARALLEL instead of hardcode (Bastien Nocera) o add more sanity checks for sms reading (Bastien Nocera) o extend cell broadcast callback with gn_statemachine argument (PaweÅ‚ Kot) o fix splitting long messages (Robert Gerlach) o add support for occurrences field in calendar (Keith Packard) o add function for checking available connection types (PaweÅ‚ Kot) o fix memory leak in gn_sms_send() when sms_prepare() fails (found by valgrind) and pass on more return values from encode/decode functions (Daniele Forsi) o fix error message for "debug" option in gnokiirc: supported values have always been "off" and "on" (Carles Pina i Estany) * nk6510 driver updates o add support for incoming sms callbacks (PaweÅ‚ Kot) o add support for occurrences field in calendar (Keith Packard) o account for phonebook blocks not sent due to limited packet space (Keith Packard) o set of address blocks counts as one data block (Keith Packard) o treat Postal entries as addresses (Keith Packard) o when processing incoming phone book messages, skip unrelated errors (Keith Packard) o avoid duplicate phonebook subentries (Keith Packard) o speed up reading calendar entries (Keith Packard) * build system updates o detect getline() presence and provide its substitute (Guido Falsi, PaweÅ‚ Kot) o hide 'dereferencing type-punned pointer will break strict-aliasing rules' warning (PaweÅ‚ Kot) * nokia_dku2 module updates o add N70 id and new endpoint addresses (Yarda) * nk6100 driver updates o add GN_OP_GetSMSFolders and GN_OP_GetSMSFolderStatus to support gnokii --showsmsfolderstatus (Daniele Forsi) * gnokii updates o update callback functions to match current libgnokii (PaweÅ‚ Kot) o add support for occurrences field in calendar (PaweÅ‚ Kot) * smsd updates o add support for multipart SMS for MySQL backend (Alain Degreffe) 0.6.17 ====== * gnokii updates o do not open the log file when communication with phone is not needed; this fixes a memory leak found with valgrind (Daniele Forsi) o fix valgrind error "Conditional jump or move depends on uninitialised value(s)" in --getwapsetting (Daniele Forsi) o fix valgrind error "Conditional jump or move depends on uninitialised value(s)" in --getprofile (Daniele Forsi) o fix --divert options parsing (PaweÅ‚ Kot) o return an error if unexpected optional arguments are given to some commands and do stricter error checking (Daniele Forsi) o make --getphonebook output a telephone number in --ldif format even when there are no subentries (Daniele Forsi) o let foogle() access global data and state (Daniele Forsi) o fix command arguments handling for getting, setting and playing ringtones (Daniele Forsi) * nk6100 driver updates o when reading phonebook check if date/time is set in the entry to fix valgrind error "Invalid read of size 1" (Daniele Forsi) o handle errors in case 0x1b of IncomingProfile(); this fixes another valgrind error "Invalid read of size 1" (Daniele Forsi) * documentation updates o update Docs/protocol/nk6110.txt with date/time flag in phonebook entries (Daniele Forsi) o add sample udev rules file for DKU-2 cables (PaweÅ‚ Kot) o update sendsms man page with --forceSMread and --forceMEread usage (Daniele Forsi) o update Docs/Bugs with current instructions to get a debug build (Daniele Forsi) o fix typos in Docs/sample/gnokiirc (Daniele Forsi) * nk6160 driver updates o fix usage of SEND_MESSAGE_BLOCK macro (another valgrind finding) (Daniele Forsi) * libgnokii updates o fix memory leaks when config file has been open and memory allocated but [global] section or section given with --phone are not found (another valgrind finding) (Daniele Forsi) o in serial_close() fix valgrind warning "invalid file descriptor -1 in syscall close()" when serial_open() failed (eg. wrong permissions on /dev/ttyS0) (Daniele Forsi) o introduce use_locking field to config structure and fill it from the config file (okki, PaweÅ‚ Kot) o make strings in cfgreader better translatable (PaweÅ‚ Kot) o use default values when incorrect option is given in the config file (where safe and possible) (PaweÅ‚ Kot) o for connection type dku2libusb treat port as the number of DKU2 USB endpoint; this is useful when you have more than one DKU2 phone connected to the computer; numbering goes from 1 upwards (PaweÅ‚ Kot) o in gn_file_phonebook_raw_parse() parse all the fields even if an empty name is given (Daniele Forsi) * build system updates o fix compilation warnings (Daniele Forsi) * gnokiid updates o accept at most one command line argument and let users of unsupported models use --version (Daniele Forsi) o fix segfault when config file is broken or missing (Daniele Forsi) * xgnokii updates o fix memory leaks when building menus (Daniele Forsi) o print some messages only when xdebug = on (Daniele Forsi) o use the same error message when memory could not be allocated in xgnokii_speed.c (Daniele Forsi) o fix a memory leak in xgnokii/xgnokii_logos.c (Daniele Forsi) o calling gtk_set_locale() is unneeded according to gtk docs and leaks memory according to valgrind (Daniele Forsi) * translation updates o update Italian translation (Daniele Forsi) o update Polish translation (PaweÅ‚ Kot) * utils updates o fix typos in sendsms (Daniele Forsi) 0.6.16 ====== * gnokii updates o fix Solaris compilation (fcntl and friends) (PaweÅ‚ Kot) o avoid warnings on WIN32 (PaweÅ‚ Kot) * libgnokii updates o provide own implementation of strndup() for non-GNU systems (PaweÅ‚ Kot) 0.6.15 ====== * libgnokii changes (libgnokii.so.3.1.0) o handle new type of phonebook number for ldif and vcard output (PaweÅ‚ Kot) o be more compliant with VCARD 3.0 (PaweÅ‚ Kot) o use TYPE=PREF for the main entry number for the phonebook entry (PaweÅ‚ Kot) o add Nokia 6136 support (PaweÅ‚ Kot) o add Italian operator "Blu SpA" (222 98) to the list of nets in common/gsm-networks.c (Daniele Forsi) o delete lockfile in gn_lib_phone_open() if gn_gsm_initialise() fails (eg. bad config or no write access) (Daniele Forsi) o search for default config files if an empty filename is given to gn_lib_phoneprofile_load_from_file() (Daniele Forsi) o add #include needed for MAX_INT on various platforms (Magnus Henoch, Petr Hruska, Kuba Tyszko) o fix overflow when printing SMS date (PaweÅ‚ Kot) o add new phonebook entry types (PaweÅ‚ Kot) o for concatenated messages send the smallest part at the end (PaweÅ‚ Kot) o for concatenated unicode messages try not to split character across multiple parts (PaweÅ‚ Kot) o change gn_vm_initialise() because gn_cfg_phone_load() returns GN_ERR_NONE on success, instead of true (Daniele Forsi) o use sizeof(wchar_t) instead of hardcoded 4 for the size of exactly one output wchar_t (Alex Villacís Lasso) o let gn_get_connectiontype() and gn_lib_get_supported_connection() know which connection types have been actually compiled in libgnokii (Daniele Forsi) o fix decoding SMS with some locale set (Chinese) (PaweÅ‚ Kot) o avoid using va argument twice for in logging handlers (Scott Tsai) o add support for reading extended phonebook attributes (PaweÅ‚ Kot) o change type of caller_group from int to gn_phonebook_group_type (PaweÅ‚ Kot) o add support for concatenated messages with 16-bit reference number (Petr Hruska) o add support for Nokia 6233 (PaweÅ‚ Kot) o close the file before returning error in the two deprecated gn_vcal_file_*_read() functions (Daniele Forsi) o be more verbose in debug mode in dku2libusb initialization (PaweÅ‚ Kot) o add PM_XGNOKIIBREAKAGE and PM_FULLPBK capabilities (PaweÅ‚ Kot) o include "gnokii-internal.h" when common/vcal.c is compiled with libical (Daniele Forsi) o there is no need to bind a bluetooth socket (gnokii does not accept connections) (PaweÅ‚ Kot) o make gn_file_phonebook_raw_parse() accept "ON" memory too and return GN_ERR_INVALIDMEMORYTYPE if memory type is not ME, SM or ON, instead of GN_ERR_WRONGDATAFORMAT (Daniele Forsi) o add Nokia N70 ids (PaweÅ‚ Kot) o add support for Bluetooth on win32/MSVS 2005 (PaweÅ‚ Kot, Jari Turkia) o fix encoding to UCS2 (PaweÅ‚ Kot) o fix user data length calculating on concatenated SMS (PaweÅ‚ Kot, Alain Degreffe) o on_sms callback should have a pointer to the statemachine (Jeremy Laine) o fix winsock2 check (Jari Turkia) o it's not an error when statemachine is in the Initialised state (PaweÅ‚ Kot) o fix segfault on contacts handling in AT driver for long names (Baurzhan Ismagulov) o improve INT_MAX detection (PaweÅ‚ Kot) o make gn_ical2calnote() and gn_ical2todo() print the parsed notes only when debug = on (Daniele Forsi) o don't invoke additional fcntls when with_async is set to 0, which is always (PaweÅ‚ Kot) o add extented phonebook support into public API (PaweÅ‚ Kot) o add file types into public API (PaweÅ‚ Kot) o add support for extented phonebook (not quite works yet) (PaweÅ‚ Kot) * gnokii updates o search for default config files if an empty filename is given to --config (Daniele Forsi) o fix --setdatetime segfault (PaweÅ‚ Kot) o fix --deletephonebook incorrect argument number counting (PaweÅ‚ Kot) o print phonebook entry number in case when there's no subentry (Petr Hruska) o fix logo options segfaults (PaweÅ‚ Kot) o exit gnokii after --viewlogo or --listnetworks (PaweÅ‚ Kot) o compare network name with translated "unknown" string in logo operations too (Daniele Forsi) o make --getspeeddial and --setspeeddial print to stdout on success, not stderr (Daniele Forsi) o fix --getringtone parsing options (PaweÅ‚ Kot) o fix --sendsms usage string: -r is the short form of --report (Daniele Forsi) o add support for reading extended phonebook (PaweÅ‚ Kot) o fix --ringtoneconvert segfault (Daniele Forsi) o avoid looping up to INT_MAX when '--getsms 1 end' fails (e.g. PIN code required, invalid memory type) (Daniele Forsi) o --enterchar exits after first failure (PaweÅ‚ Kot) o add network code to --monitor output (Jari Turkia) o require parameters that are supposed to be numbers to be numbers (PaweÅ‚ Kot) o treat read/unread status of delivery reports like other SMs (Daniele Forsi) o make --getsms print "Text:" then go to newline for all types of SMs; make it also print more details for GN_SMS_MT_Submit like already done for GN_SMS_MT_SubmitSent (Daniele Forsi) o completely disable --getsecuritycode when compiled without --enable-security (Daniele Forsi) o make --writewapsetting --setprofile and --setsmsc return GN_ERR_WRONGDATAFORMAT when appropriate (Daniele Forsi) o use readtext() in savesms() too (Daniele Forsi) o skip trailing \n before checking string length in readtext() (Daniele Forsi) o use strncpy() safely in getsms() (Daniele Forsi) o make --getsms options -f and -F save the text part of Delivery Reports and Picture Messages too (Daniele Forsi) o print message number and status for Picture Messages too (Daniele Forsi) o make --getsms arguments work on FreeBSD (PaweÅ‚ Kot) o it's not an error if we read at least a Calendar or ToDo note and the rest is empty when reading up to end (Daniele Forsi) o --writephonebook can write to ON too (first location is 0, not 1). Working on Nokia 3210 and 3330; 3310 can only read number, not name; not working on 8310. (Daniele Forsi) o allow to enter PIN code not from the terminal (rob_w) o allow to write more than 1 calendar note at a time (Carles Pina i Estany, Daniele Forsi) o allow to write more than 1 todo note at a time (Daniele Forsi) o fix valgrind error in --savesms when -f option is not given: "Conditional jump or move depends on uninitialised value(s)" (Daniele Forsi) o print picture message templates like normal picture messages (Daniele Forsi) o fix --getphonebook XX n end where n > 1 (PaweÅ‚ Kot) * at driver updates o initialize caller groups with GN_PHONEBOOK_GROUP_None, not 0 (Petr Hruska) o implement --setdatetime (Petr Hruska) o implement --getdatetime (Petr Hruska) o fix problem for the devices that accept CPMS only with two memory types -- current implementation made them not work with gnokii (Daniele Forsi, PaweÅ‚ Kot) o read PDU data as unsigned chars in ReplyGetSMS() else values would be sign extended when >127 (Daniele Forsi) o exclude unused code when compiled without --enable-security (Daniele Forsi) o fix segfault on reading empty SMS locations with certain GSM modems (Yves PERREY) o add DTMF support (Jeremy Laine) o fix memory leak when link initialisation succeeds but driver initialisation fails (e.g. timeout) (Daniele Forsi) o initial Samsung support (Ingmar Steen) o initialize variables on driver initialization (PaweÅ‚ Kot) o fix findcrlf() usage -- valgrind findings (PaweÅ‚ Kot) * build system updates o add default (/usr/local) paths for FreeBSD (Petr Hruska) o unistd.h is not on all platforms; try to include only from compat.h (Jari Turkia) o termios.h is not on all platforms; try to include only from compat.h (Jari Turkia) o MSVS needs #include in snprintf.c (Jari Turkia) o MSVS compatibility fixes: string cannot be splitted with #ifdef (Jari Turkia) o add missing includes for MSVS after splitting gnokii into serveral files (Jari Turkia) o update MSVS project files (Jari Turkia) o updated config/* files along with new Ubuntu version (PaweÅ‚ Kot) o define INT_MAX where it's not defined (PaweÅ‚ Kot) o avoid redefining _GNU_SOURCE (PaweÅ‚ Kot) o add --disable-libusb and --disable-ical options (Michele Noberasco) o add AC_GNU_SOURCE to supress autoconf warnings (PaweÅ‚ Kot) o update win32 build files (Jari Turkia) o provide a replacement for va_copy() macro (Jari Turkia) o add --disable-irda and --disable-bluetooth options (PaweÅ‚ Kot) o replace gettextize with autopoint (PaweÅ‚ Kot) o add waitcall file to utils/.cvsignore (Daniele Forsi) o waitcall, todologo and ppm2nokia moved to gnokii-extras repository (Daniele Forsi, PaweÅ‚ Kot) o disable XPM support if X11/xpm.h is not found or is not usable, even if libXpm is found and usable (Daniele Forsi) o fail with configure when there's no (f)lex installed nor common/gnvcal.c is present (PaweÅ‚ Kot) * nk6510 driver updates o for sms submit dcs field is on other location (Waterser Forrest) o fix warning about unused functions when compiled without --enable-security (Daniele Forsi) o remove irda blacklisting code (PaweÅ‚ Kot) o fix memory leak when link initialisation succeeds but driver initialisation fails (e.g. timeout) (Daniele Forsi) o fix error spotted with valgrind after driver init failure: "Conditional jump or move depends on uninitialised value(s)" (Daniele Forsi) * translation updates o update Italian translation (Daniele Forsi) o do not translate strings in common/vcal.c and translate those in common/devices/winbluetooth.c (Daniel Nylander) o update Swedish translation (Daniel Nylander) o update Polish translation (PaweÅ‚ Kot) * gnokiid updates o set locale according to the environment variable LC_ALL just like the other programs (Daniele Forsi) o gn_cfg_phone_load() now returns GN_ERR_NONE on success, instead of true (Daniele Forsi) o exit when given phone model is not in 5110, 5130, 6110, 6130, 6150 (PaweÅ‚ Kot) * nk6100 driver updates o add more specific error codes to GN_OP_GetSMSStatus (observed on Nokia 3210|3310|3330) (Daniele Forsi) o set and compare caller_group with GN_PHONEBOOK_GROUP_None, not literal 5 (Daniele Forsi) o check if SMSC index is in range 1..255 in GetSMSCenter() and SetSMSCenter() (Daniele Forsi) o handle GN_ERR_INVALIDLOCATION and GN_ERR_INVALIDMEMORYTYPE errors for SetSpeedDial() in IncomingPhonebook() because Nokia 3210 differentiates between the two (Nokia 3330 returns always the same error code) (Daniele Forsi) o make get_ringtone_list() more general (Daniele Forsi) o check if message number is in range 0..255 in GetSMSMessage() SaveSMSMessage() and DeleteSMSMessage() (Daniele Forsi) o in IncomingSMS() copy message center number and remote number for type GN_SMS_MT_Submit too (Daniele Forsi) o set encoding for calendar notes text on Nokia 3310 and 3330; see Docs/protocol/nk6110.txt for details (Daniele Forsi) o use old key API with both variants of 3310 (tested only NHM-5 with firmware V 05.79) (Daniele Forsi) o set the same flags for both variants of 3210 because *#0000# actually reports "NSE-8/9" (seen on NSE-8 with firmwares V 05.10, 05.26 and 06.00) (Daniele Forsi) o when reading calendar notes replace year 2090 with alarm year (partial fix) (Daniele Forsi) o make it possible to use --getphonebook to read DC, MC and RC when there is no name, only the number (Daniele Forsi) o fix memory leak when link initialisation succeeds but driver initialisation fails (e.g. timeout) (Daniele Forsi) o return GN_ERR_MEMORYFULL when calendar memory is full (Daniele Forsi) * documentation updates o update logos section of man page with current usage (Daniele Forsi) o add spam filters for email addresses (PaweÅ‚ Kot) o add libusb information to DKU2 docs (PaweÅ‚ Kot) o update MAINTAINTERS, COPYRIGHT, CREDITS files (PaweÅ‚ Kot) o add note about gnapplet not working with SymbianV3 OS (PaweÅ‚ Kot) o update information about irda issue -- seems to be the case only with xgnokii (Paweł Kot) o FAQ update (Paweł Kot) o update gnokii and xgnokii manual pages (Daniele Forsi) o fix spelling in code comments (Daniele Forsi) o update TODO, CALENDAR, PHONEBOOK and SMS sections of gnokii man page with new usage (Daniele Forsi) o fix some usage strings (Daniele Forsi) o all protocol related questions should be asked on the gnokii mailing list (Paweł Kot) o update WIN32 readme (Jari Turkia) o update sample config file (Paweł Kot) o update Docs/protocol/nk6110.txt new explanation for error code 0x73: memory full (Daniele Forsi) * xgnokii updates o in xgnokii_contacts.c use GN_PHONEBOOK_GROUP_None, not literal 5 (Daniele Forsi) o add support for blacklisting models known to be broken by xgnokii usage (Paweł Kot) o clear the text box after deleting a note and update the list after adding a note in the Calendar window (Daniele Forsi) * smsd updates o reconnect only after timeout (Paweł Kot) o avoid freeing statically allocated memory (Paweł Kot) * nokia dku2 kernel module o add Linux 2.6.18 compatibility (Paweł Kot, Mark Kirkwood) o add Nokia 6155 support (Paweł Kot) * nk3110 driver updates o fix memory leak when link initialisation succeeds but driver initialisation fails (e.g. timeout) (Daniele Forsi) * nk7110 driver updates o fix memory leak when link initialisation succeeds but driver initialisation fails (e.g. timeout) (Daniele Forsi) o fix gcc warning: enumeration value not handled in switch (Daniele Forsi) * utils updates o sendsms can now read phonebook from phone memory (Paweł Kot) 0.6.14 ====== * nk6510 driver updates o fix getfiledetailsbyid (off-by-four bug) (Paweł Kot) * gnokii updates o change the error message in install_log_handler() to print the name of the logfile that failed to open to easily detect typos when changing the HOME variable in multiple phones setups; also start NLS stuff before calling install_log_handler() so this error message is translated (Daniele Forsi) o added -w option to --sendsms to for push messages sending support (service indication - wap push) (Igor Popik) o make --senddtmf, --answercall, --hangup, --getdisplaystatus, --getprofile print the error message (Daniele Forsi) o in --savesms print "storing sms" message after checking for all possible errors and for cosmetics change capitalization, add ellipsis and a space ("Storing SMS... ") (Daniele Forsi) o in --getphonebook in case GN_ERR_INVALIDLOCATION print the actual error message in addition to the generic "Error reading from the location %d in memory %s\n" (Daniele Forsi) o fix segfault on filesystem reading (Paweł Kot) o add --config and --phone options (Paweł Kot) o split gnokii functionality across the files (Paweł Kot) o print error messages when no config file or no phone section is found (Paweł Kot) * dku2 module updates o fix module headers (Paweł Kot) * libgnokii updates o added gn_wap_push_init() and gn_wap_push_encode() and gn_wap_push, gn_wap_push_header structures for binary push messages encoding (Igor Popik) o added extra header file called "wappush.h" with definitions of binary tag tokens and some contstant values (Igor Popik) o use GN_OP_CancelCall in gn_call_cancel() (Daniele Forsi) o add new error code GN_ERR_NOTAVAILABLE (Daniele Forsi) o save caller group as businessGroup in ldif phonebook export if present (Paweł Kot) o fix encoding issues on 64bit architectures (Daniel Gollub) o add libgnokii functions to load config from the alternate file (Paweł Kot) o fix segfault on getting phonebook with entries with custom ringtone (Paweł Kot) o output correctly sms date in debug mode (Paweł Kot) o fix model setting for --identify in AT driver (Paweł Kot) o return appropriate gn_error codes on particular errors (Paweł Kot) o return an error when no model or no port is found in the given section (in particular no section) (Paweł Kot) o fix typo when converting phonebook entry to vCard; in default CATEGORY s/Unkown/Unknown (Whoopie) o make categories in phonebook vCards translatable (Daniele Forsi) o add Nokia 6280 support (Kostas Peletidis) o add Nokia 3220 support (Paweł Kot) o handle new type of phonebook number (Daniel Gollub, Paweł Kot) * nk6100 driver updates o make --getdatetime return GN_ERR_NOTAVAILABLE when date/time is not set (Daniele Forsi) o relax error checking in IncomingNetworkInfo() because network info is sent unsolicited after hanging up a call (at least on Nokia 3330) and use GN_ERR_NOTAVAILABLE instead of GN_ERR_UNKNOWN when it's the case (Daniele Forsi) o handle 'invalid profile location' errors in IncomingProfile() (Daniele Forsi) o use old call API with Nokia 3210 NSE-8 (tested with firmwares 04.43, 05.26 and 06.00); probably this should be done for NSE-9 too, but I haven't got one to test (Daniele Forsi) o handle 'insert SIM card' error and an additional 'wrong code' error for --getsecuritycodestatus, --changesecuritycode and --entersecuritycode (Daniele Forsi) o handle 'invalid location' error for --deleteringtone (Daniele Forsi) o handle 'prev_state' with code 0x01 as GN_CALL_Idle (seen on Nokia 3330) else IncomingCallInfo() would fail with GN_ERR_UNHANDLEDFRAME (Daniele Forsi) o use old call API with Nokia 3310 (tested with firmware 5.79) (Daniele Forsi) * documentation updates o copy missing error codes from common/phones/nk6100.c to Docs/protocol/nk6110.txt (Daniele Forsi) o update --getsmsc and --setsmsc description in gnokii man page (Daniele Forsi) o discourage gnokiid for real modems (Paweł Kot) o fix usage string for --writephonebook as both --memory-type and --memory-location need a parameter and an alternate form of --memory-location is --location; fix usage strings in some of the new split gnokii files; update usage string in gnokiid (Daniele Forsi) * portability updates o don't fail on win32 with use_locking=yes (Paweł Kot) * utils updates o add 'waitcall' program which can be used in a script to get phone number of incoming call, then fix CVS Id and a linking issue (Daniele Forsi) * build system updates o don't warn about deprecated interfaces inside gnokii (Helge Deller, Paweł Kot) o -fvisibility=hidden flag is supported since gcc 3.4 (Brian Wallis) o don't prepare distribution specific things (Paweł Kot) * smsd updates o fix problems with exporting symbols from shared libraries/plugins with newer gcc versions (Paweł Kot) o autoreconnect in case of the phone being disconnected somehow (Jan Derfinak) * xgnokii updates o remove ExposeDisplay() from xgnokii/xgnokii_netmon.c as it's no more needed and was causing an infinite loop with a crash (Daniele Forsi) o enable Netmonitor menu for 3210|3310|3330 (Daniele Forsi) o use gtk_window_present() instead of gtk_widget_show() when user clicks the menus so windows are always shown; gtk docs say: "This may mean raising the window in the stacking order, deiconifying it, moving it to the current desktop, and/or giving it the keyboard focus, possibly dependent on the user's platform, window manager, and preferences." (Daniele Forsi) o in Logos window provide an empty network code when it could not be read from the phone else later code would reference unitialized memory (it is possible to read startup logo and operator logo from a Nokia 3330 even when SIM card is missing or PIN code is required) (Daniele Forsi) * translation updates o change gnokii/gnokii-phonebook.c and gnokii/gnokii-calendar.c to remove some strings that differ only for a trailing \n to ease future translations (Daniele Forsi) o update Italian translation and change charset back to that of version 0.6.12 (Daniele Forsi) 0.6.13 ====== * xgnokii updates o avoid segfault when enabling or disabling data calls, read bindir parameter from .gnokiirc (Daniele Forsi) o enable Speed Dial window for the following tested model and product_name pairs: Nokia 3210 (NSE-8), Nokia 3310 (NHM-5) and Nokia 3330 (NHM-6) (Daniele Forsi) o don't segfault in Speed Dial window trying to associate a speed dial to a phone number when the phonebook could not be read because of an error (e.g. when pin code is required) (Daniele Forsi) o make Speed Dial window a little wider to avoid the horizontal scroll bar; hide "info" window only after reading all speed dials, not just after the first one (Daniele Forsi) o make Dial Pad buttons insert digits at cursor position and replace selected text (Daniele Forsi) * libgnokii updates (libgnokii.so.3.0.0) o increase max sms and smsc phone number to 20 (Paweł Kot) o add a library layer to make libgnokii more binary compatible between versions in the future (Helge Deller) o change gnokii to use library layer (Helge Deller) o add gn_timestamp_set() and gn_timestamp_get() (Helge Deller) o change major number of libgnokii to 3 (Helge Deller) o added gn_lib_lasterror(), gn_lib_cfg_get() and gn_lib_get_phone_model|manufact|... functions (Helge Deller) o lots of changes all around to use new libgnokii functions (Helge Deller) o add GNOKII_DEPRECATED and API for Linux (Helge Deller) o add gn_lib_get_supported_connection() and gn_lib_search_one_connected_phone() (Helge Deller) o added gn_lib_addressbook_memstat(), gn_lib_phonebook_read_entry(), gn_lib_phonebook_entry_isempty() (Helge Deller) o fix memory leaks (Helge Deller) o add .cvsignore files (Helge Deller) o avoid double free on lockfile unlock (Paweł Kot) o make pnok_call_divert_incoming() allocate the needed struct when it is missing (e.g. when receiving unsolicited messages) (Daniele Forsi) o add timegm() function for the systems that do not have it (Paweł Kot) o add support for caller groups in vcards (Daniel Gollub) o allow the application to set encoding for gnokii (Markus Meyer) o add support for connection=dku5 setting (Paweł Kot) o avoid using sprintf(buf, "%s...", buf, ...) as it doesn't work on some systems (Paweł Kot) o show the entries when there is no name given (for example in missed calls or dialled numbers) (Paweł Kot) o support date fields in phonebook export and format them sanely in raw format (Paweł Kot) o the string length of strings with multibyte chars is not calculated correctly by strlen() (Daniel Gollub) * nk6510 driver updates o handle calendar extended parameters writing (Paweł Kot) o support for Symbian phones (identifier 'symbian'), generic Series 40 phones (identifier 'series40') and Nokia 6680 (Paweł Kot) o fix sms decoding (Paweł Kot) * nk6100 driver updates o fix --smsreader for nk6100 driver (Daniele Forsi) o Nokia 3310 does not support GetPhoneStatus (Daniele Forsi) * build system updates o fix typo in smsd-mysql Debian pacakge depedencies (Paweł Kot) o support for MS Visual Studio 2005 (Jari Turkia) * dku2 kernel driver updates o fix version for Linux 2.4 (Paweł Kot) o update documentation (Paweł Kot) o update Linux 2.6 driver to support 2.6.16 kernel (internal structures changed again) (Paweł Kot) o Symbian phones are not capable to use nokia_dku2 driver -- exclude their ids from the driver (Paweł Kot) o add Nokia 6265 support (Artur Souza) * device layer updates o new libusb driver for dku2 cable (connection = dku2libusb) (Paweł Kot) * link layer updates o make new libusb driver work also for Symbian devices (Alex Kanavin) * atgen driver updates o use model and product name correctly (Paweł Kot) o add memory type sanitization for --getsms (Paweł Kot) o use strip_quotes() to correctly handle the empty string in +COPS: 0,0,"" for --getnetworkinfo (Daniele Forsi) o safely handle long strings in --identify (Daniele Forsi) * gnapplet driver updates o remove 6680 from the supported models -- it is supported by genuine FBUS driver (use series60 for old behaviour) (Paweł Kot) * documentation updates o add in Docs/protocol/nk6110.txt different netstatus/netsel values for network registration message for Nokia 3210/3310/ 3330 (Daniele Forsi) o fix three spelling mistakes in Docs/sample/gnokiirc (Daniele Forsi) * translation updates o add new file common/libfunctions.c to the list of translatable files (Daniele Forsi) o add a missing string from gnokii/gnokii.c; change capitalization of some strings (Daniele Forsi) o change two error messages in gnokii/gnokii.c setlogo() to be easier to translate (Daniele Forsi) o update Italian translation and fix charset (Daniele Forsi) * smsd updates o apply some patches by SUSE, RedHat and Debian which makes packager's life easier (Helge Deller) o switch smsd to new libgnokii functions (Helge Deller, Paweł Kot) * gnokii updates o make --setlogo exit with a valid error code after all errors (Daniele Forsi) o exit the loop for getphonebook on timeout (Paweł Kot) * build environment updates o remove CFLAGS from gnokii.pc.in and xgnokii.pc.in, keep includes only for compilation (Helge Deller) xgnokii/xgnokii.pc.in o add checks for -Wno-pointer-sign and -fvisibility=hidden, add usage of __attribute__((deprecated) (Helge Deller) o replaced usage of "API" with "GNOKII_API" (Helge Deller) * compatibility updates o global gnokiirc-file is looked under %SYSTEMROOT%, looking from current working directory is a bad idea (Jari Turkia) o locale charset win32 problem: return current code page as codeset, also makes multibyte-functions work; there is pretty much nothing else that can be done to the issue (Jari Turkia) o snprintf fix: there seems to be some a nasty side effect in MSVC vsnprintf causing a couple of ugly strings. This makes the snprintf work similarily to unix ones (Jari Turkia) 0.6.12 ====== * xgnokii updates o make Keyboard and Ringtone Editor more compatible with gtk+-2.0 adding gtk_fixed_set_has_window() (Daniele Forsi) o in xgnokii/xgnokii_lowlevel.c use gdat.model as phone.version and remove some unneeded g_malloc()'s (Daniele Forsi) o avoid segfault when gnokii-artwork is not installed (Paweł Kot) * build system updates o update Debian build scripts (Paweł Kot) * nk6510 driver updates o return appropriate error code when setting too long ringtone (actual tested max notes in ringtone is 69 notes in Nokia 6310) (Paweł Kot) * libgnokii updates (libgnokii.so.2.0.x) o extend GN_PHONEBOOK_SUBENTRIES_MAX_NUMBER to 64 (Dirk) o extend GN_RINGTONE_MAX_NOTES to 1024 (it happend that there are longer ringtones in the phone) (Alexey I. Froloff) 0.6.11 ====== * nk6510 driver updates o Nokia 6015i support added (gnokii@everets.org) o fix number encapsulating in the FBUS frame: when the number was too long the trailing digits where overwritten (Paweł Kot) o Nokia 6101 support added (Paweł Kot) o end time and location support added to calendar (Paweł Kot) o map nk6510 calnote types to libgnokii types (Paweł Kot) o add reminder support (Paweł Kot) o fix MakeCall (Paweł Kot) o fix Subscribe: use just few channels, don't wait for the reply (it won't come) (Paweł Kot) o not all models support the same frames for MakeCall, fix it for them (at least Nokia 7600) (Paweł Kot) * link layer updates o virtual IrCOMM device support (BORBELY Zoltan) o fix FBUS mode initialization for slow responding devices (like Nokia 6020) (Paweł Kot) * device layer updates o virtual IrCOMM device support (BORBELY Zoltan) o Nokia 6235 over IrDA support (Paweł Kot) * build system updates o AM_GNU_GETTEXT doesn't support use-libtool (BORBELY Zoltan) o Makefile cleanup due to the gettext changes (BORBELY Zoltan) o added LDFLAGS when linking libgnokii libraries (Luke Kenneth Casson Leighton) o change libgnokii parts compilation order (Paweł Kot) o merge gnokii-smsd and gnokii-smsd-file in gnokii.spec (Paweł Kot) o sync debian package building scripts with mainstream (Paweł Kot) * gnapplet driver updates o Nokia 6680 support added (BORBELY Zoltan) o end time and location support added to the calendar (BORBELY Zoltan) * documentation updates o Italian translation updated (Daniele Forsi) o Swedish translation added and updated (Daniel Nylander) o xgnokii requires now glib-2.0 and gtk+-2.0 (Paweł Kot) o CVS access has changed on savannah (Paweł Kot) o non Nokia phones are supported by AT driver -- express it more verbosly (Paweł Kot) o document irda_string variable (Paweł Kot) o noted in Docs/protocol/nk6110.txt that reply for packet 0x0a (Network status) is shorter when there is no network registration (Daniele Forsi) o updated French translation (Olivier Kaloudoff) o updated Polish translation (Paweł Kot) * xgnokii updates o make the progress dialog while loading the phonebook more compatible with gtk+-2.0 (Daniele Forsi) o make strings translatable and change some to be consistent across the whole project (Daniele Forsi) o avoid coredump on the empty ringtone list (Daniele Forsi, Paweł Kot) o support for calendar extended parameters (Paweł Kot) o dialpad for dial voice dialog (Paweł Kot) o bump xgnokii version (Paweł Kot) o added default preview image for logos (Paweł Kot) o don't hardcode preview pixmap names (except for default) (Paweł Kot) o added xgnokii pkg-config file (Paweł Kot) o move phone pixmaps to the separate package (gnokii-artwork) (Paweł Kot) * gnokiid updates o add gnokiid/gnokiid.c to the list of translatable files in po/POTFILES.in (Daniele Forsi) o print strings more compliant to GSM standard (Daniele Forsi) * libgnokii updates o change some translatable strings to be consistent across the whole project and add files to po/POTFILES.in (Daniele Forsi) o end time and location support added to the calendar (BORBELY Zoltan) o support for caller groups in ldif output (patch #4794) (str at msm.ru) o fix calnote alarm reading (Dan Oetting) o fix building on GNU/kFreeBSD (bug #14389) (Paweł Kot) o make matching of ldif fields case insensitive (bug #14689) (Michael Klemme) o use more fields from Mozilla ldif (bug #14689) (Michael Klemme) o use first ldif subentry number as the default number (bug #14689) (Michael Klemme) o get rid of the irda phones[] table; either autodetect or use the config variale (irda_string) (Paweł Kot) o add memo support to iCal output (Paweł Kot) * gnokii updates o change some translatable strings to be consistent across the whole project (Daniele Forsi) o putfile() should use binary open() mode (bug #15031) (Paweł Kot) o with multiple entries for --writephonebook when no locations are given don't write them all to the same location (Paweł Kot) o support for end date and location for calendar (BORBELY Zoltan, Paweł Kot) o support for memo calendar type (Paweł Kot) o for birthday calendar entries don't output year for the alarm (Paweł Kot) o output calnote location (virtual and physical) (Paweł Kot) o print error message if --getnetworkinfo or --setdatetime or --setalarm or --setspeeddial fail (Daniele Forsi) * utils updates o add ldiffix.pl script for ldif entries normalization: number formats, delete empty entries, encode base64 (Michale Klemme) * nk6100 driver updates o in more places make it return error code GN_ERR_NOTREADY when phone is displaying "Insert SIM card" and GN_ERR_CODEREQUIRED when it is displaying "Enter PIN code" instead of GN_ERR_UNHANDLEDFRAME (Daniele Forsi) o make --writecalendarnote return error GN_ERR_MEMORYFULL when appropriate, instead of GN_ERR_UNHANDLEDFRAME (Daniele Forsi) o make --getsms and --deletesms return GN_ERR_INVALIDMEMORYTYPE if memory_type is not SM (Daniele Forsi) * atgen driver updates o unsolicited RING and +CRING message handling (BORBELY Zoltan) o identify should work on phones not supporting "AT+CGxx" commands (BORBELY Zoltan) 0.6.10 ====== * nk6510 driver updates o Nokia 3120b support added (Avery Salmon) o Nokia 3100 support added (Janos Zana) o Nokia 3120 support added (Matthew Palmer) o Nokia 5140i support added (Paweł Kot) * gnokii updates o let --getfiledetailsbyid work: remove spurious return 0 (Stefan Sassenberg) * build system updates o mingw cross compilation fixes (BORBELY Zoltan) o IrDA support detection for mingw cross build (BORBELY Zoltan) 0.6.9 ===== * build system updates o add $withval/net to CFLAGS with --with-bluetooth and configure script (Bastien Nocera) * atgen driver updates o error out when trying to set a memory type that's beyond what is supported by the AT driver (Bastien Nocera) o allocate bigger buffer for model and manufacturer (Bastien Nocera) * gnokii updates o don't print empty entries in --getphonebook (Bastien Nocera) o only print an "invalid index" error when the "end" keyword wasn't used, or we managed to get the real end index (some phones don't report the end index) (Bastien Nocera) o duplicated files operations -- you can use them "by name" or "by id" (new ops) (Paweł Kot) * libgnokii updates o exit from char_ucs2_encode() infinite loop on the null termination (Bastien Nocera) o initialize state->device.device_interface (Bastien Nocera) o new gsm operator added (Max Sanzharov) o allow more subentries for a pbk entry (BORBELY Zoltan) * xgnokii updates o add xgnokii.desktop (Ville Skytta) o ported to gtk2 (Jan Derfinak, Bastien Nocera) o check mark added to the "(de)activate sms reading" menu item (BORBELY Zoltan) * documentation updates o update information about gnokii on MacOS X (Marcus Pallinger) o add 'FILES' section to the manual (Paweł Kot) o updated Polish translation (Paweł Kot) * translation updates o update French translation (Olivier Kaloudoff) * nk6510 driver updates o 6500 and 8310 model numbers are the same (BORBELY Zoltan) o file support for Nokia 6610i and family -- it differs from already implemented support as it is not named based but id based (Paweł Kot) o Nokia 6220 support added (Peter Vajko) * link layer updates o update dku2 driver: more models, cleanups, allow module unloading, use .short_name (Paweł Kot, Matthias Blaesing) o IrDA support for Nokia 6021 added (Tuukka Hastrup) 0.6.8 ===== * documentation updates o sample of FreeBSD port setting in the config file (taken from FreeBSD gnokii patches) (FreeBSD Team) o update DKU-2 documentation (Paweł Kot) o fixed German translation (Jens Seidel) o update main README with DKU-2 and win32 info (Paweł Kot) o add some function description in the header files (Paweł Kot) * nk6100 driver updates o read phonebook names as unicode on unicode capable phones (Paweł Kot) o read and write calendar notes as unicode on unicode capable phones (Paweł Kot) * libgnokii updates o add sanity checks to vcal converting code (Paweł Kot) o new model id for Nokia 6230 (Richard Wallman) o swap CR and LF in at emulator as they were incorrectly mixed (Daniele Forsi) o fix off by one in get_next_token(); found by Dave Godfrey (Paweł Kot) o add support for wap push notification indicators recognition (Paweł Kot) * xgnokii updates o avoid infinite loop on misconfiguration: when xgnokii doesn't recognize a phone (missing model id in models[]), and the phone doesn't support getting SMS from SIM it goes into infinite loop -- fix it to handle GN_ERR_INVALIDMEMORYTYPE error; reported by Richard Wallman as debian bug #312632 (Paweł Kot) * nk6510 driver updates o added Nokia 6230i support (BORBELY Zoltan) o colon was missing from the irda blacklist (BORBELY Zoltan) o added Nokia 5140 support (BORBELY Zoltan) * link layer updates o fix dku2 module for 2.4 kernel (Paweł Kot) o added configure script to customize kernel sources and kernel modules directories for dku2 driver (Paweł Kot) o add Nokia 6170 ids to the nokia_dku2 driver (Paweł Kot) * atgen driver updates o fix string length calculating in at_encode() (Daniele Forsi) * gnokii updates o make more strings translatable, move help entries into the correct locations (Paweł Kot) o implement end keyword for --getsms (Daniele Forsi) o implement end keyword for --deletesms (BORBELY Zoltan) 0.6.7 ===== * build system updates o remove SlackBuild-xgnokii on make distclean (Paweł Kot) o don't remove SlackBuilds when preparing a tarball (Paweł Kot) o updated SlackBuilds (Paweł Kot) o upgrade to newer libtool (Paweł Kot) o add configure option to disable unix98 pty test for clean Gentoo ebuilding (Paweł Kot) o Gentoo requires gnokii-${VERSION}.ebuild name (Paweł Kot) * nk6510 driver updates o added Nokia 6020 support (also over irda) (Chris Debenham) * documentation updates o make FAQ more up-to-date (supported model, which cable to use) (Paweł Kot) * libgnokii updates o don't use strndup (Marcus Pallinger, Paweł Kot) 0.6.6 ===== * build system updates o update gnokii.spec -- split up to the smaller packages (Paweł Kot) o added gnokii.ebuild based on Gentoo mainstream (Paweł Kot) * link layer updates o DKU2 driver as the separate module for Linux 2.4 (Paweł Kot) o clean up 2.4 driver (Paweł Kot) * 6510 driver updates o add Nokia 6170 support (Paweł Kot) o add progress information for GetFile() (Paweł Kot) o handle invalid memory types (Paweł Kot) o fix compile warning on non linux (Paweł Kot) * gnokii updates o fix the segfault with --getfile when no local_filename is given and remote_filename does not contain '/' character (eg. it was given with '\\' charaters) (Paweł Kot) o show the (missed, dialled, etc) calls date and time (Paweł Kot) * translation updates o updated Estonian translation (Hans Motshärg) o updated Polish translation (Paweł Kot) * libgnokii updates o return all call dates as subentries (Paweł Kot) o unify error messages in unixserial (Paweł Kot) o avoid lvalue casting -- be gcc 4.0 compliant (various people) o add missing includes for add_slashes() and strip_slashes (Paweł Kot) * nk7110 driver updates o prepare all exit paths with NK7110_IncomingCommstatus (Paweł Kot) * gnapplet driver updates o remove unused variables (Paweł Kot) 0.6.5 ===== * translation updates o updated Estonian translation (Hans Motshärg) o xgnokii_xring.c was missing from POTFILES.in (Hans Motshärg) o Chinese translation added (Funda Wang) o update all *.po files (automatically with msgmerge) (Paweł Kot) * gnokii updates o --monitor once will run only once (BORBELY Zoltan) o add the ability to set datetime with gnokii --savesms (Adam Gołębiowski) o support for basic file manipulation (Chris Kemp) o --sendsms will warn when no SMSC cannot be read from the phone and advice to use --smsc option (Paweł Kot) o resolve copyright issues (Paweł Kot) * 6510 driver updates o correctly read SMS datetime (Paweł Kot) o deleting sms can return an unhandled message (BORBELY Zoltan) o various file (gallery) functions added (Chris Kemp) o full reset function added (Chris Kemp) o DKU2 support added (Chris Kemp) o fix todo writing (Balint Reczey) o GetSMSFolder will return correct folder ids (BORBELY Zoltan) o CalendarNotesInfo message parsing enhanced (BORBELY Zoltan) o update irda_blacklist models (Paweł Kot) * 7110 driver updates o ringtone list will return fix entries too (BORBELY Zoltan) o call status query function added (BORBELY Zoltan) o call management functions has been rewritten (BORBELY Zoltan) o GetSMSFolder will return correct folder ids (BORBELY Zoltan) o clock and alarm can be set (BORBELY Zoltan) * link layer updates o Support for the DKU2 cable added (Chris Kemp) o DKU2 kernel module patches for 2.4.22 and 2.6.9 (Chris Kemp) o fix the compilation for dku2 when the kernel sources are not located in /usr/src/linux (Paweł Kot) o some minor cleanups of the 2.6 driver (Paweł Kot) * documentation updates o added new FAQ entry regrading win32 setup and the relvant sample in Docs/sample/gnokiirc (Paweł Kot) o gnokii --divert alternative added to the FAQ (Oliver Rath) o added gnokiid AT command set documentation (Daniele Forsi) o document some unhandled frames for 6110 protocol (Paweł Kot) * libgnokii updates o add the function to validate the given date (Paweł Kot) o add optional parameter to disable the retransmission policy; it is disabled by defaults due to the breakage reports caused probably by this policy (Paweł Kot) o add new_message_store field of gn_memory_type type to gn_sms_status (David Vrabel) o skip leading '+' in the numbers of unknown type (David Vrabel) o add the ability to search the network code and country of origin (Paweł Kot) o fix SMS year > 2004 printing in the debug mode (Paweł Kot) o fix off-by-one potential bug in findcrlfbw() (Jens) o fix phonebook vcard writing which appended a newline character at the end of each entry (Paweł Kot) o escape '\n', '\r', ';', ',' and '\' in the phonebook entries for raw and vcard types (ldif is todo) (Paweł Kot) o lvalue casts eliminated (BORBELY Zoltan) o add the ability to read the configuration from memory (let the file reading things do the application) (Bastien Nocera) * 6100 driver updates o add Nokia 8850 support (Denis Pitzalis) o handle new frames when SIM card is not inserted (Paweł Kot) o remove unnecessary switches on smsc->format and smsc->validity (Paweł Kot) * build system updates o add $(LDLIBS) to libgnokii.a target (Paweł Kot, Bastien Nocera) o UNIX98 pty detection cross-compileable (David Vrabel) o correctly handle --disable options to configure script (Paweł Kot) o update Linux binary packages build scripts (Paweł Kot) * xgnokii updates o in the logo manager, in the operator drop down list, notice the country origin for each operator (to let choose the right operator in case of the names conflict) (Paweł Kot) o as we have the above, let's allow to set the network code in the bitmap for the operator logo (Paweł Kot) o don't crash with some locale set (Paweł Kot) o fix off-by-one bug in sms number handling; submitted by anonymous, bug #12827 (Paweł Kot) * AT driver updates o use all three parameters to AT+CMPS command to set message store of all operations kind (we used just the finst one so far) (David Vrabel) o fix an overflow with AT_CHAR_UCS2 charset within the phonebook (Jens) * smsd updates o make configurable where to look for the new messages (David Vrabel) * gnokiid updates o use correct time field from the sms structure (Daniele Forsi) * gnapplet driver updates o getprofile support (BORBELY Zoltan) o getactiveprofile support (BORBELY Zoltan) o unnecessary variables eliminated (BORBELY Zoltan) 0.6.4 ===== * build system updates o wrong permissions for gnapplet.sis (Ville Skyttä) o when AC_PATH_X returns empty set of x_includes, but X11 libraries are present in the system, configure would incorrectly add -I to XPM_CFLAGS (Paweł Kot) o use pq_config instead of hardcoding paths in smsd Makefile (Ville Skyttä, Bradley Marshall, Paweł Kot) o fix MSCS debug build (Phil Ashby, Paweł Kot) o mingw-cross.sh explicitly disables X support (BORBELY Zoltan) * AT driver updates o add more workarounds for SonyEricssons (Hugo Haas) o add Nokia Premicell support (Jonas Berlin) o clear empty flag when phonebook entry read (BORBELY Zoltan) * gnapplet driver updates o fix incorrect bracketing (Greg Alt) o deletesms support (BORBELY Zoltan) o unvalidated version of getsms and deletesms (BORBELY Zoltan) o unfinished movesms support (BORBELY Zoltan) o setsmscenter support (BORBELY Zoltan) o getsmscenter set the id field incorrectly (BORBELY Zoltan) o getcalendarnote support (BORBELY Zoltan) o writecalendarnote support (BORBELY Zoltan) o deletecalendarnote support (BORBELY Zoltan) o various minor calendar handling fixes (BORBELY Zoltan) o gettodo support (BORBELY Zoltan) o writetodo support (BORBELY Zoltan) o deletealltodos support (BORBELY Zoltan) o clear empty flag when phonebook entry read (BORBELY Zoltan) o getdatetime support (BORBELY Zoltan) o setdatetime support (BORBELY Zoltan) o getalarm support (BORBELY Zoltan) o setalarm support (BORBELY Zoltan) * gnokii updates o initialize error variables (SuSE) o make --writephonebook --find-free work (Paweł Kot) o --writephonebook does not wait infinitely for answer in the interactive mode; it assumes no with the incorrect answer (Reiner Steib) o implement end keyword for --gettodo, --getcalendarnote, --deletecalendarnote and --deletephonebook (Paweł Kot) o fix behaviour of --deletephonebook with 'end' keyword (Paweł Kot) o --getphonebook end stops after every entry read (Marco Canini, BORBELY Zoltan) o search for an empty phonebook entry fixed (BORBELY Zoltan) o correctly exit when the device is locked (Paweł Kot) * libgnokii updates o fbus echo cancellation and statemachine fix (BORBELY Zoltan) o todo vcalendar import/export functions was mixed when libical support is missing (BORBELY Zoltan) o clear phonebook entry before parsing an input into it (Paweł Kot) o message dumps were written into ~/.gnokii-errors if debugging was enabled (BORBELY Zoltan) o missing config file isn't an error (BORBELY Zoltan) * xgnokii updates o xgnokii tried to open the HTML file according to locale set, be smart and try to match the best one is the default is not found (Ville Skyttä, Paweł Kot) o SMS window will be automatically refreshed (BORBELY Zoltan) o config saving and restoring fixed (BORBELY Zoltan) o enlarge room for text in 'Overwrite file?' dialogs to 255 characters (Paweł Kot) o correctly exit when the device is locked (Paweł Kot) * 6100 driver updates o calendar entry types was mixed (Paweł Kot, BORBELY Zoltan) * 6510 driver updates o add Nokia 6800 and family support (Chris de Vidal) o fix incorrect set of operator_logo_width in Nokia 8310 (Giorgio Rusconi) o add Nokia 6610i support (Julien LOLLIVIER, vee.lehtinen@dnainternet.net) o add Nokia 6650 support (BORBELY Zoltan) o capabilities was missing from Nokia 6810 (BORBELY Zoltan) o add Nokia 7210 support (BORBELY Zoltan) o IrDA disabled for Nokia 6610i and 7210 (BORBELY Zoltan) o add Nokia 6230 support (BORBELY Zoltan) o empty phonebook was reported as an error (BORBELY Zoltan) o IrDA blacklist handling generalized (BORBELY Zoltan) o add Nokia 7250 and 7250i support (BORBELY Zoltan) o Nokia 7250 and 7250i blacklisted (BORBELY Zoltan) o Nokia 5100 blacklisted (BORBELY Zoltan) * portability changes o NetBSD also fall into unices category (Richard M Kreuter) o NetBSD needs the same tricks as OpenBSD and FreeBSD in utils/mgnokiidev.c and common/data/virtmodem.c (Richard M Kreuter) * documentation updates o update gnokii.1 manpage (Reiner Steib) o update gnokii-ir-howto: mention Nokia models it describes, add note about USB adapters and fix some typos (Paweł Kot) * gnokiid updates o caller id support added to AT emulator (Daniele Forsi) o don't segfault when the device is locked (Paweł Kot) * 7110 driver updates o empty phonebook was reported as an error (BORBELY Zoltan) * 3110 driver updates o model number 2501 added (BORBELY Zoltan) * smsd updates o support for drivers without GN_OP_GetSMSStatus (Jan Derfinak) o correctly exit when the device is locked (Paweł Kot) 0.6.3 ===== * portability fixes o build atsoer.c under MSVC (Phil Ashby) o remove not used win32/fcopy.bat (Paweł Kot) * build system updates o build intl/ only when it's needed (Paweł Kot) * libgnokii changes o protect atsoer.h with _gnokii_atsoer_h, not _gnokii_ateric_h (Phil Ashby) o use correct declaration of locale_charset() (Paweł Kot) 0.6.2 ===== * portability fixes o Windows portability fixes (BORBELY Zoltan) o fix FreeBSD build: don't include stdint.h explicitely (Shawn Kennedy) o fix Windows build (link gnapplet to libgnokii.dll)(Paweł Kot) o pkt.c was missing from the Windows build (BORBELY Zoltan) o serial_opendevice sets handshake and speed in the win32 version too (BORBELY Zoltan) o add irda support for Windows systems (Phil Ashby) * build system updates o update Slackware build scripts; we have now 2 scripts to to build with and without X11 support (Paweł Kot) o add the information about possibility to have smaller binaries with MSVC (Phil Ashby) o add buildin irda for WIN32 in the Makefile (Phil Ashby) o add direct.h detection (Paweł Kot) o try to correctly link with all needed libs (libintl and libiconv) (Paweł Kot) o fix MSVC build (Phil Ashby, Paweł Kot) o document environmental variables for configure script (Paweł Kot) o let ./configure --with-included-gettext work correctly -- fix undeclared INSTALLPREFIX macro (taken from libiconv) (Paweł Kot) o correctly add linking libraries where needed (Paweł Kot) o add m4 macros to allow harmless CVS build on all(?) platforms (Paweł Kot) o fix misc compilation warnings (Paweł Kot) * gnapplet series updates o folder management support (list, status, create, delete) support added (BORBELY Zoltan) o getsms support (BORBELY Zoltan) o sms status request support (BORBELY Zoltan) o minor phonebook reading/writing cleanup (BORBELY Zoltan) o sendsms support (BORBELY Zoltan) o getsmscenter support (BORBELY Zoltan) * gnokii updates o --showsmsfolderstatus added (BORBELY Zoltan) o folder id display fix in --deletesmsfolder (BORBELY Zoltan) o escape semicolons from phonebook fields in the csv output (Paweł Kot) o display --getsecuritycodestatus error code (BORBELY Zoltan) o link with irda libraries on win32 build (Phil Ahsby) * libgnokii updates o understand escaped semicolon in the phonebook csv input (Paweł Kot) o allow to write empty name and empty number for the phonebook (Paweł Kot) o add sanity check for null pointers to links/* files - it seems to be the problem when using gnocky (Paweł Kot) o clear strings before using them in phonebook reading (Dmitry Astapov) o display rfcomm_channel parameter at startup (BORBELY Zoltan) o fix sms timestamp export/import (BORBELY Zoltan) o allow to open other config files than /etc/gnokiirc and $HOME/.gnokiirc (Paweł Kot) o the new cfgreader skipped /etc/gnokiirc (BORBELY Zoltan) o fix usage of char_unicode_encode() and pnok_string_encode(): check the return code (Paweł Kot) o try to get rid of 'bindir' config variable, it is usable only for gnokiid, but let's stay backward compatible (Paweł Kot) o at_dprintf() emitted debug messages unconditionally (BORBELY Zoltan) o new error codes for SIM related problems (BORBELY Zoltan) o packet dump was incorrect when len % 16 == 0 (BORBELY Zoltan) o gnokii_strsplit() crash bug fixed (BORBELY Zoltan) o use libical as the primary vCal handling way (Paweł Kot, Martin Goldhahn) o split up shared part of !HAVE_IRDA to a separate file (Paweł Kot) o clean up irda code: headers usage, etc (Paweł Kot) o add support for writing calendar and todo entries in vCal format even if there's no libical in the system (Paweł Kot) o use af_irda header as the system one, not gnokii specific (Paweł Kot) * xgnokii updates o escape semicolons from phonebook fields in the csv output (Paweł Kot) o generate the same output with phonebook export as gnokii (Paweł Kot) o accept long phonebook lines (import and export) (Paweł Kot) o fix mixed name/number entry field usage (Peter Grandi) o don't force file mode on installation where not necessary (install -m mode) (Ville Skyttä, Paweł Kot) o update html documentation (Paweł Kot) * nk6510 series updates o added Nokia 3595 to the supported models (Gunnar Sigurdsson) o don't refuse to work with Nokia 6100 with configuration other then Linux/IrDA (Paweł Kot) o handle empty calentar entries not as an error (Paweł Kot) * AT series updates o findcrlfbw() overrun at the beginning (BORBELY Zoltan) o unsolicited network info (+CREG) dropped (BORBELY Zoltan) o extra spaces skipped in the identify replies (BORBELY Zoltan) o network code can be specified without quotes (BORBELY Zoltan) o GetSecurityCodeStatus fixed (BORBELY Zoltan) o extended error handling (CME and CMS erros) (BORBELY Zoltan) o SetPDUMode was missing from GetSMS (BORBELY Zoltan) o GetNetworkInfo won't crash if there's no net (BORBELY Zoltan) o use correct encoding on SonyEricsson (ie. encode everything way) (Hugo Hass) * nk7110 series updates o handle empty calentar entries not as an error (Paweł Kot) * smsd updates o finish libtoolization: use *.lo objects instead of *.o to avoid mixing fPIC (libgnokii) and non-fPIC (smsd) code (Ville Skyttä, Paweł Kot) 0.6.1 ===== * libgnokii updates o bump the version number (BORBELY Zoltan) o wctomb() second argument should be 0, not NULL (Paweł Kot) o update gn_phone_model[] from http://homepage.mac.com/alvinmok/nokia/firmware.html (BORBELY Zoltan, Paweł Kot) o gn_file_phonebook_read marks entry non-empty (BORBELY Zoltan) o log settings will be printed (BORBELY Zoltan) o build problem without struct timeval fixed (Paweł Kot) * build system updates o require flex at rpm build time (Olivier Kaloudoff) o it appears that we had backward compatibility problem since changing to use libtool -- if you overinstalled the sources manually with the shared lib, not removing it before, ldconfig used old libraries assuming that 1.X is newer then 1.0.Y; we're bumping major version number to 2 to avoid the confusion (Paweł Kot) o when building the release tarball, apply all patches from patches/ subdir (Paweł Kot) o when building the release tarball we first make vcal.c with flex and then clean it with 'make distclean'; fix it keeping in mind that 'make -C common vcal.c' won't work after 'make distclean' (Paweł Kot) o get gnapplet.sis for the tarball and install it when present (Paweł Kot) * gnokii updates o accept range in --deletephonebook (BORBELY Zoltan) o deletephonebook initialisation fix (BORBELY Zoltan) o getphonebook didn't show the date field correctly (BORBELY Zoltan) * documentation updates o update TODO to reflect real issues (Paweł Kot) o mention default caller groups in the manpage (Reiner Steib) o update INSTALL file to match autogen.sh contents (Paweł Kot) o added Docs/README-Symbian (BORBELY Zoltan) * xgnokii updates o contacts won't save a trailing semicolon (BORBELY Zoltan) * gnapplet series updates o gnapplet support added (BORBELY Zoltan) o minimal phonebook management support (BORBELY Zoltan) o GetMemoryStatus support added (BORBELY Zoltan) o DC/MC/RC memory handling added (BORBELY Zoltan) o Identify will cache the result (BORBELY Zoltan) o network info and rf level support added (BORBELY Zoltan) o power source and battery level support added (BORBELY Zoltan) o gnapplet receives and prints debug messages (BORBELY Zoltan) o SX1 added as a supported model (BORBELY Zoltan) o 6600 added as a supported model (BORBELY Zoltan) * link layer updates o gnbus treats IrDA as serial (BORBELY Zoltan) * AT series updates o simplify code adding at_decode and at_encode functions doing the right thing for the given encoding (Hugo Hass) 0.6.0 ===== * libgnokii updates o added 5210 information (Paweł Kot) o typo: use __unices__ instead of unices (Paweł Kot) o let gnokii understand X_GSM_* fields in vCard file; these fields are gnokii internal thing and set memory type, location and caller group (Paweł Kot) o fix spelling: OCASSION->OCCASION; it makes calendar import to work ok (Paweł Kot, Costin Grigoras) o add support for repeat (recurrence) for meeting and call calendar events (when reading) (Paweł Kot) o correctle read bitmap names from the phone (Paweł Kot) o extract decodephonebook from gnokii and export it from libgnokii as gn_file_phonebook_raw() (Paweł Kot) o better debugging support (BORBELY Zoltan) o reset character enc/dec state (Bao Haojun, BORBELY Zoltan) o better unicode encoded sms length calculation (Bao Haojun, Paweł Kot, BORBELY Zoltan) * AT series updates o try to handle correctly sms empty location (Paweł Kot) o use actual encoding when reading network information (Igor Popik) o remove leading spaces from the model information introduced by earlier changes (Ron Yorston) o handle Motorola C350 way of memory status checking (Ron Yorston) o if the phone doesn't report used/total memory return GN_ERR_NOTSUPPORTED (Ron Yorston) * 6100 series updates o add support for DeletePhonebook (BORBELY Zoltan) * gnokii updates o GNOKIIDLL_IMPORTS required on win32 platform (BORBELY Zoltan) o set default values of memory type and location to the sane values when using --writephonebook (Paweł Kot) o output repeat/recurrence value when reading calendar entry (Paweł Kot) o clean the structures so we don't have garbage from the previous loop when reading multiple calendar entries (Paweł Kot) o extract decodephonebook from gnokii and export it from libgnokii as gn_file_phonebook_raw() (Paweł Kot) * documentation updates o add short description of --getphonebook raw format to the gnokii manual page (Paweł Kot, Reiner Steib) o add different memory types description to the gnokii manual page (Reiner Steib) o Nokia 7250i seems to have the same bug(?) as 6100 (Hadley Rich) o update information on AT tested phones (Paweł Kot) * nk6510 series updates o handle correctly the case with more then 50 calendar entries in the phone; previous fix missed some chunks (Paweł Kot) o Nokia 8310 has different logo sizes and battery indicator (The Ribena Kid) * xgnokii changes o be compatible with gnokii -- use ME/SM instead of A/B for phone/simcard memory when saving/reading phonebook entry (Reiner Steib, Paweł Kot) o use gn_file_phonebook_raw() instead of ParseLine() (finally!) (Paweł Kot) o add proper checking of GetMemoryStatus return code (Ron Yorston) * build system updates o reflecting smsd libtoolization in packages (BORBELY Zoltan) o configure enables debugging support (BORBELY Zoltan) o disable nls support when neither xgettext nor msgfmt is found, we're not able to build po/ then (Paweł Kot) * translation updates o new Polish translation (Daniel Koæ, Paweł Kot) 0.5.10 ====== * maintainance updates o ftp.gnokii.org does not exist (Paweł Kot) o mygnokii apparently does not exist (it is called gammu now), and it seems that it may be not compatible with sendsms (Paweł Kot) o don't say that gnokii is Nokia only in the spec file (Paweł Kot) o also we are not Linux/Unix only (Paweł Kot) o update manpage (Paweł Kot) * build system updates o update spec file to install all libs (Paweł Kot) o sync Debian build files with Debian mainstream package (Paweł Kot) o more improvements to make install variants (Paweł Kot) * libgnokii updates o correctly use gn_ringtone->notes_count; this is unsigned char and therefore it will be always less then GN_RINGTONE_MAX_NOTES which is 256 (Paweł Kot) o add support for explicit DeletePhonebook entry: AT, nk7110, nk6510 drivers and gnokii have it implemented (Igor Popik, Paweł Kot) o temporary fix for the memory corruption caused by strings decoding; proper solution will be to change the signature of encoding/decoding functions adding an extra parameter with the maximal leghth of the bytes to be written (Paweł Kot) o fix char_ucs2_encode (Igor Popik) * AT series updates o getnetworkinfo always terminates the result (BORBELY Zoltan) o manufacturer for +CGMI request can be quoted (Ron Yorston) o name string with phonebook entry may not be quoted (Ron Yorston) o avoid crash in AT_DeletePhonebook (Paweł Kot) o add support for answering and hanging up the call (Igor Popik) * 6510 series updates o don't require to have any subentries filled in when writing phonebook entry (Paweł Kot) o fix uncorrect call of PackBlock (Reiner Steib) * 7110 series updates o don't require to have any subentries filled in when writing phonebook entry (Paweł Kot) * smsd updates o libtoolization finished (BORBELY Zoltan) * 3110 series updates o fix alternate range of sequence numbers (Osma Suominen) * xgnokii updates o set default browser to preview the help pages to mozilla as it seems to be much popular then netscape these days (seen in FreeBSD patches) (Paweł Kot) * gnokii updates o reorganize --help output (Paweł Kot) 0.5.9 ===== * maintainance updates o supress compilation warnings (Paweł Kot) o caller group name and ringtone will be shown (BORBELY Zoltan) o install po/ directory with make install (Guido Falsi) o libtool support added (PLD Team, BORBELY Zoltan) o mingw cross compilation fixes (BORBELY Zoltan) o update po files (Paweł Kot) o update config/ to the more recent versions (Paweł Kot) o use replacement libintl when required (BORBELY Zoltan) o configure generated po/Makefile twice (BORBELY Zoltan) o fix incorrect escaping in configure.in (BORBELY Zoltan) o better win32 dll support (Paweł Kot, BORBELY Zoltan) o make Debian users happy: tarball will contain debian directory already on the place (Paweł Kot) * smsd updates o update README with some module clarification (Paweł Kot) * xgnokii updates o don't segfault on incorrect initialization (Paweł Kot) * 6100 series updates o uninitalised stack variable in IdentifyPhone (BORBELY Zoltan) * libgnokii updates o fix memory leaks reported by valgrind (Paweł Kot) o try to avoid segfault with large phonebook reading (Paweł Kot) o fix the bug reported by Peter Gervai that gnokii is unable to read calendar with more then 220 entries; fix corrects nk6510 and nk7110 drivers (Paweł Kot) o __declspec(dllimport) is required if someone using a win32 gnokii.dll (BORBELY Zoltan) o utf8 handling without nl_langinfo(CODESET) (BORBELY Zoltan) o subentry number field enlarged (Helge Deller) * 6510 series updates o disable Nokia 6100 support: IT IS KNOWN TO BREAK PHONES (Paweł Kot) o getsmsc will use the correct smsc name len (BORBELY Zoltan) * gnokii updates o playringtone won't play an endless note (BORBELY Zoltan) 0.5.8 ===== * maintainance updates o update make_dist script to reflect tar.bz2 file build (Paweł Kot) o don't build unixirda.c, unixbluetooth.c and osxbluetoooth.c under win32 (Paweł Kot) o use $(CC) detected by configure instead of hardcoded gcc in smsd Makefile; taken from FreeBSD port (Guido Falsi) o do make install only in the dirs where there's something to install; inspired by FreeBSD port patches (Paweł Kot) o let make gnokii-debug in common/ with debug and xpm enabled (Paweł Kot) o build and install libgnokii.a unconditionally (Paweł Kot) * 6510 series updates o added Nokia 3510i to the supported phones list (Rafal Czlonka) o new error code when writing phonebook (Paweł Kot) * documentation updates o FAQ update and synchronize with WWW version (Paweł Kot) o rttl is rtttl (ringing tone text transfer language (Torsten Kunkel, Paweł Kot) o reflect the changes on savannah, our host site (Paweł Kot) o fix a typo causing formatting error in gnokii.1 (Torsten Kunkel) * libgnokii changes o rttl is rtttl (ringing tone text transfer language (changes internal API (Torsten Kunkel, Paweł Kot) o country and operator codes and names updated from www.gsmworld.com (Krzysztof Koziarek, Paweł Kot) o operator and country name search should be case insensitive (Igor Popik, Paweł Kot) o return international strings when no matching operator/country name was found for the given code (Paweł Kot) o add gnokii_strsplit() and gnokii_strfreev() to ease AT commands parsing (Igor Popik) * AT series updates o support for make call command (Igor Popik) o set data->phonebook_entry->empty when the phonebook location is empty (Igor Popik) o implement GetNetworkInfo (Igor Popik) * gnokii changes o handle argument correctness to getphonebook (Paweł Kot) o gnokii --help didn't show the real --writephonbook usage (Paweł Kot) o gnokii --writephonebook for multiple addresses was interrupted on the first error (Paweł Kot) o gnokii --writephonebook does not return an error with the last line (which is empty) (Paweł Kot) 0.5.7 ===== * 6110 series updates o missing German characters added (BORBELY Zoltan) o call status query function added (BORBELY Zoltan) * 7110 series updates o raw ringtone upload/download support added (BORBELY Zoltan) o ringtone upload/download/list support added (BORBELY Zoltan) o SetProfile implemented (BORBELY Zoltan) * 6510 series updates o keyboard emulation isn't working, only up and down messages are known (BORBELY Zoltan) o call management functions implemented (BORBELY Zoltan) o add 3510 to the supported models list (Dirk Meul) * AT series updates o GetSMSStatus implemented (BORBELY Zoltan) * portability fixes o libgnokii.dsp (Visual Studio) updated (BORBELY Zoltan) o VC debug and release flags differs (Ender) o extern symbols marked (BORBELY Zoltan) o Bluetooth support on Mac OSX (Olivier Kaloudoff, Siegfried Schloissnig) o Bluetooth support on FreeBSD (BORBELY Zoltan) o Mac OSX bluetooth code fixes (Olivier Kaloudoff) o Minor bugs found during the 2003-09-16 -> latest changeset review (BORBELY Zoltan) * translations updates o Estonian translation updated (Hans Motshärg) o French translation updated (Olivier Kaloudoff) * libgnokii updates o utf8 encoding/decoding fixed (BORBELY Zoltan) o too many lost reply caused phone lockups (BORBELY Zoltan) o new operators in Finland (Timo Metsälä) o rfcomm_channel config option added (BORBELY Zoltan) o call management API updated (BORBELY Zoltan) * gnokii updates o phone keyboard emulation reports only errors (BORBELY Zoltan) o usage of the sendsms and getcalendarnote will be sent to the appropriate device (Martin Goldhahn) o "end" keyword added to getcalendarnote (Martin Goldhahn) * Documentation updates o network registration message updated (Rodolfo Hansen) 0.5.6 ===== * 6510 series updates o GetRawRingtone reply differs on 6310 (BORBELY Zoltan) o GetSMSFolders hardcoded blocklen fixed (Michael H. Warfield) o GetRingtoneList command added (BORBELY Zoltan) o This driver will support the 5100 model (Peter Pilsl) o ringtone handling unified (BORBELY Zoltan) o PlayTone support added (BORBELY Zoltan) o DeleteRingtone support added (BORBELY Zoltan) o smsc format parsed incorrectly (BORBELY Zoltan) * 6110 series updates o phonebook reading fixes (BORBELY Zoltan) o add nokia 3390 to supported models (BORBELY Zoltan) o GetRingtoneList for 61xx models added (BORBELY Zoltan) o ringtone handling unified (BORBELY Zoltan) o datacall cleanup (BORBELY Zoltan) o DeleteRingtone support added (BORBELY Zoltan) o CB and PhoneStatus disabled on NSE-8 (3210) (BORBELY Zoltan) o character encoding fixed (BORBELY Zoltan) * 7110 series updates o ringtone handling unified (BORBELY Zoltan) * gnokiid updates o double free bug eliminated from mgnokiidev (BORBELY Zoltan) o traditional pty support fixed (BORBELY Zoltan) o easily locateable and unique error messages (BORBELY Zoltan) * gnokii updates o writephonebook fixes (BORBELY Zoltan) o getringtonelist command added (BORBELY Zoltan) o getprofile shows the real ringtone name (BORBELY Zoltan) o deleteringtone command added (BORBELY Zoltan) o sendlogo won't load different logo type (BORBELY Zoltan) o missing break between vcard and ldap part (Vincent Glotzbach) * libgnokii updates o Nokia 6250 has irda (Paweł Kot) o utf8, base64 and LDIF export fix (Martin Goldhahn) o RLP fixes (SABM retransmission, Conn_Req) (BORBELY Zoltan) o AT emulator improved (BORBELY Zoltan) o dct3/4 raw ringtones handled differently (BORBELY Zoltan) o TCP device added to the phone drivers (BORBELY Zoltan) o portability fixes (BORBELY Zoltan) o new operator in Israel (Gilad Ben-Yossef) * Documentation updates o nk6510 ringtone handling messages updated (BORBELY Zoltan) o nk6510 getsmsc request/response updated (BORBELY Zoltan) * xgnokii updates o ringtone editor crash bug fixed (BORBELY Zoltan) o ringtone editor enhanced (BORBELY Zoltan) * translation updates o updated French translation (Olivier Kaloudoff) * build system updates o packaging file for mingw-cross build (BORBELY Zoltan) 0.5.5 ===== * translation updates o gettext 0.12.x requires MSGID_BUGS_ADDRESS variable in po/Makevars (Paweł Kot) o updated French translation (Olivier Kaloudoff) * 6110 series updates o PlayTone message and documentation fixed (BORBELY Zoltan) o get_locks_info and play_tone moved to nokia (BORBELY Zoltan) o GetRingtone support added (BORBELY Zoltan) * 7110 series updates o PlayTone implemented (BORBELY Zoltan) o GetLocksInfo implemented (BORBELY Zoltan) o GetProfile implemented (BORBELY Zoltan) * 6510 series updates o Nokia 6100 support added (Tobias Gebhard) o GetRawRingtone, SetRawRingtone added (BORBELY Zoltan) o GetRingtone, SetRingtone emulation added (BORBELY Zoltan) * libgnokii changes o Tomi Ollila's readmidi.c added (BORBELY Zoltan) o Nokia raw ringtone conversion functions (BORBELY Zoltan) o initial midi writing support (BORBELY Zoltan) o various ringtone fixes (BORBELY Zoltan) o nokia raw ringtone handling improved a lot, it can parse most of the built-in ringtones of the 6610 (BORBELY Zoltan) o fix concatenated sms support for unicode text (Paweł Kot) * Documentation updates o nk7110 profile reading messages updated (BORBELY Zoltan) o nk6510 raw ringtone get/set messages added (BORBELY Zoltan) * gnokii changes o ringtoneconvert support added (BORBELY Zoltan) o playringtone updates and fixes (BORBELY Zoltan) * xgnokii updates o Tomi Ollila's xring added and modified (BORBELY Zoltan) 0.5.4 ===== * win32 port updates o bump the version number (Paweł Kot) o fix compilation warnings (Paweł Kot) o read() needs #include (Paweł Kot) o use \033 escape sequence instead of \e (Paweł Kot) o fix incorrect paths in libgnokii.dsp (Paweł Kot) o add ldif.c to libgnokii.dsp (Paweł Kot) o *.dsp files need \r\n line terminating (Paweł Kot) o gnokiid.lib needs to be in $(ProjDir) not in $(ProjDir)\lib (Paweł Kot) * libgnokii fixes o fix the argument order in base64_encode() caller (Paweł Kot) * gnokii fixes o fix deletesmsfolder(): incorrect struct field was examined (Paweł Kot) o comment out useless code (Paweł Kot) 0.5.3 ===== * code cleanups o change error paths in getactiveprofile/setactiveprofile (Paweł Kot) o FreeBSD 5.x compilation fix (BORBELY Zoltan) o be sure to include all flags to gnokii.pc (Paweł Kot) o return the correct type value from phonet_send_message() (Paweł Kot) o use #defines instead of magic numbers when handling the phonebook (Paweł Kot) o profile constants moved from gnokii-app.h (BORBELY Zoltan) * statemachine changes o add function sm_block_ack(), needed by nk3110 (Osma Suominen) o remove hack that made it possible to call sm_block* independently of sm_message_send(), as doing so creates a race condition (Osma Suominen) * 3110 series updates o rewrite of fbus-3110 code: differentiate properly between acks and commands, initial support for RLP frames, bugfixes, acks recognized by seqno not by message type (Osma Suominen) o use sm_block_ack(), avoiding some races (Osma Suominen) o rm msgtypes that never happen b/c of folding (Osma Suominen) o support RLP frames in nk3110 driver code (Osma Suominen) o support for making calls [only voice tested] (Osma Suominen) o keep seqno on retries; detect duplicate seqnos (Osma Suominen) * gnokii changes o --help switch should work when there's no config file (suggested by Pavel Janik) (Paweł Kot) o --playringtone implemented (Tomi Ollila, BORBELY Zoltan) o when printing vCal file and date field, separate date and time fields with capital T; small t caused Mozilla Calendar to confuse (Paweł Kot) o add phonebook LDIF support; more reliable writephonebook() (Paweł Kot) * 6110 series updates o PlayTone implemented (BORBELY Zoltan) o GetMemoryStatus returns invalid memory type instead of internal error if type isn't supported (BORBELY Zoltan) o prepaid info message marked unsolicited (BORBELY Zoltan) o sms status message can crash the driver (BORBELY Zoltan) * xgnokii fixes o do not free message previously added to GSList (Josef Zlomek) o strip spaces from the number to be saved to the addressbook (Paweł Kot) * build system updates o avoid warnings on Linux when irda headers are detected (Paweł Kot) o linux/irda.h requires linux/types.h too (BORBELY Zoltan) o use INSTALL_DATA instead of INSTALL for xgnokii (Ville Skyttä) o mingw cross compilation support (BORBELY Zoltan) * libsms fixes o allow to input more then 160 characters for the text sms (Paweł Kot) o bring back to life sending text concatenated messages (Paweł Kot) * 6510 series updates o handle writephonebook error when incorrect characters are attempted to be saved in the number (Paweł Kot) o handle another writephonebook error (empty block) (Paweł Kot) o fix stupid bug in deletesms() (Paweł Kot) * Documentation updates o add missing manual pages for executables (Paweł Kot) o add a file with a history of the API changes (Paweł Kot) * libgnokii changes o fix vCal support; there can be multiple whitechars between key and colon (Paweł Kot) o add experimental and simple LDIF support; we will be able to import/export eg. Mozilla Addressbook (Paweł Kot) o add new function gn_memory_type2str() (Paweł Kot) o don't clear gn_phonebook_entry when reading vCard or LDIF file -- caller may have already prepared something (defaults) (Paweł Kot) o add sanitize functions: phones (at least Nokia) do not accept numbers with whitespaces in the phonebook; gn_phonebook_entry_sanitize() and gn_number_sanitize() can be used to remove white characters either from all number entries in the phonebook or in a single number (Paweł Kot) o add base64 and utf8 support (Paweł Kot, Martin Goldhahn) o use base64 encoding for non ascii entries in ldif addressbook (for Mozilla) (Paweł Kot, Martin Goldhahn) 0.5.2 ===== * build system updates o build also bz2 archive (Paweł Kot) o use INSTALL_DATA variable from the configure script (Ville Skyttä) o update INSTALL installation notes (Paweł Kot) * translations updates o Estonian translation updated (Hans Motshärg) o added French translation (Olivier Kaloudoff) * 3110 series updates o Phonebook support added (Osma Suominen) o Prevent race condition in getsms code (Osma Suominen) o prevent garbage in debug output in getsms (Osma Suominen) * utils updates o use --getphonebook and not --getmemory in sendsms utility (Ville Skyttä) * smsd updates o make smsd install compliant with FHS (Ville Skyttä) * gnokii updates o --[gs]etactiveprofile added (BORBELY Zoltan) o --monitor accepts delay as an argument (BORBELY Zoltan) o error messages cleanups (Paweł Kot) * 6110 series updates o GN_OP_[GS]etActiveProfile implemented (BORBELY Zoltan) * xgnokii fixes o sorting by date fixed in the sms window (BORBELY Zoltan) * AT series fixes o fix logic inversion error on terminating the connection which caused weired effect with connection set to incorrect value (Paweł Kot) 0.5.1 ===== * link layer updates o making fbus layer reentrant, it will fix possible smsreader problems (Keary Griffin & BORBELY Zoltan) * general fixes o caller logo sending fixed (Anton V.Dorofeev) o missing include in gnokii.h (for va_list) (Paweł Kot) o fix segfault when using locking and bluetooth connection (in general -- when there's no '/' char in the port config variable) (Paweł Kot) * 6110 series updates o "calendar functions busy" messages handled (BORBELY Zoltan) * gnokii updates o vCalendar export fixed (BORBELY Zoltan) o exit with 1 code (not 0) when incorrect options were given to gnokii (Paweł Kot) * portability fixes o there's no /var/lock directory on Solaris, use /var/run instead (Paweł Kot) 0.5.0 ===== * general fixes o fix vcard export (Florian Lohoff) o fix IrDA connection (broken by Bluetooth updates) (Paweł Kot) o fix SMS sending (Paweł Kot) o fix SMS reading (Paweł Kot) * documentation updates o mention that we support Bluetooth (Marcel Holtmann) * portability updates o stdlib.h included from compat.h (Paweł Kot) * gnokii updates o GetSMSCenter called for sendringtone (BORBELY Zoltan) 0.5.0rc4 ======== * portability updates o include in compat.h -- should cleanup compilation on some systems (eg OpenBSD) (Paweł Kot) o uint8_t will be defined only if there's no stdint.h and inttypes.h (BORBELY Zoltan) o abort configure if libiconv.h cannot be found (BORBELY Zoltan) o say "no" when IrDA support is not enabled (Paweł Kot) o Solaris has gethostbyname() in -lnsl, detect it (Paweł Kot) * api changes o don't use UpperCase variable names in API but lower_case (Paweł Kot) * cleanups o reorder exported headers: don't include unneccesary headers, be sure to have all things defined (currently Linux and MSVC6) (Paweł Kot) o do the same for Solaris (Paweł Kot) o and hopefully for other supported OSes (Paweł Kot) o don't modify const variable (Paweł Kot) o use the correct order in linking xgnokii (Paweł Kot) o don't expose rfcomm channel to the config file, autodetect the correct channel (Marcel Holtmann) * general updates o Bluetooth support for FBUS mode in nk6510 series (Paweł Kot, Marcel Holtmann) o don't loop forever with irda/bluetooth connection (Paweł Kot) o translate Bluetooth address in much nicer way (Marcel Holtmann) 0.5.0rc3 ======== * general updates o add pkg-config support (Paweł Kot) o use major and minor versions and soname for libgnokii (Paweł Kot) o portability fixes for OpenBSD (BORBELY Zoltan) o F_SETOWN disabled for OpenBSD (Paweł Kot) o u8 removed from gn_ringtone_pack (Helge Deller) o updates to spec file; rpm 4.x required (Tom G. Christensen) o more updates to spec file (Tom G. Christensen) o get rid of HAVE_BLUETOOTH in the exported header (Paweł Kot, Marcel Holtmann) o #ifdef @HAVE_BLUETOOTH_EXP@ should be #if @HAVE_BLUETOOTH_EXP@ (Paweł Kot) o information about ldconfig, /etc/ld.so.conf and such after issuing 'make install' (Paweł Kot) o report "Bluetooth: no" in the configure summary when bluetooth libraries are not found (Paweł Kot) * cbus update (Ladislav Michl) * nk7110 driver updates o get rid of global variables (Ladislav Michl) * documentation updates o cell buzzer messages added to nk6160 (Eduardo Garcia) 0.5.0rc2 ======== * general updates o fix stupid typo in fbus.c causing Bluetooth not work (Marcel Holtmann) o s/Janík/Janik/ in the translatable strings (Paweł Kot) o don't use u8 type in the exported headers (Paweł Kot) o add string.h to mgnokiidev (Troy Korjuslommi) o mention exiting Docs/Bugs and not Docs/Reporting-HOWTO when coming into trouble (Helge Deller) o Nokia 3650 information (Paweł Kot) * statemachine updates o fix u16/unsigned int mixing problems in the statemachine and link layer (Troy Korjuslommi, BORBELY Zoltan) * bitmaps handling updates o switch black and white in bmp handling (Polik) o read BMP with --viewlogo as operator logo and fix segfault on --viewlogo with BMP (Paweł Kot) * nk6510 driver updates o handle correctly the case when incorrect phonebook entry was attempted to write to the phone (Paweł Kot) 0.5.0rc1 ======== * build system updates o don't exit configure when no pthread library is present in the system (Paweł Kot) o check for stdint.h include (Paweł Kot) * nk7110 driver updates o fix dlr3p support (Paweł Kot) 0.5.0pre11 ========== * let configure check for (Paweł Kot) * more header cleanups: use #include instead of #include (Paweł Kot) 0.5.0pre10 ========== * general updates o move include files into their final(?) destination (Paweł Kot) o disable dancall support in 0.5 release (Ladislav Michl) o supress u8, u16 and bool types in the exported headers (Paweł Kot) o small cleanups in the links includes (Paweł Kot) o add make install target for includes subdir (Paweł Kot) o move win32/gnokii_v6 to win32/MSVC6 (Paweł Kot) o add missing headers in include/gnokii/* (Paweł Kot) o s/Janík/Janik/ (sorry Pavel), s/Pawe³/Paweł/ in translatable strings to avoid problems with newer xgettext (Paweł Kot) o some headers cleaup (Paweł Kot) o try to avoid #ifdef __unices__ (Paweł Kot) * Docs updates o add dancall.txt (Ladislav Michl) * SMSD updates o misc cleanups (Jan Derfinak) * nk6510 driver updates o Nokia 6360 confirmed to work (Scott Hepler) o add Nokia 6610 to supported models (Jorge Van Hemelryck) * nk3110 driver updates o more fixes to SMS code (Osma Suominen) o message type folding in the fbus-3110 code (Osma Suominen) o complicated statemachine tweaking removed (Osma Suominen) o 0x15 init frames handled better (Osma Suominen) o some more error handling (Osma Suominen) * nk6160 driver updates o DLR3P, DAU9P, Bluetooth and Irda added (BORBELY Zoltan) o add includes for the new fbus functions (Paweł Kot) * nk6100 driver updates o PressKey and ReleaseKey support for 3210 (BORBELY Zoltan) o support for Nokia 5100(?) (Paweł Kot) o get rid of the warning on missing parethensis (Paweł Kot) * statemachine changes o don't wait for an ack in case no message was sent (Osma Suominen) o don't erroneously report timeout if a message was not sent and the phone does not reply within 100ms (Osma Suominen) o moving the call of the sm_incoming_acknowledge into the send function in the atbus and fbus-3110 drivers (BORBELY Zoltan) o sm_incoming_acknowledge reverted in fbus-3110 (BORBELY Zoltan) * device layer updates o handling write errors in unixserial (BORBELY Zoltan) o fixing write error handling (BORBELY Zoltan) * build system updates o don't use --rpath option with shared library as it causes too much harm (Paweł Kot) 0.5.0pre9 ========= * libgnokii updates o don't send the initial sequence with FBUS over Bluetooth (Marcel Holtmann) o remove ugly #ifdefs as they are not needed in fact (Paweł Kot) o move null terminating of the decoded strings to gsm-encoding.c (James Clark, Paweł Kot) o fix compilation issues caused by bluetooth stuff (Paweł Kot) * translation updates o sync po files with current sources (Paweł Kot) 0.5.0pre8 ========= * nk3110 driver updates o remove keepalive stuff -- now obsoleted (Osma Suominen) o don't use the global variables; move them to the driver instance (Osma Suominen) o sanity check for data->raw_sms in IncomingSMSHeader() (Osma Suominen) * win32 compability changes o removed exports for non gn_ functions, helper functions need to be linked statically if u use libarary under Win32 (Marcus Godehardt) * libgnokii changes o prepare to support the connection over Bluetooth; make the appropriate changes in: device.c, cfgreader, fbus.c, nk6510.c (currently the only driver that will support bluetooth); note the [bluetooth] section in .gnokiirc; it DOES NOT work yet (Paweł Kot) o rename 'class' field from one of the sms structs to avoid conflicts with C++ name space; now it is 'm_class' (as of message class) (Paweł Kot) o GN_ERR_INVALIDLOCATION is invalid and not empty location (Osma Suominen) o fix other C++ namespace clashes: try, new, this (Marcus Godehardt) o rfcomm channel has uint8_t type (Marcel Holtmann) o fix string -> bdaddr_t conversion in cfgreader (Paweł Kot) o use socket interface when the bluetooth in configured in the .gnokiirc and tty interface otherwise (Paweł Kot) * statemachine changes o allow sm_block and friends to be used not only directly after sm_message_send but also with sm_reset in between, which sets the state to GN_SM_Initialised (Osma Suominen) o ... and revert it ;-) (Osma Suominen) * gnokii updates o set number type in sendringtone() (Anton V.Dorofeev) * AT updates o make Bluetooth work over tty interface (Paweł Kot) * docs updates o update MacOS X README (Ruotger Skupin) 0.5.0pre7 ========= * Misc updates, cleanups and fixes o using strchr() for better portability (BORBELY Zoltan) o enable tekram device on win32 platform (BORBELY Zoltan) o ease a bit compilation procedure on MacOS X (Ruotger Skupin) o cz and sk operator names changes (Vitezslav Samel, Ernest Beinrohr) o retransmission occurs only if the phone won't transmit the acknowledge frame (BORBELY Zoltan) o implement access to network and country names (Ladislav Michl) o new operator in Singapore (Fabrice MARIE) o fix inclusion of snprintf and vsnprintf prototype definitions (Marcus Godehardt) o sys/filio.h required on Solaris systems (BORBELY Zoltan) o retransmission based solely on timeouts (BORBELY Zoltan) * build system updated o avoid problems with recursive loop when installing locales in xgnokii (Malte Schünemann) * docs updates o more info on Nokia 3410 FBUS protocol oddities * xgnokii updates o fix segfault when saving SMS to mailbox (Jiri Masik?) * nk6510 driver updates o fix the problem with incorrectly set number of the messages in the sms folder (Paweł Kot) o fix the --getdatetime problem (Paweł Kot) o fix incorrect casting to char (Paweł Kot) * AT driver updates o fix sms sending (Paweł Kot) o fix answer missunderstading in atbus_rx_statemachine (Ladislav Michl) * MS VC6 compability fixes o include tekram.h also with WIN32 enabled (Marcus Godehardt) o VC6 does not define O_RDWR (Marcus Godehardt) o VC6 does not have mkdir() (Marcus Godehardt) o correct headers in gnokii.c (Marcus Godehardt) o undef ERROR when define own ERROR() macro to avoid conflicts (Marcus Godehardt) * libsms fixes o update sms number in gn_sms struct with the one returned by the phone from gn_sms_raw (Osma Suominen) * nk3110 driver fixes o handle memory types more nicely -- introduce get_memory_type() (Osma Suominen) 0.5.0pre6 ========= * Misc updates, cleanups and fixes o updated German operator names (Ruotger Skupin) o using increasing instead of constant timeout values in message retransmission (BORBELY Zoltan) o define gn_elog_handler as NULL in xgnokii, gnokiid and smsd (Paweł Kot) * SMSD updated o English grammar corrections in README (Peter Nixon) * AT driver updates o avoid ReplyGetCharset segfaults with more then 2 charsets availale (Paweł Kot) o fix phonebook reading when UCS2 encoding is not available (Paweł Kot) o avoid segfault on attempt to write the phonebook entry with xgnokii and Nokia phones (Paweł Kot) o fix phonebook writing when using HEXGSM alphabet (Paweł Kot) * nk3110 driver updates o bring the driver back to life in new API (Osma Suominen) * docs updates o note that /dev/ttySX is the Linux notation (Paweł Kot) 0.5.0pre5 ========= * Misc updates, cleanups and fixes o move mkinstalldirs to config/ (Paweł Kot) o update README (Paweł Kot) o CREDITS - again, thanks to everyone who helped (Paweł Kot) o bring dpkg build scripts up to date (Paweł Kot) o bring gnokii.spec up to date (Paweł Kot) o increase max calnotes number to 1024 (Paweł Kot) o set the default smsc timeout to 10 seconds and use the correct form (smsc_timeout in the [global] section instead of timeout in [sms] section) in sample gnokiirc (Paweł Kot) o changing smsc_timeout from unsigned int to int, this was the real reason of the invalid smsc_timeout (BORBELY Zoltan) o update po files (Paweł Kot) o new versions of config.guess, config.rpath, config.sub, install-sh, mkinstalldirs (Paweł Kot) o fix vCalendar file reading: not only alpha chars may be in the body, correctly use snprintf (Paweł Kot) o *.bmp is not necessarily a startup logo (Polik) o correct include of winserial.h in tekram driver (Polik) o give the working config example in gnokii-IrDA-howto (Simon Huggins) o install sendsms on make install (Paweł Kot) * Build system fixes o fix a stupid bug in configure that made configure not detect many functions/types when user didn't explicitely give --without-x and X headers were not found by configure (CPPFLAGS became to have value '-I') (Paweł Kot) o fix FreeBSD build (Alexander V. Ribchansky, Peter Kolmisoppi) o fix the order of the library linking (Paweł Kot) * libsms fixes o fix sms_free_deleted() (Ulrich Hopp) o fix segfault on reading sms in nk7110 driver (Paweł Kot) o initial support for WAP Push (Martin Krupicka) * xgnokii fixes o indexes with messages list were switched (Ulrich Hopp) o fix problems with choosing names from the addressbook on sms sending (Ulrich Hopp) o compare folder and number not just number for the incoming/deleted messages (Ulrich Hopp) o mark read messages as read (Ulrich Hopp) o sort sms alphabetically (Ulrich Hopp) o save sms to mailbox (Ulrich Hopp) * documentation updates o new Estonian translation (Hans Motshärg) o man page update for gnokii --getlocksinfo (Bertrik Sikken) o get 61xx wap info documentation from gammu (Bertrik Sikken) * gnokii updates o --getnetworkinfo displays the LAC and cell id fields as a zero padded four digit hex number (BORBELY Zoltan) o correctly handle memory types in writephonebook() (Pat Sewall) o add --getlocksinfo along with 6100 driver (Bertrik Sikken) o make --getlogo caller more convinient to use: switch 'caller group number' and 'logofile' arguments (Paweł Kot) o fix deletecalendarnote for nk7110 and nk6510 drivers (Paweł Kot) o Please enter SMS text... message displays only when stdin is a terminal (BORBELY Zoltan) o --smsreader fixes (BORBELY Zoltan) o introduce a consistency with gnokii return values -- be sure at least to return non zero on the failure (Paweł Kot) o don't exit with multiple deletesms on a single failure (Paweł Kot) * smsd fixes o FreeBSD doesn't have libdl and smsd can be complied there without -ldl (Peter Kolmisoppi) o Wrong assumption on char signedness (Gerhard Tonn) * 7110 series updates: o dropping duplicated frames during pb read (BORBELY Zoltan) o fix calendar notes write support (Paweł Kot) o fix calendar deletion support (Paweł Kot) o fix calendar info reading (Paweł Kot) o fix reading caller icons (Paweł Kot) o fix reading speeddials (Paweł Kot) * 6510 series updates: o fix reading caller icons (Paweł Kot) o fix reading speeddials (Paweł Kot) o fix calendar notes write support (Paweł Kot) o fix calendar deletion support (Paweł Kot) o fix calendar info reading (Paweł Kot) * 6100 series updates: o better fix for busy (0xc9) frame (BORBELY Zoltan) o Nokia CardPhone support updated (Georg Moritz) o clear data before delete the incoming sms (BORBELY Zoltan) * AT series updates: o fix charset handling (Ladislav Michl) 0.5.0pre4 ========= * Misc cleanups o move ppp examples from samples directory do samples/ppp (Paweł Kot) o add gsm-filetypes.o to libgnokii.so/libgnokii.a (Paweł Kot) o fix install-docs target (Paweł Kot) o is deprecated since XFree86 4.2.1, so don't depend on it anymore and correctly include the header in gsm-filetypes.h (P. Christeas, Paweł Kot) o compile unixirda.c, unixbluetooth and fbus-phonet unconditionally (Paweł Kot) * xgnokii fixes o fix coredump when reading clock (Ulrich Hopp) o fix compilation warning with asprintf (Paweł Kot) o zero the gn_sms structures when mallocing (Ulrich Hopp) o handle correctly alarm/clock (Paweł Kot) * gnokii updates o add --getnetworkinfo (Bertrik Sikken) * build system fixes o correctly set CFLAGS with --enable-debug (Paweł Kot) * nk6510 driver updates: o don't segfault with uninitialized data->alarm (Paweł Kot) o don't segfault with uninitialized data->sms_status (Paweł Kot) 0.5.0pre3 ========= * Docs updates: o FAQ updates: + update status of the supported phones (Paweł Kot) + fix typos (Paweł Kot) + new entry on how to test the new model (Paweł Kot) o be more up-to-date with gnokii-hackers howto; still needs updates and verification (Paweł Kot) * Compability changes: o move some parts from misc.{ch} to compat.{ch} (Paweł Kot) o detect ptr_t (Paweł Kot) o replaced AM_GNU_GETTEXT with AM_GNU_GETTEXT([external]) in configure.in (Mariusz Mazur) o support all gettextize versions in the correct manner (Mariusz Mazur) o add po/Makevars (Mariusz Mazur) o few corrections for the po files copyrights (Paweł Kot) o __ptr_t detection fixed to work with older autoconf packages (BORBELY Zoltan) o add po/Makefile target in configure.in so it should work everywhere (Paweł Kot) * New API for gnokii [some of these changes are temporary -- they will allow be to better control the changes] o group the internal API functions in gnokii-internal.h (Paweł Kot) o group the external API functions in gsm-api.h (Paweł Kot) o reorganization in the common files: -data, -common, -statemachine (Paweł Kot) o cleanup of the xgnokii; adapt to the new api (P. Christeas) o adapt smsd to the new api (BORBELY Zoltan) o use just 1 include (gsm-api.h) in gnokii.c (Paweł Kot) o use just 1 include (gsm-api.h) in smsd (Paweł Kot) o use just 1 include (gsm-api.h) in xgnokii (Paweł Kot) o use just 1 include (gsm-api.h) in gnokiid (Paweł Kot) o make data/virtual.h part of the external API (Paweł Kot) o state populated to the device layer (BORBELY Zoltan) o config settings moved into state->config (BORBELY Zoltan) o high level config reading function added (BORBELY Zoltan) o gn_gsm_initialise and config handling cleanup (BORBELY Zoltan) o gn_cfg_get eliminated from the device, link and phone layer (except the device_script block) (BORBELY Zoltan) o xgnokii XDEBUG compilation fixes (Ulrich Hopp) * 6110 series updates: o M2BUS support added (BORBELY Zoltan) * 7110 series updates: o M2BUS support added (BORBELY Zoltan) * 6160 series updates: o static and global variables have been eliminated from the the source (Ladislav Michl) * 6510 series updates: o fix incorrect order for SEND_MESSAGE_BLOCK and SEND_MESSAGE_WAITFOR arguments (Paweł Kot) o unify SEND_MESSAGE_BLOCK and SEND_MESSAGE_WAITFOR across the phone drivers (Paweł Kot) o fix a thinko done with the api change causing segfault on sms reading (Paweł Kot) * AT series updates: o fix smsc timestamp reading with getsms (Paweł Kot) * libgnokii changes: o Renamed Greek operator PANAFON to Vodafone (P. Christeas) o max sms length increased to 160 chars (BORBELY Zoltan) * link driver updates: o static and global variables have been eliminated from the m2bus source, passing state to everywhere (BORBELY Zoltan) o static and global variables have been eliminated from the fbus sources, passing state to everywhere (BORBELY Zoltan) o link driver initialisation cleanup (BORBELY Zoltan) o fix type mismatch from fbus_initialise (Paweł Kot) o cbus cleanups (Ladislav Michl) * device driver updates: o static and global variables eliminated from device.c, driver specific data moved into state (BORBELY Zoltan) * misc cleanups o format the output when config file is incorrect (Paweł Kot) 0.5.0pre2 ========= * Last minute updates to autogen.sh. They are usefull with newer gettextize versions (Paweł Kot) * Compability changes: o sys/filio.h included for FIONREAD (BORBELY Zoltan) * gnokii changes: o fix potential segfault in writephonebook() (Jan de Cuveland) o fix warning on architectures where char defaults to unsigned char (Paweł Kot) * docs updates: o describe install, install-suid, install-strip and install-ss targets (Paweł Kot) o update config file description -- # only at the line beginning denotes the comment (Paweł Kot) * 6110 series updates: o non-ASCII character set support experimental version (BORBELY Zoltan) o "SetCellBroadcast error" frame documented (BORBELY Zoltan) o GetSecurityCode implemented (BORBELY Zoltan) o recognize Delivery Report type (Paweł Kot) o netmonitor and old style phone handling moved to nokia.c (BORBELY Zoltan) * 7110 series updates: o netmonitor moved to nokia.c (BORBELY Zoltan) o old style call management commands called (BORBELY Zoltan) * translation updates o typos in et.po (Ulrich Hopp) o few more messages translated in pl.po (Paweł Kot) * gnokiid updates: o threads eliminated from gnokiid (BORBELY Zoltan) o minor cleanup in the RLP module (BORBELY Zoltan) o access check if mgnokiidev exists (BORBELY Zoltan) * libgnokii changes: o fix incorrect encoding of extened alphabet characters (Paweł Kot) o terminate decoded unicode string with \0 (Bertrik Sikken) * AT series updates: o Bosch support. Tested with Bosch 909 Dual S (Ladislav Michl) o implement SetCharset (Ladislav Michl) o implement WritePhonebook (Ladislav Michl) o get rid of global variables & cleanup (Ladislav Michl) * cbus updates/clanups (Ladislav Michl) * xgnokii changes: o fix saving the phonebook (Markus Plail) 0.5.0pre1 ========= * Change the external API (provided by libgnokii to the user applications) to be unique and consistant (Paweł Kot) * Change the internal API to be consistant with the external API (Paweł Kot) * Source cleanups: o remove unneeded includes/move the includes to the apropriate places (Paweł Kot) o make not exported globals static (Paweł Kot) o vcard reading/phonebook cleanups (Pavel Machek) o gn_gsm_initialise takes the connection as a string, the the unneeded rlp parameter has been removed (BORBELY Zoltan) * 6110 series updates: o Nokia 8290 is known to work with the driver (Roger) o fix default number reading with the smsc info (Paweł Kot) o remove translatable strings from some dprintfs (Markus Plail) o fix initialization on some phones (not supporting 0xd2 or 0x04 frames) (Paweł Kot) o implement more protocol frames (security commands) (Paweł Kot) o fix the order of the incoming functions (Paweł Kot) o fix phonebook names saving in 3310/3330/3410 phones; names are in unicode (Paweł Kot) o Nokia 8250 is know to work with the driver (Roger So) * 6510 series updates: o make ValidateSMS more robust (Markus Plail) o fix SMSFolder mess (Markus Plail) o add create/delete SMS folder (Markus Plail) o add save SMS (may be dangerous) (Markus Plail) o add initial dialvoice support (Markus Plail) o add reading alarm state (Marcin Wiacek, Markus Plail) o be more carefull with the buffer overflow possibilities (Jan de Cuveland, Paweł Kot) * 7110 series updates: o make ValidateSMS more robust (Markus Plail) o fix SMSFolder mess (Markus Plail) o implement WAP (Markus Plail) o netmonitor fixes (Markus Plail) o add keypress simulation (Adif Hamza, Markus Plail) * AT series updates: o fix SMS reading (Pavel Machek, Paweł Kot) * Call management subsystem updates: o state pointer added to CallNotification (BORBELY Zoltan) o call management API added to the repository (BORBELY Zoltan) * xgnokii updates: o remove unnecessary GSM_Data declarations (Markus Plail) o DialVoice converted to the new api (BORBELY Zoltan) o SendDTMF implemented again (BORBELY Zoltan) o get rid of the global GSM_Data (Markus Plail) o fix deleting SMS messages (Markus Plail) o fix date when saving SMS messages to mailbox (Markus Plail) o use correct xgnokiidir in xgnokii (Paweł Kot, Tor Petterson) o fix changing memory type with newer phones (Markus Plail, Paul Vriens) o fix name disappearing after editing numbers (Markus Plail, Paul Vriens) o fix number disappearing when changin memory type (Markus Plail, Paul Vriens) o fix date/time setting only working once in calendar module (Markus Plail) o fix deleting calendar notes from phones with cal. notes index (Markus Plail) o fix recurrence display (Markus Plail) o fix contacts being saved although cancel was pressed (Markus Plail) o fix phone number getting lost when changing memory type (Markus Plail) o don't loop forever on the incorrect initialization (Paweł Kot) * gnokii updates: o remove SMSFolder hack from getsms (Markus Plail) o call status display added (BORBELY Zoltan) o dialvoice uses the call management API (BORBELY Zoltan) o don't exit after the first loop in the writephonebook (Emanuele Pucciarelli, Paweł Kot) o add create/delete SMS folder (Markus Plail) o fix incorrect longoptions values for sendsms(); reported by Martin Kozelsky (Paweł Kot) o gnokii --listnetworks added (BORBELY Zoltan) o correctly set memory_type_string in writephonebook() (Jan de Cuveland) o pass the retval to the usage() (Paweł Kot) * nokia-decoding updates: o name can be assigned to both bitmap and phonebook entry (Markus Plail) * libsms updates: o remove SMSFolder hacks in GetFolderChanges (Markus Plail) o add add gn_sms_pack_date_time (Markus Plail) * change strncpys to snprintfs in vcal.lx (Markus Plail) * spec file fixes (Paweł Kot) * add base bluetooth support (Marcel Holtmann) * build system changes o use NLS detection from autoconf/automake macros (Paweł Kot, Mariusz Mazur, PLD Team) o fixed configure.in to not generate warning on AC_PROG_CC (Mariusz Mazur) o workaround for Red Hat 7.3 gettext which is sligthly different then other distribution gettext (Mariusz Mazur) o Slovenian translation fixed; no I don't know Slovenian at all ;-), just fixed "number of format specifications in 'msgid' and 'msgstr' does not match" error (Paweł Kot) o build irda support only where the irda support is working (only Linux systems?) (Paweł Kot) o avoid using // in the install paths (Paweł Kot) o setenv replaced by putenv when needed (BORBELY Zoltan) o better pthread detection (required by HP-UX) (BORBELY Zoltan) o snprintf compilation fixes for HP-UX (BORBELY Zoltan) o device level fixes for HP-UX (BORBELY Zoltan) * ppm2nokia script added (Vidar Madsen) * FreeBSD compatibility fixes: FBSD does not like local variables with the type of large size; we convert these variables to the pointers and alloc them dynamically. (Jan Derfinak, Paweł Kot) * MacOS X compatibility (Ruotger Skupin) * remove include/devices/linuxirda.h (Paweł Kot) * MS Windows compatibility o add serial_nreceived() and serial_flush() functions to winserial.c (Mark Lakata) o don't use alloca(3) (Paweł Kot) * gsm-encoding changes o proper unicode support (Hu Gang, Markus Plail) o don't return -1 but 1 when wctomb() or mbtowc() fails (Jan de Cuveland) * tekram dongle support reimplemented (BORBELY Zoltan) * docs updates: o mention 'make DESTDIR= install' in the packaging howto (Paweł Kot) o mention external libraries needed for gnokii (Paweł Kot) o reflect API changes in gnokii-hackers howto (Paweł Kot) o new FAQ entries: require_dcd and gettextize (Paweł Kot) o MacOS X README (Ruotger Skupin) * new Estonian translation (Hans Motshärg) 0.4.3 ===== * gnokii updates: o don't use stdout as the diagnostic output (Paweł Kot) o some cleanups and fixes to make bitmap handling with 6510 series work (Markus Plail) o add --gettodo (Markus Plail) o don't use hardcoded values (Len Trigg, Paweł Kot) o add --writetodo (Markus Plail) o add WAP handling (Markus Plail) o extend SaveSMS functionality (Markus Plail) * xgnokii updates: o fix speeddial writing (Markus Plail) o fix logos (Markus Plail) o don't use hardcoded values (Paul Vriens) o fix deleting SMS messages (Markus Plail) * 6510 series updates: o add bitmap writing (Markus Plail) o add ToDo reading (Markus Plail) o fix SMS reading from IN/OUTBOX (ugly) (Markus Plail) o use nokia-decoding (Markus Plail) o add ToDo writing (Markus Plail) o add DeleteAllToDoLocations (Markus Plail) o add WAP handling (Markus Plail) o fix SMS status (Robert Ivanc) o add DeleteSMSnoValidate (Markus Plail) o add date/time, alarm writing (Marcin Wiacek, Markus Plail) * 6110 series updates: o Nokia 3410 is known to work (Paweł Kot) o use 0x64 frames only when PM_AUTHENTICATION is set for the model (Paweł Kot) o use unicode for the newer phones in the phonebook (Paweł Kot) o phone info frame (0xd2) parsed correctly (BORBELY Zoltan) o static variables eliminated from the driver (BORBELY Zoltan) o phone initialisation simplified (BORBELY Zoltan) o GetIMEI and GetRevision should work with phones not supporting the 0x64 type message (BORBELY Zoltan) o GetProfile doesn't call PhoneInfo2 any longer (BORBELY Zoltan) o old style call management API added (BORBELY Zoltan) o NBS upload for operator logo (BORBELY Zoltan) o phone matching code improved (BORBELY Zoltan) o NBS upload for ringtone (BORBELY Zoltan) o MakeCall1() calls GetNetworkInfo first (maybe eliminates some datacall problem) (BORBELY Zoltan) o use PNOK_FBUS_EncodeSMS (Markus Plail) o extend SaveSMS functionality (Markus Plail) * 7110 series updates: o use nokia-decoding (Markus Plail) o fix Inbox status reading (Marcin Wiacek, Markus Plail) o remove GetUnreadMessages and friends (Markus Plail) o add DeleteSMSnoValidate (Markus Plail) o use PNOK_FBUS_EncodeSMS (Markus Plail) o add SaveSMS functionality (Markus Plail) * bitmap support o some cleanups and fixes to make bitmap handling with 6510 series work (Markus Plail) * libsms updates o support decoding extension of the default alphabet (Paweł Kot) o support for sending the characters from the default alphabet extension (Paweł Kot) o distinct between currency and euro symbols based on locale set (Paweł Kot) o add DeleteSMSnoValidate (Markus Plail) o extend SaveSMS functionality (Markus Plail) * SMSD updates o support fo the phones with the SMS folders (Markus Plail, Jan Derfinak) * build system updates: o respect CFLAGS from the environment, idea from PLD spec (Paweł Kot) * create nokia-decoding.c for decoding functions generic to newer NOKIA phones (phonebook, calendar for now) (Markus Plail) * statemachine pointer added to the incoming functions of the phone drivers (BORBELY Zoltan) * DriverInstance pointer added to the GSM_Phone strucutre. It can be used by the phone drivers to store its state (BORBELY Zoltan) * build system changes: o install xgnokii in the same place as gnokii by default, you can change this behaviour with --with-xgnokii-dir (Paweł Kot) * vCalendar support o add ToDo support, fix/extend PHONE CALL (Markus Plail) * poll() converted to select() everywhere (BORBELY Zoltan) * make static variables declared with static keyword, make variables extern where needed (Paweł Kot) * add 6310i and 7650 to unixirda.c (Robert Ivanc, Markus Plail) * change PNOK_FBUS_SendSMS to PNOK_FBUS_EncodeSMS (Markus Plail) 0.4.2a ====== * Just a small typo in the Makefile (Robert Steinhäußer) 0.4.2 ===== * Moved logos, ringtones and vCards from Docs/ to more appropriate place (Paweł Kot) * Update spec file to reflect libgnokii.so in there (Tibor Pittich) * 6510 series updates: o fix date/time reading (Markus Plail) o add profile writing (Markus Plail) o add/fix getsmsstatus (Markus Plail) o little fix to read first block of inoming network correctly thanks to a hint from Arek Karas (Markus Plail) o cleanups (Markus Plail) o phonebook fixes thanks to hints from Len Trigg (Markus Plail) o remove PM_NETMONITOR in misc.c (Markus Plail) o add GetSMSnoValidate (Markus Plail) o minor battery fix (Markus Plail) o add (dummy) GetUnreadMessages (Markus Plail) o add DeleteSMS (Markus Plail) o re-add IncomingSecurity (Markus Plail) o add GetSecurityCodeStatus (Markus Plail) o add EnterSecurityCode (only PIN) (Markus Plail) o add IncomingSubscribe/Subscribe (Markus Plail) o add IncomingCommStatus (Markus Plail) o return NULL if no SMSC name is found (Markus Plail) o fix SMS reading (for INBOX mainly) (Markus Plail) o add validity to SMS sending (Markus Plail) o add IncomingWAP (Markus Plail) o change default group to 'No Group'(5) when reading contacts (Markus Plail) o return GE_EMPTYLOCATION when no op logo is found (Markus Plail) o set SMSC Number/Remote Number block length according to the real length (Paweł Kot) o enable DLR3[P] cable connection (Manfred Jonsson, Paweł Kot) o protocol updated to be in line with what's implemented (Markus Plail) o update documentation (Paweł Kot) * 7110 series updates: o move GetUnreadMessages from gsm-sms.c (Markus Plail) o change GOP7110_* to GOP_* (Markus Plail) o do not read date/time and numbers when reading messages of type SMS_Submit (Markus Plail) o change behaviour of DeleteSMS to be consistant with GetSMS (Markus Plail) o return NULL if no SMSC name is found (Markus Plail) o change default group to 'No Group'(5) when reading contacts (Markus Plail) o add 7190 to the supported models list (Terry Moreland) * gnokii fixes: o change deletesms() to reflect changes in API (Markus Plail) o indentation changes (Paweł Kot) o don't initialize the connection for foogle() (Paweł Kot) o when some characters are not from the default alphabet encode them in the unicode (Paweł Kot) o avoid potential compilator warning on assigning caller group number (Terry Moreland, Paweł Kot) * xgnokii fixes: o fix SMS reading (Markus Plail) o fix date/time display for SMS messages (Markus Plail) o fix RF/battery level display for 6110 series (Markus Plail) o make SMS stuff work again (Markus Plail) o rename DeleteSMS to not conflict with new API (Markus Plail) o make SMS sending work again (Markus Plail) o fix display of picture messages (Markus Plail) o add URLs to contacts (6510 only) (Markus Plail) o when some characters are not from the default alphabet encode them in the unicode (Paweł Kot) o we need more room for the port length (Paweł Kot) * libsms fixes: o fix GSM_ReadSMSnoValidate (Markus Plail) o remove GetUnreadMessages and friends (Markus Plail) o add DeleteSMS (Markus Plail) * replace GOP_FindUnreadSMS with GOP_GetUnreadMessages (Markus Plail) o smsd changes: o when some characters are not from the default alphabet encode them in the unicode (Paweł Kot) o introduce new connection type DLR3P, you can use it when you know that you have DLR3 or DLR3P cable -- you will get then faster initialization (Paweł Kot) o Strongly suggest to do make install after make (Paweł Kot) 0.4.1 ===== * gnokii fixes o add missing break when reading concatenated mesages; catched by Markus Plail (Paweł Kot) o raise writephonebook buffer from 99 to 254 (Markus Plail) o use print_error() when reporting the error (Paweł Kot) o print phonebook in the more userfiendly manner; for the old behaviour use -r or --raw (Paweł Kot) o i18n of all remaining (not debug) strings (Paweł Kot) * 6510 series updates o major SMS layout rewrite, the messages are now parsed, rather than using hardcoded numbers (Markus Plail) o SendSMS updated, almost all magic numbers are gone (Markus Plail) o now all magic numbers have gone thanks to Paweł (Markus Plail) o fix handling of different INBOX memory types (Markus Plail) o speed up reading of multiple messages (Markus Plail) o add writephonebook functionality (Markus Plail) o copy writecalendar stuff from 7110 (Markus Plail) o minor fixes (RF/battery level) (Markus Plail) o copy startup stuff from 7110 (Markus Plail) o cleanup: delete functions IncomingSecurity, netmonitor... as they won't work with this series. (Markus Plail) o add profile reading (Markus Plail) o add speed dials reading/writing (Markus Plail) o add welcome note and anykey answer reading (Markus Plail) o minor cleanups (Markus Plail) o add IncomingRadio (no functionality yet) (Markus Plail) o initial keypress emulation code (not very functional yet) (Markus Plail) * 7110 series o typo in P7110_WritePhonebookLocation (Markus Plail) * 6160 series updates: o Nokia 5120 (NSC-1) added to misc.c (BORBELY Zoltan) o Startup logo reading implemented (BORBELY Zoltan) * New supported phones: o Nokia 6310i (Markus Plail) o Nokia 7650 (hope it works with nk6510 driver) (Paweł Kot) o Nokia 9210 - not really suppported, but we know its identity and hopefully we'll get the support soon (Paweł Kot) * Docs updates: o add --keysequence hints to FAQ (Pavel Machek) o add vcal problems to FAQ (Paweł Kot) o add Get startup logo to nk6160.txt (BORBELY Zoltan) o improve --keysequence hints in FAQ (BORBELY Zoltan) o www.flosys.com/tdma page added to FAQ (BORBELY Zoltan) * Cleanups in the error handling system: simplify and decrease the ammount of the available return codes -- we don't need them all in this form in fact (Paweł Kot) * libsms changes: o allow to define SMS send timeout in the config file, defaults to 10 seconds (Paweł Kot) o convert some printfs to dprintfs (Paweł Kot) * tarballs will contain vcal.c not to require users to have flex, cvs users will still meet the requirement, note that after make distclean vcal.c will be removed (Paweł Kot) 0.4.0 ===== * Rewrite of the SMS subsystem o reading of SMS splitted into 2 stages (Paweł Kot) o support for EMS picture/animation SMSes (Pavel Machek) o support for sending nokia ringtones (Pavel Machek) o support for sending iMelody (Pavel Machek) o reactivate support for text before picture messages (Markus Plail) o support for sending nokia logos and picture msgs (Pavel Machek) o use correct UDHs (Paweł Kot) o add helpful defines (Paweł Kot) o added sms-nokia.[ch] for Nokia extensions for SMS stuff (Paweł Kot) o correct some header includes -- move them where they are needed, explicit dependencies are better (Paweł Kot) o don't use RawData in SMS subsystem (Paweł Kot) o SendSMS was moved from nk7110.c to nokia.c (BORBELY Zoltan) o change MessageCenter structure; update all drivers to reflect this change (Paweł Kot) o change the type of the ValidityIndicator field in GSM_SMSMessage (Paweł Kot) o remove sms-layout.c and other layout related things (Paweł Kot) * code fixes: o added filelocking for gnokiid xgnokii smsd and fixed for gnokii o added Terminate to GOP functions o moved atexit from unixserial to application level (Manfred Jonsson) o follow the convention: struct fields begin with the capital letter (Paweł Kot) o code cleanups - remove compile warnings (Paweł Kot) * Support Nokia Card Phone RPM-1 (Friedrich Lobenstock) * More verbose reporting when detecting the model (Friedrich Lobenstock) * Docs updates: o added MAINTAINERS file (Paweł Kot) o "call divert is active" documented (BORBELY Zoltan) o updated FAQ (also on the webpage) (Paweł Kot) o V110 protocol info added to DataCalls-QuickStart (Aart Koelewijn) o mention memory types for --getsms in the manual page (Paweł Kot) o update READMEs, add README for 7110 and 6510 series (Markus Plail, Paweł Kot) * Allow GSM_PrintBitmap to output to any stream (Paweł Kot) * Build system updates: o fixed Makefile to install libgnokii.so for all install* targets (Paweł Kot) * xgnokii fixes: o lockup during the phonebook reading fixed (BORBELY Zoltan) o added extended phonebook support (Markus Plail) o some minor fixes in contacts (Markus Plail) o update to compile with the new SMS subsystem (Markus Plail) o add support for recurrence in calendar (Markus Plail) o minor fixes for recurrence in calendar (Markus Plail) * gnokii updates: o let gnokii display usage instruction to stdout when it's called with --help or -h and to stderr otherwise (Paweł Kot) o fixes for getsms() to not output the text twice and correctly use SMSCTime and Time fields (Paweł Kot) o fixes for getsms() to correctly get SMSC number (Paweł Kot) o read SMSC number in sendlogo() (Paweł Kot) o change --getmemory to --getphonebook (Paweł Kot) o added getsecuritycode (Markus Plail) o report errors in more verbose way (Paweł Kot) * gnokiid updates: o ATH can terminate initiated calls (BORBELY Zoltan) o incoming calls can be answered (BORBELY Zoltan) * 7110 series updates: o Cleanups in the 7110 driver (Paweł Kot) o added writing of non GSM_Number subentries (Markus Plail) o cleanups in the driver - recommended to toher driver to follow this code (Paweł Kot) o support for the new SMS subsystem (Paweł Kot) o fixes for SMSC reading (Paweł Kot) o fix reading Recurrence from phone (Markus Plail) o added getsecuritycode (Markus Plail) * 6510 series updates: o update to work with new SMS subsystem (Markus Plail) o capitalization caused compilation problem (BORBELY Zoltan) o make SMS sending work (only for 6310 now) (Paweł Kot) o correctly read SMSC information (Paweł Kot) o fix wrong memory types for SMS, it still needs fixing for Inbox - we can have messages stored on either SIM or in the phone memory (Paweł Kot) o small fixes for SMS reading -- needs more work (Paweł Kot) * 6110 series updates: o SMS reading works with the new SMS subsystem (BORBELY Zoltan) o "call divert is active" frame marked as unsolicited in nokia.c (BORBELY Zoltan) o answercall fix (BORBELY Zoltan) o SMS sending works with the new SMS subsystem (BORBELY Zoltan) o SMS saving works with the new SMS subsystem (BORBELY Zoltan) o calling GetNetworkInfo before sending an SMS (it will reactivate the link) (BORBELY Zoltan) o ISDN cause codes decoded in SendSMS and MakeCall reply (BORBELY Zoltan) * 6160 series updates: o experimental driver added (BORBELY Zoltan) o Identify implemented (BORBELY Zoltan) o ReadPhonebook implemented (BORBELY Zoltan) o WritePhonebook implemented (BORBELY Zoltan) * AT series updates: o Security functions for AT phones (Manfred Jonsson) o new SMS layer compability (Paweł Kot) o added stub for SMS delete. needs to be revisited when SMS works for AT mode (Petr Muller) * fake driver updates: o new SMS layer compability (Paweł Kot) * device driver updates: o device_nreceived, device_flush added (BORBELY Zoltan) o serial_nreceived, serial_flush added (BORBELY Zoltan) * link driver updates: o initial version of the M2BUS link driver added (BORBELY Zoltan) o M2BUS DTR/RTS toggling disabled at link initialisation (BORBELY Zoltan) o M2BUS called the SM_IncomingFunction with wrong message length (BORBELY Zoltan) o M2BUS idle channel check and channel flushing added (BORBELY Zoltan) * ISDN cause decoding added to gsm-error (BORBELY Zoltan) * GOP_GetSecurityCode added (Markus Plail) 0.4.0pre20 ========== * SMSes from AT phones fixed (Pavel Machek) * Ericsson a1018 support done nicely (Pavel Machek) * Added testsuite (Pavel Machek) o Add testing ringtone -- star.rtttl * gnokii updates (Markus Plail) o fix segfault when reading more than one message in a row * 6110 series updates o PollSMS race condition eliminated (BORBELY Zoltan) o SMS sending error codes updated (BORBELY Zoltan) o explicitly name 3360 in misc.h (for xgnokii) and in unixirda.c (for irda connections) (Kevin Thayer) o handle the case when operator does not allow to send the SMS (Paweł Kot) * Add GPL compatible preamble in tcp.[ch] files (Paweł Kot) * Make tcp.[ch] compatible with gnokii coding style (Paweł Kot) * SMSD updates o don't use 'connect' as the variable name; it conflicts with connect() function - introduced by tcp device support (Paweł Kot) * Build system updates o give the consistant information about --with-gnugetopt (Paweł Kot) o autogen.sh added (BORBELY Zoltan) o configure will abort when include/config.h.in is missing (BORBELY Zoltan) * bitmap support o begin cleaning up bitmap code; rewrite bitmap handling in gnokii.c in the readable way (Paweł Kot) o fix the case when NOL bitmap is not in the size dividable by 8 (Paweł Kot) o cleanups using ceiling function (BORBELY Zoltan, Paweł Kot) o GSM_ShowBitmapFile cleanup, startup logo is displayed correctly (BORBELY Zoltan) * Updated TODO (BORBELY Zoltan, Paweł Kot) * code cleanups o minor portability fixes (Jan Kratochvil, BORBELY Zoltan) * libsms updates o correctly count UDH length (Pavel Machek, Paweł Kot) o SendSMS returns with error upon GetSMSCenter failure (BORBELY Zoltan) * Docs updates o reflect changes in email and web addresses (BORBELY Zoltan) o protocol updates for 6110 (Harri Yli-Torkko) o added short docs about ericsson phones (Pavel Machek) * Translation updates o Estonian translation for the pre19 release (Hans Motsharg) o Slovenian translation for the pre19 release (Bostjan Muller) * gnokii updates o fix sendlogo to set SMS_NoData for the non-existent message parts (Paweł Kot) * win32 updates o builds regular (LIB) and shared (DLL) version for Win32 with Visual Studio 6 (Feico de Boer) o builds Cygwin Win32 with --enable-win32 --disable-shared (Feico de Boer) * 6510 series updates o support also 8310 (Christian Rishoej) 0.4.0pre19 ========== * include tcp.h (Pavel Machek) * libsms updates o kill GE_SMSSENDOK and replace with GE_NONE (Pavel Machek, Paweł Kot) * AT series updates o enlarge the buffer to avoid potential overruns (Pavel Machek) 0.4.0pre18 ========== * Add TCP connection (Jan Kratochvil, hacked by Pavel Machek) * Fake phone driver added (for debugging) (Pavel Machek) * Code cleanups o remove compilation warnigns (Paweł Kot) o portability fixes (BORBELY Zoltan) o u_char removed (BORBELY Zoltan) * 2110 series updates o fix segfault on getsms, but break smsreader. (Pavel Machek) (this is actually step in right direction) * dancall updates o make it at least compile [testers wanted] (Pavel Machek) o remove duplicated reply_buf definition avoiding OpenBSD compile (Paweł Kot) * smsd updates o replaced GSM_MAX_DESTINATION_LENGTH with MAX_BCD_STRING_LENGTH (Paweł Kot) * gnokii fixes o fixed wrong check in smsreader (Paweł Kot) o replace unknown with sender number when saving SMS not matching given pattern (Bostjan Muller) * xgnokii fixes o some strange problem with xgnokii linking (reported by few people) (Paweł Kot) o Netmonitor fixed (Markus Plail) * build system updates: o autoheader support added (based on Jan Kratochvil's autoheader patch for mygnokii) (BORBELY Zoltan) o configure.in updates for autoheader (BORBELY Zoltan) o config.h.in.in removed (BORBELY Zoltan) o autoheader specific cleanup in various files (BORBELY Zoltan) o configure.in fixes and cleanup (BORBELY Zoltan) o fix HAVE_LONG_DOUBLE problem with autoheader >= 2.50 (Paweł Kot) o make use of DESTDIR variable to be able to change directory root (Paweł Kot) o __USE_XOPEN killed, using _XOPEN_SOURCE 500 everywhere it's needed. At least Solaris requires it. (BORBELY Zoltan) * libsms updates: o fixed memset typo in DefaultSMS() (Ueli) o fix the problem with decoding BCD international numbers (Paweł Kot) o start to fix Unicode problems with SMS (reported by Konstantin Smirnov) (Paweł Kot) * 6110 series updates o keepalive packet won't be reported as an unhadled frame (BORBELY Zoltan) o CancelCall, AnswerCall fixed (BORBELY Zoltan) o share the CallDivert code with 7110 driver (Paweł Kot) * 7110 series updates o share the CallDivert code with 6110 driver (Paweł Kot) 0.4.0pre17 ========== * We moved to savannah.gnu.org (Paweł Kot) * 2110 series updates o smsreader updates (Pavel Machek) * 6110 series updates o MakeCall() / IncomingCallInfo() restructured (BORBELY Zoltan) o more MakeCall() / IncomingCallInfo() fixes (BORBELY Zoltan) * 6510 series updates o added GetMemoryStatus (thanks to Michael Moosbauer for the info) (Markus Plail) * 7110 series updates o added GetSMSnoValidate to 7110 code, to be able to read SMS faster if you know their location (Markus Plail) o fixed folder handling in 7110 code -> all function expect GMT_?? as MemoryType (Markus Plail) * win32 updates: o Updates to make cygwin compile (./configure --enable-win32 --disable-shared --disable-nls) (Paweł Kot) o misc fixes (Marcin Wiacek) o Cygwin compilation error fixed (BORBELY Zoltan) o VC++ compability and minor fixes (Feico de Boer) * Docs updates o More accurate INSTALL file (Robert Steinhaeusser) * libsms updates o start documenting libsms. The source code is documented in the linux kernel manner, so you can use its tools (Paweł Kot) o replace 'short' type with 'int' type (Paweł Kot) o prepare to be able to compile libsms without bitmaps or ringtones support (Paweł Kot) o Fix overflows when storing SMSC/remote number (Paweł Kot) o Fix using bitmap types from different places (gsm-sms.h and gsm-bitmap.h (Markus Plail) * Compability updates: o asprintf, vasprintf and C99 compliant snprintf and vsnprintf functions provided if not present (BORBELY Zoltan) o portability cleanup in various functions (BORBELY Zoltan) o strsep function provided if not present (Markus Plail) * xgnokii updates o extended AddCall to accept text and phone number (Markus Plail) o added (De)Activate SMS reading in SMS window menu (Markus Plail) o changed the default size of SMS windows (Markus Plail) o speeded up reading contacts (skip locations after all contacts are read (according to memory status)) (Markus Plail) o hopefully fixed a bug when reading contacts from SIM failed (as reported by Michal Kochanowicz) (Markus Plail) o decreased the time the splash screen is visible (Markus Plail) * Cleanups o changed gnokii.c to use strsep instead of strtok (Markus Plail) o mark sending of ringtone as broken (Pavel Machek) o Change from .gif to .png for documentation (Hugh Blemings) o Fixed small typo in include/devices/linuxirda.h (Hugh Blemings) o Updates to address GNU GPL requirements (Paweł Kot) o Replaces ugly ifs from gsm-bitmaps.c::GSM_IsPointBitmap() with a switch (Paweł Kot) * SM_BlockNoRetryTimeout fixed (BORBELY Zoltan) * gnokiid updates: o datapump thread added (BORBELY Zoltan) o dialing error handled (BORBELY Zoltan) o polling fixes (BORBELY Zoltan) o RLP frame handling fixed in fbus.c (BORBELY Zoltan) 0.4.0pre16 ========== * Killed inlines in the code (except xgnokii and smsd) (Paweł Kot) * Fix incorrect LDFLAGS during configure run (Paweł Kot) * More win32 updates (Marcin Wiacek) * Cleanups with some header files, static functions and other things in links/* files (Paweł Kot) * Get rid of obsolete utils.[h|c] (Paweł Kot) * Moved linuxirda.h (Paweł Kot) * Misc FBUS fixes (BORBELY Zoltan) * 7110 series updates o correct Phonebook entries removal (Markus Plail) o other Phonebook fixes (Markus Plail) * 6110 series fixes o IMEI correctly read (Markus Plail) * libsms updates o support for the remote number when receiving the message (Markus Plail) * xgnokii updates o cleanups (Markus Plail) o Phonebook got back to work (Markus Plail) o Calendar got back to work (Markus Plail) 0.4.0pre15 ========== * Really apply all fixes from Jan Kratochvil (Paweł Kot) * 6110 series updates o PressPhoneKey, ReleasePhoneKey implemented (BORBELY Zoltan) o EnterChar implemented (BORBELY Zoltan) o workarounds for the phones (3210, 3310, ...) not supporting some types of the frames (0x64, keyboard events) that were required during the initialization (Paweł Kot) o added #ifdefs for every occurence of the security function (Paweł Kot) o CallDivert implemented (registering does not work) (BORBELY Zoltan) o fixes for receiving SMSCenter data -- accept every value for message value (Paweł Kot) o EnterChar fixes (BORBELY Zoltan) o Key functions commented (BORBELY Zoltan) o possible SMS sending bug fixed (BORBELY Zoltan) o sleep hack removed from CallDivert (BORBELY Zoltan) * gnokii updates o --keysequence updated to the new API (BORBELY Zoltan) o --enterchar implemented (BORBELY Zoltan) o better handling of call divert responses (Paweł Kot) o add option to send 8-bit SMS (Pavel Machek) o fix handling of overlong messages (Pavel Machek) * Makefiles' fixes (Paweł Kot) * Docs updates o copy-and-paste call diverts from 6110 protocol to 7110 protocol description (Paweł Kot) o remove some obsolete things (Paweł Kot) * Cleanup in the dumping code (Paweł Kot) * Other cleanups (Paweł Kot) * Don't repeat everything ttwwiiccee if compiled with --enable-debug (BORBELY Zoltan) * Don't return -1 in function returning unsigned short (Pavel Machek) * Solaris updates o replace AF_LOCAL with AF_UNIX (Marcus Pallinger) * allow to build static library (Marcus Pallinger) * xgnokii updates o fix folder name max length (Paweł Kot) o reindented code (Paweł Kot) o keyboard handling fixed (BORBELY Zoltan) * libsms updates o fix folder name max length (Paweł Kot) o added DefaultSMS() function for initializing SMS struct (Paweł Kot) * More general bitmaps handling -- remove fixed vaules (Paweł Kot) * Do not use (...) in macros if not being compiled on gcc (Pavel Machek) * Remove outdated functions from gsm-bitmaps and gsm-ringtones (Paweł Kot) * 6510 series updates o initial revision (Markus Plail) * 7110 series updates o potentially fix SendSMS problem (Paweł Kot) * win32 fixes (Marcin Wiacek) * timersub fixes (BORBELY Zoltan) 0.4.0pre14 ========== * fixed a problem with a missing headers (sys/uio.h and error.h) for FreeBSD and probably other non-Linux (Paulius Bulotas) * AT mode updates o better error reporting between link and phone layer (Manfred Jonsson) o SMS center reading support (Petr Cech) * SMSD update o DB modules fixes, code and documetation cleanups (Jan Derfinak) * new Serbian operator (Sladjan Andjelic) * 6110 series updates o DialVoice implemented (BORBELY Zoltan) o start to get DataCalls back alive (Jan Kratochvil) o notifications of call placed on hold / call retrieved from hold documented (BORBELY Zoltan) o call specific messages added (eliminates unhandled frame messages) (BORBELY Zoltan) o more call status codes added (BORBELY Zoltan) o RLP frame sending/receiveing implemented (BORBELY Zoltan) o 'Accesories connected' message -- authentication code ported (BORBELY Zoltan) o SetRingtone, GetRawRingtone, SetRawRingtone implemented (BORBELY Zoltan) o GetSecurityCodeStatus, EnterSecurityCode, ChangeSecurityCode (BORBELY Zoltan) o GOP_OnSMS, GOP_PollSMS added (BORBELY Zoltan) o GOP_SendDTMF added (BORBELY Zoltan) o GOP_Reset added (BORBELY Zoltan) * gnokii updates o DialVoice implemented (BORBELY Zoltan) o call status reporting improved (BORBELY Zoltan) o --getringtone implemented (BORBELY Zoltan) o --setringtone converted and enhanced (BORBELY Zoltan) o --changesecuritycode added (BORBELY Zoltan) o password reading function generalized (BORBELY Zoltan) o --senddtmf converted to the new API (BORBELY Zoltan) o --reset converted to the new API (BORBELY Zoltan) o GSM->GetIncomingCallNr removed from gnokii. This was obsoleted by the CallNotification. (BORBELY Zoltan) * compilation fixes (Jan Kratochvil) * cleanups (Paweł Kot) * the fd passed master pty wasn't usable (opening resulted EIO) -- fixes for the new mgnokiidev (BORBELY Zoltan) * gnokiid updates o converted to the new API (BORBELY Zoltan) o Debug output of the *_CallPassup functions (BORBELY Zoltan) * libsms updates o moved some logic from 7110 driver (Markus Plail, Paweł Kot) o new functionality in the interface for detecting changes in the folders/messages status (Markus Plail) * xgnokii updates o SMS support with smart checking for any folder/messages changes: (Markus Plail) + User moves messages manually -> done + User reads unread messages in phone -> done + Newly received messages -> done + User deletes messages -> done + Delivery Reports change from Pending to whatever -> not done + Marking messages read upon clicking -> not done * Docs updated o more detailes on 6110 protocol (BORBELY Zoltan) * FBUS acking moved before the SM_IncomingFunction invocation (BORBELY Zoltan) * SM_BlockTimeout, SM_BlockNoRetryTimeout added (BORBELY Zoltan) 0.4.0pre13 ========== * SECURITY FIX o When installed as gnokii documentation says (sgid gnokii), mgnokiidev could give write permission for the group to any file in the system. Mgnokidev was rewritten. Now that is mgnokiidev who opens pty device and it just passes back the descriptor to the caller through a unix socket (BORBELY Zoltan, Paweł Kot) * 7110 series updates o NetMonitor implemented (???) o cleanups (Markus Plail, Paweł Kot) o fixes for calendar info handling (Markus Plail) o correctly count length of the model name and the revision (Paweł Kot) * gnokii.c updates o NetMonitor updated to the new structure (???) o remove unnessesary entries from gals[] (Marek Michalkiewicz, Sindunata, Paweł Kot) * remove obsolete IR-Dongles patches (Paweł Kot) * wrong order of arguments to memset() in libsms fixed (Paweł Kot) * xgnokii updates o NetMonitor updated to the new structure (Paweł Kot) o working SMS support (Markus Plail, Paweł Kot) o working logos stuff (Markus Plail) o some cleanups (Markus Plail, Paweł Kot) o correct initialization - fbusinit() returns GSM_Error now (Paweł Kot) o fixes in getting to the new structure (Markus Plail, Paweł Kot) * docs updates o real TODO (Paweł Kot) o show gnokii-binary target in configure (Paweł Kot) o update INSTALL detailes (Paweł Kot) * UserData length in SendSMS fix (Paweł Kot) * AT series updates o allow connection=irda (Manfred Jonsson) o don't ignore return messages (Manfred Jonsson) o set the power on dtr and rts (Manfred Jonsson) o SendSMS/SaveSMS fixes (Hannes Schulz) * SMSD updates o MySQL support fixes (Jan Derfinak) * Allow Nokia 8210 and 8310 to use irda connection (Paweł Kot) * "make 7110 with dlr-3 happy" (Manfred Jonsson) * CREDITS updates (Paweł Kot) * 6110 series updates o NetMonitor (BORBELY Zoltan) o get rid of the 7110ism (BORBELY Zoltan) o revert removal of GetIMEI it *IS* needed (Paweł Kot) * Get rid of LinkOKs (Manfred Jonsson) 0.4.0pre12 ========== * 7110 series updates o fix delivery report bugs -- incorrect field was treated as a failure reason/success indcation (Paweł Kot) o fix segfault when phone notified us of the incoming SMS (allocate/deallocate RawData) (Paweł Kot) * 6110 series updates o fix delivery report incorrect remoten number field (Paweł Kot) o implement DeleteSMS (Paweł Kot) o implemented SaveSMS and SendSMS (BORBELY Zoltan) o support for Cell broadcasts (BORBELY Zoltan) * 2110 series updates o SMS unreservation for OnSMS (Pavel Machek) * libsms updates o correctly allocate/free RawData (BORBELY Zoltan, Paweł Kot) o typo fix in gsm-sms.h (BORBELY Zoltan) o impelemented SaveSMS (BORBELY Zoltan) o minor SendSMS fixes (BORBELY Zoltan) o memory corruption bug fixed in gsm-sms.c!!! (check for the validity field in layout (BORBELY Zoltan) o EncodePDUSMS fix in gsm-sms.c (error code and normal execution couldn't be distinguished) (BORBELY Zoltan) * gnokii.c updates o fix segfault in smsreader() when /tmp/sms does not exist (Paweł Kot) o respect use_locking = no (Manfred Jonsson, Sindunata) * fixes for serial device locking (Manfred Jonsson) * statemachine updates o support for GE_UNSOLICITED (BORBELY Zoltan) * AT series updates o 'quirk' fixes (Manfred Jonsson) * SMSD updated o experimental MySQL support (Jan Derfinak) 0.4.0pre11 ========== * CREDITS updates :-) (Paweł Kot) * Solaris compilation fixes (Janusz Fraczek, Paweł Kot) * 7110 series updates o smsreader fixes (Paweł Kot) * 6110 series updates o GetSMSCenter and SetSMSCenter (BORBELY Zoltan) * gnokii.c updates o fixes for getsmsc (BORBELY Zoltan) o new setsmsc (BORBELY Zoltan) o handle the case when use_lockfile is not present in the config file (Paweł Kot) * DefaultName in SMSC struct (BORBELY Zoltan) 0.4.0pre10 ========== * AT series updates o sending SMS (Paweł Kot) * 7110 series updates o SMS status (Paweł Kot) o documentation on SMS status (Paweł Kot) o smsreader (Paweł Kot) * better dumping unhandled frames (BORBELY Zoltan) * 6110 series updates o [S|G]etSpeedDial (BORBELY Zoltan) o display status, display output (BORBELY Zoltan) o 3330 protocol update (Settings/Profiles) (Harri Yli-Torkko) * gnokii.c updates o more general displayoutput (BORBELY Zoltan) o smsreader fixes (Pavel Machek) o use of serial device locking (Paweł Kot) * install-docs bux fixed (Paweł Kot) * gnokii-debug compilation targes (Pavel Machek) * 2110 series updates o 2110 initialization cleanups (Pavel Machek) o fixes for smsreader (Pavel Machek) * locking serial device in /var/lock with a new configuration option (Paweł Kot) * Big Cleanups(TM). Code review. o get rid of GSM_Functions (Paweł Kot) o indentation (Paweł Kot) o remove redundant trailing whitespaces (Paweł Kot) o fix potentially dangerous strcpy in gnokii.c (Paweł Kot) * New sample chat file for HSCSD connection (Przemek Swiderski) * SMSD update (Jan Derfinak) 0.4.0pre9 ========= * libsms updates o sending SMS in AT mode (Paweł Kot) o fixes for 3110 and 2110 reading (Paweł Kot) * 6110 series updates o GetBitmap, SetBitmap (BORBELY Zoltan) o GetProfile, SetProfile (BORBELY Zoltan) o date, alarm (BORBELY Zoltan) o calendar (BORBELY Zoltan) * 3110 fixes for getsms (Tamas Bondar) * SMSD update (Jan Derfinak) * bugfixes in gnokii.c and 7110 support (namely writephonebook) (misc people) * docs updates (Manfred Jonsson) * dumpling unhandled frames (BORBELY Zoltan)